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

@@ -12,14 +12,14 @@ Provides layer to manipulate profiles.
### constructor
**new ShippingOptionService**(`«destructured»`)
`**new ShippingOptionService**(«destructured»)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "__namedParameters",
"type": "[`InjectedDependencies`](../types/InjectedDependencies-37.mdx)",
"type": "[InjectedDependencies](../types/InjectedDependencies-37.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -33,7 +33,7 @@ Provides layer to manipulate profiles.
<ParameterTypes parameters={[
{
"name": "__configModule__",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
@@ -51,7 +51,7 @@ Provides layer to manipulate profiles.
},
{
"name": "__moduleDeclaration__",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "",
"optional": true,
"defaultValue": "",
@@ -60,7 +60,7 @@ Provides layer to manipulate profiles.
},
{
"name": "featureFlagRouter_",
"type": "[`FlagRouter`](FlagRouter.mdx)",
"type": "[FlagRouter](FlagRouter.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -69,7 +69,7 @@ Provides layer to manipulate profiles.
},
{
"name": "manager_",
"type": "`EntityManager`",
"type": "EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
@@ -78,7 +78,7 @@ Provides layer to manipulate profiles.
},
{
"name": "methodRepository_",
"type": "`Repository`<[`ShippingMethod`](ShippingMethod.mdx)\\>",
"type": "Repository&#60;[ShippingMethod](ShippingMethod.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
@@ -87,7 +87,7 @@ Provides layer to manipulate profiles.
},
{
"name": "optionRepository_",
"type": "`Repository`<[`ShippingOption`](ShippingOption.mdx)\\> & { `upsertShippingProfile`: Method upsertShippingProfile }",
"type": "Repository&#60;[ShippingOption](ShippingOption.mdx)&#62; & `&#123; upsertShippingProfile: Method upsertShippingProfile &#125;`",
"description": "",
"optional": false,
"defaultValue": "",
@@ -96,7 +96,7 @@ Provides layer to manipulate profiles.
},
{
"name": "providerService_",
"type": "[`FulfillmentProviderService`](FulfillmentProviderService.mdx)",
"type": "[FulfillmentProviderService](FulfillmentProviderService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -105,7 +105,7 @@ Provides layer to manipulate profiles.
},
{
"name": "regionService_",
"type": "[`RegionService`](RegionService.mdx)",
"type": "[RegionService](RegionService.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -114,7 +114,7 @@ Provides layer to manipulate profiles.
},
{
"name": "requirementRepository_",
"type": "`Repository`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\\>",
"type": "Repository&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;",
"description": "",
"optional": false,
"defaultValue": "",
@@ -123,7 +123,7 @@ Provides layer to manipulate profiles.
},
{
"name": "transactionManager_",
"type": "`undefined` \\| `EntityManager`",
"type": "`undefined` \\| EntityManager",
"description": "",
"optional": false,
"defaultValue": "",
@@ -136,16 +136,16 @@ Provides layer to manipulate profiles.
### activeManager\_
`Protected` `get` **activeManager_**(): `EntityManager`
`Protected get**activeManager_**(): EntityManager`
#### Returns
`EntityManager`
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "`EntityManager`",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
@@ -158,7 +158,7 @@ Provides layer to manipulate profiles.
### addRequirement
**addRequirement**(`optionId`, `requirement`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
`**addRequirement**(optionId, requirement): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
Adds a requirement to a shipping option. Only 1 requirement of each type
is allowed.
@@ -177,7 +177,7 @@ is allowed.
},
{
"name": "requirement",
"type": "[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)",
"type": "[ShippingOptionRequirement](ShippingOptionRequirement.mdx)",
"description": "the requirement for the option.",
"optional": false,
"defaultValue": "",
@@ -188,12 +188,12 @@ is allowed.
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of update",
@@ -206,7 +206,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
@@ -238,7 +238,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": "",
@@ -247,7 +247,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": "",
@@ -256,7 +256,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": "",
@@ -267,12 +267,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",
@@ -285,7 +285,7 @@ ___
### create
**create**(`data`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
`**create**(data): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
Creates a new shipping option. Used both for outbound and inbound shipping
options. The difference is registered by the `is_return` field which
@@ -296,7 +296,7 @@ defaults to false.
<ParameterTypes parameters={[
{
"name": "data",
"type": "[`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx)",
"type": "[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx)",
"description": "the data to create shipping options",
"optional": false,
"defaultValue": "",
@@ -307,12 +307,12 @@ defaults to false.
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the create operation",
@@ -325,7 +325,7 @@ ___
### createShippingMethod
**createShippingMethod**(`optionId`, `data`, `config`): `Promise`<[`ShippingMethod`](ShippingMethod.mdx)\>
`**createShippingMethod**(optionId, data, config): Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;`
Creates a shipping method for a given cart.
@@ -343,7 +343,7 @@ Creates a shipping method for a given cart.
},
{
"name": "data",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "the optional provider data to use.",
"optional": false,
"defaultValue": "",
@@ -352,7 +352,7 @@ Creates a shipping method for a given cart.
},
{
"name": "config",
"type": "[`CreateShippingMethodDto`](../types/CreateShippingMethodDto.mdx)",
"type": "[CreateShippingMethodDto](../types/CreateShippingMethodDto.mdx)",
"description": "the cart to create the shipping method for.",
"optional": false,
"defaultValue": "",
@@ -363,12 +363,12 @@ Creates a shipping method for a given cart.
#### Returns
`Promise`<[`ShippingMethod`](ShippingMethod.mdx)\>
Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingMethod`](ShippingMethod.mdx)\\>",
"type": "Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the resulting shipping method.",
@@ -381,7 +381,7 @@ ___
### delete
**delete**(`optionId`): `Promise`<`void` \| [`ShippingOption`](ShippingOption.mdx)\>
`**delete**(optionId): Promise&#60;void \| [ShippingOption](ShippingOption.mdx)&#62;`
Deletes a profile with a given profile id.
@@ -401,12 +401,12 @@ Deletes a profile with a given profile id.
#### Returns
`Promise`<`void` \| [`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;void \| [ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`void` \\| [`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;void \\| [ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the delete operation.",
@@ -419,7 +419,7 @@ ___
### deleteShippingMethods
**deleteShippingMethods**(`shippingMethods`): `Promise`<[`ShippingMethod`](ShippingMethod.mdx)[]\>
`**deleteShippingMethods**(shippingMethods): Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;`
Removes a given shipping method
@@ -428,7 +428,7 @@ Removes a given shipping method
<ParameterTypes parameters={[
{
"name": "shippingMethods",
"type": "[`ShippingMethod`](ShippingMethod.mdx) \\| [`ShippingMethod`](ShippingMethod.mdx)[]",
"type": "[ShippingMethod](ShippingMethod.mdx) \\| [ShippingMethod](ShippingMethod.mdx)[]",
"description": "the shipping method to remove",
"optional": false,
"defaultValue": "",
@@ -439,12 +439,12 @@ Removes a given shipping method
#### Returns
`Promise`<[`ShippingMethod`](ShippingMethod.mdx)[]\>
Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingMethod`](ShippingMethod.mdx)[]\\>",
"type": "Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "removed shipping methods",
@@ -457,7 +457,7 @@ ___
### getPrice\_
**getPrice_**(`option`, `data`, `cart`): `Promise`<`number`\>
`**getPrice_**(option, data, cart): Promise&#60;number&#62;`
Returns the amount to be paid for a shipping method. Will ask the
fulfillment provider to calculate the price if the shipping option has the
@@ -468,7 +468,7 @@ price type "calculated".
<ParameterTypes parameters={[
{
"name": "option",
"type": "[`ShippingOption`](ShippingOption.mdx)",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "the shipping option to retrieve the price for.",
"optional": false,
"defaultValue": "",
@@ -477,7 +477,7 @@ price type "calculated".
},
{
"name": "data",
"type": "Record<`string`, `unknown`\\>",
"type": "`Record<string, unknown>`",
"description": "the shipping data to retrieve the price.",
"optional": false,
"defaultValue": "",
@@ -486,7 +486,7 @@ price type "calculated".
},
{
"name": "cart",
"type": "`undefined` \\| [`Order`](Order.mdx) \\| [`Cart`](Cart.mdx)",
"type": "`undefined` \\| [Order](Order.mdx) \\| [Cart](Cart.mdx)",
"description": "the context in which the price should be retrieved.",
"optional": false,
"defaultValue": "",
@@ -497,12 +497,12 @@ price type "calculated".
#### Returns
`Promise`<`number`\>
Promise&#60;number&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`number`\\>",
"type": "Promise&#60;number&#62;",
"optional": false,
"defaultValue": "",
"description": "the price of the shipping option.",
@@ -515,14 +515,14 @@ ___
### list
**list**(`selector`, `config?`): `Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
`**list**(selector, config?): Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[`Selector`](../types/Selector.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "[Selector](../types/Selector.mdx)&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"description": "the query object for find",
"optional": false,
"defaultValue": "",
@@ -531,7 +531,7 @@ ___
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"description": "config object",
"optional": false,
"defaultValue": "",
@@ -542,12 +542,12 @@ ___
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the find operation",
@@ -560,14 +560,14 @@ ___
### listAndCount
**listAndCount**(`selector`, `config?`): `Promise`<[[`ShippingOption`](ShippingOption.mdx)[], `number`]\>
`**listAndCount**(selector, config?): Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "selector",
"type": "[`Selector`](../types/Selector.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "[Selector](../types/Selector.mdx)&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"description": "the query object for find",
"optional": false,
"defaultValue": "",
@@ -576,7 +576,7 @@ ___
},
{
"name": "config",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"description": "config object",
"optional": false,
"defaultValue": "",
@@ -587,12 +587,12 @@ ___
#### Returns
`Promise`<[[`ShippingOption`](ShippingOption.mdx)[], `number`]\>
Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[[`ShippingOption`](ShippingOption.mdx)[], `number`]\\>",
"type": "Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of the find operation",
@@ -605,7 +605,7 @@ ___
### removeRequirement
**removeRequirement**(`requirementId`): `Promise`<`void` \| [`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\>
`**removeRequirement**(requirementId): Promise&#60;void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;`
Removes a requirement from a shipping option
@@ -625,12 +625,12 @@ Removes a requirement from a shipping option
#### Returns
`Promise`<`void` \| [`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\>
Promise&#60;void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`void` \\| [`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\\>",
"type": "Promise&#60;void \\| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the result of update",
@@ -643,7 +643,7 @@ ___
### retrieve
**retrieve**(`optionId`, `options?`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
`**retrieve**(optionId, options?): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
Gets a profile by id.
Throws in case of DB Error and if profile was not found.
@@ -662,7 +662,7 @@ Throws in case of DB Error and if profile was not found.
},
{
"name": "options",
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "[FindConfig](../interfaces/FindConfig.mdx)&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"description": "the options to get a profile",
"optional": false,
"defaultValue": "{}",
@@ -673,12 +673,12 @@ Throws in case of DB Error and if profile was not found.
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the profile document.",
@@ -691,14 +691,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": "",
@@ -727,7 +727,7 @@ ___
### update
**update**(`optionId`, `update`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
`**update**(optionId, update): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
Updates a profile. Metadata updates and product updates should use
dedicated methods, e.g. `setMetadata`, etc. The function
@@ -747,7 +747,7 @@ will throw errors if metadata or product updates are attempted.
},
{
"name": "update",
"type": "[`UpdateShippingOptionInput`](../types/UpdateShippingOptionInput.mdx)",
"type": "[UpdateShippingOptionInput](../types/UpdateShippingOptionInput.mdx)",
"description": "an object with the update values.",
"optional": false,
"defaultValue": "",
@@ -758,12 +758,12 @@ will throw errors if metadata or product updates are attempted.
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "resolves to the update result.",
@@ -776,7 +776,7 @@ ___
### updateShippingMethod
**updateShippingMethod**(`id`, `update`): `Promise`<`undefined` \| [`ShippingMethod`](ShippingMethod.mdx)\>
`**updateShippingMethod**(id, update): Promise&#60;undefined \| [ShippingMethod](ShippingMethod.mdx)&#62;`
Updates a shipping method's associations. Useful when a cart is completed
and its methods should be copied to an order/swap entity.
@@ -795,7 +795,7 @@ and its methods should be copied to an order/swap entity.
},
{
"name": "update",
"type": "[`ShippingMethodUpdate`](../types/ShippingMethodUpdate.mdx)",
"type": "[ShippingMethodUpdate](../types/ShippingMethodUpdate.mdx)",
"description": "the values to update the method with",
"optional": false,
"defaultValue": "",
@@ -806,12 +806,12 @@ and its methods should be copied to an order/swap entity.
#### Returns
`Promise`<`undefined` \| [`ShippingMethod`](ShippingMethod.mdx)\>
Promise&#60;undefined \| [ShippingMethod](ShippingMethod.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<`undefined` \\| [`ShippingMethod`](ShippingMethod.mdx)\\>",
"type": "Promise&#60;undefined \\| [ShippingMethod](ShippingMethod.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the resulting shipping method",
@@ -824,7 +824,7 @@ ___
### updateShippingProfile
**updateShippingProfile**(`optionIds`, `profileId`): `Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
`**updateShippingProfile**(optionIds, profileId): Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;`
#### Parameters
@@ -851,12 +851,12 @@ ___
#### Returns
`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\\>",
"type": "Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "updated shipping options",
@@ -869,14 +869,14 @@ ___
### validateAndMutatePrice
`Private` **validateAndMutatePrice**(`option`, `priceInput`): `Promise`<[`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx) \| [`Omit`](../types/Omit.mdx)<[`ShippingOption`](ShippingOption.mdx), ``"beforeInsert"``\>\>
`Private **validateAndMutatePrice**(option, priceInput): Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)&#60;[ShippingOption](ShippingOption.mdx), `"beforeInsert"`&#62;&#62;`
#### Parameters
<ParameterTypes parameters={[
{
"name": "option",
"type": "[`ShippingOption`](ShippingOption.mdx) \\| [`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx)",
"type": "[ShippingOption](ShippingOption.mdx) \\| [CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -885,7 +885,7 @@ ___
},
{
"name": "priceInput",
"type": "[`ValidatePriceTypeAndAmountInput`](../types/ValidatePriceTypeAndAmountInput.mdx)",
"type": "[ValidatePriceTypeAndAmountInput](../types/ValidatePriceTypeAndAmountInput.mdx)",
"description": "",
"optional": false,
"defaultValue": "",
@@ -896,12 +896,12 @@ ___
#### Returns
`Promise`<[`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx) \| [`Omit`](../types/Omit.mdx)<[`ShippingOption`](ShippingOption.mdx), ``"beforeInsert"``\>\>
Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)&#60;[ShippingOption](ShippingOption.mdx), `"beforeInsert"`&#62;&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx) \\| [`Omit`](../types/Omit.mdx)<[`ShippingOption`](ShippingOption.mdx), ``\"beforeInsert\"``\\>\\>",
"type": "Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \\| [Omit](../types/Omit.mdx)&#60;[ShippingOption](ShippingOption.mdx), `\"beforeInsert\"`&#62;&#62;",
"optional": false,
"defaultValue": "",
"description": "",
@@ -914,10 +914,10 @@ ___
### validateCartOption
**validateCartOption**(`option`, `cart`): `Promise`<``null`` \| [`ShippingOption`](ShippingOption.mdx)\>
`**validateCartOption**(option, cart): Promise&#60;`null` \| [ShippingOption](ShippingOption.mdx)&#62;`
Checks if a given option id is a valid option for a cart. If it is the
option is returned with the correct price. Throws when region_ids do not
option is returned with the correct price. Throws when region\_ids do not
match, or when the shipping option requirements are not satisfied.
#### Parameters
@@ -925,7 +925,7 @@ match, or when the shipping option requirements are not satisfied.
<ParameterTypes parameters={[
{
"name": "option",
"type": "[`ShippingOption`](ShippingOption.mdx)",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "the option object to check",
"optional": false,
"defaultValue": "",
@@ -934,7 +934,7 @@ match, or when the shipping option requirements are not satisfied.
},
{
"name": "cart",
"type": "[`Cart`](Cart.mdx)",
"type": "[Cart](Cart.mdx)",
"description": "the cart object to check against",
"optional": false,
"defaultValue": "",
@@ -945,12 +945,12 @@ match, or when the shipping option requirements are not satisfied.
#### Returns
`Promise`<``null`` \| [`ShippingOption`](ShippingOption.mdx)\>
Promise&#60;`null` \| [ShippingOption](ShippingOption.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<``null`` \\| [`ShippingOption`](ShippingOption.mdx)\\>",
"type": "Promise&#60;`null` \\| [ShippingOption](ShippingOption.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the validated shipping option",
@@ -963,7 +963,7 @@ ___
### validatePriceType\_
**validatePriceType_**(`priceType`, `option`): `Promise`<[`ShippingOptionPriceType`](../enums/ShippingOptionPriceType.mdx)\>
`**validatePriceType_**(priceType, option): Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;`
Validates a shipping option price
@@ -972,7 +972,7 @@ Validates a shipping option price
<ParameterTypes parameters={[
{
"name": "priceType",
"type": "[`ShippingOptionPriceType`](../enums/ShippingOptionPriceType.mdx)",
"type": "[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)",
"description": "the price to validate",
"optional": false,
"defaultValue": "",
@@ -981,7 +981,7 @@ Validates a shipping option price
},
{
"name": "option",
"type": "[`ShippingOption`](ShippingOption.mdx)",
"type": "[ShippingOption](ShippingOption.mdx)",
"description": "the option to validate against",
"optional": false,
"defaultValue": "",
@@ -992,12 +992,12 @@ Validates a shipping option price
#### Returns
`Promise`<[`ShippingOptionPriceType`](../enums/ShippingOptionPriceType.mdx)\>
Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOptionPriceType`](../enums/ShippingOptionPriceType.mdx)\\>",
"type": "Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "the validated price",
@@ -1010,7 +1010,7 @@ ___
### validateRequirement\_
**validateRequirement_**(`requirement`, `optionId?`): `Promise`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\>
`**validateRequirement_**(requirement, optionId?): Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;`
Validates a requirement
@@ -1019,7 +1019,7 @@ Validates a requirement
<ParameterTypes parameters={[
{
"name": "requirement",
"type": "[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)",
"type": "[ShippingOptionRequirement](ShippingOptionRequirement.mdx)",
"description": "the requirement to validate",
"optional": false,
"defaultValue": "",
@@ -1039,12 +1039,12 @@ Validates a requirement
#### Returns
`Promise`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\>
Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;
<ParameterTypes parameters={[
{
"name": "Promise",
"type": "`Promise`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\\>",
"type": "Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;",
"optional": false,
"defaultValue": "",
"description": "a validated shipping requirement",
@@ -1057,14 +1057,14 @@ ___
### withTransaction
**withTransaction**(`transactionManager?`): [`ShippingOptionService`](ShippingOptionService.mdx)
`**withTransaction**(transactionManager?): [ShippingOptionService](ShippingOptionService.mdx)`
#### Parameters
<ParameterTypes parameters={[
{
"name": "transactionManager",
"type": "`EntityManager`",
"type": "EntityManager",
"description": "",
"optional": true,
"defaultValue": "",
@@ -1075,12 +1075,12 @@ ___
#### Returns
[`ShippingOptionService`](ShippingOptionService.mdx)
[ShippingOptionService](ShippingOptionService.mdx)
<ParameterTypes parameters={[
{
"name": "ShippingOptionService",
"type": "[`ShippingOptionService`](ShippingOptionService.mdx)",
"type": "[ShippingOptionService](ShippingOptionService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",