import request from '@/utils/request'

// 查询外呼黑名单列表（admin专用，走 /admin/ 前缀，路由到 fs-admin 8004）
export function listVoiceRoboticCallBlacklist(query) {
    return request({
        url: '/admin/voice-blacklist/list',
        method: 'get',
        params: query
    })
}

// 查询外呼黑名单详情
export function getVoiceRoboticCallBlacklist(id) {
    return request({
        url: '/admin/voice-blacklist/' + id,
        method: 'get'
    })
}

// 新增外呼黑名单
export function addVoiceRoboticCallBlacklist(data) {
    return request({
        url: '/admin/voice-blacklist',
        method: 'post',
        data: data
    })
}

// 修改外呼黑名单
export function updateVoiceRoboticCallBlacklist(data) {
    return request({
        url: '/admin/voice-blacklist',
        method: 'put',
        data: data
    })
}

// 删除外呼黑名单
export function delVoiceRoboticCallBlacklist(id) {
    return request({
        url: '/admin/voice-blacklist/' + id,
        method: 'delete'
    })
}

// 修改状态
export function changeVoiceRoboticCallBlacklistStatus(data) {
    return request({
        url: '/admin/voice-blacklist/changeStatus',
        method: 'put',
        data: data
    })
}

// 查看解密手机号
export function queryVoiceRoboticCallBlacklistPhone(blacklistId) {
    return request({
        url: '/admin/voice-blacklist/queryPhone/' + blacklistId,
        method: 'get'
    })
}

// 导出外呼黑名单
export function exportVoiceRoboticCallBlacklist(query) {
    return request({
        url: '/admin/voice-blacklist/export',
        method: 'get',
        params: query
    })
}
