import {
  get,
  post
} from '@/common/utils/http-util.ts'

export default {
  paging(data: TspTypes.SearchParam & G.PageParam) {
    return get<G.PageResult<TspTypes.TspData>>('/temp_storage_point/paging', data)
  },
  list(pid: string | null = null) {
    return get<TspTypes.TspData[]>('/temp_storage_point/list', {pid: pid})
  },
  detail(id: string) {
    return get<TspTypes.TspData>('/temp_storage_point/detail', {id})
  },
  add(data: TspTypes.AddParam) {
    return post('/temp_storage_point/add', data)
  },
  modify(data: TspTypes.TspData) {
    return post('/temp_storage_point/modify', data)
  },
  del(ids: string[]) {
    return post('/temp_storage_point/del', ids)
  },
  statistics() {
    return get<TspTypes.StatisticsResult>('/temp_storage_point/statistics')
  },
}
