import request from '@/utils/request'

// 查询机器人外呼任务列表
export function listRobotic(query) {
  return request({
    url: '/company/companyVoiceRobotic/list',
    method: 'get',
    params: query
  })
}
// 查询机器人外呼任务列表
export function listAll(query) {
  return request({
    url: '/company/companyVoiceRobotic/listAll',
    method: 'get',
    params: query
  })
}
// 查询机器人外呼任务列表
export function calleesList(query) {
  return request({
    url: '/company/companyVoiceRobotic/calleesList',
    method: 'get',
    params: query
  })
}

// 查询机器人外呼任务详细
export function getRobotic(id) {
  return request({
    url: '/company/companyVoiceRobotic/' + id,
    method: 'get'
  })
}

// 新增机器人外呼任务
export function addRobotic(data) {
  return request({
    url: '/company/companyVoiceRobotic',
    method: 'post',
    data: data
  })
}

// 修改机器人外呼任务
export function updateRobotic(data) {
  return request({
    url: '/company/companyVoiceRobotic',
    method: 'put',
    data: data
  })
}

// 删除机器人外呼任务
export function delRobotic(id) {
  return request({
    url: '/company/companyVoiceRobotic/' + id,
    method: 'delete'
  })
}

// 导出机器人外呼任务
export function exportRobotic(query) {
  return request({
    url: '/company/companyVoiceRobotic/export',
    method: 'get',
    params: query
  })
}

// 导出机器人外呼任务
export function getTypes() {
  return request({
    url: '/company/companyVoiceRobotic/getTypes',
    method: 'get'
  })
}
// 导出机器人外呼任务
export function statusList(ids) {
  return request({
    url: '/company/companyVoiceRobotic/statusList',
    method: 'get',
    params: {ids}
  })
}
// 导出机器人外呼任务
export function startRobotic(taskId) {
  return request({
    url: '/company/companyVoiceRobotic/startRobotic',
    method: 'get',
    params: {taskId}
  })
}
// 导出机器人外呼任务
export function stopRobotic(taskId) {
  return request({
    url: '/company/companyVoiceRobotic/stopRobotic',
    method: 'get',
    params: {taskId}
  })
}
// 导出机器人外呼任务
export function companyUserList(params) {
  return request({
    url: '/company/companyVoiceRobotic/companyUserList',
    method: 'get',
    params
  })
}

// 导出机器人外呼任务
export function wxList(params) {
  return request({
    url: '/company/companyVoiceRobotic/wxList',
    method: 'get',
    params
  })
}

// 企微加微列表
export function wxListQw(params) {
  return request({
    url: '/company/companyVoiceRobotic/wxListQw',
    method: 'get',
    params
  })
}

// 启动任务
export function taskRun(data) {
  return request({
    url: '/company/companyVoiceRobotic/taskRun',
    method: 'get',
    params: data
  })
}

// 查询执行记录
export function getExecRecords(query) {
  return request({
    url: '/company/companyVoiceRobotic/execRecords',
    method: 'get',
    params: query
  })
}
