2024-11-18 11:32:57 +05:00
|
|
|
|
using Persistence.Models;
|
|
|
|
|
using Refit;
|
|
|
|
|
|
|
|
|
|
namespace Persistence.IntegrationTests.Clients
|
|
|
|
|
{
|
2024-11-20 15:29:58 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Интерфейс для тестирования API, предназначенного для работы с уставками
|
|
|
|
|
/// </summary>
|
2024-11-18 11:32:57 +05:00
|
|
|
|
public interface ISetpointClient
|
|
|
|
|
{
|
2024-11-20 15:29:58 +05:00
|
|
|
|
private const string BaseRoute = "/api/setpoint";
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/current")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<SetpointValueDto>>> GetCurrent([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys);
|
2024-11-18 15:05:12 +05:00
|
|
|
|
|
2024-11-20 15:29:58 +05:00
|
|
|
|
[Get($"{BaseRoute}/history")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<SetpointValueDto>>> GetHistory([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys, [Query] DateTimeOffset historyMoment);
|
2024-11-18 11:32:57 +05:00
|
|
|
|
|
2024-11-20 15:29:58 +05:00
|
|
|
|
[Get($"{BaseRoute}/log")]
|
|
|
|
|
Task<IApiResponse<Dictionary<Guid, IEnumerable<SetpointLogDto>>>> GetLog([Query(CollectionFormat.Multi)] IEnumerable<Guid> setpointKeys);
|
2024-11-18 11:32:57 +05:00
|
|
|
|
|
2024-11-20 15:29:58 +05:00
|
|
|
|
[Post($"{BaseRoute}/")]
|
|
|
|
|
Task<IApiResponse> Save(Guid setpointKey, object newValue);
|
2024-11-18 11:32:57 +05:00
|
|
|
|
}
|
|
|
|
|
}
|