/// <summary>
/// 用户队列服务API
/// </summary>
public interface ICustomerQueueManager : IService
{
/// <summary>
/// 创建用户队列
/// </summary>
/// <param name="queueName">队列名称</param>
[OperationContract(Name = "CreateQueue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
void CreateQueue(string queueName);
/// <summary>
/// 删除队列
/// - 分强制删除和非强制删除两种模式
/// - 强制删除: 队列如果不为空也会被删除
/// - 非强制删除: 队列如果不为空, 这不会被删除并抛出异常
/// </summary>
/// <param name="queueName">队列名称</param>
/// <param name="forceDrop">true: 强制删除; false: 非强制删除</param>
[OperationContract(Name = "DropQueue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
void DropQueue(string queueName, bool forceDrop);
/// <summary>
/// 检查队列是否存在
/// </summary>
/// <param name="queueName">要检查的队列名称</param>
/// <returns>true: 存在, false: 不存在</returns>
[OperationContract(Name = "HasQueue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
bool HasQueue(string queueName);
/// <summary>
/// 将咨询用户加入队列
/// </summary>
/// <param name="queueName">队列名称</param>
/// <param name="record">咨询记录对象 - 如果将deskId设置为空则代表是新加入的客户.</param>
/// <param name="enqueueMode">入队列模式: 0 - 替换模式, 1 - 重新排队模式</param>
[OperationContract(Name = "Enqueue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
void Enqueue(string queueName, InquiryRecord record, int enqueueMode);
/// <summary>
/// 获取某个客户在队列中的位置
/// </summary>
/// <param name="queueName">队列名称</param>
/// <param name="customerUserId">客户ID</param>
/// <returns></returns>
int Position(string queueName, string customerUserId);
/// <summary>
/// 将用户拉出队列
/// </summary>
/// <param name="queueName">队列名称</param>
/// <param name="customerUserId">要拉出队列的客户ID, 如果为空则将第一个咨询客户拉出队列.</param>
/// <returns>被拉出队列的访客记录对象</returns>
[OperationContract(Name = "Dequeue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
InquiryRecord Dequeue(string queueName, string customerUserId);
/// <summary>
/// 将用户在不同队列间快速移动 (不提供comments)
/// </summary>
/// <param name="sourceQueueName">源队列</param>
/// <param name="targetQueueName">目标队列</param>
/// <param name="deskUserId">执行快速移动的客服用户ID</param>
/// <param name="customerUserId">要快速移动的客户ID, 如果为空则对源队列的第一个咨询客户进行移动.</param>
/// <param name="attachedComments">附加的备注信息</param>
/// <returns>被移动的访客记录对象</returns>
[OperationContract(Name = "QuickMove")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
InquiryRecord QuickMove(string sourceQueueName, string targetQueueName, string deskUserId, string customerUserId, string attachedComments);
/// <summary>
/// 查看队列用户列表
/// </summary>
/// <param name="queueName">队列名称</param>
/// <param name="count">要查看的数量</param>
/// <returns>访客记录列表</returns>
[OperationContract(Name = "ViewQueue")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
List<InquiryRecord> ViewQueue(string queueName, int count);
/// <summary>
/// 获取队列长度
/// </summary>
/// <param name="queueName">要查询的队列名称</param>
/// <returns>长度</returns>
[OperationContract(Name = "Count")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
int Count(string queueName);
/// <summary>
/// 获取所有队列名称
/// </summary>
/// <returns>队列名称列表</returns>
[OperationContract(Name = "GetAllQueues")]
[WebGet(RequestFormat = WebMessageFormat.Json)]
List<string> GetAllQueues();
}