SalesChannelInventoryService
Properties
__configModule__Record<string, unknown>__container__anyRequired__moduleDeclaration__Record<string, unknown>manager_EntityManagerRequiredtransactionManager_undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManagerEntityManagerRequiredinventoryService_
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(inventoryLevelId: 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: CreateInventoryItemInput, context?: SharedContext) => Promise<InventoryItemDTO>RequiredupdateInventoryLevel(inventoryItemId: string, locationId: string, update: UpdateInventoryLevelInput, context?: SharedContext) => Promise<InventoryLevelDTO>RequiredupdateInventoryLevels(updates: { inventory_item_id: string ; location_id: string } & UpdateInventoryLevelInput[], 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
isolationOrErrorHandlerIsolationLevel | (error: TError) => Promise<void | TResult>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail(error: TError) => Promise<void | TResult>Potential error handler
Returns
PromisePromise<TResult>Requiredthe result of the transactional work
retrieveAvailableItemQuantity
Retrieves the available quantity of an item across all sales channel locations
Parameters
salesChannelIdstringRequiredSales channel id
inventoryItemIdstringRequiredItem id
Returns
PromisePromise<number>Requiredavailable quantity of item across all sales channel locations
shouldRetryTransaction_
Parameters
errRecord<string, unknown> | { code: string }RequiredReturns
booleanbooleanwithTransaction
Parameters
transactionManagerEntityManagerReturns
Was this section helpful?