import request from '@/utils/request'

// 查询AI外呼话术列表
export function listDialog(query) {
  return request({
    url: '/company/companyVoiceDialog/list',
    method: 'get',
    params: query
  })
}

// 查询AI外呼话术详细
export function getConfigUrl(id) {
  return request({
    url: '/company/companyVoiceDialog/getConfigUrl',
    method: 'get',
    params: {id}
  })
}

// 查询AI外呼话术详细
export function getDialog(id) {
  return request({
    url: '/company/companyVoiceDialog/' + id,
    method: 'get'
  })
}

// 新增AI外呼话术
export function addDialog(data) {
  return request({
    url: '/company/companyVoiceDialog',
    method: 'post',
    data: data
  })
}

// 修改AI外呼话术
export function updateDialog(data) {
  return request({
    url: '/company/companyVoiceDialog',
    method: 'put',
    data: data
  })
}

// 删除AI外呼话术
export function delDialog(id) {
  return request({
    url: '/company/companyVoiceDialog/' + id,
    method: 'delete'
  })
}

// 导出AI外呼话术
export function exportDialog(query) {
  return request({
    url: '/company/companyVoiceDialog/export',
    method: 'get',
    params: query
  })
}
