chore(docs): Generated References (#5743)

Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-11-27 18:58:52 +00:00
committed by GitHub
parent dc6b815b12
commit cdd42dbdcd
1383 changed files with 18978 additions and 20154 deletions

View File

@@ -10,11 +10,11 @@ Provides layer to manipulate profiles.
## Constructors
### constructor
#### constructor
`**new ShippingOptionService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -134,36 +134,20 @@ Provides layer to manipulate profiles.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### addRequirement
#### addRequirement
`**addRequirement**(optionId, requirement): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
Adds a requirement to a shipping option. Only 1 requirement of each type
is allowed.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -186,7 +170,7 @@ is allowed.
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
@@ -204,7 +188,7 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -212,6 +196,8 @@ Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "TResult",
@@ -233,7 +219,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -265,7 +251,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -283,7 +269,7 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
@@ -291,7 +277,7 @@ Creates a new shipping option. Used both for outbound and inbound shipping
options. The difference is registered by the `is_return` field which
defaults to false.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -305,7 +291,7 @@ defaults to false.
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
@@ -323,13 +309,13 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
___
### createShippingMethod
#### createShippingMethod
`**createShippingMethod**(optionId, data, config): Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;`
Creates a shipping method for a given cart.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -361,7 +347,7 @@ Creates a shipping method for a given cart.
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;
@@ -379,13 +365,13 @@ Promise&#60;[ShippingMethod](ShippingMethod.mdx)&#62;
___
### delete
#### delete
`**delete**(optionId): Promise&#60;void \| [ShippingOption](ShippingOption.mdx)&#62;`
Deletes a profile with a given profile id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -399,7 +385,7 @@ Deletes a profile with a given profile id.
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [ShippingOption](ShippingOption.mdx)&#62;
@@ -417,13 +403,13 @@ Promise&#60;void \| [ShippingOption](ShippingOption.mdx)&#62;
___
### deleteShippingMethods
#### deleteShippingMethods
`**deleteShippingMethods**(shippingMethods): Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;`
Removes a given shipping method
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -437,7 +423,7 @@ Removes a given shipping method
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;
@@ -455,7 +441,7 @@ Promise&#60;[ShippingMethod](ShippingMethod.mdx)[]&#62;
___
### getPrice\_
#### getPrice\_
`**getPrice_**(option, data, cart): Promise&#60;number&#62;`
@@ -463,7 +449,7 @@ 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
price type "calculated".
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -495,7 +481,7 @@ price type "calculated".
}
]} />
#### Returns
##### Returns
Promise&#60;number&#62;
@@ -513,11 +499,11 @@ Promise&#60;number&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -540,7 +526,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
@@ -558,11 +544,11 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -585,7 +571,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;
@@ -603,13 +589,13 @@ Promise&#60;[[ShippingOption](ShippingOption.mdx)[], number]&#62;
___
### removeRequirement
#### removeRequirement
`**removeRequirement**(requirementId): Promise&#60;void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;`
Removes a requirement from a shipping option
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -623,7 +609,7 @@ Removes a requirement from a shipping option
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;
@@ -641,14 +627,14 @@ Promise&#60;void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#
___
### retrieve
#### retrieve
`**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.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -671,7 +657,7 @@ Throws in case of DB Error and if profile was not found.
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
@@ -689,11 +675,11 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -707,7 +693,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -725,7 +711,7 @@ ___
___
### update
#### update
`**update**(optionId, update): Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;`
@@ -733,7 +719,7 @@ Updates a profile. Metadata updates and product updates should use
dedicated methods, e.g. `setMetadata`, etc. The function
will throw errors if metadata or product updates are attempted.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -756,7 +742,7 @@ will throw errors if metadata or product updates are attempted.
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
@@ -774,14 +760,14 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)&#62;
___
### updateShippingMethod
#### updateShippingMethod
`**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.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -804,7 +790,7 @@ and its methods should be copied to an order/swap entity.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [ShippingMethod](ShippingMethod.mdx)&#62;
@@ -822,11 +808,11 @@ Promise&#60;undefined \| [ShippingMethod](ShippingMethod.mdx)&#62;
___
### updateShippingProfile
#### updateShippingProfile
`**updateShippingProfile**(optionIds, profileId): Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -849,7 +835,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
@@ -867,11 +853,11 @@ Promise&#60;[ShippingOption](ShippingOption.mdx)[]&#62;
___
### validateAndMutatePrice
#### validateAndMutatePrice
`Private **validateAndMutatePrice**(option, priceInput): Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)&#60;[ShippingOption](ShippingOption.mdx), "beforeInsert"&#62;&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -894,7 +880,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)&#60;[ShippingOption](ShippingOption.mdx), "beforeInsert"&#62;&#62;
@@ -912,7 +898,7 @@ Promise&#60;[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx)
___
### validateCartOption
#### validateCartOption
`**validateCartOption**(option, cart): Promise&#60;null \| [ShippingOption](ShippingOption.mdx)&#62;`
@@ -920,7 +906,7 @@ 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
match, or when the shipping option requirements are not satisfied.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -943,7 +929,7 @@ match, or when the shipping option requirements are not satisfied.
}
]} />
#### Returns
##### Returns
Promise&#60;null \| [ShippingOption](ShippingOption.mdx)&#62;
@@ -961,13 +947,13 @@ Promise&#60;null \| [ShippingOption](ShippingOption.mdx)&#62;
___
### validatePriceType\_
#### validatePriceType\_
`**validatePriceType_**(priceType, option): Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;`
Validates a shipping option price
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -990,7 +976,7 @@ Validates a shipping option price
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;
@@ -1008,13 +994,13 @@ Promise&#60;[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)&#62;
___
### validateRequirement\_
#### validateRequirement\_
`**validateRequirement_**(requirement, optionId?): Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;`
Validates a requirement
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1037,7 +1023,7 @@ Validates a requirement
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;
@@ -1055,11 +1041,11 @@ Promise&#60;[ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [ShippingOptionService](ShippingOptionService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1073,7 +1059,7 @@ ___
}
]} />
#### Returns
##### Returns
[ShippingOptionService](ShippingOptionService.mdx)