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 @@ Handles swaps
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
#### constructor
|
||||
|
||||
`**new SwapService**(«destructured»)`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -287,33 +287,17 @@ Handles swaps
|
||||
|
||||
## 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
|
||||
|
||||
### areReturnItemsValid
|
||||
#### areReturnItemsValid
|
||||
|
||||
`Protected **areReturnItemsValid**(returnItems): Promise<boolean>`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -327,7 +311,7 @@ EntityManager
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<boolean>
|
||||
|
||||
@@ -345,7 +329,7 @@ Promise<boolean>
|
||||
|
||||
___
|
||||
|
||||
### atomicPhase\_
|
||||
#### atomicPhase\_
|
||||
|
||||
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise<TResult>`
|
||||
|
||||
@@ -353,6 +337,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",
|
||||
@@ -374,7 +360,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -406,7 +392,7 @@ transaction manager is created.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<TResult>
|
||||
|
||||
@@ -424,7 +410,7 @@ Promise<TResult>
|
||||
|
||||
___
|
||||
|
||||
### cancel
|
||||
#### cancel
|
||||
|
||||
`**cancel**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
@@ -432,7 +418,7 @@ Cancels a given swap if possible. A swap can only be canceled if all
|
||||
related returns, fulfillments, and payments have been canceled. If a swap
|
||||
is associated with a refund, it cannot be canceled.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -446,7 +432,7 @@ is associated with a refund, it cannot be canceled.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -464,13 +450,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### cancelFulfillment
|
||||
#### cancelFulfillment
|
||||
|
||||
`**cancelFulfillment**(fulfillmentId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Cancels a fulfillment (if related to a swap)
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -484,7 +470,7 @@ Cancels a fulfillment (if related to a swap)
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -502,14 +488,14 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### create
|
||||
#### create
|
||||
|
||||
`**create**(order, returnItems, additionalItems?, returnShipping?, custom?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Creates a swap from an order, with given return items, additional items
|
||||
and an optional return shipping method.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -613,7 +599,7 @@ and an optional return shipping method.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -631,7 +617,7 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### createCart
|
||||
#### createCart
|
||||
|
||||
`**createCart**(swapId, customShippingOptions?, context?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
@@ -640,7 +626,7 @@ for differences associated with the swap. The swap represented by the
|
||||
swapId must belong to the order. Fails if there is already a cart on the
|
||||
swap.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -681,7 +667,7 @@ swap.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -699,14 +685,14 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### createFulfillment
|
||||
#### createFulfillment
|
||||
|
||||
`**createFulfillment**(swapId, config?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Fulfills the additional items associated with the swap. Will call the
|
||||
fulfillment providers associated with the shipping methods.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -729,7 +715,7 @@ fulfillment providers associated with the shipping methods.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -747,13 +733,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### createShipment
|
||||
#### createShipment
|
||||
|
||||
`**createShipment**(swapId, fulfillmentId, trackingLinks?, config?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -794,7 +780,7 @@ Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -812,13 +798,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### deleteMetadata
|
||||
#### deleteMetadata
|
||||
|
||||
`**deleteMetadata**(swapId, key): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Dedicated method to delete metadata for a swap.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -841,7 +827,7 @@ Dedicated method to delete metadata for a swap.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -859,13 +845,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### list
|
||||
#### list
|
||||
|
||||
`**list**(selector, config?): Promise<[Swap](Swap.mdx)[]>`
|
||||
|
||||
List swaps.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -888,7 +874,7 @@ List swaps.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)[]>
|
||||
|
||||
@@ -906,13 +892,13 @@ Promise<[Swap](Swap.mdx)[]>
|
||||
|
||||
___
|
||||
|
||||
### listAndCount
|
||||
#### listAndCount
|
||||
|
||||
`**listAndCount**(selector, config?): Promise<[[Swap](Swap.mdx)[], number]>`
|
||||
|
||||
List swaps.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -935,7 +921,7 @@ List swaps.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[[Swap](Swap.mdx)[], number]>
|
||||
|
||||
@@ -953,13 +939,13 @@ Promise<[[Swap](Swap.mdx)[], number]>
|
||||
|
||||
___
|
||||
|
||||
### processDifference
|
||||
#### processDifference
|
||||
|
||||
`**processDifference**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Process difference for the requested swap.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -973,7 +959,7 @@ Process difference for the requested swap.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -991,13 +977,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### registerCartCompletion
|
||||
#### registerCartCompletion
|
||||
|
||||
`**registerCartCompletion**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Register a cart completion
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1011,7 +997,7 @@ Register a cart completion
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -1029,14 +1015,14 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### registerReceived
|
||||
#### registerReceived
|
||||
|
||||
`**registerReceived**(id): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Registers the swap return items as received so that they cannot be used
|
||||
as a part of other swaps/returns.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1050,7 +1036,7 @@ as a part of other swaps/returns.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -1068,13 +1054,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
#### retrieve
|
||||
|
||||
`**retrieve**(swapId, config?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Retrieves a swap with the given id.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1097,7 +1083,7 @@ Retrieves a swap with the given id.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -1115,13 +1101,13 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### retrieveByCartId
|
||||
#### retrieveByCartId
|
||||
|
||||
`**retrieveByCartId**(cartId, relations?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Retrieves a swap based on its associated cart id
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1144,7 +1130,7 @@ Retrieves a swap based on its associated cart id
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -1162,11 +1148,11 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
#### shouldRetryTransaction\_
|
||||
|
||||
`Protected **shouldRetryTransaction_**(err): boolean`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1180,7 +1166,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
@@ -1198,13 +1184,13 @@ ___
|
||||
|
||||
___
|
||||
|
||||
### transformQueryForCart
|
||||
#### transformQueryForCart
|
||||
|
||||
`Protected **transformQueryForCart**(config): [Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, "select"> & { select?: string[] } & { cartRelations: undefined \| string[] ; cartSelects: undefined \| keyof [Cart](Cart.mdx)[] }`
|
||||
|
||||
Transform find config object for retrieval.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1218,7 +1204,7 @@ Transform find config object for retrieval.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
[Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, "select"> & ``{ select?: string[] }`` & ``{ cartRelations: undefined \| string[] ; cartSelects: undefined \| keyof [Cart](Cart.mdx)[] }``
|
||||
|
||||
@@ -1236,13 +1222,13 @@ Transform find config object for retrieval.
|
||||
|
||||
___
|
||||
|
||||
### update
|
||||
#### update
|
||||
|
||||
`**update**(swapId, update): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Update the swap record.
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1265,7 +1251,7 @@ Update the swap record.
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
@@ -1283,11 +1269,11 @@ Promise<[Swap](Swap.mdx)>
|
||||
|
||||
___
|
||||
|
||||
### withTransaction
|
||||
#### withTransaction
|
||||
|
||||
`**withTransaction**(transactionManager?): [SwapService](SwapService.mdx)`
|
||||
|
||||
#### Parameters
|
||||
##### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1301,7 +1287,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
##### Returns
|
||||
|
||||
[SwapService](SwapService.mdx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user