26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using DD.Persistence.Models;
|
|
using DD.Persistence.Models.Common;
|
|
using Refit;
|
|
|
|
namespace DD.Persistence.Client.Clients.Interfaces.Refit;
|
|
|
|
public interface IRefitTimestampedSetClient : IRefitClient, IDisposable
|
|
{
|
|
private const string baseUrl = "/api/TimestampedSet/{idDiscriminator}";
|
|
|
|
[Post(baseUrl)]
|
|
Task<IApiResponse<int>> AddRange(Guid idDiscriminator, IEnumerable<TimestampedSetDto> sets, CancellationToken token);
|
|
|
|
[Get(baseUrl)]
|
|
Task<IApiResponse<IEnumerable<TimestampedSetDto>>> Get(Guid idDiscriminator, [Query] DateTimeOffset? geTimestamp, [Query] IEnumerable<string>? columnNames, int skip, int take, CancellationToken token);
|
|
|
|
[Get($"{baseUrl}/last")]
|
|
Task<IApiResponse<IEnumerable<TimestampedSetDto>>> GetLast(Guid idDiscriminator, [Query] IEnumerable<string>? columnNames, int take, CancellationToken token);
|
|
|
|
[Get($"{baseUrl}/count")]
|
|
Task<IApiResponse<int>> Count(Guid idDiscriminator, CancellationToken token);
|
|
|
|
[Get($"{baseUrl}/datesRange")]
|
|
Task<IApiResponse<DatesRangeDto?>> GetDatesRange(Guid idDiscriminator, CancellationToken token);
|
|
}
|