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 @@ Handles swaps
|
||||
|
||||
### constructor
|
||||
|
||||
**new SwapService**(`«destructured»`)
|
||||
`**new SwapService**(«destructured»)`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__namedParameters",
|
||||
"type": "[`InjectedProps`](../types/InjectedProps.mdx)",
|
||||
"type": "[InjectedProps](../types/InjectedProps.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -33,7 +33,7 @@ Handles swaps
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__configModule__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -51,7 +51,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "__moduleDeclaration__",
|
||||
"type": "Record<`string`, `unknown`\\>",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -60,7 +60,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "cartService_",
|
||||
"type": "[`CartService`](CartService.mdx)",
|
||||
"type": "[CartService](CartService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -69,7 +69,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "customShippingOptionService_",
|
||||
"type": "[`CustomShippingOptionService`](CustomShippingOptionService.mdx)",
|
||||
"type": "[CustomShippingOptionService](CustomShippingOptionService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -78,7 +78,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "eventBus_",
|
||||
"type": "[`EventBusService`](EventBusService.mdx)",
|
||||
"type": "[EventBusService](EventBusService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -87,7 +87,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "fulfillmentService_",
|
||||
"type": "[`FulfillmentService`](FulfillmentService.mdx)",
|
||||
"type": "[FulfillmentService](FulfillmentService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -96,7 +96,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "lineItemAdjustmentService_",
|
||||
"type": "[`LineItemAdjustmentService`](LineItemAdjustmentService.mdx)",
|
||||
"type": "[LineItemAdjustmentService](LineItemAdjustmentService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -105,7 +105,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "lineItemService_",
|
||||
"type": "[`LineItemService`](LineItemService.mdx)",
|
||||
"type": "[LineItemService](LineItemService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -114,7 +114,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "manager_",
|
||||
"type": "`EntityManager`",
|
||||
"type": "EntityManager",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -123,7 +123,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "orderService_",
|
||||
"type": "[`OrderService`](OrderService.mdx)",
|
||||
"type": "[OrderService](OrderService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -132,7 +132,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "paymentProviderService_",
|
||||
"type": "[`PaymentProviderService`](PaymentProviderService.mdx)",
|
||||
"type": "[PaymentProviderService](PaymentProviderService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -141,7 +141,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "productVariantInventoryService_",
|
||||
"type": "[`ProductVariantInventoryService`](ProductVariantInventoryService.mdx)",
|
||||
"type": "[ProductVariantInventoryService](ProductVariantInventoryService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -150,7 +150,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "returnService_",
|
||||
"type": "[`ReturnService`](ReturnService.mdx)",
|
||||
"type": "[ReturnService](ReturnService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -159,7 +159,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "shippingOptionService_",
|
||||
"type": "[`ShippingOptionService`](ShippingOptionService.mdx)",
|
||||
"type": "[ShippingOptionService](ShippingOptionService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -168,7 +168,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "swapRepository_",
|
||||
"type": "`Repository`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Repository<[Swap](Swap.mdx)>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -177,7 +177,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "totalsService_",
|
||||
"type": "[`TotalsService`](TotalsService.mdx)",
|
||||
"type": "[TotalsService](TotalsService.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -186,7 +186,7 @@ Handles swaps
|
||||
},
|
||||
{
|
||||
"name": "transactionManager_",
|
||||
"type": "`undefined` \\| `EntityManager`",
|
||||
"type": "`undefined` \\| EntityManager",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -289,16 +289,16 @@ Handles swaps
|
||||
|
||||
### activeManager\_
|
||||
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected get**activeManager_**(): EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`EntityManager`
|
||||
EntityManager
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "EntityManager",
|
||||
"type": "`EntityManager`",
|
||||
"type": "EntityManager",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
@@ -311,14 +311,14 @@ Handles swaps
|
||||
|
||||
### areReturnItemsValid
|
||||
|
||||
`Protected` **areReturnItemsValid**(`returnItems`): `Promise`<`boolean`\>
|
||||
`Protected **areReturnItemsValid**(returnItems): Promise<boolean>`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "returnItems",
|
||||
"type": "[`WithRequiredProperty`](../types/WithRequiredProperty.mdx)<[`Partial`](../types/Partial.mdx)<[`ReturnItem`](ReturnItem.mdx)\\>, ``\"item_id\"``\\>[]",
|
||||
"type": "[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Partial](../types/Partial.mdx)<[ReturnItem](ReturnItem.mdx)>, `\"item_id\"`>[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -329,12 +329,12 @@ Handles swaps
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`boolean`\>
|
||||
Promise<boolean>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<`boolean`\\>",
|
||||
"type": "Promise<boolean>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
@@ -347,7 +347,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
|
||||
@@ -379,7 +379,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": "",
|
||||
@@ -388,7 +388,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": "",
|
||||
@@ -397,7 +397,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": "",
|
||||
@@ -408,12 +408,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",
|
||||
@@ -426,7 +426,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
**cancel**(`swapId`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**cancel**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
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
|
||||
@@ -448,12 +448,12 @@ is associated with a refund, it cannot be canceled.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the canceled swap.",
|
||||
@@ -466,7 +466,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
**cancelFulfillment**(`fulfillmentId`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**cancelFulfillment**(fulfillmentId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Cancels a fulfillment (if related to a swap)
|
||||
|
||||
@@ -486,12 +486,12 @@ Cancels a fulfillment (if related to a swap)
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "updated swap",
|
||||
@@ -504,7 +504,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
**create**(`order`, `returnItems`, `additionalItems?`, `returnShipping?`, `custom?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**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.
|
||||
@@ -514,7 +514,7 @@ and an optional return shipping method.
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "order",
|
||||
"type": "[`Order`](Order.mdx)",
|
||||
"type": "[Order](Order.mdx)",
|
||||
"description": "the order to base the swap off",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -523,7 +523,7 @@ and an optional return shipping method.
|
||||
},
|
||||
{
|
||||
"name": "returnItems",
|
||||
"type": "[`WithRequiredProperty`](../types/WithRequiredProperty.mdx)<[`Partial`](../types/Partial.mdx)<[`ReturnItem`](ReturnItem.mdx)\\>, ``\"item_id\"``\\>[]",
|
||||
"type": "[WithRequiredProperty](../types/WithRequiredProperty.mdx)<[Partial](../types/Partial.mdx)<[ReturnItem](ReturnItem.mdx)>, `\"item_id\"`>[]",
|
||||
"description": "the items to return in the swap",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -532,7 +532,7 @@ and an optional return shipping method.
|
||||
},
|
||||
{
|
||||
"name": "additionalItems",
|
||||
"type": "[`Pick`](../types/Pick.mdx)<[`LineItem`](LineItem.mdx), ``\"variant_id\"`` \\| ``\"quantity\"``\\>[]",
|
||||
"type": "[Pick](../types/Pick.mdx)<[LineItem](LineItem.mdx), `\"variant_id\"` \\| `\"quantity\"`>[]",
|
||||
"description": "the items to send to the customer",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -569,7 +569,7 @@ and an optional return shipping method.
|
||||
{
|
||||
"name": "custom",
|
||||
"type": "`object`",
|
||||
"description": "contains relevant custom information. This object may include no_notification which will disable sending notification when creating swap. If set, it overrules the attribute inherited from the order",
|
||||
"description": "contains relevant custom information. This object may include no\\_notification which will disable sending notification when creating swap. If set, it overrules the attribute inherited from the order",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
@@ -615,12 +615,12 @@ and an optional return shipping method.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the newly created swap",
|
||||
@@ -633,7 +633,7 @@ ___
|
||||
|
||||
### createCart
|
||||
|
||||
**createCart**(`swapId`, `customShippingOptions?`, `context?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**createCart**(swapId, customShippingOptions?, context?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Creates a cart from the given swap. The cart can be used to pay
|
||||
for differences associated with the swap. The swap represented by the
|
||||
@@ -654,7 +654,7 @@ swap.
|
||||
},
|
||||
{
|
||||
"name": "customShippingOptions",
|
||||
"type": "{ `option_id`: `string` ; `price`: `number` }[]",
|
||||
"type": "`{ option_id: string ; price: number }`[]",
|
||||
"description": "the shipping options",
|
||||
"optional": false,
|
||||
"defaultValue": "[]",
|
||||
@@ -683,15 +683,15 @@ swap.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the swap with its cart_id prop set to the id of the new cart.",
|
||||
"description": "the swap with its cart\\_id prop set to the id of the new cart.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
@@ -701,7 +701,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
**createFulfillment**(`swapId`, `config?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**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.
|
||||
@@ -720,8 +720,8 @@ fulfillment providers associated with the shipping methods.
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`CreateShipmentConfig`](../types/CreateShipmentConfig.mdx)",
|
||||
"description": "optional configurations, includes optional metadata to attach to the shipment, and a no_notification flag.",
|
||||
"type": "[CreateShipmentConfig](../types/CreateShipmentConfig.mdx)",
|
||||
"description": "optional configurations, includes optional metadata to attach to the shipment, and a no\\_notification flag.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
@@ -731,12 +731,12 @@ fulfillment providers associated with the shipping methods.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the updated swap with new status and fulfillments.",
|
||||
@@ -749,7 +749,7 @@ ___
|
||||
|
||||
### createShipment
|
||||
|
||||
**createShipment**(`swapId`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**createShipment**(swapId, fulfillmentId, trackingLinks?, config?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
|
||||
@@ -776,7 +776,7 @@ Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
},
|
||||
{
|
||||
"name": "trackingLinks",
|
||||
"type": "{ `tracking_number`: `string` }[]",
|
||||
"type": "`{ tracking_number: string }`[]",
|
||||
"description": "the tracking numbers associated with the shipment",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -785,7 +785,7 @@ Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`CreateShipmentConfig`](../types/CreateShipmentConfig.mdx)",
|
||||
"type": "[CreateShipmentConfig](../types/CreateShipmentConfig.mdx)",
|
||||
"description": "optional configurations, includes optional metadata to attach to the shipment, and a noNotification flag.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -796,12 +796,12 @@ Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the updated swap with new fulfillments and status.",
|
||||
@@ -814,7 +814,7 @@ ___
|
||||
|
||||
### deleteMetadata
|
||||
|
||||
**deleteMetadata**(`swapId`, `key`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**deleteMetadata**(swapId, key): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Dedicated method to delete metadata for a swap.
|
||||
|
||||
@@ -843,12 +843,12 @@ Dedicated method to delete metadata for a swap.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "resolves to the updated result.",
|
||||
@@ -861,7 +861,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
**list**(`selector`, `config?`): `Promise`<[`Swap`](Swap.mdx)[]\>
|
||||
`**list**(selector, config?): Promise<[Swap](Swap.mdx)[]>`
|
||||
|
||||
List swaps.
|
||||
|
||||
@@ -870,7 +870,7 @@ List swaps.
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`Selector`](../types/Selector.mdx)<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "[Selector](../types/Selector.mdx)<[Swap](Swap.mdx)>",
|
||||
"description": "the query object for find",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -879,7 +879,7 @@ List swaps.
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>",
|
||||
"description": "the configuration used to find the objects. contains relations, skip, and take.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -890,12 +890,12 @@ List swaps.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)[]\>
|
||||
Promise<[Swap](Swap.mdx)[]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)[]\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)[]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the find operation",
|
||||
@@ -908,7 +908,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Swap`](Swap.mdx)[], `number`]\>
|
||||
`**listAndCount**(selector, config?): Promise<[[Swap](Swap.mdx)[], number]>`
|
||||
|
||||
List swaps.
|
||||
|
||||
@@ -917,7 +917,7 @@ List swaps.
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "selector",
|
||||
"type": "[`Selector`](../types/Selector.mdx)<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "[Selector](../types/Selector.mdx)<[Swap](Swap.mdx)>",
|
||||
"description": "the query object for find",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -926,7 +926,7 @@ List swaps.
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>",
|
||||
"description": "the configuration used to find the objects. contains relations, skip, and take.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -937,12 +937,12 @@ List swaps.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[[`Swap`](Swap.mdx)[], `number`]\>
|
||||
Promise<[[Swap](Swap.mdx)[], number]>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[[`Swap`](Swap.mdx)[], `number`]\\>",
|
||||
"type": "Promise<[[Swap](Swap.mdx)[], number]>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the result of the find operation",
|
||||
@@ -955,7 +955,7 @@ ___
|
||||
|
||||
### processDifference
|
||||
|
||||
**processDifference**(`swapId`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**processDifference**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Process difference for the requested swap.
|
||||
|
||||
@@ -975,12 +975,12 @@ Process difference for the requested swap.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "processed swap",
|
||||
@@ -993,7 +993,7 @@ ___
|
||||
|
||||
### registerCartCompletion
|
||||
|
||||
**registerCartCompletion**(`swapId`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**registerCartCompletion**(swapId): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Register a cart completion
|
||||
|
||||
@@ -1013,12 +1013,12 @@ Register a cart completion
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "swap related to the cart",
|
||||
@@ -1031,7 +1031,7 @@ ___
|
||||
|
||||
### registerReceived
|
||||
|
||||
**registerReceived**(`id`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**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.
|
||||
@@ -1052,12 +1052,12 @@ as a part of other swaps/returns.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the resulting order",
|
||||
@@ -1070,7 +1070,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
**retrieve**(`swapId`, `config?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**retrieve**(swapId, config?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Retrieves a swap with the given id.
|
||||
|
||||
@@ -1088,7 +1088,7 @@ Retrieves a swap with the given id.
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`Omit`](../types/Omit.mdx)<[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>, ``\"select\"``\\> & { `select?`: `string`[] }",
|
||||
"type": "[Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, `\"select\"`> & `{ select?: string[] }`",
|
||||
"description": "the configuration to retrieve the swap",
|
||||
"optional": false,
|
||||
"defaultValue": "{}",
|
||||
@@ -1099,12 +1099,12 @@ Retrieves a swap with the given id.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the swap",
|
||||
@@ -1117,7 +1117,7 @@ ___
|
||||
|
||||
### retrieveByCartId
|
||||
|
||||
**retrieveByCartId**(`cartId`, `relations?`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**retrieveByCartId**(cartId, relations?): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Retrieves a swap based on its associated cart id
|
||||
|
||||
@@ -1146,12 +1146,12 @@ Retrieves a swap based on its associated cart id
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "the swap",
|
||||
@@ -1164,14 +1164,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": "",
|
||||
@@ -1200,7 +1200,7 @@ ___
|
||||
|
||||
### 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)[] }
|
||||
`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.
|
||||
|
||||
@@ -1209,7 +1209,7 @@ Transform find config object for retrieval.
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "config",
|
||||
"type": "[`Omit`](../types/Omit.mdx)<[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>, ``\"select\"``\\> & { `select?`: `string`[] }",
|
||||
"type": "[Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, `\"select\"`> & `{ select?: string[] }`",
|
||||
"description": "parsed swap find config",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -1220,12 +1220,12 @@ Transform find config object for retrieval.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Omit`](../types/Omit.mdx)<[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\>, ``"select"``\> & { `select?`: `string`[] } & { `cartRelations`: `undefined` \| `string`[] ; `cartSelects`: `undefined` \| keyof [`Cart`](Cart.mdx)[] }
|
||||
[Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, `"select"`> & `{ select?: string[] }` & `{ cartRelations: undefined \| string[] ; cartSelects: undefined \| keyof [Cart](Cart.mdx)[] }`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "[`Omit`](../types/Omit.mdx)<[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>, ``\"select\"``\\> & { `select?`: `string`[] } & { `cartRelations`: `undefined` \\| `string`[] ; `cartSelects`: `undefined` \\| keyof [`Cart`](Cart.mdx)[] }",
|
||||
"type": "[`Omit`](../types/Omit.mdx)<[`FindConfig`](../interfaces/FindConfig.mdx)<[`Swap`](Swap.mdx)\\>, ``\"select\"``\\> & { `select?`: `string`[] } & { `cartRelations`: `undefined` \\| `string`[] ; `cartSelects`: `undefined` \\| keyof [`Cart`](Cart.mdx)[] }",
|
||||
"name": "Omit<FindConfig<Swap>, `\"select\"`> & { select?: string[] } & { cartRelations: undefined \\| string[] ; cartSelects: undefined \\| keyof Cart[] }",
|
||||
"type": "[Omit](../types/Omit.mdx)<[FindConfig](../interfaces/FindConfig.mdx)<[Swap](Swap.mdx)>, `\"select\"`> & `{ select?: string[] }` & `{ cartRelations: undefined \\| string[] ; cartSelects: undefined \\| keyof [Cart](Cart.mdx)[] }`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "transformed find swap config",
|
||||
@@ -1238,7 +1238,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
**update**(`swapId`, `update`): `Promise`<[`Swap`](Swap.mdx)\>
|
||||
`**update**(swapId, update): Promise<[Swap](Swap.mdx)>`
|
||||
|
||||
Update the swap record.
|
||||
|
||||
@@ -1256,7 +1256,7 @@ Update the swap record.
|
||||
},
|
||||
{
|
||||
"name": "update",
|
||||
"type": "[`Partial`](../types/Partial.mdx)<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "[Partial](../types/Partial.mdx)<[Swap](Swap.mdx)>",
|
||||
"description": "new data",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
@@ -1267,12 +1267,12 @@ Update the swap record.
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`Swap`](Swap.mdx)\>
|
||||
Promise<[Swap](Swap.mdx)>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "`Promise`<[`Swap`](Swap.mdx)\\>",
|
||||
"type": "Promise<[Swap](Swap.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "updated swap record",
|
||||
@@ -1285,14 +1285,14 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
**withTransaction**(`transactionManager?`): [`SwapService`](SwapService.mdx)
|
||||
`**withTransaction**(transactionManager?): [SwapService](SwapService.mdx)`
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`EntityManager`",
|
||||
"type": "EntityManager",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
@@ -1303,12 +1303,12 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SwapService`](SwapService.mdx)
|
||||
[SwapService](SwapService.mdx)
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "SwapService",
|
||||
"type": "[`SwapService`](SwapService.mdx)",
|
||||
"type": "[SwapService](SwapService.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
|
||||
Reference in New Issue
Block a user