docs: prep for v2 documentation (#6710)

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

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

## Changes

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

No files matched your search

@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# AnalyticsConfigService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new AnalyticsConfigService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new AnalyticsConfigService"/>
___
## 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":"analyticsConfigRepository_","type":"Repository&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userService_","type":"[UserService](services.UserService.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="AnalyticsConfigService"/>
<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":"analyticsConfigRepository_","type":"Repository&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userService_","type":"[UserService](services.UserService.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="AnalyticsConfigService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,25 +60,25 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
@@ -86,11 +86,11 @@ Creates an analytics config.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreateAnalyticsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreateAnalyticsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"Creates an analytics config.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"Creates an analytics config.","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -98,11 +98,11 @@ Updates an analytics config. If the config does not exist, it will be created in
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateAnalyticsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateAnalyticsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"Updates an analytics config. If the config does not exist, it will be created instead.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AnalyticsConfig](../../entities/classes/entities.AnalyticsConfig.mdx)&#62;","optional":false,"defaultValue":"","description":"Updates an analytics config. If the config does not exist, it will be created instead.","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -110,8 +110,8 @@ Deletes an analytics config.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes an analytics config.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes an analytics config.","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# AuthService
@@ -12,13 +12,13 @@ Can authenticate a user based on email password combination
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new AuthService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new AuthService"/>
___
## 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":"userService_","type":"[UserService](services.UserService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/interfaces/medusa.Logger-1.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="AuthService"/>
<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":"userService_","type":"[UserService](services.UserService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/interfaces/medusa.Logger-1.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="AuthService"/>
___
@@ -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,15 +62,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_"/>
### comparePassword\_
@@ -78,11 +78,11 @@ Verifies if a password is valid given the provided password hash
#### Parameters
<ParameterTypes parameters={[{"name":"password","type":"`string`","description":"the raw password to check","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hash","type":"`string`","description":"the hash to compare against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="comparePassword_"/>
<TypeList types={[{"name":"password","type":"`string`","description":"the raw password to check","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hash","type":"`string`","description":"the hash to compare against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="comparePassword_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"the result of the comparison","expandable":false,"children":[]}]} sectionTitle="comparePassword_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"the result of the comparison","expandable":false,"children":[]}]} sectionTitle="comparePassword_"/>
### authenticateAPIToken
@@ -90,11 +90,11 @@ Authenticates a given user with an API token
#### Parameters
<ParameterTypes parameters={[{"name":"token","type":"`string`","description":"the api\\_token of the user to authenticate","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticateAPIToken"/>
<TypeList types={[{"name":"token","type":"`string`","description":"the api\\_token of the user to authenticate","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticateAPIToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n user: the user document if authentication succeeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticateAPIToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n user: the user document if authentication succeeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticateAPIToken"/>
### authenticate
@@ -103,11 +103,11 @@ scrypt to match password with hashed value.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"the email of the user","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the password of the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticate"/>
<TypeList types={[{"name":"email","type":"`string`","description":"the email of the user","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the password of the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticate"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n user: the user document if authentication succeeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticate"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n user: the user document if authentication succeeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticate"/>
### authenticateCustomer
@@ -116,8 +116,8 @@ scrypt to match password with hashed value.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"the email of the user","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the password of the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticateCustomer"/>
<TypeList types={[{"name":"email","type":"`string`","description":"the email of the user","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the password of the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authenticateCustomer"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n customer: the customer document if authentication succeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticateCustomer"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;AuthenticateResult&#62;","optional":false,"defaultValue":"","description":"success: whether authentication succeeded\n customer: the customer document if authentication succeded\n error: a string with the error message","expandable":false,"children":[]}]} sectionTitle="authenticateCustomer"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# BatchJobService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new BatchJobService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new BatchJobService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.updated\"","expandable":false,"children":[]},{"name":"Events.PRE_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.pre_processed\"","expandable":false,"children":[]},{"name":"Events.CONFIRMED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.confirmed\"","expandable":false,"children":[]},{"name":"Events.PROCESSING","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.processing\"","expandable":false,"children":[]},{"name":"Events.COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.completed\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.canceled\"","expandable":false,"children":[]},{"name":"Events.FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.failed\"","expandable":false,"children":[]},{"name":"batchJobRepository_","type":"Repository&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"strategyResolver_","type":"[StrategyResolverService](services.StrategyResolverService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"batchJobStatusMapToProps","type":"Map&#60;[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx), object&#62;","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="BatchJobService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.updated\"","expandable":false,"children":[]},{"name":"Events.PRE_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.pre_processed\"","expandable":false,"children":[]},{"name":"Events.CONFIRMED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.confirmed\"","expandable":false,"children":[]},{"name":"Events.PROCESSING","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.processing\"","expandable":false,"children":[]},{"name":"Events.COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.completed\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.canceled\"","expandable":false,"children":[]},{"name":"Events.FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"batch.failed\"","expandable":false,"children":[]},{"name":"batchJobRepository_","type":"Repository&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"strategyResolver_","type":"[StrategyResolverService](services.StrategyResolverService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"batchJobStatusMapToProps","type":"Map&#60;[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx), object&#62;","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="BatchJobService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,132 +60,132 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"batchJobId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableBatchJobProps](../../medusa/classes/medusa.FilterableBatchJobProps.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[FilterableBatchJobProps](../../medusa/classes/medusa.FilterableBatchJobProps.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[BatchJob](../../entities/classes/entities.BatchJob.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[BatchJob](../../entities/classes/entities.BatchJob.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"[BatchJobCreateProps](../../medusa/types/medusa.BatchJobCreateProps.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"[BatchJobCreateProps](../../medusa/types/medusa.BatchJobCreateProps.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;Pick&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx), \"context\" \\| \"result\"&#62;&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;Pick&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx), \"context\" \\| \"result\"&#62;&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### confirm
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
### complete
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="complete"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="complete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="complete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="complete"/>
### cancel
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### setPreProcessingDone
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPreProcessingDone"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPreProcessingDone"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setPreProcessingDone"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setPreProcessingDone"/>
### setProcessing
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setProcessing"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setProcessing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setProcessing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setProcessing"/>
### setFailed
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setFailed"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`string` \\| [BatchJobResultError](../../medusa/types/medusa.BatchJobResultError.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setFailed"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setFailed"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setFailed"/>
### prepareBatchJobForProcessing
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"[CreateBatchJobInput](../../medusa/types/medusa.CreateBatchJobInput.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"req","type":"Request&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareBatchJobForProcessing"/>
<TypeList types={[{"name":"data","type":"[CreateBatchJobInput](../../medusa/types/medusa.CreateBatchJobInput.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"req","type":"Request&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareBatchJobForProcessing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CreateBatchJobInput](../../medusa/types/medusa.CreateBatchJobInput.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="prepareBatchJobForProcessing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CreateBatchJobInput](../../medusa/types/medusa.CreateBatchJobInput.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="prepareBatchJobForProcessing"/>
### updateStatus
#### Parameters
<ParameterTypes parameters={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateStatus"/>
<TypeList types={[{"name":"batchJobOrId","type":"`string` \\| [BatchJob](../../entities/classes/entities.BatchJob.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[BatchJobStatus](../../medusa/enums/medusa.BatchJobStatus.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateStatus"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateStatus"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[BatchJob](../../entities/classes/entities.BatchJob.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateStatus"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# CartService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CartService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CartService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CUSTOMER_UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.customer_updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.updated\"","expandable":false,"children":[]},{"name":"shippingMethodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSessionRepository_","type":"Repository&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService_","type":"[DiscountService](services.DiscountService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardService_","type":"[GiftCardService](services.GiftCardService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","opLine truncated
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CUSTOMER_UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.customer_updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"cart.updated\"","expandable":false,"children":[]},{"name":"shippingMethodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSessionRepository_","type":"Repository&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService_","type":"[DiscountService](services.DiscountService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardService_","type":"[GiftCardService](services.GiftCardService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","optional":falLine truncated
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,25 +60,25 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableCartProps`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`FilterableCartProps`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieve
@@ -86,21 +86,21 @@ Gets a cart by id.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"the options to get a cart","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"the options to get a cart","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the cart document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the cart document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveLegacy
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
#### Deprecated
@@ -108,11 +108,11 @@ Gets a cart by id.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
### create
@@ -120,21 +120,21 @@ Creates a cart.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CartCreateProps`","description":"the data to create the cart with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CartCreateProps`","description":"the data to create the cart with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### getValidatedSalesChannel
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getValidatedSalesChannel"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getValidatedSalesChannel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getValidatedSalesChannel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getValidatedSalesChannel"/>
### removeLineItem
@@ -142,11 +142,11 @@ Removes a line item from the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string` \\| `string`[]","description":"the line item(s) to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string` \\| `string`[]","description":"the line item(s) to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
### validateLineItemShipping\_
@@ -156,11 +156,11 @@ shipping methods.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"the set of shipping methods to check from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemShippingProfiledId","type":"`string`","description":"the line item","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateLineItemShipping_"/>
<TypeList types={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"the set of shipping methods to check from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemShippingProfiledId","type":"`string`","description":"the line item","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateLineItemShipping_"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"boolean representing whether shipping method is validated","expandable":false,"children":[]}]} sectionTitle="validateLineItemShipping_"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"boolean representing whether shipping method is validated","expandable":false,"children":[]}]} sectionTitle="validateLineItemShipping_"/>
### validateLineItem
@@ -168,11 +168,11 @@ Check if line item's variant belongs to the cart's sales channel.
#### Parameters
<ParameterTypes parameters={[{"name":"sales_channel_id","type":"`object`","description":"the cart for the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id.sales_channel_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"`LineItemValidateData`","description":"the line item being added","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateLineItem"/>
<TypeList types={[{"name":"sales_channel_id","type":"`object`","description":"the cart for the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id.sales_channel_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"`LineItemValidateData`","description":"the line item being added","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"a boolean indicating validation result","expandable":false,"children":[]}]} sectionTitle="validateLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"a boolean indicating validation result","expandable":false,"children":[]}]} sectionTitle="validateLineItem"/>
### addLineItem
@@ -180,11 +180,11 @@ Adds a line item to the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will add to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to add.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"validateSalesChannels - should check if product belongs to the same sales channel as cart\n (if cart has associated sales channel)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.validateSalesChannels","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will add to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to add.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"validateSalesChannels - should check if product belongs to the same sales channel as cart\n (if cart has associated sales channel)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.validateSalesChannels","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
#### Deprecated
@@ -197,11 +197,11 @@ to have has\_shipping to false. Finally, the adjustments will be updated.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will add to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx) \\| [LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the line items to add.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"validateSalesChannels - should check if product belongs to the same sales channel as cart\n (if cart has associated sales channel)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.validateSalesChannels","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="addOrUpdateLineItems"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart that we will add to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx) \\| [LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the line items to add.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"validateSalesChannels - should check if product belongs to the same sales channel as cart\n (if cart has associated sales channel)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.validateSalesChannels","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="addOrUpdateLineItems"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addOrUpdateLineItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addOrUpdateLineItems"/>
### updateLineItem
@@ -209,11 +209,11 @@ Updates a cart's existing line item.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"the id of the line item to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`LineItemUpdate`","description":"the line item to update. Must include an id field.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"the id of the line item to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`LineItemUpdate`","description":"the line item to update. Must include an id field.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
### adjustFreeShipping\_
@@ -224,21 +224,21 @@ if a free shipping was present, we set shipping methods to original amount
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to adjust free shipping for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldAdd","type":"`boolean`","description":"flag to indicate, if we should add or remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustFreeShipping_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to adjust free shipping for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldAdd","type":"`boolean`","description":"flag to indicate, if we should add or remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustFreeShipping_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="adjustFreeShipping_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="adjustFreeShipping_"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CartUpdateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CartUpdateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### onSalesChannelChange
@@ -246,11 +246,11 @@ Remove the cart line item that does not belongs to the newly assigned sales chan
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"The cart being updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newSalesChannelId","type":"`string`","description":"The new sales channel being assigned to the cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="onSalesChannelChange"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"The cart being updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newSalesChannelId","type":"`string`","description":"The new sales channel being assigned to the cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="onSalesChannelChange"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="onSalesChannelChange"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="onSalesChannelChange"/>
### updateCustomerId\_
@@ -258,11 +258,11 @@ Sets the customer id of a cart
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to add email to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the customer to add to cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateCustomerId_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to add email to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the customer to add to cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateCustomerId_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateCustomerId_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateCustomerId_"/>
### createOrFetchGuestCustomerFromEmail\_
@@ -270,11 +270,11 @@ Creates or fetches a user based on an email.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"the email to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createOrFetchGuestCustomerFromEmail_"/>
<TypeList types={[{"name":"email","type":"`string`","description":"the email to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createOrFetchGuestCustomerFromEmail_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the resultign customer object","expandable":false,"children":[]}]} sectionTitle="createOrFetchGuestCustomerFromEmail_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the resultign customer object","expandable":false,"children":[]}]} sectionTitle="createOrFetchGuestCustomerFromEmail_"/>
### updateBillingAddress\_
@@ -282,11 +282,11 @@ Updates the cart's billing address.
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`string` \\| [AddressPayload](../../medusa/classes/medusa.AddressPayload.mdx) \\| Partial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addrRepo","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the repository to use for address updates","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`string` \\| [AddressPayload](../../medusa/classes/medusa.AddressPayload.mdx) \\| Partial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addrRepo","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the repository to use for address updates","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
### updateShippingAddress\_
@@ -294,21 +294,21 @@ Updates the cart's shipping address.
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`string` \\| [AddressPayload](../../medusa/classes/medusa.AddressPayload.mdx) \\| Partial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the shipping address to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addrRepo","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the repository to use for address updates","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`string` \\| [AddressPayload](../../medusa/classes/medusa.AddressPayload.mdx) \\| Partial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the shipping address to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addrRepo","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the repository to use for address updates","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress_"/>
### applyGiftCard\_
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyGiftCard_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyGiftCard_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="applyGiftCard_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="applyGiftCard_"/>
### applyDiscount
@@ -319,11 +319,11 @@ Throws if discount regions does not include the cart region
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCode","type":"`string`","description":"the discount code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyDiscount"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCode","type":"`string`","description":"the discount code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyDiscount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Updates the cart's discounts.\nIf discount besides free shipping is already applied, this\nwill be overwritten\nThrows if discount regions does not include the cart region","expandable":false,"children":[]}]} sectionTitle="applyDiscount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Updates the cart's discounts.\nIf discount besides free shipping is already applied, this\nwill be overwritten\nThrows if discount regions does not include the cart region","expandable":false,"children":[]}]} sectionTitle="applyDiscount"/>
### applyDiscounts
@@ -334,11 +334,11 @@ Throws if discount regions does not include the cart region
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCodes","type":"`string`[]","description":"the discount code(s) to apply","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyDiscounts"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCodes","type":"`string`[]","description":"the discount code(s) to apply","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="applyDiscounts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Updates the cart's discounts.\nIf discount besides free shipping is already applied, this\nwill be overwritten\nThrows if discount regions does not include the cart region","expandable":false,"children":[]}]} sectionTitle="applyDiscounts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Updates the cart's discounts.\nIf discount besides free shipping is already applied, this\nwill be overwritten\nThrows if discount regions does not include the cart region","expandable":false,"children":[]}]} sectionTitle="applyDiscounts"/>
### removeDiscount
@@ -346,11 +346,11 @@ Removes a discount based on a discount code.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCode","type":"`string`","description":"the discount code to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeDiscount"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountCode","type":"`string`","description":"the discount code to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeDiscount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="removeDiscount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="removeDiscount"/>
### updatePaymentSession
@@ -358,11 +358,11 @@ Updates the currently selected payment session.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to update the payment session for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`Record<string, unknown>`","description":"the data to update the payment session with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentSession"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to update the payment session for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`Record<string, unknown>`","description":"the data to update the payment session with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="updatePaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="updatePaymentSession"/>
### authorizePayment
@@ -374,11 +374,11 @@ set the payment on the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrId","type":"`string` \\| [WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;","description":"the id of the cart to authorize payment for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"object containing whatever is relevant for\n authorizing the payment with the payment provider. As an example,\n this could be IP address or similar for fraud handling.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"cartOrId","type":"`string` \\| [WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;","description":"the id of the cart to authorize payment for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"object containing whatever is relevant for\n authorizing the payment with the payment provider. As an example,\n this could be IP address or similar for fraud handling.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting cart","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
### setPaymentSession
@@ -386,11 +386,11 @@ Selects a payment session for a cart and creates a payment object in the externa
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to add payment method to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider to be set to the cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to add payment method to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider to be set to the cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Selects a payment session for a cart and creates a payment object in the external provider system","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Selects a payment session for a cart and creates a payment object in the external provider system","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
### setPaymentSessions
@@ -402,11 +402,11 @@ that are not available for the cart's region.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrCartId","type":"`string` \\| [WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;","description":"the id of the cart to set payment session for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSessions"/>
<TypeList types={[{"name":"cartOrCartId","type":"`string` \\| [WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;","description":"the id of the cart to set payment session for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSessions"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="setPaymentSessions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="setPaymentSessions"/>
### deletePaymentSession
@@ -414,11 +414,11 @@ Removes a payment session from the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider whose payment session\n should be removed.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePaymentSession"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider whose payment session\n should be removed.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the resulting cart.","expandable":false,"children":[]}]} sectionTitle="deletePaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the resulting cart.","expandable":false,"children":[]}]} sectionTitle="deletePaymentSession"/>
### refreshPaymentSession
@@ -426,11 +426,11 @@ Refreshes a payment session on a cart
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider whose payment session\n should be removed.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the id of the provider whose payment session\n should be removed.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the resulting cart.","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the resulting cart.","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
### addShippingMethod
@@ -442,11 +442,11 @@ shop.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the id of the cart to add shipping method to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"id of shipping option to add as valid method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the fulmillment data for the method","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
<TypeList types={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the id of the cart to add shipping method to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"id of shipping option to add as valid method","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the fulmillment data for the method","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
### findCustomShippingOption
@@ -455,21 +455,21 @@ throws if custom options is not empty and no shipping option corresponds to opti
#### Parameters
<ParameterTypes parameters={[{"name":"cartCustomShippingOptions","type":"[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)[]","description":"the cart's custom shipping options","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"id of the normal or custom shipping option to find in the cartCustomShippingOptions","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="findCustomShippingOption"/>
<TypeList types={[{"name":"cartCustomShippingOptions","type":"[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)[]","description":"the cart's custom shipping options","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"id of the normal or custom shipping option to find in the cartCustomShippingOptions","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="findCustomShippingOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"undefined \\| CustomShippingOption","type":"`undefined` \\| [CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)","optional":false,"defaultValue":"","description":"custom shipping option","expandable":false,"children":[]}]} sectionTitle="findCustomShippingOption"/>
<TypeList types={[{"name":"undefined \\| CustomShippingOption","type":"`undefined` \\| [CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)","optional":false,"defaultValue":"","description":"custom shipping option","expandable":false,"children":[]}]} sectionTitle="findCustomShippingOption"/>
### updateUnitPrices\_
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateUnitPrices_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateUnitPrices_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateUnitPrices_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateUnitPrices_"/>
### setRegion\_
@@ -477,11 +477,11 @@ Set's the region of a cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to set region on","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the id of the region to set the region to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countryCode","type":"`null` \\| `string`","description":"the country code to set the country to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setRegion_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to set region on","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the id of the region to set the region to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countryCode","type":"`null` \\| `string`","description":"the country code to set the country to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setRegion_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setRegion_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setRegion_"/>
### delete
@@ -489,11 +489,11 @@ Deletes a cart from the database. Completed carts cannot be deleted.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the id of the cart to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the id of the cart to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the deleted cart or undefined if the cart was not found.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"the deleted cart or undefined if the cart was not found.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### setMetadata
@@ -503,71 +503,71 @@ others metadata fields, setMetadata is provided.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the cart to apply metadata to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"key","type":"`string`","description":"key for metadata field","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `number`","description":"value for metadata field.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setMetadata"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the cart to apply metadata to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"key","type":"`string`","description":"key for metadata field","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `number`","description":"value for metadata field.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setMetadata"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated result.","expandable":false,"children":[]}]} sectionTitle="setMetadata"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated result.","expandable":false,"children":[]}]} sectionTitle="setMetadata"/>
### createTaxLines
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
<TypeList types={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
### deleteTaxLines
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteTaxLines"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteTaxLines"/>
### decorateTotals
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsConfig","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx), \"total\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
### refreshAdjustments\_
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments_"/>
### transformQueryForTotals\_
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals_"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals_"/>
#### Returns
<ParameterTypes parameters={[{"name":"FindConfig","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"[TotalField](../../medusa/types/medusa.TotalField.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals_"/>
<TypeList types={[{"name":"FindConfig","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"[TotalField](../../medusa/types/medusa.TotalField.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals_"/>
### decorateTotals\_
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"[TotalField](../../medusa/types/medusa.TotalField.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals_"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"[TotalField](../../medusa/types/medusa.TotalField.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`TotalsConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals_"/>
#### Deprecated
@@ -577,8 +577,8 @@ Use decorateTotals instead
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
#### Returns
<ParameterTypes parameters={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ClaimItemService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimItemRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimTagRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimImageRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.lineItemService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ClaimItemService"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimItemRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimTagRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimImageRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.lineItemService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ClaimItemService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.canceled\"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItemRepository_","type":"Repository&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimTagRepository_","type":"Repository&#60;[ClaimTag](../../entities/classes/entities.ClaimTag.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimImageRepository_","type":"Repository&#60;[ClaimImage](../../entities/classes/entities.ClaimImage.mdx)&#62;","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="ClaimItemService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.canceled\"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItemRepository_","type":"Repository&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimTagRepository_","type":"Repository&#60;[ClaimTag](../../entities/classes/entities.ClaimTag.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimImageRepository_","type":"Repository&#60;[ClaimImage](../../entities/classes/entities.ClaimImage.mdx)&#62;","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="ClaimItemService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,45 +60,45 @@ 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_"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateClaimItemInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateClaimItemInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieve
@@ -106,8 +106,8 @@ Gets a claim item by id.
#### Parameters
<ParameterTypes parameters={[{"name":"claimItemId","type":"`string`","description":"id of ClaimItem to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"configuration for the find operation","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"claimItemId","type":"`string`","description":"id of ClaimItem to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"configuration for the find operation","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the ClaimItem","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the ClaimItem","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ClaimService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ClaimService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ClaimService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.canceled\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.fulfillment_created\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.shipment_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.refund_processed\"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimRepository_","type":"Repository&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingMethodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItemService_","type":"[ClaimItemService](services.ClaimItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnService_","type":"[ReturnService](services.ReturnService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="ClaimService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.canceled\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.fulfillment_created\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.shipment_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim.refund_processed\"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimRepository_","type":"Repository&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingMethodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItemService_","type":"[ClaimItemService](services.ClaimItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnService_","type":"[ReturnService](services.ReturnService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="ClaimService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,35 +60,35 @@ 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_"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateClaimInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateClaimInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### validateCreateClaimInput
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateClaimInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCreateClaimInput"/>
<TypeList types={[{"name":"data","type":"`CreateClaimInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCreateClaimInput"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateCreateClaimInput"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateCreateClaimInput"/>
### getRefundTotalForClaimLinesOnOrder
@@ -101,11 +101,11 @@ Note, it will attempt to return early from each of these places to avoid having
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to find claim lines on","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItems","type":"`CreateClaimItemInput`[]","description":"the claim items to match against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundTotalForClaimLinesOnOrder"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to find claim lines on","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItems","type":"`CreateClaimItemInput`[]","description":"the claim items to match against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundTotalForClaimLinesOnOrder"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the refund amount","expandable":false,"children":[]}]} sectionTitle="getRefundTotalForClaimLinesOnOrder"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the refund amount","expandable":false,"children":[]}]} sectionTitle="getRefundTotalForClaimLinesOnOrder"/>
### create
@@ -115,71 +115,71 @@ shipping address that the new items will be shipped to
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateClaimInput`","description":"the object containing all data required to create a claim","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateClaimInput`","description":"the object containing all data required to create a claim","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"created claim","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"created claim","expandable":false,"children":[]}]} sectionTitle="create"/>
### createFulfillment
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the object containing all data required to create a claim","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"config metadata","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"config no notification","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the object containing all data required to create a claim","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"config metadata","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"config no notification","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"created claim","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"created claim","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
### cancelFulfillment
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillmentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
### processRefund
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processRefund"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processRefund"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="processRefund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="processRefund"/>
### createShipment
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config.no_notification","type":"`undefined`","description":"","optional":false,"defaultValue":"undefined","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config.no_notification","type":"`undefined`","description":"","optional":false,"defaultValue":"undefined","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
### cancel
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`any`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`any`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieve
@@ -187,8 +187,8 @@ Gets an order by id.
#### Parameters
<ParameterTypes parameters={[{"name":"claimId","type":"`string`","description":"id of the claim order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"claimId","type":"`string`","description":"id of the claim order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# CurrencyService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CurrencyService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CurrencyService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"currency.updated\"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.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="CurrencyService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"currency.updated\"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.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="CurrencyService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieveByCode
@@ -76,11 +76,11 @@ Return the currency
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"The code of the currency that must be retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"code","type":"`string`","description":"The code of the currency that must be retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"The currency","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"The currency","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
### listAndCount
@@ -89,11 +89,11 @@ currencies that match the query.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62; & `object`","description":"an object that defines rules to filter currencies\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62; & `object`","description":"an object that defines rules to filter currencies\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Currency](../../entities/classes/entities.Currency.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the currencies as\n the first element and the total count of products that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Currency](../../entities/classes/entities.Currency.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the currencies as\n the first element and the total count of products that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### update
@@ -101,8 +101,8 @@ Update a currency
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"The code of the currency to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateCurrencyInput`","description":"The data that must be updated on the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"code","type":"`string`","description":"The code of the currency to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateCurrencyInput`","description":"The data that must be updated on the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated currency","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated currency","expandable":false,"children":[]}]} sectionTitle="update"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# CustomShippingOptionService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomShippingOptionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomShippingOptionService"/>
___
## 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":"customShippingOptionRepository_","type":"Repository&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","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="CustomShippingOptionService"/>
<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":"customShippingOptionRepository_","type":"Repository&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","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="CustomShippingOptionService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -76,11 +76,11 @@ Retrieves a specific shipping option.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the custom shipping option to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"any options needed to query for the result.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the custom shipping option to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"any options needed to query for the result.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the requested custom shipping option.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the requested custom shipping option.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
@@ -88,11 +88,11 @@ Fetches all custom shipping options based on the given selector
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"custom shipping options matching the query","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomShippingOption](../../entities/classes/entities.CustomShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"custom shipping options matching the query","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
@@ -100,12 +100,12 @@ Creates a custom shipping option
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"T","description":"the custom shipping option to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"T","description":"the custom shipping option to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result","expandable":false,"children":[]}]} sectionTitle="create"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# CustomerGroupService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`CustomerGroupConstructorProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomerGroupService"/>
<TypeList types={[{"name":"__namedParameters","type":"`CustomerGroupConstructorProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomerGroupService"/>
___
## 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":"customerGroupRepository_","type":"Repository&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.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="CustomerGroupService"/>
<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":"customerGroupRepository_","type":"Repository&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.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="CustomerGroupService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,25 +60,25 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"customerGroupId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"customerGroupId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
@@ -86,11 +86,11 @@ Creates a customer group with the provided data.
#### Parameters
<ParameterTypes parameters={[{"name":"group","type":"DeepPartial&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the customer group to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"group","type":"DeepPartial&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the customer group to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### addCustomers
@@ -98,11 +98,11 @@ Add a batch of customers to a customer group at once
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the customer group to add customers to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerIds","type":"`string` \\| `string`[]","description":"customer id's to add to the group","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCustomers"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the customer group to add customers to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerIds","type":"`string` \\| `string`[]","description":"customer id's to add to the group","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCustomers"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer group after insertion","expandable":false,"children":[]}]} sectionTitle="addCustomers"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer group after insertion","expandable":false,"children":[]}]} sectionTitle="addCustomers"/>
### update
@@ -110,11 +110,11 @@ Update a customer group.
#### Parameters
<ParameterTypes parameters={[{"name":"customerGroupId","type":"`string`","description":"id of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`CustomerGroupUpdate`","description":"customer group partial data","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"customerGroupId","type":"`string`","description":"id of the customer group","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`CustomerGroupUpdate`","description":"customer group partial data","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"resulting customer group","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"resulting customer group","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -122,11 +122,11 @@ Remove customer group
#### Parameters
<ParameterTypes parameters={[{"name":"groupId","type":"`string`","description":"id of the customer group to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"groupId","type":"`string`","description":"id of the customer group to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"a promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"a promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### list
@@ -134,11 +134,11 @@ List customer groups.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -146,11 +146,11 @@ Retrieve a list of customer groups and total count of records that match the que
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### removeCustomer
@@ -158,18 +158,18 @@ Remove list of customers from a customergroup
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the customer group from which the customers are removed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerIds","type":"`string` \\| `string`[]","description":"id's of the customer to remove from group","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCustomer"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the customer group from which the customers are removed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerIds","type":"`string` \\| `string`[]","description":"id's of the customer to remove from group","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCustomer"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the customergroup with the provided id","expandable":false,"children":[]}]} sectionTitle="removeCustomer"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[CustomerGroup](../../entities/classes/entities.CustomerGroup.mdx)&#62;","optional":false,"defaultValue":"","description":"the customergroup with the provided id","expandable":false,"children":[]}]} sectionTitle="removeCustomer"/>
### handleCreationFail
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="handleCreationFail"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="handleCreationFail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;never&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="handleCreationFail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;never&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="handleCreationFail"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# CustomerService
@@ -12,13 +12,13 @@ Provides layer to manipulate customers.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomerService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new CustomerService"/>
___
## 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":"customerRepository_","type":"Repository&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.PASSWORD_RESET","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.password_reset\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.updated\"","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="CustomerService"/>
<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":"customerRepository_","type":"Repository&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressRepository_","type":"Repository&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.PASSWORD_RESET","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.password_reset\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"customer.updated\"","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="CustomerService"/>
___
@@ -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,15 +62,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_"/>
### generateResetPasswordToken
@@ -82,31 +82,31 @@ which is always 15 minutes.
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"the customer to reset the password for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"the customer to reset the password for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"the generated JSON web token","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"the generated JSON web token","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Customer](../../entities/classes/entities.Customer.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Customer](../../entities/classes/entities.Customer.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### count
@@ -114,17 +114,17 @@ Return the total number of documents in database
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the result of the count operation","expandable":false,"children":[]}]} sectionTitle="count"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the result of the count operation","expandable":false,"children":[]}]} sectionTitle="count"/>
### retrieve\_
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
### retrieveByEmail
@@ -132,11 +132,11 @@ Gets a registered customer by email.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"the email of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
<TypeList types={[{"name":"email","type":"`string`","description":"the email of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
#### Deprecated
@@ -144,31 +144,31 @@ Gets a registered customer by email.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveUnregisteredByEmail"/>
<TypeList types={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveUnregisteredByEmail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveUnregisteredByEmail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveUnregisteredByEmail"/>
### retrieveRegisteredByEmail
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveRegisteredByEmail"/>
<TypeList types={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveRegisteredByEmail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveRegisteredByEmail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveRegisteredByEmail"/>
### listByEmail
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByEmail"/>
<TypeList types={[{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByEmail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByEmail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByEmail"/>
### retrieveByPhone
@@ -176,11 +176,11 @@ Gets a customer by phone.
#### Parameters
<ParameterTypes parameters={[{"name":"phone","type":"`string`","description":"the phone of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByPhone"/>
<TypeList types={[{"name":"phone","type":"`string`","description":"the phone of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByPhone"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieveByPhone"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieveByPhone"/>
### retrieve
@@ -188,11 +188,11 @@ Gets a customer by id.
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"the id of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"the id of the customer to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the customer document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### hashPassword\_
@@ -200,11 +200,11 @@ Hashes a password
#### Parameters
<ParameterTypes parameters={[{"name":"password","type":"`string`","description":"the value to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
<TypeList types={[{"name":"password","type":"`string`","description":"the value to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"hashed password","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"hashed password","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
### create
@@ -215,11 +215,11 @@ used to hold details of customers.
#### Parameters
<ParameterTypes parameters={[{"name":"customer","type":"`CreateCustomerInput`","description":"the customer to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"customer","type":"`CreateCustomerInput`","description":"the customer to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -227,11 +227,11 @@ Updates a customer.
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"the id of the variant. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateCustomerInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"the id of the variant. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateCustomerInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### updateBillingAddress\_
@@ -239,41 +239,41 @@ Updates the customers' billing address.
#### Parameters
<ParameterTypes parameters={[{"name":"customer","type":"[Customer](../../entities/classes/entities.Customer.mdx)","description":"the Customer to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`undefined` \\| `string` \\| DeepPartial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
<TypeList types={[{"name":"customer","type":"[Customer](../../entities/classes/entities.Customer.mdx)","description":"the Customer to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressOrId","type":"`undefined` \\| `string` \\| DeepPartial&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress_"/>
### updateAddress
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StorePostCustomersCustomerAddressesAddressReq](../../medusa/classes/medusa.StorePostCustomersCustomerAddressesAddressReq.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateAddress"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[StorePostCustomersCustomerAddressesAddressReq](../../medusa/classes/medusa.StorePostCustomersCustomerAddressesAddressReq.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateAddress"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateAddress"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Address](../../entities/classes/entities.Address.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateAddress"/>
### removeAddress
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeAddress"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeAddress"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeAddress"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeAddress"/>
### addAddress
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AddressCreatePayload](../../medusa/classes/medusa.AddressCreatePayload.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addAddress"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AddressCreatePayload](../../medusa/classes/medusa.AddressCreatePayload.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addAddress"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx) \\| [Address](../../entities/classes/entities.Address.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addAddress"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Customer](../../entities/classes/entities.Customer.mdx) \\| [Address](../../entities/classes/entities.Address.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addAddress"/>
### delete
@@ -281,8 +281,8 @@ Deletes a customer from a given customer id.
#### Parameters
<ParameterTypes parameters={[{"name":"customerId","type":"`string`","description":"the id of the customer to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"customerId","type":"`string`","description":"the id of the customer to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [Customer](../../entities/classes/entities.Customer.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# DiscountConditionService
@@ -14,13 +14,13 @@ Provides layer to manipulate discount conditions.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DiscountConditionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DiscountConditionService"/>
___
## 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":"discountConditionRepository_","type":"Repository&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="DiscountConditionService"/>
<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":"discountConditionRepository_","type":"Repository&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="DiscountConditionService"/>
___
@@ -30,7 +30,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_"/>
___
@@ -40,21 +40,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\_
@@ -64,62 +64,62 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"conditionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"conditionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### resolveConditionType\_
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`DiscountConditionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveConditionType_"/>
<TypeList types={[{"name":"data","type":"`DiscountConditionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveConditionType_"/>
#### Returns
<ParameterTypes parameters={[{"name":"undefined \\| object","type":"`undefined` \\| `object`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="resolveConditionType_"/>
<TypeList types={[{"name":"undefined \\| object","type":"`undefined` \\| `object`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="resolveConditionType_"/>
### upsertCondition
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`DiscountConditionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"overrideExisting","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="upsertCondition"/>
<TypeList types={[{"name":"data","type":"`DiscountConditionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"overrideExisting","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="upsertCondition"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([DiscountConditionProduct](../../entities/classes/entities.DiscountConditionProduct.mdx) \\| [DiscountConditionProductType](../../entities/classes/entities.DiscountConditionProductType.mdx) \\| [DiscountConditionProductCollection](../../entities/classes/entities.DiscountConditionProductCollection.mdx) \\| [DiscountConditionProductTag](../../entities/classes/entities.DiscountConditionProductTag.mdx) \\| [DiscountConditionCustomerGroup](../../entities/classes/entities.DiscountConditionCustomerGroup.mdx))[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCondition"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([DiscountConditionProduct](../../entities/classes/entities.DiscountConditionProduct.mdx) \\| [DiscountConditionProductType](../../entities/classes/entities.DiscountConditionProductType.mdx) \\| [DiscountConditionProductCollection](../../entities/classes/entities.DiscountConditionProductCollection.mdx) \\| [DiscountConditionProductTag](../../entities/classes/entities.DiscountConditionProductTag.mdx) \\| [DiscountConditionCustomerGroup](../../entities/classes/entities.DiscountConditionCustomerGroup.mdx))[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCondition"/>
### removeResources
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"Omit&#60;DiscountConditionInput, \"id\"&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeResources"/>
<TypeList types={[{"name":"data","type":"Omit&#60;DiscountConditionInput, \"id\"&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeResources"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeResources"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeResources"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"discountConditionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"discountConditionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# DiscountService
@@ -14,13 +14,13 @@ Provides layer to manipulate discounts.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountRuleRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.giftCardRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountConditionRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountConditionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.totalsService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.newTotalsService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.regionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.customerService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.featureFlagRouter","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DiscountService"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountRuleRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.giftCardRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountConditionRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discountConditionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.totalsService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.newTotalsService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.regionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.customerService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.featureFlagRouter","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DiscountService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"discount.created\"","expandable":false,"children":[]},{"name":"discountRepository_","type":"Repository&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountRuleRepository_","type":"Repository&#60;[DiscountRule](../../entities/classes/entities.DiscountRule.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardRepository_","type":"Repository&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountConditionRepository_","type":"Repository&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountConditionService_","type":"[DiscountConditionService](services.DiscountConditionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="DiscountService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"discount.created\"","expandable":false,"children":[]},{"name":"discountRepository_","type":"Repository&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountRuleRepository_","type":"Repository&#60;[DiscountRule](../../entities/classes/entities.DiscountRule.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardRepository_","type":"Repository&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountConditionRepository_","type":"Repository&#60;[DiscountCondition](../../entities/classes/entities.DiscountCondition.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountConditionService_","type":"[DiscountConditionService](services.DiscountConditionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="DiscountService"/>
___
@@ -30,7 +30,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_"/>
___
@@ -40,21 +40,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\_
@@ -64,15 +64,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_"/>
### validateDiscountRule\_
@@ -80,35 +80,35 @@ Creates a discount rule with provided data given that the data is validated.
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
#### Parameters
<ParameterTypes parameters={[{"name":"discountRule","type":"T","description":"the discount rule to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
<TypeList types={[{"name":"discountRule","type":"T","description":"the discount rule to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
#### Returns
<ParameterTypes parameters={[{"name":"T","type":"T","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
<TypeList types={[{"name":"T","type":"T","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="validateDiscountRule_"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableDiscountProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`FilterableDiscountProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableDiscountProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"`FilterableDiscountProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Discount](../../entities/classes/entities.Discount.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Discount](../../entities/classes/entities.Discount.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### create
@@ -117,11 +117,11 @@ Normalizes discount code to uppercase.
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"`CreateDiscountInput`","description":"the discount data to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"discount","type":"`CreateDiscountInput`","description":"the discount data to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### retrieve
@@ -129,11 +129,11 @@ Gets a discount by id.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"id of discount to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"id of discount to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the discount","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the discount","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByCode
@@ -141,11 +141,11 @@ Gets the discount by discount code.
#### Parameters
<ParameterTypes parameters={[{"name":"discountCode","type":"`string`","description":"discount code of discount to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"discountCode","type":"`string`","description":"discount code of discount to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the discount","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the discount","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
### listByCodes
@@ -153,11 +153,11 @@ List all the discounts corresponding to the given codes
#### Parameters
<ParameterTypes parameters={[{"name":"discountCodes","type":"`string`[]","description":"discount codes of discounts to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listByCodes"/>
<TypeList types={[{"name":"discountCodes","type":"`string`[]","description":"discount codes of discounts to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","description":"the config object containing query settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listByCodes"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the discounts","expandable":false,"children":[]}]} sectionTitle="listByCodes"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the discounts","expandable":false,"children":[]}]} sectionTitle="listByCodes"/>
### update
@@ -165,11 +165,11 @@ Updates a discount.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"discount id of discount to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateDiscountInput`","description":"the data to update the discount with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"discount id of discount to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateDiscountInput`","description":"the data to update the discount with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
### createDynamicCode
@@ -177,11 +177,11 @@ Creates a dynamic code for a discount id.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"the id of the discount to create a code for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreateDynamicDiscountInput`","description":"the object containing a code to identify the discount by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createDynamicCode"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"the id of the discount to create a code for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`CreateDynamicDiscountInput`","description":"the object containing a code to identify the discount by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createDynamicCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created dynamic code","expandable":false,"children":[]}]} sectionTitle="createDynamicCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created dynamic code","expandable":false,"children":[]}]} sectionTitle="createDynamicCode"/>
### deleteDynamicCode
@@ -189,11 +189,11 @@ Deletes a dynamic code for a discount id.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"the id of the discount to create a code for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"the code to identify the discount by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteDynamicCode"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"the id of the discount to create a code for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"the code to identify the discount by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteDynamicCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the newly created dynamic code","expandable":false,"children":[]}]} sectionTitle="deleteDynamicCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the newly created dynamic code","expandable":false,"children":[]}]} sectionTitle="deleteDynamicCode"/>
### addRegion
@@ -201,11 +201,11 @@ Adds a region to the discount regions array.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"id of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"id of region to add","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRegion"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"id of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"id of region to add","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRegion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addRegion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="addRegion"/>
### removeRegion
@@ -213,11 +213,11 @@ Removes a region from the discount regions array.
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"id of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"id of region to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeRegion"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"id of discount","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"id of region to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeRegion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="removeRegion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Discount](../../entities/classes/entities.Discount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="removeRegion"/>
### delete
@@ -225,108 +225,108 @@ Deletes a discount idempotently
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"id of discount to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"id of discount to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
### validateDiscountForProduct
#### Parameters
<ParameterTypes parameters={[{"name":"discountRuleId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForProduct"/>
<TypeList types={[{"name":"discountRuleId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForProduct"/>
### calculateDiscountForLineItem
#### Parameters
<ParameterTypes parameters={[{"name":"discountId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContextData","type":"`CalculationContextData`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscountForLineItem"/>
<TypeList types={[{"name":"discountId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContextData","type":"`CalculationContextData`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscountForLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscountForLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscountForLineItem"/>
### validateDiscountForCartOrThrow
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx) \\| [Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForCartOrThrow"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx) \\| [Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForCartOrThrow"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForCartOrThrow"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateDiscountForCartOrThrow"/>
### hasCustomersGroupCondition
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasCustomersGroupCondition"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasCustomersGroupCondition"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasCustomersGroupCondition"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasCustomersGroupCondition"/>
### hasReachedLimit
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasReachedLimit"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasReachedLimit"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasReachedLimit"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasReachedLimit"/>
### hasNotStarted
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasNotStarted"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasNotStarted"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasNotStarted"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasNotStarted"/>
### hasExpired
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasExpired"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hasExpired"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasExpired"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="hasExpired"/>
### isDisabled
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isDisabled"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isDisabled"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isDisabled"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isDisabled"/>
### isValidForRegion
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isValidForRegion"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isValidForRegion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isValidForRegion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isValidForRegion"/>
### canApplyForCustomer
#### Parameters
<ParameterTypes parameters={[{"name":"discountRuleId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`undefined` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="canApplyForCustomer"/>
<TypeList types={[{"name":"discountRuleId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`undefined` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="canApplyForCustomer"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="canApplyForCustomer"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="canApplyForCustomer"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# DraftOrderService
@@ -14,13 +14,13 @@ Handles draft orders
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DraftOrderService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new DraftOrderService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"draft_order.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"draft_order.updated\"","expandable":false,"children":[]},{"name":"draftOrderRepository_","type":"Repository&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderRepository_","type":"Repository&#60;[Order](../../entities/classes/entities.Order.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartService_","type":"[CartService](services.CartService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.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="DraftOrderService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"draft_order.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"draft_order.updated\"","expandable":false,"children":[]},{"name":"draftOrderRepository_","type":"Repository&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderRepository_","type":"Repository&#60;[Order](../../entities/classes/entities.Order.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartService_","type":"[CartService](services.CartService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.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="DraftOrderService"/>
___
@@ -30,7 +30,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_"/>
___
@@ -40,21 +40,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\_
@@ -64,15 +64,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_"/>
### retrieve
@@ -80,11 +80,11 @@ Retrieves a draft order with the given id.
#### Parameters
<ParameterTypes parameters={[{"name":"draftOrderId","type":"`string`","description":"id of the draft order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query object for findOne","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"draftOrderId","type":"`string`","description":"id of the draft order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query object for findOne","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the draft order","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the draft order","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByCartId
@@ -92,11 +92,11 @@ Retrieves a draft order based on its associated cart id
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"cart id that the draft orders's cart has","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query object for findOne","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"cart id that the draft orders's cart has","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query object for findOne","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the draft order","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the draft order","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
### delete
@@ -104,11 +104,11 @@ Deletes draft order idempotently.
#### Parameters
<ParameterTypes parameters={[{"name":"draftOrderId","type":"`string`","description":"id of draft order to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"draftOrderId","type":"`string`","description":"id of draft order to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### listAndCount
@@ -116,11 +116,11 @@ Lists draft orders alongside the count
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`any`","description":"query selector to filter draft orders","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query config","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"`any`","description":"query selector to filter draft orders","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"query config","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"draft orders","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"draft orders","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### list
@@ -128,11 +128,11 @@ Lists draft orders
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`any`","description":"query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"configurable attributes for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`any`","description":"query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","description":"configurable attributes for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)[]&#62;","optional":false,"defaultValue":"","description":"list of draft orders","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)[]&#62;","optional":false,"defaultValue":"","description":"list of draft orders","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
@@ -140,11 +140,11 @@ Creates a draft order.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`DraftOrderCreateProps`","description":"data to create draft order from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`DraftOrderCreateProps`","description":"data to create draft order from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the created draft order","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the created draft order","expandable":false,"children":[]}]} sectionTitle="create"/>
### registerCartCompletion
@@ -152,11 +152,11 @@ Registers a draft order as completed, when an order has been completed.
#### Parameters
<ParameterTypes parameters={[{"name":"draftOrderId","type":"`string`","description":"id of draft order to complete","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderId","type":"`string`","description":"id of order completed from draft order cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
<TypeList types={[{"name":"draftOrderId","type":"`string`","description":"id of draft order to complete","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderId","type":"`string`","description":"id of order completed from draft order cart","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;UpdateResult&#62;","optional":false,"defaultValue":"","description":"the created order","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;UpdateResult&#62;","optional":false,"defaultValue":"","description":"the created order","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
### update
@@ -164,8 +164,8 @@ Updates a draft order with the given data
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the draft order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"values to update the order with","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.no_notification_order","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the draft order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"values to update the order with","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.no_notification_order","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated draft order","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated draft order","expandable":false,"children":[]}]} sectionTitle="update"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# EventBusService
@@ -13,13 +13,13 @@ subscribers when events happen. Events will run asynchronously.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isSingleton","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="new EventBusService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isSingleton","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]}]} sectionTitle="new EventBusService"/>
___
## 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":"config_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stagedJobService_","type":"[StagedJobService](services.StagedJobService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/interfaces/medusa.Logger-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldEnqueuerRun","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"enqueue_","type":"Promise&#60;void&#62;","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="EventBusService"/>
<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":"config_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stagedJobService_","type":"[StagedJobService](services.StagedJobService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/interfaces/medusa.Logger-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldEnqueuerRun","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"enqueue_","type":"Promise&#60;void&#62;","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="EventBusService"/>
___
@@ -29,13 +29,13 @@ ___
#### 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_"/>
### eventBusModuleService\_
#### Returns
<ParameterTypes parameters={[{"name":"IEventBusModuleService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="eventBusModuleService_"/>
<TypeList types={[{"name":"IEventBusModuleService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="eventBusModuleService_"/>
___
@@ -45,11 +45,11 @@ ___
#### 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\_
@@ -59,25 +59,25 @@ 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_"/>
### withTransaction
#### 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"/>
### subscribe
@@ -85,11 +85,11 @@ Adds a function to a list of event subscribers.
#### Parameters
<ParameterTypes parameters={[{"name":"event","type":"`string` \\| `symbol`","description":"the event that the subscriber will listen for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subscriber","type":"[Subscriber](../../types/EventBusTypes/types/types.EventBusTypes.Subscriber.mdx)&#60;unknown&#62;","description":"the function to be called when a certain event\nhappens. Subscribers must return a Promise.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SubscriberContext](../../types/EventBusTypes/types/types.EventBusTypes.SubscriberContext.mdx)","description":"subscriber context","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
<TypeList types={[{"name":"event","type":"`string` \\| `symbol`","description":"the event that the subscriber will listen for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subscriber","type":"[Subscriber](../../types/EventBusTypes/types/types.EventBusTypes.Subscriber.mdx)&#60;unknown&#62;","description":"the function to be called when a certain event\nhappens. Subscribers must return a Promise.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SubscriberContext](../../types/EventBusTypes/types/types.EventBusTypes.SubscriberContext.mdx)","description":"subscriber context","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
#### Returns
<ParameterTypes parameters={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"this","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
<TypeList types={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"this","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
### unsubscribe
@@ -97,11 +97,11 @@ Removes function from the list of event subscribers.
#### Parameters
<ParameterTypes parameters={[{"name":"event","type":"`string` \\| `symbol`","description":"the event of the subcriber.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subscriber","type":"[Subscriber](../../types/EventBusTypes/types/types.EventBusTypes.Subscriber.mdx)&#60;unknown&#62;","description":"the function to be removed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SubscriberContext](../../types/EventBusTypes/types/types.EventBusTypes.SubscriberContext.mdx)","description":"subscriber context","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="unsubscribe"/>
<TypeList types={[{"name":"event","type":"`string` \\| `symbol`","description":"the event of the subcriber.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subscriber","type":"[Subscriber](../../types/EventBusTypes/types/types.EventBusTypes.Subscriber.mdx)&#60;unknown&#62;","description":"the function to be removed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[SubscriberContext](../../types/EventBusTypes/types/types.EventBusTypes.SubscriberContext.mdx)","description":"subscriber context","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="unsubscribe"/>
#### Returns
<ParameterTypes parameters={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"this","expandable":false,"children":[]}]} sectionTitle="unsubscribe"/>
<TypeList types={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"this","expandable":false,"children":[]}]} sectionTitle="unsubscribe"/>
### emit
@@ -111,29 +111,29 @@ Calls all subscribers when an event occurs.
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"[EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;T&#62;[]","description":"The data to use to process the events","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"data","type":"[EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;T&#62;[]","description":"The data to use to process the events","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the jobs from our queue","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the jobs from our queue","expandable":false,"children":[]}]} sectionTitle="emit"/>
`**emit**<TypeParameter T>(data): Promise&#60;void \| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;`
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"[Message](../../types/EventBusTypes/types/types.EventBusTypes.Message.mdx)&#60;T&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"data","type":"[Message](../../types/EventBusTypes/types/types.EventBusTypes.Message.mdx)&#60;T&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
`**emit**<TypeParameter T>(eventName, data, options?): Promise&#60;void \| [StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;`
@@ -141,40 +141,40 @@ Calls all subscribers when an event occurs.
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Parameters
<ParameterTypes parameters={[{"name":"eventName","type":"`string`","description":"the name of the event to be process.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"T","description":"the data to send to the subscriber.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"options to add the job with","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"eventName","type":"`string`","description":"the name of the event to be process.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"T","description":"the data to send to the subscriber.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"options to add the job with","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="emit"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","optional":false,"defaultValue":"","description":"the job from our queue","expandable":false,"children":[]}]} sectionTitle="emit"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","optional":false,"defaultValue":"","description":"the job from our queue","expandable":false,"children":[]}]} sectionTitle="emit"/>
### startEnqueuer
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="startEnqueuer"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="startEnqueuer"/>
### stopEnqueuer
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="stopEnqueuer"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="stopEnqueuer"/>
### enqueuer\_
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="enqueuer_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="enqueuer_"/>
### listJobs
#### Parameters
<ParameterTypes parameters={[{"name":"listConfig","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listJobs"/>
<TypeList types={[{"name":"listConfig","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listJobs"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;never[] \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listJobs"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;never[] \\| [StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listJobs"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# FulfillmentProviderService
@@ -12,13 +12,13 @@ Helps retrieve fulfillment providers
### Parameters
<ParameterTypes parameters={[{"name":"container","type":"`FulfillmentProviderContainer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new FulfillmentProviderService"/>
<TypeList types={[{"name":"container","type":"`FulfillmentProviderContainer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new FulfillmentProviderService"/>
___
## 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":"`FulfillmentProviderContainer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderRepository_","type":"Repository&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)&#62;","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="FulfillmentProviderService"/>
<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":"`FulfillmentProviderContainer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderRepository_","type":"Repository&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)&#62;","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="FulfillmentProviderService"/>
___
@@ -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,121 +62,121 @@ 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_"/>
### 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"/>
### list
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### listFulfillmentOptions
#### Parameters
<ParameterTypes parameters={[{"name":"providerIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listFulfillmentOptions"/>
<TypeList types={[{"name":"providerIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listFulfillmentOptions"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;FulfillmentOptions[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listFulfillmentOptions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;FulfillmentOptions[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listFulfillmentOptions"/>
### retrieveProvider
#### Parameters
<ParameterTypes parameters={[{"name":"providerId","type":"`string`","description":"the provider id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"providerId","type":"`string`","description":"the provider id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"the payment fulfillment provider","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"any","type":"`any`","optional":false,"defaultValue":"","description":"the payment fulfillment provider","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
### createFulfillment
#### Parameters
<ParameterTypes parameters={[{"name":"method","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`CreateFulfillmentOrder`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"Omit&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx), \"beforeInsert\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"method","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`CreateFulfillmentOrder`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"Omit&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx), \"beforeInsert\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
### canCalculate
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"`CalculateOptionPriceInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
<TypeList types={[{"name":"option","type":"`CalculateOptionPriceInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="canCalculate"/>
### validateFulfillmentData
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`Record<string, unknown>` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentData"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`Record<string, unknown>` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentData"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentData"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentData"/>
### cancelFulfillment
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillment","type":"[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillment","type":"[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
### calculatePrice
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="calculatePrice"/>
### validateOption
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateOption"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateOption"/>
### createReturn
#### Parameters
<ParameterTypes parameters={[{"name":"returnOrder","type":"[CreateReturnType](../../medusa/types/medusa.CreateReturnType.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createReturn"/>
<TypeList types={[{"name":"returnOrder","type":"[CreateReturnType](../../medusa/types/medusa.CreateReturnType.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createReturn"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createReturn"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createReturn"/>
### retrieveDocuments
@@ -184,8 +184,8 @@ Fetches documents from the fulfillment provider
#### Parameters
<ParameterTypes parameters={[{"name":"providerId","type":"`string`","description":"the id of the provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentData","type":"`Record<string, unknown>`","description":"the data relating to the fulfillment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`\"label\"` \\| `\"invoice\"`","description":"the typ of","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
<TypeList types={[{"name":"providerId","type":"`string`","description":"the id of the provider","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentData","type":"`Record<string, unknown>`","description":"the data relating to the fulfillment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`\"label\"` \\| `\"invoice\"`","description":"the typ of","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"document to fetch","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"document to fetch","expandable":false,"children":[]}]} sectionTitle="retrieveDocuments"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# FulfillmentService
@@ -12,13 +12,13 @@ Handles Fulfillments
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new FulfillmentService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new FulfillmentService"/>
___
## 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":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentRepository_","type":"Repository&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinkRepository_","type":"Repository&#60;[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="FulfillmentService"/>
<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":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentRepository_","type":"Repository&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinkRepository_","type":"Repository&#60;[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="FulfillmentService"/>
___
@@ -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,25 +62,25 @@ 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_"/>
### partitionItems\_
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="partitionItems_"/>
<TypeList types={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="partitionItems_"/>
#### Returns
<ParameterTypes parameters={[{"name":"FulfillmentItemPartition[]","type":"`FulfillmentItemPartition`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="partitionItems_"/>
<TypeList types={[{"name":"FulfillmentItemPartition[]","type":"`FulfillmentItemPartition`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="partitionItems_"/>
### getFulfillmentItems\_
@@ -88,11 +88,11 @@ Retrieves the order line items, given an array of items.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"`CreateFulfillmentOrder`","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`FulFillmentItemType`[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems_"/>
<TypeList types={[{"name":"order","type":"`CreateFulfillmentOrder`","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`FulFillmentItemType`[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;(null \\| [LineItem](../../entities/classes/entities.LineItem.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;(null \\| [LineItem](../../entities/classes/entities.LineItem.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems_"/>
### validateFulfillmentLineItem\_
@@ -103,11 +103,11 @@ quantity from the quantity that was originally purchased.
#### Parameters
<ParameterTypes parameters={[{"name":"item","type":"`undefined` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient fulfillable\n quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"the quantity that is requested to be fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem_"/>
<TypeList types={[{"name":"item","type":"`undefined` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient fulfillable\n quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"the quantity that is requested to be fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem_"/>
#### Returns
<ParameterTypes parameters={[{"name":"null \\| LineItem","type":"`null` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","optional":false,"defaultValue":"","description":"a line item that has the requested fulfillment quantity\n set.","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem_"/>
<TypeList types={[{"name":"null \\| LineItem","type":"`null` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","optional":false,"defaultValue":"","description":"a line item that has the requested fulfillment quantity\n set.","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem_"/>
### retrieve
@@ -115,11 +115,11 @@ Retrieves a fulfillment by its id.
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentId","type":"`string`","description":"the id of the fulfillment to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"optional values to include with fulfillmentRepository query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"fulfillmentId","type":"`string`","description":"the id of the fulfillment to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"optional values to include with fulfillmentRepository query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the fulfillment","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the fulfillment","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### createFulfillment
@@ -130,11 +130,11 @@ those partitions.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"`CreateFulfillmentOrder`","description":"order to create fulfillment for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemsToFulfill","type":"`FulFillmentItemType`[]","description":"the items in the order to fulfill","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom","type":"Partial&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"potential custom values to add","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"order","type":"`CreateFulfillmentOrder`","description":"order to create fulfillment for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemsToFulfill","type":"`FulFillmentItemType`[]","description":"the items in the order to fulfill","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom","type":"Partial&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","description":"potential custom values to add","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the created fulfillments","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the created fulfillments","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
### cancelFulfillment
@@ -144,11 +144,11 @@ Throws if the fulfillment has already been shipped.
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentOrId","type":"`string` \\| [Fulfillment](../../entities/classes/entities.Fulfillment.mdx)","description":"the fulfillment object or id.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillmentOrId","type":"`string` \\| [Fulfillment](../../entities/classes/entities.Fulfillment.mdx)","description":"the fulfillment object or id.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the save operation","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the save operation","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
### createShipment
@@ -157,8 +157,8 @@ tracking links and potentially more metadata.
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentId","type":"`string`","description":"the fulfillment to ship","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"potential configuration settings, such as no\\_notification and metadata","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"tracking links for the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"fulfillmentId","type":"`string`","description":"the fulfillment to ship","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"potential configuration settings, such as no\\_notification and metadata","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"tracking links for the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipped fulfillment","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipped fulfillment","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# GiftCardService
@@ -12,13 +12,13 @@ Provides layer to manipulate gift cards.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new GiftCardService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new GiftCardService"/>
___
## 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":"giftCardRepository_","type":"Repository&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardTransactionRepo_","type":"Repository&#60;[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"gift_card.created\"","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="GiftCardService"/>
<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":"giftCardRepository_","type":"Repository&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"giftCardTransactionRepo_","type":"Repository&#60;[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"gift_card.created\"","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="GiftCardService"/>
___
@@ -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,15 +62,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_"/>
### generateCode
@@ -78,37 +78,37 @@ Generates a 16 character gift card code
#### Returns
<ParameterTypes parameters={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"the generated gift card code","expandable":false,"children":[]}]} sectionTitle="generateCode"/>
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"the generated gift card code","expandable":false,"children":[]}]} sectionTitle="generateCode"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[GiftCard](../../entities/classes/entities.GiftCard.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[GiftCard](../../entities/classes/entities.GiftCard.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### createTransaction
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateGiftCardTransactionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTransaction"/>
<TypeList types={[{"name":"data","type":"`CreateGiftCardTransactionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTransaction"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createTransaction"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createTransaction"/>
### create
@@ -116,11 +116,11 @@ Creates a gift card with provided data given that the data is validated.
#### Parameters
<ParameterTypes parameters={[{"name":"giftCard","type":"`CreateGiftCardInput`","description":"the gift card data to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"giftCard","type":"`CreateGiftCardInput`","description":"the gift card data to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### resolveTaxRate
@@ -129,21 +129,21 @@ provided by the user or the tax rate. Based on these conditions, tax\_rate chang
#### Parameters
<ParameterTypes parameters={[{"name":"giftCardTaxRate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveTaxRate"/>
<TypeList types={[{"name":"giftCardTaxRate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveTaxRate"/>
#### Returns
<ParameterTypes parameters={[{"name":"null \\| number","type":"`null` \\| `number`","optional":false,"defaultValue":"","description":"the tax rate for the gift card","expandable":false,"children":[]}]} sectionTitle="resolveTaxRate"/>
<TypeList types={[{"name":"null \\| number","type":"`null` \\| `number`","optional":false,"defaultValue":"","description":"the tax rate for the gift card","expandable":false,"children":[]}]} sectionTitle="resolveTaxRate"/>
### retrieve\_
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
### retrieve
@@ -151,21 +151,21 @@ Gets a gift card by id.
#### Parameters
<ParameterTypes parameters={[{"name":"giftCardId","type":"`string`","description":"id of gift card to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"optional values to include with gift card query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"giftCardId","type":"`string`","description":"id of gift card to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"optional values to include with gift card query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the gift card","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the gift card","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByCode
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCode"/>
### update
@@ -173,11 +173,11 @@ Updates a giftCard.
#### Parameters
<ParameterTypes parameters={[{"name":"giftCardId","type":"`string`","description":"giftCard id of giftCard to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateGiftCardInput`","description":"the data to update the giftCard with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"giftCardId","type":"`string`","description":"giftCard id of giftCard to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateGiftCardInput`","description":"the data to update the giftCard with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -185,8 +185,8 @@ Deletes a gift card idempotently
#### Parameters
<ParameterTypes parameters={[{"name":"giftCardId","type":"`string`","description":"id of gift card to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"giftCardId","type":"`string`","description":"id of gift card to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# IdempotencyKeyService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new IdempotencyKeyService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new IdempotencyKeyService"/>
___
## 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":"idempotencyKeyRepository_","type":"Repository&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","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="IdempotencyKeyService"/>
<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":"idempotencyKeyRepository_","type":"Repository&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","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="IdempotencyKeyService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### initializeRequest
@@ -76,11 +76,11 @@ Execute the initial steps in a idempotent request.
#### Parameters
<ParameterTypes parameters={[{"name":"headerKey","type":"`string`","description":"potential idempotency key from header","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqMethod","type":"`string`","description":"method of request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqParams","type":"`Record<string, unknown>`","description":"params of request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqPath","type":"`string`","description":"path of request","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="initializeRequest"/>
<TypeList types={[{"name":"headerKey","type":"`string`","description":"potential idempotency key from header","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqMethod","type":"`string`","description":"method of request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqParams","type":"`Record<string, unknown>`","description":"params of request","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reqPath","type":"`string`","description":"path of request","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="initializeRequest"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"the existing or created idempotency key","expandable":false,"children":[]}]} sectionTitle="initializeRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"the existing or created idempotency key","expandable":false,"children":[]}]} sectionTitle="initializeRequest"/>
### create
@@ -90,11 +90,11 @@ identifier.
#### Parameters
<ParameterTypes parameters={[{"name":"payload","type":"`CreateIdempotencyKeyInput`","description":"payload of request to create idempotency key for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"payload","type":"`CreateIdempotencyKeyInput`","description":"payload of request to create idempotency key for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"the created idempotency key","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"the created idempotency key","expandable":false,"children":[]}]} sectionTitle="create"/>
### retrieve
@@ -102,11 +102,11 @@ Retrieves an idempotency key
#### Parameters
<ParameterTypes parameters={[{"name":"idempotencyKeyOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","description":"key or selector to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"idempotencyKeyOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","description":"key or selector to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"idempotency key","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"idempotency key","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### lock
@@ -114,11 +114,11 @@ Locks an idempotency.
#### Parameters
<ParameterTypes parameters={[{"name":"idempotencyKey","type":"`string`","description":"key to lock","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="lock"/>
<TypeList types={[{"name":"idempotencyKey","type":"`string`","description":"key to lock","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="lock"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation","expandable":false,"children":[]}]} sectionTitle="lock"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation","expandable":false,"children":[]}]} sectionTitle="lock"/>
### update
@@ -126,11 +126,11 @@ Locks an idempotency.
#### Parameters
<ParameterTypes parameters={[{"name":"idempotencyKey","type":"`string`","description":"key to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"DeepPartial&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","description":"update object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"idempotencyKey","type":"`string`","description":"key to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"DeepPartial&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","description":"update object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
### workStage
@@ -142,8 +142,8 @@ always consist of 2 or more of these phases. The required phases are
#### Parameters
<ParameterTypes parameters={[{"name":"idempotencyKey","type":"`string`","description":"current idempotency key","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"callback","type":"(`transactionManager`: `EntityManager`) => Promise&#60;IdempotencyCallbackResult&#62;","description":"functionality to execute within the phase","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="workStage"/>
<TypeList types={[{"name":"idempotencyKey","type":"`string`","description":"current idempotency key","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"callback","type":"(`transactionManager`: `EntityManager`) => Promise&#60;IdempotencyCallbackResult&#62;","description":"functionality to execute within the phase","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="workStage"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"new updated idempotency key","expandable":false,"children":[]}]} sectionTitle="workStage"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[IdempotencyKey](../../entities/classes/entities.IdempotencyKey.mdx)&#62;","optional":false,"defaultValue":"","description":"new updated idempotency key","expandable":false,"children":[]}]} sectionTitle="workStage"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# LineItemAdjustmentService
@@ -12,13 +12,13 @@ Provides layer to manipulate line item adjustments.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`LineItemAdjustmentServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new LineItemAdjustmentService"/>
<TypeList types={[{"name":"__namedParameters","type":"`LineItemAdjustmentServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new LineItemAdjustmentService"/>
___
## 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":"lineItemAdjustmentRepo_","type":"Repository&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService","type":"[DiscountService](services.DiscountService.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="LineItemAdjustmentService"/>
<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":"lineItemAdjustmentRepo_","type":"Repository&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService","type":"[DiscountService](services.DiscountService.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="LineItemAdjustmentService"/>
___
@@ -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,15 +62,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_"/>
### retrieve
@@ -78,11 +78,11 @@ Retrieves a line item adjustment by id.
#### Parameters
<ParameterTypes parameters={[{"name":"lineItemAdjustmentId","type":"`string`","description":"the id of the line item adjustment to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the config to retrieve the line item adjustment by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"lineItemAdjustmentId","type":"`string`","description":"the id of the line item adjustment to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the config to retrieve the line item adjustment by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"the line item adjustment.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"the line item adjustment.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
@@ -90,11 +90,11 @@ Creates a line item adjustment
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"Partial&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the line item adjustment to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"Partial&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the line item adjustment to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"line item adjustment","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"line item adjustment","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -102,11 +102,11 @@ Creates a line item adjustment
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the line item adjustment id to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the line item adjustment to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the line item adjustment id to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the line item adjustment to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"line item adjustment","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","optional":false,"defaultValue":"","description":"line item adjustment","expandable":false,"children":[]}]} sectionTitle="update"/>
### list
@@ -114,11 +114,11 @@ Lists line item adjustments
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableLineItemAdjustmentProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`FilterableLineItemAdjustmentProps`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### delete
@@ -126,11 +126,11 @@ Deletes line item adjustments matching a selector
#### Parameters
<ParameterTypes parameters={[{"name":"selectorOrIds","type":"`string` \\| `string`[] \\| `FilterableLineItemAdjustmentProps` & `object`","description":"the query object for find or the line item adjustment id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"selectorOrIds","type":"`string` \\| `string`[] \\| `FilterableLineItemAdjustmentProps` & `object`","description":"the query object for find or the line item adjustment id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
### generateAdjustments
@@ -138,11 +138,11 @@ Creates adjustment for a line item
#### Parameters
<ParameterTypes parameters={[{"name":"calculationContextData","type":"`CalculationContextData`","description":"the calculationContextData object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"generatedLineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`AdjustmentContext`","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateAdjustments"/>
<TypeList types={[{"name":"calculationContextData","type":"`CalculationContextData`","description":"the calculationContextData object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"generatedLineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`AdjustmentContext`","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateAdjustments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;GeneratedAdjustment[]&#62;","optional":false,"defaultValue":"","description":"a line item adjustment or undefined if no adjustment was created","expandable":false,"children":[]}]} sectionTitle="generateAdjustments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;GeneratedAdjustment[]&#62;","optional":false,"defaultValue":"","description":"a line item adjustment or undefined if no adjustment was created","expandable":false,"children":[]}]} sectionTitle="generateAdjustments"/>
### createAdjustmentForLineItem
@@ -150,11 +150,11 @@ Creates adjustment for a line item
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createAdjustmentForLineItem"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createAdjustmentForLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a line item adjustment or undefined if no adjustment was created","expandable":false,"children":[]}]} sectionTitle="createAdjustmentForLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a line item adjustment or undefined if no adjustment was created","expandable":false,"children":[]}]} sectionTitle="createAdjustmentForLineItem"/>
### createAdjustments
@@ -162,8 +162,8 @@ Creates adjustment for a line item
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createAdjustments"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object holding discounts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item for which a line item adjustment might be created","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createAdjustments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[] \\| [LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[][]&#62;","optional":false,"defaultValue":"","description":"if a lineItem was given, returns a line item adjustment or undefined if no adjustment was created\notherwise returns an array of line item adjustments for each line item in the cart","expandable":false,"children":[]}]} sectionTitle="createAdjustments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[] \\| [LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[][]&#62;","optional":false,"defaultValue":"","description":"if a lineItem was given, returns a line item adjustment or undefined if no adjustment was created\notherwise returns an array of line item adjustments for each line item in the cart","expandable":false,"children":[]}]} sectionTitle="createAdjustments"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# LineItemService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new LineItemService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new LineItemService"/>
___
## 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":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemTaxLineRepo_","type":"Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"pricingService_","type":"[PricingService](services.PricingService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.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="LineItemService"/>
<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":"lineItemRepository_","type":"Repository&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemTaxLineRepo_","type":"Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"pricingService_","type":"[PricingService](services.PricingService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.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="LineItemService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,25 +60,25 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieve
@@ -86,11 +86,11 @@ Retrieves a line item by its id.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to be used at query building","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the line item to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to be used at query building","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the line item","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the line item","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### createReturnLines
@@ -99,11 +99,11 @@ return.
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"the id to generate return items from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartId","type":"`string`","description":"the cart to assign the return line items to.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createReturnLines"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"the id to generate return items from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartId","type":"`string`","description":"the cart to assign the return line items to.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createReturnLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the created line items","expandable":false,"children":[]}]} sectionTitle="createReturnLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the created line items","expandable":false,"children":[]}]} sectionTitle="createReturnLines"/>
### generate
@@ -111,25 +111,25 @@ Generate a single or multiple line item without persisting the data into the db
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generate"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generate"/>
#### Parameters
<ParameterTypes parameters={[{"name":"variantIdOrData","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"T extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generate"/>
<TypeList types={[{"name":"variantIdOrData","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"T extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generate"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"Generate a single or multiple line item without persisting the data into the db","expandable":false,"children":[]}]} sectionTitle="generate"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"Generate a single or multiple line item without persisting the data into the db","expandable":false,"children":[]}]} sectionTitle="generate"/>
### generateLineItem
#### Parameters
<ParameterTypes parameters={[{"name":"variant","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.thumbnail","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.discountable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.is_giftcard","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext` & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateLineItem"/>
<TypeList types={[{"name":"variant","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.title","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.thumbnail","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.discountable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant.product.is_giftcard","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GenerateLineItemContext` & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="generateLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="generateLineItem"/>
### create
@@ -137,15 +137,15 @@ Create a line item
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"T","description":"the line item object to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"T","description":"the line item object to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"the created line item","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"the created line item","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -153,11 +153,11 @@ Updates a line item
#### Parameters
<ParameterTypes parameters={[{"name":"idOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the id or selector of the line item(s) to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the properties to update the line item(s)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"idOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the id or selector of the line item(s) to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"the properties to update the line item(s)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the updated line item(s)","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the updated line item(s)","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -167,11 +167,11 @@ Deletes a line item.
#### Parameters
<ParameterTypes parameters={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
`**delete**(id): Promise&#60;void \| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;`
@@ -179,21 +179,21 @@ Deletes a line item.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
### deleteWithTaxLines
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteWithTaxLines"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the line item to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteWithTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="deleteWithTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="deleteWithTaxLines"/>
#### Deprecated
@@ -206,32 +206,32 @@ Create a line item tax line.
#### Parameters
<ParameterTypes parameters={[{"name":"args","type":"DeepPartial&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62;","description":"tax line partial passed to the repo create method","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLine"/>
<TypeList types={[{"name":"args","type":"DeepPartial&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62;","description":"tax line partial passed to the repo create method","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLine"/>
#### Returns
<ParameterTypes parameters={[{"name":"LineItemTaxLine","type":"`object`","description":"A Line Item Tax Line represents the taxes applied on a line item.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLine"/>
<TypeList types={[{"name":"LineItemTaxLine","type":"`object`","description":"A Line Item Tax Line represents the taxes applied on a line item.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLine"/>
### cloneTo
#### Parameters
<ParameterTypes parameters={[{"name":"ids","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options.setOriginalLineItemId","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cloneTo"/>
<TypeList types={[{"name":"ids","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"options","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options.setOriginalLineItemId","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cloneTo"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cloneTo"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cloneTo"/>
### validateGenerateArguments
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
#### Parameters
<ParameterTypes parameters={[{"name":"variantIdOrData","type":"`string` \\| T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"T extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
<TypeList types={[{"name":"variantIdOrData","type":"`string` \\| T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionIdOrContext","type":"T extends `string` ? `string` : `GenerateLineItemContext`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateGenerateArguments"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# MiddlewareService
@@ -14,7 +14,7 @@ ___
## Properties
<ParameterTypes parameters={[{"name":"postAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preCartCreation_","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"routers","type":"`Record<string, Router[]>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="MiddlewareService"/>
<TypeList types={[{"name":"postAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preAuthentication_","type":"`middlewareType`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"preCartCreation_","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"routers","type":"`Record<string, Router[]>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="MiddlewareService"/>
___
@@ -24,21 +24,21 @@ ___
#### Parameters
<ParameterTypes parameters={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"router","type":"`Router`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRouter"/>
<TypeList types={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"router","type":"`Router`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRouter"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addRouter"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addRouter"/>
### getRouters
#### Parameters
<ParameterTypes parameters={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRouters"/>
<TypeList types={[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRouters"/>
#### Returns
<ParameterTypes parameters={[{"name":"Router[]","type":"`Router`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getRouters"/>
<TypeList types={[{"name":"Router[]","type":"`Router`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getRouters"/>
### validateMiddleware\_
@@ -46,11 +46,11 @@ Validates a middleware function, throws if fn is not of type function.
#### Parameters
<ParameterTypes parameters={[{"name":"fn","type":"`unknown`","description":"the middleware function to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateMiddleware_"/>
<TypeList types={[{"name":"fn","type":"`unknown`","description":"the middleware function to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateMiddleware_"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"nothing if the middleware is a function","expandable":false,"children":[]}]} sectionTitle="validateMiddleware_"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"nothing if the middleware is a function","expandable":false,"children":[]}]} sectionTitle="validateMiddleware_"/>
### addPostAuthentication
@@ -58,11 +58,11 @@ Adds a middleware function to be called after authentication is completed.
#### Parameters
<ParameterTypes parameters={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPostAuthentication"/>
<TypeList types={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPostAuthentication"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="addPostAuthentication"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="addPostAuthentication"/>
### addPreAuthentication
@@ -70,11 +70,11 @@ Adds a middleware function to be called before authentication is completed.
#### Parameters
<ParameterTypes parameters={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPreAuthentication"/>
<TypeList types={[{"name":"middleware","type":"`middlewareHandlerType`","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, unknown>`","description":"the arguments that will be passed to the\n middleware","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPreAuthentication"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="addPreAuthentication"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="addPreAuthentication"/>
### addPreCartCreation
@@ -82,11 +82,11 @@ Adds a middleware function to be called before cart creation
#### Parameters
<ParameterTypes parameters={[{"name":"middleware","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPreCartCreation"/>
<TypeList types={[{"name":"middleware","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;","description":"the middleware function. Should return a\n middleware function.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPreCartCreation"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds a middleware function to be called before cart creation","expandable":false,"children":[]}]} sectionTitle="addPreCartCreation"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds a middleware function to be called before cart creation","expandable":false,"children":[]}]} sectionTitle="addPreCartCreation"/>
### usePostAuthentication
@@ -94,11 +94,11 @@ Adds post authentication middleware to an express app.
#### Parameters
<ParameterTypes parameters={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="usePostAuthentication"/>
<TypeList types={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="usePostAuthentication"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds post authentication middleware to an express app.","expandable":false,"children":[]}]} sectionTitle="usePostAuthentication"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds post authentication middleware to an express app.","expandable":false,"children":[]}]} sectionTitle="usePostAuthentication"/>
### usePreAuthentication
@@ -106,14 +106,14 @@ Adds pre authentication middleware to an express app.
#### Parameters
<ParameterTypes parameters={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="usePreAuthentication"/>
<TypeList types={[{"name":"app","type":"`Router`","description":"the express app to add the middleware to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="usePreAuthentication"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds pre authentication middleware to an express app.","expandable":false,"children":[]}]} sectionTitle="usePreAuthentication"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Adds pre authentication middleware to an express app.","expandable":false,"children":[]}]} sectionTitle="usePreAuthentication"/>
### usePreCartCreation
#### Returns
<ParameterTypes parameters={[{"name":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="usePreCartCreation"/>
<TypeList types={[{"name":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","type":"RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="usePreCartCreation"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# NewTotalsService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NewTotalsService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NewTotalsService"/>
___
## 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":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxCalculationStrategy_","type":"[ITaxCalculationStrategy](../../medusa/interfaces/medusa.ITaxCalculationStrategy.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="NewTotalsService"/>
<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":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxCalculationStrategy_","type":"[ITaxCalculationStrategy](../../medusa/interfaces/medusa.ITaxCalculationStrategy.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="NewTotalsService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### getLineItemTotals
@@ -76,11 +76,11 @@ Calculate and return the items totals for either the legacy calculation or the n
#### Parameters
<ParameterTypes parameters={[{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx) \\| [LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
<TypeList types={[{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx) \\| [LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the items totals for either the legacy calculation or the new calculation","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the items totals for either the legacy calculation or the new calculation","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
### getLineItemTotals\_
@@ -88,11 +88,11 @@ Calculate and return the totals for an item
#### Parameters
<ParameterTypes parameters={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.gift_card","type":"[GiftCardAllocation](../../medusa/types/medusa.GiftCardAllocation.mdx)","description":"The gift card applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.discount","type":"[DiscountAllocation](../../medusa/types/medusa.DiscountAllocation.mdx)","description":"The discount applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxLines","type":"[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals_"/>
<TypeList types={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.gift_card","type":"[GiftCardAllocation](../../medusa/types/medusa.GiftCardAllocation.mdx)","description":"The gift card applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.discount","type":"[DiscountAllocation](../../medusa/types/medusa.DiscountAllocation.mdx)","description":"The discount applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxLines","type":"[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the totals for an item","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the totals for an item","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals_"/>
### getLineItemTotalsLegacy
@@ -100,11 +100,11 @@ Calculate and return the legacy calculated totals using the tax rate
#### Parameters
<ParameterTypes parameters={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.gift_card","type":"[GiftCardAllocation](../../medusa/types/medusa.GiftCardAllocation.mdx)","description":"The gift card applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.discount","type":"[DiscountAllocation](../../medusa/types/medusa.DiscountAllocation.mdx)","description":"The discount applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotalsLegacy"/>
<TypeList types={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.gift_card","type":"[GiftCardAllocation](../../medusa/types/medusa.GiftCardAllocation.mdx)","description":"The gift card applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.lineItemAllocation.discount","type":"[DiscountAllocation](../../medusa/types/medusa.DiscountAllocation.mdx)","description":"The discount applied on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemTotalsLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the legacy calculated totals using the tax rate","expandable":false,"children":[]}]} sectionTitle="getLineItemTotalsLegacy"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the legacy calculated totals using the tax rate","expandable":false,"children":[]}]} sectionTitle="getLineItemTotalsLegacy"/>
### getLineItemRefund
@@ -112,21 +112,21 @@ Return the amount that can be refund on a line item
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.unit_price","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.includes_tax","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.tax_lines","type":"[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
<TypeList types={[{"name":"lineItem","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.unit_price","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.includes_tax","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.tax_lines","type":"[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"Return the amount that can be refund on a line item","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"Return the amount that can be refund on a line item","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
### getLineItemRefundLegacy
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.unit_price","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.includes_tax","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefundLegacy"/>
<TypeList types={[{"name":"lineItem","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.unit_price","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.includes_tax","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefundLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefundLegacy"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefundLegacy"/>
### getGiftCardTotals
@@ -134,11 +134,11 @@ Calculate and return the gift cards totals
#### Parameters
<ParameterTypes parameters={[{"name":"giftCardableAmount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.giftCardTransactions","type":"`GiftCardTransaction`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.giftCards","type":"[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotals"/>
<TypeList types={[{"name":"giftCardableAmount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.giftCardTransactions","type":"`GiftCardTransaction`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.giftCards","type":"[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the gift cards totals","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the gift cards totals","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotals"/>
### getGiftCardTransactionsTotals
@@ -146,13 +146,13 @@ Calculate and return the gift cards totals based on their transactions
#### Parameters
<ParameterTypes parameters={[{"name":"param0","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.giftCardTransactions","type":"`GiftCardTransaction`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region.gift_cards_taxable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region.tax_rate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
<TypeList types={[{"name":"param0","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.giftCardTransactions","type":"`GiftCardTransaction`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region.gift_cards_taxable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param0.region.tax_rate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
<TypeList types={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
<ParameterTypes parameters={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
<TypeList types={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTransactionsTotals"/>
### getShippingMethodTotals
@@ -160,21 +160,21 @@ Calculate and return the shipping methods totals for either the legacy calculati
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx) \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
<TypeList types={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx) \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping methods totals for either the legacy calculation or the new calculation","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping methods totals for either the legacy calculation or the new calculation","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
### getGiftCardableAmount
#### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.subtotal","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.shipping_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discount_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.gift_cards_taxable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.subtotal","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.shipping_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.discount_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.tax_total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.gift_cards_taxable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
### getShippingMethodTotals\_
@@ -182,11 +182,11 @@ Calculate and return the shipping method totals
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxLines","type":"[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals_"/>
<TypeList types={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.includeTax","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxLines","type":"[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping method totals","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping method totals","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals_"/>
### getShippingMethodTotalsLegacy
@@ -194,8 +194,8 @@ Calculate and return the shipping method totals legacy using the tax rate
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotalsLegacy"/>
<TypeList types={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.taxRate","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"param1.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotalsLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping method totals legacy using the tax rate","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotalsLegacy"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"Calculate and return the shipping method totals legacy using the tax rate","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotalsLegacy"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# NoteService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NoteService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NoteService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.deleted\"","expandable":false,"children":[]},{"name":"noteRepository_","type":"Repository&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="NoteService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"note.deleted\"","expandable":false,"children":[]},{"name":"noteRepository_","type":"Repository&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="NoteService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -76,11 +76,11 @@ Retrieves a specific note.
#### Parameters
<ParameterTypes parameters={[{"name":"noteId","type":"`string`","description":"the id of the note to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"any options needed to query for the result.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"noteId","type":"`string`","description":"the id of the note to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"any options needed to query for the result.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"which resolves to the requested note.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"which resolves to the requested note.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
@@ -88,11 +88,11 @@ Fetches all notes related to the given selector
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)[]&#62;","optional":false,"defaultValue":"","description":"notes related to the given search.","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)[]&#62;","optional":false,"defaultValue":"","description":"notes related to the given search.","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -100,11 +100,11 @@ Fetches all notes related to the given selector
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Note](../../entities/classes/entities.Note.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"notes related to the given search.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Note](../../entities/classes/entities.Note.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"notes related to the given search.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### create
@@ -112,11 +112,11 @@ Creates a note associated with a given author
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateNoteInput`","description":"the note to create","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"any configurations if needed, including meta data","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateNoteInput`","description":"the note to create","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"any configurations if needed, including meta data","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -124,11 +124,11 @@ Updates a given note with a new value
#### Parameters
<ParameterTypes parameters={[{"name":"noteId","type":"`string`","description":"the id of the note to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"the new value","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"noteId","type":"`string`","description":"the id of the note to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"the new value","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated element","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Note](../../entities/classes/entities.Note.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated element","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -136,8 +136,8 @@ Deletes a given note
#### Parameters
<ParameterTypes parameters={[{"name":"noteId","type":"`string`","description":"id of the note to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"noteId","type":"`string`","description":"id of the note to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes a given note","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes a given note","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# NotificationService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NotificationService"/>
<TypeList types={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new NotificationService"/>
___
## 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":"subscribers_","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"attachmentGenerator_","type":"`unknown`","description":"","optional":false,"defaultValue":"null","expandable":false,"children":[]},{"name":"container_","type":"`InjectedDependencies` & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notificationRepository_","type":"Repository&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notificationProviderRepository_","type":"Repository&#60;[NotificationProvider](../../entities/classes/entities.NotificationProvider.mdx)&#62;","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="NotificationService"/>
<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":"subscribers_","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"attachmentGenerator_","type":"`unknown`","description":"","optional":false,"defaultValue":"null","expandable":false,"children":[]},{"name":"container_","type":"`InjectedDependencies` & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notificationRepository_","type":"Repository&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"notificationProviderRepository_","type":"Repository&#60;[NotificationProvider](../../entities/classes/entities.NotificationProvider.mdx)&#62;","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="NotificationService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### registerAttachmentGenerator
@@ -77,11 +77,11 @@ used to generate on demand invoices or other documents.
#### Parameters
<ParameterTypes parameters={[{"name":"service","type":"`unknown`","description":"the service to assign to the attachmentGenerator","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerAttachmentGenerator"/>
<TypeList types={[{"name":"service","type":"`unknown`","description":"the service to assign to the attachmentGenerator","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerAttachmentGenerator"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Registers an attachment generator to the service. The generator can be\nused to generate on demand invoices or other documents.","expandable":false,"children":[]}]} sectionTitle="registerAttachmentGenerator"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Registers an attachment generator to the service. The generator can be\nused to generate on demand invoices or other documents.","expandable":false,"children":[]}]} sectionTitle="registerAttachmentGenerator"/>
### registerInstalledProviders
@@ -89,11 +89,11 @@ Takes a list of notification provider ids and persists them in the database.
#### Parameters
<ParameterTypes parameters={[{"name":"providerIds","type":"`string`[]","description":"a list of provider ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
<TypeList types={[{"name":"providerIds","type":"`string`[]","description":"a list of provider ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Takes a list of notification provider ids and persists them in the database.","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Takes a list of notification provider ids and persists them in the database.","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
### list
@@ -101,11 +101,11 @@ Retrieves a list of notifications.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the params to select the notifications by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the params to select the notifications by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the notifications that satisfy the query.","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the notifications that satisfy the query.","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -113,11 +113,11 @@ Retrieves a list of notifications and total count.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the params to select the notifications by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the params to select the notifications by.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Notification](../../entities/classes/entities.Notification.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the notifications that satisfy the query as well as the count.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Notification](../../entities/classes/entities.Notification.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the notifications that satisfy the query as well as the count.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### retrieve
@@ -125,11 +125,11 @@ Retrieves a notification with a given id
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the notification","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the notification","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"the configuration to apply to the query","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the notification","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the notification","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### subscribe
@@ -137,11 +137,11 @@ Subscribes a given provider to an event.
#### Parameters
<ParameterTypes parameters={[{"name":"eventName","type":"`string`","description":"the event to subscribe to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider that the event will be sent to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
<TypeList types={[{"name":"eventName","type":"`string`","description":"the event to subscribe to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider that the event will be sent to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Subscribes a given provider to an event.","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Subscribes a given provider to an event.","expandable":false,"children":[]}]} sectionTitle="subscribe"/>
### retrieveProvider\_
@@ -150,11 +150,11 @@ resolution fails.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the provider","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider_"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the provider","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider_"/>
#### Returns
<ParameterTypes parameters={[{"name":"AbstractNotificationService","type":"`object`","description":"## Overview\n\n:::note[Prerequisites]\n\nBefore creating a Notification Provider, [install an event bus module](https://docs.medusajs.com/development/events/modules/redis).\n\n:::\n\nA Notification Provider is a provider that handles sending and resending of notifications.\n\nTo create a Notification Provider, create a TypeScript or JavaScript file in `src/services`. The name of the file is the name of the provider\n(for example, `sendgrid.ts`). The file must export a class that extends the `AbstractNotificationService` class imported from `@medusajs/medusa`.\n\nFor example, create the file `src/services/email-sender.ts` with the following content:\n\n```ts title=\"src/services/email-sender.ts\"\nimport { AbstractNotificationService } from \"@medusajs/medusa\"\nimport { EntityManager } from \"typeorm\"\n\nclass EmailSenderService extends AbstractNotificationService {\n protected manager_: EntityManager\n protected transactionManager_: EntityManager\n\n sendNotification(\n event: string,\n data: unknown,\n attachmentGenerator: unknown\n ): Promise<{\n to: string;\n status: string;\n data: Record<string, unknown>;\n }> {\n throw new Error(\"Method not implemented.\")\n }\n resendNotification(\n notification: unknown,\n config: unknown,\n attachmentGenerator: unknown\n ): Promise<{\n to: string;\n status: string;\n data: Record<string, unknown>;\n }> {\n throw new Error(\"Method not implemented.\")\n }\n\n}\n\nexport default EmailSenderService\n```\n\n---\n\n## Identifier Property\n\nThe `NotificationProvider` entity has 2 properties: `identifier` and `is_installed`. The value of the `identifier` property in the notification provider\nclass is used when the Notification Provider is created in the database.\n\nThe value of this property is also used later when you want to subscribe the Notification Provider to events in a [Loader](https://docs.medusajs.com/development/loaders/overview).\n\nFor example:\n\n```ts\nclass EmailSenderService extends AbstractNotificationService {\n static identifier = \"email-sender\"\n // ...\n}\n```\n\n---","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider_"/>
<TypeList types={[{"name":"AbstractNotificationService","type":"`object`","description":"## Overview\n\n:::note[Prerequisites]\n\nBefore creating a Notification Provider, [install an event bus module](https://docs.medusajs.com/development/events/modules/redis).\n\n:::\n\nA Notification Provider is a provider that handles sending and resending of notifications.\n\nTo create a Notification Provider, create a TypeScript or JavaScript file in `src/services`. The name of the file is the name of the provider\n(for example, `sendgrid.ts`). The file must export a class that extends the `AbstractNotificationService` class imported from `@medusajs/medusa`.\n\nFor example, create the file `src/services/email-sender.ts` with the following content:\n\n```ts title=\"src/services/email-sender.ts\"\nimport { AbstractNotificationService } from \"@medusajs/medusa\"\nimport { EntityManager } from \"typeorm\"\n\nclass EmailSenderService extends AbstractNotificationService {\n protected manager_: EntityManager\n protected transactionManager_: EntityManager\n\n sendNotification(\n event: string,\n data: unknown,\n attachmentGenerator: unknown\n ): Promise<{\n to: string;\n status: string;\n data: Record<string, unknown>;\n }> {\n throw new Error(\"Method not implemented.\")\n }\n resendNotification(\n notification: unknown,\n config: unknown,\n attachmentGenerator: unknown\n ): Promise<{\n to: string;\n status: string;\n data: Record<string, unknown>;\n }> {\n throw new Error(\"Method not implemented.\")\n }\n\n}\n\nexport default EmailSenderService\n```\n\n---\n\n## Identifier Property\n\nThe `NotificationProvider` entity has 2 properties: `identifier` and `is_installed`. The value of the `identifier` property in the notification provider\nclass is used when the Notification Provider is created in the database.\n\nThe value of this property is also used later when you want to subscribe the Notification Provider to events in a [Loader](https://docs.medusajs.com/development/loaders/overview).\n\nFor example:\n\n```ts\nclass EmailSenderService extends AbstractNotificationService {\n static identifier = \"email-sender\"\n // ...\n}\n```\n\n---","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider_"/>
### handleEvent
@@ -164,11 +164,11 @@ order to allow for resends. Will log any errors that are encountered.
#### Parameters
<ParameterTypes parameters={[{"name":"eventName","type":"`string`","description":"the event to handle","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the data the event was sent with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="handleEvent"/>
<TypeList types={[{"name":"eventName","type":"`string`","description":"the event to handle","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the data the event was sent with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="handleEvent"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| void \\| [Notification](../../entities/classes/entities.Notification.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of notification subscribed","expandable":false,"children":[]}]} sectionTitle="handleEvent"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| void \\| [Notification](../../entities/classes/entities.Notification.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of notification subscribed","expandable":false,"children":[]}]} sectionTitle="handleEvent"/>
### send
@@ -177,11 +177,11 @@ method. Persists the Notification in the database.
#### Parameters
<ParameterTypes parameters={[{"name":"event","type":"`string`","description":"the name of the event","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventData","type":"`Record<string, unknown>`","description":"the data the event was sent with","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider that should handle the event.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="send"/>
<TypeList types={[{"name":"event","type":"`string`","description":"the name of the event","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventData","type":"`Record<string, unknown>`","description":"the data the event was sent with","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider that should handle the event.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="send"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the created notification","expandable":false,"children":[]}]} sectionTitle="send"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the created notification","expandable":false,"children":[]}]} sectionTitle="send"/>
### resend
@@ -190,8 +190,8 @@ underlying provider's resendNotification method.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the notification","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"any configuration that might override the previous\n send","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="resend"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the notification","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","description":"any configuration that might override the previous\n send","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="resend"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created notification","expandable":false,"children":[]}]} sectionTitle="resend"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Notification](../../entities/classes/entities.Notification.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created notification","expandable":false,"children":[]}]} sectionTitle="resend"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# OauthService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"cradle","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OauthService"/>
<TypeList types={[{"name":"cradle","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OauthService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.TOKEN_GENERATED","type":"`string`","description":"","optional":false,"defaultValue":"\"oauth.token_generated\"","expandable":false,"children":[]},{"name":"Events.TOKEN_REFRESHED","type":"`string`","description":"","optional":false,"defaultValue":"\"oauth.token_refreshed\"","expandable":false,"children":[]},{"name":"container_","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"oauthRepository_","type":"Repository&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="OauthService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.TOKEN_GENERATED","type":"`string`","description":"","optional":false,"defaultValue":"\"oauth.token_generated\"","expandable":false,"children":[]},{"name":"Events.TOKEN_REFRESHED","type":"`string`","description":"","optional":false,"defaultValue":"\"oauth.token_refreshed\"","expandable":false,"children":[]},{"name":"container_","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"oauthRepository_","type":"Repository&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="OauthService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,92 +60,92 @@ 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_"/>
### retrieveByName
#### Parameters
<ParameterTypes parameters={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"oauthId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"oauthId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### registerOauthApp
#### Parameters
<ParameterTypes parameters={[{"name":"appDetails","type":"`CreateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerOauthApp"/>
<TypeList types={[{"name":"appDetails","type":"`CreateOauthInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerOauthApp"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="registerOauthApp"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="registerOauthApp"/>
### generateToken
#### Parameters
<ParameterTypes parameters={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateToken"/>
<TypeList types={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="generateToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="generateToken"/>
### refreshToken
#### Parameters
<ParameterTypes parameters={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshToken"/>
<TypeList types={[{"name":"appName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Oauth](../../entities/classes/entities.Oauth.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshToken"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# OrderEditItemChangeService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderEditItemChangeService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderEditItemChangeService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit-item-change.CREATED\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit-item-change.DELETED\"","expandable":false,"children":[]},{"name":"orderItemChangeRepository_","type":"Repository&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.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":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.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="OrderEditItemChangeService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit-item-change.CREATED\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit-item-change.DELETED\"","expandable":false,"children":[]},{"name":"orderItemChangeRepository_","type":"Repository&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.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":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.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="OrderEditItemChangeService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,52 +60,52 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateOrderEditItemChangeInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateOrderEditItemChangeInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderItemChange](../../entities/classes/entities.OrderItemChange.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"itemChangeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"itemChangeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# OrderEditService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderEditService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderEditService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.updated\"","expandable":false,"children":[]},{"name":"Events.DECLINED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.declined\"","expandable":false,"children":[]},{"name":"Events.REQUESTED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.requested\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.canceled\"","expandable":false,"children":[]},{"name":"Events.CONFIRMED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.confirmed\"","expandable":false,"children":[]},{"name":"orderEditRepository_","type":"Repository&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderEditItemChangeService_","type":"[OrderEditItemChangeService](services.OrderEditItemChangeService.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="OrderEditService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.updated\"","expandable":false,"children":[]},{"name":"Events.DECLINED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.declined\"","expandable":false,"children":[]},{"name":"Events.REQUESTED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.requested\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.canceled\"","expandable":false,"children":[]},{"name":"Events.CONFIRMED","type":"`string`","description":"","optional":false,"defaultValue":"\"order-edit.confirmed\"","expandable":false,"children":[]},{"name":"orderEditRepository_","type":"Repository&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderEditItemChangeService_","type":"[OrderEditItemChangeService](services.OrderEditItemChangeService.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="OrderEditService"/>
___
@@ -26,13 +26,13 @@ ___
#### 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_"/>
### inventoryService\_
#### Returns
<ParameterTypes parameters={[{"name":"undefined \\| IInventoryService","type":"`undefined` \\| [IInventoryService](../../inventory/interfaces/inventory.IInventoryService.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
<TypeList types={[{"name":"undefined \\| IInventoryService","type":"`undefined` \\| [IInventoryService](../../inventory/interfaces/inventory.IInventoryService.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
___
@@ -42,21 +42,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\_
@@ -66,85 +66,85 @@ 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_"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateOrderEditInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context.createdBy","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateOrderEditInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context.createdBy","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
### decline
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context.declinedReason","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context.declinedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decline"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context.declinedReason","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context.declinedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decline"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decline"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decline"/>
### updateLineItem
@@ -154,118 +154,118 @@ Create or update order edit item change line item and apply the quantity
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Create or update order edit item change line item and apply the quantity\n- If the item change already exists then update the quantity of the line item as well as the line adjustments\n- If the item change does not exist then create the item change of type update and apply the quantity as well as update the line adjustments","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Create or update order edit item change line item and apply the quantity\n- If the item change already exists then update the quantity of the line item as well as the line adjustments\n- If the item change does not exist then create the item change of type update and apply the quantity as well as update the line adjustments","expandable":false,"children":[]}]} sectionTitle="updateLineItem"/>
### removeLineItem
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeLineItem"/>
### refreshAdjustments
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.preserveCustomAdjustments","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.preserveCustomAdjustments","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refreshAdjustments"/>
### decorateTotals
#### Parameters
<ParameterTypes parameters={[{"name":"orderEdit","type":"[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"orderEdit","type":"[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
### addLineItem
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`AddOrderEditLineItemInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`AddOrderEditLineItemInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addLineItem"/>
### deleteItemChange
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemChangeId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteItemChange"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemChangeId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteItemChange"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteItemChange"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteItemChange"/>
### requestConfirmation
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.requestedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="requestConfirmation"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.requestedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="requestConfirmation"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="requestConfirmation"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="requestConfirmation"/>
### cancel
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.canceledBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.canceledBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### confirm
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.confirmedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.confirmedBy","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="confirm"/>
### retrieveActive
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveActive"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveActive"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| null \\| [OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveActive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| null \\| [OrderEdit](../../entities/classes/entities.OrderEdit.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveActive"/>
### deleteClonedItems
#### Parameters
<ParameterTypes parameters={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteClonedItems"/>
<TypeList types={[{"name":"orderEditId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteClonedItems"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteClonedItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteClonedItems"/>
### isOrderEditActive
#### Parameters
<ParameterTypes parameters={[{"name":"orderEdit","type":"[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isOrderEditActive"/>
<TypeList types={[{"name":"orderEdit","type":"[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isOrderEditActive"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isOrderEditActive"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isOrderEditActive"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# OrderService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new OrderService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.GIFT_CARD_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.gift_card_created\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.shipment_created\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.fulfillment_created\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.fulfillment_canceled\"","expandable":false,"children":[]},{"name":"Events.RETURN_REQUESTED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.return_requested\"","expandable":false,"children":[]},{"name":"Events.ITEMS_RETURNED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.items_returned\"","expandable":false,"children":[]},{"name":"Events.RETURN_ACTION_REQUIRED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.return_action_required\"","expandable":false,"children":[]},{"name":"Events.REFUND_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.refund_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.refund_failed\"","expandable":false,"children":[]},{"name":"Events.SWAP_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.swap_created\"","expandable":false,"children":[]},{"name":"Events.PLACED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.placed\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.canceled\"","expandable":false,"children":[]},{"name":"Events.COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.completed\"","expandable":false,"children":[]},{"name":"orderRepository_","type":"Repository&#60;[Order](../../entities/classes/entities.Order.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService_","type":"[DiscountService](services.DiscountService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","typeLine truncated
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.GIFT_CARD_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.gift_card_created\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.shipment_created\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.fulfillment_created\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.fulfillment_canceled\"","expandable":false,"children":[]},{"name":"Events.RETURN_REQUESTED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.return_requested\"","expandable":false,"children":[]},{"name":"Events.ITEMS_RETURNED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.items_returned\"","expandable":false,"children":[]},{"name":"Events.RETURN_ACTION_REQUIRED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.return_action_required\"","expandable":false,"children":[]},{"name":"Events.REFUND_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.refund_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.refund_failed\"","expandable":false,"children":[]},{"name":"Events.SWAP_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.swap_created\"","expandable":false,"children":[]},{"name":"Events.PLACED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.placed\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.updated\"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.canceled\"","expandable":false,"children":[]},{"name":"Events.COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"order.completed\"","expandable":false,"children":[]},{"name":"orderRepository_","type":"Repository&#60;[Order](../../entities/classes/entities.Order.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileService_","type":"[ShippingProfileService](services.ShippingProfileService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountService_","type":"[DiscountService](services.DiscountService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotaLine truncated
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,47 +60,47 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Order](../../entities/classes/entities.Order.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Order](../../entities/classes/entities.Order.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### transformQueryForTotals
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"relations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
<TypeList types={[{"name":"relations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
<ParameterTypes parameters={[{"name":"relations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
<TypeList types={[{"name":"relations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsToSelect","type":"`undefined` \\| keyof [Order](../../entities/classes/entities.Order.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForTotals"/>
### retrieve
@@ -108,31 +108,31 @@ Gets an order by id.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id or selector of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"config of order to retrieve","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id or selector of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"config of order to retrieve","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveLegacy
#### Parameters
<ParameterTypes parameters={[{"name":"orderIdOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
<TypeList types={[{"name":"orderIdOrSelector","type":"`string` \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveLegacy"/>
### retrieveWithTotals
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context","type":"`TotalsContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context","type":"`TotalsContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveWithTotals"/>
### retrieveByCartId
@@ -140,21 +140,21 @@ Gets an order by cart id.
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"cart id to find order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used to find order","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"cart id to find order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"the config to be used to find order","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
### retrieveByCartIdWithTotals
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartIdWithTotals"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCartIdWithTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCartIdWithTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveByCartIdWithTotals"/>
### retrieveByExternalId
@@ -162,21 +162,21 @@ Gets an order by id.
#### Parameters
<ParameterTypes parameters={[{"name":"externalId","type":"`string`","description":"id of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"query config to get order by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
<TypeList types={[{"name":"externalId","type":"`string`","description":"id of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"query config to get order by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
### completeOrder
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id of the order to complete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="completeOrder"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id of the order to complete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="completeOrder"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="completeOrder"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="completeOrder"/>
### createFromCart
@@ -184,21 +184,21 @@ Creates an order from a cart
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFromCart"/>
<TypeList types={[{"name":"cartOrId","type":"`string` \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFromCart"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="createFromCart"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="createFromCart"/>
### createGiftCardsFromLineItem\_
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createGiftCardsFromLineItem_"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createGiftCardsFromLineItem_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise&#60;GiftCard&#62;[]","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createGiftCardsFromLineItem_"/>
<TypeList types={[{"name":"Promise&#60;GiftCard&#62;[]","type":"Promise&#60;[GiftCard](../../entities/classes/entities.GiftCard.mdx)&#62;[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createGiftCardsFromLineItem_"/>
### createShipment
@@ -208,11 +208,11 @@ have been created in regards to the shipment.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"the id of the order that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"the fulfillment that has now been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config of the order that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)[]","description":"array of tracking numbers associated with the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"the id of the order that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"the fulfillment that has now been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config of the order that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)[]","description":"array of tracking numbers associated with the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting order following the update.","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting order following the update.","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
### updateBillingAddress
@@ -220,11 +220,11 @@ Updates the order's billing address.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[Address](../../entities/classes/entities.Address.mdx)","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[Address](../../entities/classes/entities.Address.mdx)","description":"the value to set the billing address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateBillingAddress"/>
### updateShippingAddress
@@ -232,21 +232,21 @@ Updates the order's shipping address.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[Address](../../entities/classes/entities.Address.mdx)","description":"the value to set the shipping address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[Address](../../entities/classes/entities.Address.mdx)","description":"the value to set the shipping address to","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="updateShippingAddress"/>
### addShippingMethod
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShippingMethodDto`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShippingMethodDto`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addShippingMethod"/>
### update
@@ -256,11 +256,11 @@ will throw errors if metadata updates are attempted.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"the id of the order. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateOrderInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"the id of the order. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateOrderInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### cancel
@@ -270,11 +270,11 @@ Throws if payment process has been initiated.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id of order to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id of order to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### capturePayment
@@ -282,11 +282,11 @@ Captures payment for an order.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id of order to capture payment for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id of order to capture payment for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
### validateFulfillmentLineItem
@@ -297,11 +297,11 @@ quantity from the quantity that was originally purchased.
#### Parameters
<ParameterTypes parameters={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient fulfillable\n quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"the quantity that is requested to be fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem"/>
<TypeList types={[{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient fulfillable\n quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"the quantity that is requested to be fulfilled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"null \\| LineItem","type":"`null` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","optional":false,"defaultValue":"","description":"a line item that has the requested fulfillment quantity\n set.","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem"/>
<TypeList types={[{"name":"null \\| LineItem","type":"`null` \\| [LineItem](../../entities/classes/entities.LineItem.mdx)","optional":false,"defaultValue":"","description":"a line item that has the requested fulfillment quantity\n set.","expandable":false,"children":[]}]} sectionTitle="validateFulfillmentLineItem"/>
### createFulfillment
@@ -312,11 +312,11 @@ to their respective fulfillment provider.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id of order to fulfil.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemsToFulfill","type":"`FulFillmentItemType`[]","description":"items to fulfil.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to fulfil.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id of order to fulfil.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemsToFulfill","type":"`FulFillmentItemType`[]","description":"items to fulfil.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to fulfil.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"result of the update operation.","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
### cancelFulfillment
@@ -324,11 +324,11 @@ Cancels a fulfillment (if related to an order)
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentId","type":"`string`","description":"the ID of the fulfillment to cancel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillmentId","type":"`string`","description":"the ID of the fulfillment to cancel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"updated order","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"updated order","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
### getFulfillmentItems
@@ -336,11 +336,11 @@ Retrieves the order line items, given an array of items.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`FulFillmentItemType`[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transformer","type":"(`item`: `undefined` \\| [LineItem](../../entities/classes/entities.LineItem.mdx), `quantity`: `number`) => `unknown`","description":"a function to apply to each of the items\n retrieved from the order, should return a line item. If the transformer\n returns an undefined value the line item will be filtered from the\n returned array.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`FulFillmentItemType`[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transformer","type":"(`item`: `undefined` \\| [LineItem](../../entities/classes/entities.LineItem.mdx), `quantity`: `number`) => `unknown`","description":"a function to apply to each of the items\n retrieved from the order, should return a line item. If the transformer\n returns an undefined value the line item will be filtered from the\n returned array.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
### archive
@@ -349,11 +349,11 @@ and payment has been captured.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"the order to archive","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="archive"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"the order to archive","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="archive"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="archive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="archive"/>
### createRefund
@@ -361,21 +361,21 @@ Refunds a given amount back to the customer.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"id of the order to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundAmount","type":"`number`","description":"the amount to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"the reason to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config for refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"note for refund.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createRefund"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"id of the order to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundAmount","type":"`number`","description":"the amount to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"the reason to refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config for refund.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"note for refund.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"config.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createRefund"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the refund operation.","expandable":false,"children":[]}]} sectionTitle="createRefund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the refund operation.","expandable":false,"children":[]}]} sectionTitle="createRefund"/>
### decorateTotalsLegacy
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsFields","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="decorateTotalsLegacy"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsFields","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="decorateTotalsLegacy"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotalsLegacy"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="decorateTotalsLegacy"/>
### decorateTotals
@@ -385,11 +385,11 @@ Calculate and attach the different total fields on the object
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsFields","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsFields","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"Calculate and attach the different total fields on the object","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"Calculate and attach the different total fields on the object","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
`**decorateTotals**(order, context?): Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;`
@@ -397,11 +397,11 @@ Calculate and attach the different total fields on the object
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`TotalsContext`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`TotalsContext`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"Calculate and attach the different total fields on the object","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"Calculate and attach the different total fields on the object","expandable":false,"children":[]}]} sectionTitle="decorateTotals"/>
### registerReturnReceived
@@ -415,18 +415,18 @@ mismatches.
#### Parameters
<ParameterTypes parameters={[{"name":"orderId","type":"`string`","description":"the order to return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"receivedReturn","type":"[Return](../../entities/classes/entities.Return.mdx)","description":"the received return","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customRefundAmount","type":"`number`","description":"the custom refund amount return","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerReturnReceived"/>
<TypeList types={[{"name":"orderId","type":"`string`","description":"the order to return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"receivedReturn","type":"[Return](../../entities/classes/entities.Return.mdx)","description":"the received return","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customRefundAmount","type":"`number`","description":"the custom refund amount return","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerReturnReceived"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="registerReturnReceived"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="registerReturnReceived"/>
### getTotalsRelations
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Order](../../entities/classes/entities.Order.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
#### Returns
<ParameterTypes parameters={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getTotalsRelations"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# PaymentCollectionService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentCollectionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentCollectionService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.deleted\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_AUTHORIZED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.payment_authorized\"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentCollectionRepository_","type":"Repository&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62; & `object`","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="PaymentCollectionService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.deleted\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_AUTHORIZED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment-collection.payment_authorized\"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentCollectionRepository_","type":"Repository&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62; & `object`","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="PaymentCollectionService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -76,11 +76,11 @@ Retrieves a payment collection by id.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","description":"the config to retrieve the payment collection","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","description":"the config to retrieve the payment collection","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
@@ -88,11 +88,11 @@ Creates a new payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreatePaymentCollectionInput`","description":"info to create the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreatePaymentCollectionInput`","description":"info to create the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection created.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection created.","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -100,11 +100,11 @@ Updates a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","description":"info to be updated","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"DeepPartial&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","description":"info to be updated","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection updated.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection updated.","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -112,21 +112,21 @@ Deletes a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection to be removed","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection to be removed","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection removed.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection removed.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### isValidTotalAmount
#### Parameters
<ParameterTypes parameters={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionsInput","type":"`PaymentCollectionsSessionsBatchInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isValidTotalAmount"/>
<TypeList types={[{"name":"total","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionsInput","type":"`PaymentCollectionsSessionsBatchInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isValidTotalAmount"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isValidTotalAmount"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="isValidTotalAmount"/>
### setPaymentSessionsBatch
@@ -134,11 +134,11 @@ Manages multiple payment sessions of a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionOrId","type":"`string` \\| [PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionsInput","type":"`PaymentCollectionsSessionsBatchInput`[]","description":"array containing payment session info","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSessionsBatch"/>
<TypeList types={[{"name":"paymentCollectionOrId","type":"`string` \\| [PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionsInput","type":"`PaymentCollectionsSessionsBatchInput`[]","description":"array containing payment session info","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSessionsBatch"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment sessions.","expandable":false,"children":[]}]} sectionTitle="setPaymentSessionsBatch"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment sessions.","expandable":false,"children":[]}]} sectionTitle="setPaymentSessionsBatch"/>
### setPaymentSession
@@ -146,11 +146,11 @@ Manages a single payment sessions of a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"`PaymentCollectionsSessionsInput`","description":"object containing payment session info","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"`PaymentCollectionsSessionsInput`","description":"object containing payment session info","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment session.","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment session.","expandable":false,"children":[]}]} sectionTitle="setPaymentSession"/>
### refreshPaymentSession
@@ -158,11 +158,11 @@ Removes and recreate a payment session of a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionId","type":"`string`","description":"the id of the payment session to be replaced","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionId","type":"`string`","description":"the id of the payment session to be replaced","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerId","type":"`string`","description":"the id of the customer","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the new payment session created.","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the new payment session created.","expandable":false,"children":[]}]} sectionTitle="refreshPaymentSession"/>
### markAsAuthorized
@@ -170,11 +170,11 @@ Marks a payment collection as authorized bypassing the payment flow.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="markAsAuthorized"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="markAsAuthorized"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session authorized.","expandable":false,"children":[]}]} sectionTitle="markAsAuthorized"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session authorized.","expandable":false,"children":[]}]} sectionTitle="markAsAuthorized"/>
### authorizePaymentSessions
@@ -182,8 +182,8 @@ Authorizes the payment sessions of a payment collection.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionIds","type":"`string`[]","description":"array of payment session ids to be authorized","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"additional data required by payment providers","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="authorizePaymentSessions"/>
<TypeList types={[{"name":"paymentCollectionId","type":"`string`","description":"the id of the payment collection","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionIds","type":"`string`[]","description":"array of payment session ids to be authorized","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"additional data required by payment providers","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="authorizePaymentSessions"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment session.","expandable":false,"children":[]}]} sectionTitle="authorizePaymentSessions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentCollection](../../entities/classes/entities.PaymentCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment collection and its payment session.","expandable":false,"children":[]}]} sectionTitle="authorizePaymentSessions"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# PaymentProviderService
@@ -12,13 +12,13 @@ Helps retrieve payment providers
### Parameters
<ParameterTypes parameters={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentProviderService"/>
<TypeList types={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentProviderService"/>
___
## 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":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSessionRepository_","type":"Repository&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderRepository_","type":"Repository&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundRepository_","type":"Repository&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.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="PaymentProviderService"/>
<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":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSessionRepository_","type":"Repository&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderRepository_","type":"Repository&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"refundRepository_","type":"Repository&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.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="PaymentProviderService"/>
___
@@ -28,13 +28,13 @@ ___
#### 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_"/>
### paymentService\_
#### Returns
<ParameterTypes parameters={[{"name":"PaymentService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="paymentService_"/>
<TypeList types={[{"name":"PaymentService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="paymentService_"/>
___
@@ -44,21 +44,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\_
@@ -68,31 +68,31 @@ 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_"/>
### registerInstalledProviders
#### Parameters
<ParameterTypes parameters={[{"name":"providerIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
<TypeList types={[{"name":"providerIds","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"/>
### list
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrievePayment
@@ -100,11 +100,11 @@ Retrieve a payment entity with the given id.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrievePayment"/>
<TypeList types={[{"name":"paymentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrievePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"Retrieve a payment entity with the given id.","expandable":false,"children":[]}]} sectionTitle="retrievePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"Retrieve a payment entity with the given id.","expandable":false,"children":[]}]} sectionTitle="retrievePayment"/>
### listPayments
@@ -112,11 +112,11 @@ List all the payments according to the given selector and config.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listPayments"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listPayments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"List all the payments according to the given selector and config.","expandable":false,"children":[]}]} sectionTitle="listPayments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)[]&#62;","optional":false,"defaultValue":"","description":"List all the payments according to the given selector and config.","expandable":false,"children":[]}]} sectionTitle="listPayments"/>
### retrieveSession
@@ -124,11 +124,11 @@ Return the payment session for the given id.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSessionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveSession"/>
<TypeList types={[{"name":"paymentSessionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Return the payment session for the given id.","expandable":false,"children":[]}]} sectionTitle="retrieveSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Return the payment session for the given id.","expandable":false,"children":[]}]} sectionTitle="retrieveSession"/>
### createSession
@@ -136,11 +136,11 @@ Return the payment session for the given id.
#### Parameters
<ParameterTypes parameters={[{"name":"providerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
<TypeList types={[{"name":"providerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
#### Deprecated
@@ -150,11 +150,11 @@ Creates a payment session with the given provider.
#### Parameters
<ParameterTypes parameters={[{"name":"sessionInput","type":"`PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
<TypeList types={[{"name":"sessionInput","type":"`PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Creates a payment session with the given provider.","expandable":false,"children":[]}]} sectionTitle="createSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Creates a payment session with the given provider.","expandable":false,"children":[]}]} sectionTitle="createSession"/>
### refreshSession
@@ -163,11 +163,11 @@ This means, that we delete the current one and create a new.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSession","type":"`object`","description":"the payment session object to\n update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"`PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshSession"/>
<TypeList types={[{"name":"paymentSession","type":"`object`","description":"the payment session object to\n update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"`PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refreshSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session","expandable":false,"children":[]}]} sectionTitle="refreshSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session","expandable":false,"children":[]}]} sectionTitle="refreshSession"/>
### updateSession
@@ -175,21 +175,21 @@ Update a payment session with the given provider.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSession","type":"`object`","description":"The paymentSession to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"[Cart](../../entities/classes/entities.Cart.mdx) \\| `PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSession"/>
<TypeList types={[{"name":"paymentSession","type":"`object`","description":"The paymentSession to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentSession.provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sessionInput","type":"[Cart](../../entities/classes/entities.Cart.mdx) \\| `PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session","expandable":false,"children":[]}]} sectionTitle="updateSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment session","expandable":false,"children":[]}]} sectionTitle="updateSession"/>
### deleteSession
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteSession"/>
<TypeList types={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteSession"/>
### retrieveProvider
@@ -197,115 +197,115 @@ Finds a provider given an id
#### Type Parameters
<ParameterTypes parameters={[{"name":"TProvider","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"TProvider","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
#### Parameters
<ParameterTypes parameters={[{"name":"providerId","type":"`string`","description":"the id of the provider to get","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"providerId","type":"`string`","description":"the id of the provider to get","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"TProvider extends AbstractPaymentService ? AbstractPaymentService : TProvider extends AbstractPaymentProcessor ? AbstractPaymentProcessor : any","type":"TProvider extends [AbstractPaymentService](../../medusa/classes/medusa.AbstractPaymentService.mdx) ? [AbstractPaymentService](../../medusa/classes/medusa.AbstractPaymentService.mdx) : TProvider extends [AbstractPaymentProcessor](../../medusa/classes/medusa.AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](../../medusa/classes/medusa.AbstractPaymentProcessor.mdx) : `any`","optional":false,"defaultValue":"","description":"the payment provider","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"TProvider extends AbstractPaymentService ? AbstractPaymentService : TProvider extends AbstractPaymentProcessor ? AbstractPaymentProcessor : any","type":"TProvider extends [AbstractPaymentService](../../medusa/classes/medusa.AbstractPaymentService.mdx) ? [AbstractPaymentService](../../medusa/classes/medusa.AbstractPaymentService.mdx) : TProvider extends [AbstractPaymentProcessor](../../medusa/classes/medusa.AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](../../medusa/classes/medusa.AbstractPaymentProcessor.mdx) : `any`","optional":false,"defaultValue":"","description":"the payment provider","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
### createPayment
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreatePaymentInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
<TypeList types={[{"name":"data","type":"`CreatePaymentInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
### updatePayment
#### Parameters
<ParameterTypes parameters={[{"name":"paymentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.order_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.swap_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
<TypeList types={[{"name":"paymentId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.order_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.swap_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
### authorizePayment
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
### updateSessionData
#### Parameters
<ParameterTypes parameters={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSessionData"/>
<TypeList types={[{"name":"paymentSession","type":"[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSessionData"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateSessionData"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateSessionData"/>
### cancelPayment
#### Parameters
<ParameterTypes parameters={[{"name":"paymentObj","type":"Partial&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
<TypeList types={[{"name":"paymentObj","type":"Partial&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
### getStatus
#### Parameters
<ParameterTypes parameters={[{"name":"payment","type":"[Payment](../../entities/classes/entities.Payment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
<TypeList types={[{"name":"payment","type":"[Payment](../../entities/classes/entities.Payment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSessionStatus](../../entities/enums/entities.PaymentSessionStatus.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSessionStatus](../../entities/enums/entities.PaymentSessionStatus.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
### capturePayment
#### Parameters
<ParameterTypes parameters={[{"name":"paymentObj","type":"Partial&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"paymentObj","type":"Partial&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
### refundPayment
#### Parameters
<ParameterTypes parameters={[{"name":"payObjs","type":"[Payment](../../entities/classes/entities.Payment.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
<TypeList types={[{"name":"payObjs","type":"[Payment](../../entities/classes/entities.Payment.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
### refundFromPayment
#### Parameters
<ParameterTypes parameters={[{"name":"payment","type":"[Payment](../../entities/classes/entities.Payment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundFromPayment"/>
<TypeList types={[{"name":"payment","type":"[Payment](../../entities/classes/entities.Payment.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundFromPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundFromPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundFromPayment"/>
### retrieveRefund
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveRefund"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveRefund"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveRefund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveRefund"/>
### buildPaymentProcessorContext
@@ -313,11 +313,11 @@ Build the create session context for both legacy and new API
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrData","type":"[Cart](../../entities/classes/entities.Cart.mdx) \\| `PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="buildPaymentProcessorContext"/>
<TypeList types={[{"name":"cartOrData","type":"[Cart](../../entities/classes/entities.Cart.mdx) \\| `PaymentSessionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="buildPaymentProcessorContext"/>
#### Returns
<ParameterTypes parameters={[{"name":"Cart","type":"`object`","description":"A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"PaymentContext","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="buildPaymentProcessorContext"/>
<TypeList types={[{"name":"Cart","type":"`object`","description":"A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"PaymentContext","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="buildPaymentProcessorContext"/>
### saveSession
@@ -325,11 +325,11 @@ Create or update a Payment session data.
#### Parameters
<ParameterTypes parameters={[{"name":"providerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.sessionData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.payment_session_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.cartId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.isSelected","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.isInitiated","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.status","type":"[PaymentSessionStatus](../../entities/enums/entities.PaymentSessionStatus.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="saveSession"/>
<TypeList types={[{"name":"providerId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.sessionData","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.payment_session_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.cartId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.isSelected","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.isInitiated","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.status","type":"[PaymentSessionStatus](../../entities/enums/entities.PaymentSessionStatus.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="saveSession"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Create or update a Payment session data.","expandable":false,"children":[]}]} sectionTitle="saveSession"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)&#62;","optional":false,"defaultValue":"","description":"Create or update a Payment session data.","expandable":false,"children":[]}]} sectionTitle="saveSession"/>
### processUpdateRequestsData
@@ -337,18 +337,18 @@ Process the collected data. Can be used every time we need to process some colle
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"paymentResponse","type":"`Record<string, unknown>` \\| [PaymentSessionResponse](../../medusa/types/medusa.PaymentSessionResponse.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.customer","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.customer.id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processUpdateRequestsData"/>
<TypeList types={[{"name":"data","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"paymentResponse","type":"`Record<string, unknown>` \\| [PaymentSessionResponse](../../medusa/types/medusa.PaymentSessionResponse.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.customer","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.customer.id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processUpdateRequestsData"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Process the collected data. Can be used every time we need to process some collected data returned by the provider","expandable":false,"children":[]}]} sectionTitle="processUpdateRequestsData"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Process the collected data. Can be used every time we need to process some collected data returned by the provider","expandable":false,"children":[]}]} sectionTitle="processUpdateRequestsData"/>
### throwFromPaymentProcessorError
#### Parameters
<ParameterTypes parameters={[{"name":"errObj","type":"[PaymentProcessorError](../../medusa/interfaces/medusa.PaymentProcessorError.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="throwFromPaymentProcessorError"/>
<TypeList types={[{"name":"errObj","type":"[PaymentProcessorError](../../medusa/interfaces/medusa.PaymentProcessorError.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="throwFromPaymentProcessorError"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="throwFromPaymentProcessorError"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="throwFromPaymentProcessorError"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# PaymentService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PaymentService"/>
___
## 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":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.updated\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.REFUND_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_refund_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_refund_failed\"","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="PaymentService"/>
<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":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentRepository_","type":"Repository&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.updated\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.REFUND_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_refund_created\"","expandable":false,"children":[]},{"name":"Events.REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"payment.payment_refund_failed\"","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="PaymentService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -76,11 +76,11 @@ Retrieves a payment by id.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentId","type":"`string`","description":"the id of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"the config to retrieve the payment","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"paymentId","type":"`string`","description":"the id of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","description":"the config to retrieve the payment","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
@@ -88,11 +88,11 @@ Created a new payment.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentInput","type":"`PaymentDataInput`","description":"info to create the payment","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"paymentInput","type":"`PaymentDataInput`","description":"info to create the payment","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment created.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment created.","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -100,11 +100,11 @@ Updates a payment in order to link it to an order or a swap.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentId","type":"`string`","description":"the id of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"order\\_id or swap\\_id to link the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.order_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.swap_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"paymentId","type":"`string`","description":"the id of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`object`","description":"order\\_id or swap\\_id to link the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data.order_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data.swap_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment updated.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment updated.","expandable":false,"children":[]}]} sectionTitle="update"/>
### capture
@@ -112,11 +112,11 @@ Captures a payment.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentOrId","type":"`string` \\| [Payment](../../entities/classes/entities.Payment.mdx)","description":"the id or the class instance of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capture"/>
<TypeList types={[{"name":"paymentOrId","type":"`string` \\| [Payment](../../entities/classes/entities.Payment.mdx)","description":"the id or the class instance of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capture"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment captured.","expandable":false,"children":[]}]} sectionTitle="capture"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Payment](../../entities/classes/entities.Payment.mdx)&#62;","optional":false,"defaultValue":"","description":"the payment captured.","expandable":false,"children":[]}]} sectionTitle="capture"/>
### refund
@@ -124,8 +124,8 @@ refunds a payment.
#### Parameters
<ParameterTypes parameters={[{"name":"paymentOrId","type":"`string` \\| [Payment](../../entities/classes/entities.Payment.mdx)","description":"the id or the class instance of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"the amount to be refunded from the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"additional note of the refund","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refund"/>
<TypeList types={[{"name":"paymentOrId","type":"`string` \\| [Payment](../../entities/classes/entities.Payment.mdx)","description":"the id or the class instance of the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"the amount to be refunded from the payment","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reason","type":"`string`","description":"the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"note","type":"`string`","description":"additional note of the refund","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refund"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"the refund created.","expandable":false,"children":[]}]} sectionTitle="refund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Refund](../../entities/classes/entities.Refund.mdx)&#62;","optional":false,"defaultValue":"","description":"the refund created.","expandable":false,"children":[]}]} sectionTitle="refund"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# PriceListService
@@ -12,13 +12,13 @@ Provides layer to manipulate product tags.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`PriceListConstructorProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PriceListService"/>
<TypeList types={[{"name":"__namedParameters","type":"`PriceListConstructorProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PriceListService"/>
___
## 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":"customerGroupService_","type":"[CustomerGroupService](services.CustomerGroupService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceListRepo_","type":"Repository&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"moneyAmountRepo_","type":"Repository&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantRepo_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","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="PriceListService"/>
<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":"customerGroupService_","type":"[CustomerGroupService](services.CustomerGroupService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceListRepo_","type":"Repository&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"moneyAmountRepo_","type":"Repository&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantRepo_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","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="PriceListService"/>
___
@@ -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,15 +62,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_"/>
### retrieve
@@ -78,21 +78,21 @@ Retrieves a product tag by id.
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"the id of the product tag to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to retrieve the tag by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"the id of the product tag to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to retrieve the tag by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### listPriceListsVariantIdsMap
#### Parameters
<ParameterTypes parameters={[{"name":"priceListIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listPriceListsVariantIdsMap"/>
<TypeList types={[{"name":"priceListIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listPriceListsVariantIdsMap"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listPriceListsVariantIdsMap"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listPriceListsVariantIdsMap"/>
### create
@@ -100,11 +100,11 @@ Creates a Price List
#### Parameters
<ParameterTypes parameters={[{"name":"priceListObject","type":"[CreatePriceListInput](../../medusa/types/medusa.CreatePriceListInput.mdx)","description":"the Price List to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"priceListObject","type":"[CreatePriceListInput](../../medusa/types/medusa.CreatePriceListInput.mdx)","description":"the Price List to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"created Price List","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"created Price List","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -112,11 +112,11 @@ Updates a Price List
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the Product List to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"[UpdatePriceListInput](../../medusa/types/medusa.UpdatePriceListInput.mdx)","description":"the update to apply","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the Product List to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"[UpdatePriceListInput](../../medusa/types/medusa.UpdatePriceListInput.mdx)","description":"the update to apply","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="update"/>
### addPrices
@@ -124,11 +124,11 @@ Adds prices to a price list in bulk, optionally replacing all existing prices
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceListPriceCreateInput](../../medusa/types/medusa.PriceListPriceCreateInput.mdx)[]","description":"prices to add","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"whether to replace existing prices","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addPrices"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[PriceListPriceCreateInput](../../medusa/types/medusa.PriceListPriceCreateInput.mdx)[]","description":"prices to add","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"whether to replace existing prices","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="addPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="addPrices"/>
### deletePrices
@@ -136,11 +136,11 @@ Removes prices from a price list and deletes the removed prices in bulk
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceIds","type":"`string`[]","description":"ids of the prices to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePrices"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceIds","type":"`string`[]","description":"ids of the prices to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="deletePrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="deletePrices"/>
### clearPrices
@@ -148,11 +148,11 @@ Removes all prices from a price list and deletes the removed prices in bulk
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearPrices"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="clearPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"updated Price List","expandable":false,"children":[]}]} sectionTitle="clearPrices"/>
### delete
@@ -161,11 +161,11 @@ Will never fail due to delete being idempotent.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the price list","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### list
@@ -173,11 +173,11 @@ Lists Price Lists
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterablePriceListProps](../../medusa/classes/medusa.FilterablePriceListProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[FilterablePriceListProps](../../medusa/classes/medusa.FilterablePriceListProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -185,61 +185,61 @@ Lists Price Lists and adds count
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterablePriceListProps](../../medusa/classes/medusa.FilterablePriceListProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[FilterablePriceListProps](../../medusa/classes/medusa.FilterablePriceListProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[PriceList](../../entities/classes/entities.PriceList.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[PriceList](../../entities/classes/entities.PriceList.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[PriceList](../../entities/classes/entities.PriceList.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### upsertCustomerGroups\_
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerGroups","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertCustomerGroups_"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerGroups","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertCustomerGroups_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCustomerGroups_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCustomerGroups_"/>
### listProducts
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableProductProps](../../medusa/classes/medusa.FilterableProductProps.mdx) \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiresPriceList","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="listProducts"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableProductProps](../../medusa/classes/medusa.FilterableProductProps.mdx) \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiresPriceList","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="listProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Product](../../entities/classes/entities.Product.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Product](../../entities/classes/entities.Product.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listProducts"/>
### listVariants
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiresPriceList","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="listVariants"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiresPriceList","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="listVariants"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listVariants"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listVariants"/>
### deleteProductPrices
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteProductPrices"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteProductPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[string[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteProductPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[string[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteProductPrices"/>
### deleteVariantPrices
#### Parameters
<ParameterTypes parameters={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteVariantPrices"/>
<TypeList types={[{"name":"priceListId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteVariantPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[string[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteVariantPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[string[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteVariantPrices"/>
### addCurrencyFromRegion
@@ -247,12 +247,12 @@ Add `currency_code` to an MA record if `region_id`is passed.
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"[PriceListPriceUpdateInput](../../medusa/types/medusa.PriceListPriceUpdateInput.mdx) \\| [PriceListPriceCreateInput](../../medusa/types/medusa.PriceListPriceCreateInput.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
<TypeList types={[{"name":"T","type":"[PriceListPriceUpdateInput](../../medusa/types/medusa.PriceListPriceUpdateInput.mdx) \\| [PriceListPriceCreateInput](../../medusa/types/medusa.PriceListPriceCreateInput.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
#### Parameters
<ParameterTypes parameters={[{"name":"prices","type":"T[]","description":"a list of PriceListPrice(Create/Update)Input records","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
<TypeList types={[{"name":"prices","type":"T[]","description":"a list of PriceListPrice(Create/Update)Input records","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;T[]&#62;","optional":false,"defaultValue":"","description":"updated `prices` list","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;T[]&#62;","optional":false,"defaultValue":"","description":"updated `prices` list","expandable":false,"children":[]}]} sectionTitle="addCurrencyFromRegion"/>
@@ -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"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductCategoryService
@@ -12,13 +12,13 @@ Provides layer to manipulate product categories.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductCategoryService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductCategoryService"/>
___
## 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":"productCategoryRepo_","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.deleted\"","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="ProductCategoryService"/>
<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":"productCategoryRepo_","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-category.deleted\"","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="ProductCategoryService"/>
___
@@ -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,15 +62,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_"/>
### listAndCount
@@ -79,11 +79,11 @@ product category that match the query.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[TreeQuerySelector](../../medusa/types/medusa.TreeQuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Filter options for product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Configuration for query.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Filter options for product category tree relations","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[TreeQuerySelector](../../medusa/types/medusa.TreeQuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Filter options for product category.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Configuration for query.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"Filter options for product category tree relations","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the product category as\n the first element and the total count of product category that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the product category as\n the first element and the total count of product category that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### retrieve\_
@@ -91,11 +91,11 @@ A generic retrieve for fining product categories by different attributes.
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
### retrieve
@@ -103,11 +103,11 @@ Retrieves a product category by id.
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"the id of the product category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"productCategoryId","type":"`string`","description":"the id of the product category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByHandle
@@ -115,11 +115,11 @@ Retrieves a product category by handle.
#### Parameters
<ParameterTypes parameters={[{"name":"handle","type":"`string`","description":"the handle of the category","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"handle","type":"`string`","description":"the handle of the category","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"the config of the product category to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"treeSelector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"the product category.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
### create
@@ -127,11 +127,11 @@ Creates a product category
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryInput","type":"`CreateProductCategoryInput`","description":"parameters to create a product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"productCategoryInput","type":"`CreateProductCategoryInput`","description":"parameters to create a product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"created product category","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"created product category","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -139,11 +139,11 @@ Updates a product category
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"id of product category to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryInput","type":"`UpdateProductCategoryInput`","description":"parameters to update in product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"productCategoryId","type":"`string`","description":"id of product category to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryInput","type":"`UpdateProductCategoryInput`","description":"parameters to update in product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"updated product category","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62;","optional":false,"defaultValue":"","description":"updated product category","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -151,11 +151,11 @@ Deletes a product category
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"is the id of the product category to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"productCategoryId","type":"`string`","description":"is the id of the product category to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"a promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"a promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addProducts
@@ -163,11 +163,11 @@ Add a batch of product to a product category
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"The id of the product category on which to add the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to attach to the product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"productCategoryId","type":"`string`","description":"The id of the product category on which to add the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to attach to the product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the product category on which the products have been added","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the product category on which the products have been added","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
### removeProducts
@@ -175,41 +175,41 @@ Remove a batch of product from a product category
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryId","type":"`string`","description":"The id of the product category on which to remove the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to remove from the product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"productCategoryId","type":"`string`","description":"The id of the product category on which to remove the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to remove from the product category","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the product category on which the products have been removed","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the product category on which the products have been removed","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
### fetchReorderConditions
#### Parameters
<ParameterTypes parameters={[{"name":"productCategory","type":"[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"input","type":"`UpdateProductCategoryInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldDeleteElement","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="fetchReorderConditions"/>
<TypeList types={[{"name":"productCategory","type":"[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"input","type":"`UpdateProductCategoryInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shouldDeleteElement","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="fetchReorderConditions"/>
#### Returns
<ParameterTypes parameters={[{"name":"ReorderConditions","type":"`ReorderConditions`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="fetchReorderConditions"/>
<TypeList types={[{"name":"ReorderConditions","type":"`ReorderConditions`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="fetchReorderConditions"/>
### performReordering
#### Parameters
<ParameterTypes parameters={[{"name":"repository","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"conditions","type":"`ReorderConditions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="performReordering"/>
<TypeList types={[{"name":"repository","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"conditions","type":"`ReorderConditions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="performReordering"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="performReordering"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="performReordering"/>
### shiftSiblings
#### Parameters
<ParameterTypes parameters={[{"name":"repository","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"conditions","type":"`ReorderConditions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="shiftSiblings"/>
<TypeList types={[{"name":"repository","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"conditions","type":"`ReorderConditions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="shiftSiblings"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="shiftSiblings"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="shiftSiblings"/>
### transformParentIdToEntity
@@ -218,8 +218,8 @@ into product\_category entity.
#### Parameters
<ParameterTypes parameters={[{"name":"productCategoryInput","type":"`CreateProductCategoryInput` \\| `UpdateProductCategoryInput`","description":"params used to create/update","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformParentIdToEntity"/>
<TypeList types={[{"name":"productCategoryInput","type":"`CreateProductCategoryInput` \\| `UpdateProductCategoryInput`","description":"params used to create/update","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformParentIdToEntity"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;CreateProductCategoryInput \\| UpdateProductCategoryInput&#62;","optional":false,"defaultValue":"","description":"transformed productCategoryInput","expandable":false,"children":[]}]} sectionTitle="transformParentIdToEntity"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;CreateProductCategoryInput \\| UpdateProductCategoryInput&#62;","optional":false,"defaultValue":"","description":"transformed productCategoryInput","expandable":false,"children":[]}]} sectionTitle="transformParentIdToEntity"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductCollectionService
@@ -12,13 +12,13 @@ Provides layer to manipulate product collections.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductCollectionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductCollectionService"/>
___
## 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":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCollectionRepository_","type":"Repository&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.deleted\"","expandable":false,"children":[]},{"name":"Events.PRODUCTS_ADDED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.products_added\"","expandable":false,"children":[]},{"name":"Events.PRODUCTS_REMOVED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.products_removed\"","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="ProductCollectionService"/>
<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":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCollectionRepository_","type":"Repository&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.deleted\"","expandable":false,"children":[]},{"name":"Events.PRODUCTS_ADDED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.products_added\"","expandable":false,"children":[]},{"name":"Events.PRODUCTS_REMOVED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-collection.products_removed\"","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="ProductCollectionService"/>
___
@@ -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,15 +62,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_"/>
### retrieve
@@ -78,11 +78,11 @@ Retrieves a product collection by id.
#### Parameters
<ParameterTypes parameters={[{"name":"collectionId","type":"`string`","description":"the id of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"the config of the collection to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"collectionId","type":"`string`","description":"the id of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"the config of the collection to retrieve.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByHandle
@@ -90,11 +90,11 @@ Retrieves a product collection by id.
#### Parameters
<ParameterTypes parameters={[{"name":"collectionHandle","type":"`string`","description":"the handle of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"query config for request","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"collectionHandle","type":"`string`","description":"the handle of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"query config for request","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"the collection.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
### create
@@ -102,11 +102,11 @@ Creates a product collection
#### Parameters
<ParameterTypes parameters={[{"name":"collection","type":"`CreateProductCollection`","description":"the collection to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"collection","type":"`CreateProductCollection`","description":"the collection to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"created collection","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"created collection","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -114,11 +114,11 @@ Updates a product collection
#### Parameters
<ParameterTypes parameters={[{"name":"collectionId","type":"`string`","description":"id of collection to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductCollection`","description":"update object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"collectionId","type":"`string`","description":"id of collection to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductCollection`","description":"update object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"update collection","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"update collection","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -126,31 +126,31 @@ Deletes a product collection idempotently
#### Parameters
<ParameterTypes parameters={[{"name":"collectionId","type":"`string`","description":"id of collection to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"collectionId","type":"`string`","description":"id of collection to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addProducts
#### Parameters
<ParameterTypes parameters={[{"name":"collectionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"collectionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
### removeProducts
#### Parameters
<ParameterTypes parameters={[{"name":"collectionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"collectionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
### list
@@ -158,11 +158,11 @@ Lists product collections
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.skip","type":"`number`","description":"","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"config.take","type":"`number`","description":"","optional":false,"defaultValue":"20","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"`object`","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config.skip","type":"`number`","description":"","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"config.take","type":"`number`","description":"","optional":false,"defaultValue":"20","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -170,8 +170,8 @@ Lists product collections and add count.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`ListAndCountSelector`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"`ListAndCountSelector`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ProductCollection](../../entities/classes/entities.ProductCollection.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductService"/>
___
## 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":"productOptionRepository_","type":"Repository&#60;[ProductOption](../../entities/classes/entities.ProductOption.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantRepository_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeRepository_","type":"Repository&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTagRepository_","type":"Repository&#60;[ProductTag](../../entities/classes/entities.ProductTag.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"imageRepository_","type":"Repository&#60;[Image](../../entities/classes/entities.Image.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryRepository_","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"searchService_","type":"[SearchService](services.SearchService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"remoteQuery_","type":"[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"IndexName","type":"`\"products\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.deleted\"","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="ProductService"/>
<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":"productOptionRepository_","type":"Repository&#60;[ProductOption](../../entities/classes/entities.ProductOption.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantRepository_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeRepository_","type":"Repository&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTagRepository_","type":"Repository&#60;[ProductTag](../../entities/classes/entities.ProductTag.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"imageRepository_","type":"Repository&#60;[Image](../../entities/classes/entities.Image.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productCategoryRepository_","type":"TreeRepository&#60;[ProductCategory](../../entities/classes/entities.ProductCategory.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"searchService_","type":"[SearchService](services.SearchService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"remoteQuery_","type":"[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"IndexName","type":"`\"products\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product.deleted\"","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="ProductService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### list
@@ -76,11 +76,11 @@ Lists products based on the provided parameters.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`ProductSelector`","description":"an object that defines rules to filter products\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`ProductSelector`","description":"an object that defines rules to filter products\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -89,11 +89,11 @@ products that match the query.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`ProductSelector`","description":"an object that defines rules to filter products\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"`ProductSelector`","description":"an object that defines rules to filter products\n by","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines the scope for what should be\n returned","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Product](../../entities/classes/entities.Product.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the products as\n the first element and the total count of products that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Product](../../entities/classes/entities.Product.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the products as\n the first element and the total count of products that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### count
@@ -101,11 +101,11 @@ Return the total number of documents in database
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"the selector to choose products by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="count"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"the selector to choose products by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="count"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the result of the count operation","expandable":false,"children":[]}]} sectionTitle="count"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the result of the count operation","expandable":false,"children":[]}]} sectionTitle="count"/>
### retrieve
@@ -114,11 +114,11 @@ Throws in case of DB Error and if product was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByHandle
@@ -127,11 +127,11 @@ Throws in case of DB Error and if product was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"productHandle","type":"`string`","description":"handle of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"details about what to get from the product","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"productHandle","type":"`string`","description":"handle of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"details about what to get from the product","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieveByHandle"/>
### retrieveByExternalId
@@ -140,11 +140,11 @@ Throws in case of DB Error and if product was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"externalId","type":"`string`","description":"handle of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"details about what to get from the product","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
<TypeList types={[{"name":"externalId","type":"`string`","description":"handle of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"details about what to get from the product","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieveByExternalId"/>
### retrieve\_
@@ -153,11 +153,11 @@ Throws in case of DB Error and if product was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"selector object","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"selector object","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
### retrieveVariants
@@ -165,37 +165,37 @@ Gets all variants belonging to a product.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the id of the product to get variants from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"The config to select and configure relations etc...","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveVariants"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the id of the product to get variants from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"The config to select and configure relations etc...","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveVariants"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"an array of variants","expandable":false,"children":[]}]} sectionTitle="retrieveVariants"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"an array of variants","expandable":false,"children":[]}]} sectionTitle="retrieveVariants"/>
### filterProductsBySalesChannel
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="filterProductsBySalesChannel"/>
<TypeList types={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="filterProductsBySalesChannel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="filterProductsBySalesChannel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="filterProductsBySalesChannel"/>
### listTypes
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listTypes"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listTypes"/>
### listTagsByUsage
#### Parameters
<ParameterTypes parameters={[{"name":"take","type":"`number`","description":"","optional":false,"defaultValue":"10","expandable":false,"children":[]}]} sectionTitle="listTagsByUsage"/>
<TypeList types={[{"name":"take","type":"`number`","description":"","optional":false,"defaultValue":"10","expandable":false,"children":[]}]} sectionTitle="listTagsByUsage"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTag](../../entities/classes/entities.ProductTag.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listTagsByUsage"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductTag](../../entities/classes/entities.ProductTag.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listTagsByUsage"/>
### isProductInSalesChannels
@@ -203,11 +203,11 @@ Check if the product is assigned to at least one of the provided sales channels.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"product id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelIds","type":"`string`[]","description":"an array of sales channel ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isProductInSalesChannels"/>
<TypeList types={[{"name":"id","type":"`string`","description":"product id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelIds","type":"`string`[]","description":"an array of sales channel ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isProductInSalesChannels"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"Check if the product is assigned to at least one of the provided sales channels.","expandable":false,"children":[]}]} sectionTitle="isProductInSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"Check if the product is assigned to at least one of the provided sales channels.","expandable":false,"children":[]}]} sectionTitle="isProductInSalesChannels"/>
### create
@@ -215,11 +215,11 @@ Creates a product.
#### Parameters
<ParameterTypes parameters={[{"name":"productObject","type":"`CreateProductInput`","description":"the product to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"productObject","type":"`CreateProductInput`","description":"the product to create","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -229,11 +229,11 @@ product variant updates are attempted.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the id of the product. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the id of the product. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -242,11 +242,11 @@ variants will also be deleted.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the id of the product to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the id of the product to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addOption
@@ -256,21 +256,21 @@ created option. The same option cannot be added more than once.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the product to apply the new option to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionTitle","type":"`string`","description":"the display title of the option, e.g. \"Size\"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addOption"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the product to apply the new option to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionTitle","type":"`string`","description":"the display title of the option, e.g. \"Size\"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the model update operation","expandable":false,"children":[]}]} sectionTitle="addOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the model update operation","expandable":false,"children":[]}]} sectionTitle="addOption"/>
### reorderVariants
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantOrder","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="reorderVariants"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantOrder","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="reorderVariants"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="reorderVariants"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="reorderVariants"/>
### updateOption
@@ -279,11 +279,11 @@ not associated with the product. Throws if the updated title already exists.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the product whose option we are updating","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the id of the option we are updating","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`ProductOptionInput`","description":"the data to update the option with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateOption"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the product whose option we are updating","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the id of the option we are updating","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`ProductOptionInput`","description":"the data to update the option with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated product","expandable":false,"children":[]}]} sectionTitle="updateOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated product","expandable":false,"children":[]}]} sectionTitle="updateOption"/>
### retrieveOptionByTitle
@@ -291,11 +291,11 @@ Retrieve product's option by title.
#### Parameters
<ParameterTypes parameters={[{"name":"title","type":"`string`","description":"title of the option","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string`","description":"id of a product","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveOptionByTitle"/>
<TypeList types={[{"name":"title","type":"`string`","description":"title of the option","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string`","description":"id of a product","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveOptionByTitle"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| [ProductOption](../../entities/classes/entities.ProductOption.mdx)&#62;","optional":false,"defaultValue":"","description":"product option","expandable":false,"children":[]}]} sectionTitle="retrieveOptionByTitle"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| [ProductOption](../../entities/classes/entities.ProductOption.mdx)&#62;","optional":false,"defaultValue":"","description":"product option","expandable":false,"children":[]}]} sectionTitle="retrieveOptionByTitle"/>
### deleteOption
@@ -303,11 +303,11 @@ Delete an option from a product.
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the product to delete an option from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteOption"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the product to delete an option from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated product","expandable":false,"children":[]}]} sectionTitle="deleteOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [Product](../../entities/classes/entities.Product.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated product","expandable":false,"children":[]}]} sectionTitle="deleteOption"/>
### updateShippingProfile
@@ -315,11 +315,11 @@ Assign a product to a profile, if a profile id null is provided then detach the
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string` \\| `string`[]","description":"ID or IDs of the products to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profileId","type":"`null` \\| `string`","description":"Shipping profile ID to update the shipping options with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
<TypeList types={[{"name":"productIds","type":"`string` \\| `string`[]","description":"ID or IDs of the products to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profileId","type":"`null` \\| `string`","description":"Shipping profile ID to update the shipping options with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"updated products","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"updated products","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
### prepareListQuery\_
@@ -327,13 +327,13 @@ Temporary method to be used in place we need custom query strategy to prevent ty
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableProductProps](../../medusa/classes/medusa.FilterableProductProps.mdx) \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
<TypeList types={[{"name":"selector","type":"[FilterableProductProps](../../medusa/classes/medusa.FilterableProductProps.mdx) \\| [Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Product](../../entities/classes/entities.Product.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`FindProductConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
#### Returns
<ParameterTypes parameters={[{"name":"q","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"keyof [Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithoutRelationsOptions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
<TypeList types={[{"name":"q","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"keyof [Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithoutRelationsOptions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
<ParameterTypes parameters={[{"name":"q","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"keyof [Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithoutRelationsOptions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
<TypeList types={[{"name":"q","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"keyof [Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithoutRelationsOptions`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="prepareListQuery_"/>
### decorateProductsWithSalesChannels
@@ -342,11 +342,11 @@ MedusaV2 FF is on.
#### Parameters
<ParameterTypes parameters={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateProductsWithSalesChannels"/>
<TypeList types={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="decorateProductsWithSalesChannels"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"Temporary method to join sales channels of a product using RemoteQuery while\nMedusaV2 FF is on.","expandable":false,"children":[]}]} sectionTitle="decorateProductsWithSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Product](../../entities/classes/entities.Product.mdx)[]&#62;","optional":false,"defaultValue":"","description":"Temporary method to join sales channels of a product using RemoteQuery while\nMedusaV2 FF is on.","expandable":false,"children":[]}]} sectionTitle="decorateProductsWithSalesChannels"/>
### getSalesChannelModuleChannels
@@ -355,8 +355,8 @@ MedusaV2 FF is on.
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getSalesChannelModuleChannels"/>
<TypeList types={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getSalesChannelModuleChannels"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"Temporary method to fetch sales channels of a product using RemoteQuery while\nMedusaV2 FF is on.","expandable":false,"children":[]}]} sectionTitle="getSalesChannelModuleChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"Temporary method to fetch sales channels of a product using RemoteQuery while\nMedusaV2 FF is on.","expandable":false,"children":[]}]} sectionTitle="getSalesChannelModuleChannels"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductTypeService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productTypeRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductTypeService"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productTypeRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductTypeService"/>
___
## 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":"typeRepository_","type":"Repository&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","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="ProductTypeService"/>
<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":"typeRepository_","type":"Repository&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","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="ProductTypeService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -77,11 +77,11 @@ Throws in case of DB Error and if product was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"object that defines what should be included in the\n query response","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the find one operation.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
@@ -89,11 +89,11 @@ Lists product types
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -101,8 +101,8 @@ Lists product types and adds count.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductType](../../entities/classes/entities.ProductType.mdx)&#62;","description":"the config to be used for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductType](../../entities/classes/entities.ProductType.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ProductType](../../entities/classes/entities.ProductType.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductVariantInventoryService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductVariantInventoryService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductVariantInventoryService"/>
___
## Properties
<ParameterTypes parameters={[{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelLocationService_","type":"[SalesChannelLocationService](services.SalesChannelLocationService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelInventoryService_","type":"[SalesChannelInventoryService](services.SalesChannelInventoryService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[IEventBusService](../../types/EventBusTypes/interfaces/types.EventBusTypes.IEventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"remoteQuery_","type":"[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction.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="ProductVariantInventoryService"/>
<TypeList types={[{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelLocationService_","type":"[SalesChannelLocationService](services.SalesChannelLocationService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelInventoryService_","type":"[SalesChannelInventoryService](services.SalesChannelInventoryService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService_","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[IEventBusService](../../types/EventBusTypes/interfaces/types.EventBusTypes.IEventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"remoteQuery_","type":"[RemoteQueryFunction](../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.RemoteQueryFunction.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="ProductVariantInventoryService"/>
___
@@ -26,19 +26,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_"/>
### inventoryService\_
#### Returns
<ParameterTypes parameters={[{"name":"IInventoryService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
<TypeList types={[{"name":"IInventoryService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
### stockLocationService\_
#### Returns
<ParameterTypes parameters={[{"name":"IStockLocationService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="stockLocationService_"/>
<TypeList types={[{"name":"IStockLocationService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="stockLocationService_"/>
___
@@ -48,21 +48,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\_
@@ -72,15 +72,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_"/>
### confirmInventory
@@ -88,11 +88,11 @@ confirms if requested inventory is available
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"id of the variant to confirm inventory for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity of inventory to confirm is available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"optionally include a sales channel if applicable","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.salesChannelId","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirmInventory"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"id of the variant to confirm inventory for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity of inventory to confirm is available","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"optionally include a sales channel if applicable","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.salesChannelId","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="confirmInventory"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Boolean&#62;","optional":false,"defaultValue":"","description":"boolean indicating if inventory is available","expandable":false,"children":[]}]} sectionTitle="confirmInventory"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Boolean&#62;","optional":false,"defaultValue":"","description":"boolean indicating if inventory is available","expandable":false,"children":[]}]} sectionTitle="confirmInventory"/>
### retrieve
@@ -100,11 +100,11 @@ Retrieves a product variant inventory item by its inventory item ID and variant
#### Parameters
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"The ID of the variant to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"inventoryItemId","type":"`string`","description":"The ID of the inventory item to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"The ID of the variant to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with the product variant inventory item.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with the product variant inventory item.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### listByItem
@@ -112,11 +112,11 @@ list registered inventory items
#### Parameters
<ParameterTypes parameters={[{"name":"itemIds","type":"`string`[]","description":"list inventory item ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByItem"/>
<TypeList types={[{"name":"itemIds","type":"`string`[]","description":"list inventory item ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"list of inventory items","expandable":false,"children":[]}]} sectionTitle="listByItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"list of inventory items","expandable":false,"children":[]}]} sectionTitle="listByItem"/>
### listByVariant
@@ -124,11 +124,11 @@ List inventory items for a specific variant
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string` \\| `string`[]","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByVariant"/>
<TypeList types={[{"name":"variantId","type":"`string` \\| `string`[]","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByVariant"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"variant inventory items for the variant id","expandable":false,"children":[]}]} sectionTitle="listByVariant"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"variant inventory items for the variant id","expandable":false,"children":[]}]} sectionTitle="listByVariant"/>
### listVariantsByItem
@@ -136,11 +136,11 @@ lists variant by inventory item id
#### Parameters
<ParameterTypes parameters={[{"name":"itemId","type":"`string`","description":"item id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listVariantsByItem"/>
<TypeList types={[{"name":"itemId","type":"`string`","description":"item id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listVariantsByItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a list of product variants that are associated with the item id","expandable":false,"children":[]}]} sectionTitle="listVariantsByItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a list of product variants that are associated with the item id","expandable":false,"children":[]}]} sectionTitle="listVariantsByItem"/>
### listInventoryItemsByVariant
@@ -148,11 +148,11 @@ lists inventory items for a given variant
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listInventoryItemsByVariant"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listInventoryItemsByVariant"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"lidt of inventory items for the variant","expandable":false,"children":[]}]} sectionTitle="listInventoryItemsByVariant"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[InventoryItemDTO](../../medusa/types/medusa.InventoryItemDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"lidt of inventory items for the variant","expandable":false,"children":[]}]} sectionTitle="listInventoryItemsByVariant"/>
### attachInventoryItem
@@ -162,21 +162,21 @@ Attach a variant to an inventory item
#### Parameters
<ParameterTypes parameters={[{"name":"attachments","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
<TypeList types={[{"name":"attachments","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the variant inventory item","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the variant inventory item","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
`**attachInventoryItem**(variantId, inventoryItemId, requiredQuantity?): Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;`
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventoryItemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiredQuantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventoryItemId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requiredQuantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="attachInventoryItem"/>
### detachInventoryItem
@@ -184,11 +184,11 @@ Remove a variant from an inventory item
#### Parameters
<ParameterTypes parameters={[{"name":"inventoryItemId","type":"`string`","description":"inventory item id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"variant id or undefined if all the variants will be affected","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="detachInventoryItem"/>
<TypeList types={[{"name":"inventoryItemId","type":"`string`","description":"inventory item id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"variant id or undefined if all the variants will be affected","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="detachInventoryItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Remove a variant from an inventory item","expandable":false,"children":[]}]} sectionTitle="detachInventoryItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Remove a variant from an inventory item","expandable":false,"children":[]}]} sectionTitle="detachInventoryItem"/>
### reserveQuantity
@@ -196,11 +196,11 @@ Reserves a quantity of a variant
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to reserve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`ReserveQuantityContext`","description":"optional parameters","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="reserveQuantity"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to reserve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`ReserveQuantityContext`","description":"optional parameters","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="reserveQuantity"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [ReservationItemDTO](../../medusa/types/medusa.ReservationItemDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"Reserves a quantity of a variant","expandable":false,"children":[]}]} sectionTitle="reserveQuantity"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [ReservationItemDTO](../../medusa/types/medusa.ReservationItemDTO.mdx)[]&#62;","optional":false,"defaultValue":"","description":"Reserves a quantity of a variant","expandable":false,"children":[]}]} sectionTitle="reserveQuantity"/>
### adjustReservationsQuantityByLineItem
@@ -208,11 +208,11 @@ Adjusts the quantity of reservations for a line item by a given amount.
#### Parameters
<ParameterTypes parameters={[{"name":"lineItemId","type":"`string`","description":"The ID of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"The ID of the variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the location to prefer adjusting quantities at","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The amount to adjust the quantity by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustReservationsQuantityByLineItem"/>
<TypeList types={[{"name":"lineItemId","type":"`string`","description":"The ID of the line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"The ID of the variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the location to prefer adjusting quantities at","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The amount to adjust the quantity by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustReservationsQuantityByLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Adjusts the quantity of reservations for a line item by a given amount.","expandable":false,"children":[]}]} sectionTitle="adjustReservationsQuantityByLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Adjusts the quantity of reservations for a line item by a given amount.","expandable":false,"children":[]}]} sectionTitle="adjustReservationsQuantityByLineItem"/>
### validateInventoryAtLocation
@@ -220,11 +220,11 @@ Validate stock at a location for fulfillment items
#### Parameters
<ParameterTypes parameters={[{"name":"items","type":"Omit&#60;[LineItem](../../entities/classes/entities.LineItem.mdx), \"beforeInsert\"&#62;[]","description":"Fulfillment Line items to validate quantities for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"Location to validate stock at","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateInventoryAtLocation"/>
<TypeList types={[{"name":"items","type":"Omit&#60;[LineItem](../../entities/classes/entities.LineItem.mdx), \"beforeInsert\"&#62;[]","description":"Fulfillment Line items to validate quantities for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"Location to validate stock at","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateInventoryAtLocation"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"nothing if successful, throws error if not","expandable":false,"children":[]}]} sectionTitle="validateInventoryAtLocation"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"nothing if successful, throws error if not","expandable":false,"children":[]}]} sectionTitle="validateInventoryAtLocation"/>
### deleteReservationsByLineItem
@@ -232,11 +232,11 @@ delete a reservation of variant quantity
#### Parameters
<ParameterTypes parameters={[{"name":"lineItemId","type":"`string` \\| `string`[]","description":"line item id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to release","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteReservationsByLineItem"/>
<TypeList types={[{"name":"lineItemId","type":"`string` \\| `string`[]","description":"line item id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to release","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteReservationsByLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"delete a reservation of variant quantity","expandable":false,"children":[]}]} sectionTitle="deleteReservationsByLineItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"delete a reservation of variant quantity","expandable":false,"children":[]}]} sectionTitle="deleteReservationsByLineItem"/>
### adjustInventory
@@ -244,41 +244,41 @@ Adjusts inventory of a variant on a location
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"location id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to adjust","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustInventory"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"location id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"quantity to adjust","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="adjustInventory"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Adjusts inventory of a variant on a location","expandable":false,"children":[]}]} sectionTitle="adjustInventory"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Adjusts inventory of a variant on a location","expandable":false,"children":[]}]} sectionTitle="adjustInventory"/>
### setVariantAvailability
#### Parameters
<ParameterTypes parameters={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[] \\| [PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"availabilityContext","type":"`AvailabilityContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setVariantAvailability"/>
<TypeList types={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[] \\| [PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"availabilityContext","type":"`AvailabilityContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setVariantAvailability"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[] \\| [PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setVariantAvailability"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[] \\| [PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setVariantAvailability"/>
### getAvailabilityContext
#### Parameters
<ParameterTypes parameters={[{"name":"variants","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"existingContext","type":"`AvailabilityContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getAvailabilityContext"/>
<TypeList types={[{"name":"variants","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"existingContext","type":"`AvailabilityContext`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getAvailabilityContext"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Required&#60;AvailabilityContext&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getAvailabilityContext"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Required&#60;AvailabilityContext&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getAvailabilityContext"/>
### setProductAvailability
#### Parameters
<ParameterTypes parameters={[{"name":"products","type":"([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setProductAvailability"/>
<TypeList types={[{"name":"products","type":"([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`undefined` \\| `string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setProductAvailability"/>
#### 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="setProductAvailability"/>
<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="setProductAvailability"/>
### getVariantQuantityFromVariantInventoryItems
@@ -289,8 +289,8 @@ the given variant.
#### Parameters
<ParameterTypes parameters={[{"name":"variantInventoryItems","type":"[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]","description":"List of inventoryItems for a given variant, These must all be for the same variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"channelId","type":"`string`","description":"Sales channel id to fetch availability for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getVariantQuantityFromVariantInventoryItems"/>
<TypeList types={[{"name":"variantInventoryItems","type":"[ProductVariantInventoryItem](../../entities/classes/entities.ProductVariantInventoryItem.mdx)[]","description":"List of inventoryItems for a given variant, These must all be for the same variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"channelId","type":"`string`","description":"Sales channel id to fetch availability for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getVariantQuantityFromVariantInventoryItems"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"The available quantity of the variant from the inventoryItems","expandable":false,"children":[]}]} sectionTitle="getVariantQuantityFromVariantInventoryItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"The available quantity of the variant from the inventoryItems","expandable":false,"children":[]}]} sectionTitle="getVariantQuantityFromVariantInventoryItems"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ProductVariantService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productVariantRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.regionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.moneyAmountRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productOptionValueRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.cartRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.priceSelectionStrategy","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductVariantService"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productVariantRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.regionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.moneyAmountRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productOptionValueRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.cartRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.priceSelectionStrategy","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ProductVariantService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.deleted\"","expandable":false,"children":[]},{"name":"productVariantRepository_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.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":"moneyAmountRepository_","type":"Repository&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productOptionValueRepository_","type":"Repository&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","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="ProductVariantService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"product-variant.deleted\"","expandable":false,"children":[]},{"name":"productVariantRepository_","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.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":"moneyAmountRepository_","type":"Repository&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productOptionValueRepository_","type":"Repository&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRepository_","type":"Repository&#60;[Cart](../../entities/classes/entities.Cart.mdx)&#62; & `object`","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="ProductVariantService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve
@@ -76,11 +76,11 @@ Gets a product variant by id.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of the product to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"the product document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"the product document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveBySKU
@@ -88,11 +88,11 @@ Gets a product variant by id.
#### Parameters
<ParameterTypes parameters={[{"name":"sku","type":"`string`","description":"The unique stock keeping unit used to identify the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveBySKU"/>
<TypeList types={[{"name":"sku","type":"`string`","description":"The unique stock keeping unit used to identify the product variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveBySKU"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"the product document.","expandable":false,"children":[]}]} sectionTitle="retrieveBySKU"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"the product document.","expandable":false,"children":[]}]} sectionTitle="retrieveBySKU"/>
### create
@@ -101,15 +101,15 @@ to ensure that the variant can in fact be created.
#### Type Parameters
<ParameterTypes parameters={[{"name":"TVariants","type":"`CreateProductVariantInput` \\| `CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TOutput","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"TVariants","type":"`CreateProductVariantInput` \\| `CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TOutput","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Parameters
<ParameterTypes parameters={[{"name":"productOrProductId","type":"`string` \\| [Product](../../entities/classes/entities.Product.mdx)","description":"the product the variant will be added to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`CreateProductVariantInput` \\| `CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"productOrProductId","type":"`string` \\| [Product](../../entities/classes/entities.Product.mdx)","description":"the product the variant will be added to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`CreateProductVariantInput` \\| `CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TOutput&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TOutput&#62;","optional":false,"defaultValue":"","description":"resolves to the creation result.","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -119,11 +119,11 @@ Updates a collection of variant.
#### Parameters
<ParameterTypes parameters={[{"name":"variantData","type":"`object`[]","description":"a collection of variant and the data to update.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"variantData","type":"`object`[]","description":"a collection of variant and the data to update.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
`**update**(variantOrVariantId, update): Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;`
@@ -133,31 +133,31 @@ The function will throw, if price updates are attempted.
#### Parameters
<ParameterTypes parameters={[{"name":"variantOrVariantId","type":"`string` \\| Partial&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"variant or id of a variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductVariantInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"variantOrVariantId","type":"`string` \\| Partial&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"variant or id of a variant.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductVariantInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
`**update**(variantOrVariantId, update): Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;`
#### Parameters
<ParameterTypes parameters={[{"name":"variantOrVariantId","type":"`string` \\| Partial&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductVariantInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"variantOrVariantId","type":"`string` \\| Partial&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateProductVariantInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### updateBatch
#### Parameters
<ParameterTypes parameters={[{"name":"variantData","type":"`UpdateProductVariantData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBatch"/>
<TypeList types={[{"name":"variantData","type":"`UpdateProductVariantData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateBatch"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateBatch"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateBatch"/>
### updateVariantPrices
@@ -168,11 +168,11 @@ Deletes any prices that are not in the update object, and is not associated with
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`UpdateVariantPricesData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
<TypeList types={[{"name":"data","type":"`UpdateVariantPricesData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
`**updateVariantPrices**(variantId, prices): Promise&#60;void&#62;`
@@ -181,41 +181,41 @@ Deletes any prices that are not in the update object, and is not associated with
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"`ProductVariantPrice`[]","description":"the update prices","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"`ProductVariantPrice`[]","description":"the update prices","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="updateVariantPrices"/>
### updateVariantPricesBatch
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`UpdateVariantPricesData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPricesBatch"/>
<TypeList types={[{"name":"data","type":"`UpdateVariantPricesData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPricesBatch"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPricesBatch"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateVariantPricesBatch"/>
### upsertRegionPrices
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`UpdateVariantRegionPriceData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertRegionPrices"/>
<TypeList types={[{"name":"data","type":"`UpdateVariantRegionPriceData`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertRegionPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertRegionPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertRegionPrices"/>
### upsertCurrencyPrices
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertCurrencyPrices"/>
<TypeList types={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="upsertCurrencyPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCurrencyPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="upsertCurrencyPrices"/>
### getRegionPrice
@@ -225,21 +225,21 @@ currency price exists the function will throw an error.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of the variant to get price from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GetRegionPriceContext`","description":"context for getting region price","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionPrice"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of the variant to get price from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`GetRegionPriceContext`","description":"context for getting region price","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionPrice"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| number&#62;","optional":false,"defaultValue":"","description":"the price specific to the region","expandable":false,"children":[]}]} sectionTitle="getRegionPrice"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| number&#62;","optional":false,"defaultValue":"","description":"the price specific to the region","expandable":false,"children":[]}]} sectionTitle="getRegionPrice"/>
### setRegionPrice
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of the variant to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"`ProductVariantPrice`","description":"the price for the variant.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setRegionPrice"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of the variant to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"`ProductVariantPrice`","description":"the price for the variant.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setRegionPrice"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setRegionPrice"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setRegionPrice"/>
#### Deprecated
@@ -250,11 +250,11 @@ Sets the default price of a specific region
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of the variant to set prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"`ProductVariantPrice`","description":"the price for the variant","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setCurrencyPrice"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of the variant to set prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"`ProductVariantPrice`","description":"the price for the variant","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setCurrencyPrice"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setCurrencyPrice"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setCurrencyPrice"/>
#### Deprecated
@@ -268,11 +268,11 @@ Option value must be of type string or number.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionValue","type":"`string`","description":"option value to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateOptionValue"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionValue","type":"`string`","description":"option value to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateOptionValue"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="updateOptionValue"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="updateOptionValue"/>
### addOptionValue
@@ -284,11 +284,11 @@ Option value must be of type string or number.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionValue","type":"`string`","description":"option value to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addOptionValue"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionValue","type":"`string`","description":"option value to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addOptionValue"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="addOptionValue"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductOptionValue](../../entities/classes/entities.ProductOptionValue.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation.","expandable":false,"children":[]}]} sectionTitle="addOptionValue"/>
### deleteOptionValue
@@ -297,31 +297,31 @@ Will never fail due to delete being idempotent.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteOptionValue"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the variant to decorate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string`","description":"the option from product.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteOptionValue"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="deleteOptionValue"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="deleteOptionValue"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[FilterableProductVariantProps](../../product/interfaces/product.FilterableProductVariantProps.mdx)","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62; & [PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"query config object for variant retrieval","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### delete
@@ -330,11 +330,11 @@ Will never fail due to delete being idempotent.
#### Parameters
<ParameterTypes parameters={[{"name":"variantIds","type":"`string` \\| `string`[]","description":"the id of the variant to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"variantIds","type":"`string` \\| `string`[]","description":"the id of the variant to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"empty promise","expandable":false,"children":[]}]} sectionTitle="delete"/>
### isVariantInSalesChannels
@@ -342,11 +342,11 @@ Check if the variant is assigned to at least one of the provided sales channels.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"product variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelIds","type":"`string`[]","description":"an array of sales channel ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isVariantInSalesChannels"/>
<TypeList types={[{"name":"id","type":"`string`","description":"product variant id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelIds","type":"`string`[]","description":"an array of sales channel ids","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="isVariantInSalesChannels"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"Check if the variant is assigned to at least one of the provided sales channels.","expandable":false,"children":[]}]} sectionTitle="isVariantInSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"Check if the variant is assigned to at least one of the provided sales channels.","expandable":false,"children":[]}]} sectionTitle="isVariantInSalesChannels"/>
### getFreeTextQueryBuilder\_
@@ -355,18 +355,18 @@ variants that match the query.
#### Parameters
<ParameterTypes parameters={[{"name":"variantRepo","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"the variant repository","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithRelationsOptions`","description":"object that defines the scope for what should be returned","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"free text query","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFreeTextQueryBuilder_"/>
<TypeList types={[{"name":"variantRepo","type":"Repository&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","description":"the variant repository","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`FindWithRelationsOptions`","description":"object that defines the scope for what should be returned","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"free text query","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFreeTextQueryBuilder_"/>
#### Returns
<ParameterTypes parameters={[{"name":"SelectQueryBuilder","type":"SelectQueryBuilder&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"an array containing the products as the first element and the total\n count of products that matches the query as the second element.","expandable":false,"children":[]}]} sectionTitle="getFreeTextQueryBuilder_"/>
<TypeList types={[{"name":"SelectQueryBuilder","type":"SelectQueryBuilder&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)&#62;","optional":false,"defaultValue":"","description":"an array containing the products as the first element and the total\n count of products that matches the query as the second element.","expandable":false,"children":[]}]} sectionTitle="getFreeTextQueryBuilder_"/>
### validateVariantsToCreate\_
#### Parameters
<ParameterTypes parameters={[{"name":"product","type":"[Product](../../entities/classes/entities.Product.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateVariantsToCreate_"/>
<TypeList types={[{"name":"product","type":"[Product](../../entities/classes/entities.Product.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variants","type":"`CreateProductVariantInput`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateVariantsToCreate_"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateVariantsToCreate_"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateVariantsToCreate_"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# RegionService
@@ -12,13 +12,13 @@ Provides layer to manipulate regions.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new RegionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new RegionService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.deleted\"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionRepository_","type":"Repository&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countryRepository_","type":"Repository&#60;[Country](../../entities/classes/entities.Country.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderRepository_","type":"Repository&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderRepository_","type":"Repository&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderRepository_","type":"Repository&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)&#62;","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="RegionService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"region.deleted\"","expandable":false,"children":[]},{"name":"featureFlagRouter_","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionRepository_","type":"Repository&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countryRepository_","type":"Repository&#60;[Country](../../entities/classes/entities.Country.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderRepository_","type":"Repository&#60;[PaymentProvider](../../entities/classes/entities.PaymentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderRepository_","type":"Repository&#60;[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderRepository_","type":"Repository&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)&#62;","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="RegionService"/>
___
@@ -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,15 +62,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_"/>
### create
@@ -78,11 +78,11 @@ Creates a region.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateRegionInput`","description":"the unvalidated region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateRegionInput`","description":"the unvalidated region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created region","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created region","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -90,11 +90,11 @@ Updates a region
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateRegionInput`","description":"the data to update the region with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateRegionInput`","description":"the data to update the region with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="update"/>
### validateFields
@@ -103,15 +103,15 @@ the id can be passed to check that country updates are allowed.
#### Type Parameters
<ParameterTypes parameters={[{"name":"T","type":"`UpdateRegionInput` \\| `CreateRegionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
<TypeList types={[{"name":"T","type":"`UpdateRegionInput` \\| `CreateRegionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
#### Parameters
<ParameterTypes parameters={[{"name":"regionData","type":"Omit&#60;T, \"metadata\" \\| \"currency_code\"&#62;","description":"the region data to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"T extends `UpdateRegionInput` ? `string` : `undefined`","description":"optional id of the region to check against","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
<TypeList types={[{"name":"regionData","type":"Omit&#60;T, \"metadata\" \\| \"currency_code\"&#62;","description":"the region data to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"T extends `UpdateRegionInput` ? `string` : `undefined`","description":"optional id of the region to check against","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;DeepPartial&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"the validated region data","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;DeepPartial&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"the validated region data","expandable":false,"children":[]}]} sectionTitle="validateFields"/>
### validateTaxRate
@@ -119,11 +119,11 @@ Validates a tax rate. Will throw if the tax rate is not between 0 and 1.
#### Parameters
<ParameterTypes parameters={[{"name":"taxRate","type":"`number`","description":"a number representing the tax rate of the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateTaxRate"/>
<TypeList types={[{"name":"taxRate","type":"`number`","description":"a number representing the tax rate of the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateTaxRate"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="validateTaxRate"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="validateTaxRate"/>
#### Throws
@@ -135,11 +135,11 @@ Validates a currency code. Will throw if the currency code doesn't exist.
#### Parameters
<ParameterTypes parameters={[{"name":"currencyCode","type":"`string`","description":"an ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCurrency"/>
<TypeList types={[{"name":"currencyCode","type":"`string`","description":"an ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCurrency"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="validateCurrency"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"void","expandable":false,"children":[]}]} sectionTitle="validateCurrency"/>
#### Throws
@@ -152,11 +152,11 @@ existence.
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the id of the current region to check against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCountry"/>
<TypeList types={[{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the id of the current region to check against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCountry"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Country](../../entities/classes/entities.Country.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated Country","expandable":false,"children":[]}]} sectionTitle="validateCountry"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Country](../../entities/classes/entities.Country.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated Country","expandable":false,"children":[]}]} sectionTitle="validateCountry"/>
### retrieveByCountryCode
@@ -164,11 +164,11 @@ Retrieve a region by country code.
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"region find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCountryCode"/>
<TypeList types={[{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"region find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByCountryCode"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"a Region with country code","expandable":false,"children":[]}]} sectionTitle="retrieveByCountryCode"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"a Region with country code","expandable":false,"children":[]}]} sectionTitle="retrieveByCountryCode"/>
### retrieveByName
@@ -176,11 +176,11 @@ Retrieves a region by name.
#### Parameters
<ParameterTypes parameters={[{"name":"name","type":"`string`","description":"the name of the region to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"name","type":"`string`","description":"the name of the region to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"region with the matching name","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"region with the matching name","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
### retrieve
@@ -188,11 +188,11 @@ Retrieves a region by its id.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the id of the region to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the id of the region to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the region","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the region","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### list
@@ -200,11 +200,11 @@ Lists all regions based on a query
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)[]&#62;","optional":false,"defaultValue":"","description":"result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)[]&#62;","optional":false,"defaultValue":"","description":"result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -212,11 +212,11 @@ Lists all regions based on a query and returns them along with count
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62; & `object`","description":"query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62; & `object`","description":"query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","description":"configuration settings","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Region](../../entities/classes/entities.Region.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Region](../../entities/classes/entities.Region.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### delete
@@ -224,11 +224,11 @@ Deletes a region.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addCountry
@@ -236,11 +236,11 @@ Adds a country to the region.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to add a country to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCountry"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to add a country to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCountry"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addCountry"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addCountry"/>
### removeCountry
@@ -248,11 +248,11 @@ Removes a country from a Region.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCountry"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to remove from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"a 2 digit alphanumeric ISO country code to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCountry"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removeCountry"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removeCountry"/>
### addPaymentProvider
@@ -261,11 +261,11 @@ provider doesn't exist.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to add the provider to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to add to the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPaymentProvider"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to add the provider to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to add to the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addPaymentProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addPaymentProvider"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addPaymentProvider"/>
### addFulfillmentProvider
@@ -274,11 +274,11 @@ provider doesn't exist.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to add the provider to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to add to the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addFulfillmentProvider"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to add the provider to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to add to the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addFulfillmentProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addFulfillmentProvider"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="addFulfillmentProvider"/>
### removePaymentProvider
@@ -286,11 +286,11 @@ Removes a payment provider from a region. Is idempotent.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to remove the provider from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to remove from the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removePaymentProvider"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to remove the provider from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to remove from the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removePaymentProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removePaymentProvider"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removePaymentProvider"/>
### removeFulfillmentProvider
@@ -298,8 +298,8 @@ Removes a fulfillment provider from a region. Is idempotent.
#### Parameters
<ParameterTypes parameters={[{"name":"regionId","type":"`string`","description":"the region to remove the provider from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to remove from the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFulfillmentProvider"/>
<TypeList types={[{"name":"regionId","type":"`string`","description":"the region to remove the provider from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"providerId","type":"`string`","description":"the provider to remove from the region","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFulfillmentProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removeFulfillmentProvider"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Region](../../entities/classes/entities.Region.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Region","expandable":false,"children":[]}]} sectionTitle="removeFulfillmentProvider"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ReturnReasonService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ReturnReasonService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ReturnReasonService"/>
___
## 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":"retReasonRepo_","type":"Repository&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","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="ReturnReasonService"/>
<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":"retReasonRepo_","type":"Repository&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","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="ReturnReasonService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,45 +60,45 @@ 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_"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateReturnReason`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateReturnReason`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateReturnReason`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateReturnReason`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieve
@@ -106,18 +106,18 @@ Gets an order by id.
#### Parameters
<ParameterTypes parameters={[{"name":"returnReasonId","type":"`string`","description":"id of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"returnReasonId","type":"`string`","description":"id of order to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","description":"config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ReturnReason](../../entities/classes/entities.ReturnReason.mdx)&#62;","optional":false,"defaultValue":"","description":"the order document","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"returnReasonId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"returnReasonId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ReturnService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ReturnService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ReturnService"/>
___
## 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":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnRepository_","type":"Repository&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnItemRepository_","type":"Repository&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnReasonService_","type":"[ReturnReasonService](services.ReturnReasonService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="ReturnService"/>
<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":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnRepository_","type":"Repository&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnItemRepository_","type":"Repository&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentProviderService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnReasonService_","type":"[ReturnReasonService](services.ReturnReasonService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="ReturnService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### getFulfillmentItems
@@ -76,31 +76,31 @@ Retrieves the order line items, given an array of items
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[OrdersReturnItem](../../medusa/classes/medusa.OrdersReturnItem.mdx)[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transformer","type":"`Transformer`","description":"a function to apply to each of the items\n retrieved from the order, should return a line item. If the transformer\n returns an undefined value the line item will be filtered from the\n returned array.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get line items from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[OrdersReturnItem](../../medusa/classes/medusa.OrdersReturnItem.mdx)[]","description":"the items to get","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transformer","type":"`Transformer`","description":"a function to apply to each of the items\n retrieved from the order, should return a line item. If the transformer\n returns an undefined value the line item will be filtered from the\n returned array.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx) & object[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineItem](../../entities/classes/entities.LineItem.mdx) & object[]&#62;","optional":false,"defaultValue":"","description":"the line items generated by the transformer.","expandable":false,"children":[]}]} sectionTitle="getFulfillmentItems"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Return](../../entities/classes/entities.Return.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Return](../../entities/classes/entities.Return.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### cancel
@@ -108,11 +108,11 @@ Cancels a return if possible. Returns can be canceled if it has not been receive
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"the id of the return to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"the id of the return to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Return","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated Return","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### validateReturnStatuses
@@ -122,11 +122,11 @@ payment\_status must be captured.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to check statuses on","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateReturnStatuses"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to check statuses on","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateReturnStatuses"/>
#### Returns
<ParameterTypes parameters={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Checks that an order has the statuses necessary to complete a return.\nfulfillment\\_status cannot be not\\_fulfilled or returned.\npayment\\_status must be captured.","expandable":false,"children":[]}]} sectionTitle="validateReturnStatuses"/>
<TypeList types={[{"name":"void","type":"`void`","optional":false,"defaultValue":"","description":"Checks that an order has the statuses necessary to complete a return.\nfulfillment\\_status cannot be not\\_fulfilled or returned.\npayment\\_status must be captured.","expandable":false,"children":[]}]} sectionTitle="validateReturnStatuses"/>
#### Throws
@@ -140,11 +140,11 @@ the quantity that is requested to be returned.
#### Parameters
<ParameterTypes parameters={[{"name":"quantity","type":"`number`","description":"the quantity that is requested to be returned.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"additional","type":"`object`","description":"the quantity that is requested to be returned.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient returnable\n quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"additional.reason_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"additional.note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateReturnLineItem"/>
<TypeList types={[{"name":"quantity","type":"`number`","description":"the quantity that is requested to be returned.","optional":false,"defaultValue":"0","expandable":false,"children":[]},{"name":"additional","type":"`object`","description":"the quantity that is requested to be returned.","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"item","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to check has sufficient returnable\n quantity.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"additional.reason_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"additional.note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateReturnLineItem"/>
#### Returns
<ParameterTypes parameters={[{"name":"DeepPartial","type":"DeepPartial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"a line item where the quantity is set to the requested\n return quantity.","expandable":false,"children":[]}]} sectionTitle="validateReturnLineItem"/>
<TypeList types={[{"name":"DeepPartial","type":"DeepPartial&#60;[LineItem](../../entities/classes/entities.LineItem.mdx)&#62;","optional":false,"defaultValue":"","description":"a line item where the quantity is set to the requested\n return quantity.","expandable":false,"children":[]}]} sectionTitle="validateReturnLineItem"/>
### retrieve
@@ -152,31 +152,31 @@ Retrieves a return by its id.
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"the id of the return to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"the id of the return to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","description":"the config object","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the return","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the return","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveBySwap
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveBySwap"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveBySwap"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveBySwap"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveBySwap"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateReturnInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateReturnInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### create
@@ -186,21 +186,21 @@ the return lines and the shipping cost.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateReturnInput`","description":"data to use for the return e.g. shipping\\_method,\n items or refund\\_amount","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateReturnInput`","description":"data to use for the return e.g. shipping\\_method,\n items or refund\\_amount","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the created return","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the created return","expandable":false,"children":[]}]} sectionTitle="create"/>
### fulfill
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="fulfill"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="fulfill"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="fulfill"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="fulfill"/>
### receive
@@ -214,8 +214,8 @@ mismatches.
#### Parameters
<ParameterTypes parameters={[{"name":"returnId","type":"`string`","description":"the orderId to return to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"receivedItems","type":"[OrdersReturnItem](../../medusa/classes/medusa.OrdersReturnItem.mdx)[]","description":"the items received after return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allowMismatch","type":"`boolean`","description":"whether to ignore return/received\nproduct mismatch","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"refundAmount","type":"`number`","description":"the amount to return","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context.locationId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="receive"/>
<TypeList types={[{"name":"returnId","type":"`string`","description":"the orderId to return to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"receivedItems","type":"[OrdersReturnItem](../../medusa/classes/medusa.OrdersReturnItem.mdx)[]","description":"the items received after return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allowMismatch","type":"`boolean`","description":"whether to ignore return/received\nproduct mismatch","optional":false,"defaultValue":"false","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"refundAmount","type":"`number`","description":"the amount to return","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context.locationId","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="receive"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="receive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Return](../../entities/classes/entities.Return.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="receive"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SalesChannelInventoryService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelInventoryService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelInventoryService"/>
___
## 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":"salesChannelLocationService_","type":"[SalesChannelLocationService](services.SalesChannelLocationService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","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="SalesChannelInventoryService"/>
<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":"salesChannelLocationService_","type":"[SalesChannelLocationService](services.SalesChannelLocationService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","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="SalesChannelInventoryService"/>
___
@@ -26,13 +26,13 @@ ___
#### 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_"/>
### inventoryService\_
#### Returns
<ParameterTypes parameters={[{"name":"IInventoryService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
<TypeList types={[{"name":"IInventoryService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="inventoryService_"/>
___
@@ -42,21 +42,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\_
@@ -66,15 +66,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_"/>
### retrieveAvailableItemQuantity
@@ -82,8 +82,8 @@ Retrieves the available quantity of an item across all sales channel locations
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"Sales channel id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventoryItemId","type":"`string`","description":"Item id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveAvailableItemQuantity"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"Sales channel id","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventoryItemId","type":"`string`","description":"Item id","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveAvailableItemQuantity"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"available quantity of item across all sales channel locations","expandable":false,"children":[]}]} sectionTitle="retrieveAvailableItemQuantity"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"available quantity of item across all sales channel locations","expandable":false,"children":[]}]} sectionTitle="retrieveAvailableItemQuantity"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SalesChannelLocationService
@@ -12,13 +12,13 @@ Service for managing the stock locations of sales channels
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelLocationService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelLocationService"/>
___
## 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":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","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="SalesChannelLocationService"/>
<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":"salesChannelService_","type":"[SalesChannelService](services.SalesChannelService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","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="SalesChannelLocationService"/>
___
@@ -28,13 +28,13 @@ ___
#### 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_"/>
### stockLocationService\_
#### Returns
<ParameterTypes parameters={[{"name":"IStockLocationService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="stockLocationService_"/>
<TypeList types={[{"name":"IStockLocationService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="stockLocationService_"/>
___
@@ -44,21 +44,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\_
@@ -68,15 +68,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_"/>
### removeLocation
@@ -84,11 +84,11 @@ Removes an association between a sales channel and a stock location.
#### Parameters
<ParameterTypes parameters={[{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`string`","description":"The ID of the sales channel or undefined if all the sales channel will be affected.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLocation"/>
<TypeList types={[{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"salesChannelId","type":"`string`","description":"The ID of the sales channel or undefined if all the sales channel will be affected.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeLocation"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"A promise that resolves when the association has been removed.","expandable":false,"children":[]}]} sectionTitle="removeLocation"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"A promise that resolves when the association has been removed.","expandable":false,"children":[]}]} sectionTitle="removeLocation"/>
### associateLocation
@@ -96,11 +96,11 @@ Associates a sales channel with a stock location.
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="associateLocation"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="associateLocation"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"A promise that resolves when the association has been created.","expandable":false,"children":[]}]} sectionTitle="associateLocation"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"A promise that resolves when the association has been created.","expandable":false,"children":[]}]} sectionTitle="associateLocation"/>
### listLocationIds
@@ -108,11 +108,11 @@ Lists the stock locations associated with a sales channel.
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string` \\| `string`[]","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listLocationIds"/>
<TypeList types={[{"name":"salesChannelId","type":"`string` \\| `string`[]","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listLocationIds"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with an array of location IDs.","expandable":false,"children":[]}]} sectionTitle="listLocationIds"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with an array of location IDs.","expandable":false,"children":[]}]} sectionTitle="listLocationIds"/>
### listSalesChannelIds
@@ -120,8 +120,8 @@ Lists the sales channels associated with a stock location.
#### Parameters
<ParameterTypes parameters={[{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listSalesChannelIds"/>
<TypeList types={[{"name":"locationId","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listSalesChannelIds"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with an array of sales channel IDs.","expandable":false,"children":[]}]} sectionTitle="listSalesChannelIds"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"A promise that resolves with an array of sales channel IDs.","expandable":false,"children":[]}]} sectionTitle="listSalesChannelIds"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SalesChannelService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SalesChannelService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.deleted\"","expandable":false,"children":[]},{"name":"salesChannelRepository_","type":"Repository&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.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="SalesChannelService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.updated\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.created\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"sales_channel.deleted\"","expandable":false,"children":[]},{"name":"salesChannelRepository_","type":"Repository&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBusService_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"storeService_","type":"[StoreService](services.StoreService.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="SalesChannelService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,15 +60,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_"/>
### retrieve\_
@@ -76,11 +76,11 @@ A generic retrieve used to find a sales channel by different attributes.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"SC selector","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"SC selector","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"a single SC matching the query or throws","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"a single SC matching the query or throws","expandable":false,"children":[]}]} sectionTitle="retrieve_"/>
### retrieve
@@ -88,11 +88,11 @@ Retrieve a SalesChannel by id
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"id of the channel to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"SC config\n This feature is under development and may change in the future.\nTo use this feature please enable the corresponding feature flag in your medusa backend project.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"id of the channel to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"SC config\n This feature is under development and may change in the future.\nTo use this feature please enable the corresponding feature flag in your medusa backend project.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"a sales channel","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"a sales channel","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByName
@@ -100,11 +100,11 @@ Find a sales channel by name.
#### Parameters
<ParameterTypes parameters={[{"name":"name","type":"`string`","description":"of the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"name","type":"`string`","description":"of the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"find config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;unknown&#62;","optional":false,"defaultValue":"","description":"a sales channel with matching name","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;unknown&#62;","optional":false,"defaultValue":"","description":"a sales channel with matching name","expandable":false,"children":[]}]} sectionTitle="retrieveByName"/>
### listAndCount
@@ -113,11 +113,11 @@ sales channels that match the query.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the sales channels as\n the first element and the total count of sales channels that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"an array containing the sales channels as\n the first element and the total count of sales channels that matches the query\n as the second element.","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### list
@@ -125,11 +125,11 @@ Lists sales channels based on the provided parameters.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[QuerySelector](../../medusa/types/medusa.QuerySelector.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[]&#62;","optional":false,"defaultValue":"","description":"an array containing the sales channels","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)[]&#62;","optional":false,"defaultValue":"","description":"an array containing the sales channels","expandable":false,"children":[]}]} sectionTitle="list"/>
### create
@@ -140,21 +140,21 @@ To use this feature please enable the corresponding feature flag in your medusa
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateSalesChannelInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateSalesChannelInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the created channel","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the created channel","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;CreateSalesChannelInput&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"Partial&#60;CreateSalesChannelInput&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -164,11 +164,11 @@ To use this feature please enable the corresponding feature flag in your medusa
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"the id of the sales channel to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"the id of the sales channel to delete","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes a sales channel from\n This feature is under development and may change in the future.\nTo use this feature please enable the corresponding feature flag in your medusa backend project.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Deletes a sales channel from\n This feature is under development and may change in the future.\nTo use this feature please enable the corresponding feature flag in your medusa backend project.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### createDefault
@@ -176,7 +176,7 @@ Creates a default sales channel, if this does not already exist.
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel","expandable":false,"children":[]}]} sectionTitle="createDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel","expandable":false,"children":[]}]} sectionTitle="createDefault"/>
### retrieveDefault
@@ -184,7 +184,7 @@ Retrieves the default sales channel.
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel","expandable":false,"children":[]}]} sectionTitle="retrieveDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel","expandable":false,"children":[]}]} sectionTitle="retrieveDefault"/>
### listProductIdsBySalesChannelIds
@@ -192,11 +192,11 @@ List all product ids that belongs to the sales channels ids
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listProductIdsBySalesChannelIds"/>
<TypeList types={[{"name":"salesChannelIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listProductIdsBySalesChannelIds"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"List all product ids that belongs to the sales channels ids","expandable":false,"children":[]}]} sectionTitle="listProductIdsBySalesChannelIds"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"List all product ids that belongs to the sales channels ids","expandable":false,"children":[]}]} sectionTitle="listProductIdsBySalesChannelIds"/>
### removeProducts
@@ -204,11 +204,11 @@ Remove a batch of product from a sales channel
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"The id of the sales channel on which to remove the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to remove from the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"The id of the sales channel on which to remove the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to remove from the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel on which the products have been removed","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel on which the products have been removed","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
### addProducts
@@ -216,8 +216,8 @@ Add a batch of product to a sales channel
#### Parameters
<ParameterTypes parameters={[{"name":"salesChannelId","type":"`string`","description":"The id of the sales channel on which to add the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to attach to the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"salesChannelId","type":"`string`","description":"The id of the sales channel on which to add the products","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string`[]","description":"The products ids to attach to the sales channel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel on which the products have been added","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)&#62;","optional":false,"defaultValue":"","description":"the sales channel on which the products have been added","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SearchService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SearchService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SearchService"/>
___
## Properties
<ParameterTypes parameters={[{"name":"isDefault","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options_","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SearchService"/>
<TypeList types={[{"name":"isDefault","type":"`boolean`","description":"","optional":false,"defaultValue":"true","expandable":false,"children":[]},{"name":"logger_","type":"[Logger](../../medusa/types/medusa.Logger.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options_","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SearchService"/>
___
@@ -26,78 +26,78 @@ ___
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createIndex"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createIndex"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createIndex"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createIndex"/>
### getIndex
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getIndex"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getIndex"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getIndex"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getIndex"/>
### addDocuments
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documents","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addDocuments"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documents","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addDocuments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addDocuments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addDocuments"/>
### replaceDocuments
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documents","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="replaceDocuments"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documents","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="replaceDocuments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="replaceDocuments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="replaceDocuments"/>
### deleteDocument
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"document_id","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteDocument"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"document_id","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteDocument"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteDocument"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteDocument"/>
### deleteAllDocuments
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteAllDocuments"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteAllDocuments"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteAllDocuments"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deleteAllDocuments"/>
### search
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="search"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="search"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="search"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="search"/>
### updateSettings
#### Parameters
<ParameterTypes parameters={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"settings","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSettings"/>
<TypeList types={[{"name":"indexName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"settings","type":"`unknown`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateSettings"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateSettings"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updateSettings"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ShippingOptionService
@@ -12,13 +12,13 @@ Provides layer to manipulate profiles.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ShippingOptionService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ShippingOptionService"/>
___
## 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":"providerService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requirementRepository_","type":"Repository&#60;[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionRepository_","type":"Repository&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","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="ShippingOptionService"/>
<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":"providerService_","type":"[FulfillmentProviderService](services.FulfillmentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService_","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requirementRepository_","type":"Repository&#60;[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionRepository_","type":"Repository&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodRepository_","type":"Repository&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","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="ShippingOptionService"/>
___
@@ -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,15 +62,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_"/>
### validateRequirement\_
@@ -78,31 +78,31 @@ Validates a requirement
#### Parameters
<ParameterTypes parameters={[{"name":"requirement","type":"`ValidateRequirementTypeInput`","description":"the requirement to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`undefined` \\| `string`","description":"the id to validate the requirement","optional":false,"defaultValue":"undefined","expandable":false,"children":[]}]} sectionTitle="validateRequirement_"/>
<TypeList types={[{"name":"requirement","type":"`ValidateRequirementTypeInput`","description":"the requirement to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`undefined` \\| `string`","description":"the id to validate the requirement","optional":false,"defaultValue":"undefined","expandable":false,"children":[]}]} sectionTitle="validateRequirement_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","optional":false,"defaultValue":"","description":"a validated shipping requirement","expandable":false,"children":[]}]} sectionTitle="validateRequirement_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","optional":false,"defaultValue":"","description":"a validated shipping requirement","expandable":false,"children":[]}]} sectionTitle="validateRequirement_"/>
### list
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"config object","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### retrieve
@@ -111,11 +111,11 @@ Throws in case of DB Error and if profile was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`any`","description":"the id of the profile to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"the options to get a profile","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"optionId","type":"`any`","description":"the id of the profile to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","description":"the options to get a profile","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the profile document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the profile document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### updateShippingMethod
@@ -124,11 +124,11 @@ and its methods should be copied to an order/swap entity.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the id of the shipping method to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`ShippingMethodUpdate`","description":"the values to update the method with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingMethod"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the id of the shipping method to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`ShippingMethodUpdate`","description":"the values to update the method with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingMethod"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;undefined \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting shipping method","expandable":false,"children":[]}]} sectionTitle="updateShippingMethod"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;undefined \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting shipping method","expandable":false,"children":[]}]} sectionTitle="updateShippingMethod"/>
### deleteShippingMethods
@@ -136,11 +136,11 @@ Removes a given shipping method
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx) \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"the shipping method to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
<TypeList types={[{"name":"shippingMethods","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx) \\| [ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]","description":"the shipping method to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]&#62;","optional":false,"defaultValue":"","description":"removed shipping methods","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]&#62;","optional":false,"defaultValue":"","description":"removed shipping methods","expandable":false,"children":[]}]} sectionTitle="deleteShippingMethods"/>
### createShippingMethod
@@ -148,11 +148,11 @@ Creates a shipping method for a given cart.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"the id of the option to use for the method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the optional provider data to use.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShippingMethodDto`","description":"the cart to create the shipping method for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShippingMethod"/>
<TypeList types={[{"name":"optionId","type":"`string`","description":"the id of the option to use for the method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the optional provider data to use.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShippingMethodDto`","description":"the cart to create the shipping method for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShippingMethod"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting shipping method.","expandable":false,"children":[]}]} sectionTitle="createShippingMethod"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting shipping method.","expandable":false,"children":[]}]} sectionTitle="createShippingMethod"/>
### validateCartOption
@@ -162,21 +162,21 @@ match, or when the shipping option requirements are not satisfied.
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the option object to check","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object to check against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCartOption"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the option object to check","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart object to check against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateCartOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated shipping option","expandable":false,"children":[]}]} sectionTitle="validateCartOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated shipping option","expandable":false,"children":[]}]} sectionTitle="validateCartOption"/>
### validateAndMutatePrice
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx) \\| `CreateShippingOptionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceInput","type":"`ValidatePriceTypeAndAmountInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateAndMutatePrice"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx) \\| `CreateShippingOptionInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceInput","type":"`ValidatePriceTypeAndAmountInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validateAndMutatePrice"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;CreateShippingOptionInput \\| Omit&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx), \"beforeInsert\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateAndMutatePrice"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;CreateShippingOptionInput \\| Omit&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx), \"beforeInsert\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="validateAndMutatePrice"/>
### create
@@ -186,11 +186,11 @@ defaults to false.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateShippingOptionInput`","description":"the data to create shipping options","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateShippingOptionInput`","description":"the data to create shipping options","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### validatePriceType\_
@@ -198,11 +198,11 @@ Validates a shipping option price
#### Parameters
<ParameterTypes parameters={[{"name":"priceType","type":"[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)","description":"the price to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the option to validate against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validatePriceType_"/>
<TypeList types={[{"name":"priceType","type":"[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)","description":"the price to validate","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the option to validate against","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="validatePriceType_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated price","expandable":false,"children":[]}]} sectionTitle="validatePriceType_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)&#62;","optional":false,"defaultValue":"","description":"the validated price","expandable":false,"children":[]}]} sectionTitle="validatePriceType_"/>
### update
@@ -212,11 +212,11 @@ will throw errors if metadata or product updates are attempted.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"the id of the option. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateShippingOptionInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"optionId","type":"`string`","description":"the id of the option. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateShippingOptionInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -224,11 +224,11 @@ Deletes a profile with a given profile id.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"the id of the profile to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"optionId","type":"`string`","description":"the id of the profile to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addRequirement
@@ -237,11 +237,11 @@ is allowed.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"the option to add the requirement to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requirement","type":"[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)","description":"the requirement for the option.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRequirement"/>
<TypeList types={[{"name":"optionId","type":"`string`","description":"the option to add the requirement to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requirement","type":"[ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)","description":"the requirement for the option.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addRequirement"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="addRequirement"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="addRequirement"/>
### removeRequirement
@@ -249,21 +249,21 @@ Removes a requirement from a shipping option
#### Parameters
<ParameterTypes parameters={[{"name":"requirementId","type":"`any`","description":"the id of the requirement to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeRequirement"/>
<TypeList types={[{"name":"requirementId","type":"`any`","description":"the id of the requirement to remove","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeRequirement"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="removeRequirement"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingOptionRequirement](../../entities/classes/entities.ShippingOptionRequirement.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="removeRequirement"/>
### updateShippingProfile
#### Parameters
<ParameterTypes parameters={[{"name":"optionIds","type":"`string` \\| `string`[]","description":"ID or IDs of the shipping options to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profileId","type":"`string`","description":"Shipping profile ID to update the shipping options with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
<TypeList types={[{"name":"optionIds","type":"`string` \\| `string`[]","description":"ID or IDs of the shipping options to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"profileId","type":"`string`","description":"Shipping profile ID to update the shipping options with","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"updated shipping options","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"updated shipping options","expandable":false,"children":[]}]} sectionTitle="updateShippingProfile"/>
### getPrice\_
@@ -273,8 +273,8 @@ price type "calculated".
#### Parameters
<ParameterTypes parameters={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the shipping option to retrieve the price\n for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the shipping data to retrieve the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`undefined` \\| [Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the context in which the price should be\n retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPrice_"/>
<TypeList types={[{"name":"option","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the shipping option to retrieve the price\n for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"the shipping data to retrieve the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`undefined` \\| [Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the context in which the price should be\n retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPrice_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the price of the shipping option.","expandable":false,"children":[]}]} sectionTitle="getPrice_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the price of the shipping option.","expandable":false,"children":[]}]} sectionTitle="getPrice_"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# ShippingProfileService
@@ -14,13 +14,13 @@ Provides layer to manipulate profiles.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ShippingProfileService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new ShippingProfileService"/>
___
## 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":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileRepository_","type":"Repository&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","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="ShippingProfileService"/>
<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":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingProfileRepository_","type":"Repository&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRepository_","type":"Repository&#60;[Product](../../entities/classes/entities.Product.mdx)&#62; & `object`","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="ShippingProfileService"/>
___
@@ -30,7 +30,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_"/>
___
@@ -40,21 +40,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\_
@@ -64,35 +64,35 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### getMapProfileIdsByProductIds
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getMapProfileIdsByProductIds"/>
<TypeList types={[{"name":"productIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getMapProfileIdsByProductIds"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;string, string&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getMapProfileIdsByProductIds"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;string, string&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getMapProfileIdsByProductIds"/>
### retrieve
@@ -101,27 +101,27 @@ Throws in case of DB Error and if profile was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"the id of the profile to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"options opf the query.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"the id of the profile to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","description":"options opf the query.","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the profile document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the profile document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveForProducts
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveForProducts"/>
<TypeList types={[{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveForProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveForProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveForProducts"/>
### retrieveDefault
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieveDefault"/>
### createDefault
@@ -129,7 +129,7 @@ Creates a default shipping profile, if this does not already exist.
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile","expandable":false,"children":[]}]} sectionTitle="createDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile","expandable":false,"children":[]}]} sectionTitle="createDefault"/>
### retrieveGiftCardDefault
@@ -137,7 +137,7 @@ Retrieves the default gift card profile
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile for gift cards","expandable":false,"children":[]}]} sectionTitle="retrieveGiftCardDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile for gift cards","expandable":false,"children":[]}]} sectionTitle="retrieveGiftCardDefault"/>
### createGiftCardDefault
@@ -146,7 +146,7 @@ exists.
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile","expandable":false,"children":[]}]} sectionTitle="createGiftCardDefault"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the shipping profile","expandable":false,"children":[]}]} sectionTitle="createGiftCardDefault"/>
### create
@@ -154,11 +154,11 @@ Creates a new shipping profile.
#### Parameters
<ParameterTypes parameters={[{"name":"profile","type":"`CreateShippingProfile`","description":"the shipping profile to create from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"profile","type":"`CreateShippingProfile`","description":"the shipping profile to create from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the create operation","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -168,11 +168,11 @@ will throw errors if metadata or product updates are attempted.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"the id of the profile. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateShippingProfile`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"the id of the profile. Must be a string that\n can be casted to an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateShippingProfile`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -180,21 +180,21 @@ Deletes a profile with a given profile id.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"the id of the profile to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"the id of the profile to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### addProduct
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProduct"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addProduct"/>
#### Deprecated
@@ -206,11 +206,11 @@ Adds a product or an array of products to the profile.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"the profile to add the products to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"the ID of the product or multiple products to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"the profile to add the products to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"the ID of the product or multiple products to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="addProducts"/>
### removeProducts
@@ -218,11 +218,11 @@ Removes a product or an array of products from the profile.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`null` \\| `string`","description":"the profile to add the products to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"the ID of the product or multiple products to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"profileId","type":"`null` \\| `string`","description":"the profile to add the products to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productId","type":"`string` \\| `string`[]","description":"the ID of the product or multiple products to add.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| [ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of update","expandable":false,"children":[]}]} sectionTitle="removeProducts"/>
### addShippingOption
@@ -231,11 +231,11 @@ fulfill the products in the products field.
#### Parameters
<ParameterTypes parameters={[{"name":"profileId","type":"`string`","description":"the profile to apply the shipping option to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string` \\| `string`[]","description":"the ID of the option or multiple options to add to the profile","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addShippingOption"/>
<TypeList types={[{"name":"profileId","type":"`string`","description":"the profile to apply the shipping option to","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionId","type":"`string` \\| `string`[]","description":"the ID of the option or multiple options to add to the profile","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addShippingOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the model update operation","expandable":false,"children":[]}]} sectionTitle="addShippingOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingProfile](../../entities/classes/entities.ShippingProfile.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the model update operation","expandable":false,"children":[]}]} sectionTitle="addShippingOption"/>
### fetchCartOptions
@@ -244,11 +244,11 @@ validates all options that are available for the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"`any`","description":"the cart object to find shipping options for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="fetchCartOptions"/>
<TypeList types={[{"name":"cart","type":"`any`","description":"the cart object to find shipping options for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="fetchCartOptions"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a list of the available shipping options","expandable":false,"children":[]}]} sectionTitle="fetchCartOptions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"a list of the available shipping options","expandable":false,"children":[]}]} sectionTitle="fetchCartOptions"/>
### getProfilesInCart
@@ -256,8 +256,8 @@ Returns a list of all the productIds in the cart.
#### Parameters
<ParameterTypes parameters={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to extract products from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProfilesInCart"/>
<TypeList types={[{"name":"cart","type":"[Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to extract products from","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProfilesInCart"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"a list of product ids","expandable":false,"children":[]}]} sectionTitle="getProfilesInCart"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string[]&#62;","optional":false,"defaultValue":"","description":"a list of product ids","expandable":false,"children":[]}]} sectionTitle="getProfilesInCart"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# StagedJobService
@@ -12,13 +12,13 @@ Provides layer to manipulate users.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`StagedJobServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StagedJobService"/>
<TypeList types={[{"name":"__namedParameters","type":"`StagedJobServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StagedJobService"/>
___
## 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":"stagedJobRepository_","type":"Repository&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62; & `object`","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="StagedJobService"/>
<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":"stagedJobRepository_","type":"Repository&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62; & `object`","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="StagedJobService"/>
___
@@ -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,42 +62,42 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"stagedJobIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"stagedJobIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"[EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;unknown&#62; \\| [EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;unknown&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"[EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;unknown&#62; \\| [EmitData](../../types/EventBusTypes/types/types.EventBusTypes.EmitData.mdx)&#60;unknown&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StagedJob](../../entities/classes/entities.StagedJob.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# StoreService
@@ -12,13 +12,13 @@ Provides layer to manipulate store settings.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StoreService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StoreService"/>
___
## 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":"storeRepository_","type":"Repository&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="StoreService"/>
<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":"storeRepository_","type":"Repository&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currencyRepository_","type":"Repository&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="StoreService"/>
___
@@ -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,15 +62,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_"/>
### create
@@ -78,7 +78,7 @@ Creates a store if it doesn't already exist.
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"The store.","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"The store.","expandable":false,"children":[]}]} sectionTitle="create"/>
### retrieve
@@ -86,21 +86,21 @@ Retrieve the store settings. There is always a maximum of one store.
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","description":"The config object from which the query will be built","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","description":"The config object from which the query will be built","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"the store","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"the store","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### getDefaultCurrency\_
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getDefaultCurrency_"/>
<TypeList types={[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getDefaultCurrency_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Partial","type":"Partial&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getDefaultCurrency_"/>
<TypeList types={[{"name":"Partial","type":"Partial&#60;[Currency](../../entities/classes/entities.Currency.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getDefaultCurrency_"/>
### update
@@ -108,11 +108,11 @@ Updates a store
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`UpdateStoreInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"data","type":"`UpdateStoreInput`","description":"an object with the update values.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the update result.","expandable":false,"children":[]}]} sectionTitle="update"/>
### addCurrency
@@ -120,11 +120,11 @@ Add a currency to the store
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"3 character ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrency"/>
<TypeList types={[{"name":"code","type":"`string`","description":"3 character ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="addCurrency"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"result after update","expandable":false,"children":[]}]} sectionTitle="addCurrency"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Store](../../entities/classes/entities.Store.mdx)&#62;","optional":false,"defaultValue":"","description":"result after update","expandable":false,"children":[]}]} sectionTitle="addCurrency"/>
### removeCurrency
@@ -132,8 +132,8 @@ Removes a currency from the store
#### Parameters
<ParameterTypes parameters={[{"name":"code","type":"`string`","description":"3 character ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCurrency"/>
<TypeList types={[{"name":"code","type":"`string`","description":"3 character ISO currency code","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeCurrency"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"result after update","expandable":false,"children":[]}]} sectionTitle="removeCurrency"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;any&#62;","optional":false,"defaultValue":"","description":"result after update","expandable":false,"children":[]}]} sectionTitle="removeCurrency"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# StrategyResolverService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StrategyResolverService"/>
<TypeList types={[{"name":"container","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new StrategyResolverService"/>
___
## 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":"`InjectedDependencies`","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="StrategyResolverService"/>
<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":"`InjectedDependencies`","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="StrategyResolverService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,22 +60,22 @@ 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_"/>
### resolveBatchJobByType
#### Parameters
<ParameterTypes parameters={[{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveBatchJobByType"/>
<TypeList types={[{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveBatchJobByType"/>
#### Returns
<ParameterTypes parameters={[{"name":"AbstractBatchJobStrategy","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveBatchJobByType"/>
<TypeList types={[{"name":"AbstractBatchJobStrategy","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="resolveBatchJobByType"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SwapService
@@ -12,13 +12,13 @@ Handles swaps
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SwapService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SwapService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.created\"","expandable":false,"children":[]},{"name":"Events.RECEIVED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.received\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.shipment_created\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_completed\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.PROCESS_REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.process_refund_failed\"","expandable":false,"children":[]},{"name":"Events.REFUND_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.refund_processed\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.fulfillment_created\"","expandable":false,"children":[]},{"name":"swapRepository_","type":"Repository&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartService_","type":"[CartService](services.CartService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnService_","type":"[ReturnService](services.ReturnService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="SwapService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.created\"","expandable":false,"children":[]},{"name":"Events.RECEIVED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.received\"","expandable":false,"children":[]},{"name":"Events.SHIPMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.shipment_created\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_COMPLETED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_completed\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_captured\"","expandable":false,"children":[]},{"name":"Events.PAYMENT_CAPTURE_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.payment_capture_failed\"","expandable":false,"children":[]},{"name":"Events.PROCESS_REFUND_FAILED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.process_refund_failed\"","expandable":false,"children":[]},{"name":"Events.REFUND_PROCESSED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.refund_processed\"","expandable":false,"children":[]},{"name":"Events.FULFILLMENT_CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"swap.fulfillment_created\"","expandable":false,"children":[]},{"name":"swapRepository_","type":"Repository&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartService_","type":"[CartService](services.CartService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderService_","type":"[OrderService](services.OrderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnService_","type":"[ReturnService](services.ReturnService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"totalsService_","type":"[TotalsService](services.TotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentService_","type":"[FulfillmentService](services.FulfillmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"paymentProviderService_","type":"[PaymentProviderService](services.PaymentProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemAdjustmentService_","type":"[LineItemAdjustmentService](services.LineItemAdjustmentService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptionService_","type":"[CustomShippingOptionService](services.CustomShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantInventoryService_","type":"[ProductVariantInventoryService](services.ProductVariantInventoryService.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="SwapService"/>
___
@@ -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,15 +62,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_"/>
### transformQueryForCart
@@ -78,11 +78,11 @@ Transform find config object for retrieval.
#### Parameters
<ParameterTypes parameters={[{"name":"config","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62; & `object`","description":"parsed swap find config","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForCart"/>
<TypeList types={[{"name":"config","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62; & `object`","description":"parsed swap find config","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForCart"/>
#### Returns
<ParameterTypes parameters={[{"name":"Omit","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"cartSelects","type":"`undefined` \\| keyof [Cart](../../entities/classes/entities.Cart.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRelations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForCart"/>
<TypeList types={[{"name":"Omit","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"cartSelects","type":"`undefined` \\| keyof [Cart](../../entities/classes/entities.Cart.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartRelations","type":"`undefined` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"select","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="transformQueryForCart"/>
### retrieve
@@ -90,11 +90,11 @@ Retrieves a swap with the given id.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the id of the swap to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62; & `object`","description":"the configuration to retrieve the swap","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the id of the swap to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"Omit&#60;[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;, \"select\"&#62; & `object`","description":"the configuration to retrieve the swap","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByCartId
@@ -102,11 +102,11 @@ Retrieves a swap based on its associated cart id
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"the cart id that the swap's cart has","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`undefined` \\| `string`[]","description":"the relations to retrieve swap","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"the cart id that the swap's cart has","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`undefined` \\| `string`[]","description":"the relations to retrieve swap","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap","expandable":false,"children":[]}]} sectionTitle="retrieveByCartId"/>
### list
@@ -114,11 +114,11 @@ List swaps.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
@@ -126,11 +126,11 @@ List swaps.
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"the configuration used to find the objects. contains relations, skip, and take.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[Swap](../../entities/classes/entities.Swap.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[Swap](../../entities/classes/entities.Swap.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### create
@@ -139,11 +139,11 @@ and an optional return shipping method.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to base the swap off","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnItems","type":"[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;Partial&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;, \"item_id\"&#62;[]","description":"the items to return in the swap","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping.option_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom","type":"`object`","description":"contains relevant custom information. This object may\n include no\\_notification which will disable sending notification when creating\n swap. If set, it overrules the attribute inherited from the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additionalItems","type":"Pick&#60;[LineItem](../../entities/classes/entities.LineItem.mdx), \"variant_id\" \\| \"quantity\"&#62;[]","description":"the items to send to the customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping","type":"`object`","description":"an optional shipping method for returning the returnItems","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping.price","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.idempotency_key","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.allow_backorder","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to base the swap off","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnItems","type":"[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;Partial&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;, \"item_id\"&#62;[]","description":"the items to return in the swap","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping.option_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom","type":"`object`","description":"contains relevant custom information. This object may\n include no\\_notification which will disable sending notification when creating\n swap. If set, it overrules the attribute inherited from the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additionalItems","type":"Pick&#60;[LineItem](../../entities/classes/entities.LineItem.mdx), \"variant_id\" \\| \"quantity\"&#62;[]","description":"the items to send to the customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping","type":"`object`","description":"an optional shipping method for returning the returnItems","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"returnShipping.price","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.idempotency_key","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.allow_backorder","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom.location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created swap","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the newly created swap","expandable":false,"children":[]}]} sectionTitle="create"/>
### processDifference
@@ -151,11 +151,11 @@ Process difference for the requested swap.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"id of a swap being processed","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processDifference"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"id of a swap being processed","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="processDifference"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"processed swap","expandable":false,"children":[]}]} sectionTitle="processDifference"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"processed swap","expandable":false,"children":[]}]} sectionTitle="processDifference"/>
### update
@@ -163,11 +163,11 @@ Update the swap record.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"id of a swap to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"Partial&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"new data","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"id of a swap to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"Partial&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","description":"new data","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"updated swap record","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"updated swap record","expandable":false,"children":[]}]} sectionTitle="update"/>
### createCart
@@ -178,11 +178,11 @@ swap.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the id of the swap to create the cart from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptions","type":"`object`[]","description":"the shipping options","optional":false,"defaultValue":"[]","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.sales_channel_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createCart"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the id of the swap to create the cart from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customShippingOptions","type":"`object`[]","description":"the shipping options","optional":false,"defaultValue":"[]","expandable":false,"children":[]},{"name":"context","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"context.sales_channel_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createCart"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap with its cart\\_id prop set to the id of the new cart.","expandable":false,"children":[]}]} sectionTitle="createCart"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the swap with its cart\\_id prop set to the id of the new cart.","expandable":false,"children":[]}]} sectionTitle="createCart"/>
### registerCartCompletion
@@ -190,11 +190,11 @@ Register a cart completion
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"The id of the swap","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"The id of the swap","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"swap related to the cart","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"swap related to the cart","expandable":false,"children":[]}]} sectionTitle="registerCartCompletion"/>
### cancel
@@ -204,11 +204,11 @@ is associated with a refund, it cannot be canceled.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the id of the swap to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the id of the swap to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancel"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the canceled swap.","expandable":false,"children":[]}]} sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the canceled swap.","expandable":false,"children":[]}]} sectionTitle="cancel"/>
### createFulfillment
@@ -217,11 +217,11 @@ fulfillment providers associated with the shipping methods.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the id of the swap to fulfill,","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"optional configurations, includes optional metadata to attach to the shipment, and a no\\_notification flag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the id of the swap to fulfill,","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"optional configurations, includes optional metadata to attach to the shipment, and a no\\_notification flag.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated swap with new status and fulfillments.","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated swap with new status and fulfillments.","expandable":false,"children":[]}]} sectionTitle="createFulfillment"/>
### cancelFulfillment
@@ -229,11 +229,11 @@ Cancels a fulfillment (if related to a swap)
#### Parameters
<ParameterTypes parameters={[{"name":"fulfillmentId","type":"`string`","description":"the ID of the fulfillment to cancel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillmentId","type":"`string`","description":"the ID of the fulfillment to cancel","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"updated swap","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"updated swap","expandable":false,"children":[]}]} sectionTitle="cancelFulfillment"/>
### createShipment
@@ -241,11 +241,11 @@ Marks a fulfillment as shipped and attaches tracking numbers.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the id of the swap that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"the id of the specific fulfillment that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"optional configurations, includes optional metadata to attach to the shipment, and a noNotification flag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"the tracking numbers associated with the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the id of the swap that has been shipped.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillmentId","type":"`string`","description":"the id of the specific fulfillment that has been shipped","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`CreateShipmentConfig`","description":"optional configurations, includes optional metadata to attach to the shipment, and a noNotification flag.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"trackingLinks","type":"`object`[]","description":"the tracking numbers associated with the shipment","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated swap with new fulfillments and status.","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the updated swap with new fulfillments and status.","expandable":false,"children":[]}]} sectionTitle="createShipment"/>
### deleteMetadata
@@ -253,11 +253,11 @@ Dedicated method to delete metadata for a swap.
#### Parameters
<ParameterTypes parameters={[{"name":"swapId","type":"`string`","description":"the order to delete metadata from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"key","type":"`string`","description":"key for metadata field","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteMetadata"/>
<TypeList types={[{"name":"swapId","type":"`string`","description":"the order to delete metadata from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"key","type":"`string`","description":"key for metadata field","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deleteMetadata"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated result.","expandable":false,"children":[]}]} sectionTitle="deleteMetadata"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"resolves to the updated result.","expandable":false,"children":[]}]} sectionTitle="deleteMetadata"/>
### registerReceived
@@ -266,18 +266,18 @@ as a part of other swaps/returns.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`any`","description":"the id of the order with the swap.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerReceived"/>
<TypeList types={[{"name":"id","type":"`any`","description":"the id of the order with the swap.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerReceived"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting order","expandable":false,"children":[]}]} sectionTitle="registerReceived"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[Swap](../../entities/classes/entities.Swap.mdx)&#62;","optional":false,"defaultValue":"","description":"the resulting order","expandable":false,"children":[]}]} sectionTitle="registerReceived"/>
### areReturnItemsValid
#### Parameters
<ParameterTypes parameters={[{"name":"returnItems","type":"[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;Partial&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;, \"item_id\"&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="areReturnItemsValid"/>
<TypeList types={[{"name":"returnItems","type":"[WithRequiredProperty](../../medusa/types/medusa.WithRequiredProperty.mdx)&#60;Partial&#60;[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)&#62;, \"item_id\"&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="areReturnItemsValid"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="areReturnItemsValid"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;boolean&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="areReturnItemsValid"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# SystemPaymentProviderService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SystemPaymentProviderService"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new SystemPaymentProviderService"/>
___
## 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":"identifier","type":"`string`","description":"","optional":false,"defaultValue":"\"system\"","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="SystemPaymentProviderService"/>
<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":"identifier","type":"`string`","description":"","optional":false,"defaultValue":"\"system\"","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="SystemPaymentProviderService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,112 +60,112 @@ 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_"/>
### createPayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="createPayment"/>
### getStatus
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getStatus"/>
### getPaymentData
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPaymentData"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPaymentData"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getPaymentData"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getPaymentData"/>
### authorizePayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="authorizePayment"/>
### updatePaymentData
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentData"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentData"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentData"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePaymentData"/>
### updatePayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="updatePayment"/>
### deletePayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="deletePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deletePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="deletePayment"/>
### capturePayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="capturePayment"/>
### refundPayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="refundPayment"/>
### cancelPayment
#### Parameters
<ParameterTypes parameters={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
<TypeList types={[{"name":"_","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="cancelPayment"/>
@@ -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"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# TaxRateService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productTypeService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.shippingOptionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.taxRateRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TaxRateService"/>
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.productTypeService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.shippingOptionService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.taxRateRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TaxRateService"/>
___
## 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":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeService_","type":"[ProductTypeService](services.ProductTypeService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxRateRepository_","type":"Repository&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62; & `object`","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="TaxRateService"/>
<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":"productService_","type":"[ProductService](services.ProductService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeService_","type":"[ProductTypeService](services.ProductTypeService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shippingOptionService_","type":"[ShippingOptionService](services.ShippingOptionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxRateRepository_","type":"Repository&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62; & `object`","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="TaxRateService"/>
___
@@ -26,7 +26,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_"/>
___
@@ -36,21 +36,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\_
@@ -60,152 +60,152 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableTaxRateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"`FilterableTaxRateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"`FilterableTaxRateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"`FilterableTaxRateProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[TaxRate](../../entities/classes/entities.TaxRate.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[TaxRate](../../entities/classes/entities.TaxRate.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### retrieve
#### Parameters
<ParameterTypes parameters={[{"name":"taxRateId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"taxRateId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### create
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`CreateTaxRateInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"data","type":"`CreateTaxRateInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateTaxRateInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`UpdateTaxRateInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
### removeFromProduct
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromProduct"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromProduct"/>
### removeFromProductType
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"typeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromProductType"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"typeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromProductType"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromProductType"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromProductType"/>
### removeFromShippingOption
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromShippingOption"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="removeFromShippingOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromShippingOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeFromShippingOption"/>
### addToProduct
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToProduct"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTaxRate](../../entities/classes/entities.ProductTaxRate.mdx) \\| [ProductTaxRate](../../entities/classes/entities.ProductTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductTaxRate](../../entities/classes/entities.ProductTaxRate.mdx) \\| [ProductTaxRate](../../entities/classes/entities.ProductTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToProduct"/>
### addToProductType
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToProductType"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productTypeIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToProductType"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductTypeTaxRate](../../entities/classes/entities.ProductTypeTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToProductType"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductTypeTaxRate](../../entities/classes/entities.ProductTypeTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToProductType"/>
### addToShippingOption
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToShippingOption"/>
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"replace","type":"`boolean`","description":"","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="addToShippingOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingTaxRate](../../entities/classes/entities.ShippingTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToShippingOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingTaxRate](../../entities/classes/entities.ShippingTaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="addToShippingOption"/>
### listByProduct
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`TaxRateListByConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByProduct"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"`TaxRateListByConfig`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByProduct"/>
### listByShippingOption
#### Parameters
<ParameterTypes parameters={[{"name":"shippingOptionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByShippingOption"/>
<TypeList types={[{"name":"shippingOptionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listByShippingOption"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByShippingOption"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxRate](../../entities/classes/entities.TaxRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listByShippingOption"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# TokenService
@@ -10,13 +10,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TokenService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TokenService"/>
___
## Properties
<ParameterTypes parameters={[{"name":"RESOLUTION_KEY","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"configModule_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="TokenService"/>
<TypeList types={[{"name":"RESOLUTION_KEY","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"configModule_","type":"[ConfigModule](../../medusa/interfaces/medusa.ConfigModule-1.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="TokenService"/>
___
@@ -26,18 +26,18 @@ ___
#### Parameters
<ParameterTypes parameters={[{"name":"token","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`VerifyOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="verifyToken"/>
<TypeList types={[{"name":"token","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`VerifyOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="verifyToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"string \\| Jwt \\| JwtPayload","type":"`string` \\| `Jwt` \\| `JwtPayload`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="verifyToken"/>
<TypeList types={[{"name":"string \\| Jwt \\| JwtPayload","type":"`string` \\| `Jwt` \\| `JwtPayload`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="verifyToken"/>
### signToken
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`string` \\| `object` \\| `Buffer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
<TypeList types={[{"name":"data","type":"`string` \\| `object` \\| `Buffer`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`SignOptions`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="signToken"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# TotalsService
@@ -14,13 +14,13 @@ A service that calculates total and subtotals for orders, carts etc..
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`TotalsServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TotalsService"/>
<TypeList types={[{"name":"__namedParameters","type":"`TotalsServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TotalsService"/>
___
## 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":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxCalculationStrategy_","type":"[ITaxCalculationStrategy](../../medusa/interfaces/medusa.ITaxCalculationStrategy.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="TotalsService"/>
<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":"taxProviderService_","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"newTotalsService_","type":"[NewTotalsService](services.NewTotalsService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxCalculationStrategy_","type":"[ITaxCalculationStrategy](../../medusa/interfaces/medusa.ITaxCalculationStrategy.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="TotalsService"/>
___
@@ -30,7 +30,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_"/>
___
@@ -40,21 +40,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\_
@@ -64,15 +64,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_"/>
### getTotal
@@ -80,11 +80,11 @@ Calculates total of a given cart or order.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"object to calculate total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`GetTotalsOptions`","description":"options to calculate by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"object to calculate total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`GetTotalsOptions`","description":"options to calculate by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getTotal"/>
### getPaidTotal
@@ -92,11 +92,11 @@ Gets the total payments made on an order
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to calculate paid amount for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPaidTotal"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to calculate paid amount for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPaidTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the total paid amount","expandable":false,"children":[]}]} sectionTitle="getPaidTotal"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the total paid amount","expandable":false,"children":[]}]} sectionTitle="getPaidTotal"/>
### getSwapTotal
@@ -105,11 +105,11 @@ difference.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to calculate swap total for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getSwapTotal"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to calculate swap total for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getSwapTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the swap total","expandable":false,"children":[]}]} sectionTitle="getSwapTotal"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the swap total","expandable":false,"children":[]}]} sectionTitle="getSwapTotal"/>
### getShippingMethodTotals
@@ -118,11 +118,11 @@ already provided.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to get totals breakdown for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the breakdown","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`GetShippingMethodTotalsOptions`","description":"options for what should be included","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
<TypeList types={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to get totals breakdown for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the breakdown","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`GetShippingMethodTotalsOptions`","description":"options for what should be included","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"An object that breaks down the totals for the shipping method","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;ShippingMethodTotals&#62;","optional":false,"defaultValue":"","description":"An object that breaks down the totals for the shipping method","expandable":false,"children":[]}]} sectionTitle="getShippingMethodTotals"/>
### getSubtotal
@@ -130,11 +130,11 @@ Calculates subtotal of a given cart or order.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`SubtotalOptions`","description":"options","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getSubtotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`SubtotalOptions`","description":"options","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getSubtotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getSubtotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getSubtotal"/>
### getShippingTotal
@@ -142,11 +142,11 @@ Calculates shipping total
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"shipping total","expandable":false,"children":[]}]} sectionTitle="getShippingTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"shipping total","expandable":false,"children":[]}]} sectionTitle="getShippingTotal"/>
### getTaxTotal
@@ -155,11 +155,11 @@ Currently based on the Danish tax system
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate tax total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forceTaxes","type":"`boolean`","description":"whether taxes should be calculated regardless\n of region settings","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="getTaxTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"cart or order to calculate tax total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forceTaxes","type":"`boolean`","description":"whether taxes should be calculated regardless\n of region settings","optional":false,"defaultValue":"false","expandable":false,"children":[]}]} sectionTitle="getTaxTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;null \\| number&#62;","optional":false,"defaultValue":"","description":"tax total","expandable":false,"children":[]}]} sectionTitle="getTaxTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;null \\| number&#62;","optional":false,"defaultValue":"","description":"tax total","expandable":false,"children":[]}]} sectionTitle="getTaxTotal"/>
### getAllocationMap
@@ -169,11 +169,11 @@ applies to a specific line item.
#### Parameters
<ParameterTypes parameters={[{"name":"orderOrCart","type":"`object`","description":"the order or cart to get an allocation map for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`AllocationMapOptions`","description":"controls what should be included in allocation map","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"orderOrCart.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.swaps","type":"[Swap](../../entities/classes/entities.Swap.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.claims","type":"[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getAllocationMap"/>
<TypeList types={[{"name":"orderOrCart","type":"`object`","description":"the order or cart to get an allocation map for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`AllocationMapOptions`","description":"controls what should be included in allocation map","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"orderOrCart.discounts","type":"[Discount](../../entities/classes/entities.Discount.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.swaps","type":"[Swap](../../entities/classes/entities.Swap.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"orderOrCart.claims","type":"[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getAllocationMap"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[LineAllocationsMap](../../medusa/types/medusa.LineAllocationsMap.mdx)&#62;","optional":false,"defaultValue":"","description":"the allocation map for the line items in the cart or order.","expandable":false,"children":[]}]} sectionTitle="getAllocationMap"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LineAllocationsMap](../../medusa/types/medusa.LineAllocationsMap.mdx)&#62;","optional":false,"defaultValue":"","description":"the allocation map for the line items in the cart or order.","expandable":false,"children":[]}]} sectionTitle="getAllocationMap"/>
### getRefundedTotal
@@ -181,11 +181,11 @@ Gets the total refund amount for an order.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get total refund amount for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundedTotal"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"the order to get total refund amount for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundedTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the total refunded amount for an order.","expandable":false,"children":[]}]} sectionTitle="getRefundedTotal"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the total refunded amount for an order.","expandable":false,"children":[]}]} sectionTitle="getRefundedTotal"/>
### getLineItemRefund
@@ -193,11 +193,11 @@ The amount that can be refunded for a given line item.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate the refund amount for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate the refund amount for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the line item refund amount.","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the line item refund amount.","expandable":false,"children":[]}]} sectionTitle="getLineItemRefund"/>
### getRefundTotal
@@ -207,11 +207,11 @@ apply the discount again before refunding them.
#### Parameters
<ParameterTypes parameters={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the line items to calculate refund total for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundTotal"/>
<TypeList types={[{"name":"order","type":"[Order](../../entities/classes/entities.Order.mdx)","description":"cart or order to calculate subtotal for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the line items to calculate refund total for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRefundTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getRefundTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the calculated subtotal","expandable":false,"children":[]}]} sectionTitle="getRefundTotal"/>
### calculateDiscount\_
@@ -219,11 +219,11 @@ Calculates either fixed or percentage discount of a variant
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"id of line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"`string`","description":"id of variant in line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantPrice","type":"`number`","description":"price of the variant based on region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"discount value","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountType","type":"[DiscountRuleType](../../entities/enums/entities.DiscountRuleType.mdx)","description":"the type of discount (fixed or percentage)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscount_"/>
<TypeList types={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"id of line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant","type":"`string`","description":"id of variant in line item","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variantPrice","type":"`number`","description":"price of the variant based on region","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"discount value","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountType","type":"[DiscountRuleType](../../entities/enums/entities.DiscountRuleType.mdx)","description":"the type of discount (fixed or percentage)","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateDiscount_"/>
#### Returns
<ParameterTypes parameters={[{"name":"LineDiscount","type":"`LineDiscount`","optional":false,"defaultValue":"","description":"triples of lineitem, variant and applied discount","expandable":false,"children":[]}]} sectionTitle="calculateDiscount_"/>
<TypeList types={[{"name":"LineDiscount","type":"`LineDiscount`","optional":false,"defaultValue":"","description":"triples of lineitem, variant and applied discount","expandable":false,"children":[]}]} sectionTitle="calculateDiscount_"/>
#### Deprecated
@@ -239,31 +239,31 @@ alongside the variant on which the discount was applied.
#### Parameters
<ParameterTypes parameters={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"the discount to which we do the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to calculate discounts for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getAllocationItemDiscounts"/>
<TypeList types={[{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"the discount to which we do the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart to calculate discounts for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getAllocationItemDiscounts"/>
#### Returns
<ParameterTypes parameters={[{"name":"LineDiscount[]","type":"`LineDiscount`[]","optional":false,"defaultValue":"","description":"array of triples of lineitem, variant and applied discount","expandable":false,"children":[]}]} sectionTitle="getAllocationItemDiscounts"/>
<TypeList types={[{"name":"LineDiscount[]","type":"`LineDiscount`[]","optional":false,"defaultValue":"","description":"array of triples of lineitem, variant and applied discount","expandable":false,"children":[]}]} sectionTitle="getAllocationItemDiscounts"/>
### getLineItemDiscountAdjustment
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemDiscountAdjustment"/>
<TypeList types={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemDiscountAdjustment"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemDiscountAdjustment"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemDiscountAdjustment"/>
### getLineItemAdjustmentsTotal
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemAdjustmentsTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineItemAdjustmentsTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemAdjustmentsTotal"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getLineItemAdjustmentsTotal"/>
### getLineDiscounts
@@ -271,11 +271,11 @@ Returns the discount amount allocated to the line items of an order.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"`object`","description":"the cart or order to get line discount allocations for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.swaps","type":"[Swap](../../entities/classes/entities.Swap.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.claims","type":"[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"the discount to use as context for the calculation","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineDiscounts"/>
<TypeList types={[{"name":"cartOrOrder","type":"`object`","description":"the cart or order to get line discount allocations for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.swaps","type":"[Swap](../../entities/classes/entities.Swap.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder.claims","type":"[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"discount","type":"[Discount](../../entities/classes/entities.Discount.mdx)","description":"the discount to use as context for the calculation","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getLineDiscounts"/>
#### Returns
<ParameterTypes parameters={[{"name":"LineDiscountAmount[]","type":"`LineDiscountAmount`[]","optional":false,"defaultValue":"","description":"the allocations that the discount has on the items in the cart or\n order","expandable":false,"children":[]}]} sectionTitle="getLineDiscounts"/>
<TypeList types={[{"name":"LineDiscountAmount[]","type":"`LineDiscountAmount`[]","optional":false,"defaultValue":"","description":"the allocations that the discount has on the items in the cart or\n order","expandable":false,"children":[]}]} sectionTitle="getLineDiscounts"/>
### getLineItemTotals
@@ -285,11 +285,11 @@ applied to a line item and the amount of tax applied to a line item.
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate totals for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`LineItemTotalsOptions`","description":"the options to evaluate the line item totals for","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
<TypeList types={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate totals for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`LineItemTotalsOptions`","description":"the options to evaluate the line item totals for","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"the breakdown of the line item totals","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;LineItemTotals&#62;","optional":false,"defaultValue":"","description":"the breakdown of the line item totals","expandable":false,"children":[]}]} sectionTitle="getLineItemTotals"/>
### getLineItemTotal
@@ -298,11 +298,11 @@ taxes into account. This can be controlled through the options.
#### Parameters
<ParameterTypes parameters={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate a total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`GetLineItemTotalOptions`","description":"the options to use for the calculation","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getLineItemTotal"/>
<TypeList types={[{"name":"lineItem","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)","description":"the line item to calculate a total for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to use as context for the calculation","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`GetLineItemTotalOptions`","description":"the options to use for the calculation","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getLineItemTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the line item total","expandable":false,"children":[]}]} sectionTitle="getLineItemTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the line item total","expandable":false,"children":[]}]} sectionTitle="getLineItemTotal"/>
### getGiftCardableAmount
@@ -311,11 +311,11 @@ cards are taxable this amount should exclude taxes.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to get gift card amount for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to get gift card amount for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the gift card amount applied to the cart or order","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the gift card amount applied to the cart or order","expandable":false,"children":[]}]} sectionTitle="getGiftCardableAmount"/>
### getGiftCardTotal
@@ -323,11 +323,11 @@ Gets the gift card amount on a cart or order.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to get gift card amount for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"opts.gift_cardable","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to get gift card amount for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"opts","type":"`object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"opts.gift_cardable","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"the gift card amount applied to the cart or order","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"the gift card amount applied to the cart or order","expandable":false,"children":[]}]} sectionTitle="getGiftCardTotal"/>
### getDiscountTotal
@@ -336,11 +336,11 @@ discount types. If discounts aren't present or invalid returns 0.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to calculate discounts for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getDiscountTotal"/>
<TypeList types={[{"name":"cartOrOrder","type":"[Order](../../entities/classes/entities.Order.mdx) \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or order to calculate discounts for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getDiscountTotal"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the total discounts amount","expandable":false,"children":[]}]} sectionTitle="getDiscountTotal"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;number&#62;","optional":false,"defaultValue":"","description":"the total discounts amount","expandable":false,"children":[]}]} sectionTitle="getDiscountTotal"/>
### getCalculationContext
@@ -348,11 +348,11 @@ Prepares the calculation context for a tax total calculation.
#### Parameters
<ParameterTypes parameters={[{"name":"calculationContextData","type":"`CalculationContextData`","description":"the calculationContextData to get the calculation context for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`CalculationContextOptions`","description":"options to gather context by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getCalculationContext"/>
<TypeList types={[{"name":"calculationContextData","type":"`CalculationContextData`","description":"the calculationContextData to get the calculation context for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`CalculationContextOptions`","description":"options to gather context by","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="getCalculationContext"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)&#62;","optional":false,"defaultValue":"","description":"the tax calculation context","expandable":false,"children":[]}]} sectionTitle="getCalculationContext"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)&#62;","optional":false,"defaultValue":"","description":"the tax calculation context","expandable":false,"children":[]}]} sectionTitle="getCalculationContext"/>
### rounded
@@ -360,8 +360,8 @@ Rounds a number using Math.round.
#### Parameters
<ParameterTypes parameters={[{"name":"value","type":"`number`","description":"the value to round","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="rounded"/>
<TypeList types={[{"name":"value","type":"`number`","description":"the value to round","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="rounded"/>
#### Returns
<ParameterTypes parameters={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the rounded value","expandable":false,"children":[]}]} sectionTitle="rounded"/>
<TypeList types={[{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"the rounded value","expandable":false,"children":[]}]} sectionTitle="rounded"/>
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# UserService
@@ -12,13 +12,13 @@ Provides layer to manipulate users.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`UserServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new UserService"/>
<TypeList types={[{"name":"__namedParameters","type":"`UserServiceProps`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new UserService"/>
___
## 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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.PASSWORD_RESET","type":"`string`","description":"","optional":false,"defaultValue":"\"user.password_reset\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.deleted\"","expandable":false,"children":[]},{"name":"analyticsConfigService_","type":"[AnalyticsConfigService](services.AnalyticsConfigService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userRepository_","type":"Repository&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="UserService"/>
<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":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.PASSWORD_RESET","type":"`string`","description":"","optional":false,"defaultValue":"\"user.password_reset\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.updated\"","expandable":false,"children":[]},{"name":"Events.DELETED","type":"`string`","description":"","optional":false,"defaultValue":"\"user.deleted\"","expandable":false,"children":[]},{"name":"analyticsConfigService_","type":"[AnalyticsConfigService](services.AnalyticsConfigService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"userRepository_","type":"Repository&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.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="UserService"/>
___
@@ -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,35 +62,35 @@ 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
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../types/CommonTypes/types/types.CommonTypes.Selector.mdx)&#60;FilterableUserProps&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;FilterableUserProps&#62;","description":"the configuration object for the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../types/CommonTypes/types/types.CommonTypes.Selector.mdx)&#60;FilterableUserProps&#62; & `object`","description":"the query object for find","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;FilterableUserProps&#62;","description":"the configuration object for the query","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="list"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} sectionTitle="list"/>
### listAndCount
#### Parameters
<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../types/CommonTypes/types/types.CommonTypes.Selector.mdx)&#60;FilterableUserProps&#62; & `object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;FilterableUserProps&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"selector","type":"[Selector](../../types/CommonTypes/types/types.CommonTypes.Selector.mdx)&#60;FilterableUserProps&#62; & `object`","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;FilterableUserProps&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[[User](../../entities/classes/entities.User.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[User](../../entities/classes/entities.User.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="listAndCount"/>
### retrieve
@@ -99,11 +99,11 @@ Throws in case of DB Error and if user was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"the id of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"query configs","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"the id of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"query configs","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieve"/>
### retrieveByApiToken
@@ -112,11 +112,11 @@ Throws in case of DB Error and if user was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"apiToken","type":"`string`","description":"the token of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"relations to include with the user.","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveByApiToken"/>
<TypeList types={[{"name":"apiToken","type":"`string`","description":"the token of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"relations to include with the user.","optional":false,"defaultValue":"[]","expandable":false,"children":[]}]} sectionTitle="retrieveByApiToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieveByApiToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieveByApiToken"/>
### retrieveByEmail
@@ -125,11 +125,11 @@ Throws in case of DB Error and if user was not found.
#### Parameters
<ParameterTypes parameters={[{"name":"email","type":"`string`","description":"the email of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"query config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
<TypeList types={[{"name":"email","type":"`string`","description":"the email of the user to get.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[User](../../entities/classes/entities.User.mdx)&#62;","description":"query config","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the user document.","expandable":false,"children":[]}]} sectionTitle="retrieveByEmail"/>
### hashPassword\_
@@ -137,11 +137,11 @@ Hashes a password
#### Parameters
<ParameterTypes parameters={[{"name":"password","type":"`string`","description":"the value to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
<TypeList types={[{"name":"password","type":"`string`","description":"the value to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"hashed password","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"hashed password","expandable":false,"children":[]}]} sectionTitle="hashPassword_"/>
### create
@@ -150,11 +150,11 @@ Fails if email is not a valid format.
#### Parameters
<ParameterTypes parameters={[{"name":"user","type":"`CreateUserInput`","description":"the user to create","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"user's password to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"user","type":"`CreateUserInput`","description":"the user to create","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"user's password to hash","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="create"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="create"/>
### update
@@ -162,11 +162,11 @@ Updates a user.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"id of the user to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateUserInput`","description":"the values to be updated on the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"id of the user to update","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`UpdateUserInput`","description":"the values to be updated on the user","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="update"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of create","expandable":false,"children":[]}]} sectionTitle="update"/>
### delete
@@ -174,11 +174,11 @@ Deletes a user from a given user id.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"the id of the user to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"the id of the user to delete. Must be\n castable as an ObjectId","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="delete"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"the result of the delete operation.","expandable":false,"children":[]}]} sectionTitle="delete"/>
### setPassword\_
@@ -188,11 +188,11 @@ password does not work.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"the userId to set password for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the old password to set","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPassword_"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"the userId to set password for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"password","type":"`string`","description":"the old password to set","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setPassword_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setPassword_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[User](../../entities/classes/entities.User.mdx)&#62;","optional":false,"defaultValue":"","description":"the result of the update operation","expandable":false,"children":[]}]} sectionTitle="setPassword_"/>
### generateResetPasswordToken
@@ -204,8 +204,8 @@ is always 15 minutes.
#### Parameters
<ParameterTypes parameters={[{"name":"userId","type":"`string`","description":"the id of the user to reset password for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
<TypeList types={[{"name":"userId","type":"`string`","description":"the id of the user to reset password for","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"the generated JSON web token","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;string&#62;","optional":false,"defaultValue":"","description":"the generated JSON web token","expandable":false,"children":[]}]} sectionTitle="generateResetPasswordToken"/>