82 lines
2.6 KiB
C#
82 lines
2.6 KiB
C#
using System.Threading;
|
|
using xBotService.Models;
|
|
using xBotService.Constants;
|
|
using System.Threading.Tasks;
|
|
using System.Collections.Generic;
|
|
using xCommons.Extensions;
|
|
using xBotService.Models.Dtos;
|
|
using xIdentityModels.Models;
|
|
|
|
namespace xBotService.Interfaces
|
|
{
|
|
public interface IXBotProvider
|
|
{
|
|
/// <summary>
|
|
/// Retrieve Bot Info ...
|
|
/// </summary>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotResUser> GetMe(
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Retrieve Messages ...
|
|
/// </summary>
|
|
/// <param name="requestModel"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<IList<XBotUpdateResponse>> GetUpdates(
|
|
XBotUpdatesRequest requestModel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Sending Simple String Message to Bot ...
|
|
/// </summary>
|
|
/// <param name="requestModel"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> SendMessage(
|
|
XBotSendMessageRequest requestModel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Show Verification Request Menu ...
|
|
/// </summary>
|
|
/// <param name="botUserId"></param>
|
|
/// <param name="label"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> ShowVerificationMenu(
|
|
long botUserId,
|
|
string label = XBotMessageIds.XBotRequestVerificationCodeLabel,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Send Verification Code to Requests ...
|
|
/// </summary>
|
|
/// <param name="botUserId"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> SendVerificationCode(
|
|
long botUserId,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Verify User Subscription ...
|
|
/// </summary>
|
|
/// <param name="token"></param>
|
|
/// <param name="userInfo"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<XBotMessage> VerifyUser(
|
|
string token,
|
|
XUserClaimsInfoDto userInfo = null,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
}
|
|
} |