using Persistence.Models;
using Refit;
namespace Persistence.Client.Clients;
///
/// Интерфейс клиента для работы с уставками
///
public interface ISetpointClient
{
private const string BaseRoute = "/api/setpoint";
[Get($"{BaseRoute}/current")]
Task>> GetCurrent([Query(CollectionFormat.Multi)] IEnumerable setpointKeys);
[Get($"{BaseRoute}/history")]
Task>> GetHistory([Query(CollectionFormat.Multi)] IEnumerable setpointKeys, [Query] DateTimeOffset historyMoment);
[Get($"{BaseRoute}/log")]
Task>>> GetLog([Query(CollectionFormat.Multi)] IEnumerable setpointKeys);
[Get($"{BaseRoute}/range")]
Task> GetDatesRangeAsync(CancellationToken token);
[Get($"{BaseRoute}/part")]
Task>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
[Post($"{BaseRoute}/")]
Task Add(Guid setpointKey, object newValue);
}