import request from './request'
import type { OriginGood, OriginGoodsTreeResponse, PaginatedResult } from '@/types'

export const originGoodsApi = {
  getTree: () => {
    return request.get<any, OriginGoodsTreeResponse>('/origin-goods/tree')
  },

  getOriginGoodsList: (params: { page?: number; pageSize?: number; keyword?: string }) => {
    return request.get<any, PaginatedResult<OriginGood>>('/origin-goods', { params })
  },
}
