docs: update override price selection strategy documentation (#5438)
* docs: update override price selection strategy documentation * fix eslint errors
This commit is contained in:
1 parent
8bc902fb0f
commit
1a10822cae
540 files changed
+244366
-18865
No files matched your search
+2
-2
@@ -163,7 +163,7 @@ Base abstract entity for all entities
|
||||
|
||||
### loadStatus
|
||||
|
||||
▸ **loadStatus**(): `void`
|
||||
**loadStatus**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -184,7 +184,7 @@ ___
|
||||
|
||||
### toJSON
|
||||
|
||||
▸ **toJSON**(): [`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)
|
||||
**toJSON**(): [`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
+2
-2
@@ -371,7 +371,7 @@ Base abstract entity for all entities
|
||||
|
||||
### afterUpdateOrLoad
|
||||
|
||||
▸ **afterUpdateOrLoad**(): `void`
|
||||
**afterUpdateOrLoad**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -392,7 +392,7 @@ ___
|
||||
|
||||
### beforeUpdate
|
||||
|
||||
▸ **beforeUpdate**(): `void`
|
||||
**beforeUpdate**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
+1
-1
@@ -259,7 +259,7 @@ Base abstract entity for all entities
|
||||
|
||||
### loadStatus
|
||||
|
||||
▸ **loadStatus**(): `void`
|
||||
**loadStatus**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
+6
-6
@@ -29,7 +29,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### eventToSubscribersMap
|
||||
|
||||
• `get` **eventToSubscribersMap**(): `Map`<`string` \| `symbol`, [`SubscriberDescriptor`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriberdescriptor)[]\>
|
||||
`get` **eventToSubscribersMap**(): `Map`<`string` \| `symbol`, [`SubscriberDescriptor`](../../admin_discounts/modules/admin_discounts.internal.mdx#subscriberdescriptor)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -76,7 +76,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### emit
|
||||
|
||||
▸ `Abstract` **emit**<`T`\>(`eventName`, `data`, `options`): `Promise`<`void`\>
|
||||
`Abstract` **emit**<`T`\>(`eventName`, `data`, `options`): `Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -137,7 +137,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
[IEventBusModuleService](../interfaces/admin_discounts.internal.IEventBusModuleService.mdx).[emit](../interfaces/admin_discounts.internal.IEventBusModuleService.mdx#emit)
|
||||
|
||||
▸ `Abstract` **emit**<`T`\>(`data`): `Promise`<`void`\>
|
||||
`Abstract` **emit**<`T`\>(`data`): `Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -186,7 +186,7 @@ ___
|
||||
|
||||
### storeSubscribers
|
||||
|
||||
▸ `Protected` **storeSubscribers**(`«destructured»`): `void`
|
||||
`Protected` **storeSubscribers**(`«destructured»`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -244,7 +244,7 @@ ___
|
||||
|
||||
### subscribe
|
||||
|
||||
▸ **subscribe**(`eventName`, `subscriber`, `context?`): [`AbstractEventBusModuleService`](admin_discounts.internal.AbstractEventBusModuleService.mdx)
|
||||
**subscribe**(`eventName`, `subscriber`, `context?`): [`AbstractEventBusModuleService`](admin_discounts.internal.AbstractEventBusModuleService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -298,7 +298,7 @@ ___
|
||||
|
||||
### unsubscribe
|
||||
|
||||
▸ **unsubscribe**(`eventName`, `subscriber`, `context`): [`AbstractEventBusModuleService`](admin_discounts.internal.AbstractEventBusModuleService.mdx)
|
||||
**unsubscribe**(`eventName`, `subscriber`, `context`): [`AbstractEventBusModuleService`](admin_discounts.internal.AbstractEventBusModuleService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -37,7 +37,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### options
|
||||
|
||||
• `get` **options**(): Record<`string`, `unknown`\>
|
||||
`get` **options**(): Record<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -79,7 +79,7 @@ Record<`string`, `unknown`\>
|
||||
|
||||
### addDocuments
|
||||
|
||||
▸ `Abstract` **addDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
`Abstract` **addDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
|
||||
Used to index documents by the search engine provider
|
||||
|
||||
@@ -135,7 +135,7 @@ ___
|
||||
|
||||
### createIndex
|
||||
|
||||
▸ `Abstract` **createIndex**(`indexName`, `options`): `unknown`
|
||||
`Abstract` **createIndex**(`indexName`, `options`): `unknown`
|
||||
|
||||
Used to create an index
|
||||
|
||||
@@ -183,7 +183,7 @@ ___
|
||||
|
||||
### deleteAllDocuments
|
||||
|
||||
▸ `Abstract` **deleteAllDocuments**(`indexName`): `unknown`
|
||||
`Abstract` **deleteAllDocuments**(`indexName`): `unknown`
|
||||
|
||||
Used to delete all documents
|
||||
|
||||
@@ -223,7 +223,7 @@ ___
|
||||
|
||||
### deleteDocument
|
||||
|
||||
▸ `Abstract` **deleteDocument**(`indexName`, `document_id`): `unknown`
|
||||
`Abstract` **deleteDocument**(`indexName`, `document_id`): `unknown`
|
||||
|
||||
Used to delete document
|
||||
|
||||
@@ -271,7 +271,7 @@ ___
|
||||
|
||||
### getIndex
|
||||
|
||||
▸ `Abstract` **getIndex**(`indexName`): `unknown`
|
||||
`Abstract` **getIndex**(`indexName`): `unknown`
|
||||
|
||||
Used to get an index
|
||||
|
||||
@@ -311,7 +311,7 @@ ___
|
||||
|
||||
### replaceDocuments
|
||||
|
||||
▸ `Abstract` **replaceDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
`Abstract` **replaceDocuments**(`indexName`, `documents`, `type`): `unknown`
|
||||
|
||||
Used to replace documents
|
||||
|
||||
@@ -367,7 +367,7 @@ ___
|
||||
|
||||
### search
|
||||
|
||||
▸ `Abstract` **search**(`indexName`, `query`, `options`): `unknown`
|
||||
`Abstract` **search**(`indexName`, `query`, `options`): `unknown`
|
||||
|
||||
Used to search for a document in an index
|
||||
|
||||
@@ -423,7 +423,7 @@ ___
|
||||
|
||||
### updateSettings
|
||||
|
||||
▸ `Abstract` **updateSettings**(`indexName`, `settings`): `unknown`
|
||||
`Abstract` **updateSettings**(`indexName`, `settings`): `unknown`
|
||||
|
||||
Used to update the settings of an index
|
||||
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ v15.7.0, v14.18.0
|
||||
|
||||
### arrayBuffer
|
||||
|
||||
▸ **arrayBuffer**(): `Promise`<`ArrayBuffer`\>
|
||||
**arrayBuffer**(): `Promise`<`ArrayBuffer`\>
|
||||
|
||||
Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
||||
the `Blob` data.
|
||||
@@ -68,7 +68,7 @@ ___
|
||||
|
||||
### slice
|
||||
|
||||
▸ **slice**(`start?`, `end?`, `type?`): [`Blob`](admin_discounts.internal.Blob.mdx)
|
||||
**slice**(`start?`, `end?`, `type?`): [`Blob`](admin_discounts.internal.Blob.mdx)
|
||||
|
||||
Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
||||
data. The original `Blob` is not altered.
|
||||
@@ -125,7 +125,7 @@ ___
|
||||
|
||||
### stream
|
||||
|
||||
▸ **stream**(): [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`any`\>
|
||||
**stream**(): [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`any`\>
|
||||
|
||||
Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
|
||||
|
||||
@@ -161,7 +161,7 @@ ___
|
||||
|
||||
### text
|
||||
|
||||
▸ **text**(): `Promise`<`string`\>
|
||||
**text**(): `Promise`<`string`\>
|
||||
|
||||
Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
||||
UTF-8 string.
|
||||
|
||||
+128
-128
File diff suppressed because it is too large.
Load diff
+21
-21
@@ -64,7 +64,7 @@ v0.1.26
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**addListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Alias for `emitter.on(eventName, listener)`.
|
||||
|
||||
@@ -116,7 +116,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`eventName`, `...args`): `boolean`
|
||||
**emit**(`eventName`, `...args`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -204,7 +204,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -259,7 +259,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.EventEmitter-1.mdx#defaultmaxlisteners).
|
||||
@@ -291,7 +291,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -397,7 +397,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**off**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -449,7 +449,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**on**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -526,7 +526,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**once**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -601,7 +601,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**prependListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -664,7 +664,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**prependOnceListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -725,7 +725,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -795,7 +795,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**removeAllListeners**(`event?`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -845,7 +845,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**removeListener**(`eventName`, `listener`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -975,7 +975,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
**setMaxListeners**(`n`): [`EventEmitter`](admin_discounts.internal.EventEmitter-1.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -1024,7 +1024,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1095,7 +1095,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -1161,7 +1161,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -1283,7 +1283,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -1432,7 +1432,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
NodeJS.EventEmitter.once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1504,7 +1504,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### isFeatureEnabled
|
||||
|
||||
▸ **isFeatureEnabled**(`flag`): `boolean`
|
||||
**isFeatureEnabled**(`flag`): `boolean`
|
||||
|
||||
Check if a feature flag is enabled.
|
||||
There are two ways of using this method:
|
||||
@@ -75,7 +75,7 @@ ___
|
||||
|
||||
### listFlags
|
||||
|
||||
▸ **listFlags**(): [`FeatureFlagsResponse`](../../admin_discounts/modules/admin_discounts.internal.mdx#featureflagsresponse-1)
|
||||
**listFlags**(): [`FeatureFlagsResponse`](../../admin_discounts/modules/admin_discounts.internal.mdx#featureflagsresponse-1)
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -100,7 +100,7 @@ ___
|
||||
|
||||
### setFlag
|
||||
|
||||
▸ **setFlag**(`key`, `value`): `void`
|
||||
**setFlag**(`key`, `value`): `void`
|
||||
|
||||
Sets a feature flag.
|
||||
Flags take two shapes:
|
||||
|
||||
+11
-11
@@ -123,7 +123,7 @@ Handles Fulfillments
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -148,7 +148,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -225,7 +225,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillmentOrId`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
**cancelFulfillment**(`fulfillmentOrId`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
|
||||
Cancels a fulfillment with the fulfillment provider. Will decrement the
|
||||
fulfillment_quantity on the line items associated with the fulfillment.
|
||||
@@ -272,7 +272,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`order`, `itemsToFulfill`, `custom?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)[]\>
|
||||
**createFulfillment**(`order`, `itemsToFulfill`, `custom?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)[]\>
|
||||
|
||||
Creates an order fulfillment
|
||||
If items needs to be fulfilled by different provider, we make
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### createShipment
|
||||
|
||||
▸ **createShipment**(`fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
**createShipment**(`fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
|
||||
Creates a shipment by marking a fulfillment as shipped. Adds
|
||||
tracking links and potentially more metadata.
|
||||
@@ -407,7 +407,7 @@ ___
|
||||
|
||||
### getFulfillmentItems\_
|
||||
|
||||
▸ **getFulfillmentItems_**(`order`, `items`): `Promise`<(``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx))[]\>
|
||||
**getFulfillmentItems_**(`order`, `items`): `Promise`<(``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx))[]\>
|
||||
|
||||
Retrieves the order line items, given an array of items.
|
||||
|
||||
@@ -469,7 +469,7 @@ ___
|
||||
|
||||
### partitionItems\_
|
||||
|
||||
▸ **partitionItems_**(`shippingMethods`, `items`): [`FulfillmentItemPartition`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentitempartition)[]
|
||||
**partitionItems_**(`shippingMethods`, `items`): [`FulfillmentItemPartition`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentitempartition)[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -520,7 +520,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`fulfillmentId`, `config?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
**retrieve**(`fulfillmentId`, `config?`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
|
||||
Retrieves a fulfillment by its id.
|
||||
|
||||
@@ -573,7 +573,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -611,7 +611,7 @@ ___
|
||||
|
||||
### validateFulfillmentLineItem\_
|
||||
|
||||
▸ **validateFulfillmentLineItem_**(`item`, `quantity`): ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)
|
||||
**validateFulfillmentLineItem_**(`item`, `quantity`): ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)
|
||||
|
||||
Checks that a given quantity of a line item can be fulfilled. Fails if the
|
||||
fulfillable quantity is lower than the requested fulfillment quantity.
|
||||
@@ -658,7 +658,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`FulfillmentService`](admin_discounts.internal.FulfillmentService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`FulfillmentService`](admin_discounts.internal.FulfillmentService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+1
-1
@@ -195,7 +195,7 @@ Standardized error to be used across Medusa project.
|
||||
|
||||
### captureStackTrace
|
||||
|
||||
▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
||||
`Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
|
||||
|
||||
Create .stack property on a target object
|
||||
|
||||
|
||||
+130
-130
File diff suppressed because it is too large.
Load diff
+9
-9
@@ -137,7 +137,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -162,7 +162,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -239,7 +239,7 @@ ___
|
||||
|
||||
### capture
|
||||
|
||||
▸ **capture**(`paymentOrId`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**capture**(`paymentOrId`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
Captures a payment.
|
||||
|
||||
@@ -284,7 +284,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`paymentInput`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**create**(`paymentInput`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
Created a new payment.
|
||||
|
||||
@@ -329,7 +329,7 @@ ___
|
||||
|
||||
### refund
|
||||
|
||||
▸ **refund**(`paymentOrId`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
**refund**(`paymentOrId`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
|
||||
refunds a payment.
|
||||
|
||||
@@ -398,7 +398,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`paymentId`, `config?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**retrieve**(`paymentId`, `config?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
Retrieves a payment by id.
|
||||
|
||||
@@ -451,7 +451,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -489,7 +489,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`paymentId`, `data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**update**(`paymentId`, `data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
Updates a payment in order to link it to an order or a swap.
|
||||
|
||||
@@ -558,7 +558,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`PaymentService`](admin_discounts.internal.PaymentService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`PaymentService`](admin_discounts.internal.PaymentService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+89
-89
@@ -149,7 +149,7 @@ v0.9.4
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
**[asyncIterator]**(): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -183,7 +183,7 @@ ___
|
||||
|
||||
### \_construct
|
||||
|
||||
▸ `Optional` **_construct**(`callback`): `void`
|
||||
`Optional` **_construct**(`callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -221,7 +221,7 @@ ___
|
||||
|
||||
### \_destroy
|
||||
|
||||
▸ **_destroy**(`error`, `callback`): `void`
|
||||
**_destroy**(`error`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -267,7 +267,7 @@ ___
|
||||
|
||||
### \_read
|
||||
|
||||
▸ **_read**(`size`): `void`
|
||||
**_read**(`size`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -305,7 +305,7 @@ ___
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Event emitter
|
||||
The defined events on documents including:
|
||||
@@ -357,7 +357,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -399,7 +399,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -441,7 +441,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -483,7 +483,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -525,7 +525,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -567,7 +567,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -609,7 +609,7 @@ The defined events on documents including:
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[addListener](admin_discounts.internal.ReadableBase.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**addListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -655,7 +655,7 @@ ___
|
||||
|
||||
### destroy
|
||||
|
||||
▸ **destroy**(`error?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**destroy**(`error?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
|
||||
stream will release any internal resources and subsequent calls to `push()`will be ignored.
|
||||
@@ -705,7 +705,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -781,7 +781,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`, `chunk`): `boolean`
|
||||
**emit**(`event`, `chunk`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -823,7 +823,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -857,7 +857,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`, `err`): `boolean`
|
||||
**emit**(`event`, `err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -899,7 +899,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -933,7 +933,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -967,7 +967,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1001,7 +1001,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[emit](admin_discounts.internal.ReadableBase.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`, `...args`): `boolean`
|
||||
**emit**(`event`, `...args`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1047,7 +1047,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -1102,7 +1102,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.Readable.mdx#defaultmaxlisteners).
|
||||
@@ -1134,7 +1134,7 @@ ___
|
||||
|
||||
### isPaused
|
||||
|
||||
▸ **isPaused**(): `boolean`
|
||||
**isPaused**(): `boolean`
|
||||
|
||||
The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
|
||||
typical cases, there will be no reason to
|
||||
@@ -1177,7 +1177,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -1231,7 +1231,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1283,7 +1283,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**off**(`eventName`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -1335,7 +1335,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -1408,7 +1408,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1450,7 +1450,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1492,7 +1492,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1534,7 +1534,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1576,7 +1576,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1618,7 +1618,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1660,7 +1660,7 @@ v0.1.101
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[on](admin_discounts.internal.ReadableBase.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**on**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1706,7 +1706,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -1777,7 +1777,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1819,7 +1819,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1861,7 +1861,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1903,7 +1903,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1945,7 +1945,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1987,7 +1987,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2029,7 +2029,7 @@ v0.3.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**once**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2075,7 +2075,7 @@ ___
|
||||
|
||||
### pause
|
||||
|
||||
▸ **pause**(): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**pause**(): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
The `readable.pause()` method will cause a stream in flowing mode to stop
|
||||
emitting `'data'` events, switching out of flowing mode. Any data that
|
||||
@@ -2123,7 +2123,7 @@ ___
|
||||
|
||||
### pipe
|
||||
|
||||
▸ **pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
**pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -2179,7 +2179,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -2238,7 +2238,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2280,7 +2280,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2322,7 +2322,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2364,7 +2364,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2406,7 +2406,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2448,7 +2448,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2490,7 +2490,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependListener](admin_discounts.internal.ReadableBase.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2536,7 +2536,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -2593,7 +2593,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2635,7 +2635,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2677,7 +2677,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2719,7 +2719,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2761,7 +2761,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2803,7 +2803,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2845,7 +2845,7 @@ v6.0.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[prependOnceListener](admin_discounts.internal.ReadableBase.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2891,7 +2891,7 @@ ___
|
||||
|
||||
### push
|
||||
|
||||
▸ **push**(`chunk`, `encoding?`): `boolean`
|
||||
**push**(`chunk`, `encoding?`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2937,7 +2937,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -3007,7 +3007,7 @@ ___
|
||||
|
||||
### read
|
||||
|
||||
▸ **read**(`size?`): `any`
|
||||
**read**(`size?`): `any`
|
||||
|
||||
The `readable.read()` method reads data out of the internal buffer and
|
||||
returns it. If no data is available to be read, `null` is returned. By default,
|
||||
@@ -3122,7 +3122,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeAllListeners**(`event?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -3172,7 +3172,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -3298,7 +3298,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3340,7 +3340,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3382,7 +3382,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3424,7 +3424,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3466,7 +3466,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3508,7 +3508,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3550,7 +3550,7 @@ v0.1.26
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[removeListener](admin_discounts.internal.ReadableBase.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**removeListener**(`event`, `listener`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3596,7 +3596,7 @@ ___
|
||||
|
||||
### resume
|
||||
|
||||
▸ **resume**(): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**resume**(): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
The `readable.resume()` method causes an explicitly paused `Readable` stream to
|
||||
resume emitting `'data'` events, switching the stream into flowing mode.
|
||||
@@ -3641,7 +3641,7 @@ ___
|
||||
|
||||
### setEncoding
|
||||
|
||||
▸ **setEncoding**(`encoding`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**setEncoding**(`encoding`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
The `readable.setEncoding()` method sets the character encoding for
|
||||
data read from the `Readable` stream.
|
||||
@@ -3704,7 +3704,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**setMaxListeners**(`n`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -3753,7 +3753,7 @@ ___
|
||||
|
||||
### unpipe
|
||||
|
||||
▸ **unpipe**(`destination?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**unpipe**(`destination?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
The `readable.unpipe()` method detaches a `Writable` stream previously attached
|
||||
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
|
||||
@@ -3818,7 +3818,7 @@ ___
|
||||
|
||||
### unshift
|
||||
|
||||
▸ **unshift**(`chunk`, `encoding?`): `void`
|
||||
**unshift**(`chunk`, `encoding?`): `void`
|
||||
|
||||
Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
|
||||
same as `readable.push(null)`, after which no more data can be written. The EOF
|
||||
@@ -3928,7 +3928,7 @@ ___
|
||||
|
||||
### wrap
|
||||
|
||||
▸ **wrap**(`stream`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
**wrap**(`stream`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
|
||||
information.)
|
||||
@@ -3992,7 +3992,7 @@ ___
|
||||
|
||||
### from
|
||||
|
||||
▸ `Static` **from**(`iterable`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
`Static` **from**(`iterable`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
A utility method for creating Readable Streams out of iterators.
|
||||
|
||||
@@ -4040,7 +4040,7 @@ ___
|
||||
|
||||
### fromWeb
|
||||
|
||||
▸ `Static` **fromWeb**(`readableStream`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
`Static` **fromWeb**(`readableStream`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
A utility method for creating a `Readable` from a web `ReadableStream`.
|
||||
|
||||
@@ -4088,7 +4088,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -4163,7 +4163,7 @@ ___
|
||||
|
||||
### isDisturbed
|
||||
|
||||
▸ `Static` **isDisturbed**(`stream`): `boolean`
|
||||
`Static` **isDisturbed**(`stream`): `boolean`
|
||||
|
||||
Returns whether the stream has been read from or cancelled.
|
||||
|
||||
@@ -4207,7 +4207,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -4273,7 +4273,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -4395,7 +4395,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -4544,7 +4544,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
[ReadableBase](admin_discounts.internal.ReadableBase.mdx).[once](admin_discounts.internal.ReadableBase.mdx#once-1)
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -4616,7 +4616,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
@@ -4675,7 +4675,7 @@ ___
|
||||
|
||||
### toWeb
|
||||
|
||||
▸ `Static` **toWeb**(`streamReadable`): [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`any`\>
|
||||
`Static` **toWeb**(`streamReadable`): [`ReadableStream`](../../admin_discounts/modules/admin_discounts.internal.mdx#readablestream)<`any`\>
|
||||
|
||||
A utility method for creating a web `ReadableStream` from a `Readable`.
|
||||
|
||||
|
||||
+87
-87
@@ -164,7 +164,7 @@ v0.1.26
|
||||
|
||||
### [asyncIterator]
|
||||
|
||||
▸ **[asyncIterator]**(): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
**[asyncIterator]**(): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -198,7 +198,7 @@ ___
|
||||
|
||||
### \_construct
|
||||
|
||||
▸ `Optional` **_construct**(`callback`): `void`
|
||||
`Optional` **_construct**(`callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -232,7 +232,7 @@ ___
|
||||
|
||||
### \_destroy
|
||||
|
||||
▸ **_destroy**(`error`, `callback`): `void`
|
||||
**_destroy**(`error`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -274,7 +274,7 @@ ___
|
||||
|
||||
### \_read
|
||||
|
||||
▸ **_read**(`size`): `void`
|
||||
**_read**(`size`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -308,7 +308,7 @@ ___
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Event emitter
|
||||
The defined events on documents including:
|
||||
@@ -364,7 +364,7 @@ The defined events on documents including:
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[addListener](admin_discounts.internal.Stream.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -410,7 +410,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -456,7 +456,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -502,7 +502,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -548,7 +548,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -594,7 +594,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -640,7 +640,7 @@ NodeJS.ReadableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -690,7 +690,7 @@ ___
|
||||
|
||||
### destroy
|
||||
|
||||
▸ **destroy**(`error?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**destroy**(`error?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the readable
|
||||
stream will release any internal resources and subsequent calls to `push()`will be ignored.
|
||||
@@ -736,7 +736,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -816,7 +816,7 @@ v0.1.26
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[emit](admin_discounts.internal.Stream.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`, `chunk`): `boolean`
|
||||
**emit**(`event`, `chunk`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -862,7 +862,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -900,7 +900,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `err`): `boolean`
|
||||
**emit**(`event`, `err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -946,7 +946,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -984,7 +984,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1022,7 +1022,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1060,7 +1060,7 @@ NodeJS.ReadableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `...args`): `boolean`
|
||||
**emit**(`event`, `...args`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1110,7 +1110,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -1169,7 +1169,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.ReadableBase.mdx#defaultmaxlisteners).
|
||||
@@ -1205,7 +1205,7 @@ ___
|
||||
|
||||
### isPaused
|
||||
|
||||
▸ **isPaused**(): `boolean`
|
||||
**isPaused**(): `boolean`
|
||||
|
||||
The `readable.isPaused()` method returns the current operating state of the`Readable`. This is used primarily by the mechanism that underlies the`readable.pipe()` method. In most
|
||||
typical cases, there will be no reason to
|
||||
@@ -1248,7 +1248,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -1306,7 +1306,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1362,7 +1362,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**off**(`eventName`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -1418,7 +1418,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -1495,7 +1495,7 @@ v0.1.101
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[on](admin_discounts.internal.Stream.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1541,7 +1541,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1587,7 +1587,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1633,7 +1633,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1679,7 +1679,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1725,7 +1725,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1771,7 +1771,7 @@ NodeJS.ReadableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**on**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1821,7 +1821,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -1896,7 +1896,7 @@ v0.3.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[once](admin_discounts.internal.Stream.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1942,7 +1942,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1988,7 +1988,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2034,7 +2034,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2080,7 +2080,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2126,7 +2126,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2172,7 +2172,7 @@ NodeJS.ReadableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**once**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2222,7 +2222,7 @@ ___
|
||||
|
||||
### pause
|
||||
|
||||
▸ **pause**(): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**pause**(): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
The `readable.pause()` method will cause a stream in flowing mode to stop
|
||||
emitting `'data'` events, switching out of flowing mode. Any data that
|
||||
@@ -2270,7 +2270,7 @@ ___
|
||||
|
||||
### pipe
|
||||
|
||||
▸ **pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
**pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -2330,7 +2330,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -2393,7 +2393,7 @@ v6.0.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[prependListener](admin_discounts.internal.Stream.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2439,7 +2439,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2485,7 +2485,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2531,7 +2531,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2577,7 +2577,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2623,7 +2623,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2669,7 +2669,7 @@ NodeJS.ReadableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2719,7 +2719,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -2780,7 +2780,7 @@ v6.0.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[prependOnceListener](admin_discounts.internal.Stream.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2826,7 +2826,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2872,7 +2872,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2918,7 +2918,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2964,7 +2964,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3010,7 +3010,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3056,7 +3056,7 @@ NodeJS.ReadableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3106,7 +3106,7 @@ ___
|
||||
|
||||
### push
|
||||
|
||||
▸ **push**(`chunk`, `encoding?`): `boolean`
|
||||
**push**(`chunk`, `encoding?`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3148,7 +3148,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -3222,7 +3222,7 @@ ___
|
||||
|
||||
### read
|
||||
|
||||
▸ **read**(`size?`): `any`
|
||||
**read**(`size?`): `any`
|
||||
|
||||
The `readable.read()` method reads data out of the internal buffer and
|
||||
returns it. If no data is available to be read, `null` is returned. By default,
|
||||
@@ -3337,7 +3337,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeAllListeners**(`event?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -3391,7 +3391,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -3521,7 +3521,7 @@ v0.1.26
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[removeListener](admin_discounts.internal.Stream.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3567,7 +3567,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3613,7 +3613,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3659,7 +3659,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3705,7 +3705,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3751,7 +3751,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3797,7 +3797,7 @@ NodeJS.ReadableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3847,7 +3847,7 @@ ___
|
||||
|
||||
### resume
|
||||
|
||||
▸ **resume**(): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**resume**(): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
The `readable.resume()` method causes an explicitly paused `Readable` stream to
|
||||
resume emitting `'data'` events, switching the stream into flowing mode.
|
||||
@@ -3892,7 +3892,7 @@ ___
|
||||
|
||||
### setEncoding
|
||||
|
||||
▸ **setEncoding**(`encoding`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**setEncoding**(`encoding`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
The `readable.setEncoding()` method sets the character encoding for
|
||||
data read from the `Readable` stream.
|
||||
@@ -3955,7 +3955,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**setMaxListeners**(`n`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -4008,7 +4008,7 @@ ___
|
||||
|
||||
### unpipe
|
||||
|
||||
▸ **unpipe**(`destination?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**unpipe**(`destination?`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
The `readable.unpipe()` method detaches a `Writable` stream previously attached
|
||||
using the [pipe](../interfaces/admin_discounts.internal.internal.MedusaRequest.mdx#pipe) method.
|
||||
@@ -4073,7 +4073,7 @@ ___
|
||||
|
||||
### unshift
|
||||
|
||||
▸ **unshift**(`chunk`, `encoding?`): `void`
|
||||
**unshift**(`chunk`, `encoding?`): `void`
|
||||
|
||||
Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
|
||||
same as `readable.push(null)`, after which no more data can be written. The EOF
|
||||
@@ -4183,7 +4183,7 @@ ___
|
||||
|
||||
### wrap
|
||||
|
||||
▸ **wrap**(`stream`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
**wrap**(`stream`): [`ReadableBase`](admin_discounts.internal.ReadableBase.mdx)
|
||||
|
||||
Prior to Node.js 0.10, streams did not implement the entire `node:stream`module API as it is currently defined. (See `Compatibility` for more
|
||||
information.)
|
||||
@@ -4247,7 +4247,7 @@ ___
|
||||
|
||||
### from
|
||||
|
||||
▸ `Static` **from**(`iterable`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
`Static` **from**(`iterable`, `options?`): [`Readable`](admin_discounts.internal.Readable.mdx)
|
||||
|
||||
A utility method for creating Readable Streams out of iterators.
|
||||
|
||||
@@ -4291,7 +4291,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -4366,7 +4366,7 @@ ___
|
||||
|
||||
### isDisturbed
|
||||
|
||||
▸ `Static` **isDisturbed**(`stream`): `boolean`
|
||||
`Static` **isDisturbed**(`stream`): `boolean`
|
||||
|
||||
Returns whether the stream has been read from or cancelled.
|
||||
|
||||
@@ -4406,7 +4406,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -4472,7 +4472,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -4594,7 +4594,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -4743,7 +4743,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[once](admin_discounts.internal.Stream.mdx#once-1)
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -4815,7 +4815,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
|
||||
+127
-127
File diff suppressed because it is too large.
Load diff
+22
-22
@@ -64,7 +64,7 @@ v0.1.26
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**addListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Alias for `emitter.on(eventName, listener)`.
|
||||
|
||||
@@ -116,7 +116,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`eventName`, `...args`): `boolean`
|
||||
**emit**(`eventName`, `...args`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -204,7 +204,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -259,7 +259,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.Stream.mdx#defaultmaxlisteners).
|
||||
@@ -291,7 +291,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -397,7 +397,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**off**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -449,7 +449,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**on**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -526,7 +526,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**once**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -601,7 +601,7 @@ ___
|
||||
|
||||
### pipe
|
||||
|
||||
▸ **pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
**pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -657,7 +657,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**prependListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -720,7 +720,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**prependOnceListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -781,7 +781,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -851,7 +851,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**removeAllListeners**(`event?`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -901,7 +901,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**removeListener**(`eventName`, `listener`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -1031,7 +1031,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
**setMaxListeners**(`n`): [`Stream`](admin_discounts.internal.Stream.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -1080,7 +1080,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1155,7 +1155,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -1221,7 +1221,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -1343,7 +1343,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -1492,7 +1492,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
[internal](admin_discounts.internal.internal-5.mdx).[once](admin_discounts.internal.internal-5.mdx#once-1)
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1564,7 +1564,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
|
||||
+130
-130
File diff suppressed because it is too large.
Load diff
+78
-78
@@ -160,7 +160,7 @@ v0.1.26
|
||||
|
||||
### \_construct
|
||||
|
||||
▸ `Optional` **_construct**(`callback`): `void`
|
||||
`Optional` **_construct**(`callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -194,7 +194,7 @@ ___
|
||||
|
||||
### \_destroy
|
||||
|
||||
▸ **_destroy**(`error`, `callback`): `void`
|
||||
**_destroy**(`error`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -236,7 +236,7 @@ ___
|
||||
|
||||
### \_final
|
||||
|
||||
▸ **_final**(`callback`): `void`
|
||||
**_final**(`callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -270,7 +270,7 @@ ___
|
||||
|
||||
### \_write
|
||||
|
||||
▸ **_write**(`chunk`, `encoding`, `callback`): `void`
|
||||
**_write**(`chunk`, `encoding`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -320,7 +320,7 @@ ___
|
||||
|
||||
### \_writev
|
||||
|
||||
▸ `Optional` **_writev**(`chunks`, `callback`): `void`
|
||||
`Optional` **_writev**(`chunks`, `callback`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -362,7 +362,7 @@ ___
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Event emitter
|
||||
The defined events on documents including:
|
||||
@@ -417,7 +417,7 @@ The defined events on documents including:
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[addListener](admin_discounts.internal.Stream.mdx#addlistener)
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -463,7 +463,7 @@ NodeJS.WritableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -509,7 +509,7 @@ NodeJS.WritableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -555,7 +555,7 @@ NodeJS.WritableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -601,7 +601,7 @@ NodeJS.WritableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -647,7 +647,7 @@ NodeJS.WritableStream.addListener
|
||||
|
||||
Stream.addListener
|
||||
|
||||
▸ **addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**addListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -697,7 +697,7 @@ ___
|
||||
|
||||
### cork
|
||||
|
||||
▸ **cork**(): `void`
|
||||
**cork**(): `void`
|
||||
|
||||
The `writable.cork()` method forces all written data to be buffered in memory.
|
||||
The buffered data will be flushed when either the [uncork](admin_discounts.internal.WritableBase.mdx#uncork) or [end](admin_discounts.internal.WritableBase.mdx#end) methods are called.
|
||||
@@ -734,7 +734,7 @@ ___
|
||||
|
||||
### destroy
|
||||
|
||||
▸ **destroy**(`error?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**destroy**(`error?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'`event (unless `emitClose` is set to `false`). After this call, the writable
|
||||
stream has ended and subsequent calls to `write()` or `end()` will result in
|
||||
@@ -785,7 +785,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -865,7 +865,7 @@ v0.1.26
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[emit](admin_discounts.internal.Stream.mdx#emit)
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -903,7 +903,7 @@ NodeJS.WritableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `err`): `boolean`
|
||||
**emit**(`event`, `err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -949,7 +949,7 @@ NodeJS.WritableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`): `boolean`
|
||||
**emit**(`event`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -987,7 +987,7 @@ NodeJS.WritableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `src`): `boolean`
|
||||
**emit**(`event`, `src`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1033,7 +1033,7 @@ NodeJS.WritableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `src`): `boolean`
|
||||
**emit**(`event`, `src`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1079,7 +1079,7 @@ NodeJS.WritableStream.emit
|
||||
|
||||
Stream.emit
|
||||
|
||||
▸ **emit**(`event`, `...args`): `boolean`
|
||||
**emit**(`event`, `...args`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1129,7 +1129,7 @@ ___
|
||||
|
||||
### end
|
||||
|
||||
▸ **end**(`cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**end**(`cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Calling the `writable.end()` method signals that no more data will be written
|
||||
to the `Writable`. The optional `chunk` and `encoding` arguments allow one
|
||||
@@ -1183,7 +1183,7 @@ v0.9.4
|
||||
|
||||
[WritableStream](../interfaces/admin_discounts.internal.WritableStream.mdx).[end](../interfaces/admin_discounts.internal.WritableStream.mdx#end)
|
||||
|
||||
▸ **end**(`chunk`, `cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**end**(`chunk`, `cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1225,7 +1225,7 @@ v0.9.4
|
||||
|
||||
[WritableStream](../interfaces/admin_discounts.internal.WritableStream.mdx).[end](../interfaces/admin_discounts.internal.WritableStream.mdx#end)
|
||||
|
||||
▸ **end**(`chunk`, `encoding`, `cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**end**(`chunk`, `encoding`, `cb?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1279,7 +1279,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -1338,7 +1338,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.WritableBase.mdx#defaultmaxlisteners).
|
||||
@@ -1374,7 +1374,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -1432,7 +1432,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1488,7 +1488,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**off**(`eventName`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -1544,7 +1544,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -1621,7 +1621,7 @@ v0.1.101
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[on](admin_discounts.internal.Stream.mdx#on)
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1667,7 +1667,7 @@ NodeJS.WritableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1713,7 +1713,7 @@ NodeJS.WritableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1759,7 +1759,7 @@ NodeJS.WritableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1805,7 +1805,7 @@ NodeJS.WritableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1851,7 +1851,7 @@ NodeJS.WritableStream.on
|
||||
|
||||
Stream.on
|
||||
|
||||
▸ **on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**on**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1901,7 +1901,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -1976,7 +1976,7 @@ v0.3.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[once](admin_discounts.internal.Stream.mdx#once)
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2022,7 +2022,7 @@ NodeJS.WritableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2068,7 +2068,7 @@ NodeJS.WritableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2114,7 +2114,7 @@ NodeJS.WritableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2160,7 +2160,7 @@ NodeJS.WritableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2206,7 +2206,7 @@ NodeJS.WritableStream.once
|
||||
|
||||
Stream.once
|
||||
|
||||
▸ **once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**once**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2256,7 +2256,7 @@ ___
|
||||
|
||||
### pipe
|
||||
|
||||
▸ **pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
**pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -2312,7 +2312,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -2375,7 +2375,7 @@ v6.0.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[prependListener](admin_discounts.internal.Stream.mdx#prependlistener)
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2421,7 +2421,7 @@ NodeJS.WritableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2467,7 +2467,7 @@ NodeJS.WritableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2513,7 +2513,7 @@ NodeJS.WritableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2559,7 +2559,7 @@ NodeJS.WritableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2605,7 +2605,7 @@ NodeJS.WritableStream.prependListener
|
||||
|
||||
Stream.prependListener
|
||||
|
||||
▸ **prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2655,7 +2655,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -2716,7 +2716,7 @@ v6.0.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[prependOnceListener](admin_discounts.internal.Stream.mdx#prependoncelistener)
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2762,7 +2762,7 @@ NodeJS.WritableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2808,7 +2808,7 @@ NodeJS.WritableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2854,7 +2854,7 @@ NodeJS.WritableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2900,7 +2900,7 @@ NodeJS.WritableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2946,7 +2946,7 @@ NodeJS.WritableStream.prependOnceListener
|
||||
|
||||
Stream.prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**prependOnceListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2996,7 +2996,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -3070,7 +3070,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeAllListeners**(`event?`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -3124,7 +3124,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -3254,7 +3254,7 @@ v0.1.26
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[removeListener](admin_discounts.internal.Stream.mdx#removelistener)
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3300,7 +3300,7 @@ NodeJS.WritableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3346,7 +3346,7 @@ NodeJS.WritableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3392,7 +3392,7 @@ NodeJS.WritableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3438,7 +3438,7 @@ NodeJS.WritableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3484,7 +3484,7 @@ NodeJS.WritableStream.removeListener
|
||||
|
||||
Stream.removeListener
|
||||
|
||||
▸ **removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**removeListener**(`event`, `listener`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3534,7 +3534,7 @@ ___
|
||||
|
||||
### setDefaultEncoding
|
||||
|
||||
▸ **setDefaultEncoding**(`encoding`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**setDefaultEncoding**(`encoding`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
|
||||
|
||||
@@ -3574,7 +3574,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
**setMaxListeners**(`n`): [`WritableBase`](admin_discounts.internal.WritableBase.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -3627,7 +3627,7 @@ ___
|
||||
|
||||
### uncork
|
||||
|
||||
▸ **uncork**(): `void`
|
||||
**uncork**(): `void`
|
||||
|
||||
The `writable.uncork()` method flushes all data buffered since [cork](admin_discounts.internal.WritableBase.mdx#cork) was called.
|
||||
|
||||
@@ -3683,7 +3683,7 @@ ___
|
||||
|
||||
### write
|
||||
|
||||
▸ **write**(`chunk`, `callback?`): `boolean`
|
||||
**write**(`chunk`, `callback?`): `boolean`
|
||||
|
||||
The `writable.write()` method writes some data to the stream, and calls the
|
||||
supplied `callback` once the data has been fully handled. If an error
|
||||
@@ -3778,7 +3778,7 @@ v0.9.4
|
||||
|
||||
[WritableStream](../interfaces/admin_discounts.internal.WritableStream.mdx).[write](../interfaces/admin_discounts.internal.WritableStream.mdx#write)
|
||||
|
||||
▸ **write**(`chunk`, `encoding`, `callback?`): `boolean`
|
||||
**write**(`chunk`, `encoding`, `callback?`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3832,7 +3832,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -3907,7 +3907,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -3973,7 +3973,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -4095,7 +4095,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -4244,7 +4244,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
[Stream](admin_discounts.internal.Stream.mdx).[once](admin_discounts.internal.Stream.mdx#once-1)
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -4316,7 +4316,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
|
||||
+22
-22
@@ -64,7 +64,7 @@ v0.1.26
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**addListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Alias for `emitter.on(eventName, listener)`.
|
||||
|
||||
@@ -116,7 +116,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`eventName`, `...args`): `boolean`
|
||||
**emit**(`eventName`, `...args`): `boolean`
|
||||
|
||||
Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
|
||||
to each.
|
||||
@@ -204,7 +204,7 @@ ___
|
||||
|
||||
### eventNames
|
||||
|
||||
▸ **eventNames**(): (`string` \| `symbol`)[]
|
||||
**eventNames**(): (`string` \| `symbol`)[]
|
||||
|
||||
Returns an array listing the events for which the emitter has registered
|
||||
listeners. The values in the array are strings or `Symbol`s.
|
||||
@@ -259,7 +259,7 @@ ___
|
||||
|
||||
### getMaxListeners
|
||||
|
||||
▸ **getMaxListeners**(): `number`
|
||||
**getMaxListeners**(): `number`
|
||||
|
||||
Returns the current max listener value for the `EventEmitter` which is either
|
||||
set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](admin_discounts.internal.internal-5.mdx#defaultmaxlisteners).
|
||||
@@ -291,7 +291,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
**listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening for the event named `eventName`.
|
||||
If `listener` is provided, it will return how many times the listener is found
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### listeners
|
||||
|
||||
▸ **listeners**(`eventName`): `Function`[]
|
||||
**listeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -397,7 +397,7 @@ ___
|
||||
|
||||
### off
|
||||
|
||||
▸ **off**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**off**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Alias for `emitter.removeListener()`.
|
||||
|
||||
@@ -449,7 +449,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ **on**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**on**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Adds the `listener` function to the end of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -526,7 +526,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ **once**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**once**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName`. The
|
||||
next time `eventName` is triggered, this listener is removed and then invoked.
|
||||
@@ -601,7 +601,7 @@ ___
|
||||
|
||||
### pipe
|
||||
|
||||
▸ **pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
**pipe**<`T`\>(`destination`, `options?`): `T`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -653,7 +653,7 @@ ___
|
||||
|
||||
### prependListener
|
||||
|
||||
▸ **prependListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**prependListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Adds the `listener` function to the _beginning_ of the listeners array for the
|
||||
event named `eventName`. No checks are made to see if the `listener` has
|
||||
@@ -716,7 +716,7 @@ ___
|
||||
|
||||
### prependOnceListener
|
||||
|
||||
▸ **prependOnceListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**prependOnceListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
||||
listener is removed, and then invoked.
|
||||
@@ -777,7 +777,7 @@ ___
|
||||
|
||||
### rawListeners
|
||||
|
||||
▸ **rawListeners**(`eventName`): `Function`[]
|
||||
**rawListeners**(`eventName`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`,
|
||||
including any wrappers (such as those created by `.once()`).
|
||||
@@ -847,7 +847,7 @@ ___
|
||||
|
||||
### removeAllListeners
|
||||
|
||||
▸ **removeAllListeners**(`event?`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**removeAllListeners**(`event?`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Removes all listeners, or those of the specified `eventName`.
|
||||
|
||||
@@ -897,7 +897,7 @@ ___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**removeListener**(`eventName`, `listener`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
Removes the specified `listener` from the listener array for the event named`eventName`.
|
||||
|
||||
@@ -1027,7 +1027,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ **setMaxListeners**(`n`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
**setMaxListeners**(`n`): [`internal`](admin_discounts.internal.internal-5.mdx)
|
||||
|
||||
By default `EventEmitter`s will print a warning if more than `10` listeners are
|
||||
added for a particular event. This is a useful default that helps finding
|
||||
@@ -1076,7 +1076,7 @@ ___
|
||||
|
||||
### getEventListeners
|
||||
|
||||
▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
`Static` **getEventListeners**(`emitter`, `name`): `Function`[]
|
||||
|
||||
Returns a copy of the array of listeners for the event named `eventName`.
|
||||
|
||||
@@ -1151,7 +1151,7 @@ ___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ `Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
`Static` **listenerCount**(`emitter`, `eventName`): `number`
|
||||
|
||||
A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
||||
|
||||
@@ -1217,7 +1217,7 @@ ___
|
||||
|
||||
### on
|
||||
|
||||
▸ `Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
`Static` **on**(`emitter`, `eventName`, `options?`): [`AsyncIterableIterator`](../interfaces/admin_discounts.internal.AsyncIterableIterator.mdx)<`any`\>
|
||||
|
||||
```js
|
||||
import { on, EventEmitter } from 'node:events';
|
||||
@@ -1339,7 +1339,7 @@ ___
|
||||
|
||||
### once
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
||||
event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
||||
@@ -1488,7 +1488,7 @@ v11.13.0, v10.16.0
|
||||
|
||||
[EventEmitter](admin_discounts.internal.EventEmitter-1.mdx).[once](admin_discounts.internal.EventEmitter-1.mdx#once-1)
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
`Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1560,7 +1560,7 @@ ___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
`Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
import { setMaxListeners, EventEmitter } from 'node:events';
|
||||
|
||||
+10
-10
@@ -85,7 +85,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -114,7 +114,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -195,7 +195,7 @@ ___
|
||||
|
||||
### buildTemplate
|
||||
|
||||
▸ `Abstract` **buildTemplate**(): `Promise`<`string`\>
|
||||
`Abstract` **buildTemplate**(): `Promise`<`string`\>
|
||||
|
||||
Builds and returns a template file that can be downloaded and filled in
|
||||
|
||||
@@ -231,7 +231,7 @@ ___
|
||||
|
||||
### handleProcessingError
|
||||
|
||||
▸ `Protected` **handleProcessingError**<`T`\>(`batchJobId`, `err`, `result`): `Promise`<`void`\>
|
||||
`Protected` **handleProcessingError**<`T`\>(`batchJobId`, `err`, `result`): `Promise`<`void`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -292,7 +292,7 @@ ___
|
||||
|
||||
### preProcessBatchJob
|
||||
|
||||
▸ **preProcessBatchJob**(`batchJobId`): `Promise`<`void`\>
|
||||
**preProcessBatchJob**(`batchJobId`): `Promise`<`void`\>
|
||||
|
||||
Method for pre-processing a batch job
|
||||
|
||||
@@ -332,7 +332,7 @@ ___
|
||||
|
||||
### prepareBatchJobForProcessing
|
||||
|
||||
▸ **prepareBatchJobForProcessing**(`batchJob`, `req`): `Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
**prepareBatchJobForProcessing**(`batchJob`, `req`): `Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
|
||||
Method for preparing a batch job for processing
|
||||
|
||||
@@ -389,7 +389,7 @@ ___
|
||||
|
||||
### processJob
|
||||
|
||||
▸ `Abstract` **processJob**(`batchJobId`): `Promise`<`void`\>
|
||||
`Abstract` **processJob**(`batchJobId`): `Promise`<`void`\>
|
||||
|
||||
Method does the actual processing of the job. Should report back on the progress of the operation.
|
||||
|
||||
@@ -429,7 +429,7 @@ ___
|
||||
|
||||
### shouldRetryOnProcessingError
|
||||
|
||||
▸ `Protected` **shouldRetryOnProcessingError**(`batchJob`, `err`): `Promise`<`boolean`\>
|
||||
`Protected` **shouldRetryOnProcessingError**(`batchJob`, `err`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -480,7 +480,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -522,7 +522,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractBatchJobStrategy`](admin_discounts.internal.internal.AbstractBatchJobStrategy.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractBatchJobStrategy`](admin_discounts.internal.internal.AbstractBatchJobStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+5
-5
@@ -61,7 +61,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -86,7 +86,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -163,7 +163,7 @@ ___
|
||||
|
||||
### complete
|
||||
|
||||
▸ `Abstract` **complete**(`cartId`, `idempotencyKey`, `context`): `Promise`<[`CartCompletionResponse`](../modules/admin_discounts.internal.internal.mdx#cartcompletionresponse)\>
|
||||
`Abstract` **complete**(`cartId`, `idempotencyKey`, `context`): `Promise`<[`CartCompletionResponse`](../modules/admin_discounts.internal.internal.mdx#cartcompletionresponse)\>
|
||||
|
||||
Takes a cart id and completes the cart. This for example takes place when
|
||||
creating an order or confirming a swap.
|
||||
@@ -229,7 +229,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -267,7 +267,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractCartCompletionStrategy`](admin_discounts.internal.internal.AbstractCartCompletionStrategy.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractCartCompletionStrategy`](admin_discounts.internal.internal.AbstractCartCompletionStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+10
-10
@@ -61,7 +61,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -171,7 +171,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ `Abstract` **delete**(`fileData`): `Promise`<`void`\>
|
||||
`Abstract` **delete**(`fileData`): `Promise`<`void`\>
|
||||
|
||||
remove file from fileservice
|
||||
|
||||
@@ -211,7 +211,7 @@ ___
|
||||
|
||||
### getDownloadStream
|
||||
|
||||
▸ `Abstract` **getDownloadStream**(`fileData`): `Promise`<[`ReadableStream`](../interfaces/admin_discounts.internal.ReadableStream.mdx)\>
|
||||
`Abstract` **getDownloadStream**(`fileData`): `Promise`<[`ReadableStream`](../interfaces/admin_discounts.internal.ReadableStream.mdx)\>
|
||||
|
||||
download file from fileservice as stream
|
||||
|
||||
@@ -260,7 +260,7 @@ ___
|
||||
|
||||
### getPresignedDownloadUrl
|
||||
|
||||
▸ `Abstract` **getPresignedDownloadUrl**(`fileData`): `Promise`<`string`\>
|
||||
`Abstract` **getPresignedDownloadUrl**(`fileData`): `Promise`<`string`\>
|
||||
|
||||
Generate a presigned download url to obtain a file
|
||||
|
||||
@@ -309,7 +309,7 @@ ___
|
||||
|
||||
### getUploadStreamDescriptor
|
||||
|
||||
▸ `Abstract` **getUploadStreamDescriptor**(`fileData`): `Promise`<[`FileServiceGetUploadStreamResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileservicegetuploadstreamresult)\>
|
||||
`Abstract` **getUploadStreamDescriptor**(`fileData`): `Promise`<[`FileServiceGetUploadStreamResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileservicegetuploadstreamresult)\>
|
||||
|
||||
upload file to fileservice from stream
|
||||
|
||||
@@ -358,7 +358,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -400,7 +400,7 @@ ___
|
||||
|
||||
### upload
|
||||
|
||||
▸ `Abstract` **upload**(`fileData`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
`Abstract` **upload**(`fileData`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
upload file to fileservice
|
||||
|
||||
@@ -449,7 +449,7 @@ ___
|
||||
|
||||
### uploadProtected
|
||||
|
||||
▸ `Abstract` **uploadProtected**(`fileData`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
`Abstract` **uploadProtected**(`fileData`): `Promise`<[`FileServiceUploadResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#fileserviceuploadresult)\>
|
||||
|
||||
upload private file to fileservice
|
||||
|
||||
@@ -498,7 +498,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractFileService`](admin_discounts.internal.internal.AbstractFileService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractFileService`](admin_discounts.internal.internal.AbstractFileService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+13
-13
@@ -48,7 +48,7 @@ Fullfillment provider plugin services should extend the AbstractFulfillmentServi
|
||||
|
||||
### calculatePrice
|
||||
|
||||
▸ `Abstract` **calculatePrice**(`optionData`, `data`, `cart`): `Promise`<`number`\>
|
||||
`Abstract` **calculatePrice**(`optionData`, `data`, `cart`): `Promise`<`number`\>
|
||||
|
||||
Used to calculate a price for a given shipping option.
|
||||
|
||||
@@ -113,7 +113,7 @@ ___
|
||||
|
||||
### canCalculate
|
||||
|
||||
▸ `Abstract` **canCalculate**(`data`): `Promise`<`boolean`\>
|
||||
`Abstract` **canCalculate**(`data`): `Promise`<`boolean`\>
|
||||
|
||||
Used to determine if a shipping option can have a calculated price
|
||||
|
||||
@@ -162,7 +162,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ `Abstract` **cancelFulfillment**(`fulfillment`): `Promise`<`any`\>
|
||||
`Abstract` **cancelFulfillment**(`fulfillment`): `Promise`<`any`\>
|
||||
|
||||
Cancel a fulfillment using data from the fulfillment
|
||||
|
||||
@@ -211,7 +211,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ `Abstract` **createFulfillment**(`data`, `items`, `order`, `fulfillment`): `Promise`<[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)\>
|
||||
`Abstract` **createFulfillment**(`data`, `items`, `order`, `fulfillment`): `Promise`<[`FulfillmentProviderData`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentproviderdata)\>
|
||||
|
||||
Create a fulfillment using data from shipping method, line items, and fulfillment. All from the order.
|
||||
The returned value of this method will populate the `fulfillment.data` field.
|
||||
@@ -285,7 +285,7 @@ ___
|
||||
|
||||
### createReturn
|
||||
|
||||
▸ `Abstract` **createReturn**(`returnOrder`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
`Abstract` **createReturn**(`returnOrder`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
Used to create a return order. Should return the data necessary for future
|
||||
operations on the return; in particular the data may be used to receive
|
||||
@@ -353,7 +353,7 @@ ___
|
||||
|
||||
### getFulfillmentDocuments
|
||||
|
||||
▸ `Abstract` **getFulfillmentDocuments**(`data`): `Promise`<`any`\>
|
||||
`Abstract` **getFulfillmentDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents associated with a fulfillment.
|
||||
|
||||
@@ -402,7 +402,7 @@ ___
|
||||
|
||||
### getFulfillmentOptions
|
||||
|
||||
▸ `Abstract` **getFulfillmentOptions**(): `Promise`<`any`[]\>
|
||||
`Abstract` **getFulfillmentOptions**(): `Promise`<`any`[]\>
|
||||
|
||||
Called before a shipping option is created in Admin. The method should
|
||||
return all of the options that the fulfillment provider can be used with,
|
||||
@@ -452,7 +452,7 @@ ___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
**getIdentifier**(): `string`
|
||||
|
||||
Return a unique identifier to retrieve the fulfillment plugin provider
|
||||
|
||||
@@ -479,7 +479,7 @@ ___
|
||||
|
||||
### getReturnDocuments
|
||||
|
||||
▸ `Abstract` **getReturnDocuments**(`data`): `Promise`<`any`\>
|
||||
`Abstract` **getReturnDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents related to a return order.
|
||||
|
||||
@@ -528,7 +528,7 @@ ___
|
||||
|
||||
### getShipmentDocuments
|
||||
|
||||
▸ `Abstract` **getShipmentDocuments**(`data`): `Promise`<`any`\>
|
||||
`Abstract` **getShipmentDocuments**(`data`): `Promise`<`any`\>
|
||||
|
||||
Used to retrieve documents related to a shipment.
|
||||
|
||||
@@ -577,7 +577,7 @@ ___
|
||||
|
||||
### retrieveDocuments
|
||||
|
||||
▸ `Abstract` **retrieveDocuments**(`fulfillmentData`, `documentType`): `Promise`<`any`\>
|
||||
`Abstract` **retrieveDocuments**(`fulfillmentData`, `documentType`): `Promise`<`any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -632,7 +632,7 @@ ___
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
▸ `Abstract` **validateFulfillmentData**(`optionData`, `data`, `cart`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
`Abstract` **validateFulfillmentData**(`optionData`, `data`, `cart`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
Called before a shipping method is set on a cart to ensure that the data
|
||||
sent with the shipping method is valid. The data object may contain extra
|
||||
@@ -718,7 +718,7 @@ ___
|
||||
|
||||
### validateOption
|
||||
|
||||
▸ `Abstract` **validateOption**(`data`): `Promise`<`boolean`\>
|
||||
`Abstract` **validateOption**(`data`): `Promise`<`boolean`\>
|
||||
|
||||
Called before a shipping option is created in Admin. Use this to ensure
|
||||
that a fulfillment option does in fact exist.
|
||||
|
||||
+7
-7
@@ -69,7 +69,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -98,7 +98,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -179,7 +179,7 @@ ___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
**getIdentifier**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -200,7 +200,7 @@ ___
|
||||
|
||||
### resendNotification
|
||||
|
||||
▸ `Abstract` **resendNotification**(`notification`, `config`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
`Abstract` **resendNotification**(`notification`, `config`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -263,7 +263,7 @@ ___
|
||||
|
||||
### sendNotification
|
||||
|
||||
▸ `Abstract` **sendNotification**(`event`, `data`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
`Abstract` **sendNotification**(`event`, `data`, `attachmentGenerator`): `Promise`<[`ReturnedData`](../../admin_discounts/modules/admin_discounts.internal.mdx#returneddata)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -326,7 +326,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -368,7 +368,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractNotificationService`](admin_discounts.internal.internal.AbstractNotificationService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractNotificationService`](admin_discounts.internal.internal.AbstractNotificationService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+11
-11
@@ -47,7 +47,7 @@ Payment processor in charge of creating , managing and processing a payment
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ `Abstract` **authorizePayment**(`paymentSessionData`, `context`): `Promise`<[`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| { `data`: Record<`string`, `unknown`\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
`Abstract` **authorizePayment**(`paymentSessionData`, `context`): `Promise`<[`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| { `data`: Record<`string`, `unknown`\> ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
|
||||
Authorize an existing session if it is not already authorized
|
||||
|
||||
@@ -104,7 +104,7 @@ ___
|
||||
|
||||
### cancelPayment
|
||||
|
||||
▸ `Abstract` **cancelPayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **cancelPayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Cancel an existing session
|
||||
|
||||
@@ -153,7 +153,7 @@ ___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ `Abstract` **capturePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **capturePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Capture an existing session
|
||||
|
||||
@@ -202,7 +202,7 @@ ___
|
||||
|
||||
### deletePayment
|
||||
|
||||
▸ `Abstract` **deletePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **deletePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Delete an existing session
|
||||
|
||||
@@ -251,7 +251,7 @@ ___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
**getIdentifier**(): `string`
|
||||
|
||||
Return a unique identifier to retrieve the payment plugin provider
|
||||
|
||||
@@ -278,7 +278,7 @@ ___
|
||||
|
||||
### getPaymentStatus
|
||||
|
||||
▸ `Abstract` **getPaymentStatus**(`paymentSessionData`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
`Abstract` **getPaymentStatus**(`paymentSessionData`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
|
||||
Return the status of the session
|
||||
|
||||
@@ -359,7 +359,7 @@ ___
|
||||
|
||||
### initiatePayment
|
||||
|
||||
▸ `Abstract` **initiatePayment**(`context`): `Promise`<[`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
`Abstract` **initiatePayment**(`context`): `Promise`<[`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
Initiate a payment session with the external provider
|
||||
|
||||
@@ -408,7 +408,7 @@ ___
|
||||
|
||||
### refundPayment
|
||||
|
||||
▸ `Abstract` **refundPayment**(`paymentSessionData`, `refundAmount`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **refundPayment**(`paymentSessionData`, `refundAmount`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Refund an existing session
|
||||
|
||||
@@ -465,7 +465,7 @@ ___
|
||||
|
||||
### retrievePayment
|
||||
|
||||
▸ `Abstract` **retrievePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **retrievePayment**(`paymentSessionData`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Retrieve an existing session
|
||||
|
||||
@@ -514,7 +514,7 @@ ___
|
||||
|
||||
### updatePayment
|
||||
|
||||
▸ `Abstract` **updatePayment**(`context`): `Promise`<`void` \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
`Abstract` **updatePayment**(`context`): `Promise`<`void` \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx) \| [`PaymentProcessorSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentprocessorsessionresponse)\>
|
||||
|
||||
Update an existing payment session
|
||||
|
||||
@@ -563,7 +563,7 @@ ___
|
||||
|
||||
### updatePaymentData
|
||||
|
||||
▸ `Abstract` **updatePaymentData**(`sessionId`, `data`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
`Abstract` **updatePaymentData**(`sessionId`, `data`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentProcessorError`](../interfaces/admin_discounts.internal.internal.PaymentProcessorError.mdx)\>
|
||||
|
||||
Update the session data for a payment session
|
||||
|
||||
|
||||
+19
-19
@@ -75,7 +75,7 @@ in the near future use the AbstractPaymentProcessor instead
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -104,7 +104,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -185,7 +185,7 @@ ___
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ `Abstract` **authorizePayment**(`paymentSession`, `context`): `Promise`<{ `data`: [`Data`](../modules/admin_discounts.internal.internal.mdx#data) ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
`Abstract` **authorizePayment**(`paymentSession`, `context`): `Promise`<{ `data`: [`Data`](../modules/admin_discounts.internal.internal.mdx#data) ; `status`: [`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx) }\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -242,7 +242,7 @@ ___
|
||||
|
||||
### cancelPayment
|
||||
|
||||
▸ `Abstract` **cancelPayment**(`payment`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **cancelPayment**(`payment`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -295,7 +295,7 @@ ___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ `Abstract` **capturePayment**(`payment`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **capturePayment**(`payment`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -348,7 +348,7 @@ ___
|
||||
|
||||
### createPayment
|
||||
|
||||
▸ `Abstract` **createPayment**(`context`): `Promise`<[`PaymentSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentsessionresponse)\>
|
||||
`Abstract` **createPayment**(`context`): `Promise`<[`PaymentSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentsessionresponse)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -391,7 +391,7 @@ ___
|
||||
|
||||
[PaymentService](../interfaces/admin_discounts.internal.internal.PaymentService.mdx).[createPayment](../interfaces/admin_discounts.internal.internal.PaymentService.mdx#createpayment)
|
||||
|
||||
▸ `Abstract` **createPayment**(`cart`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **createPayment**(`cart`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -444,7 +444,7 @@ ___
|
||||
|
||||
### deletePayment
|
||||
|
||||
▸ `Abstract` **deletePayment**(`paymentSession`): `Promise`<`void`\>
|
||||
`Abstract` **deletePayment**(`paymentSession`): `Promise`<`void`\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -488,7 +488,7 @@ ___
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
**getIdentifier**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -513,7 +513,7 @@ ___
|
||||
|
||||
### getPaymentData
|
||||
|
||||
▸ `Abstract` **getPaymentData**(`paymentSession`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **getPaymentData**(`paymentSession`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -562,7 +562,7 @@ ___
|
||||
|
||||
### getStatus
|
||||
|
||||
▸ `Abstract` **getStatus**(`data`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
`Abstract` **getStatus**(`data`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -647,7 +647,7 @@ ___
|
||||
|
||||
### refundPayment
|
||||
|
||||
▸ `Abstract` **refundPayment**(`payment`, `refundAmount`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **refundPayment**(`payment`, `refundAmount`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -708,7 +708,7 @@ ___
|
||||
|
||||
### retrievePayment
|
||||
|
||||
▸ `Abstract` **retrievePayment**(`paymentData`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **retrievePayment**(`paymentData`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -757,7 +757,7 @@ ___
|
||||
|
||||
### retrieveSavedMethods
|
||||
|
||||
▸ **retrieveSavedMethods**(`customer`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)[]\>
|
||||
**retrieveSavedMethods**(`customer`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)[]\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -819,7 +819,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -861,7 +861,7 @@ ___
|
||||
|
||||
### updatePayment
|
||||
|
||||
▸ `Abstract` **updatePayment**(`paymentSessionData`, `context`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentsessionresponse)\>
|
||||
`Abstract` **updatePayment**(`paymentSessionData`, `context`): `Promise`<Record<`string`, `unknown`\> \| [`PaymentSessionResponse`](../modules/admin_discounts.internal.internal.mdx#paymentsessionresponse)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -912,7 +912,7 @@ ___
|
||||
|
||||
[PaymentService](../interfaces/admin_discounts.internal.internal.PaymentService.mdx).[updatePayment](../interfaces/admin_discounts.internal.internal.PaymentService.mdx#updatepayment)
|
||||
|
||||
▸ `Abstract` **updatePayment**(`paymentSessionData`, `cart`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **updatePayment**(`paymentSessionData`, `cart`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
This will be
|
||||
|
||||
@@ -973,7 +973,7 @@ ___
|
||||
|
||||
### updatePaymentData
|
||||
|
||||
▸ `Abstract` **updatePaymentData**(`paymentSessionData`, `data`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
`Abstract` **updatePaymentData**(`paymentSessionData`, `data`): `Promise`<[`Data`](../modules/admin_discounts.internal.internal.mdx#data)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1030,7 +1030,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+6
-6
@@ -61,7 +61,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -86,7 +86,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -163,7 +163,7 @@ ___
|
||||
|
||||
### calculateVariantPrice
|
||||
|
||||
▸ `Abstract` **calculateVariantPrice**(`data`, `context`): `Promise`<`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\>\>
|
||||
`Abstract` **calculateVariantPrice**(`data`, `context`): `Promise`<`Map`<`string`, [`PriceSelectionResult`](../modules/admin_discounts.internal.internal.mdx#priceselectionresult)\>\>
|
||||
|
||||
Calculate the original and discount price for a given variant in a set of
|
||||
circumstances described in the context.
|
||||
@@ -238,7 +238,7 @@ ___
|
||||
|
||||
### onVariantsPricesUpdate
|
||||
|
||||
▸ **onVariantsPricesUpdate**(`variantIds`): `Promise`<`void`\>
|
||||
**onVariantsPricesUpdate**(`variantIds`): `Promise`<`void`\>
|
||||
|
||||
Notify price selection strategy that variants prices have been updated.
|
||||
|
||||
@@ -278,7 +278,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -316,7 +316,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AbstractPriceSelectionStrategy`](admin_discounts.internal.internal.AbstractPriceSelectionStrategy.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AbstractPriceSelectionStrategy`](admin_discounts.internal.internal.AbstractPriceSelectionStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ items and shipping methods.
|
||||
|
||||
### getIdentifier
|
||||
|
||||
▸ **getIdentifier**(): `string`
|
||||
**getIdentifier**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
### getTaxLines
|
||||
|
||||
▸ `Abstract` **getTaxLines**(`itemLines`, `shippingLines`, `context`): `Promise`<[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]\>
|
||||
`Abstract` **getTaxLines**(`itemLines`, `shippingLines`, `context`): `Promise`<[`ProviderTaxLine`](../../admin_discounts/modules/admin_discounts.internal.mdx#providertaxline)[]\>
|
||||
|
||||
Retrieves the numerical tax lines for a calculation context.
|
||||
|
||||
|
||||
+8
-8
@@ -73,7 +73,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -98,7 +98,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -175,7 +175,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`userId`, `data`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
**create**(`userId`, `data`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
|
||||
Creates an analytics config.
|
||||
|
||||
@@ -228,7 +228,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`userId`): `Promise`<`void`\>
|
||||
**delete**(`userId`): `Promise`<`void`\>
|
||||
|
||||
Deletes an analytics config.
|
||||
|
||||
@@ -264,7 +264,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`userId`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
**retrieve**(`userId`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -307,7 +307,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`userId`, `update`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
**update**(`userId`, `update`): `Promise`<[`AnalyticsConfig`](admin_discounts.internal.internal.AnalyticsConfig.mdx)\>
|
||||
|
||||
Updates an analytics config. If the config does not exist, it will be created instead.
|
||||
|
||||
@@ -398,7 +398,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AnalyticsConfigService`](admin_discounts.internal.internal.AnalyticsConfigService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AnalyticsConfigService`](admin_discounts.internal.internal.AnalyticsConfigService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+8
-8
@@ -75,7 +75,7 @@ Can authenticate a user based on email password combination
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -100,7 +100,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -177,7 +177,7 @@ ___
|
||||
|
||||
### authenticate
|
||||
|
||||
▸ **authenticate**(`email`, `password`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
**authenticate**(`email`, `password`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
|
||||
Authenticates a given user based on an email, password combination. Uses
|
||||
scrypt to match password with hashed value.
|
||||
@@ -231,7 +231,7 @@ ___
|
||||
|
||||
### authenticateAPIToken
|
||||
|
||||
▸ **authenticateAPIToken**(`token`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
**authenticateAPIToken**(`token`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
|
||||
Authenticates a given user with an API token
|
||||
|
||||
@@ -276,7 +276,7 @@ ___
|
||||
|
||||
### authenticateCustomer
|
||||
|
||||
▸ **authenticateCustomer**(`email`, `password`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
**authenticateCustomer**(`email`, `password`): `Promise`<[`AuthenticateResult`](../../admin_discounts/modules/admin_discounts.internal.mdx#authenticateresult)\>
|
||||
|
||||
Authenticates a customer based on an email, password combination. Uses
|
||||
scrypt to match password with hashed value.
|
||||
@@ -330,7 +330,7 @@ ___
|
||||
|
||||
### comparePassword\_
|
||||
|
||||
▸ `Protected` **comparePassword_**(`password`, `hash`): `Promise`<`boolean`\>
|
||||
`Protected` **comparePassword_**(`password`, `hash`): `Promise`<`boolean`\>
|
||||
|
||||
Verifies if a password is valid given the provided password hash
|
||||
|
||||
@@ -383,7 +383,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -421,7 +421,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`AuthService`](admin_discounts.internal.internal.AuthService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`AuthService`](admin_discounts.internal.internal.AuthService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -161,7 +161,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -186,7 +186,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -263,7 +263,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**cancel**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -306,7 +306,7 @@ ___
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**complete**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -349,7 +349,7 @@ ___
|
||||
|
||||
### confirm
|
||||
|
||||
▸ **confirm**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**confirm**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -392,7 +392,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**create**(`data`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -435,7 +435,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -494,7 +494,7 @@ ___
|
||||
|
||||
### prepareBatchJobForProcessing
|
||||
|
||||
▸ **prepareBatchJobForProcessing**(`data`, `req`): `Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
**prepareBatchJobForProcessing**(`data`, `req`): `Promise`<[`CreateBatchJobInput`](../modules/admin_discounts.internal.internal.mdx#createbatchjobinput)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -545,7 +545,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`batchJobId`, `config?`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**retrieve**(`batchJobId`, `config?`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -596,7 +596,7 @@ ___
|
||||
|
||||
### setFailed
|
||||
|
||||
▸ **setFailed**(`batchJobOrId`, `error?`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**setFailed**(`batchJobOrId`, `error?`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -647,7 +647,7 @@ ___
|
||||
|
||||
### setPreProcessingDone
|
||||
|
||||
▸ **setPreProcessingDone**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**setPreProcessingDone**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -690,7 +690,7 @@ ___
|
||||
|
||||
### setProcessing
|
||||
|
||||
▸ **setProcessing**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**setProcessing**(`batchJobOrId`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -733,7 +733,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -771,7 +771,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`batchJobOrId`, `data`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
**update**(`batchJobOrId`, `data`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -822,7 +822,7 @@ ___
|
||||
|
||||
### updateStatus
|
||||
|
||||
▸ `Protected` **updateStatus**(`batchJobOrId`, `status`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
`Protected` **updateStatus**(`batchJobOrId`, `status`): `Promise`<[`BatchJob`](admin_batch_jobs.internal.BatchJob.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -873,7 +873,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`BatchJobService`](admin_discounts.internal.internal.BatchJobService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`BatchJobService`](admin_discounts.internal.internal.BatchJobService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+45
-45
@@ -313,7 +313,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -338,7 +338,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addLineItem
|
||||
|
||||
▸ **addLineItem**(`cartId`, `lineItem`, `config?`): `Promise`<`void`\>
|
||||
**addLineItem**(`cartId`, `lineItem`, `config?`): `Promise`<`void`\>
|
||||
|
||||
Adds a line item to the cart.
|
||||
|
||||
@@ -402,7 +402,7 @@ ___
|
||||
|
||||
### addOrUpdateLineItems
|
||||
|
||||
▸ **addOrUpdateLineItems**(`cartId`, `lineItems`, `config?`): `Promise`<`void`\>
|
||||
**addOrUpdateLineItems**(`cartId`, `lineItems`, `config?`): `Promise`<`void`\>
|
||||
|
||||
Adds or update one or multiple line items to the cart. It also update all existing items in the cart
|
||||
to have has_shipping to false. Finally, the adjustments will be updated.
|
||||
@@ -463,7 +463,7 @@ ___
|
||||
|
||||
### addShippingMethod
|
||||
|
||||
▸ **addShippingMethod**(`cartOrId`, `optionId`, `data?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**addShippingMethod**(`cartOrId`, `optionId`, `data?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Adds the shipping method to the list of shipping methods associated with
|
||||
the cart. Shipping Methods are the ways that an order is shipped, whereas a
|
||||
@@ -528,7 +528,7 @@ ___
|
||||
|
||||
### adjustFreeShipping\_
|
||||
|
||||
▸ `Protected` **adjustFreeShipping_**(`cart`, `shouldAdd`): `Promise`<`void`\>
|
||||
`Protected` **adjustFreeShipping_**(`cart`, `shouldAdd`): `Promise`<`void`\>
|
||||
|
||||
Ensures shipping total on cart is correct in regards to a potential free
|
||||
shipping discount
|
||||
@@ -575,7 +575,7 @@ ___
|
||||
|
||||
### applyDiscount
|
||||
|
||||
▸ **applyDiscount**(`cart`, `discountCode`): `Promise`<`void`\>
|
||||
**applyDiscount**(`cart`, `discountCode`): `Promise`<`void`\>
|
||||
|
||||
Updates the cart's discounts.
|
||||
If discount besides free shipping is already applied, this
|
||||
@@ -622,7 +622,7 @@ ___
|
||||
|
||||
### applyDiscounts
|
||||
|
||||
▸ **applyDiscounts**(`cart`, `discountCodes`): `Promise`<`void`\>
|
||||
**applyDiscounts**(`cart`, `discountCodes`): `Promise`<`void`\>
|
||||
|
||||
Updates the cart's discounts.
|
||||
If discount besides free shipping is already applied, this
|
||||
@@ -669,7 +669,7 @@ ___
|
||||
|
||||
### applyGiftCard\_
|
||||
|
||||
▸ `Protected` **applyGiftCard_**(`cart`, `code`): `Promise`<`void`\>
|
||||
`Protected` **applyGiftCard_**(`cart`, `code`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -711,7 +711,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -788,7 +788,7 @@ ___
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ **authorizePayment**(`cartId`, `context?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**authorizePayment**(`cartId`, `context?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Authorizes a payment for a cart.
|
||||
Will authorize with chosen payment provider. This will return
|
||||
@@ -845,7 +845,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**create**(`data`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Creates a cart.
|
||||
|
||||
@@ -890,7 +890,7 @@ ___
|
||||
|
||||
### createOrFetchGuestCustomerFromEmail\_
|
||||
|
||||
▸ `Protected` **createOrFetchGuestCustomerFromEmail_**(`email`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
`Protected` **createOrFetchGuestCustomerFromEmail_**(`email`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Creates or fetches a user based on an email.
|
||||
|
||||
@@ -935,7 +935,7 @@ ___
|
||||
|
||||
### createTaxLines
|
||||
|
||||
▸ **createTaxLines**(`cartOrId`): `Promise`<`void`\>
|
||||
**createTaxLines**(`cartOrId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -969,7 +969,7 @@ ___
|
||||
|
||||
### decorateTotals
|
||||
|
||||
▸ **decorateTotals**(`cart`, `totalsConfig?`): `Promise`<[`WithRequiredProperty`](../modules/admin_discounts.internal.internal.mdx#withrequiredproperty)<[`Cart`](admin_collections.internal.Cart.mdx), ``"total"``\>\>
|
||||
**decorateTotals**(`cart`, `totalsConfig?`): `Promise`<[`WithRequiredProperty`](../modules/admin_discounts.internal.internal.mdx#withrequiredproperty)<[`Cart`](admin_collections.internal.Cart.mdx), ``"total"``\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1037,7 +1037,7 @@ ___
|
||||
|
||||
### decorateTotals\_
|
||||
|
||||
▸ `Protected` **decorateTotals_**(`cart`, `totalsToSelect`, `options?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
`Protected` **decorateTotals_**(`cart`, `totalsToSelect`, `options?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1100,7 +1100,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`cartId`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**delete**(`cartId`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Deletes a cart from the database. Completed carts cannot be deleted.
|
||||
|
||||
@@ -1145,7 +1145,7 @@ ___
|
||||
|
||||
### deletePaymentSession
|
||||
|
||||
▸ **deletePaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
**deletePaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
|
||||
Removes a payment session from the cart.
|
||||
|
||||
@@ -1189,7 +1189,7 @@ ___
|
||||
|
||||
### deleteTaxLines
|
||||
|
||||
▸ **deleteTaxLines**(`id`): `Promise`<`void`\>
|
||||
**deleteTaxLines**(`id`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1223,7 +1223,7 @@ ___
|
||||
|
||||
### findCustomShippingOption
|
||||
|
||||
▸ **findCustomShippingOption**(`cartCustomShippingOptions`, `optionId`): `undefined` \| [`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)
|
||||
**findCustomShippingOption**(`cartCustomShippingOptions`, `optionId`): `undefined` \| [`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)
|
||||
|
||||
Finds the cart's custom shipping options based on the passed option id.
|
||||
throws if custom options is not empty and no shipping option corresponds to optionId
|
||||
@@ -1268,7 +1268,7 @@ ___
|
||||
|
||||
### getValidatedSalesChannel
|
||||
|
||||
▸ `Protected` **getValidatedSalesChannel**(`salesChannelId?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
`Protected` **getValidatedSalesChannel**(`salesChannelId?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1311,7 +1311,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1371,7 +1371,7 @@ ___
|
||||
|
||||
### onSalesChannelChange
|
||||
|
||||
▸ `Protected` **onSalesChannelChange**(`cart`, `newSalesChannelId`): `Promise`<`void`\>
|
||||
`Protected` **onSalesChannelChange**(`cart`, `newSalesChannelId`): `Promise`<`void`\>
|
||||
|
||||
Remove the cart line item that does not belongs to the newly assigned sales channel
|
||||
|
||||
@@ -1415,7 +1415,7 @@ ___
|
||||
|
||||
### refreshAdjustments\_
|
||||
|
||||
▸ `Protected` **refreshAdjustments_**(`cart`): `Promise`<`void`\>
|
||||
`Protected` **refreshAdjustments_**(`cart`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1449,7 +1449,7 @@ ___
|
||||
|
||||
### refreshPaymentSession
|
||||
|
||||
▸ **refreshPaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
**refreshPaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
|
||||
Refreshes a payment session on a cart
|
||||
|
||||
@@ -1493,7 +1493,7 @@ ___
|
||||
|
||||
### removeDiscount
|
||||
|
||||
▸ **removeDiscount**(`cartId`, `discountCode`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**removeDiscount**(`cartId`, `discountCode`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Removes a discount based on a discount code.
|
||||
|
||||
@@ -1546,7 +1546,7 @@ ___
|
||||
|
||||
### removeLineItem
|
||||
|
||||
▸ **removeLineItem**(`cartId`, `lineItemId`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**removeLineItem**(`cartId`, `lineItemId`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Removes a line item from the cart.
|
||||
|
||||
@@ -1599,7 +1599,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**retrieve**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Gets a cart by id.
|
||||
|
||||
@@ -1660,7 +1660,7 @@ ___
|
||||
|
||||
### retrieveLegacy
|
||||
|
||||
▸ `Protected` **retrieveLegacy**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
`Protected` **retrieveLegacy**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1721,7 +1721,7 @@ ___
|
||||
|
||||
### retrieveWithTotals
|
||||
|
||||
▸ **retrieveWithTotals**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`WithRequiredProperty`](../modules/admin_discounts.internal.internal.mdx#withrequiredproperty)<[`Cart`](admin_collections.internal.Cart.mdx), ``"total"``\>\>
|
||||
**retrieveWithTotals**(`cartId`, `options?`, `totalsConfig?`): `Promise`<[`WithRequiredProperty`](../modules/admin_discounts.internal.internal.mdx#withrequiredproperty)<[`Cart`](admin_collections.internal.Cart.mdx), ``"total"``\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1797,7 +1797,7 @@ ___
|
||||
|
||||
### setMetadata
|
||||
|
||||
▸ **setMetadata**(`cartId`, `key`, `value`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**setMetadata**(`cartId`, `key`, `value`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Dedicated method to set metadata for a cart.
|
||||
To ensure that plugins does not overwrite each
|
||||
@@ -1860,7 +1860,7 @@ ___
|
||||
|
||||
### setPaymentSession
|
||||
|
||||
▸ **setPaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
**setPaymentSession**(`cartId`, `providerId`): `Promise`<`void`\>
|
||||
|
||||
Selects a payment session for a cart and creates a payment object in the external provider system
|
||||
|
||||
@@ -1904,7 +1904,7 @@ ___
|
||||
|
||||
### setPaymentSessions
|
||||
|
||||
▸ **setPaymentSessions**(`cartOrCartId`): `Promise`<`void`\>
|
||||
**setPaymentSessions**(`cartOrCartId`): `Promise`<`void`\>
|
||||
|
||||
Creates, updates and sets payment sessions associated with the cart. The
|
||||
first time the method is called payment sessions will be created for each
|
||||
@@ -1944,7 +1944,7 @@ ___
|
||||
|
||||
### setRegion\_
|
||||
|
||||
▸ `Protected` **setRegion_**(`cart`, `regionId`, `countryCode`): `Promise`<`void`\>
|
||||
`Protected` **setRegion_**(`cart`, `regionId`, `countryCode`): `Promise`<`void`\>
|
||||
|
||||
Set's the region of a cart.
|
||||
|
||||
@@ -1996,7 +1996,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2034,7 +2034,7 @@ ___
|
||||
|
||||
### transformQueryForTotals\_
|
||||
|
||||
▸ `Protected` **transformQueryForTotals_**(`config`): [`FindConfig`](../interfaces/admin_discounts.internal.internal.FindConfig.mdx)<[`Cart`](admin_collections.internal.Cart.mdx)\> & { `totalsToSelect`: [`TotalField`](../modules/admin_discounts.internal.internal.mdx#totalfield)[] }
|
||||
`Protected` **transformQueryForTotals_**(`config`): [`FindConfig`](../interfaces/admin_discounts.internal.internal.FindConfig.mdx)<[`Cart`](admin_collections.internal.Cart.mdx)\> & { `totalsToSelect`: [`TotalField`](../modules/admin_discounts.internal.internal.mdx#totalfield)[] }
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2068,7 +2068,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`cartOrId`, `data`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**update**(`cartOrId`, `data`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2119,7 +2119,7 @@ ___
|
||||
|
||||
### updateBillingAddress\_
|
||||
|
||||
▸ `Protected` **updateBillingAddress_**(`cart`, `addressOrId`, `addrRepo`): `Promise`<`void`\>
|
||||
`Protected` **updateBillingAddress_**(`cart`, `addressOrId`, `addrRepo`): `Promise`<`void`\>
|
||||
|
||||
Updates the cart's billing address.
|
||||
|
||||
@@ -2171,7 +2171,7 @@ ___
|
||||
|
||||
### updateCustomerId\_
|
||||
|
||||
▸ `Protected` **updateCustomerId_**(`cart`, `customerId`): `Promise`<`void`\>
|
||||
`Protected` **updateCustomerId_**(`cart`, `customerId`): `Promise`<`void`\>
|
||||
|
||||
Sets the customer id of a cart
|
||||
|
||||
@@ -2215,7 +2215,7 @@ ___
|
||||
|
||||
### updateLineItem
|
||||
|
||||
▸ **updateLineItem**(`cartId`, `lineItemId`, `update`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**updateLineItem**(`cartId`, `lineItemId`, `update`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Updates a cart's existing line item.
|
||||
|
||||
@@ -2276,7 +2276,7 @@ ___
|
||||
|
||||
### updatePaymentSession
|
||||
|
||||
▸ **updatePaymentSession**(`cartId`, `update`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
**updatePaymentSession**(`cartId`, `update`): `Promise`<[`Cart`](admin_collections.internal.Cart.mdx)\>
|
||||
|
||||
Updates the currently selected payment session.
|
||||
|
||||
@@ -2329,7 +2329,7 @@ ___
|
||||
|
||||
### updateShippingAddress\_
|
||||
|
||||
▸ `Protected` **updateShippingAddress_**(`cart`, `addressOrId`, `addrRepo`): `Promise`<`void`\>
|
||||
`Protected` **updateShippingAddress_**(`cart`, `addressOrId`, `addrRepo`): `Promise`<`void`\>
|
||||
|
||||
Updates the cart's shipping address.
|
||||
|
||||
@@ -2381,7 +2381,7 @@ ___
|
||||
|
||||
### updateUnitPrices\_
|
||||
|
||||
▸ `Protected` **updateUnitPrices_**(`cart`, `regionId?`, `customer_id?`): `Promise`<`void`\>
|
||||
`Protected` **updateUnitPrices_**(`cart`, `regionId?`, `customer_id?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -2431,7 +2431,7 @@ ___
|
||||
|
||||
### validateLineItem
|
||||
|
||||
▸ `Protected` **validateLineItem**(`sales_channel_id`, `lineItem`): `Promise`<`boolean`\>
|
||||
`Protected` **validateLineItem**(`sales_channel_id`, `lineItem`): `Promise`<`boolean`\>
|
||||
|
||||
Check if line item's variant belongs to the cart's sales channel.
|
||||
|
||||
@@ -2492,7 +2492,7 @@ ___
|
||||
|
||||
### validateLineItemShipping\_
|
||||
|
||||
▸ `Protected` **validateLineItemShipping_**(`shippingMethods`, `lineItemShippingProfiledId`): `boolean`
|
||||
`Protected` **validateLineItemShipping_**(`shippingMethods`, `lineItemShippingProfiledId`): `boolean`
|
||||
|
||||
Checks if a given line item has a shipping method that can fulfill it.
|
||||
Returns true if all products in the cart can be fulfilled with the current
|
||||
@@ -2538,7 +2538,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`CartService`](admin_discounts.internal.internal.CartService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`CartService`](admin_discounts.internal.internal.CartService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+8
-8
@@ -129,7 +129,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -154,7 +154,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -231,7 +231,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
**create**(`data`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -274,7 +274,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -334,7 +334,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`claimItemId`, `config?`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
**retrieve**(`claimItemId`, `config?`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
|
||||
Gets a claim item by id.
|
||||
|
||||
@@ -387,7 +387,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -425,7 +425,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`ClaimItem`](admin_collections.internal.ClaimItem.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -476,7 +476,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ClaimItemService`](admin_discounts.internal.internal.ClaimItemService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ClaimItemService`](admin_discounts.internal.internal.ClaimItemService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+15
-15
@@ -241,7 +241,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -266,7 +266,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -343,7 +343,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`id`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**cancel**(`id`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -386,7 +386,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillmentId`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**cancelFulfillment**(`fulfillmentId`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -429,7 +429,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**create**(`data`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
Creates a Claim on an Order. Claims consists of items that are claimed and
|
||||
optionally items to be sent as replacement for the claimed items. The
|
||||
@@ -476,7 +476,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`id`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**createFulfillment**(`id`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -551,7 +551,7 @@ ___
|
||||
|
||||
### createShipment
|
||||
|
||||
▸ **createShipment**(`id`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**createShipment**(`id`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -634,7 +634,7 @@ ___
|
||||
|
||||
### getRefundTotalForClaimLinesOnOrder
|
||||
|
||||
▸ `Protected` **getRefundTotalForClaimLinesOnOrder**(`order`, `claimItems`): `Promise`<`number`\>
|
||||
`Protected` **getRefundTotalForClaimLinesOnOrder**(`order`, `claimItems`): `Promise`<`number`\>
|
||||
|
||||
Finds claim line items on an order and calculates the refund amount.
|
||||
There are three places too look:
|
||||
@@ -692,7 +692,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -752,7 +752,7 @@ ___
|
||||
|
||||
### processRefund
|
||||
|
||||
▸ **processRefund**(`id`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**processRefund**(`id`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -795,7 +795,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`claimId`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**retrieve**(`claimId`, `config?`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
Gets an order by id.
|
||||
|
||||
@@ -848,7 +848,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -886,7 +886,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`ClaimOrder`](admin_collections.internal.ClaimOrder.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -937,7 +937,7 @@ ___
|
||||
|
||||
### validateCreateClaimInput
|
||||
|
||||
▸ `Protected` **validateCreateClaimInput**(`data`): `Promise`<`void`\>
|
||||
`Protected` **validateCreateClaimInput**(`data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -971,7 +971,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ClaimService`](admin_discounts.internal.internal.ClaimService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ClaimService`](admin_discounts.internal.internal.ClaimService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+7
-7
@@ -97,7 +97,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -122,7 +122,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -199,7 +199,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Currency`](admin_collections.internal.Currency.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Currency`](admin_collections.internal.Currency.mdx)[], `number`]\>
|
||||
|
||||
Lists currencies based on the provided parameters and includes the count of
|
||||
currencies that match the query.
|
||||
@@ -261,7 +261,7 @@ ___
|
||||
|
||||
### retrieveByCode
|
||||
|
||||
▸ **retrieveByCode**(`code`): `Promise`<[`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
**retrieveByCode**(`code`): `Promise`<[`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
|
||||
Return the currency
|
||||
|
||||
@@ -306,7 +306,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -344,7 +344,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`code`, `data`): `Promise`<`undefined` \| [`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
**update**(`code`, `data`): `Promise`<`undefined` \| [`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
|
||||
Update a currency
|
||||
|
||||
@@ -397,7 +397,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`CurrencyService`](admin_discounts.internal.internal.CurrencyService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`CurrencyService`](admin_discounts.internal.internal.CurrencyService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+7
-7
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**<`T`, `TResult`\>(`data`): `Promise`<`TResult`\>
|
||||
**create**<`T`, `TResult`\>(`data`): `Promise`<`TResult`\>
|
||||
|
||||
Creates a custom shipping option
|
||||
|
||||
@@ -222,7 +222,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)[]\>
|
||||
|
||||
Fetches all custom shipping options based on the given selector
|
||||
|
||||
@@ -284,7 +284,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<[`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)\>
|
||||
**retrieve**(`id`, `config?`): `Promise`<[`CustomShippingOption`](admin_discounts.internal.internal.CustomShippingOption.mdx)\>
|
||||
|
||||
Retrieves a specific shipping option.
|
||||
|
||||
@@ -337,7 +337,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -375,7 +375,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`CustomShippingOptionService`](admin_discounts.internal.internal.CustomShippingOptionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`CustomShippingOptionService`](admin_discounts.internal.internal.CustomShippingOptionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+12
-12
@@ -81,7 +81,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -106,7 +106,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addCustomers
|
||||
|
||||
▸ **addCustomers**(`id`, `customerIds`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
**addCustomers**(`id`, `customerIds`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
|
||||
Add a batch of customers to a customer group at once
|
||||
|
||||
@@ -159,7 +159,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -236,7 +236,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`group`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
**create**(`group`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
|
||||
Creates a customer group with the provided data.
|
||||
|
||||
@@ -281,7 +281,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`groupId`): `Promise`<`void`\>
|
||||
**delete**(`groupId`): `Promise`<`void`\>
|
||||
|
||||
Remove customer group
|
||||
|
||||
@@ -317,7 +317,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)[]\>
|
||||
**list**(`selector`, `config`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)[]\>
|
||||
|
||||
List customer groups.
|
||||
|
||||
@@ -379,7 +379,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config`): `Promise`<[[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config`): `Promise`<[[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)[], `number`]\>
|
||||
|
||||
Retrieve a list of customer groups and total count of records that match the query.
|
||||
|
||||
@@ -440,7 +440,7 @@ ___
|
||||
|
||||
### removeCustomer
|
||||
|
||||
▸ **removeCustomer**(`id`, `customerIds`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
**removeCustomer**(`id`, `customerIds`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
|
||||
Remove list of customers from a customergroup
|
||||
|
||||
@@ -493,7 +493,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`customerGroupId`, `config?`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
**retrieve**(`customerGroupId`, `config?`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -544,7 +544,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -582,7 +582,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`customerGroupId`, `update`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
**update**(`customerGroupId`, `update`): `Promise`<[`CustomerGroup`](admin_collections.internal.CustomerGroup.mdx)\>
|
||||
|
||||
Update a customer group.
|
||||
|
||||
@@ -635,7 +635,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`CustomerGroupService`](admin_discounts.internal.internal.CustomerGroupService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`CustomerGroupService`](admin_discounts.internal.internal.CustomerGroupService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+22
-22
@@ -123,7 +123,7 @@ Provides layer to manipulate customers.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -148,7 +148,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addAddress
|
||||
|
||||
▸ **addAddress**(`customerId`, `address`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx) \| [`Address`](admin_collections.internal.Address.mdx)\>
|
||||
**addAddress**(`customerId`, `address`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx) \| [`Address`](admin_collections.internal.Address.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -199,7 +199,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -276,7 +276,7 @@ ___
|
||||
|
||||
### count
|
||||
|
||||
▸ **count**(): `Promise`<`number`\>
|
||||
**count**(): `Promise`<`number`\>
|
||||
|
||||
Return the total number of documents in database
|
||||
|
||||
@@ -308,7 +308,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`customer`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**create**(`customer`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Creates a customer from an email - customers can have accounts associated,
|
||||
e.g. to login and view order history, etc. If a password is provided the
|
||||
@@ -356,7 +356,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`customerId`): `Promise`<`void` \| [`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**delete**(`customerId`): `Promise`<`void` \| [`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Deletes a customer from a given customer id.
|
||||
|
||||
@@ -401,7 +401,7 @@ ___
|
||||
|
||||
### generateResetPasswordToken
|
||||
|
||||
▸ **generateResetPasswordToken**(`customerId`): `Promise`<`string`\>
|
||||
**generateResetPasswordToken**(`customerId`): `Promise`<`string`\>
|
||||
|
||||
Generate a JSON Web token, that will be sent to a customer, that wishes to
|
||||
reset password.
|
||||
@@ -450,7 +450,7 @@ ___
|
||||
|
||||
### hashPassword\_
|
||||
|
||||
▸ **hashPassword_**(`password`): `Promise`<`string`\>
|
||||
**hashPassword_**(`password`): `Promise`<`string`\>
|
||||
|
||||
Hashes a password
|
||||
|
||||
@@ -495,7 +495,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -555,7 +555,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Customer`](admin_collections.internal.Customer.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Customer`](admin_collections.internal.Customer.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -614,7 +614,7 @@ ___
|
||||
|
||||
### listByEmail
|
||||
|
||||
▸ **listByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)[]\>
|
||||
**listByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -674,7 +674,7 @@ ___
|
||||
|
||||
### removeAddress
|
||||
|
||||
▸ **removeAddress**(`customerId`, `addressId`): `Promise`<`void`\>
|
||||
**removeAddress**(`customerId`, `addressId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -716,7 +716,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`customerId`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**retrieve**(`customerId`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Gets a customer by id.
|
||||
|
||||
@@ -769,7 +769,7 @@ ___
|
||||
|
||||
### retrieveByEmail
|
||||
|
||||
▸ **retrieveByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**retrieveByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Gets a registered customer by email.
|
||||
|
||||
@@ -824,7 +824,7 @@ ___
|
||||
|
||||
### retrieveByPhone
|
||||
|
||||
▸ **retrieveByPhone**(`phone`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**retrieveByPhone**(`phone`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Gets a customer by phone.
|
||||
|
||||
@@ -877,7 +877,7 @@ ___
|
||||
|
||||
### retrieveRegisteredByEmail
|
||||
|
||||
▸ **retrieveRegisteredByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**retrieveRegisteredByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -928,7 +928,7 @@ ___
|
||||
|
||||
### retrieveUnregisteredByEmail
|
||||
|
||||
▸ **retrieveUnregisteredByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**retrieveUnregisteredByEmail**(`email`, `config?`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -979,7 +979,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1017,7 +1017,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`customerId`, `update`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
**update**(`customerId`, `update`): `Promise`<[`Customer`](admin_collections.internal.Customer.mdx)\>
|
||||
|
||||
Updates a customer.
|
||||
|
||||
@@ -1070,7 +1070,7 @@ ___
|
||||
|
||||
### updateAddress
|
||||
|
||||
▸ **updateAddress**(`customerId`, `addressId`, `address`): `Promise`<[`Address`](admin_collections.internal.Address.mdx)\>
|
||||
**updateAddress**(`customerId`, `addressId`, `address`): `Promise`<[`Address`](admin_collections.internal.Address.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1129,7 +1129,7 @@ ___
|
||||
|
||||
### updateBillingAddress\_
|
||||
|
||||
▸ **updateBillingAddress_**(`customer`, `addressOrId`): `Promise`<`void`\>
|
||||
**updateBillingAddress_**(`customer`, `addressOrId`): `Promise`<`void`\>
|
||||
|
||||
Updates the customers' billing address.
|
||||
|
||||
@@ -1173,7 +1173,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`CustomerService`](admin_discounts.internal.internal.CustomerService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`CustomerService`](admin_discounts.internal.internal.CustomerService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -77,7 +77,7 @@ Provides layer to manipulate discount conditions.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -102,7 +102,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -179,7 +179,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`discountConditionId`): `Promise`<`void` \| [`DiscountCondition`](admin_collections.internal.DiscountCondition.mdx)\>
|
||||
**delete**(`discountConditionId`): `Promise`<`void` \| [`DiscountCondition`](admin_collections.internal.DiscountCondition.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -222,7 +222,7 @@ ___
|
||||
|
||||
### removeResources
|
||||
|
||||
▸ **removeResources**(`data`): `Promise`<`void`\>
|
||||
**removeResources**(`data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -256,7 +256,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`conditionId`, `config?`): `Promise`<[`DiscountCondition`](admin_collections.internal.DiscountCondition.mdx)\>
|
||||
**retrieve**(`conditionId`, `config?`): `Promise`<[`DiscountCondition`](admin_collections.internal.DiscountCondition.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -307,7 +307,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### upsertCondition
|
||||
|
||||
▸ **upsertCondition**(`data`, `overrideExisting?`): `Promise`<([`DiscountConditionCustomerGroup`](admin_discounts.internal.internal.DiscountConditionCustomerGroup.mdx) \| [`DiscountConditionProduct`](admin_discounts.internal.internal.DiscountConditionProduct.mdx) \| [`DiscountConditionProductCollection`](admin_discounts.internal.internal.DiscountConditionProductCollection.mdx) \| [`DiscountConditionProductTag`](admin_discounts.internal.internal.DiscountConditionProductTag.mdx) \| [`DiscountConditionProductType`](admin_discounts.internal.internal.DiscountConditionProductType.mdx))[]\>
|
||||
**upsertCondition**(`data`, `overrideExisting?`): `Promise`<([`DiscountConditionCustomerGroup`](admin_discounts.internal.internal.DiscountConditionCustomerGroup.mdx) \| [`DiscountConditionProduct`](admin_discounts.internal.internal.DiscountConditionProduct.mdx) \| [`DiscountConditionProductCollection`](admin_discounts.internal.internal.DiscountConditionProductCollection.mdx) \| [`DiscountConditionProductTag`](admin_discounts.internal.internal.DiscountConditionProductTag.mdx) \| [`DiscountConditionProductType`](admin_discounts.internal.internal.DiscountConditionProductType.mdx))[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -405,7 +405,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`DiscountConditionService`](admin_discounts.internal.internal.DiscountConditionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`DiscountConditionService`](admin_discounts.internal.internal.DiscountConditionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -443,7 +443,7 @@ ___
|
||||
|
||||
### resolveConditionType\_
|
||||
|
||||
▸ `Static` `Protected` **resolveConditionType_**(`data`): `undefined` \| { `resource_ids`: (`string` \| { `id`: `string` })[] ; `type`: [`DiscountConditionType`](../enums/admin_collections.internal.DiscountConditionType.mdx) }
|
||||
`Static` `Protected` **resolveConditionType_**(`data`): `undefined` \| { `resource_ids`: (`string` \| { `id`: `string` })[] ; `type`: [`DiscountConditionType`](../enums/admin_collections.internal.DiscountConditionType.mdx) }
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+27
-27
@@ -157,7 +157,7 @@ Provides layer to manipulate discounts.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -182,7 +182,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addRegion
|
||||
|
||||
▸ **addRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**addRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Adds a region to the discount regions array.
|
||||
|
||||
@@ -235,7 +235,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -312,7 +312,7 @@ ___
|
||||
|
||||
### calculateDiscountForLineItem
|
||||
|
||||
▸ **calculateDiscountForLineItem**(`discountId`, `lineItem`, `calculationContextData`): `Promise`<`number`\>
|
||||
**calculateDiscountForLineItem**(`discountId`, `lineItem`, `calculationContextData`): `Promise`<`number`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -371,7 +371,7 @@ ___
|
||||
|
||||
### canApplyForCustomer
|
||||
|
||||
▸ **canApplyForCustomer**(`discountRuleId`, `customerId`): `Promise`<`boolean`\>
|
||||
**canApplyForCustomer**(`discountRuleId`, `customerId`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -422,7 +422,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`discount`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**create**(`discount`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Creates a discount with provided data given that the data is validated.
|
||||
Normalizes discount code to uppercase.
|
||||
@@ -468,7 +468,7 @@ ___
|
||||
|
||||
### createDynamicCode
|
||||
|
||||
▸ **createDynamicCode**(`discountId`, `data`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**createDynamicCode**(`discountId`, `data`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Creates a dynamic code for a discount id.
|
||||
|
||||
@@ -521,7 +521,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`discountId`): `Promise`<`void`\>
|
||||
**delete**(`discountId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a discount idempotently
|
||||
|
||||
@@ -557,7 +557,7 @@ ___
|
||||
|
||||
### deleteDynamicCode
|
||||
|
||||
▸ **deleteDynamicCode**(`discountId`, `code`): `Promise`<`void`\>
|
||||
**deleteDynamicCode**(`discountId`, `code`): `Promise`<`void`\>
|
||||
|
||||
Deletes a dynamic code for a discount id.
|
||||
|
||||
@@ -601,7 +601,7 @@ ___
|
||||
|
||||
### hasCustomersGroupCondition
|
||||
|
||||
▸ **hasCustomersGroupCondition**(`discount`): `boolean`
|
||||
**hasCustomersGroupCondition**(`discount`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -635,7 +635,7 @@ ___
|
||||
|
||||
### hasExpired
|
||||
|
||||
▸ **hasExpired**(`discount`): `boolean`
|
||||
**hasExpired**(`discount`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -669,7 +669,7 @@ ___
|
||||
|
||||
### hasNotStarted
|
||||
|
||||
▸ **hasNotStarted**(`discount`): `boolean`
|
||||
**hasNotStarted**(`discount`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -703,7 +703,7 @@ ___
|
||||
|
||||
### hasReachedLimit
|
||||
|
||||
▸ **hasReachedLimit**(`discount`): `boolean`
|
||||
**hasReachedLimit**(`discount`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -737,7 +737,7 @@ ___
|
||||
|
||||
### isDisabled
|
||||
|
||||
▸ **isDisabled**(`discount`): `boolean`
|
||||
**isDisabled**(`discount`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -771,7 +771,7 @@ ___
|
||||
|
||||
### isValidForRegion
|
||||
|
||||
▸ **isValidForRegion**(`discount`, `region_id`): `Promise`<`boolean`\>
|
||||
**isValidForRegion**(`discount`, `region_id`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -822,7 +822,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -882,7 +882,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`Discount`](admin_collections.internal.Discount.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`Discount`](admin_collections.internal.Discount.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -941,7 +941,7 @@ ___
|
||||
|
||||
### listByCodes
|
||||
|
||||
▸ **listByCodes**(`discountCodes`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)[]\>
|
||||
**listByCodes**(`discountCodes`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)[]\>
|
||||
|
||||
List all the discounts corresponding to the given codes
|
||||
|
||||
@@ -1003,7 +1003,7 @@ ___
|
||||
|
||||
### removeRegion
|
||||
|
||||
▸ **removeRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**removeRegion**(`discountId`, `regionId`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Removes a region from the discount regions array.
|
||||
|
||||
@@ -1056,7 +1056,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`discountId`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**retrieve**(`discountId`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Gets a discount by id.
|
||||
|
||||
@@ -1109,7 +1109,7 @@ ___
|
||||
|
||||
### retrieveByCode
|
||||
|
||||
▸ **retrieveByCode**(`discountCode`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**retrieveByCode**(`discountCode`, `config?`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Gets the discount by discount code.
|
||||
|
||||
@@ -1162,7 +1162,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1200,7 +1200,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`discountId`, `update`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
**update**(`discountId`, `update`): `Promise`<[`Discount`](admin_collections.internal.Discount.mdx)\>
|
||||
|
||||
Updates a discount.
|
||||
|
||||
@@ -1253,7 +1253,7 @@ ___
|
||||
|
||||
### validateDiscountForCartOrThrow
|
||||
|
||||
▸ **validateDiscountForCartOrThrow**(`cart`, `discount`): `Promise`<`void`\>
|
||||
**validateDiscountForCartOrThrow**(`cart`, `discount`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1295,7 +1295,7 @@ ___
|
||||
|
||||
### validateDiscountForProduct
|
||||
|
||||
▸ **validateDiscountForProduct**(`discountRuleId`, `productId?`): `Promise`<`boolean`\>
|
||||
**validateDiscountForProduct**(`discountRuleId`, `productId?`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1346,7 +1346,7 @@ ___
|
||||
|
||||
### validateDiscountRule\_
|
||||
|
||||
▸ **validateDiscountRule_**<`T`\>(`discountRule`): `T`
|
||||
**validateDiscountRule_**<`T`\>(`discountRule`): `T`
|
||||
|
||||
Creates a discount rule with provided data given that the data is validated.
|
||||
|
||||
@@ -1384,7 +1384,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`DiscountService`](admin_discounts.internal.internal.DiscountService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`DiscountService`](admin_discounts.internal.internal.DiscountService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+12
-12
@@ -157,7 +157,7 @@ Handles draft orders
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -182,7 +182,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -259,7 +259,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
**create**(`data`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
|
||||
Creates a draft order.
|
||||
|
||||
@@ -304,7 +304,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`draftOrderId`): `Promise`<`undefined` \| [`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
**delete**(`draftOrderId`): `Promise`<`undefined` \| [`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
|
||||
Deletes draft order idempotently.
|
||||
|
||||
@@ -349,7 +349,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)[]\>
|
||||
|
||||
Lists draft orders
|
||||
|
||||
@@ -411,7 +411,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)[], `number`]\>
|
||||
|
||||
Lists draft orders alongside the count
|
||||
|
||||
@@ -472,7 +472,7 @@ ___
|
||||
|
||||
### registerCartCompletion
|
||||
|
||||
▸ **registerCartCompletion**(`draftOrderId`, `orderId`): `Promise`<`UpdateResult`\>
|
||||
**registerCartCompletion**(`draftOrderId`, `orderId`): `Promise`<`UpdateResult`\>
|
||||
|
||||
Registers a draft order as completed, when an order has been completed.
|
||||
|
||||
@@ -525,7 +525,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`draftOrderId`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
**retrieve**(`draftOrderId`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
|
||||
Retrieves a draft order with the given id.
|
||||
|
||||
@@ -578,7 +578,7 @@ ___
|
||||
|
||||
### retrieveByCartId
|
||||
|
||||
▸ **retrieveByCartId**(`cartId`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
**retrieveByCartId**(`cartId`, `config?`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
|
||||
Retrieves a draft order based on its associated cart id
|
||||
|
||||
@@ -631,7 +631,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -669,7 +669,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`DraftOrder`](admin_collections.internal.DraftOrder.mdx)\>
|
||||
|
||||
Updates a draft order with the given data
|
||||
|
||||
@@ -730,7 +730,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`DraftOrderService`](admin_discounts.internal.internal.DraftOrderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`DraftOrderService`](admin_discounts.internal.internal.DraftOrderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+12
-12
@@ -112,7 +112,7 @@ subscribers when events happen. Events will run asynchronously.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -137,7 +137,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -214,7 +214,7 @@ ___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**<`T`\>(`data`): `Promise`<`void` \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
**emit**<`T`\>(`data`): `Promise`<`void` \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
|
||||
Calls all subscribers when an event occurs.
|
||||
|
||||
@@ -270,7 +270,7 @@ Calls all subscribers when an event occurs.
|
||||
|
||||
[IEventBusService](../interfaces/admin_discounts.internal.IEventBusService.mdx).[emit](../interfaces/admin_discounts.internal.IEventBusService.mdx#emit)
|
||||
|
||||
▸ **emit**<`T`\>(`eventName`, `data`, `options?`): `Promise`<`void` \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)\>
|
||||
**emit**<`T`\>(`eventName`, `data`, `options?`): `Promise`<`void` \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)\>
|
||||
|
||||
Calls all subscribers when an event occurs.
|
||||
|
||||
@@ -346,7 +346,7 @@ ___
|
||||
|
||||
### enqueuer\_
|
||||
|
||||
▸ **enqueuer_**(): `Promise`<`void`\>
|
||||
**enqueuer_**(): `Promise`<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -367,7 +367,7 @@ ___
|
||||
|
||||
### listJobs
|
||||
|
||||
▸ `Protected` **listJobs**(`listConfig`): `Promise`<`never`[] \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
`Protected` **listJobs**(`listConfig`): `Promise`<`never`[] \| [`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -410,7 +410,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -448,7 +448,7 @@ ___
|
||||
|
||||
### startEnqueuer
|
||||
|
||||
▸ **startEnqueuer**(): `void`
|
||||
**startEnqueuer**(): `void`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -469,7 +469,7 @@ ___
|
||||
|
||||
### stopEnqueuer
|
||||
|
||||
▸ **stopEnqueuer**(): `Promise`<`void`\>
|
||||
**stopEnqueuer**(): `Promise`<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -490,7 +490,7 @@ ___
|
||||
|
||||
### subscribe
|
||||
|
||||
▸ **subscribe**(`event`, `subscriber`, `context?`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
**subscribe**(`event`, `subscriber`, `context?`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
|
||||
Adds a function to a list of event subscribers.
|
||||
|
||||
@@ -546,7 +546,7 @@ ___
|
||||
|
||||
### unsubscribe
|
||||
|
||||
▸ **unsubscribe**(`event`, `subscriber`, `context`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
**unsubscribe**(`event`, `subscriber`, `context`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
|
||||
Removes function from the list of event subscribers.
|
||||
|
||||
@@ -602,7 +602,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`EventBusService`](admin_discounts.internal.internal.EventBusService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -75,7 +75,7 @@ Helps retrieve fulfillment providers
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -100,7 +100,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -177,7 +177,7 @@ ___
|
||||
|
||||
### calculatePrice
|
||||
|
||||
▸ **calculatePrice**(`option`, `data`, `cart?`): `Promise`<`number`\>
|
||||
**calculatePrice**(`option`, `data`, `cart?`): `Promise`<`number`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -236,7 +236,7 @@ ___
|
||||
|
||||
### canCalculate
|
||||
|
||||
▸ **canCalculate**(`option`): `Promise`<`boolean`\>
|
||||
**canCalculate**(`option`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -279,7 +279,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillment`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
**cancelFulfillment**(`fulfillment`): `Promise`<[`Fulfillment`](admin_collections.internal.Fulfillment.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -322,7 +322,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`method`, `items`, `order`, `fulfillment`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**createFulfillment**(`method`, `items`, `order`, `fulfillment`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -406,7 +406,7 @@ ___
|
||||
|
||||
### createReturn
|
||||
|
||||
▸ **createReturn**(`returnOrder`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**createReturn**(`returnOrder`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -466,7 +466,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(): `Promise`<[`FulfillmentProvider`](admin_collections.internal.FulfillmentProvider.mdx)[]\>
|
||||
**list**(): `Promise`<[`FulfillmentProvider`](admin_collections.internal.FulfillmentProvider.mdx)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -505,7 +505,7 @@ ___
|
||||
|
||||
### listFulfillmentOptions
|
||||
|
||||
▸ **listFulfillmentOptions**(`providerIds`): `Promise`<[`FulfillmentOptions`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentoptions)[]\>
|
||||
**listFulfillmentOptions**(`providerIds`): `Promise`<[`FulfillmentOptions`](../../admin_discounts/modules/admin_discounts.internal.mdx#fulfillmentoptions)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -557,7 +557,7 @@ ___
|
||||
|
||||
### registerInstalledProviders
|
||||
|
||||
▸ **registerInstalledProviders**(`providers`): `Promise`<`void`\>
|
||||
**registerInstalledProviders**(`providers`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -591,7 +591,7 @@ ___
|
||||
|
||||
### retrieveDocuments
|
||||
|
||||
▸ **retrieveDocuments**(`providerId`, `fulfillmentData`, `documentType`): `Promise`<`any`\>
|
||||
**retrieveDocuments**(`providerId`, `fulfillmentData`, `documentType`): `Promise`<`any`\>
|
||||
|
||||
Fetches documents from the fulfillment provider
|
||||
|
||||
@@ -652,7 +652,7 @@ ___
|
||||
|
||||
### retrieveProvider
|
||||
|
||||
▸ **retrieveProvider**(`providerId`): `any`
|
||||
**retrieveProvider**(`providerId`): `any`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -686,7 +686,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -724,7 +724,7 @@ ___
|
||||
|
||||
### validateFulfillmentData
|
||||
|
||||
▸ **validateFulfillmentData**(`option`, `data`, `cart`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**validateFulfillmentData**(`option`, `data`, `cart`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -800,7 +800,7 @@ ___
|
||||
|
||||
### validateOption
|
||||
|
||||
▸ **validateOption**(`option`): `Promise`<`boolean`\>
|
||||
**validateOption**(`option`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -843,7 +843,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`FulfillmentProviderService`](admin_discounts.internal.internal.FulfillmentProviderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`FulfillmentProviderService`](admin_discounts.internal.internal.FulfillmentProviderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+15
-15
@@ -107,7 +107,7 @@ Provides layer to manipulate gift cards.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -132,7 +132,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -209,7 +209,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`giftCard`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
**create**(`giftCard`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
Creates a gift card with provided data given that the data is validated.
|
||||
|
||||
@@ -254,7 +254,7 @@ ___
|
||||
|
||||
### createTransaction
|
||||
|
||||
▸ **createTransaction**(`data`): `Promise`<`string`\>
|
||||
**createTransaction**(`data`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -297,7 +297,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`giftCardId`): `Promise`<`void` \| [`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
**delete**(`giftCardId`): `Promise`<`void` \| [`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
Deletes a gift card idempotently
|
||||
|
||||
@@ -342,7 +342,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -402,7 +402,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`GiftCard`](admin_collections.internal.GiftCard.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`GiftCard`](admin_collections.internal.GiftCard.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -461,7 +461,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`giftCardId`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
**retrieve**(`giftCardId`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
Gets a gift card by id.
|
||||
|
||||
@@ -514,7 +514,7 @@ ___
|
||||
|
||||
### retrieveByCode
|
||||
|
||||
▸ **retrieveByCode**(`code`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
**retrieveByCode**(`code`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -565,7 +565,7 @@ ___
|
||||
|
||||
### retrieve\_
|
||||
|
||||
▸ `Protected` **retrieve_**(`selector`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
`Protected` **retrieve_**(`selector`, `config?`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -616,7 +616,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -654,7 +654,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`giftCardId`, `update`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
**update**(`giftCardId`, `update`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>
|
||||
|
||||
Updates a giftCard.
|
||||
|
||||
@@ -707,7 +707,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`GiftCardService`](admin_discounts.internal.internal.GiftCardService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`GiftCardService`](admin_discounts.internal.internal.GiftCardService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -745,7 +745,7 @@ ___
|
||||
|
||||
### generateCode
|
||||
|
||||
▸ `Static` **generateCode**(): `string`
|
||||
`Static` **generateCode**(): `string`
|
||||
|
||||
Generates a 16 character gift card code
|
||||
|
||||
@@ -768,7 +768,7 @@ ___
|
||||
|
||||
### resolveTaxRate
|
||||
|
||||
▸ `Static` `Protected` **resolveTaxRate**(`giftCardTaxRate`, `region`): ``null`` \| `number`
|
||||
`Static` `Protected` **resolveTaxRate**(`giftCardTaxRate`, `region`): ``null`` \| `number`
|
||||
|
||||
The tax_rate of the giftcard can depend on whether regions tax gift cards, an input
|
||||
provided by the user or the tax rate. Based on these conditions, tax_rate changes.
|
||||
|
||||
+10
-10
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`payload`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**create**(`payload`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Creates an idempotency key for a request.
|
||||
If no idempotency key is provided in request, we will create a unique
|
||||
@@ -214,7 +214,7 @@ ___
|
||||
|
||||
### initializeRequest
|
||||
|
||||
▸ **initializeRequest**(`headerKey`, `reqMethod`, `reqParams`, `reqPath`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**initializeRequest**(`headerKey`, `reqMethod`, `reqParams`, `reqPath`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Execute the initial steps in a idempotent request.
|
||||
|
||||
@@ -283,7 +283,7 @@ ___
|
||||
|
||||
### lock
|
||||
|
||||
▸ **lock**(`idempotencyKey`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**lock**(`idempotencyKey`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Locks an idempotency.
|
||||
|
||||
@@ -328,7 +328,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`idempotencyKeyOrSelector`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**retrieve**(`idempotencyKeyOrSelector`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Retrieves an idempotency key
|
||||
|
||||
@@ -373,7 +373,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -411,7 +411,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`idempotencyKey`, `update`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**update**(`idempotencyKey`, `update`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Locks an idempotency.
|
||||
|
||||
@@ -464,7 +464,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`IdempotencyKeyService`](admin_discounts.internal.internal.IdempotencyKeyService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`IdempotencyKeyService`](admin_discounts.internal.internal.IdempotencyKeyService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -502,7 +502,7 @@ ___
|
||||
|
||||
### workStage
|
||||
|
||||
▸ **workStage**(`idempotencyKey`, `callback`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
**workStage**(`idempotencyKey`, `callback`): `Promise`<[`IdempotencyKey`](admin_discounts.internal.internal.IdempotencyKey.mdx)\>
|
||||
|
||||
Performs an atomic work stage.
|
||||
An atomic work stage contains some related functionality, that needs to be
|
||||
|
||||
+12
-12
@@ -75,7 +75,7 @@ Provides layer to manipulate line item adjustments.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -100,7 +100,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -177,7 +177,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
**create**(`data`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
|
||||
Creates a line item adjustment
|
||||
|
||||
@@ -222,7 +222,7 @@ ___
|
||||
|
||||
### createAdjustmentForLineItem
|
||||
|
||||
▸ **createAdjustmentForLineItem**(`cart`, `lineItem`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[]\>
|
||||
**createAdjustmentForLineItem**(`cart`, `lineItem`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[]\>
|
||||
|
||||
Creates adjustment for a line item
|
||||
|
||||
@@ -284,7 +284,7 @@ ___
|
||||
|
||||
### createAdjustments
|
||||
|
||||
▸ **createAdjustments**(`cart`, `lineItem?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[] \| [`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[][]\>
|
||||
**createAdjustments**(`cart`, `lineItem?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[] \| [`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[][]\>
|
||||
|
||||
Creates adjustment for a line item
|
||||
|
||||
@@ -337,7 +337,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`selectorOrIds`): `Promise`<`void`\>
|
||||
**delete**(`selectorOrIds`): `Promise`<`void`\>
|
||||
|
||||
Deletes line item adjustments matching a selector
|
||||
|
||||
@@ -373,7 +373,7 @@ ___
|
||||
|
||||
### generateAdjustments
|
||||
|
||||
▸ **generateAdjustments**(`calculationContextData`, `generatedLineItem`, `context`): `Promise`<[`GeneratedAdjustment`](../../admin_discounts/modules/admin_discounts.internal.mdx#generatedadjustment)[]\>
|
||||
**generateAdjustments**(`calculationContextData`, `generatedLineItem`, `context`): `Promise`<[`GeneratedAdjustment`](../../admin_discounts/modules/admin_discounts.internal.mdx#generatedadjustment)[]\>
|
||||
|
||||
Creates adjustment for a line item
|
||||
|
||||
@@ -443,7 +443,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)[]\>
|
||||
|
||||
Lists line item adjustments
|
||||
|
||||
@@ -505,7 +505,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`lineItemAdjustmentId`, `config?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
**retrieve**(`lineItemAdjustmentId`, `config?`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
|
||||
Retrieves a line item adjustment by id.
|
||||
|
||||
@@ -558,7 +558,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -596,7 +596,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`LineItemAdjustment`](admin_collections.internal.LineItemAdjustment.mdx)\>
|
||||
|
||||
Creates a line item adjustment
|
||||
|
||||
@@ -649,7 +649,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`LineItemAdjustmentService`](admin_discounts.internal.internal.LineItemAdjustmentService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`LineItemAdjustmentService`](admin_discounts.internal.internal.LineItemAdjustmentService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -137,7 +137,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -162,7 +162,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -239,7 +239,7 @@ ___
|
||||
|
||||
### cloneTo
|
||||
|
||||
▸ **cloneTo**(`ids`, `data?`, `options?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
**cloneTo**(`ids`, `data?`, `options?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -315,7 +315,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**<`T`, `TResult`\>(`data`): `Promise`<`TResult`\>
|
||||
**create**<`T`, `TResult`\>(`data`): `Promise`<`TResult`\>
|
||||
|
||||
Create a line item
|
||||
|
||||
@@ -370,7 +370,7 @@ ___
|
||||
|
||||
### createReturnLines
|
||||
|
||||
▸ **createReturnLines**(`returnId`, `cartId`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
**createReturnLines**(`returnId`, `cartId`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
|
||||
Creates return line items for a given cart based on the return items in a
|
||||
return.
|
||||
@@ -433,7 +433,7 @@ ___
|
||||
|
||||
### createTaxLine
|
||||
|
||||
▸ **createTaxLine**(`args`): [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx)
|
||||
**createTaxLine**(`args`): [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx)
|
||||
|
||||
Create a line item tax line.
|
||||
|
||||
@@ -469,7 +469,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`): `Promise`<`undefined` \| ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
**delete**(`id`): `Promise`<`undefined` \| ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
|
||||
Deletes a line item.
|
||||
|
||||
@@ -514,7 +514,7 @@ ___
|
||||
|
||||
### deleteWithTaxLines
|
||||
|
||||
▸ **deleteWithTaxLines**(`id`): `Promise`<`undefined` \| ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
**deleteWithTaxLines**(`id`): `Promise`<`undefined` \| ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -562,7 +562,7 @@ ___
|
||||
|
||||
### generate
|
||||
|
||||
▸ **generate**<`T`, `TResult`\>(`variantIdOrData`, `regionIdOrContext`, `quantity?`, `context?`): `Promise`<`TResult`\>
|
||||
**generate**<`T`, `TResult`\>(`variantIdOrData`, `regionIdOrContext`, `quantity?`, `context?`): `Promise`<`TResult`\>
|
||||
|
||||
Generate a single or multiple line item without persisting the data into the db
|
||||
|
||||
@@ -641,7 +641,7 @@ ___
|
||||
|
||||
### generateLineItem
|
||||
|
||||
▸ `Protected` **generateLineItem**(`variant`, `quantity`, `context`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
`Protected` **generateLineItem**(`variant`, `quantity`, `context`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -764,7 +764,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -824,7 +824,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
**retrieve**(`id`, `config?`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
|
||||
Retrieves a line item by its id.
|
||||
|
||||
@@ -877,7 +877,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -915,7 +915,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`idOrSelector`, `data`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
**update**(`idOrSelector`, `data`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
|
||||
Updates a line item
|
||||
|
||||
@@ -977,7 +977,7 @@ ___
|
||||
|
||||
### validateGenerateArguments
|
||||
|
||||
▸ `Protected` **validateGenerateArguments**<`T`, `TResult`\>(`variantIdOrData`, `regionIdOrContext`, `quantity?`): `void`
|
||||
`Protected` **validateGenerateArguments**<`T`, `TResult`\>(`variantIdOrData`, `regionIdOrContext`, `quantity?`): `void`
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -1046,7 +1046,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`LineItemService`](admin_discounts.internal.internal.LineItemService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`LineItemService`](admin_discounts.internal.internal.LineItemService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -51,7 +51,7 @@ Orchestrates dynamic middleware registered through the Medusa Middleware API
|
||||
|
||||
### addPostAuthentication
|
||||
|
||||
▸ **addPostAuthentication**(`middleware`, `options`): `void`
|
||||
**addPostAuthentication**(`middleware`, `options`): `void`
|
||||
|
||||
Adds a middleware function to be called after authentication is completed.
|
||||
|
||||
@@ -95,7 +95,7 @@ ___
|
||||
|
||||
### addPreAuthentication
|
||||
|
||||
▸ **addPreAuthentication**(`middleware`, `options`): `void`
|
||||
**addPreAuthentication**(`middleware`, `options`): `void`
|
||||
|
||||
Adds a middleware function to be called before authentication is completed.
|
||||
|
||||
@@ -139,7 +139,7 @@ ___
|
||||
|
||||
### addPreCartCreation
|
||||
|
||||
▸ **addPreCartCreation**(`middleware`): `void`
|
||||
**addPreCartCreation**(`middleware`): `void`
|
||||
|
||||
Adds a middleware function to be called before cart creation
|
||||
|
||||
@@ -175,7 +175,7 @@ ___
|
||||
|
||||
### addRouter
|
||||
|
||||
▸ **addRouter**(`path`, `router`): `void`
|
||||
**addRouter**(`path`, `router`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -217,7 +217,7 @@ ___
|
||||
|
||||
### getRouters
|
||||
|
||||
▸ **getRouters**(`path`): `Router`[]
|
||||
**getRouters**(`path`): `Router`[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -260,7 +260,7 @@ ___
|
||||
|
||||
### usePostAuthentication
|
||||
|
||||
▸ **usePostAuthentication**(`app`): `void`
|
||||
**usePostAuthentication**(`app`): `void`
|
||||
|
||||
Adds post authentication middleware to an express app.
|
||||
|
||||
@@ -296,7 +296,7 @@ ___
|
||||
|
||||
### usePreAuthentication
|
||||
|
||||
▸ **usePreAuthentication**(`app`): `void`
|
||||
**usePreAuthentication**(`app`): `void`
|
||||
|
||||
Adds pre authentication middleware to an express app.
|
||||
|
||||
@@ -332,7 +332,7 @@ ___
|
||||
|
||||
### usePreCartCreation
|
||||
|
||||
▸ **usePreCartCreation**(): `RequestHandler`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, Record<`string`, `any`\>\>[]
|
||||
**usePreCartCreation**(): `RequestHandler`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, Record<`string`, `any`\>\>[]
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -387,7 +387,7 @@ ___
|
||||
|
||||
### validateMiddleware\_
|
||||
|
||||
▸ **validateMiddleware_**(`fn`): `void`
|
||||
**validateMiddleware_**(`fn`): `void`
|
||||
|
||||
Validates a middleware function, throws if fn is not of type function.
|
||||
|
||||
|
||||
+14
-14
@@ -81,7 +81,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -106,7 +106,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -183,7 +183,7 @@ ___
|
||||
|
||||
### getGiftCardTotals
|
||||
|
||||
▸ **getGiftCardTotals**(`giftCardableAmount`, `«destructured»`): `Promise`<{ `tax_total`: `number` ; `total`: `number` }\>
|
||||
**getGiftCardTotals**(`giftCardableAmount`, `«destructured»`): `Promise`<{ `tax_total`: `number` ; `total`: `number` }\>
|
||||
|
||||
Calculate and return the gift cards totals
|
||||
|
||||
@@ -260,7 +260,7 @@ ___
|
||||
|
||||
### getGiftCardTransactionsTotals
|
||||
|
||||
▸ **getGiftCardTransactionsTotals**(`«destructured»`): { `tax_total`: `number` ; `total`: `number` }
|
||||
**getGiftCardTransactionsTotals**(`«destructured»`): { `tax_total`: `number` ; `total`: `number` }
|
||||
|
||||
Calculate and return the gift cards totals based on their transactions
|
||||
|
||||
@@ -347,7 +347,7 @@ ___
|
||||
|
||||
### getLineItemRefund
|
||||
|
||||
▸ **getLineItemRefund**(`lineItem`, `«destructured»`): `number`
|
||||
**getLineItemRefund**(`lineItem`, `«destructured»`): `number`
|
||||
|
||||
Return the amount that can be refund on a line item
|
||||
|
||||
@@ -447,7 +447,7 @@ ___
|
||||
|
||||
### getLineItemRefundLegacy
|
||||
|
||||
▸ `Protected` **getLineItemRefundLegacy**(`lineItem`, `«destructured»`): `number`
|
||||
`Protected` **getLineItemRefundLegacy**(`lineItem`, `«destructured»`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -537,7 +537,7 @@ ___
|
||||
|
||||
### getLineItemTotals
|
||||
|
||||
▸ **getLineItemTotals**(`items`, `«destructured»`): `Promise`<{ `[lineItemId: string]`: [`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals); }\>
|
||||
**getLineItemTotals**(`items`, `«destructured»`): `Promise`<{ `[lineItemId: string]`: [`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals); }\>
|
||||
|
||||
Calculate and return the items totals for either the legacy calculation or the new calculation
|
||||
|
||||
@@ -614,7 +614,7 @@ ___
|
||||
|
||||
### getLineItemTotalsLegacy
|
||||
|
||||
▸ `Protected` **getLineItemTotalsLegacy**(`item`, `«destructured»`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals)\>
|
||||
`Protected` **getLineItemTotalsLegacy**(`item`, `«destructured»`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals)\>
|
||||
|
||||
Calculate and return the legacy calculated totals using the tax rate
|
||||
|
||||
@@ -707,7 +707,7 @@ ___
|
||||
|
||||
### getLineItemTotals\_
|
||||
|
||||
▸ `Protected` **getLineItemTotals_**(`item`, `«destructured»`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals)\>
|
||||
`Protected` **getLineItemTotals_**(`item`, `«destructured»`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals)\>
|
||||
|
||||
Calculate and return the totals for an item
|
||||
|
||||
@@ -808,7 +808,7 @@ ___
|
||||
|
||||
### getShippingMethodTotals
|
||||
|
||||
▸ **getShippingMethodTotals**(`shippingMethods`, `«destructured»`): `Promise`<{ `[shippingMethodId: string]`: [`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals); }\>
|
||||
**getShippingMethodTotals**(`shippingMethods`, `«destructured»`): `Promise`<{ `[shippingMethodId: string]`: [`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals); }\>
|
||||
|
||||
Calculate and return the shipping methods totals for either the legacy calculation or the new calculation
|
||||
|
||||
@@ -893,7 +893,7 @@ ___
|
||||
|
||||
### getShippingMethodTotalsLegacy
|
||||
|
||||
▸ `Protected` **getShippingMethodTotalsLegacy**(`shippingMethod`, `«destructured»`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals)\>
|
||||
`Protected` **getShippingMethodTotalsLegacy**(`shippingMethod`, `«destructured»`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals)\>
|
||||
|
||||
Calculate and return the shipping method totals legacy using the tax rate
|
||||
|
||||
@@ -970,7 +970,7 @@ ___
|
||||
|
||||
### getShippingMethodTotals\_
|
||||
|
||||
▸ `Protected` **getShippingMethodTotals_**(`shippingMethod`, `«destructured»`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals)\>
|
||||
`Protected` **getShippingMethodTotals_**(`shippingMethod`, `«destructured»`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals)\>
|
||||
|
||||
Calculate and return the shipping method totals
|
||||
|
||||
@@ -1055,7 +1055,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1093,7 +1093,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`NewTotalsService`](admin_discounts.internal.internal.NewTotalsService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`NewTotalsService`](admin_discounts.internal.internal.NewTotalsService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+10
-10
@@ -105,7 +105,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -130,7 +130,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -207,7 +207,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
**create**(`data`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
|
||||
Creates a note associated with a given author
|
||||
|
||||
@@ -268,7 +268,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`noteId`): `Promise`<`void`\>
|
||||
**delete**(`noteId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a given note
|
||||
|
||||
@@ -304,7 +304,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)[]\>
|
||||
|
||||
Fetches all notes related to the given selector
|
||||
|
||||
@@ -366,7 +366,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Note`](admin_discounts.internal.internal.Note.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Note`](admin_discounts.internal.internal.Note.mdx)[], `number`]\>
|
||||
|
||||
Fetches all notes related to the given selector
|
||||
|
||||
@@ -427,7 +427,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`noteId`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
**retrieve**(`noteId`, `config?`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
|
||||
Retrieves a specific note.
|
||||
|
||||
@@ -480,7 +480,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -518,7 +518,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`noteId`, `value`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
**update**(`noteId`, `value`): `Promise`<[`Note`](admin_discounts.internal.internal.Note.mdx)\>
|
||||
|
||||
Updates a given note with a new value
|
||||
|
||||
@@ -571,7 +571,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`NoteService`](admin_discounts.internal.internal.NoteService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`NoteService`](admin_discounts.internal.internal.NoteService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+14
-14
@@ -105,7 +105,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -130,7 +130,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -207,7 +207,7 @@ ___
|
||||
|
||||
### handleEvent
|
||||
|
||||
▸ **handleEvent**(`eventName`, `data`): `Promise`<`undefined` \| `void` \| [`Notification`](admin_discounts.internal.internal.Notification.mdx)[]\>
|
||||
**handleEvent**(`eventName`, `data`): `Promise`<`undefined` \| `void` \| [`Notification`](admin_discounts.internal.internal.Notification.mdx)[]\>
|
||||
|
||||
Handles an event by relaying the event data to the subscribing providers.
|
||||
The result of the notification send will be persisted in the database in
|
||||
@@ -262,7 +262,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)[]\>
|
||||
|
||||
Retrieves a list of notifications.
|
||||
|
||||
@@ -324,7 +324,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Notification`](admin_discounts.internal.internal.Notification.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Notification`](admin_discounts.internal.internal.Notification.mdx)[], `number`]\>
|
||||
|
||||
Retrieves a list of notifications and total count.
|
||||
|
||||
@@ -385,7 +385,7 @@ ___
|
||||
|
||||
### registerAttachmentGenerator
|
||||
|
||||
▸ **registerAttachmentGenerator**(`service`): `void`
|
||||
**registerAttachmentGenerator**(`service`): `void`
|
||||
|
||||
Registers an attachment generator to the service. The generator can be
|
||||
used to generate on demand invoices or other documents.
|
||||
@@ -422,7 +422,7 @@ ___
|
||||
|
||||
### registerInstalledProviders
|
||||
|
||||
▸ **registerInstalledProviders**(`providerIds`): `Promise`<`void`\>
|
||||
**registerInstalledProviders**(`providerIds`): `Promise`<`void`\>
|
||||
|
||||
Takes a list of notification provider ids and persists them in the database.
|
||||
|
||||
@@ -458,7 +458,7 @@ ___
|
||||
|
||||
### resend
|
||||
|
||||
▸ **resend**(`id`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
**resend**(`id`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
|
||||
Resends a notification by retrieving a prior notification and calling the
|
||||
underlying provider's resendNotification method.
|
||||
@@ -512,7 +512,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
**retrieve**(`id`, `config?`): `Promise`<[`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
|
||||
Retrieves a notification with a given id
|
||||
|
||||
@@ -565,7 +565,7 @@ ___
|
||||
|
||||
### retrieveProvider\_
|
||||
|
||||
▸ `Protected` **retrieveProvider_**(`id`): [`AbstractNotificationService`](admin_discounts.internal.internal.AbstractNotificationService.mdx)
|
||||
`Protected` **retrieveProvider_**(`id`): [`AbstractNotificationService`](admin_discounts.internal.internal.AbstractNotificationService.mdx)
|
||||
|
||||
Finds a provider with a given id. Will throw a NOT_FOUND error if the
|
||||
resolution fails.
|
||||
@@ -602,7 +602,7 @@ ___
|
||||
|
||||
### send
|
||||
|
||||
▸ **send**(`event`, `eventData`, `providerId`): `Promise`<`undefined` \| [`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
**send**(`event`, `eventData`, `providerId`): `Promise`<`undefined` \| [`Notification`](admin_discounts.internal.internal.Notification.mdx)\>
|
||||
|
||||
Sends a notification, by calling the given provider's sendNotification
|
||||
method. Persists the Notification in the database.
|
||||
@@ -664,7 +664,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -702,7 +702,7 @@ ___
|
||||
|
||||
### subscribe
|
||||
|
||||
▸ **subscribe**(`eventName`, `providerId`): `void`
|
||||
**subscribe**(`eventName`, `providerId`): `void`
|
||||
|
||||
Subscribes a given provider to an event.
|
||||
|
||||
@@ -746,7 +746,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`NotificationService`](admin_discounts.internal.internal.NotificationService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`NotificationService`](admin_discounts.internal.internal.NotificationService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+12
-12
@@ -105,7 +105,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -130,7 +130,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -207,7 +207,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**create**(`data`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -250,7 +250,7 @@ ___
|
||||
|
||||
### generateToken
|
||||
|
||||
▸ **generateToken**(`appName`, `code`, `state`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**generateToken**(`appName`, `code`, `state`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -309,7 +309,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)[]\>
|
||||
**list**(`selector`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -361,7 +361,7 @@ ___
|
||||
|
||||
### refreshToken
|
||||
|
||||
▸ **refreshToken**(`appName`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**refreshToken**(`appName`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -404,7 +404,7 @@ ___
|
||||
|
||||
### registerOauthApp
|
||||
|
||||
▸ **registerOauthApp**(`appDetails`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**registerOauthApp**(`appDetails`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -447,7 +447,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`oauthId`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**retrieve**(`oauthId`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -490,7 +490,7 @@ ___
|
||||
|
||||
### retrieveByName
|
||||
|
||||
▸ **retrieveByName**(`appName`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**retrieveByName**(`appName`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -533,7 +533,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -571,7 +571,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `update`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
**update**(`id`, `update`): `Promise`<[`Oauth`](admin_discounts.internal.internal.Oauth.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -622,7 +622,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`OauthService`](admin_discounts.internal.internal.OauthService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`OauthService`](admin_discounts.internal.internal.OauthService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+8
-8
@@ -113,7 +113,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -138,7 +138,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -215,7 +215,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)\>
|
||||
**create**(`data`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -258,7 +258,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`itemChangeIds`): `Promise`<`void`\>
|
||||
**delete**(`itemChangeIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -292,7 +292,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -352,7 +352,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)\>
|
||||
**retrieve**(`id`, `config?`): `Promise`<[`OrderItemChange`](admin_collections.internal.OrderItemChange.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -403,7 +403,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -441,7 +441,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`OrderEditItemChangeService`](admin_discounts.internal.internal.OrderEditItemChangeService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`OrderEditItemChangeService`](admin_discounts.internal.internal.OrderEditItemChangeService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+22
-22
@@ -201,7 +201,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -226,7 +226,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addLineItem
|
||||
|
||||
▸ **addLineItem**(`orderEditId`, `data`): `Promise`<`void`\>
|
||||
**addLineItem**(`orderEditId`, `data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -268,7 +268,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**cancel**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -404,7 +404,7 @@ ___
|
||||
|
||||
### confirm
|
||||
|
||||
▸ **confirm**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**confirm**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -463,7 +463,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`, `context`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**create**(`data`, `context`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -522,7 +522,7 @@ ___
|
||||
|
||||
### decline
|
||||
|
||||
▸ **decline**(`orderEditId`, `context`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**decline**(`orderEditId`, `context`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -589,7 +589,7 @@ ___
|
||||
|
||||
### decorateTotals
|
||||
|
||||
▸ **decorateTotals**(`orderEdit`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**decorateTotals**(`orderEdit`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -632,7 +632,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`): `Promise`<`void`\>
|
||||
**delete**(`id`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -666,7 +666,7 @@ ___
|
||||
|
||||
### deleteClonedItems
|
||||
|
||||
▸ `Protected` **deleteClonedItems**(`orderEditId`): `Promise`<`void`\>
|
||||
`Protected` **deleteClonedItems**(`orderEditId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -700,7 +700,7 @@ ___
|
||||
|
||||
### deleteItemChange
|
||||
|
||||
▸ **deleteItemChange**(`orderEditId`, `itemChangeId`): `Promise`<`void`\>
|
||||
**deleteItemChange**(`orderEditId`, `itemChangeId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -742,7 +742,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -802,7 +802,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -861,7 +861,7 @@ ___
|
||||
|
||||
### refreshAdjustments
|
||||
|
||||
▸ **refreshAdjustments**(`orderEditId`, `config?`): `Promise`<`void`\>
|
||||
**refreshAdjustments**(`orderEditId`, `config?`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -911,7 +911,7 @@ ___
|
||||
|
||||
### removeLineItem
|
||||
|
||||
▸ **removeLineItem**(`orderEditId`, `lineItemId`): `Promise`<`void`\>
|
||||
**removeLineItem**(`orderEditId`, `lineItemId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -953,7 +953,7 @@ ___
|
||||
|
||||
### requestConfirmation
|
||||
|
||||
▸ **requestConfirmation**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**requestConfirmation**(`orderEditId`, `context?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1012,7 +1012,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`orderEditId`, `config?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**retrieve**(`orderEditId`, `config?`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1063,7 +1063,7 @@ ___
|
||||
|
||||
### retrieveActive
|
||||
|
||||
▸ `Protected` **retrieveActive**(`orderId`, `config?`): `Promise`<`undefined` \| ``null`` \| [`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
`Protected` **retrieveActive**(`orderId`, `config?`): `Promise`<`undefined` \| ``null`` \| [`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1114,7 +1114,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1152,7 +1152,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`orderEditId`, `data`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
**update**(`orderEditId`, `data`): `Promise`<[`OrderEdit`](admin_collections.internal.OrderEdit.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1203,7 +1203,7 @@ ___
|
||||
|
||||
### updateLineItem
|
||||
|
||||
▸ **updateLineItem**(`orderEditId`, `itemId`, `data`): `Promise`<`void`\>
|
||||
**updateLineItem**(`orderEditId`, `itemId`, `data`): `Promise`<`void`\>
|
||||
|
||||
Create or update order edit item change line item and apply the quantity
|
||||
- If the item change already exists then update the quantity of the line item as well as the line adjustments
|
||||
@@ -1265,7 +1265,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`OrderEditService`](admin_discounts.internal.internal.OrderEditService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`OrderEditService`](admin_discounts.internal.internal.OrderEditService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+33
-33
@@ -369,7 +369,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -394,7 +394,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addShippingMethod
|
||||
|
||||
▸ **addShippingMethod**(`orderId`, `optionId`, `data?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**addShippingMethod**(`orderId`, `optionId`, `data?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -461,7 +461,7 @@ ___
|
||||
|
||||
### archive
|
||||
|
||||
▸ **archive**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**archive**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Archives an order. It only alloved, if the order has been fulfilled
|
||||
and payment has been captured.
|
||||
@@ -507,7 +507,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -584,7 +584,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**cancel**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Cancels an order.
|
||||
Throws if fulfillment process has been initiated.
|
||||
@@ -631,7 +631,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillmentId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**cancelFulfillment**(`fulfillmentId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Cancels a fulfillment (if related to an order)
|
||||
|
||||
@@ -676,7 +676,7 @@ ___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ **capturePayment**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**capturePayment**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Captures payment for an order.
|
||||
|
||||
@@ -721,7 +721,7 @@ ___
|
||||
|
||||
### completeOrder
|
||||
|
||||
▸ **completeOrder**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**completeOrder**(`orderId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -764,7 +764,7 @@ ___
|
||||
|
||||
### createFromCart
|
||||
|
||||
▸ **createFromCart**(`cartOrId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**createFromCart**(`cartOrId`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Creates an order from a cart
|
||||
|
||||
@@ -809,7 +809,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`orderId`, `itemsToFulfill`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**createFulfillment**(`orderId`, `itemsToFulfill`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Creates fulfillments for an order.
|
||||
In a situation where the order has more than one shipping method,
|
||||
@@ -897,7 +897,7 @@ ___
|
||||
|
||||
### createGiftCardsFromLineItem\_
|
||||
|
||||
▸ `Protected` **createGiftCardsFromLineItem_**(`order`, `lineItem`, `manager`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>[]
|
||||
`Protected` **createGiftCardsFromLineItem_**(`order`, `lineItem`, `manager`): `Promise`<[`GiftCard`](admin_collections.internal.GiftCard.mdx)\>[]
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -965,7 +965,7 @@ ___
|
||||
|
||||
### createRefund
|
||||
|
||||
▸ **createRefund**(`orderId`, `refundAmount`, `reason`, `note?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**createRefund**(`orderId`, `refundAmount`, `reason`, `note?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Refunds a given amount back to the customer.
|
||||
|
||||
@@ -1050,7 +1050,7 @@ ___
|
||||
|
||||
### createShipment
|
||||
|
||||
▸ **createShipment**(`orderId`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**createShipment**(`orderId`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Adds a shipment to the order to indicate that an order has left the
|
||||
warehouse. Will ask the fulfillment provider for any documents that may
|
||||
@@ -1137,7 +1137,7 @@ ___
|
||||
|
||||
### decorateTotals
|
||||
|
||||
▸ **decorateTotals**(`order`, `totalsFields?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**decorateTotals**(`order`, `totalsFields?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1184,7 +1184,7 @@ ___
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **decorateTotals**(`order`, `context?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**decorateTotals**(`order`, `context?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1235,7 +1235,7 @@ ___
|
||||
|
||||
### decorateTotalsLegacy
|
||||
|
||||
▸ `Protected` **decorateTotalsLegacy**(`order`, `totalsFields?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
`Protected` **decorateTotalsLegacy**(`order`, `totalsFields?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1286,7 +1286,7 @@ ___
|
||||
|
||||
### getFulfillmentItems
|
||||
|
||||
▸ `Protected` **getFulfillmentItems**(`order`, `items`, `transformer`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
`Protected` **getFulfillmentItems**(`order`, `items`, `transformer`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx)[]\>
|
||||
|
||||
Retrieves the order line items, given an array of items.
|
||||
|
||||
@@ -1356,7 +1356,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1416,7 +1416,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Order`](admin_collections.internal.Order.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Order`](admin_collections.internal.Order.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1475,7 +1475,7 @@ ___
|
||||
|
||||
### registerReturnReceived
|
||||
|
||||
▸ **registerReturnReceived**(`orderId`, `receivedReturn`, `customRefundAmount?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**registerReturnReceived**(`orderId`, `receivedReturn`, `customRefundAmount?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Handles receiving a return. This will create a
|
||||
refund to the customer. If the returned items don't match the requested
|
||||
@@ -1542,7 +1542,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`orderId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**retrieve**(`orderId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Gets an order by id.
|
||||
|
||||
@@ -1595,7 +1595,7 @@ ___
|
||||
|
||||
### retrieveByCartId
|
||||
|
||||
▸ **retrieveByCartId**(`cartId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**retrieveByCartId**(`cartId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Gets an order by cart id.
|
||||
|
||||
@@ -1648,7 +1648,7 @@ ___
|
||||
|
||||
### retrieveByCartIdWithTotals
|
||||
|
||||
▸ **retrieveByCartIdWithTotals**(`cartId`, `options?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**retrieveByCartIdWithTotals**(`cartId`, `options?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1699,7 +1699,7 @@ ___
|
||||
|
||||
### retrieveByExternalId
|
||||
|
||||
▸ **retrieveByExternalId**(`externalId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**retrieveByExternalId**(`externalId`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Gets an order by id.
|
||||
|
||||
@@ -1752,7 +1752,7 @@ ___
|
||||
|
||||
### retrieveLegacy
|
||||
|
||||
▸ `Protected` **retrieveLegacy**(`orderIdOrSelector`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
`Protected` **retrieveLegacy**(`orderIdOrSelector`, `config?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1803,7 +1803,7 @@ ___
|
||||
|
||||
### retrieveWithTotals
|
||||
|
||||
▸ **retrieveWithTotals**(`orderId`, `options?`, `context?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**retrieveWithTotals**(`orderId`, `options?`, `context?`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1862,7 +1862,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1900,7 +1900,7 @@ ___
|
||||
|
||||
### transformQueryForTotals
|
||||
|
||||
▸ `Protected` **transformQueryForTotals**(`config`): { `relations`: `undefined` \| `string`[] ; `select`: `undefined` \| keyof [`Order`](admin_collections.internal.Order.mdx)[] ; `totalsToSelect`: `undefined` \| keyof [`Order`](admin_collections.internal.Order.mdx)[] }
|
||||
`Protected` **transformQueryForTotals**(`config`): { `relations`: `undefined` \| `string`[] ; `select`: `undefined` \| keyof [`Order`](admin_collections.internal.Order.mdx)[] ; `totalsToSelect`: `undefined` \| keyof [`Order`](admin_collections.internal.Order.mdx)[] }
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1961,7 +1961,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`orderId`, `update`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
**update**(`orderId`, `update`): `Promise`<[`Order`](admin_collections.internal.Order.mdx)\>
|
||||
|
||||
Updates an order. Metadata updates should
|
||||
use dedicated method, e.g. `setMetadata` etc. The function
|
||||
@@ -2016,7 +2016,7 @@ ___
|
||||
|
||||
### updateBillingAddress
|
||||
|
||||
▸ `Protected` **updateBillingAddress**(`order`, `address`): `Promise`<`void`\>
|
||||
`Protected` **updateBillingAddress**(`order`, `address`): `Promise`<`void`\>
|
||||
|
||||
Updates the order's billing address.
|
||||
|
||||
@@ -2060,7 +2060,7 @@ ___
|
||||
|
||||
### updateShippingAddress
|
||||
|
||||
▸ `Protected` **updateShippingAddress**(`order`, `address`): `Promise`<`void`\>
|
||||
`Protected` **updateShippingAddress**(`order`, `address`): `Promise`<`void`\>
|
||||
|
||||
Updates the order's shipping address.
|
||||
|
||||
@@ -2104,7 +2104,7 @@ ___
|
||||
|
||||
### validateFulfillmentLineItem
|
||||
|
||||
▸ `Protected` **validateFulfillmentLineItem**(`item`, `quantity`): ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)
|
||||
`Protected` **validateFulfillmentLineItem**(`item`, `quantity`): ``null`` \| [`LineItem`](admin_collections.internal.LineItem.mdx)
|
||||
|
||||
Checks that a given quantity of a line item can be fulfilled. Fails if the
|
||||
fulfillable quantity is lower than the requested fulfillment quantity.
|
||||
@@ -2151,7 +2151,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`OrderService`](admin_discounts.internal.internal.OrderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`OrderService`](admin_discounts.internal.internal.OrderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+13
-13
@@ -137,7 +137,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -162,7 +162,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -239,7 +239,7 @@ ___
|
||||
|
||||
### authorizePaymentSessions
|
||||
|
||||
▸ **authorizePaymentSessions**(`paymentCollectionId`, `sessionIds`, `context?`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**authorizePaymentSessions**(`paymentCollectionId`, `sessionIds`, `context?`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Authorizes the payment sessions of a payment collection.
|
||||
|
||||
@@ -300,7 +300,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**create**(`data`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Creates a new payment collection.
|
||||
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`paymentCollectionId`): `Promise`<`undefined` \| [`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**delete**(`paymentCollectionId`): `Promise`<`undefined` \| [`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Deletes a payment collection.
|
||||
|
||||
@@ -390,7 +390,7 @@ ___
|
||||
|
||||
### markAsAuthorized
|
||||
|
||||
▸ **markAsAuthorized**(`paymentCollectionId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**markAsAuthorized**(`paymentCollectionId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Marks a payment collection as authorized bypassing the payment flow.
|
||||
|
||||
@@ -435,7 +435,7 @@ ___
|
||||
|
||||
### refreshPaymentSession
|
||||
|
||||
▸ **refreshPaymentSession**(`paymentCollectionId`, `sessionId`, `customerId`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**refreshPaymentSession**(`paymentCollectionId`, `sessionId`, `customerId`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Removes and recreate a payment session of a payment collection.
|
||||
|
||||
@@ -496,7 +496,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`paymentCollectionId`, `config?`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**retrieve**(`paymentCollectionId`, `config?`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Retrieves a payment collection by id.
|
||||
|
||||
@@ -549,7 +549,7 @@ ___
|
||||
|
||||
### setPaymentSession
|
||||
|
||||
▸ **setPaymentSession**(`paymentCollectionId`, `sessionInput`, `customerId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**setPaymentSession**(`paymentCollectionId`, `sessionInput`, `customerId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Manages a single payment sessions of a payment collection.
|
||||
|
||||
@@ -610,7 +610,7 @@ ___
|
||||
|
||||
### setPaymentSessionsBatch
|
||||
|
||||
▸ **setPaymentSessionsBatch**(`paymentCollectionOrId`, `sessionsInput`, `customerId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**setPaymentSessionsBatch**(`paymentCollectionOrId`, `sessionsInput`, `customerId`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Manages multiple payment sessions of a payment collection.
|
||||
|
||||
@@ -671,7 +671,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -709,7 +709,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`paymentCollectionId`, `data`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
**update**(`paymentCollectionId`, `data`): `Promise`<[`PaymentCollection`](admin_collections.internal.PaymentCollection.mdx)\>
|
||||
|
||||
Updates a payment collection.
|
||||
|
||||
@@ -762,7 +762,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`PaymentCollectionService`](admin_discounts.internal.internal.PaymentCollectionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`PaymentCollectionService`](admin_discounts.internal.internal.PaymentCollectionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+29
-29
@@ -131,7 +131,7 @@ Helps retrieve payment providers
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -156,7 +156,7 @@ ___
|
||||
|
||||
### paymentService\_
|
||||
|
||||
• `Protected` `get` **paymentService_**(): [`PaymentService`](admin_discounts.internal.PaymentService.mdx)
|
||||
`Protected` `get` **paymentService_**(): [`PaymentService`](admin_discounts.internal.PaymentService.mdx)
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -177,7 +177,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -254,7 +254,7 @@ ___
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ **authorizePayment**(`paymentSession`, `context`): `Promise`<`undefined` \| [`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**authorizePayment**(`paymentSession`, `context`): `Promise`<`undefined` \| [`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -305,7 +305,7 @@ ___
|
||||
|
||||
### buildPaymentProcessorContext
|
||||
|
||||
▸ `Protected` **buildPaymentProcessorContext**(`cartOrData`): [`Cart`](admin_collections.internal.Cart.mdx) & [`PaymentContext`](../modules/admin_discounts.internal.internal.mdx#paymentcontext)
|
||||
`Protected` **buildPaymentProcessorContext**(`cartOrData`): [`Cart`](admin_collections.internal.Cart.mdx) & [`PaymentContext`](../modules/admin_discounts.internal.internal.mdx#paymentcontext)
|
||||
|
||||
Build the create session context for both legacy and new API
|
||||
|
||||
@@ -341,7 +341,7 @@ ___
|
||||
|
||||
### cancelPayment
|
||||
|
||||
▸ **cancelPayment**(`paymentObj`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**cancelPayment**(`paymentObj`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -384,7 +384,7 @@ ___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ **capturePayment**(`paymentObj`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**capturePayment**(`paymentObj`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -427,7 +427,7 @@ ___
|
||||
|
||||
### createPayment
|
||||
|
||||
▸ **createPayment**(`data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**createPayment**(`data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -470,7 +470,7 @@ ___
|
||||
|
||||
### createSession
|
||||
|
||||
▸ **createSession**(`providerId`, `cart`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**createSession**(`providerId`, `cart`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -519,7 +519,7 @@ ___
|
||||
|
||||
#### Deprecated
|
||||
|
||||
▸ **createSession**(`sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**createSession**(`sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Creates a payment session with the given provider.
|
||||
|
||||
@@ -564,7 +564,7 @@ ___
|
||||
|
||||
### deleteSession
|
||||
|
||||
▸ **deleteSession**(`paymentSession`): `Promise`<`undefined` \| [`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**deleteSession**(`paymentSession`): `Promise`<`undefined` \| [`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -607,7 +607,7 @@ ___
|
||||
|
||||
### getStatus
|
||||
|
||||
▸ **getStatus**(`payment`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
**getStatus**(`payment`): `Promise`<[`PaymentSessionStatus`](../enums/admin_discounts.internal.internal.PaymentSessionStatus.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -682,7 +682,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(): `Promise`<[`PaymentProvider`](admin_collections.internal.PaymentProvider.mdx)[]\>
|
||||
**list**(): `Promise`<[`PaymentProvider`](admin_collections.internal.PaymentProvider.mdx)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -721,7 +721,7 @@ ___
|
||||
|
||||
### listPayments
|
||||
|
||||
▸ **listPayments**(`selector`, `config?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)[]\>
|
||||
**listPayments**(`selector`, `config?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)[]\>
|
||||
|
||||
List all the payments according to the given selector and config.
|
||||
|
||||
@@ -783,7 +783,7 @@ ___
|
||||
|
||||
### processUpdateRequestsData
|
||||
|
||||
▸ `Protected` **processUpdateRequestsData**(`data`, `paymentResponse`): `Promise`<`void`\>
|
||||
`Protected` **processUpdateRequestsData**(`data`, `paymentResponse`): `Promise`<`void`\>
|
||||
|
||||
Process the collected data. Can be used every time we need to process some collected data returned by the provider
|
||||
|
||||
@@ -827,7 +827,7 @@ ___
|
||||
|
||||
### refreshSession
|
||||
|
||||
▸ **refreshSession**(`paymentSession`, `sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**refreshSession**(`paymentSession`, `sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Refreshes a payment session with the given provider.
|
||||
This means, that we delete the current one and create a new.
|
||||
@@ -905,7 +905,7 @@ ___
|
||||
|
||||
### refundFromPayment
|
||||
|
||||
▸ **refundFromPayment**(`payment`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
**refundFromPayment**(`payment`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -972,7 +972,7 @@ ___
|
||||
|
||||
### refundPayment
|
||||
|
||||
▸ **refundPayment**(`payObjs`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
**refundPayment**(`payObjs`, `amount`, `reason`, `note?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1039,7 +1039,7 @@ ___
|
||||
|
||||
### registerInstalledProviders
|
||||
|
||||
▸ **registerInstalledProviders**(`providerIds`): `Promise`<`void`\>
|
||||
**registerInstalledProviders**(`providerIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1073,7 +1073,7 @@ ___
|
||||
|
||||
### retrievePayment
|
||||
|
||||
▸ **retrievePayment**(`paymentId`, `relations?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**retrievePayment**(`paymentId`, `relations?`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
Retrieve a payment entity with the given id.
|
||||
|
||||
@@ -1126,7 +1126,7 @@ ___
|
||||
|
||||
### retrieveProvider
|
||||
|
||||
▸ **retrieveProvider**<`TProvider`\>(`providerId`): `TProvider` extends [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx) ? [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx) : `TProvider` extends [`AbstractPaymentProcessor`](admin_discounts.internal.internal.AbstractPaymentProcessor.mdx) ? [`AbstractPaymentProcessor`](admin_discounts.internal.internal.AbstractPaymentProcessor.mdx) : `any`
|
||||
**retrieveProvider**<`TProvider`\>(`providerId`): `TProvider` extends [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx) ? [`AbstractPaymentService`](admin_discounts.internal.internal.AbstractPaymentService.mdx) : `TProvider` extends [`AbstractPaymentProcessor`](admin_discounts.internal.internal.AbstractPaymentProcessor.mdx) ? [`AbstractPaymentProcessor`](admin_discounts.internal.internal.AbstractPaymentProcessor.mdx) : `any`
|
||||
|
||||
Finds a provider given an id
|
||||
|
||||
@@ -1173,7 +1173,7 @@ ___
|
||||
|
||||
### retrieveRefund
|
||||
|
||||
▸ **retrieveRefund**(`id`, `config?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
**retrieveRefund**(`id`, `config?`): `Promise`<[`Refund`](admin_collections.internal.Refund.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1224,7 +1224,7 @@ ___
|
||||
|
||||
### retrieveSession
|
||||
|
||||
▸ **retrieveSession**(`paymentSessionId`, `relations?`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**retrieveSession**(`paymentSessionId`, `relations?`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Return the payment session for the given id.
|
||||
|
||||
@@ -1277,7 +1277,7 @@ ___
|
||||
|
||||
### saveSession
|
||||
|
||||
▸ `Protected` **saveSession**(`providerId`, `data`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
`Protected` **saveSession**(`providerId`, `data`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Create or update a Payment session data.
|
||||
|
||||
@@ -1386,7 +1386,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1424,7 +1424,7 @@ ___
|
||||
|
||||
### updatePayment
|
||||
|
||||
▸ **updatePayment**(`paymentId`, `data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
**updatePayment**(`paymentId`, `data`): `Promise`<[`Payment`](admin_collections.internal.Payment.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1491,7 +1491,7 @@ ___
|
||||
|
||||
### updateSession
|
||||
|
||||
▸ **updateSession**(`paymentSession`, `sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**updateSession**(`paymentSession`, `sessionInput`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
Update a payment session with the given provider.
|
||||
|
||||
@@ -1568,7 +1568,7 @@ ___
|
||||
|
||||
### updateSessionData
|
||||
|
||||
▸ **updateSessionData**(`paymentSession`, `data`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
**updateSessionData**(`paymentSession`, `data`): `Promise`<[`PaymentSession`](admin_collections.internal.PaymentSession.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1619,7 +1619,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`PaymentProviderService`](admin_discounts.internal.internal.PaymentProviderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`PaymentProviderService`](admin_discounts.internal.internal.PaymentProviderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+20
-20
@@ -123,7 +123,7 @@ Provides layer to manipulate product tags.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -148,7 +148,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addCurrencyFromRegion
|
||||
|
||||
▸ `Protected` **addCurrencyFromRegion**<`T`\>(`prices`): `Promise`<`T`[]\>
|
||||
`Protected` **addCurrencyFromRegion**<`T`\>(`prices`): `Promise`<`T`[]\>
|
||||
|
||||
Add `currency_code` to an MA record if `region_id`is passed.
|
||||
|
||||
@@ -204,7 +204,7 @@ ___
|
||||
|
||||
### addPrices
|
||||
|
||||
▸ **addPrices**(`id`, `prices`, `replace?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
**addPrices**(`id`, `prices`, `replace?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
|
||||
Adds prices to a price list in bulk, optionally replacing all existing prices
|
||||
|
||||
@@ -265,7 +265,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -342,7 +342,7 @@ ___
|
||||
|
||||
### clearPrices
|
||||
|
||||
▸ **clearPrices**(`id`): `Promise`<`void`\>
|
||||
**clearPrices**(`id`): `Promise`<`void`\>
|
||||
|
||||
Removes all prices from a price list and deletes the removed prices in bulk
|
||||
|
||||
@@ -378,7 +378,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`priceListObject`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
**create**(`priceListObject`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
|
||||
Creates a Price List
|
||||
|
||||
@@ -423,7 +423,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`): `Promise`<`void`\>
|
||||
**delete**(`id`): `Promise`<`void`\>
|
||||
|
||||
Deletes a Price List
|
||||
Will never fail due to delete being idempotent.
|
||||
@@ -460,7 +460,7 @@ ___
|
||||
|
||||
### deletePrices
|
||||
|
||||
▸ **deletePrices**(`id`, `priceIds`): `Promise`<`void`\>
|
||||
**deletePrices**(`id`, `priceIds`): `Promise`<`void`\>
|
||||
|
||||
Removes prices from a price list and deletes the removed prices in bulk
|
||||
|
||||
@@ -504,7 +504,7 @@ ___
|
||||
|
||||
### deleteProductPrices
|
||||
|
||||
▸ **deleteProductPrices**(`priceListId`, `productIds`): `Promise`<[`string`[], `number`]\>
|
||||
**deleteProductPrices**(`priceListId`, `productIds`): `Promise`<[`string`[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -563,7 +563,7 @@ ___
|
||||
|
||||
### deleteVariantPrices
|
||||
|
||||
▸ **deleteVariantPrices**(`priceListId`, `variantIds`): `Promise`<[`string`[], `number`]\>
|
||||
**deleteVariantPrices**(`priceListId`, `variantIds`): `Promise`<[`string`[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -622,7 +622,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)[]\>
|
||||
|
||||
Lists Price Lists
|
||||
|
||||
@@ -684,7 +684,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`PriceList`](admin_collections.internal.PriceList.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`PriceList`](admin_collections.internal.PriceList.mdx)[], `number`]\>
|
||||
|
||||
Lists Price Lists and adds count
|
||||
|
||||
@@ -745,7 +745,7 @@ ___
|
||||
|
||||
### listPriceListsVariantIdsMap
|
||||
|
||||
▸ **listPriceListsVariantIdsMap**(`priceListIds`): `Promise`<{ `[priceListId: string]`: `string`[]; }\>
|
||||
**listPriceListsVariantIdsMap**(`priceListIds`): `Promise`<{ `[priceListId: string]`: `string`[]; }\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -788,7 +788,7 @@ ___
|
||||
|
||||
### listProducts
|
||||
|
||||
▸ **listProducts**(`priceListId`, `selector?`, `config?`, `requiresPriceList?`): `Promise`<[[`Product`](admin_collections.internal.Product.mdx)[], `number`]\>
|
||||
**listProducts**(`priceListId`, `selector?`, `config?`, `requiresPriceList?`): `Promise`<[[`Product`](admin_collections.internal.Product.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -863,7 +863,7 @@ ___
|
||||
|
||||
### listVariants
|
||||
|
||||
▸ **listVariants**(`priceListId`, `selector?`, `config?`, `requiresPriceList?`): `Promise`<[[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[], `number`]\>
|
||||
**listVariants**(`priceListId`, `selector?`, `config?`, `requiresPriceList?`): `Promise`<[[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -938,7 +938,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`priceListId`, `config?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
**retrieve**(`priceListId`, `config?`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
|
||||
Retrieves a product tag by id.
|
||||
|
||||
@@ -991,7 +991,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1029,7 +1029,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `update`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
**update**(`id`, `update`): `Promise`<[`PriceList`](admin_collections.internal.PriceList.mdx)\>
|
||||
|
||||
Updates a Price List
|
||||
|
||||
@@ -1082,7 +1082,7 @@ ___
|
||||
|
||||
### upsertCustomerGroups\_
|
||||
|
||||
▸ `Protected` **upsertCustomerGroups_**(`priceListId`, `customerGroups`): `Promise`<`void`\>
|
||||
`Protected` **upsertCustomerGroups_**(`priceListId`, `customerGroups`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1124,7 +1124,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`PriceListService`](admin_discounts.internal.internal.PriceListService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`PriceListService`](admin_discounts.internal.internal.PriceListService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+15
-15
@@ -115,7 +115,7 @@ Allows retrieval of prices.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -140,7 +140,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -217,7 +217,7 @@ ___
|
||||
|
||||
### calculateTaxes
|
||||
|
||||
▸ **calculateTaxes**(`variantPricing`, `productRates`): [`TaxedPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxedpricing)
|
||||
**calculateTaxes**(`variantPricing`, `productRates`): [`TaxedPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxedpricing)
|
||||
|
||||
Gets the prices for a product variant
|
||||
|
||||
@@ -261,7 +261,7 @@ ___
|
||||
|
||||
### collectPricingContext
|
||||
|
||||
▸ **collectPricingContext**(`context`): `Promise`<[`PricingContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricingcontext)\>
|
||||
**collectPricingContext**(`context`): `Promise`<[`PricingContext`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricingcontext)\>
|
||||
|
||||
Collects additional information necessary for completing the price
|
||||
selection.
|
||||
@@ -307,7 +307,7 @@ ___
|
||||
|
||||
### getProductPricing
|
||||
|
||||
▸ **getProductPricing**(`product`, `context`): `Promise`<Record<`string`, [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>\>
|
||||
**getProductPricing**(`product`, `context`): `Promise`<Record<`string`, [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>\>
|
||||
|
||||
Gets all the variant prices for a product. All the product's variants will
|
||||
be fetched.
|
||||
@@ -378,7 +378,7 @@ ___
|
||||
|
||||
### getProductPricingById
|
||||
|
||||
▸ **getProductPricingById**(`productId`, `context`): `Promise`<Record<`string`, [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>\>
|
||||
**getProductPricingById**(`productId`, `context`): `Promise`<Record<`string`, [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>\>
|
||||
|
||||
Gets all the variant prices for a product by the product id
|
||||
|
||||
@@ -448,7 +448,7 @@ ___
|
||||
|
||||
### getProductVariantPricing
|
||||
|
||||
▸ **getProductVariantPricing**(`variant`, `context`): `Promise`<[`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>
|
||||
**getProductVariantPricing**(`variant`, `context`): `Promise`<[`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>
|
||||
|
||||
Gets the prices for a product variant.
|
||||
|
||||
@@ -501,7 +501,7 @@ ___
|
||||
|
||||
### getProductVariantPricingById
|
||||
|
||||
▸ **getProductVariantPricingById**(`variantId`, `context`): `Promise`<[`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>
|
||||
**getProductVariantPricingById**(`variantId`, `context`): `Promise`<[`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing)\>
|
||||
|
||||
Gets the prices for a product variant by a variant id.
|
||||
|
||||
@@ -558,7 +558,7 @@ ___
|
||||
|
||||
### getProductVariantsPricing
|
||||
|
||||
▸ **getProductVariantsPricing**(`data`, `context`): `Promise`<{ `[variant_id: string]`: [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing); }\>
|
||||
**getProductVariantsPricing**(`data`, `context`): `Promise`<{ `[variant_id: string]`: [`ProductVariantPricing`](../../admin_discounts/modules/admin_discounts.internal.mdx#productvariantpricing); }\>
|
||||
|
||||
Gets the prices for a collection of variants.
|
||||
|
||||
@@ -611,7 +611,7 @@ ___
|
||||
|
||||
### getShippingOptionPricing
|
||||
|
||||
▸ **getShippingOptionPricing**(`shippingOption`, `context`): `Promise`<[`PricedShippingOption`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedshippingoption)\>
|
||||
**getShippingOptionPricing**(`shippingOption`, `context`): `Promise`<[`PricedShippingOption`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedshippingoption)\>
|
||||
|
||||
Gets the prices for a shipping option.
|
||||
|
||||
@@ -664,7 +664,7 @@ ___
|
||||
|
||||
### setProductPrices
|
||||
|
||||
▸ **setProductPrices**(`products`, `context?`): `Promise`<([`Product`](admin_collections.internal.Product.mdx) \| [`PricedProduct`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedproduct))[]\>
|
||||
**setProductPrices**(`products`, `context?`): `Promise`<([`Product`](admin_collections.internal.Product.mdx) \| [`PricedProduct`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedproduct))[]\>
|
||||
|
||||
Set additional prices on a list of products.
|
||||
|
||||
@@ -726,7 +726,7 @@ ___
|
||||
|
||||
### setShippingOptionPrices
|
||||
|
||||
▸ **setShippingOptionPrices**(`shippingOptions`, `context?`): `Promise`<[`PricedShippingOption`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedshippingoption)[]\>
|
||||
**setShippingOptionPrices**(`shippingOptions`, `context?`): `Promise`<[`PricedShippingOption`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedshippingoption)[]\>
|
||||
|
||||
Set additional prices on a list of shipping options.
|
||||
|
||||
@@ -788,7 +788,7 @@ ___
|
||||
|
||||
### setVariantPrices
|
||||
|
||||
▸ **setVariantPrices**(`variants`, `context?`): `Promise`<[`PricedVariant`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedvariant)[]\>
|
||||
**setVariantPrices**(`variants`, `context?`): `Promise`<[`PricedVariant`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedvariant)[]\>
|
||||
|
||||
Set additional prices on a list of product variants.
|
||||
|
||||
@@ -850,7 +850,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -888,7 +888,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`PricingService`](admin_discounts.internal.internal.PricingService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`PricingService`](admin_discounts.internal.internal.PricingService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+17
-17
@@ -107,7 +107,7 @@ Provides layer to manipulate product categories.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -132,7 +132,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addProducts
|
||||
|
||||
▸ **addProducts**(`productCategoryId`, `productIds`): `Promise`<`void`\>
|
||||
**addProducts**(`productCategoryId`, `productIds`): `Promise`<`void`\>
|
||||
|
||||
Add a batch of product to a product category
|
||||
|
||||
@@ -176,7 +176,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -253,7 +253,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`productCategoryInput`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
**create**(`productCategoryInput`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
|
||||
Creates a product category
|
||||
|
||||
@@ -298,7 +298,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`productCategoryId`): `Promise`<`void`\>
|
||||
**delete**(`productCategoryId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a product category
|
||||
|
||||
@@ -334,7 +334,7 @@ ___
|
||||
|
||||
### fetchReorderConditions
|
||||
|
||||
▸ `Protected` **fetchReorderConditions**(`productCategory`, `input`, `shouldDeleteElement?`): [`ReorderConditions`](../../admin_discounts/modules/admin_discounts.internal.mdx#reorderconditions)
|
||||
`Protected` **fetchReorderConditions**(`productCategory`, `input`, `shouldDeleteElement?`): [`ReorderConditions`](../../admin_discounts/modules/admin_discounts.internal.mdx#reorderconditions)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -384,7 +384,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`, `treeSelector?`): `Promise`<[[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`, `treeSelector?`): `Promise`<[[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)[], `number`]\>
|
||||
|
||||
Lists product category based on the provided parameters and includes the count of
|
||||
product category that match the query.
|
||||
@@ -454,7 +454,7 @@ ___
|
||||
|
||||
### performReordering
|
||||
|
||||
▸ `Protected` **performReordering**(`repository`, `conditions`): `Promise`<`void`\>
|
||||
`Protected` **performReordering**(`repository`, `conditions`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -496,7 +496,7 @@ ___
|
||||
|
||||
### removeProducts
|
||||
|
||||
▸ **removeProducts**(`productCategoryId`, `productIds`): `Promise`<`void`\>
|
||||
**removeProducts**(`productCategoryId`, `productIds`): `Promise`<`void`\>
|
||||
|
||||
Remove a batch of product from a product category
|
||||
|
||||
@@ -540,7 +540,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`productCategoryId`, `config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
**retrieve**(`productCategoryId`, `config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
|
||||
Retrieves a product category by id.
|
||||
|
||||
@@ -609,7 +609,7 @@ ___
|
||||
|
||||
### retrieveByHandle
|
||||
|
||||
▸ **retrieveByHandle**(`handle`, `config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
**retrieveByHandle**(`handle`, `config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
|
||||
Retrieves a product category by handle.
|
||||
|
||||
@@ -678,7 +678,7 @@ ___
|
||||
|
||||
### retrieve\_
|
||||
|
||||
▸ `Protected` **retrieve_**(`config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
`Protected` **retrieve_**(`config?`, `selector?`, `treeSelector?`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
|
||||
A generic retrieve for fining product categories by different attributes.
|
||||
|
||||
@@ -739,7 +739,7 @@ ___
|
||||
|
||||
### shiftSiblings
|
||||
|
||||
▸ `Protected` **shiftSiblings**(`repository`, `conditions`): `Promise`<`void`\>
|
||||
`Protected` **shiftSiblings**(`repository`, `conditions`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -781,7 +781,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -819,7 +819,7 @@ ___
|
||||
|
||||
### transformParentIdToEntity
|
||||
|
||||
▸ `Protected` **transformParentIdToEntity**(`productCategoryInput`): `Promise`<[`CreateProductCategoryInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#createproductcategoryinput) \| [`UpdateProductCategoryInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#updateproductcategoryinput)\>
|
||||
`Protected` **transformParentIdToEntity**(`productCategoryInput`): `Promise`<[`CreateProductCategoryInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#createproductcategoryinput) \| [`UpdateProductCategoryInput`](../../admin_discounts/modules/admin_discounts.internal.mdx#updateproductcategoryinput)\>
|
||||
|
||||
Accepts an input object and transforms product_category_id
|
||||
into product_category entity.
|
||||
@@ -865,7 +865,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`productCategoryId`, `productCategoryInput`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
**update**(`productCategoryId`, `productCategoryInput`): `Promise`<[`ProductCategory`](admin_collections.internal.ProductCategory.mdx)\>
|
||||
|
||||
Updates a product category
|
||||
|
||||
@@ -918,7 +918,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductCategoryService`](admin_discounts.internal.internal.ProductCategoryService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductCategoryService`](admin_discounts.internal.internal.ProductCategoryService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+13
-13
@@ -131,7 +131,7 @@ Provides layer to manipulate product collections.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -156,7 +156,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addProducts
|
||||
|
||||
▸ **addProducts**(`collectionId`, `productIds`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
**addProducts**(`collectionId`, `productIds`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -207,7 +207,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -284,7 +284,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`collection`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
**create**(`collection`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
|
||||
Creates a product collection
|
||||
|
||||
@@ -329,7 +329,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`collectionId`): `Promise`<`void`\>
|
||||
**delete**(`collectionId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a product collection idempotently
|
||||
|
||||
@@ -365,7 +365,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)[]\>
|
||||
|
||||
Lists product collections
|
||||
|
||||
@@ -443,7 +443,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)[], `number`]\>
|
||||
|
||||
Lists product collections and add count.
|
||||
|
||||
@@ -504,7 +504,7 @@ ___
|
||||
|
||||
### removeProducts
|
||||
|
||||
▸ **removeProducts**(`collectionId`, `productIds`): `Promise`<`void`\>
|
||||
**removeProducts**(`collectionId`, `productIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -546,7 +546,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`collectionId`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
**retrieve**(`collectionId`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
|
||||
Retrieves a product collection by id.
|
||||
|
||||
@@ -599,7 +599,7 @@ ___
|
||||
|
||||
### retrieveByHandle
|
||||
|
||||
▸ **retrieveByHandle**(`collectionHandle`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
**retrieveByHandle**(`collectionHandle`, `config?`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
|
||||
Retrieves a product collection by id.
|
||||
|
||||
@@ -652,7 +652,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -690,7 +690,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`collectionId`, `update`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
**update**(`collectionId`, `update`): `Promise`<[`ProductCollection`](admin_collections.internal.ProductCollection.mdx)\>
|
||||
|
||||
Updates a product collection
|
||||
|
||||
@@ -743,7 +743,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductCollectionService`](admin_discounts.internal.internal.ProductCollectionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductCollectionService`](admin_discounts.internal.internal.ProductCollectionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+26
-26
@@ -185,7 +185,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -210,7 +210,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addOption
|
||||
|
||||
▸ **addOption**(`productId`, `optionTitle`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**addOption**(`productId`, `optionTitle`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Adds an option to a product. Options can, for example, be "Size", "Color",
|
||||
etc. Will update all the products variants with a dummy value for the newly
|
||||
@@ -265,7 +265,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -342,7 +342,7 @@ ___
|
||||
|
||||
### count
|
||||
|
||||
▸ **count**(`selector?`): `Promise`<`number`\>
|
||||
**count**(`selector?`): `Promise`<`number`\>
|
||||
|
||||
Return the total number of documents in database
|
||||
|
||||
@@ -387,7 +387,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`productObject`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**create**(`productObject`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Creates a product.
|
||||
|
||||
@@ -432,7 +432,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`productId`): `Promise`<`void`\>
|
||||
**delete**(`productId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a product from a given product id. The product's associated
|
||||
variants will also be deleted.
|
||||
@@ -469,7 +469,7 @@ ___
|
||||
|
||||
### deleteOption
|
||||
|
||||
▸ **deleteOption**(`productId`, `optionId`): `Promise`<`void` \| [`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**deleteOption**(`productId`, `optionId`): `Promise`<`void` \| [`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Delete an option from a product.
|
||||
|
||||
@@ -522,7 +522,7 @@ ___
|
||||
|
||||
### filterProductsBySalesChannel
|
||||
|
||||
▸ **filterProductsBySalesChannel**(`productIds`, `salesChannelId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
**filterProductsBySalesChannel**(`productIds`, `salesChannelId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -590,7 +590,7 @@ ___
|
||||
|
||||
### isProductInSalesChannels
|
||||
|
||||
▸ **isProductInSalesChannels**(`id`, `salesChannelIds`): `Promise`<`boolean`\>
|
||||
**isProductInSalesChannels**(`id`, `salesChannelIds`): `Promise`<`boolean`\>
|
||||
|
||||
Check if the product is assigned to at least one of the provided sales channels.
|
||||
|
||||
@@ -643,7 +643,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
|
||||
Lists products based on the provided parameters.
|
||||
|
||||
@@ -705,7 +705,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Product`](admin_collections.internal.Product.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Product`](admin_collections.internal.Product.mdx)[], `number`]\>
|
||||
|
||||
Lists products based on the provided parameters and includes the count of
|
||||
products that match the query.
|
||||
@@ -767,7 +767,7 @@ ___
|
||||
|
||||
### listTagsByUsage
|
||||
|
||||
▸ **listTagsByUsage**(`take?`): `Promise`<[`ProductTag`](admin_collections.internal.ProductTag.mdx)[]\>
|
||||
**listTagsByUsage**(`take?`): `Promise`<[`ProductTag`](admin_collections.internal.ProductTag.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -819,7 +819,7 @@ ___
|
||||
|
||||
### listTypes
|
||||
|
||||
▸ **listTypes**(): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)[]\>
|
||||
**listTypes**(): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -858,7 +858,7 @@ ___
|
||||
|
||||
### prepareListQuery\_
|
||||
|
||||
▸ `Protected` **prepareListQuery_**(`selector`, `config`): { `q`: `string` ; `query`: [`FindWithoutRelationsOptions`](../../admin_discounts/modules/admin_discounts.internal.mdx#findwithoutrelationsoptions-1) ; `relations`: keyof [`Product`](admin_collections.internal.Product.mdx)[] }
|
||||
`Protected` **prepareListQuery_**(`selector`, `config`): { `q`: `string` ; `query`: [`FindWithoutRelationsOptions`](../../admin_discounts/modules/admin_discounts.internal.mdx#findwithoutrelationsoptions-1) ; `relations`: keyof [`Product`](admin_collections.internal.Product.mdx)[] }
|
||||
|
||||
Temporary method to be used in place we need custom query strategy to prevent typeorm bug
|
||||
|
||||
@@ -929,7 +929,7 @@ ___
|
||||
|
||||
### reorderVariants
|
||||
|
||||
▸ **reorderVariants**(`productId`, `variantOrder`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**reorderVariants**(`productId`, `variantOrder`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -980,7 +980,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`productId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**retrieve**(`productId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Gets a product by id.
|
||||
Throws in case of DB Error and if product was not found.
|
||||
@@ -1034,7 +1034,7 @@ ___
|
||||
|
||||
### retrieveByExternalId
|
||||
|
||||
▸ **retrieveByExternalId**(`externalId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**retrieveByExternalId**(`externalId`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Gets a product by external id.
|
||||
Throws in case of DB Error and if product was not found.
|
||||
@@ -1088,7 +1088,7 @@ ___
|
||||
|
||||
### retrieveByHandle
|
||||
|
||||
▸ **retrieveByHandle**(`productHandle`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**retrieveByHandle**(`productHandle`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Gets a product by handle.
|
||||
Throws in case of DB Error and if product was not found.
|
||||
@@ -1142,7 +1142,7 @@ ___
|
||||
|
||||
### retrieveOptionByTitle
|
||||
|
||||
▸ **retrieveOptionByTitle**(`title`, `productId`): `Promise`<``null`` \| [`ProductOption`](admin_collections.internal.ProductOption.mdx)\>
|
||||
**retrieveOptionByTitle**(`title`, `productId`): `Promise`<``null`` \| [`ProductOption`](admin_collections.internal.ProductOption.mdx)\>
|
||||
|
||||
Retrieve product's option by title.
|
||||
|
||||
@@ -1195,7 +1195,7 @@ ___
|
||||
|
||||
### retrieveVariants
|
||||
|
||||
▸ **retrieveVariants**(`productId`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
**retrieveVariants**(`productId`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
|
||||
Gets all variants belonging to a product.
|
||||
|
||||
@@ -1257,7 +1257,7 @@ ___
|
||||
|
||||
### retrieve\_
|
||||
|
||||
▸ **retrieve_**(`selector`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**retrieve_**(`selector`, `config?`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Gets a product by selector.
|
||||
Throws in case of DB Error and if product was not found.
|
||||
@@ -1311,7 +1311,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1349,7 +1349,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`productId`, `update`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**update**(`productId`, `update`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Updates a product. Product variant updates should use dedicated methods,
|
||||
e.g. `addVariant`, etc. The function will throw errors if metadata or
|
||||
@@ -1404,7 +1404,7 @@ ___
|
||||
|
||||
### updateOption
|
||||
|
||||
▸ **updateOption**(`productId`, `optionId`, `data`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
**updateOption**(`productId`, `optionId`, `data`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)\>
|
||||
|
||||
Updates a product's option. Throws if the call tries to update an option
|
||||
not associated with the product. Throws if the updated title already exists.
|
||||
@@ -1466,7 +1466,7 @@ ___
|
||||
|
||||
### updateShippingProfile
|
||||
|
||||
▸ **updateShippingProfile**(`productIds`, `profileId`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
**updateShippingProfile**(`productIds`, `profileId`): `Promise`<[`Product`](admin_collections.internal.Product.mdx)[]\>
|
||||
|
||||
Assign a product to a profile, if a profile id null is provided then detach the product from the profile
|
||||
|
||||
@@ -1528,7 +1528,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductService`](admin_discounts.internal.internal.ProductService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductService`](admin_discounts.internal.internal.ProductService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+7
-7
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)[]\>
|
||||
|
||||
Lists product types
|
||||
|
||||
@@ -229,7 +229,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`ProductType`](admin_collections.internal.ProductType.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`ProductType`](admin_collections.internal.ProductType.mdx)[], `number`]\>
|
||||
|
||||
Lists product types and adds count.
|
||||
|
||||
@@ -290,7 +290,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`id`, `config?`): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)\>
|
||||
**retrieve**(`id`, `config?`): `Promise`<[`ProductType`](admin_collections.internal.ProductType.mdx)\>
|
||||
|
||||
Gets a product type by id.
|
||||
Throws in case of DB Error and if product was not found.
|
||||
@@ -344,7 +344,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -382,7 +382,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductTypeService`](admin_discounts.internal.internal.ProductTypeService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductTypeService`](admin_discounts.internal.internal.ProductTypeService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+21
-21
@@ -121,7 +121,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -146,7 +146,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### adjustInventory
|
||||
|
||||
▸ **adjustInventory**(`variantId`, `locationId`, `quantity`): `Promise`<`void`\>
|
||||
**adjustInventory**(`variantId`, `locationId`, `quantity`): `Promise`<`void`\>
|
||||
|
||||
Adjusts inventory of a variant on a location
|
||||
|
||||
@@ -198,7 +198,7 @@ ___
|
||||
|
||||
### adjustReservationsQuantityByLineItem
|
||||
|
||||
▸ **adjustReservationsQuantityByLineItem**(`lineItemId`, `variantId`, `locationId`, `quantity`): `Promise`<`void`\>
|
||||
**adjustReservationsQuantityByLineItem**(`lineItemId`, `variantId`, `locationId`, `quantity`): `Promise`<`void`\>
|
||||
|
||||
Adjusts the quantity of reservations for a line item by a given amount.
|
||||
|
||||
@@ -258,7 +258,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -335,7 +335,7 @@ ___
|
||||
|
||||
### attachInventoryItem
|
||||
|
||||
▸ **attachInventoryItem**(`attachments`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
**attachInventoryItem**(`attachments`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
|
||||
Attach a variant to an inventory item
|
||||
|
||||
@@ -385,7 +385,7 @@ Attach a variant to an inventory item
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **attachInventoryItem**(`variantId`, `inventoryItemId`, `requiredQuantity?`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
**attachInventoryItem**(`variantId`, `inventoryItemId`, `requiredQuantity?`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -453,7 +453,7 @@ ___
|
||||
|
||||
### confirmInventory
|
||||
|
||||
▸ **confirmInventory**(`variantId`, `quantity`, `context?`): `Promise`<[`Boolean`](../../admin_collections/modules/admin_collections.internal.mdx#boolean)\>
|
||||
**confirmInventory**(`variantId`, `quantity`, `context?`): `Promise`<[`Boolean`](../../admin_collections/modules/admin_collections.internal.mdx#boolean)\>
|
||||
|
||||
confirms if requested inventory is available
|
||||
|
||||
@@ -522,7 +522,7 @@ ___
|
||||
|
||||
### deleteReservationsByLineItem
|
||||
|
||||
▸ **deleteReservationsByLineItem**(`lineItemId`, `variantId`, `quantity`): `Promise`<`void`\>
|
||||
**deleteReservationsByLineItem**(`lineItemId`, `variantId`, `quantity`): `Promise`<`void`\>
|
||||
|
||||
delete a reservation of variant quantity
|
||||
|
||||
@@ -574,7 +574,7 @@ ___
|
||||
|
||||
### detachInventoryItem
|
||||
|
||||
▸ **detachInventoryItem**(`inventoryItemId`, `variantId?`): `Promise`<`void`\>
|
||||
**detachInventoryItem**(`inventoryItemId`, `variantId?`): `Promise`<`void`\>
|
||||
|
||||
Remove a variant from an inventory item
|
||||
|
||||
@@ -618,7 +618,7 @@ ___
|
||||
|
||||
### getVariantQuantityFromVariantInventoryItems
|
||||
|
||||
▸ **getVariantQuantityFromVariantInventoryItems**(`variantInventoryItems`, `channelId`): `Promise`<`number`\>
|
||||
**getVariantQuantityFromVariantInventoryItems**(`variantInventoryItems`, `channelId`): `Promise`<`number`\>
|
||||
|
||||
Get the quantity of a variant from a list of variantInventoryItems
|
||||
The inventory quantity of the variant should be equal to the inventory
|
||||
@@ -674,7 +674,7 @@ ___
|
||||
|
||||
### listByItem
|
||||
|
||||
▸ **listByItem**(`itemIds`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
**listByItem**(`itemIds`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
|
||||
list registered inventory items
|
||||
|
||||
@@ -728,7 +728,7 @@ ___
|
||||
|
||||
### listByVariant
|
||||
|
||||
▸ **listByVariant**(`variantId`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
**listByVariant**(`variantId`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)[]\>
|
||||
|
||||
List inventory items for a specific variant
|
||||
|
||||
@@ -782,7 +782,7 @@ ___
|
||||
|
||||
### listInventoryItemsByVariant
|
||||
|
||||
▸ **listInventoryItemsByVariant**(`variantId`): `Promise`<[`InventoryItemDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#inventoryitemdto)[]\>
|
||||
**listInventoryItemsByVariant**(`variantId`): `Promise`<[`InventoryItemDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#inventoryitemdto)[]\>
|
||||
|
||||
lists inventory items for a given variant
|
||||
|
||||
@@ -836,7 +836,7 @@ ___
|
||||
|
||||
### listVariantsByItem
|
||||
|
||||
▸ **listVariantsByItem**(`itemId`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
**listVariantsByItem**(`itemId`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
|
||||
lists variant by inventory item id
|
||||
|
||||
@@ -890,7 +890,7 @@ ___
|
||||
|
||||
### reserveQuantity
|
||||
|
||||
▸ **reserveQuantity**(`variantId`, `quantity`, `context?`): `Promise`<`void` \| [`ReservationItemDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#reservationitemdto)[]\>
|
||||
**reserveQuantity**(`variantId`, `quantity`, `context?`): `Promise`<`void` \| [`ReservationItemDTO`](../../admin_discounts/modules/admin_discounts.internal.mdx#reservationitemdto)[]\>
|
||||
|
||||
Reserves a quantity of a variant
|
||||
|
||||
@@ -951,7 +951,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`inventoryItemId`, `variantId`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)\>
|
||||
**retrieve**(`inventoryItemId`, `variantId`): `Promise`<[`ProductVariantInventoryItem`](admin_collections.internal.ProductVariantInventoryItem.mdx)\>
|
||||
|
||||
Retrieves a product variant inventory item by its inventory item ID and variant ID.
|
||||
|
||||
@@ -1004,7 +1004,7 @@ ___
|
||||
|
||||
### setProductAvailability
|
||||
|
||||
▸ **setProductAvailability**(`products`, `salesChannelId`): `Promise`<([`Product`](admin_collections.internal.Product.mdx) \| [`PricedProduct`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedproduct))[]\>
|
||||
**setProductAvailability**(`products`, `salesChannelId`): `Promise`<([`Product`](admin_collections.internal.Product.mdx) \| [`PricedProduct`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedproduct))[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1064,7 +1064,7 @@ ___
|
||||
|
||||
### setVariantAvailability
|
||||
|
||||
▸ **setVariantAvailability**(`variants`, `salesChannelId`, `availabilityContext?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[] \| [`PricedVariant`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedvariant)[]\>
|
||||
**setVariantAvailability**(`variants`, `salesChannelId`, `availabilityContext?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[] \| [`PricedVariant`](../../admin_discounts/modules/admin_discounts.internal.mdx#pricedvariant)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1123,7 +1123,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1161,7 +1161,7 @@ ___
|
||||
|
||||
### validateInventoryAtLocation
|
||||
|
||||
▸ **validateInventoryAtLocation**(`items`, `locationId`): `Promise`<`void`\>
|
||||
**validateInventoryAtLocation**(`items`, `locationId`): `Promise`<`void`\>
|
||||
|
||||
Validate stock at a location for fulfillment items
|
||||
|
||||
@@ -1205,7 +1205,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductVariantInventoryService`](admin_discounts.internal.internal.ProductVariantInventoryService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductVariantInventoryService`](admin_discounts.internal.internal.ProductVariantInventoryService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+28
-28
@@ -153,7 +153,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -178,7 +178,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addOptionValue
|
||||
|
||||
▸ **addOptionValue**(`variantId`, `optionId`, `optionValue`): `Promise`<[`ProductOptionValue`](admin_collections.internal.ProductOptionValue.mdx)\>
|
||||
**addOptionValue**(`variantId`, `optionId`, `optionValue`): `Promise`<[`ProductOptionValue`](admin_collections.internal.ProductOptionValue.mdx)\>
|
||||
|
||||
Adds option value to a variant.
|
||||
Fails when product with variant does not exist or
|
||||
@@ -243,7 +243,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -320,7 +320,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**<`TVariants`, `TOutput`\>(`productOrProductId`, `variants`): `Promise`<`TOutput`\>
|
||||
**create**<`TVariants`, `TOutput`\>(`productOrProductId`, `variants`): `Promise`<`TOutput`\>
|
||||
|
||||
Creates an unpublished product variant. Will validate against parent product
|
||||
to ensure that the variant can in fact be created.
|
||||
@@ -384,7 +384,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`variantIds`): `Promise`<`void`\>
|
||||
**delete**(`variantIds`): `Promise`<`void`\>
|
||||
|
||||
Deletes variant or variants.
|
||||
Will never fail due to delete being idempotent.
|
||||
@@ -421,7 +421,7 @@ ___
|
||||
|
||||
### deleteOptionValue
|
||||
|
||||
▸ **deleteOptionValue**(`variantId`, `optionId`): `Promise`<`void`\>
|
||||
**deleteOptionValue**(`variantId`, `optionId`): `Promise`<`void`\>
|
||||
|
||||
Deletes option value from given variant.
|
||||
Will never fail due to delete being idempotent.
|
||||
@@ -466,7 +466,7 @@ ___
|
||||
|
||||
### getFreeTextQueryBuilder\_
|
||||
|
||||
▸ **getFreeTextQueryBuilder_**(`variantRepo`, `query`, `q?`): `SelectQueryBuilder`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
**getFreeTextQueryBuilder_**(`variantRepo`, `query`, `q?`): `SelectQueryBuilder`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
|
||||
Lists variants based on the provided parameters and includes the count of
|
||||
variants that match the query.
|
||||
@@ -528,7 +528,7 @@ ___
|
||||
|
||||
### getRegionPrice
|
||||
|
||||
▸ **getRegionPrice**(`variantId`, `context`): `Promise`<``null`` \| `number`\>
|
||||
**getRegionPrice**(`variantId`, `context`): `Promise`<``null`` \| `number`\>
|
||||
|
||||
Gets the price specific to a region. If no region specific money amount
|
||||
exists the function will try to use a currency price. If no default
|
||||
@@ -583,7 +583,7 @@ ___
|
||||
|
||||
### isVariantInSalesChannels
|
||||
|
||||
▸ **isVariantInSalesChannels**(`id`, `salesChannelIds`): `Promise`<`boolean`\>
|
||||
**isVariantInSalesChannels**(`id`, `salesChannelIds`): `Promise`<`boolean`\>
|
||||
|
||||
Check if the variant is assigned to at least one of the provided sales channels.
|
||||
|
||||
@@ -636,7 +636,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -696,7 +696,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -755,7 +755,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`variantId`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
**retrieve**(`variantId`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
|
||||
Gets a product variant by id.
|
||||
|
||||
@@ -808,7 +808,7 @@ ___
|
||||
|
||||
### retrieveBySKU
|
||||
|
||||
▸ **retrieveBySKU**(`sku`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
**retrieveBySKU**(`sku`, `config?`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
|
||||
Gets a product variant by id.
|
||||
|
||||
@@ -861,7 +861,7 @@ ___
|
||||
|
||||
### setCurrencyPrice
|
||||
|
||||
▸ **setCurrencyPrice**(`variantId`, `price`): `Promise`<[`MoneyAmount`](admin_collections.internal.MoneyAmount.mdx)\>
|
||||
**setCurrencyPrice**(`variantId`, `price`): `Promise`<[`MoneyAmount`](admin_collections.internal.MoneyAmount.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -917,7 +917,7 @@ ___
|
||||
|
||||
### setRegionPrice
|
||||
|
||||
▸ **setRegionPrice**(`variantId`, `price`): `Promise`<[`MoneyAmount`](admin_collections.internal.MoneyAmount.mdx)\>
|
||||
**setRegionPrice**(`variantId`, `price`): `Promise`<[`MoneyAmount`](admin_collections.internal.MoneyAmount.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -973,7 +973,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1011,7 +1011,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`variantData`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
**update**(`variantData`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
|
||||
Updates a collection of variant.
|
||||
|
||||
@@ -1061,7 +1061,7 @@ Updates a collection of variant.
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **update**(`variantOrVariantId`, `update`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
**update**(`variantOrVariantId`, `update`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
|
||||
Updates a variant.
|
||||
Price updates should use dedicated methods.
|
||||
@@ -1112,7 +1112,7 @@ The function will throw, if price updates are attempted.
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **update**(`variantOrVariantId`, `update`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
**update**(`variantOrVariantId`, `update`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1163,7 +1163,7 @@ ___
|
||||
|
||||
### updateBatch
|
||||
|
||||
▸ `Protected` **updateBatch**(`variantData`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
`Protected` **updateBatch**(`variantData`): `Promise`<[`ProductVariant`](admin_collections.internal.ProductVariant.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1215,7 +1215,7 @@ ___
|
||||
|
||||
### updateOptionValue
|
||||
|
||||
▸ **updateOptionValue**(`variantId`, `optionId`, `optionValue`): `Promise`<[`ProductOptionValue`](admin_collections.internal.ProductOptionValue.mdx)\>
|
||||
**updateOptionValue**(`variantId`, `optionId`, `optionValue`): `Promise`<[`ProductOptionValue`](admin_collections.internal.ProductOptionValue.mdx)\>
|
||||
|
||||
Updates variant's option value.
|
||||
Option value must be of type string or number.
|
||||
@@ -1277,7 +1277,7 @@ ___
|
||||
|
||||
### updateVariantPrices
|
||||
|
||||
▸ **updateVariantPrices**(`data`): `Promise`<`void`\>
|
||||
**updateVariantPrices**(`data`): `Promise`<`void`\>
|
||||
|
||||
Updates variant/prices collection.
|
||||
Deletes any prices that are not in the update object, and is not associated with a price list.
|
||||
@@ -1310,7 +1310,7 @@ Deletes any prices that are not in the update object, and is not associated with
|
||||
}
|
||||
]} />
|
||||
|
||||
▸ **updateVariantPrices**(`variantId`, `prices`): `Promise`<`void`\>
|
||||
**updateVariantPrices**(`variantId`, `prices`): `Promise`<`void`\>
|
||||
|
||||
Updates a variant's prices.
|
||||
Deletes any prices that are not in the update object, and is not associated with a price list.
|
||||
@@ -1355,7 +1355,7 @@ ___
|
||||
|
||||
### updateVariantPricesBatch
|
||||
|
||||
▸ `Protected` **updateVariantPricesBatch**(`data`): `Promise`<`void`\>
|
||||
`Protected` **updateVariantPricesBatch**(`data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1389,7 +1389,7 @@ ___
|
||||
|
||||
### upsertCurrencyPrices
|
||||
|
||||
▸ **upsertCurrencyPrices**(`data`): `Promise`<`void`\>
|
||||
**upsertCurrencyPrices**(`data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1423,7 +1423,7 @@ ___
|
||||
|
||||
### upsertRegionPrices
|
||||
|
||||
▸ **upsertRegionPrices**(`data`): `Promise`<`void`\>
|
||||
**upsertRegionPrices**(`data`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1457,7 +1457,7 @@ ___
|
||||
|
||||
### validateVariantsToCreate\_
|
||||
|
||||
▸ `Protected` **validateVariantsToCreate_**(`product`, `variants`): `void`
|
||||
`Protected` **validateVariantsToCreate_**(`product`, `variants`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1499,7 +1499,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ProductVariantService`](admin_discounts.internal.internal.ProductVariantService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ProductVariantService`](admin_discounts.internal.internal.ProductVariantService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+22
-22
@@ -179,7 +179,7 @@ Provides layer to manipulate regions.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -204,7 +204,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addCountry
|
||||
|
||||
▸ **addCountry**(`regionId`, `code`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**addCountry**(`regionId`, `code`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Adds a country to the region.
|
||||
|
||||
@@ -257,7 +257,7 @@ ___
|
||||
|
||||
### addFulfillmentProvider
|
||||
|
||||
▸ **addFulfillmentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**addFulfillmentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Adds a fulfillment provider that is available in the region. Fails if the
|
||||
provider doesn't exist.
|
||||
@@ -311,7 +311,7 @@ ___
|
||||
|
||||
### addPaymentProvider
|
||||
|
||||
▸ **addPaymentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**addPaymentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Adds a payment provider that is available in the region. Fails if the
|
||||
provider doesn't exist.
|
||||
@@ -365,7 +365,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -442,7 +442,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**create**(`data`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Creates a region.
|
||||
|
||||
@@ -487,7 +487,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`regionId`): `Promise`<`void`\>
|
||||
**delete**(`regionId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a region.
|
||||
|
||||
@@ -523,7 +523,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)[]\>
|
||||
|
||||
Lists all regions based on a query
|
||||
|
||||
@@ -585,7 +585,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector?`, `config?`): `Promise`<[[`Region`](admin_collections.internal.Region.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector?`, `config?`): `Promise`<[[`Region`](admin_collections.internal.Region.mdx)[], `number`]\>
|
||||
|
||||
Lists all regions based on a query and returns them along with count
|
||||
|
||||
@@ -646,7 +646,7 @@ ___
|
||||
|
||||
### removeCountry
|
||||
|
||||
▸ **removeCountry**(`regionId`, `code`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**removeCountry**(`regionId`, `code`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Removes a country from a Region.
|
||||
|
||||
@@ -699,7 +699,7 @@ ___
|
||||
|
||||
### removeFulfillmentProvider
|
||||
|
||||
▸ **removeFulfillmentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**removeFulfillmentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Removes a fulfillment provider from a region. Is idempotent.
|
||||
|
||||
@@ -752,7 +752,7 @@ ___
|
||||
|
||||
### removePaymentProvider
|
||||
|
||||
▸ **removePaymentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**removePaymentProvider**(`regionId`, `providerId`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Removes a payment provider from a region. Is idempotent.
|
||||
|
||||
@@ -805,7 +805,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`regionId`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**retrieve**(`regionId`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Retrieves a region by its id.
|
||||
|
||||
@@ -858,7 +858,7 @@ ___
|
||||
|
||||
### retrieveByCountryCode
|
||||
|
||||
▸ **retrieveByCountryCode**(`code`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**retrieveByCountryCode**(`code`, `config?`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Retrieve a region by country code.
|
||||
|
||||
@@ -911,7 +911,7 @@ ___
|
||||
|
||||
### retrieveByName
|
||||
|
||||
▸ **retrieveByName**(`name`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**retrieveByName**(`name`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Retrieves a region by name.
|
||||
|
||||
@@ -956,7 +956,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -994,7 +994,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`regionId`, `update`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
**update**(`regionId`, `update`): `Promise`<[`Region`](admin_collections.internal.Region.mdx)\>
|
||||
|
||||
Updates a region
|
||||
|
||||
@@ -1047,7 +1047,7 @@ ___
|
||||
|
||||
### validateCountry
|
||||
|
||||
▸ `Protected` **validateCountry**(`code`, `regionId`): `Promise`<[`Country`](admin_collections.internal.Country.mdx)\>
|
||||
`Protected` **validateCountry**(`code`, `regionId`): `Promise`<[`Country`](admin_collections.internal.Country.mdx)\>
|
||||
|
||||
Validates a country code. Will normalize the code before checking for
|
||||
existence.
|
||||
@@ -1101,7 +1101,7 @@ ___
|
||||
|
||||
### validateCurrency
|
||||
|
||||
▸ `Protected` **validateCurrency**(`currencyCode`): `Promise`<`void`\>
|
||||
`Protected` **validateCurrency**(`currencyCode`): `Promise`<`void`\>
|
||||
|
||||
Validates a currency code. Will throw if the currency code doesn't exist.
|
||||
|
||||
@@ -1141,7 +1141,7 @@ ___
|
||||
|
||||
### validateFields
|
||||
|
||||
▸ `Protected` **validateFields**<`T`\>(`regionData`, `id?`): `Promise`<`DeepPartial`<[`Region`](admin_collections.internal.Region.mdx)\>\>
|
||||
`Protected` **validateFields**<`T`\>(`regionData`, `id?`): `Promise`<`DeepPartial`<[`Region`](admin_collections.internal.Region.mdx)\>\>
|
||||
|
||||
Validates fields for creation and updates. If the region already exists
|
||||
the id can be passed to check that country updates are allowed.
|
||||
@@ -1215,7 +1215,7 @@ ___
|
||||
|
||||
### validateTaxRate
|
||||
|
||||
▸ `Protected` **validateTaxRate**(`taxRate`): `void`
|
||||
`Protected` **validateTaxRate**(`taxRate`): `void`
|
||||
|
||||
Validates a tax rate. Will throw if the tax rate is not between 0 and 1.
|
||||
|
||||
@@ -1255,7 +1255,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`RegionService`](admin_discounts.internal.internal.RegionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`RegionService`](admin_discounts.internal.internal.RegionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
**create**(`data`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -210,7 +210,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`returnReasonId`): `Promise`<`void`\>
|
||||
**delete**(`returnReasonId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -244,7 +244,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -304,7 +304,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`returnReasonId`, `config?`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
**retrieve**(`returnReasonId`, `config?`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
|
||||
Gets an order by id.
|
||||
|
||||
@@ -357,7 +357,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -395,7 +395,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`ReturnReason`](admin_collections.internal.ReturnReason.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -446,7 +446,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ReturnReasonService`](admin_discounts.internal.internal.ReturnReasonService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ReturnReasonService`](admin_discounts.internal.internal.ReturnReasonService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -145,7 +145,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -170,7 +170,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -247,7 +247,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`returnId`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**cancel**(`returnId`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
Cancels a return if possible. Returns can be canceled if it has not been received.
|
||||
|
||||
@@ -292,7 +292,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**create**(`data`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
Creates a return request for an order, with given items, and a shipping
|
||||
method. If no refund amount is provided the refund amount is calculated from
|
||||
@@ -339,7 +339,7 @@ ___
|
||||
|
||||
### fulfill
|
||||
|
||||
▸ **fulfill**(`returnId`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**fulfill**(`returnId`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -382,7 +382,7 @@ ___
|
||||
|
||||
### getFulfillmentItems
|
||||
|
||||
▸ `Protected` **getFulfillmentItems**(`order`, `items`, `transformer`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx) & { `note?`: `string` ; `reason_id?`: `string` }[]\>
|
||||
`Protected` **getFulfillmentItems**(`order`, `items`, `transformer`): `Promise`<[`LineItem`](admin_collections.internal.LineItem.mdx) & { `note?`: `string` ; `reason_id?`: `string` }[]\>
|
||||
|
||||
Retrieves the order line items, given an array of items
|
||||
|
||||
@@ -452,7 +452,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -512,7 +512,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Return`](admin_collections.internal.Return.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Return`](admin_collections.internal.Return.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -571,7 +571,7 @@ ___
|
||||
|
||||
### receive
|
||||
|
||||
▸ **receive**(`returnId`, `receivedItems`, `refundAmount?`, `allowMismatch?`, `context?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**receive**(`returnId`, `receivedItems`, `refundAmount?`, `allowMismatch?`, `context?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
Registers a previously requested return as received. This will create a
|
||||
refund to the customer. If the returned items don't match the requested
|
||||
@@ -662,7 +662,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`returnId`, `config?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**retrieve**(`returnId`, `config?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
Retrieves a return by its id.
|
||||
|
||||
@@ -715,7 +715,7 @@ ___
|
||||
|
||||
### retrieveBySwap
|
||||
|
||||
▸ **retrieveBySwap**(`swapId`, `relations?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**retrieveBySwap**(`swapId`, `relations?`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -766,7 +766,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -804,7 +804,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`returnId`, `update`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
**update**(`returnId`, `update`): `Promise`<[`Return`](admin_collections.internal.Return.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -855,7 +855,7 @@ ___
|
||||
|
||||
### validateReturnLineItem
|
||||
|
||||
▸ `Protected` **validateReturnLineItem**(`item?`, `quantity?`, `additional?`): `DeepPartial`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
`Protected` **validateReturnLineItem**(`item?`, `quantity?`, `additional?`): `DeepPartial`<[`LineItem`](admin_collections.internal.LineItem.mdx)\>
|
||||
|
||||
Checks that a given quantity of a line item can be returned. Fails if the
|
||||
item is undefined or if the returnable quantity of the item is lower, than
|
||||
@@ -934,7 +934,7 @@ ___
|
||||
|
||||
### validateReturnStatuses
|
||||
|
||||
▸ `Protected` **validateReturnStatuses**(`order`): `void`
|
||||
`Protected` **validateReturnStatuses**(`order`): `void`
|
||||
|
||||
Checks that an order has the statuses necessary to complete a return.
|
||||
fulfillment_status cannot be not_fulfilled or returned.
|
||||
@@ -976,7 +976,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ReturnService`](admin_discounts.internal.internal.ReturnService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ReturnService`](admin_discounts.internal.internal.ReturnService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+5
-5
@@ -81,7 +81,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -106,7 +106,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -183,7 +183,7 @@ ___
|
||||
|
||||
### retrieveAvailableItemQuantity
|
||||
|
||||
▸ **retrieveAvailableItemQuantity**(`salesChannelId`, `inventoryItemId`): `Promise`<`number`\>
|
||||
**retrieveAvailableItemQuantity**(`salesChannelId`, `inventoryItemId`): `Promise`<`number`\>
|
||||
|
||||
Retrieves the available quantity of an item across all sales channel locations
|
||||
|
||||
@@ -236,7 +236,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -274,7 +274,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`SalesChannelInventoryService`](admin_discounts.internal.internal.SalesChannelInventoryService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`SalesChannelInventoryService`](admin_discounts.internal.internal.SalesChannelInventoryService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+8
-8
@@ -83,7 +83,7 @@ Service for managing the stock locations of sales channels
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -108,7 +108,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### associateLocation
|
||||
|
||||
▸ **associateLocation**(`salesChannelId`, `locationId`): `Promise`<`void`\>
|
||||
**associateLocation**(`salesChannelId`, `locationId`): `Promise`<`void`\>
|
||||
|
||||
Associates a sales channel with a stock location.
|
||||
|
||||
@@ -152,7 +152,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -229,7 +229,7 @@ ___
|
||||
|
||||
### listLocationIds
|
||||
|
||||
▸ **listLocationIds**(`salesChannelId`): `Promise`<`string`[]\>
|
||||
**listLocationIds**(`salesChannelId`): `Promise`<`string`[]\>
|
||||
|
||||
Lists the stock locations associated with a sales channel.
|
||||
|
||||
@@ -283,7 +283,7 @@ ___
|
||||
|
||||
### listSalesChannelIds
|
||||
|
||||
▸ **listSalesChannelIds**(`locationId`): `Promise`<`string`[]\>
|
||||
**listSalesChannelIds**(`locationId`): `Promise`<`string`[]\>
|
||||
|
||||
Lists the sales channels associated with a stock location.
|
||||
|
||||
@@ -337,7 +337,7 @@ ___
|
||||
|
||||
### removeLocation
|
||||
|
||||
▸ **removeLocation**(`locationId`, `salesChannelId?`): `Promise`<`void`\>
|
||||
**removeLocation**(`locationId`, `salesChannelId?`): `Promise`<`void`\>
|
||||
|
||||
Removes an association between a sales channel and a stock location.
|
||||
|
||||
@@ -381,7 +381,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -419,7 +419,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`SalesChannelLocationService`](admin_discounts.internal.internal.SalesChannelLocationService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`SalesChannelLocationService`](admin_discounts.internal.internal.SalesChannelLocationService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -113,7 +113,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -138,7 +138,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addProducts
|
||||
|
||||
▸ **addProducts**(`salesChannelId`, `productIds`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**addProducts**(`salesChannelId`, `productIds`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Add a batch of product to a sales channel
|
||||
|
||||
@@ -191,7 +191,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -268,7 +268,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**create**(`data`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Creates a SalesChannel
|
||||
|
||||
@@ -316,7 +316,7 @@ ___
|
||||
|
||||
### createDefault
|
||||
|
||||
▸ **createDefault**(): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**createDefault**(): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Creates a default sales channel, if this does not already exist.
|
||||
|
||||
@@ -348,7 +348,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`salesChannelId`): `Promise`<`void`\>
|
||||
**delete**(`salesChannelId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a sales channel from
|
||||
This feature is under development and may change in the future.
|
||||
@@ -386,7 +386,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)[], `number`]\>
|
||||
|
||||
Lists sales channels based on the provided parameters and includes the count of
|
||||
sales channels that match the query.
|
||||
@@ -448,7 +448,7 @@ ___
|
||||
|
||||
### listProductIdsBySalesChannelIds
|
||||
|
||||
▸ **listProductIdsBySalesChannelIds**(`salesChannelIds`): `Promise`<{ `[salesChannelId: string]`: `string`[]; }\>
|
||||
**listProductIdsBySalesChannelIds**(`salesChannelIds`): `Promise`<{ `[salesChannelId: string]`: `string`[]; }\>
|
||||
|
||||
List all product ids that belongs to the sales channels ids
|
||||
|
||||
@@ -493,7 +493,7 @@ ___
|
||||
|
||||
### removeProducts
|
||||
|
||||
▸ **removeProducts**(`salesChannelId`, `productIds`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**removeProducts**(`salesChannelId`, `productIds`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Remove a batch of product from a sales channel
|
||||
|
||||
@@ -546,7 +546,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`salesChannelId`, `config?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**retrieve**(`salesChannelId`, `config?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Retrieve a SalesChannel by id
|
||||
|
||||
@@ -599,7 +599,7 @@ ___
|
||||
|
||||
### retrieveByName
|
||||
|
||||
▸ **retrieveByName**(`name`, `config?`): `Promise`<`unknown`\>
|
||||
**retrieveByName**(`name`, `config?`): `Promise`<`unknown`\>
|
||||
|
||||
Find a sales channel by name.
|
||||
|
||||
@@ -652,7 +652,7 @@ ___
|
||||
|
||||
### retrieveDefault
|
||||
|
||||
▸ **retrieveDefault**(): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**retrieveDefault**(): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
Retrieves the default sales channel.
|
||||
|
||||
@@ -684,7 +684,7 @@ ___
|
||||
|
||||
### retrieve\_
|
||||
|
||||
▸ `Protected` **retrieve_**(`selector`, `config?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
`Protected` **retrieve_**(`selector`, `config?`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
A generic retrieve used to find a sales channel by different attributes.
|
||||
|
||||
@@ -737,7 +737,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -775,7 +775,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`salesChannelId`, `data`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
**update**(`salesChannelId`, `data`): `Promise`<[`SalesChannel`](admin_collections.internal.SalesChannel.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -826,7 +826,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`SalesChannelService`](admin_discounts.internal.internal.SalesChannelService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`SalesChannelService`](admin_discounts.internal.internal.SalesChannelService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -41,7 +41,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### options
|
||||
|
||||
• `get` **options**(): Record<`string`, `unknown`\>
|
||||
`get` **options**(): Record<`string`, `unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -83,7 +83,7 @@ AbstractSearchService.options
|
||||
|
||||
### addDocuments
|
||||
|
||||
▸ **addDocuments**(`indexName`, `documents`, `type`): `Promise`<`void`\>
|
||||
**addDocuments**(`indexName`, `documents`, `type`): `Promise`<`void`\>
|
||||
|
||||
Used to index documents by the search engine provider
|
||||
|
||||
@@ -139,7 +139,7 @@ ___
|
||||
|
||||
### createIndex
|
||||
|
||||
▸ **createIndex**(`indexName`, `options`): `Promise`<`void`\>
|
||||
**createIndex**(`indexName`, `options`): `Promise`<`void`\>
|
||||
|
||||
Used to create an index
|
||||
|
||||
@@ -187,7 +187,7 @@ ___
|
||||
|
||||
### deleteAllDocuments
|
||||
|
||||
▸ **deleteAllDocuments**(`indexName`): `Promise`<`void`\>
|
||||
**deleteAllDocuments**(`indexName`): `Promise`<`void`\>
|
||||
|
||||
Used to delete all documents
|
||||
|
||||
@@ -227,7 +227,7 @@ ___
|
||||
|
||||
### deleteDocument
|
||||
|
||||
▸ **deleteDocument**(`indexName`, `document_id`): `Promise`<`void`\>
|
||||
**deleteDocument**(`indexName`, `document_id`): `Promise`<`void`\>
|
||||
|
||||
Used to delete document
|
||||
|
||||
@@ -275,7 +275,7 @@ ___
|
||||
|
||||
### getIndex
|
||||
|
||||
▸ **getIndex**(`indexName`): `Promise`<`void`\>
|
||||
**getIndex**(`indexName`): `Promise`<`void`\>
|
||||
|
||||
Used to get an index
|
||||
|
||||
@@ -315,7 +315,7 @@ ___
|
||||
|
||||
### replaceDocuments
|
||||
|
||||
▸ **replaceDocuments**(`indexName`, `documents`, `type`): `Promise`<`void`\>
|
||||
**replaceDocuments**(`indexName`, `documents`, `type`): `Promise`<`void`\>
|
||||
|
||||
Used to replace documents
|
||||
|
||||
@@ -371,7 +371,7 @@ ___
|
||||
|
||||
### search
|
||||
|
||||
▸ **search**(`indexName`, `query`, `options`): `Promise`<{ `hits`: `unknown`[] }\>
|
||||
**search**(`indexName`, `query`, `options`): `Promise`<{ `hits`: `unknown`[] }\>
|
||||
|
||||
Used to search for a document in an index
|
||||
|
||||
@@ -436,7 +436,7 @@ ___
|
||||
|
||||
### updateSettings
|
||||
|
||||
▸ **updateSettings**(`indexName`, `settings`): `Promise`<`void`\>
|
||||
**updateSettings**(`indexName`, `settings`): `Promise`<`void`\>
|
||||
|
||||
Used to update the settings of an index
|
||||
|
||||
|
||||
+20
-20
@@ -115,7 +115,7 @@ Provides layer to manipulate profiles.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -140,7 +140,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addRequirement
|
||||
|
||||
▸ **addRequirement**(`optionId`, `requirement`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**addRequirement**(`optionId`, `requirement`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
|
||||
Adds a requirement to a shipping option. Only 1 requirement of each type
|
||||
is allowed.
|
||||
@@ -194,7 +194,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -271,7 +271,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**create**(`data`): `Promise`<[`ShippingOption`](admin_collections.internal.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
|
||||
@@ -318,7 +318,7 @@ ___
|
||||
|
||||
### createShippingMethod
|
||||
|
||||
▸ **createShippingMethod**(`optionId`, `data`, `config`): `Promise`<[`ShippingMethod`](admin_collections.internal.ShippingMethod.mdx)\>
|
||||
**createShippingMethod**(`optionId`, `data`, `config`): `Promise`<[`ShippingMethod`](admin_collections.internal.ShippingMethod.mdx)\>
|
||||
|
||||
Creates a shipping method for a given cart.
|
||||
|
||||
@@ -379,7 +379,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`optionId`): `Promise`<`void` \| [`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**delete**(`optionId`): `Promise`<`void` \| [`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
|
||||
Deletes a profile with a given profile id.
|
||||
|
||||
@@ -424,7 +424,7 @@ ___
|
||||
|
||||
### deleteShippingMethods
|
||||
|
||||
▸ **deleteShippingMethods**(`shippingMethods`): `Promise`<[`ShippingMethod`](admin_collections.internal.ShippingMethod.mdx)[]\>
|
||||
**deleteShippingMethods**(`shippingMethods`): `Promise`<[`ShippingMethod`](admin_collections.internal.ShippingMethod.mdx)[]\>
|
||||
|
||||
Removes a given shipping method
|
||||
|
||||
@@ -478,7 +478,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
|
||||
@@ -541,7 +541,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -601,7 +601,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -660,7 +660,7 @@ ___
|
||||
|
||||
### removeRequirement
|
||||
|
||||
▸ **removeRequirement**(`requirementId`): `Promise`<`void` \| [`ShippingOptionRequirement`](admin_collections.internal.ShippingOptionRequirement.mdx)\>
|
||||
**removeRequirement**(`requirementId`): `Promise`<`void` \| [`ShippingOptionRequirement`](admin_collections.internal.ShippingOptionRequirement.mdx)\>
|
||||
|
||||
Removes a requirement from a shipping option
|
||||
|
||||
@@ -705,7 +705,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`optionId`, `options?`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**retrieve**(`optionId`, `options?`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
|
||||
Gets a profile by id.
|
||||
Throws in case of DB Error and if profile was not found.
|
||||
@@ -759,7 +759,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -797,7 +797,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`optionId`, `update`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**update**(`optionId`, `update`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
|
||||
Updates a profile. Metadata updates and product updates should use
|
||||
dedicated methods, e.g. `setMetadata`, etc. The function
|
||||
@@ -852,7 +852,7 @@ ___
|
||||
|
||||
### updateShippingMethod
|
||||
|
||||
▸ **updateShippingMethod**(`id`, `update`): `Promise`<`undefined` \| [`ShippingMethod`](admin_collections.internal.ShippingMethod.mdx)\>
|
||||
**updateShippingMethod**(`id`, `update`): `Promise`<`undefined` \| [`ShippingMethod`](admin_collections.internal.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.
|
||||
@@ -906,7 +906,7 @@ ___
|
||||
|
||||
### updateShippingProfile
|
||||
|
||||
▸ **updateShippingProfile**(`optionIds`, `profileId`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
**updateShippingProfile**(`optionIds`, `profileId`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -966,7 +966,7 @@ ___
|
||||
|
||||
### validateCartOption
|
||||
|
||||
▸ **validateCartOption**(`option`, `cart`): `Promise`<``null`` \| [`ShippingOption`](admin_collections.internal.ShippingOption.mdx)\>
|
||||
**validateCartOption**(`option`, `cart`): `Promise`<``null`` \| [`ShippingOption`](admin_collections.internal.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
|
||||
@@ -1021,7 +1021,7 @@ ___
|
||||
|
||||
### validatePriceType\_
|
||||
|
||||
▸ **validatePriceType_**(`priceType`, `option`): `Promise`<[`ShippingOptionPriceType`](../enums/admin_collections.internal.ShippingOptionPriceType.mdx)\>
|
||||
**validatePriceType_**(`priceType`, `option`): `Promise`<[`ShippingOptionPriceType`](../enums/admin_collections.internal.ShippingOptionPriceType.mdx)\>
|
||||
|
||||
Validates a shipping option price
|
||||
|
||||
@@ -1082,7 +1082,7 @@ ___
|
||||
|
||||
### validateRequirement\_
|
||||
|
||||
▸ **validateRequirement_**(`requirement`, `optionId?`): `Promise`<[`ShippingOptionRequirement`](admin_collections.internal.ShippingOptionRequirement.mdx)\>
|
||||
**validateRequirement_**(`requirement`, `optionId?`): `Promise`<[`ShippingOptionRequirement`](admin_collections.internal.ShippingOptionRequirement.mdx)\>
|
||||
|
||||
Validates a requirement
|
||||
|
||||
@@ -1135,7 +1135,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ShippingOptionService`](admin_discounts.internal.internal.ShippingOptionService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ShippingOptionService`](admin_discounts.internal.internal.ShippingOptionService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+21
-21
@@ -109,7 +109,7 @@ Provides layer to manipulate profiles.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -134,7 +134,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addProduct
|
||||
|
||||
▸ **addProduct**(`profileId`, `productId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**addProduct**(`profileId`, `productId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -189,7 +189,7 @@ ___
|
||||
|
||||
### addProducts
|
||||
|
||||
▸ **addProducts**(`profileId`, `productId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**addProducts**(`profileId`, `productId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Adds a product or an array of products to the profile.
|
||||
|
||||
@@ -242,7 +242,7 @@ ___
|
||||
|
||||
### addShippingOption
|
||||
|
||||
▸ **addShippingOption**(`profileId`, `optionId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**addShippingOption**(`profileId`, `optionId`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Adds a shipping option to the profile. The shipping option can be used to
|
||||
fulfill the products in the products field.
|
||||
@@ -296,7 +296,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -373,7 +373,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`profile`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**create**(`profile`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Creates a new shipping profile.
|
||||
|
||||
@@ -418,7 +418,7 @@ ___
|
||||
|
||||
### createDefault
|
||||
|
||||
▸ **createDefault**(): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**createDefault**(): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Creates a default shipping profile, if this does not already exist.
|
||||
|
||||
@@ -450,7 +450,7 @@ ___
|
||||
|
||||
### createGiftCardDefault
|
||||
|
||||
▸ **createGiftCardDefault**(): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**createGiftCardDefault**(): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Creates a default shipping profile, for gift cards if unless it already
|
||||
exists.
|
||||
@@ -483,7 +483,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`profileId`): `Promise`<`void`\>
|
||||
**delete**(`profileId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a profile with a given profile id.
|
||||
|
||||
@@ -519,7 +519,7 @@ ___
|
||||
|
||||
### fetchCartOptions
|
||||
|
||||
▸ **fetchCartOptions**(`cart`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
**fetchCartOptions**(`cart`): `Promise`<[`ShippingOption`](admin_collections.internal.ShippingOption.mdx)[]\>
|
||||
|
||||
Finds all the shipping profiles that cover the products in a cart, and
|
||||
validates all options that are available for the cart.
|
||||
@@ -574,7 +574,7 @@ ___
|
||||
|
||||
### getMapProfileIdsByProductIds
|
||||
|
||||
▸ **getMapProfileIdsByProductIds**(`productIds`): `Promise`<`Map`<`string`, `string`\>\>
|
||||
**getMapProfileIdsByProductIds**(`productIds`): `Promise`<`Map`<`string`, `string`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -634,7 +634,7 @@ ___
|
||||
|
||||
### getProfilesInCart
|
||||
|
||||
▸ `Protected` **getProfilesInCart**(`cart`): `Promise`<`string`[]\>
|
||||
`Protected` **getProfilesInCart**(`cart`): `Promise`<`string`[]\>
|
||||
|
||||
Returns a list of all the productIds in the cart.
|
||||
|
||||
@@ -688,7 +688,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector?`, `config?`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)[]\>
|
||||
**list**(`selector?`, `config?`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -748,7 +748,7 @@ ___
|
||||
|
||||
### removeProducts
|
||||
|
||||
▸ **removeProducts**(`profileId`, `productId`): `Promise`<`void` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**removeProducts**(`profileId`, `productId`): `Promise`<`void` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Removes a product or an array of products from the profile.
|
||||
|
||||
@@ -801,7 +801,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`profileId`, `options?`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**retrieve**(`profileId`, `options?`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Gets a profile by id.
|
||||
Throws in case of DB Error and if profile was not found.
|
||||
@@ -855,7 +855,7 @@ ___
|
||||
|
||||
### retrieveDefault
|
||||
|
||||
▸ **retrieveDefault**(): `Promise`<``null`` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**retrieveDefault**(): `Promise`<``null`` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -885,7 +885,7 @@ ___
|
||||
|
||||
### retrieveForProducts
|
||||
|
||||
▸ **retrieveForProducts**(`productIds`): `Promise`<{ `[product_id: string]`: [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)[]; }\>
|
||||
**retrieveForProducts**(`productIds`): `Promise`<{ `[product_id: string]`: [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)[]; }\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -928,7 +928,7 @@ ___
|
||||
|
||||
### retrieveGiftCardDefault
|
||||
|
||||
▸ **retrieveGiftCardDefault**(): `Promise`<``null`` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**retrieveGiftCardDefault**(): `Promise`<``null`` \| [`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Retrieves the default gift card profile
|
||||
|
||||
@@ -960,7 +960,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -998,7 +998,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`profileId`, `update`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
**update**(`profileId`, `update`): `Promise`<[`ShippingProfile`](admin_collections.internal.ShippingProfile.mdx)\>
|
||||
|
||||
Updates a profile. Metadata updates and product updates should use
|
||||
dedicated methods, e.g. `setMetadata`, `addProduct`, etc. The function
|
||||
@@ -1053,7 +1053,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`ShippingProfileService`](admin_discounts.internal.internal.ShippingProfileService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`ShippingProfileService`](admin_discounts.internal.internal.ShippingProfileService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+7
-7
@@ -67,7 +67,7 @@ Provides layer to manipulate users.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -92,7 +92,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -169,7 +169,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
**create**(`data`): `Promise`<[`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -221,7 +221,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`stagedJobIds`): `Promise`<`void`\>
|
||||
**delete**(`stagedJobIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -255,7 +255,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`config`): `Promise`<[`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
**list**(`config`): `Promise`<[`StagedJob`](admin_discounts.internal.internal.StagedJob.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -307,7 +307,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -345,7 +345,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`StagedJobService`](admin_discounts.internal.internal.StagedJobService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`StagedJobService`](admin_discounts.internal.internal.StagedJobService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+10
-10
@@ -83,7 +83,7 @@ Provides layer to manipulate store settings.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -108,7 +108,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addCurrency
|
||||
|
||||
▸ **addCurrency**(`code`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
**addCurrency**(`code`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
|
||||
Add a currency to the store
|
||||
|
||||
@@ -153,7 +153,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -230,7 +230,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
**create**(): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
|
||||
Creates a store if it doesn't already exist.
|
||||
|
||||
@@ -262,7 +262,7 @@ ___
|
||||
|
||||
### getDefaultCurrency\_
|
||||
|
||||
▸ `Protected` **getDefaultCurrency_**(`code`): [`Partial`](../../admin_discounts/modules/admin_discounts.internal.mdx#partial)<[`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
`Protected` **getDefaultCurrency_**(`code`): [`Partial`](../../admin_discounts/modules/admin_discounts.internal.mdx#partial)<[`Currency`](admin_collections.internal.Currency.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -305,7 +305,7 @@ ___
|
||||
|
||||
### removeCurrency
|
||||
|
||||
▸ **removeCurrency**(`code`): `Promise`<`any`\>
|
||||
**removeCurrency**(`code`): `Promise`<`any`\>
|
||||
|
||||
Removes a currency from the store
|
||||
|
||||
@@ -350,7 +350,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`config?`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
**retrieve**(`config?`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
|
||||
Retrieve the store settings. There is always a maximum of one store.
|
||||
|
||||
@@ -395,7 +395,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -433,7 +433,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`data`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
**update**(`data`): `Promise`<[`Store`](admin_discounts.internal.internal.Store.mdx)\>
|
||||
|
||||
Updates a store
|
||||
|
||||
@@ -478,7 +478,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`StoreService`](admin_discounts.internal.internal.StoreService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`StoreService`](admin_discounts.internal.internal.StoreService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+5
-5
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### resolveBatchJobByType
|
||||
|
||||
▸ **resolveBatchJobByType**(`type`): [`AbstractBatchJobStrategy`](admin_discounts.internal.internal.AbstractBatchJobStrategy.mdx)
|
||||
**resolveBatchJobByType**(`type`): [`AbstractBatchJobStrategy`](admin_discounts.internal.internal.AbstractBatchJobStrategy.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -201,7 +201,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -239,7 +239,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`StrategyResolverService`](admin_discounts.internal.internal.StrategyResolverService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`StrategyResolverService`](admin_discounts.internal.internal.StrategyResolverService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+21
-21
@@ -243,7 +243,7 @@ Handles swaps
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -268,7 +268,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### areReturnItemsValid
|
||||
|
||||
▸ `Protected` **areReturnItemsValid**(`returnItems`): `Promise`<`boolean`\>
|
||||
`Protected` **areReturnItemsValid**(`returnItems`): `Promise`<`boolean`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -311,7 +311,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -388,7 +388,7 @@ ___
|
||||
|
||||
### cancel
|
||||
|
||||
▸ **cancel**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**cancel**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.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
|
||||
@@ -435,7 +435,7 @@ ___
|
||||
|
||||
### cancelFulfillment
|
||||
|
||||
▸ **cancelFulfillment**(`fulfillmentId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**cancelFulfillment**(`fulfillmentId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Cancels a fulfillment (if related to a swap)
|
||||
|
||||
@@ -480,7 +480,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`order`, `returnItems`, `additionalItems?`, `returnShipping?`, `custom?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**create**(`order`, `returnItems`, `additionalItems?`, `returnShipping?`, `custom?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Creates a swap from an order, with given return items, additional items
|
||||
and an optional return shipping method.
|
||||
@@ -606,7 +606,7 @@ ___
|
||||
|
||||
### createCart
|
||||
|
||||
▸ **createCart**(`swapId`, `customShippingOptions?`, `context?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**createCart**(`swapId`, `customShippingOptions?`, `context?`): `Promise`<[`Swap`](admin_collections.internal.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
|
||||
@@ -678,7 +678,7 @@ ___
|
||||
|
||||
### createFulfillment
|
||||
|
||||
▸ **createFulfillment**(`swapId`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**createFulfillment**(`swapId`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Fulfills the additional items associated with the swap. Will call the
|
||||
fulfillment providers associated with the shipping methods.
|
||||
@@ -732,7 +732,7 @@ ___
|
||||
|
||||
### createShipment
|
||||
|
||||
▸ **createShipment**(`swapId`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**createShipment**(`swapId`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Marks a fulfillment as shipped and attaches tracking numbers.
|
||||
|
||||
@@ -801,7 +801,7 @@ ___
|
||||
|
||||
### deleteMetadata
|
||||
|
||||
▸ **deleteMetadata**(`swapId`, `key`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**deleteMetadata**(`swapId`, `key`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Dedicated method to delete metadata for a swap.
|
||||
|
||||
@@ -854,7 +854,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)[]\>
|
||||
|
||||
List swaps.
|
||||
|
||||
@@ -916,7 +916,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`Swap`](admin_collections.internal.Swap.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`Swap`](admin_collections.internal.Swap.mdx)[], `number`]\>
|
||||
|
||||
List swaps.
|
||||
|
||||
@@ -977,7 +977,7 @@ ___
|
||||
|
||||
### processDifference
|
||||
|
||||
▸ **processDifference**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**processDifference**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Process difference for the requested swap.
|
||||
|
||||
@@ -1022,7 +1022,7 @@ ___
|
||||
|
||||
### registerCartCompletion
|
||||
|
||||
▸ **registerCartCompletion**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**registerCartCompletion**(`swapId`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Register a cart completion
|
||||
|
||||
@@ -1067,7 +1067,7 @@ ___
|
||||
|
||||
### registerReceived
|
||||
|
||||
▸ **registerReceived**(`id`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**registerReceived**(`id`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Registers the swap return items as received so that they cannot be used
|
||||
as a part of other swaps/returns.
|
||||
@@ -1113,7 +1113,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`swapId`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**retrieve**(`swapId`, `config?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Retrieves a swap with the given id.
|
||||
|
||||
@@ -1166,7 +1166,7 @@ ___
|
||||
|
||||
### retrieveByCartId
|
||||
|
||||
▸ **retrieveByCartId**(`cartId`, `relations?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**retrieveByCartId**(`cartId`, `relations?`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Retrieves a swap based on its associated cart id
|
||||
|
||||
@@ -1219,7 +1219,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1257,7 +1257,7 @@ ___
|
||||
|
||||
### transformQueryForCart
|
||||
|
||||
▸ `Protected` **transformQueryForCart**(`config`): [`Omit`](../../admin_auth/modules/admin_auth.internal.mdx#omit)<[`FindConfig`](../interfaces/admin_discounts.internal.internal.FindConfig.mdx)<[`Swap`](admin_collections.internal.Swap.mdx)\>, ``"select"``\> & { `select?`: `string`[] } & { `cartRelations`: `undefined` \| `string`[] ; `cartSelects`: `undefined` \| keyof [`Cart`](admin_collections.internal.Cart.mdx)[] }
|
||||
`Protected` **transformQueryForCart**(`config`): [`Omit`](../../admin_auth/modules/admin_auth.internal.mdx#omit)<[`FindConfig`](../interfaces/admin_discounts.internal.internal.FindConfig.mdx)<[`Swap`](admin_collections.internal.Swap.mdx)\>, ``"select"``\> & { `select?`: `string`[] } & { `cartRelations`: `undefined` \| `string`[] ; `cartSelects`: `undefined` \| keyof [`Cart`](admin_collections.internal.Cart.mdx)[] }
|
||||
|
||||
Transform find config object for retrieval.
|
||||
|
||||
@@ -1293,7 +1293,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`swapId`, `update`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
**update**(`swapId`, `update`): `Promise`<[`Swap`](admin_collections.internal.Swap.mdx)\>
|
||||
|
||||
Update the swap record.
|
||||
|
||||
@@ -1346,7 +1346,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`SwapService`](admin_discounts.internal.internal.SwapService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`SwapService`](admin_discounts.internal.internal.SwapService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+14
-14
@@ -65,7 +65,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -90,7 +90,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -167,7 +167,7 @@ ___
|
||||
|
||||
### authorizePayment
|
||||
|
||||
▸ **authorizePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**authorizePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -227,7 +227,7 @@ ___
|
||||
|
||||
### cancelPayment
|
||||
|
||||
▸ **cancelPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**cancelPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -287,7 +287,7 @@ ___
|
||||
|
||||
### capturePayment
|
||||
|
||||
▸ **capturePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**capturePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -347,7 +347,7 @@ ___
|
||||
|
||||
### createPayment
|
||||
|
||||
▸ **createPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**createPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -407,7 +407,7 @@ ___
|
||||
|
||||
### deletePayment
|
||||
|
||||
▸ **deletePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**deletePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -467,7 +467,7 @@ ___
|
||||
|
||||
### getPaymentData
|
||||
|
||||
▸ **getPaymentData**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**getPaymentData**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -527,7 +527,7 @@ ___
|
||||
|
||||
### getStatus
|
||||
|
||||
▸ **getStatus**(`_`): `Promise`<`string`\>
|
||||
**getStatus**(`_`): `Promise`<`string`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -570,7 +570,7 @@ ___
|
||||
|
||||
### refundPayment
|
||||
|
||||
▸ **refundPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**refundPayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -630,7 +630,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -668,7 +668,7 @@ ___
|
||||
|
||||
### updatePayment
|
||||
|
||||
▸ **updatePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**updatePayment**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -728,7 +728,7 @@ ___
|
||||
|
||||
### updatePaymentData
|
||||
|
||||
▸ **updatePaymentData**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
**updatePaymentData**(`_`): `Promise`<Record<`string`, `unknown`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -788,7 +788,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`SystemPaymentProviderService`](admin_discounts.internal.internal.SystemPaymentProviderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`SystemPaymentProviderService`](admin_discounts.internal.internal.SystemPaymentProviderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+16
-16
@@ -123,7 +123,7 @@ Finds tax providers and assists in tax related operations.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -148,7 +148,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -225,7 +225,7 @@ ___
|
||||
|
||||
### clearLineItemsTaxLines
|
||||
|
||||
▸ **clearLineItemsTaxLines**(`itemIds`): `Promise`<`void`\>
|
||||
**clearLineItemsTaxLines**(`itemIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -259,7 +259,7 @@ ___
|
||||
|
||||
### clearTaxLines
|
||||
|
||||
▸ **clearTaxLines**(`cartId`): `Promise`<`void`\>
|
||||
**clearTaxLines**(`cartId`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -293,7 +293,7 @@ ___
|
||||
|
||||
### createShippingTaxLines
|
||||
|
||||
▸ **createShippingTaxLines**(`shippingMethod`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
**createShippingTaxLines**(`shippingMethod`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
|
||||
Persists the tax lines relevant for a shipping method to the database. Used
|
||||
for return shipping methods.
|
||||
@@ -356,7 +356,7 @@ ___
|
||||
|
||||
### createTaxLines
|
||||
|
||||
▸ **createTaxLines**(`cartOrLineItems`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
**createTaxLines**(`cartOrLineItems`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
|
||||
Persists the tax lines relevant for an order to the database.
|
||||
|
||||
@@ -418,7 +418,7 @@ ___
|
||||
|
||||
### getRegionRatesForProduct
|
||||
|
||||
▸ **getRegionRatesForProduct**(`productIds`, `region`): `Promise`<`Map`<`string`, [`TaxServiceRate`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxservicerate)[]\>\>
|
||||
**getRegionRatesForProduct**(`productIds`, `region`): `Promise`<`Map`<`string`, [`TaxServiceRate`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxservicerate)[]\>\>
|
||||
|
||||
Gets the tax rates configured for a product. The rates are cached between
|
||||
calls.
|
||||
@@ -489,7 +489,7 @@ ___
|
||||
|
||||
### getRegionRatesForShipping
|
||||
|
||||
▸ **getRegionRatesForShipping**(`optionId`, `regionDetails`): `Promise`<[`TaxServiceRate`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxservicerate)[]\>
|
||||
**getRegionRatesForShipping**(`optionId`, `regionDetails`): `Promise`<[`TaxServiceRate`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxservicerate)[]\>
|
||||
|
||||
Gets the tax rates configured for a shipping option. The rates are cached
|
||||
between calls.
|
||||
@@ -552,7 +552,7 @@ ___
|
||||
|
||||
### getShippingTaxLines
|
||||
|
||||
▸ **getShippingTaxLines**(`shippingMethod`, `calculationContext`): `Promise`<[`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx)[]\>
|
||||
**getShippingTaxLines**(`shippingMethod`, `calculationContext`): `Promise`<[`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx)[]\>
|
||||
|
||||
Gets the relevant tax lines for a shipping method. Note: this method
|
||||
doesn't persist the tax lines. Use createShippingTaxLines if you wish to
|
||||
@@ -616,7 +616,7 @@ ___
|
||||
|
||||
### getTaxLines
|
||||
|
||||
▸ **getTaxLines**(`lineItems`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
**getTaxLines**(`lineItems`, `calculationContext`): `Promise`<([`ShippingMethodTaxLine`](admin_collections.internal.ShippingMethodTaxLine.mdx) \| [`LineItemTaxLine`](admin_collections.internal.LineItemTaxLine.mdx))[]\>
|
||||
|
||||
Gets the relevant tax lines for an order or cart. If an order is provided
|
||||
the order's tax lines will be returned. If a cart is provided the tax lines
|
||||
@@ -682,7 +682,7 @@ ___
|
||||
|
||||
### getTaxLinesMap
|
||||
|
||||
▸ `Protected` **getTaxLinesMap**(`items`, `calculationContext`): `Promise`<[`TaxLinesMaps`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxlinesmaps)\>
|
||||
`Protected` **getTaxLinesMap**(`items`, `calculationContext`): `Promise`<[`TaxLinesMaps`](../../admin_discounts/modules/admin_discounts.internal.mdx#taxlinesmaps)\>
|
||||
|
||||
Return a map of tax lines for line items and shipping methods
|
||||
|
||||
@@ -735,7 +735,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(): `Promise`<[`TaxProvider`](admin_collections.internal.TaxProvider.mdx)[]\>
|
||||
**list**(): `Promise`<[`TaxProvider`](admin_collections.internal.TaxProvider.mdx)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -774,7 +774,7 @@ ___
|
||||
|
||||
### registerInstalledProviders
|
||||
|
||||
▸ **registerInstalledProviders**(`providers`): `Promise`<`void`\>
|
||||
**registerInstalledProviders**(`providers`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -808,7 +808,7 @@ ___
|
||||
|
||||
### retrieveProvider
|
||||
|
||||
▸ **retrieveProvider**(`region`): [`ITaxService`](../interfaces/admin_discounts.internal.internal.ITaxService.mdx)
|
||||
**retrieveProvider**(`region`): [`ITaxService`](../interfaces/admin_discounts.internal.internal.ITaxService.mdx)
|
||||
|
||||
Retrieves the relevant tax provider for the given region.
|
||||
|
||||
@@ -844,7 +844,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -882,7 +882,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`TaxProviderService`](admin_discounts.internal.internal.TaxProviderService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`TaxProviderService`](admin_discounts.internal.internal.TaxProviderService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+18
-18
@@ -89,7 +89,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -114,7 +114,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### addToProduct
|
||||
|
||||
▸ **addToProduct**(`id`, `productIds`, `replace?`): `Promise`<[`ProductTaxRate`](admin_discounts.internal.internal.ProductTaxRate.mdx) \| [`ProductTaxRate`](admin_discounts.internal.internal.ProductTaxRate.mdx)[]\>
|
||||
**addToProduct**(`id`, `productIds`, `replace?`): `Promise`<[`ProductTaxRate`](admin_discounts.internal.internal.ProductTaxRate.mdx) \| [`ProductTaxRate`](admin_discounts.internal.internal.ProductTaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -173,7 +173,7 @@ ___
|
||||
|
||||
### addToProductType
|
||||
|
||||
▸ **addToProductType**(`id`, `productTypeIds`, `replace?`): `Promise`<[`ProductTypeTaxRate`](admin_discounts.internal.internal.ProductTypeTaxRate.mdx)[]\>
|
||||
**addToProductType**(`id`, `productTypeIds`, `replace?`): `Promise`<[`ProductTypeTaxRate`](admin_discounts.internal.internal.ProductTypeTaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -241,7 +241,7 @@ ___
|
||||
|
||||
### addToShippingOption
|
||||
|
||||
▸ **addToShippingOption**(`id`, `optionIds`, `replace?`): `Promise`<[`ShippingTaxRate`](admin_discounts.internal.internal.ShippingTaxRate.mdx)[]\>
|
||||
**addToShippingOption**(`id`, `optionIds`, `replace?`): `Promise`<[`ShippingTaxRate`](admin_discounts.internal.internal.ShippingTaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -309,7 +309,7 @@ ___
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -386,7 +386,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`data`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
**create**(`data`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -429,7 +429,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`id`): `Promise`<`void`\>
|
||||
**delete**(`id`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -463,7 +463,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -523,7 +523,7 @@ ___
|
||||
|
||||
### listAndCount
|
||||
|
||||
▸ **listAndCount**(`selector`, `config?`): `Promise`<[[`TaxRate`](admin_collections.internal.TaxRate.mdx)[], `number`]\>
|
||||
**listAndCount**(`selector`, `config?`): `Promise`<[[`TaxRate`](admin_collections.internal.TaxRate.mdx)[], `number`]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -582,7 +582,7 @@ ___
|
||||
|
||||
### listByProduct
|
||||
|
||||
▸ **listByProduct**(`productId`, `config`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
**listByProduct**(`productId`, `config`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -642,7 +642,7 @@ ___
|
||||
|
||||
### listByShippingOption
|
||||
|
||||
▸ **listByShippingOption**(`shippingOptionId`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
**listByShippingOption**(`shippingOptionId`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -694,7 +694,7 @@ ___
|
||||
|
||||
### removeFromProduct
|
||||
|
||||
▸ **removeFromProduct**(`id`, `productIds`): `Promise`<`void`\>
|
||||
**removeFromProduct**(`id`, `productIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -736,7 +736,7 @@ ___
|
||||
|
||||
### removeFromProductType
|
||||
|
||||
▸ **removeFromProductType**(`id`, `typeIds`): `Promise`<`void`\>
|
||||
**removeFromProductType**(`id`, `typeIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -778,7 +778,7 @@ ___
|
||||
|
||||
### removeFromShippingOption
|
||||
|
||||
▸ **removeFromShippingOption**(`id`, `optionIds`): `Promise`<`void`\>
|
||||
**removeFromShippingOption**(`id`, `optionIds`): `Promise`<`void`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -820,7 +820,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`taxRateId`, `config?`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
**retrieve**(`taxRateId`, `config?`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -871,7 +871,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -909,7 +909,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`id`, `data`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
**update**(`id`, `data`): `Promise`<[`TaxRate`](admin_collections.internal.TaxRate.mdx)\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -960,7 +960,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`TaxRateService`](admin_discounts.internal.internal.TaxRateService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`TaxRateService`](admin_discounts.internal.internal.TaxRateService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### signToken
|
||||
|
||||
▸ **signToken**(`data`, `options?`): `string`
|
||||
**signToken**(`data`, `options?`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -75,7 +75,7 @@ ___
|
||||
|
||||
### verifyToken
|
||||
|
||||
▸ **verifyToken**(`token`, `options?`): `string` \| `Jwt` \| `JwtPayload`
|
||||
**verifyToken**(`token`, `options?`): `string` \| `Jwt` \| `JwtPayload`
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+27
-27
@@ -93,7 +93,7 @@ A service that calculates total and subtotals for orders, carts etc..
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -118,7 +118,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -195,7 +195,7 @@ ___
|
||||
|
||||
### calculateDiscount\_
|
||||
|
||||
▸ **calculateDiscount_**(`lineItem`, `variant`, `variantPrice`, `value`, `discountType`): [`LineDiscount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscount)
|
||||
**calculateDiscount_**(`lineItem`, `variant`, `variantPrice`, `value`, `discountType`): [`LineDiscount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscount)
|
||||
|
||||
Calculates either fixed or percentage discount of a variant
|
||||
|
||||
@@ -267,7 +267,7 @@ ___
|
||||
|
||||
### getAllocationItemDiscounts
|
||||
|
||||
▸ **getAllocationItemDiscounts**(`discount`, `cart`): [`LineDiscount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscount)[]
|
||||
**getAllocationItemDiscounts**(`discount`, `cart`): [`LineDiscount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscount)[]
|
||||
|
||||
If the rule of a discount has allocation="item", then we need
|
||||
to calculate discount on each item in the cart. Furthermore, we need to
|
||||
@@ -324,7 +324,7 @@ ___
|
||||
|
||||
### getAllocationMap
|
||||
|
||||
▸ **getAllocationMap**(`orderOrCart`, `options?`): `Promise`<[`LineAllocationsMap`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineallocationsmap)\>
|
||||
**getAllocationMap**(`orderOrCart`, `options?`): `Promise`<[`LineAllocationsMap`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineallocationsmap)\>
|
||||
|
||||
Gets a map of discounts and gift cards that apply to line items in an
|
||||
order. The function calculates the amount of a discount or gift card that
|
||||
@@ -411,7 +411,7 @@ ___
|
||||
|
||||
### getCalculationContext
|
||||
|
||||
▸ **getCalculationContext**(`calculationContextData`, `options?`): `Promise`<[`TaxCalculationContext`](../modules/admin_discounts.internal.internal.mdx#taxcalculationcontext)\>
|
||||
**getCalculationContext**(`calculationContextData`, `options?`): `Promise`<[`TaxCalculationContext`](../modules/admin_discounts.internal.internal.mdx#taxcalculationcontext)\>
|
||||
|
||||
Prepares the calculation context for a tax total calculation.
|
||||
|
||||
@@ -464,7 +464,7 @@ ___
|
||||
|
||||
### getDiscountTotal
|
||||
|
||||
▸ **getDiscountTotal**(`cartOrOrder`): `Promise`<`number`\>
|
||||
**getDiscountTotal**(`cartOrOrder`): `Promise`<`number`\>
|
||||
|
||||
Calculates the total discount amount for each of the different supported
|
||||
discount types. If discounts aren't present or invalid returns 0.
|
||||
@@ -510,7 +510,7 @@ ___
|
||||
|
||||
### getGiftCardTotal
|
||||
|
||||
▸ **getGiftCardTotal**(`cartOrOrder`, `opts?`): `Promise`<{ `tax_total`: `number` ; `total`: `number` }\>
|
||||
**getGiftCardTotal**(`cartOrOrder`, `opts?`): `Promise`<{ `tax_total`: `number` ; `total`: `number` }\>
|
||||
|
||||
Gets the gift card amount on a cart or order.
|
||||
|
||||
@@ -571,7 +571,7 @@ ___
|
||||
|
||||
### getGiftCardableAmount
|
||||
|
||||
▸ **getGiftCardableAmount**(`cartOrOrder`): `Promise`<`number`\>
|
||||
**getGiftCardableAmount**(`cartOrOrder`): `Promise`<`number`\>
|
||||
|
||||
Gets the amount that can be gift carded on a cart. In regions where gift
|
||||
cards are taxable this amount should exclude taxes.
|
||||
@@ -617,7 +617,7 @@ ___
|
||||
|
||||
### getLineDiscounts
|
||||
|
||||
▸ **getLineDiscounts**(`cartOrOrder`, `discount?`): [`LineDiscountAmount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscountamount)[]
|
||||
**getLineDiscounts**(`cartOrOrder`, `discount?`): [`LineDiscountAmount`](../../admin_discounts/modules/admin_discounts.internal.mdx#linediscountamount)[]
|
||||
|
||||
Returns the discount amount allocated to the line items of an order.
|
||||
|
||||
@@ -694,7 +694,7 @@ ___
|
||||
|
||||
### getLineItemAdjustmentsTotal
|
||||
|
||||
▸ **getLineItemAdjustmentsTotal**(`cartOrOrder`): `number`
|
||||
**getLineItemAdjustmentsTotal**(`cartOrOrder`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -728,7 +728,7 @@ ___
|
||||
|
||||
### getLineItemDiscountAdjustment
|
||||
|
||||
▸ **getLineItemDiscountAdjustment**(`lineItem`, `discount`): `number`
|
||||
**getLineItemDiscountAdjustment**(`lineItem`, `discount`): `number`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -770,7 +770,7 @@ ___
|
||||
|
||||
### getLineItemRefund
|
||||
|
||||
▸ **getLineItemRefund**(`order`, `lineItem`): `Promise`<`number`\>
|
||||
**getLineItemRefund**(`order`, `lineItem`): `Promise`<`number`\>
|
||||
|
||||
The amount that can be refunded for a given line item.
|
||||
|
||||
@@ -823,7 +823,7 @@ ___
|
||||
|
||||
### getLineItemTotal
|
||||
|
||||
▸ **getLineItemTotal**(`lineItem`, `cartOrOrder`, `options?`): `Promise`<`number`\>
|
||||
**getLineItemTotal**(`lineItem`, `cartOrOrder`, `options?`): `Promise`<`number`\>
|
||||
|
||||
Gets a total for a line item. The total can take gift cards, discounts and
|
||||
taxes into account. This can be controlled through the options.
|
||||
@@ -885,7 +885,7 @@ ___
|
||||
|
||||
### getLineItemTotals
|
||||
|
||||
▸ **getLineItemTotals**(`lineItem`, `cartOrOrder`, `options?`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals-1)\>
|
||||
**getLineItemTotals**(`lineItem`, `cartOrOrder`, `options?`): `Promise`<[`LineItemTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#lineitemtotals-1)\>
|
||||
|
||||
Breaks down the totals related to a line item; these are the subtotal, the
|
||||
amount of discount applied to the line item, the amount of a gift card
|
||||
@@ -948,7 +948,7 @@ ___
|
||||
|
||||
### getPaidTotal
|
||||
|
||||
▸ **getPaidTotal**(`order`): `number`
|
||||
**getPaidTotal**(`order`): `number`
|
||||
|
||||
Gets the total payments made on an order
|
||||
|
||||
@@ -984,7 +984,7 @@ ___
|
||||
|
||||
### getRefundTotal
|
||||
|
||||
▸ **getRefundTotal**(`order`, `lineItems`): `Promise`<`number`\>
|
||||
**getRefundTotal**(`order`, `lineItems`): `Promise`<`number`\>
|
||||
|
||||
Calculates refund total of line items.
|
||||
If any of the items to return have been discounted, we need to
|
||||
@@ -1039,7 +1039,7 @@ ___
|
||||
|
||||
### getRefundedTotal
|
||||
|
||||
▸ **getRefundedTotal**(`order`): `number`
|
||||
**getRefundedTotal**(`order`): `number`
|
||||
|
||||
Gets the total refund amount for an order.
|
||||
|
||||
@@ -1075,7 +1075,7 @@ ___
|
||||
|
||||
### getShippingMethodTotals
|
||||
|
||||
▸ **getShippingMethodTotals**(`shippingMethod`, `cartOrOrder`, `opts?`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals-1)\>
|
||||
**getShippingMethodTotals**(`shippingMethod`, `cartOrOrder`, `opts?`): `Promise`<[`ShippingMethodTotals`](../../admin_discounts/modules/admin_discounts.internal.mdx#shippingmethodtotals-1)\>
|
||||
|
||||
Gets the totals breakdown for a shipping method. Fetches tax lines if not
|
||||
already provided.
|
||||
@@ -1137,7 +1137,7 @@ ___
|
||||
|
||||
### getShippingTotal
|
||||
|
||||
▸ **getShippingTotal**(`cartOrOrder`): `Promise`<`number`\>
|
||||
**getShippingTotal**(`cartOrOrder`): `Promise`<`number`\>
|
||||
|
||||
Calculates shipping total
|
||||
|
||||
@@ -1182,7 +1182,7 @@ ___
|
||||
|
||||
### getSubtotal
|
||||
|
||||
▸ **getSubtotal**(`cartOrOrder`, `opts?`): `Promise`<`number`\>
|
||||
**getSubtotal**(`cartOrOrder`, `opts?`): `Promise`<`number`\>
|
||||
|
||||
Calculates subtotal of a given cart or order.
|
||||
|
||||
@@ -1235,7 +1235,7 @@ ___
|
||||
|
||||
### getSwapTotal
|
||||
|
||||
▸ **getSwapTotal**(`order`): `number`
|
||||
**getSwapTotal**(`order`): `number`
|
||||
|
||||
The total paid for swaps. May be negative in case of negative swap
|
||||
difference.
|
||||
@@ -1272,7 +1272,7 @@ ___
|
||||
|
||||
### getTaxTotal
|
||||
|
||||
▸ **getTaxTotal**(`cartOrOrder`, `forceTaxes?`): `Promise`<``null`` \| `number`\>
|
||||
**getTaxTotal**(`cartOrOrder`, `forceTaxes?`): `Promise`<``null`` \| `number`\>
|
||||
|
||||
Calculates tax total
|
||||
Currently based on the Danish tax system
|
||||
@@ -1326,7 +1326,7 @@ ___
|
||||
|
||||
### getTotal
|
||||
|
||||
▸ **getTotal**(`cartOrOrder`, `options?`): `Promise`<`number`\>
|
||||
**getTotal**(`cartOrOrder`, `options?`): `Promise`<`number`\>
|
||||
|
||||
Calculates total of a given cart or order.
|
||||
|
||||
@@ -1379,7 +1379,7 @@ ___
|
||||
|
||||
### rounded
|
||||
|
||||
▸ **rounded**(`value`): `number`
|
||||
**rounded**(`value`): `number`
|
||||
|
||||
Rounds a number using Math.round.
|
||||
|
||||
@@ -1415,7 +1415,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1453,7 +1453,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`TotalsService`](admin_discounts.internal.internal.TotalsService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`TotalsService`](admin_discounts.internal.internal.TotalsService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+4
-4
@@ -57,7 +57,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -78,7 +78,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -151,7 +151,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -185,7 +185,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`TransactionBaseService`](admin_discounts.internal.internal.TransactionBaseService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`TransactionBaseService`](admin_discounts.internal.internal.TransactionBaseService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+14
-14
@@ -131,7 +131,7 @@ Provides layer to manipulate users.
|
||||
|
||||
### activeManager\_
|
||||
|
||||
• `Protected` `get` **activeManager_**(): `EntityManager`
|
||||
`Protected` `get` **activeManager_**(): `EntityManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -156,7 +156,7 @@ TransactionBaseService.activeManager\_
|
||||
|
||||
### atomicPhase\_
|
||||
|
||||
▸ `Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
||||
`Protected` **atomicPhase_**<`TResult`, `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
|
||||
@@ -233,7 +233,7 @@ ___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`user`, `password`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**create**(`user`, `password`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Creates a user with username being validated.
|
||||
Fails if email is not a valid format.
|
||||
@@ -287,7 +287,7 @@ ___
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**(`userId`): `Promise`<`void`\>
|
||||
**delete**(`userId`): `Promise`<`void`\>
|
||||
|
||||
Deletes a user from a given user id.
|
||||
|
||||
@@ -323,7 +323,7 @@ ___
|
||||
|
||||
### generateResetPasswordToken
|
||||
|
||||
▸ **generateResetPasswordToken**(`userId`): `Promise`<`string`\>
|
||||
**generateResetPasswordToken**(`userId`): `Promise`<`string`\>
|
||||
|
||||
Generate a JSON Web token, that will be sent to a user, that wishes to
|
||||
reset password.
|
||||
@@ -372,7 +372,7 @@ ___
|
||||
|
||||
### hashPassword\_
|
||||
|
||||
▸ **hashPassword_**(`password`): `Promise`<`string`\>
|
||||
**hashPassword_**(`password`): `Promise`<`string`\>
|
||||
|
||||
Hashes a password
|
||||
|
||||
@@ -417,7 +417,7 @@ ___
|
||||
|
||||
### list
|
||||
|
||||
▸ **list**(`selector`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)[]\>
|
||||
**list**(`selector`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)[]\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -477,7 +477,7 @@ ___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`userId`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**retrieve**(`userId`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Gets a user by id.
|
||||
Throws in case of DB Error and if user was not found.
|
||||
@@ -531,7 +531,7 @@ ___
|
||||
|
||||
### retrieveByApiToken
|
||||
|
||||
▸ **retrieveByApiToken**(`apiToken`, `relations?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**retrieveByApiToken**(`apiToken`, `relations?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Gets a user by api token.
|
||||
Throws in case of DB Error and if user was not found.
|
||||
@@ -585,7 +585,7 @@ ___
|
||||
|
||||
### retrieveByEmail
|
||||
|
||||
▸ **retrieveByEmail**(`email`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**retrieveByEmail**(`email`, `config?`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Gets a user by email.
|
||||
Throws in case of DB Error and if user was not found.
|
||||
@@ -639,7 +639,7 @@ ___
|
||||
|
||||
### setPassword\_
|
||||
|
||||
▸ **setPassword_**(`userId`, `password`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**setPassword_**(`userId`, `password`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Sets a password for a user
|
||||
Fails if no user exists with userId and if the hashing of the new
|
||||
@@ -694,7 +694,7 @@ ___
|
||||
|
||||
### shouldRetryTransaction\_
|
||||
|
||||
▸ `Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -732,7 +732,7 @@ ___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`userId`, `update`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
**update**(`userId`, `update`): `Promise`<[`User`](admin_auth.internal.User.mdx)\>
|
||||
|
||||
Updates a user.
|
||||
|
||||
@@ -785,7 +785,7 @@ ___
|
||||
|
||||
### withTransaction
|
||||
|
||||
▸ **withTransaction**(`transactionManager?`): [`UserService`](admin_discounts.internal.internal.UserService.mdx)
|
||||
**withTransaction**(`transactionManager?`): [`UserService`](admin_discounts.internal.internal.UserService.mdx)
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
+9
-9
@@ -49,7 +49,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### delete
|
||||
|
||||
▸ **delete**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
**delete**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -118,7 +118,7 @@ ___
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
**get**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -187,7 +187,7 @@ ___
|
||||
|
||||
### getUri
|
||||
|
||||
▸ **getUri**(`config?`): `string`
|
||||
**getUri**(`config?`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -221,7 +221,7 @@ ___
|
||||
|
||||
### head
|
||||
|
||||
▸ **head**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
**head**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -290,7 +290,7 @@ ___
|
||||
|
||||
### options
|
||||
|
||||
▸ **options**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
**options**<`T`, `R`, `D`\>(`url`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -359,7 +359,7 @@ ___
|
||||
|
||||
### patch
|
||||
|
||||
▸ **patch**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
**patch**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -436,7 +436,7 @@ ___
|
||||
|
||||
### post
|
||||
|
||||
▸ **post**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
**post**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -513,7 +513,7 @@ ___
|
||||
|
||||
### put
|
||||
|
||||
▸ **put**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
**put**<`T`, `R`, `D`\>(`url`, `data?`, `config?`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
@@ -590,7 +590,7 @@ ___
|
||||
|
||||
### request
|
||||
|
||||
▸ **request**<`T`, `R`, `D`\>(`config`): `Promise`<`R`\>
|
||||
**request**<`T`, `R`, `D`\>(`config`): `Promise`<`R`\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
|
||||
+7
-7
@@ -33,7 +33,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
### createClient
|
||||
|
||||
▸ **createClient**(`config`): [`AxiosInstance`](../interfaces/swaps.internal.AxiosInstance.mdx)
|
||||
**createClient**(`config`): [`AxiosInstance`](../interfaces/swaps.internal.AxiosInstance.mdx)
|
||||
|
||||
Creates the axios client used for requests
|
||||
As part of the creation, we configure the retry conditions
|
||||
@@ -71,7 +71,7 @@ ___
|
||||
|
||||
### normalizeHeader
|
||||
|
||||
▸ **normalizeHeader**(`header`): `string`
|
||||
**normalizeHeader**(`header`): `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -105,7 +105,7 @@ ___
|
||||
|
||||
### normalizeHeaders
|
||||
|
||||
▸ **normalizeHeaders**(`obj`): Record<`string`, `any`\>
|
||||
**normalizeHeaders**(`obj`): Record<`string`, `any`\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -156,7 +156,7 @@ ___
|
||||
|
||||
### request
|
||||
|
||||
▸ **request**(`method`, `path`, `payload?`, `options?`, `customHeaders?`): `Promise`<`any`\>
|
||||
**request**(`method`, `path`, `payload?`, `options?`, `customHeaders?`): `Promise`<`any`\>
|
||||
|
||||
Axios request
|
||||
|
||||
@@ -233,7 +233,7 @@ ___
|
||||
|
||||
### requiresAuthentication
|
||||
|
||||
▸ **requiresAuthentication**(`path`, `method`): `boolean`
|
||||
**requiresAuthentication**(`path`, `method`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -275,7 +275,7 @@ ___
|
||||
|
||||
### setHeaders
|
||||
|
||||
▸ **setHeaders**(`userHeaders`, `method`, `path`, `customHeaders?`): [`AxiosRequestHeaders`](../../swaps/modules/swaps.internal.mdx#axiosrequestheaders)
|
||||
**setHeaders**(`userHeaders`, `method`, `path`, `customHeaders?`): [`AxiosRequestHeaders`](../../swaps/modules/swaps.internal.mdx#axiosrequestheaders)
|
||||
|
||||
Creates all the initial headers.
|
||||
We add the idempotency key, if the request is configured to retry.
|
||||
@@ -336,7 +336,7 @@ ___
|
||||
|
||||
### shouldRetryCondition
|
||||
|
||||
▸ **shouldRetryCondition**(`err`, `numRetries`, `maxRetries`): `boolean`
|
||||
**shouldRetryCondition**(`err`, `numRetries`, `maxRetries`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
Reference in new issue
Block a user