using NewRock.Sdk.Transfer.Conference.Request;
using NewRock.Sdk.Transfer.Connect.Request;
using NewRock.Sdk.Transfer.Queue.Request;

namespace NewRock.Sdk
{
    public  partial interface INewRockClient
    {

        #region 呼叫转移命令>连接

        /// <summary>
        /// 分机呼分机
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> ExtensionToExtension(ExtensionToExtensionRequest request, string key, int expired, CancellationToken cancellationToken)
            => ExecuteAsync<ExtensionToExtensionRequest, NewRockResponse>(request, key, expired, cancellationToken);

        /// <summary>
        /// 分机呼外部电话
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> ExtToOuter(ExtToOuterRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<ExtToOuterRequest, NewRockResponse>(request, key, expired, cancellationToken);

        /// <summary>
        /// 来电转分机
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VisitorToExt(VisitorToExtRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<VisitorToExtRequest, NewRockResponse>(request, key, expired, cancellationToken);



        /// <summary>
        /// 来电转外部电话
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VisitorToOuter(VisitorToOuterRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<VisitorToOuterRequest, NewRockResponse>(request, key, expired, cancellationToken);

        /// <summary>
        /// 来电转语音菜单
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VisitorToMenu(VisitorToMenuRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<VisitorToMenuRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 去电转分机
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> OuterToExt(OuterToExtRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<OuterToExtRequest, NewRockResponse>(request, key, expired, cancellationToken);

        /// <summary>
        /// 去电转外部电话
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> OuterToOuter(OuterToOuterRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<OuterToOuterRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 去电转语音菜单
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> OuterToMenu(OuterToMenuRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<OuterToMenuRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 语音菜单呼分机
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> MenuToExt(MenuToExtRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<MenuToExtRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 语音菜单呼外部电话
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> MenuToOuter(MenuToOuterRequest request, string key, int expired, CancellationToken cancellationToken)
            => ExecuteAsync<MenuToOuterRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 双向外呼（回拨）
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> TwoWayOuter(TwoWayOuterRequest request, string key, int expired, CancellationToken cancellationToken)
            => ExecuteAsync<TwoWayOuterRequest, NewRockResponse>(request, key, expired, cancellationToken);

        /// <summary>
        /// 语音插播
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VoiceNewsFlash(VoiceNewsFlashRequest request, string key, int expired, CancellationToken cancellationToken)
            => ExecuteAsync<VoiceNewsFlashRequest, NewRockResponse>(request, key, expired, cancellationToken);

        #endregion

        #region 呼叫转移命令>会议

        /// <summary>
        /// 会议
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> ConferenceMeeting(ConferenceMeetingRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<ConferenceMeetingRequest, NewRockResponse>(request, key, expired, cancellationToken);

        #endregion

        #region 呼叫转移命令>队列

        /// <summary>
        /// 来电转分机队列
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VisitorToExtQueue(VisitorToExtQueueRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<VisitorToExtQueueRequest, NewRockResponse>(request, key, expired, cancellationToken);


        /// <summary>
        /// 来电转分机组队列
        /// </summary>
        /// <param name="request"></param>
        /// <param name="key"></param>
        /// <param name="expired"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<NewRockResponse?> VisitorToGroupQueue(VisitorToGroupQueueRequest request, string key, int expired,CancellationToken cancellationToken)
            => ExecuteAsync<VisitorToGroupQueueRequest, NewRockResponse>(request, key, expired, cancellationToken);

        #endregion

    }
}
