// 用户管理
import request from '@/utils/request'


// 用户列
export const userList = (data: any) => {
    return request({
        url: `api/external_contacts`,
        method: 'get',
        params: data

    })
}

export const syncUser = (data: any) => {
    return request({
        url: `api/sync/external_contacts`,
        method: 'post',
        data: data

    })
}

// 联系人所在群组
export const userGroup = (data: any) => {
    return request({
        url: `api/contact/groups`,
        method: 'get',
        params: data
    })
}

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

// 添加群成员好友

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

// 设置备注

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

// 设置描述

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

// 邀请列表

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

// 邀请列表

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


// 客户详情

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

// 添加手术时间

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

// 获取用户详情
export const get_contact_detail = (data: any) => {
    return request({
        url: `api/contact_detail`,
        method: 'get',
        params: data
    })
}

// 获取聊天记录

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