import request from '@/utils/request'

// 查询AI外呼知识库列表
export function listAiSopCallKnowledgeBase(query) {
  return request({
    url: '/company/aiSopCallKnowledgeBase/list',
    method: 'get',
    params: query
  })
}

// 查询AI外呼知识库详细
export function getAiSopCallKnowledgeBase(id) {
  return request({
    url: '/company/aiSopCallKnowledgeBase/' + id,
    method: 'get'
  })
}

// 新增AI外呼知识库
export function addAiSopCallKnowledgeBase(data) {
  return request({
    url: '/company/aiSopCallKnowledgeBase',
    method: 'post',
    data: data
  })
}

// 修改AI外呼知识库
export function updateAiSopCallKnowledgeBase(data) {
  return request({
    url: '/company/aiSopCallKnowledgeBase',
    method: 'put',
    data: data
  })
}

// 删除AI外呼知识库
export function delAiSopCallKnowledgeBase(id) {
  return request({
    url: '/company/aiSopCallKnowledgeBase/' + id,
    method: 'delete'
  })
}

// 导出AI外呼知识库
export function exportAiSopCallKnowledgeBase(query) {
  return request({
    url: '/company/aiSopCallKnowledgeBase/export',
    method: 'get',
    params: query
  })
}
// 查询AI外呼知识库列表
export function idAndNameList(query) {
  return request({
    url: '/company/aiSopCallKnowledgeBase/idAndNameList',
    method: 'get',
    params: query
  })
}
