import request from '@/utils/request'

// 查询AI外呼角色列表
export function listRole(query) {
  return request({
    url: '/aiSopCall/role/list',
    method: 'get',
    params: query
  })
}

// 查询AI外呼角色详细
export function getRole(id) {
  return request({
    url: '/aiSopCall/role/' + id,
    method: 'get'
  })
}

// 新增AI外呼角色
export function addRole(data) {
  return request({
    url: '/aiSopCall/role',
    method: 'post',
    data: data
  })
}

// 修改AI外呼角色
export function updateRole(data) {
  return request({
    url: '/aiSopCall/role',
    method: 'put',
    data: data
  })
}

// 删除AI外呼角色
export function delRole(id) {
  return request({
    url: '/aiSopCall/role/' + id,
    method: 'delete'
  })
}

// 导出AI外呼角色
export function exportRole(query) {
  return request({
    url: '/aiSopCall/role/export',
    method: 'get',
    params: query
  })
}

// 复制AI外呼角色
export function copyRole(id) {
  return request({
    url: '/aiSopCall/role/copyRole/' + id,
    method: 'get'
  })
}
