OrderService
constructor
Parameters
__namedParameters
InjectedDependenciesRequiredProperties
manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequired__container__
anyRequiredEvents
objectRequiredEvents.GIFT_CARD_CREATED
stringRequiredDefault: "order.gift_card_created"
Events.PAYMENT_CAPTURED
stringRequiredDefault: "order.payment_captured"
Events.PAYMENT_CAPTURE_FAILED
stringRequiredDefault: "order.payment_capture_failed"
Events.SHIPMENT_CREATED
stringRequiredDefault: "order.shipment_created"
Events.FULFILLMENT_CREATED
stringRequiredDefault: "order.fulfillment_created"
Events.FULFILLMENT_CANCELED
stringRequiredDefault: "order.fulfillment_canceled"
Events.RETURN_REQUESTED
stringRequiredDefault: "order.return_requested"
Events.ITEMS_RETURNED
stringRequiredDefault: "order.items_returned"
Events.RETURN_ACTION_REQUIRED
stringRequiredDefault: "order.return_action_required"
Events.REFUND_CREATED
stringRequiredDefault: "order.refund_created"
Events.REFUND_FAILED
stringRequiredDefault: "order.refund_failed"
Events.SWAP_CREATED
stringRequiredDefault: "order.swap_created"
Events.PLACED
stringRequiredDefault: "order.placed"
Events.UPDATED
stringRequiredDefault: "order.updated"
Events.CANCELED
stringRequiredDefault: "order.canceled"
Events.COMPLETED
stringRequiredDefault: "order.completed"
featureFlagRouter_
FlagRouterRequiredremoteLink_
RemoteLinkRequired__configModule__
Record<string, unknown>__moduleDeclaration__
Record<string, unknown>Accessors
activeManager_
Returns
EntityManager
EntityManagerRequiredMethods
withTransaction
Parameters
transactionManager
EntityManagerReturns
this
thisRequiredshouldRetryTransaction_
Parameters
err
Record<string, unknown> | objectRequiredReturns
boolean
booleanRequiredatomicPhase_
Wraps some work within a transactional block. If the service already has a transaction manager attached this will be reused, otherwise a new transaction manager is created.
Type Parameters
TResult
objectRequiredTError
objectRequiredParameters
work
(transactionManager: EntityManager) => Promise<TResult>Requiredthe transactional work to be done
isolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Potential error handler
Returns
Promise
Promise<TResult>Requiredthe result of the transactional work
list
Parameters
the query object for find
the config to be used for find
Returns
the result of the find operation
listAndCount
Parameters
the query object for find
the config to be used for find
Returns
the result of the find operation
transformQueryForTotals
Parameters
Returns
retrieve
Gets an order by id.
Parameters
orderId
stringRequiredid or selector of order to retrieve
config of order to retrieve
Default: {}