2024-12-11 11:29:50 +05:00
|
|
|
|
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>
|
2024-12-11 14:56:31 +05:00
|
|
|
|
Task<IEnumerable<WitsDataDto>> GetValuesForGraph(Guid discriminatorId, [Query] DateTimeOffset dateFrom, [Query] DateTimeOffset dateTo, [Query] int approxPointsCount, CancellationToken token);
|
2024-12-11 11:29:50 +05:00
|
|
|
|
|
|
|
|
|
/// <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>
|
2024-12-11 14:56:31 +05:00
|
|
|
|
Task<IEnumerable<WitsDataDto>> GetPart(Guid discriminatorId, [Query] DateTimeOffset dateBegin, [Query] int take = 24 * 60 * 60, CancellationToken token = default);
|
2024-12-11 11:29:50 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить диапазон дат, для которых есть данные в репозитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="discriminatorId"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-12-11 14:56:31 +05:00
|
|
|
|
Task<DatesRangeDto> GetDatesRangeAsync(Guid discriminatorId, CancellationToken token);
|
2024-12-11 11:29:50 +05:00
|
|
|
|
}
|