import type { Availability, SetAvailableStockCommand, StockCommand, StockItem } from './stock.js';

export interface InventoryService {
  checkAvailability(variantId: string, storeId: string, quantity: number): Promise<Availability>;
  reserve(input: StockCommand): Promise<StockItem>;
  release(input: StockCommand): Promise<StockItem>;
  confirm(input: StockCommand): Promise<StockItem>;
  setAvailable(input: SetAvailableStockCommand): Promise<StockItem>;
}

export interface InventoryRepository {
  findByVariantId(variantId: string, storeId: string): Promise<StockItem | undefined>;
  setAvailable(input: SetAvailableStockCommand): Promise<StockItem>;
  reserve(input: StockCommand): Promise<StockItem | undefined>;
  release(input: StockCommand): Promise<StockItem | undefined>;
  confirm(input: StockCommand): Promise<StockItem | undefined>;
}
