using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using GxPress.Request.App.IM;
using GxPress.Request.GroupChat;
using GxPress.Result.App.IM;

namespace GxPress.Service.Interface.IM
{
    /// <summary>
    ///环信IM接口
    /// </summary>
    public interface IIMService : IService
    {
        /// <summary>
        /// 采集聊天数据
        /// </summary>
        /// <returns></returns>
        Task<bool> GatherChatDataAsync();

        /// <summary>
        /// 强制用户下线
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        Task<bool> DisconnectAsync(string phone);

        /// <summary>
        /// 创建群聊
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<CreateGroupChatResult> CreateGroupChatAsync(GroupChatInRequest request);

        /// <summary>
        /// 群插入用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> InsertGroupChatUsersAsync(InsertGroupChatUsersRequest request);

        /// <summary>
        /// 群删除用户
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> RemoveGroupChatUsersAsync(InsertGroupChatUsersRequest request);

        Task<bool> GetTokenImAsync();
        Task<bool> DeleteUserAsync(string imId);

        /// <summary>
        /// 解除禁言
        /// </summary>
        /// <param name="groupChatImId"></param>
        /// <returns></returns>
        Task<bool> RemoveMute(string groupChatImId);

        /// <summary>
        /// 添加禁言
        /// </summary>
        /// <param name="groupChatImId"></param>
        /// <returns></returns>
        Task<bool> InMute(string groupChatImId);

        /// <summary>
        /// 添加用户黑名单
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="blacklistUserId"></param>
        /// <returns></returns>
        Task<bool> AddBlacklistUserAsync(int userId, int blacklistUserId);

        /// <summary>
        /// 移除黑名单
        /// </summary>
        /// <param name="blacklistId"></param>
        /// <returns></returns>
        Task<bool> ReMoveBlacklistUserAsync(int blacklistId,int userId);
         /// <summary>
        /// 根据ImId删除群组
        /// </summary>
        /// <param name="groupChatImId"></param>
        /// <returns></returns>
        Task<bool> DeleteGroupChatAsync(string groupChatImId,int userId);
    }
}
