SalesChannelInventoryService
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManager
EntityManagerRequiredinventoryService_
Returns
adjustInventory
(inventoryItemId: string, locationId: string, adjustment: number, context?: SharedContext) => Promise<InventoryLevelDTO>RequiredconfirmInventory
(inventoryItemId: string, locationIds: string[], quantity: number, context?: SharedContext) => Promise<boolean>RequiredcreateInventoryItem
(input: CreateInventoryItemInput, context?: SharedContext) => Promise<InventoryItemDTO>RequiredcreateInventoryItems
(input: CreateInventoryItemInput[], context?: SharedContext) => Promise<InventoryItemDTO[]>RequiredcreateInventoryLevel
(data: CreateInventoryLevelInput, context?: SharedContext) => Promise<InventoryLevelDTO>RequiredcreateInventoryLevels
(data: CreateInventoryLevelInput[], context?: SharedContext) => Promise<InventoryLevelDTO[]>RequiredcreateReservationItem
(input: CreateReservationItemInput, context?: SharedContext) => Promise<ReservationItemDTO>RequiredcreateReservationItems
(input: CreateReservationItemInput[], context?: SharedContext) => Promise<ReservationItemDTO[]>RequireddeleteInventoryItem
(inventoryItemId: string | string[], context?: SharedContext) => Promise<void>RequireddeleteInventoryItemLevelByLocationId
(locationId: string | string[], context?: SharedContext) => Promise<void>RequireddeleteInventoryLevel
(inventoryItemId: string, locationId: string, context?: SharedContext) => Promise<void>RequireddeleteReservationItem
(reservationItemId: string | string[], context?: SharedContext) => Promise<void>RequireddeleteReservationItemByLocationId
(locationId: string | string[], context?: SharedContext) => Promise<void>RequireddeleteReservationItemsByLineItem
(lineItemId: string | string[], context?: SharedContext) => Promise<void>RequiredlistInventoryItems
(selector: FilterableInventoryItemProps, config?: FindConfig<InventoryItemDTO>, context?: SharedContext) => Promise<[InventoryItemDTO[], number]>RequiredlistInventoryLevels
(selector: FilterableInventoryLevelProps, config?: FindConfig<InventoryLevelDTO>, context?: SharedContext) => Promise<[InventoryLevelDTO[], number]>RequiredlistReservationItems
(selector: FilterableReservationItemProps, config?: FindConfig<ReservationItemDTO>, context?: SharedContext) => Promise<[ReservationItemDTO[], number]>RequiredrestoreInventoryItem
(inventoryItemId: string | string[], context?: SharedContext) => Promise<void>RequiredretrieveAvailableQuantity
(inventoryItemId: string, locationIds: string[], context?: SharedContext) => Promise<number>RequiredretrieveInventoryItem
(inventoryItemId: string, config?: FindConfig<InventoryItemDTO>, context?: SharedContext) => Promise<InventoryItemDTO>RequiredretrieveInventoryLevel
(inventoryItemId: string, locationId: string, context?: SharedContext) => Promise<InventoryLevelDTO>RequiredretrieveReservationItem
(reservationId: string, context?: SharedContext) => Promise<ReservationItemDTO>RequiredretrieveReservedQuantity
(inventoryItemId: string, locationIds: string[], context?: SharedContext) => Promise<number>RequiredretrieveStockedQuantity
(inventoryItemId: string, locationIds: string[], context?: SharedContext) => Promise<number>RequiredupdateInventoryItem
(inventoryItemId: string, input: Partial<CreateInventoryItemInput>, context?: SharedContext) => Promise<InventoryItemDTO>RequiredupdateInventoryLevel
(inventoryItemId: string, locationId: string, update: UpdateInventoryLevelInput, context?: SharedContext) => Promise<InventoryLevelDTO>RequiredupdateInventoryLevels
(updates: BulkUpdateInventoryLevelInput[], context?: SharedContext) => Promise<InventoryLevelDTO[]>RequiredupdateReservationItem
(reservationItemId: string, input: UpdateReservationItemInput, context?: SharedContext) => Promise<ReservationItemDTO>RequiredMethods
atomicPhase_
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.
Parameters
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
retrieveAvailableItemQuantity
Retrieves the available quantity of an item across all sales channel locations
Parameters
salesChannelId
stringRequiredSales channel id
inventoryItemId
stringRequiredItem id
Returns
Promise
Promise<number>Requiredavailable quantity of item across all sales channel locations
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
booleanwithTransaction
Parameters
transactionManager
EntityManagerReturns
Was this section helpful?