2024-11-21 14:50:36 +05:00
|
|
|
|
using Persistence.Models;
|
|
|
|
|
using Refit;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Client.Clients;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-11-26 12:27:52 +05:00
|
|
|
|
/// Интерфейс клиента для работы с уставками
|
2024-11-21 14:50:36 +05:00
|
|
|
|
/// </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);
|
|
|
|
|
|
2024-12-02 15:14:00 +05:00
|
|
|
|
[Get($"{BaseRoute}/range")]
|
|
|
|
|
Task<IApiResponse<DatesRangeDto>> GetDatesRangeAsync(CancellationToken token);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/part")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<SetpointLogDto>>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
|
|
|
|
|
|
2024-11-21 14:50:36 +05:00
|
|
|
|
[Post($"{BaseRoute}/")]
|
|
|
|
|
Task<IApiResponse> Save(Guid setpointKey, object newValue);
|
|
|
|
|
}
|