48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
using Persistence.Models;
|
||
using Refit;
|
||
|
||
namespace Persistence.Client.Clients.Interfaces;
|
||
|
||
/// <summary>
|
||
/// Клиент для работы с параметрами Wits
|
||
/// </summary>
|
||
public interface IWitsDataClient : IDisposable
|
||
{
|
||
/// <summary>
|
||
/// Получить набор параметров (Wits) для построения графика
|
||
/// </summary>
|
||
/// <param name="discriminatorId"></param>
|
||
/// <param name="dateFrom"></param>
|
||
/// <param name="dateTo"></param>
|
||
/// <param name="approxPointsCount"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WitsDataDto>> GetValuesForGraph(Guid discriminatorId, [Query] DateTimeOffset dateFrom, [Query] DateTimeOffset dateTo, [Query] int approxPointsCount, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Сохранить набор параметров (Wits)
|
||
/// </summary>
|
||
/// <param name="dtos"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<int> AddRange(IEnumerable<WitsDataDto> dtos, CancellationToken token);
|
||
|
||
/// <summary>
|
||
/// Получить порцию записей, начиная с заданной даты
|
||
/// </summary>
|
||
/// <param name="discriminatorId"></param>
|
||
/// <param name="dateBegin"></param>
|
||
/// <param name="take"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<IEnumerable<WitsDataDto>> GetPart(Guid discriminatorId, [Query] DateTimeOffset dateBegin, [Query] int take = 24 * 60 * 60, CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Получить диапазон дат, для которых есть данные в репозитории
|
||
/// </summary>
|
||
/// <param name="discriminatorId"></param>
|
||
/// <param name="token"></param>
|
||
/// <returns></returns>
|
||
Task<DatesRangeDto> GetDatesRangeAsync(Guid discriminatorId, CancellationToken token);
|
||
}
|