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:
@@ -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<[ShippingMethod](ShippingMethod.mdx)>",
|
||||
"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<[ShippingOption](ShippingOption.mdx)> & `{ upsertShippingProfile: Method upsertShippingProfile }`",
|
||||
"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<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>",
|
||||
"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<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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<TResult>`
|
||||
|
||||
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<TResult>",
|
||||
"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<void \\| TResult>",
|
||||
"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<void \\| TResult>",
|
||||
"description": "Potential error handler",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -267,12 +267,12 @@ transaction manager is created.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`TResult`\>
|
||||
Promise<TResult>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`TResult`\\>",
|
||||
"type": "Promise<TResult>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the transactional work",
|
||||
@@ -285,7 +285,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
**create**(`data`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
|
||||
`**create**(data): Promise<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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<[ShippingMethod](ShippingMethod.mdx)>`
|
||||
|
||||
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<[ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingMethod`](ShippingMethod.mdx)\\>",
|
||||
"type": "Promise<[ShippingMethod](ShippingMethod.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the resulting shipping method.",
|
||||
@@ -381,7 +381,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
**delete**(`optionId`): `Promise`<`void` \| [`ShippingOption`](ShippingOption.mdx)\>
|
||||
`**delete**(optionId): Promise<void \| [ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<void \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void` \\| [`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<void \\| [ShippingOption](ShippingOption.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the delete operation.",
|
||||
@@ -419,7 +419,7 @@ ___
|
||||
|
||||
### deleteShippingMethods
|
||||
|
||||
**deleteShippingMethods**(`shippingMethods`): `Promise`<[`ShippingMethod`](ShippingMethod.mdx)[]\>
|
||||
`**deleteShippingMethods**(shippingMethods): Promise<[ShippingMethod](ShippingMethod.mdx)[]>`
|
||||
|
||||
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<[ShippingMethod](ShippingMethod.mdx)[]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingMethod`](ShippingMethod.mdx)[]\\>",
|
||||
"type": "Promise<[ShippingMethod](ShippingMethod.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "removed shipping methods",
|
||||
@@ -457,7 +457,7 @@ ___
|
||||
|
||||
### getPrice\_
|
||||
|
||||
**getPrice_**(`option`, `data`, `cart`): `Promise`<`number`\>
|
||||
`**getPrice_**(option, data, cart): Promise<number>`
|
||||
|
||||
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<number>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`number`\\>",
|
||||
"type": "Promise<number>",
|
||||
"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<[ShippingOption](ShippingOption.mdx)[]>`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`Selector`](../types/Selector.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "[Selector](../types/Selector.mdx)<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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)<[ShippingOption](ShippingOption.mdx)>",
|
||||
"description": "config object",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -542,12 +542,12 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
|
||||
Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)[]>",
|
||||
"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<[[ShippingOption](ShippingOption.mdx)[], number]>`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`Selector`](../types/Selector.mdx)<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "[Selector](../types/Selector.mdx)<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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)<[ShippingOption](ShippingOption.mdx)>",
|
||||
"description": "config object",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -587,12 +587,12 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[[`ShippingOption`](ShippingOption.mdx)[], `number`]\>
|
||||
Promise<[[ShippingOption](ShippingOption.mdx)[], number]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[[`ShippingOption`](ShippingOption.mdx)[], `number`]\\>",
|
||||
"type": "Promise<[[ShippingOption](ShippingOption.mdx)[], number]>",
|
||||
"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<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>`
|
||||
|
||||
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<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`void` \\| [`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\\>",
|
||||
"type": "Promise<void \\| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of update",
|
||||
@@ -643,7 +643,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
**retrieve**(`optionId`, `options?`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
|
||||
`**retrieve**(optionId, options?): Promise<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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)<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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>` \\| `{ code: string }`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -727,7 +727,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
**update**(`optionId`, `update`): `Promise`<[`ShippingOption`](ShippingOption.mdx)\>
|
||||
`**update**(optionId, update): Promise<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)>",
|
||||
"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<undefined \| [ShippingMethod](ShippingMethod.mdx)>`
|
||||
|
||||
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<undefined \| [ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`undefined` \\| [`ShippingMethod`](ShippingMethod.mdx)\\>",
|
||||
"type": "Promise<undefined \\| [ShippingMethod](ShippingMethod.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the resulting shipping method",
|
||||
@@ -824,7 +824,7 @@ ___
|
||||
|
||||
### updateShippingProfile
|
||||
|
||||
**updateShippingProfile**(`optionIds`, `profileId`): `Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
|
||||
`**updateShippingProfile**(optionIds, profileId): Promise<[ShippingOption](ShippingOption.mdx)[]>`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -851,12 +851,12 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\>
|
||||
Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOption`](ShippingOption.mdx)[]\\>",
|
||||
"type": "Promise<[ShippingOption](ShippingOption.mdx)[]>",
|
||||
"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<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), `"beforeInsert"`>>`
|
||||
|
||||
#### 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<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), `"beforeInsert"`>>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`CreateShippingOptionInput`](../types/CreateShippingOptionInput.mdx) \\| [`Omit`](../types/Omit.mdx)<[`ShippingOption`](ShippingOption.mdx), ``\"beforeInsert\"``\\>\\>",
|
||||
"type": "Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \\| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), `\"beforeInsert\"`>>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
@@ -914,10 +914,10 @@ ___
|
||||
|
||||
### validateCartOption
|
||||
|
||||
**validateCartOption**(`option`, `cart`): `Promise`<``null`` \| [`ShippingOption`](ShippingOption.mdx)\>
|
||||
`**validateCartOption**(option, cart): Promise<`null` \| [ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<`null` \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<``null`` \\| [`ShippingOption`](ShippingOption.mdx)\\>",
|
||||
"type": "Promise<`null` \\| [ShippingOption](ShippingOption.mdx)>",
|
||||
"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<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>`
|
||||
|
||||
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<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOptionPriceType`](../enums/ShippingOptionPriceType.mdx)\\>",
|
||||
"type": "Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the validated price",
|
||||
@@ -1010,7 +1010,7 @@ ___
|
||||
|
||||
### validateRequirement\_
|
||||
|
||||
**validateRequirement_**(`requirement`, `optionId?`): `Promise`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\>
|
||||
`**validateRequirement_**(requirement, optionId?): Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>`
|
||||
|
||||
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<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`ShippingOptionRequirement`](ShippingOptionRequirement.mdx)\\>",
|
||||
"type": "Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>",
|
||||
"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": "",
|
||||
|
||||
Reference in New Issue
Block a user