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:
committed by
GitHub
parent
dc6b815b12
commit
cdd42dbdcd
@@ -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<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -204,7 +188,7 @@ Promise<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### atomicPhase\_
|
||||
#### atomicPhase\_
|
||||
|
||||
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>`
|
||||
|
||||
@@ -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<TResult>
|
||||
|
||||
@@ -283,7 +269,7 @@ Promise<TResult>
|
||||
|
||||
___
|
||||
|
||||
### create
|
||||
#### create
|
||||
|
||||
`**create**(data): Promise<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
@@ -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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -323,13 +309,13 @@ Promise<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### createShippingMethod
|
||||
#### createShippingMethod
|
||||
|
||||
`**createShippingMethod**(optionId, data, config): Promise<[ShippingMethod](ShippingMethod.mdx)>`
|
||||
|
||||
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<[ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
@@ -379,13 +365,13 @@ Promise<[ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### delete
|
||||
#### delete
|
||||
|
||||
`**delete**(optionId): Promise<void \| [ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<void \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -417,13 +403,13 @@ Promise<void \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### deleteShippingMethods
|
||||
#### deleteShippingMethods
|
||||
|
||||
`**deleteShippingMethods**(shippingMethods): Promise<[ShippingMethod](ShippingMethod.mdx)[]>`
|
||||
|
||||
Removes a given shipping method
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -437,7 +423,7 @@ Removes a given shipping method
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[ShippingMethod](ShippingMethod.mdx)[]>
|
||||
|
||||
@@ -455,7 +441,7 @@ Promise<[ShippingMethod](ShippingMethod.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
### getPrice\_
|
||||
#### getPrice\_
|
||||
|
||||
`**getPrice_**(option, data, cart): Promise<number>`
|
||||
|
||||
@@ -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<number>
|
||||
|
||||
@@ -513,11 +499,11 @@ Promise<number>
|
||||
|
||||
___
|
||||
|
||||
### list
|
||||
#### list
|
||||
|
||||
`**list**(selector, config?): Promise<[ShippingOption](ShippingOption.mdx)[]>`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -540,7 +526,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
@@ -558,11 +544,11 @@ Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
### listAndCount
|
||||
#### listAndCount
|
||||
|
||||
`**listAndCount**(selector, config?): Promise<[[ShippingOption](ShippingOption.mdx)[], number]>`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -585,7 +571,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[[ShippingOption](ShippingOption.mdx)[], number]>
|
||||
|
||||
@@ -603,13 +589,13 @@ Promise<[[ShippingOption](ShippingOption.mdx)[], number]>
|
||||
|
||||
___
|
||||
|
||||
### removeRequirement
|
||||
#### removeRequirement
|
||||
|
||||
`**removeRequirement**(requirementId): Promise<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>`
|
||||
|
||||
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<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)>
|
||||
|
||||
@@ -641,14 +627,14 @@ Promise<void \| [ShippingOptionRequirement](ShippingOptionRequirement.mdx)&#
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
#### retrieve
|
||||
|
||||
`**retrieve**(optionId, options?): Promise<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -689,11 +675,11 @@ Promise<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### 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<[ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
@@ -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<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -774,14 +760,14 @@ Promise<[ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### updateShippingMethod
|
||||
#### updateShippingMethod
|
||||
|
||||
`**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.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -804,7 +790,7 @@ and its methods should be copied to an order/swap entity.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<undefined \| [ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
@@ -822,11 +808,11 @@ Promise<undefined \| [ShippingMethod](ShippingMethod.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### updateShippingProfile
|
||||
#### updateShippingProfile
|
||||
|
||||
`**updateShippingProfile**(optionIds, profileId): Promise<[ShippingOption](ShippingOption.mdx)[]>`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -849,7 +835,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
@@ -867,11 +853,11 @@ Promise<[ShippingOption](ShippingOption.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
### validateAndMutatePrice
|
||||
#### validateAndMutatePrice
|
||||
|
||||
`Private **validateAndMutatePrice**(option, priceInput): Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), "beforeInsert">>`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -894,7 +880,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx) \| [Omit](../types/Omit.mdx)<[ShippingOption](ShippingOption.mdx), "beforeInsert">>
|
||||
|
||||
@@ -912,7 +898,7 @@ Promise<[CreateShippingOptionInput](../types/CreateShippingOptionInput.mdx)
|
||||
|
||||
___
|
||||
|
||||
### validateCartOption
|
||||
#### validateCartOption
|
||||
|
||||
`**validateCartOption**(option, cart): Promise<null \| [ShippingOption](ShippingOption.mdx)>`
|
||||
|
||||
@@ -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<null \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
@@ -961,13 +947,13 @@ Promise<null \| [ShippingOption](ShippingOption.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### validatePriceType\_
|
||||
#### validatePriceType\_
|
||||
|
||||
`**validatePriceType_**(priceType, option): Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>`
|
||||
|
||||
Validates a shipping option price
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -990,7 +976,7 @@ Validates a shipping option price
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>
|
||||
|
||||
@@ -1008,13 +994,13 @@ Promise<[ShippingOptionPriceType](../enums/ShippingOptionPriceType.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### validateRequirement\_
|
||||
#### validateRequirement\_
|
||||
|
||||
`**validateRequirement_**(requirement, optionId?): Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>`
|
||||
|
||||
Validates a requirement
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1037,7 +1023,7 @@ Validates a requirement
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>
|
||||
|
||||
@@ -1055,11 +1041,11 @@ Promise<[ShippingOptionRequirement](ShippingOptionRequirement.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
#### withTransaction
|
||||
|
||||
`**withTransaction**(transactionManager?): [ShippingOptionService](ShippingOptionService.mdx)`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1073,7 +1059,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
[ShippingOptionService](ShippingOptionService.mdx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user