2024-12-12 11:47:52 +05:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2024-12-16 15:38:46 +05:00
|
|
|
|
using DD.Persistence.Models;
|
|
|
|
|
using DD.Persistence.Models.Requests;
|
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-10 13:55:01 +05:00
|
|
|
|
public interface IRefitTechMessagesClient : IDisposable
|
2024-12-09 14:45:35 +05:00
|
|
|
|
{
|
|
|
|
|
private const string BaseRoute = "/api/techMessages";
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}")]
|
2024-12-10 13:55:01 +05:00
|
|
|
|
Task<IApiResponse<PaginationContainer<TechMessageDto>>> GetPage([Query] PaginationRequest request, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
2024-12-12 11:47:52 +05:00
|
|
|
|
[Post($"{BaseRoute}/{{systemId}}")]
|
|
|
|
|
Task<IApiResponse<int>> AddRange(Guid systemId, [Body] IEnumerable<TechMessageDto> dtos, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/systems")]
|
2024-12-12 17:05:47 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<DataSourceSystemDto>>> GetSystems(CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/range")]
|
2024-12-13 17:30:35 +05:00
|
|
|
|
Task<IApiResponse<DatesRangeDto?>> GetDatesRangeAsync(CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/part")]
|
|
|
|
|
Task<IApiResponse<IEnumerable<TechMessageDto>>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
[Get($"{BaseRoute}/statistics")]
|
2024-12-13 15:30:11 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<MessagesStatisticDto>>> GetStatistics([Query(CollectionFormat.Multi)] IEnumerable<Guid> systemIds, [Query(CollectionFormat.Multi)] IEnumerable<int> categoryIds, CancellationToken token);
|
2024-12-09 14:45:35 +05:00
|
|
|
|
}
|
|
|
|
|
}
|