The StockLevelService is responsible for managing the stock levels of ProductVariants.
Whenever you need to adjust the stockOnHand or stockAllocated for a ProductVariant,
you should use this service.
(ctx: RequestContext, productVariantId: ID, stockLocationId: ID) => Promise<StockLevel>Returns the StockLevel for the given ProductVariant and StockLocation.
(ctx: RequestContext, productVariantId: ID) => Promise<StockLevel[]>(ctx: RequestContext, productVariantId: ID) => Promise<AvailableStock>Returns the available stock (on hand and allocated) for the given ProductVariant. This is determined by the configured StockLocationStrategy.
(ctx: RequestContext, productVariantId: ID, stockLocationId: ID, change: number) => Updates the stockOnHand for the given ProductVariant and StockLocation.
(ctx: RequestContext, productVariantId: ID, stockLocationId: ID, change: number) => Updates the stockAllocated for the given ProductVariant and StockLocation.