/**
 * @description: IM消息管理
 * @return {*}
 * @param {}-
 */
import request from "../request";


const message = {
    /*************************************************
     * 获取消息用户列表
     */
    get_IM_user_list: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/GetIMUserList', 'GET', params)
    },

    /*************************************************
     * 解析饿了么消息中的mediaID
     */
    get_url_by_mediaID: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/GetElmMedia', 'GET', params)
    },

    /*************************************************
     * 获取聊天详情
     */
    get_IM_chat_detail: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/GetImChatDetail', 'GET', params)
    },


    /*************************************************
     * 设置消息为已读
     */
    set_IM_msg_read: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/SetImMsgRead', 'POST', params)
    },


    /*************************************************
     * 发送消息接口
    */
    send_to_vendor: async (params: AnyObject): Promise<AnyObject> => {
        return request.api('/v2/im/SendToVendorV2', 'POST', params)
    },
}

export default message