import { request } from '@/utils'

export default {
  list: (params = {}) => request.get('/proxy/configs', { params }),
  create: (data = {}) => request.post('/proxy/configs', data),
  update: (id, data = {}) => request.put(`/proxy/configs/${id}`, data),
  remove: (id) => request.delete(`/proxy/configs/${id}`),
  listProviders: (params = {}) => request.get('/proxy/providers', { params }),
  createProvider: (data = {}) => request.post('/proxy/providers', data),
  updateProvider: (id, data = {}) => request.put(`/proxy/providers/${id}`, data),
  removeProvider: (id) => request.delete(`/proxy/providers/${id}`),
}
