31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Persistence.Models;
|
|
using Persistence.Models.Requests;
|
|
using Refit;
|
|
|
|
namespace Persistence.Client.Clients.Interfaces.Refit
|
|
{
|
|
public interface IRefitTechMessagesClient : IDisposable
|
|
{
|
|
private const string BaseRoute = "/api/techMessages";
|
|
|
|
[Get($"{BaseRoute}")]
|
|
Task<IApiResponse<PaginationContainer<TechMessageDto>>> GetPage([Query] PaginationRequest request, CancellationToken token);
|
|
|
|
[Post($"{BaseRoute}/{{systemId}}")]
|
|
Task<IApiResponse<int>> AddRange(Guid systemId, [Body] IEnumerable<TechMessageDto> dtos, CancellationToken token);
|
|
|
|
[Get($"{BaseRoute}/systems")]
|
|
Task<IApiResponse<IEnumerable<DrillingSystemDto>>> 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] IEnumerable<Guid> systemIds, [Query] IEnumerable<int> categoryIds, CancellationToken token);
|
|
}
|
|
}
|