persistence/Persistence.Client/Clients/ITechMessagesClient.cs

33 lines
1.2 KiB
C#
Raw Normal View History

using Persistence.Models;
2024-12-05 11:30:07 +05:00
using Persistence.Models.Requests;
using Refit;
namespace Persistence.Client.Clients
{
/// <summary>
/// Интерфейс клиента для хранения технологических сообщений
/// </summary>
public interface ITechMessagesClient
{
private const string BaseRoute = "/api/techMessages";
[Get($"{BaseRoute}")]
2024-12-05 11:30:07 +05:00
Task<IApiResponse<PaginationContainer<TechMessageDto>>> GetPage([Query] PaginationRequest request, CancellationToken token);
[Post($"{BaseRoute}")]
Task<IApiResponse<int>> AddRange([Body] IEnumerable<TechMessageDto> dtos, CancellationToken token);
[Get($"{BaseRoute}/systems")]
Task<IApiResponse<IEnumerable<string>>> GetSystems(CancellationToken token);
[Get($"{BaseRoute}/range")]
Task<IApiResponse<DatesRangeDto>> GetDatesRangeAsync(CancellationToken token);
[Get($"{BaseRoute}/part")]
Task<IApiResponse<IEnumerable<TechMessageDto>>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
[Get($"{BaseRoute}/statistics")]
Task<IApiResponse<IEnumerable<MessagesStatisticDto>>> GetStatistics([Query] string autoDrillingSystem, [Query] int categoryId, CancellationToken token);
}
}