import { describe, expect, it } from 'vitest'
import * as inventory from './index.js'

describe('@platform-modules/inventory public barrel', () => {
  it('exports the db-backed public surface and valuation adapters', () => {
    expect(typeof inventory.postReceipt).toBe('function')
    expect(typeof inventory.postIssue).toBe('function')
    expect(typeof inventory.postAdjustment).toBe('function')
    expect(typeof inventory.transferStock).toBe('function')
    expect(typeof inventory.reverseMovement).toBe('function')
    expect(typeof inventory.recordCount).toBe('function')
    expect(typeof inventory.getOnHand).toBe('function')
    expect(typeof inventory.getValuation).toBe('function')
    expect(typeof inventory.getCogs).toBe('function')
    expect(typeof inventory.getMovements).toBe('function')
    expect(typeof inventory.consumeFifo).toBe('function')
    expect(typeof inventory.blendReceipt).toBe('function')
    expect(typeof inventory.consumeAvg).toBe('function')
    expect(typeof inventory.stockMovement).toBe('object')
    expect(typeof inventory.pushSchema).toBe('function')
    expect(typeof inventory.MovementNotFoundError).toBe('function')
  })
})
