2024-12-16 15:38:46 +05:00
|
|
|
|
using DD.Persistence.Models;
|
2025-01-13 17:45:49 +05:00
|
|
|
|
using DD.Persistence.Models.Common;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
using Refit;
|
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
namespace DD.Persistence.Client.Clients.Interfaces.Refit;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
2024-12-27 00:37:52 +05:00
|
|
|
|
public interface IRefitSetpointClient : IRefitClient, IDisposable
|
2024-12-09 14:45:35 +05:00
|
|
|
|
{
|
|
|
|
|
private const string BaseRoute = "/api/setpoint";
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/current")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<SetpointValueDto>>> GetCurrent([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/history")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<SetpointValueDto>>> GetHistory([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys, [Query] DateTimeOffset historyMoment, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/log")]
|
|
|
|
|
Task<IApiResponse<Dictionary<Guid, IEnumerable<SetpointLogDto>>>> GetLog([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
[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, CancellationToken token);
|
|
|
|
|
}
|