
import request from '@/utils/request'



export const appList = (params) => {
    return request({
        url: `admin/apps`,
        method: 'get',
        params
    })
}

export const addApp = (data) => {
    return request({
        url: `admin/app/create`,
        method: 'post',
        data
    })
}

export const deleteRobot = (data) => {
    return request({
        url: `admin/app/delete`,
        method: 'post',
        data
    })
}
export const editRobot = (id, data) => {
    return request({
        url: `admin/app/${id}`,
        method: 'put',
        data
    })
}
export const robotLog = (params) => {
    return request({
        url: `api/robot_monitor/logs`,
        method: 'get',
        params
    })
}

// 获取机器人消息日志
export const robotMsgLog = (params) => {
    return request({
        url: `api/robot_message/logs`,
        method: 'get',
        params
    })
}


export const set_pass_request_reply = (data) => {
    return request({
        url: `api/contact/set_pass_request_reply`,
        method: 'post',
        data
    })
}

export const pass_request_reply_list = (params) => {
    return request({
        url: `api/contact/pass_request_reply_list`,
        method: 'get',
        params
    })
}

export const delete_reply = (id) => {
    return request({
        url: `api/contact/pass_request_reply/${id}`,
        method: 'delete'
    })
}

export const robot_monitor = (data) => {
    return request({
        url: `api/robot_monitor`,
        method: 'post',
        data
    })
}

// 获取机器人详情
export const robot_detail = (id) => {
    return request({
        url: `api/robot/${id}`,
        method: 'get'
    })
}

// 意图管理

export const keyWordArr = (data: any) => {
    return request({
        url: `api/contact/keywords`,
        method: 'get',
        params: data
    })
}

export const deleteKeyword = (id) => {
    return request({
        url: `api/contact/keyword/${id}`,
        method: 'delete'
    })
}

// 查询群组智能体

export const contactAgent = (data: any) => {
    return request({
        url: `api/contact/agent`,
        method: 'get',
        params: data
    })
}

// 配置群组智能体

export const setAgent = (data: any) => {
    return request({
        url: `api/contact/set_agent`,
        method: 'post',
        data
    })
}

// 删除智能体

export const deleteAgent = (data: any) => {
    return request({
        url: `api/contact/agent`,
        method: 'delete',
        data
    })
}


export const getQr = (data: any) => {
    return request({
        url: `wechat/qrcode`,
        method: 'post',
        data
    })
}