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

export default {
  paging(data: EndpointTypes.SearchEndpointParam) {
    return get<G.PageResult<EndpointTypes.SearchEndpointResult>>('/endpoint/paging', data)
  },
  detail(id: string) {
    return get<EndpointTypes.SearchEndpointResult>('/endpoint/detail', {id})
  },
  add(data: EndpointTypes.AddEndpointParam) {
    return post('/endpoint/add', data)
  },
  modify(data: EndpointTypes.ModifyEndpointParam) {
    return post('/endpoint/modify', data)
  },
  del(ids: string[]) {
    return post('/endpoint/del', ids)
  },
}
