2024-11-22 17:52:15 +05:00
|
|
|
|
using Persistence.Models;
|
|
|
|
|
using Refit;
|
|
|
|
|
|
2024-12-09 14:45:35 +05:00
|
|
|
|
namespace Persistence.Client.Clients.Interfaces.Refit;
|
2024-11-26 11:24:31 +05:00
|
|
|
|
|
2024-12-10 13:55:01 +05:00
|
|
|
|
public interface IRefitTimestampedSetClient : IDisposable
|
2024-11-22 17:52:15 +05:00
|
|
|
|
{
|
|
|
|
|
private const string baseUrl = "/api/TimestampedSet/{idDiscriminator}";
|
|
|
|
|
|
|
|
|
|
[Post(baseUrl)]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<int>> AddRange(Guid idDiscriminator, IEnumerable<TimestampedSetDto> sets, CancellationToken token);
|
2024-11-22 17:52:15 +05:00
|
|
|
|
|
|
|
|
|
[Get(baseUrl)]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<TimestampedSetDto>>> Get(Guid idDiscriminator, [Query] DateTimeOffset? geTimestamp, [Query] IEnumerable<string>? columnNames, int skip, int take, CancellationToken token);
|
2024-11-22 17:52:15 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{baseUrl}/last")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<IEnumerable<TimestampedSetDto>>> GetLast(Guid idDiscriminator, [Query] IEnumerable<string>? columnNames, int take, CancellationToken token);
|
2024-11-22 17:52:15 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{baseUrl}/count")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<int>> Count(Guid idDiscriminator, CancellationToken token);
|
2024-11-22 17:52:15 +05:00
|
|
|
|
|
|
|
|
|
[Get($"{baseUrl}/datesRange")]
|
2024-12-09 14:45:35 +05:00
|
|
|
|
Task<IApiResponse<DatesRangeDto?>> GetDatesRange(Guid idDiscriminator, CancellationToken token);
|
2024-11-22 17:52:15 +05:00
|
|
|
|
}
|