import request from '@/utils/request'

/**
 * 查询呼入大模型配置列表
 * @param {Object} query 查询参数
 */
export function listInboundLlm(query) {
  return request({
    url: '/company/inboundCallManage/list',
    method: 'get',
    params: query
  })
}

/**
 * 新增呼入大模型配置
 * @param {Object} data 配置数据
 */
export function addInboundLlm(data) {
  return request({
    url: '/company/inboundCallManage',
    method: 'post',
    data: data
  })
}

/**
 * 修改呼入大模型配置
 * @param {Object} data 配置数据
 */
export function updateInboundLlm(data) {
  return request({
    url: '/company/inboundCallManage',
    method: 'put',
    data: data
  })
}

/**
 * 删除呼入大模型配置
 * @param {String} ids 配置ID，多个用逗号分隔
 */
export function delInboundLlm(ids) {
  return request({
    url: '/company/inboundCallManage/' + ids,
    method: 'delete'
  })
}

/**
 * 获取大模型账户下拉列表
 */
export function listLlmAccount() {
  return request({
    url: '/company/inboundCallManage/llmAccountList',
    method: 'get'
  })
}

/**
 * 校验被叫号码是否唯一
 */
export function checkCallee(id, callee) {
  return request({
    url: '/company/inboundCallManage/checkCallee',
    method: 'get',
    params: { id, callee }
  })
}

/**
 * 获取ASR提供商列表
 */
export function listAsrProvider() {
  return request({
    url: '/company/inboundCallManage/asrProviderList',
    method: 'get'
  })
}

/**
 * 获取TTS音色来源列表
 */
export function listVoiceSource() {
  return request({
    url: '/company/inboundCallManage/voiceSourceList',
    method: 'get'
  })
}

/**
 * 根据音色来源获取音色列表
 */
export function listVoiceBySource(voiceSource) {
  return request({
    url: '/company/inboundCallManage/voiceList',
    method: 'get',
    params: { voiceSource }
  })
}

/**
 * 获取业务组列表
 */
export function listBizGroup() {
  return request({
    url: '/company/inboundCallManage/bizGroupList',
    method: 'get'
  })
}

/**
 * 获取出局网关列表
 */
export function listGateway() {
  return request({
    url: '/company/inboundCallManage/gatewayList',
    method: 'get'
  })
}

/**
 * 获取IVR列表
 */
export function listIvr() {
  return request({
    url: '/company/inboundCallManage/ivrList',
    method: 'get'
  })
}

/**
 * 查询呼入通话记录列表
 * @param {Object} query 查询参数
 */
export function listInboundCdr(query) {
  return request({
    url: '/company/inboundCallManage/inboundCdrList',
    method: 'get',
    params: query
  })
}
