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