
import type warehouseType from '~/domain/warehouse'
import type warehouseQuery from "./warehouseQuery";
import type { ServerList, ServerRes } from '~/service/index'
import httpRequest from "~/service/index";

export function useWarehouse() {
  const apiRoot = "/seller/vendorWarehouse"
  async function getWarehouseList(req?: warehouseQuery) {
    return await httpRequest.post<ServerList<warehouseType>>(`${apiRoot}/list`, req)
  }

  return {
    getWarehouseList
  }
}
