docs: update docusaurus to v3 (#5625)

* update dependencies

* update onboarding mdx

* fixes for mdx issues

* fixes for mdx compatibility

* resolve mdx errors

* fixes in reference

* fix check errors

* revert change in vale action

* fix node version in action

* fix summary in markdown
This commit is contained in:
Shahed Nasser
2023-11-13 20:11:50 +02:00
committed by GitHub
parent cedab58339
commit c6dff873de
2265 changed files with 46163 additions and 47195 deletions

View File

@@ -14,7 +14,7 @@ Provides layer to manipulate discounts.
### constructor
**new DiscountService**(`«destructured»`)
`**new DiscountService**(«destructured»)`
#### Parameters
@@ -35,7 +35,7 @@ Provides layer to manipulate discounts.
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
@@ -53,7 +53,7 @@ Provides layer to manipulate discounts.
},
{
"name": "__moduleDeclaration__",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
@@ -62,7 +62,7 @@ Provides layer to manipulate discounts.
},
{
"name": "customerService_",
"type": "[`CustomerService`](CustomerService.mdx)",
"type": "[CustomerService](CustomerService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -71,7 +71,7 @@ Provides layer to manipulate discounts.
},
{
"name": "discountConditionRepository_",
"type": "`Repository`<[`DiscountCondition`](DiscountCondition.mdx)\\> & { `addConditionResources`: Method addConditionResources ; `canApplyForCustomer`: Method canApplyForCustomer ; `findOneWithDiscount`: Method findOneWithDiscount ; `getJoinTableResourceIdentifiers`: Method getJoinTableResourceIdentifiers ; `isValidForProduct`: Method isValidForProduct ; `queryConditionTable`: Method queryConditionTable ; `removeConditionResources`: Method removeConditionResources }",
"type": "Repository&#60;[DiscountCondition](DiscountCondition.mdx)&#62; & `&#123; addConditionResources: Method addConditionResources ; canApplyForCustomer: Method canApplyForCustomer ; findOneWithDiscount: Method findOneWithDiscount ; getJoinTableResourceIdentifiers: Method getJoinTableResourceIdentifiers ; isValidForProduct: Method isValidForProduct ; queryConditionTable: Method queryConditionTable ; removeConditionResources: Method removeConditionResources &#125;`",
"description": "",
"optional": false,
"defaultValue": "",
@@ -80,7 +80,7 @@ Provides layer to manipulate discounts.
},
{
"name": "discountConditionService_",
"type": "[`DiscountConditionService`](DiscountConditionService.mdx)",
"type": "[DiscountConditionService](DiscountConditionService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -89,7 +89,7 @@ Provides layer to manipulate discounts.
},
{
"name": "discountRepository_",
"type": "`Repository`<[`Discount`](Discount.mdx)\\>",
"type": "Repository&#60;[Discount](Discount.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
@@ -98,7 +98,7 @@ Provides layer to manipulate discounts.
},
{
"name": "discountRuleRepository_",
"type": "`Repository`<[`DiscountRule`](DiscountRule.mdx)\\>",
"type": "Repository&#60;[DiscountRule](DiscountRule.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
@@ -107,7 +107,7 @@ Provides layer to manipulate discounts.
},
{
"name": "eventBus_",
"type": "[`EventBusService`](EventBusService.mdx)",
"type": "[EventBusService](EventBusService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -116,7 +116,7 @@ Provides layer to manipulate discounts.
},
{
"name": "featureFlagRouter_",
"type": "[`FlagRouter`](FlagRouter.mdx)",
"type": "[FlagRouter](FlagRouter.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -125,7 +125,7 @@ Provides layer to manipulate discounts.
},
{
"name": "giftCardRepository_",
"type": "`Repository`<[`GiftCard`](GiftCard.mdx)\\> & { `listGiftCardsAndCount`: Method listGiftCardsAndCount }",
"type": "Repository&#60;[GiftCard](GiftCard.mdx)&#62; & `&#123; listGiftCardsAndCount: Method listGiftCardsAndCount &#125;`",
"description": "",
"optional": false,
"defaultValue": "",
@@ -134,7 +134,7 @@ Provides layer to manipulate discounts.
},
{
"name": "manager_",
"type": "`EntityManager`",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
@@ -143,7 +143,7 @@ Provides layer to manipulate discounts.
},
{
"name": "newTotalsService_",
"type": "[`NewTotalsService`](NewTotalsService.mdx)",
"type": "[NewTotalsService](NewTotalsService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -152,7 +152,7 @@ Provides layer to manipulate discounts.
},
{
"name": "productService_",
"type": "[`ProductService`](ProductService.mdx)",
"type": "[ProductService](ProductService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -161,7 +161,7 @@ Provides layer to manipulate discounts.
},
{
"name": "regionService_",
"type": "[`RegionService`](RegionService.mdx)",
"type": "[RegionService](RegionService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -170,7 +170,7 @@ Provides layer to manipulate discounts.
},
{
"name": "totalsService_",
"type": "[`TotalsService`](TotalsService.mdx)",
"type": "[TotalsService](TotalsService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -179,7 +179,7 @@ Provides layer to manipulate discounts.
},
{
"name": "transactionManager_",
"type": "`undefined` \\| `EntityManager`",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
@@ -192,16 +192,16 @@ Provides layer to manipulate discounts.
### activeManager\_
`Protected` `get` **activeManager_**(): `EntityManager`
`Protected get**activeManager_**(): EntityManager`
#### Returns
`EntityManager`
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "`EntityManager`",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
@@ -214,7 +214,7 @@ Provides layer to manipulate discounts.
### addRegion
**addRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](Discount.mdx)\>
`**addRegion**(discountId, regionId): Promise&#60;[Discount](Discount.mdx)&#62;`
Adds a region to the discount regions array.
@@ -243,12 +243,12 @@ Adds a region to the discount regions array.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the update operation",
@@ -261,7 +261,7 @@ ___
### atomicPhase\_
`Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
@@ -293,7 +293,7 @@ transaction manager is created.
<ParameterTypes parameters={[
{
"name": "work",
"type": "(`transactionManager`: `EntityManager`) => `Promise`<`TResult`\\>",
"type": "(`transactionManager`: EntityManager) => Promise&#60;TResult&#62;",
"description": "the transactional work to be done",
"optional": false,
"defaultValue": "",
@@ -302,7 +302,7 @@ transaction manager is created.
},
{
"name": "isolationOrErrorHandler",
"type": "`IsolationLevel` \\| (`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
"type": "`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "the isolation level to be used for the work.",
"optional": true,
"defaultValue": "",
@@ -311,7 +311,7 @@ transaction manager is created.
},
{
"name": "maybeErrorHandlerOrDontFail",
"type": "(`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
"type": "(`error`: `TError`) => Promise&#60;void \\| TResult&#62;",
"description": "Potential error handler",
"optional": true,
"defaultValue": "",
@@ -322,12 +322,12 @@ transaction manager is created.
#### Returns
`Promise`<`TResult`\>
Promise&#60;TResult&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`TResult`\\>",
"type": "Promise&#60;TResult&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the transactional work",
@@ -340,7 +340,7 @@ ___
### calculateDiscountForLineItem
**calculateDiscountForLineItem**(`discountId`, `lineItem`, `calculationContextData`): `Promise`<`number`\>
`**calculateDiscountForLineItem**(discountId, lineItem, calculationContextData): Promise&#60;number&#62;`
#### Parameters
@@ -356,7 +356,7 @@ ___
},
{
"name": "lineItem",
"type": "[`LineItem`](LineItem.mdx)",
"type": "[LineItem](LineItem.mdx)",
"description": "Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.",
"optional": false,
"defaultValue": "",
@@ -365,7 +365,7 @@ ___
},
{
"name": "calculationContextData",
"type": "[`CalculationContextData`](../types/CalculationContextData.mdx)",
"type": "[CalculationContextData](../types/CalculationContextData.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -376,12 +376,12 @@ ___
#### Returns
`Promise`<`number`\>
Promise&#60;number&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`number`\\>",
"type": "Promise&#60;number&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -394,7 +394,7 @@ ___
### canApplyForCustomer
**canApplyForCustomer**(`discountRuleId`, `customerId`): `Promise`<`boolean`\>
`**canApplyForCustomer**(discountRuleId, customerId): Promise&#60;boolean&#62;`
#### Parameters
@@ -421,12 +421,12 @@ ___
#### Returns
`Promise`<`boolean`\>
Promise&#60;boolean&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`boolean`\\>",
"type": "Promise&#60;boolean&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -439,7 +439,7 @@ ___
### create
**create**(`discount`): `Promise`<[`Discount`](Discount.mdx)\>
`**create**(discount): Promise&#60;[Discount](Discount.mdx)&#62;`
Creates a discount with provided data given that the data is validated.
Normalizes discount code to uppercase.
@@ -449,7 +449,7 @@ Normalizes discount code to uppercase.
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`CreateDiscountInput`](../types/CreateDiscountInput.mdx)",
"type": "[CreateDiscountInput](../types/CreateDiscountInput.mdx)",
"description": "the discount data to create",
"optional": false,
"defaultValue": "",
@@ -460,12 +460,12 @@ Normalizes discount code to uppercase.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the create operation",
@@ -478,7 +478,7 @@ ___
### createDynamicCode
**createDynamicCode**(`discountId`, `data`): `Promise`<[`Discount`](Discount.mdx)\>
`**createDynamicCode**(discountId, data): Promise&#60;[Discount](Discount.mdx)&#62;`
Creates a dynamic code for a discount id.
@@ -496,7 +496,7 @@ Creates a dynamic code for a discount id.
},
{
"name": "data",
"type": "[`CreateDynamicDiscountInput`](../types/CreateDynamicDiscountInput.mdx)",
"type": "[CreateDynamicDiscountInput](../types/CreateDynamicDiscountInput.mdx)",
"description": "the object containing a code to identify the discount by",
"optional": false,
"defaultValue": "",
@@ -507,12 +507,12 @@ Creates a dynamic code for a discount id.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the newly created dynamic code",
@@ -525,7 +525,7 @@ ___
### delete
**delete**(`discountId`): `Promise`<`void`\>
`**delete**(discountId): Promise&#60;void&#62;`
Deletes a discount idempotently
@@ -545,12 +545,12 @@ Deletes a discount idempotently
#### Returns
`Promise`<`void`\>
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`void`\\>",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the delete operation",
@@ -563,7 +563,7 @@ ___
### deleteDynamicCode
**deleteDynamicCode**(`discountId`, `code`): `Promise`<`void`\>
`**deleteDynamicCode**(discountId, code): Promise&#60;void&#62;`
Deletes a dynamic code for a discount id.
@@ -592,12 +592,12 @@ Deletes a dynamic code for a discount id.
#### Returns
`Promise`<`void`\>
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`void`\\>",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "the newly created dynamic code",
@@ -610,14 +610,14 @@ ___
### hasCustomersGroupCondition
**hasCustomersGroupCondition**(`discount`): `boolean`
`**hasCustomersGroupCondition**(discount): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -646,14 +646,14 @@ ___
### hasExpired
**hasExpired**(`discount`): `boolean`
`**hasExpired**(discount): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -682,14 +682,14 @@ ___
### hasNotStarted
**hasNotStarted**(`discount`): `boolean`
`**hasNotStarted**(discount): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -718,14 +718,14 @@ ___
### hasReachedLimit
**hasReachedLimit**(`discount`): `boolean`
`**hasReachedLimit**(discount): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -754,14 +754,14 @@ ___
### isDisabled
**isDisabled**(`discount`): `boolean`
`**isDisabled**(discount): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -790,14 +790,14 @@ ___
### isValidForRegion
**isValidForRegion**(`discount`, `region_id`): `Promise`<`boolean`\>
`**isValidForRegion**(discount, region_id): Promise&#60;boolean&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "discount",
"type": "[`Discount`](Discount.mdx)",
"type": "[Discount](Discount.mdx)",
"description": "A discount can be applied to a cart for promotional purposes.",
"optional": false,
"defaultValue": "",
@@ -817,12 +817,12 @@ ___
#### Returns
`Promise`<`boolean`\>
Promise&#60;boolean&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`boolean`\\>",
"type": "Promise&#60;boolean&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -835,14 +835,14 @@ ___
### list
**list**(`selector?`, `config?`): `Promise`<[`Discount`](Discount.mdx)[]\>
`**list**(selector?, config?): Promise&#60;[Discount](Discount.mdx)[]&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[`FilterableDiscountProps`](FilterableDiscountProps.mdx)",
"type": "[FilterableDiscountProps](FilterableDiscountProps.mdx)",
"description": "the query object for find",
"optional": false,
"defaultValue": "{}",
@@ -851,7 +851,7 @@ ___
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Discount`](Discount.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[Discount](Discount.mdx)&#62;",
"description": "the config object containing query settings",
"optional": false,
"defaultValue": "",
@@ -862,12 +862,12 @@ ___
#### Returns
`Promise`<[`Discount`](Discount.mdx)[]\>
Promise&#60;[Discount](Discount.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)[]\\>",
"type": "Promise&#60;[Discount](Discount.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the find operation",
@@ -880,14 +880,14 @@ ___
### listAndCount
**listAndCount**(`selector?`, `config?`): `Promise`<[[`Discount`](Discount.mdx)[], `number`]\>
`**listAndCount**(selector?, config?): Promise&#60;[[Discount](Discount.mdx)[], number]&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[`FilterableDiscountProps`](FilterableDiscountProps.mdx)",
"type": "[FilterableDiscountProps](FilterableDiscountProps.mdx)",
"description": "the query object for find",
"optional": false,
"defaultValue": "{}",
@@ -896,7 +896,7 @@ ___
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Discount`](Discount.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[Discount](Discount.mdx)&#62;",
"description": "the config object containing query settings",
"optional": false,
"defaultValue": "",
@@ -907,12 +907,12 @@ ___
#### Returns
`Promise`<[[`Discount`](Discount.mdx)[], `number`]\>
Promise&#60;[[Discount](Discount.mdx)[], number]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[[`Discount`](Discount.mdx)[], `number`]\\>",
"type": "Promise&#60;[[Discount](Discount.mdx)[], number]&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the find operation",
@@ -925,7 +925,7 @@ ___
### listByCodes
**listByCodes**(`discountCodes`, `config?`): `Promise`<[`Discount`](Discount.mdx)[]\>
`**listByCodes**(discountCodes, config?): Promise&#60;[Discount](Discount.mdx)[]&#62;`
List all the discounts corresponding to the given codes
@@ -943,7 +943,7 @@ List all the discounts corresponding to the given codes
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Discount`](Discount.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[Discount](Discount.mdx)&#62;",
"description": "the config object containing query settings",
"optional": false,
"defaultValue": "{}",
@@ -954,12 +954,12 @@ List all the discounts corresponding to the given codes
#### Returns
`Promise`<[`Discount`](Discount.mdx)[]\>
Promise&#60;[Discount](Discount.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)[]\\>",
"type": "Promise&#60;[Discount](Discount.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "the discounts",
@@ -972,7 +972,7 @@ ___
### removeRegion
**removeRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](Discount.mdx)\>
`**removeRegion**(discountId, regionId): Promise&#60;[Discount](Discount.mdx)&#62;`
Removes a region from the discount regions array.
@@ -1001,12 +1001,12 @@ Removes a region from the discount regions array.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the update operation",
@@ -1019,7 +1019,7 @@ ___
### retrieve
**retrieve**(`discountId`, `config?`): `Promise`<[`Discount`](Discount.mdx)\>
`**retrieve**(discountId, config?): Promise&#60;[Discount](Discount.mdx)&#62;`
Gets a discount by id.
@@ -1037,7 +1037,7 @@ Gets a discount by id.
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Discount`](Discount.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[Discount](Discount.mdx)&#62;",
"description": "the config object containing query settings",
"optional": false,
"defaultValue": "{}",
@@ -1048,12 +1048,12 @@ Gets a discount by id.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the discount",
@@ -1066,7 +1066,7 @@ ___
### retrieveByCode
**retrieveByCode**(`discountCode`, `config?`): `Promise`<[`Discount`](Discount.mdx)\>
`**retrieveByCode**(discountCode, config?): Promise&#60;[Discount](Discount.mdx)&#62;`
Gets the discount by discount code.
@@ -1084,7 +1084,7 @@ Gets the discount by discount code.
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Discount`](Discount.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[Discount](Discount.mdx)&#62;",
"description": "the config object containing query settings",
"optional": false,
"defaultValue": "{}",
@@ -1095,12 +1095,12 @@ Gets the discount by discount code.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the discount",
@@ -1113,14 +1113,14 @@ ___
### shouldRetryTransaction\_
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
<ParameterTypes parameters={[
{
"name": "err",
"type": "Record<`string`, `unknown`\\> \\| { `code`: `string` }",
"type": "`Record<string, unknown>` \\| `&#123; code: string &#125;`",
"description": "",
"optional": false,
"defaultValue": "",
@@ -1149,7 +1149,7 @@ ___
### update
**update**(`discountId`, `update`): `Promise`<[`Discount`](Discount.mdx)\>
`**update**(discountId, update): Promise&#60;[Discount](Discount.mdx)&#62;`
Updates a discount.
@@ -1167,7 +1167,7 @@ Updates a discount.
},
{
"name": "update",
"type": "[`UpdateDiscountInput`](../types/UpdateDiscountInput.mdx)",
"type": "[UpdateDiscountInput](../types/UpdateDiscountInput.mdx)",
"description": "the data to update the discount with",
"optional": false,
"defaultValue": "",
@@ -1178,12 +1178,12 @@ Updates a discount.
#### Returns
`Promise`<[`Discount`](Discount.mdx)\>
Promise&#60;[Discount](Discount.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`Discount`](Discount.mdx)\\>",
"type": "Promise&#60;[Discount](Discount.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the update operation",
@@ -1196,14 +1196,14 @@ ___
### validateDiscountForCartOrThrow
**validateDiscountForCartOrThrow**(`cart`, `discount`): `Promise`<`void`\>
`**validateDiscountForCartOrThrow**(cart, discount): Promise&#60;void&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "cart",
"type": "[`Cart`](Cart.mdx)",
"type": "[Cart](Cart.mdx)",
"description": "A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.",
"optional": false,
"defaultValue": "",
@@ -1212,7 +1212,7 @@ ___
},
{
"name": "discount",
"type": "[`Discount`](Discount.mdx) \\| [`Discount`](Discount.mdx)[]",
"type": "[Discount](Discount.mdx) \\| [Discount](Discount.mdx)[]",
"description": "",
"optional": false,
"defaultValue": "",
@@ -1223,12 +1223,12 @@ ___
#### Returns
`Promise`<`void`\>
Promise&#60;void&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`void`\\>",
"type": "Promise&#60;void&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -1241,7 +1241,7 @@ ___
### validateDiscountForProduct
**validateDiscountForProduct**(`discountRuleId`, `productId?`): `Promise`<`boolean`\>
`**validateDiscountForProduct**(discountRuleId, productId?): Promise&#60;boolean&#62;`
#### Parameters
@@ -1268,12 +1268,12 @@ ___
#### Returns
`Promise`<`boolean`\>
Promise&#60;boolean&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`boolean`\\>",
"type": "Promise&#60;boolean&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -1286,7 +1286,7 @@ ___
### validateDiscountRule\_
**validateDiscountRule_**<`T`\>(`discountRule`): `T`
`**validateDiscountRule_**<TypeParameter T>(discountRule): T`
Creates a discount rule with provided data given that the data is validated.
@@ -1326,14 +1326,14 @@ ___
### withTransaction
**withTransaction**(`transactionManager?`): [`DiscountService`](DiscountService.mdx)
`**withTransaction**(transactionManager?): [DiscountService](DiscountService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "`EntityManager`",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
@@ -1344,12 +1344,12 @@ ___
#### Returns
[`DiscountService`](DiscountService.mdx)
[DiscountService](DiscountService.mdx)
<ParameterTypes parameters={[
{
"name": "DiscountService",
"type": "[`DiscountService`](DiscountService.mdx)",
"type": "[DiscountService](DiscountService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",