2021-06-11 19:30:11 +00:00
|
|
|
|
using System;
|
2021-06-20 11:25:45 +00:00
|
|
|
|
using System.Collections.Generic;
|
2021-06-09 21:03:07 +00:00
|
|
|
|
using System.Threading.Tasks;
|
2021-06-27 12:14:34 +00:00
|
|
|
|
using Retroactiune.Core.Entities;
|
|
|
|
|
using Retroactiune.Core.Services;
|
2021-06-09 21:03:07 +00:00
|
|
|
|
|
2021-06-21 14:46:44 +00:00
|
|
|
|
namespace Retroactiune.Core.Interfaces
|
2021-06-09 21:03:07 +00:00
|
|
|
|
{
|
|
|
|
|
public interface ITokensService
|
|
|
|
|
{
|
2021-06-20 11:25:45 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generates tokens.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="numberOfTokens">The number of tokens to generate.</param>
|
|
|
|
|
/// <param name="feedbackReceiverGuid">The feedback receiver guid to reference the tokens.</param>
|
|
|
|
|
/// <param name="expiryTime">Optional expiry time for the tokens.</param>
|
|
|
|
|
/// <returns>The result of the generate operation.</returns>
|
2021-06-11 19:30:11 +00:00
|
|
|
|
public Task GenerateTokensAsync(int numberOfTokens, string feedbackReceiverGuid,
|
|
|
|
|
DateTime? expiryTime = null);
|
2021-06-20 11:25:45 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes tokens.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="tokenIds">A list of tokens to delete.</param>
|
|
|
|
|
/// <returns>The result of the delete operation.</returns>
|
|
|
|
|
public Task DeleteTokens(IEnumerable<string> tokenIds);
|
2021-06-27 12:14:34 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// List and filters tokens.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="filters">Filters object for filtering results.</param>
|
|
|
|
|
/// <returns>A list of tokens matching the filters.</returns>
|
|
|
|
|
public Task<IEnumerable<Token>> ListTokens(TokenListFilters filters);
|
2021-07-04 11:05:53 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes tokens, by their associated FeedbackReceiverId.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="feedbackReceiverIds">A list of FeedbackReceiverIDs.</param>
|
|
|
|
|
/// <returns>The result of the delete operation.</returns>
|
|
|
|
|
public Task DeleteManyByFeedbackReceiverIdAsync(IEnumerable<string> feedbackReceiverIds);
|
2021-06-09 21:03:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|