DD.WellWorkover.Cloud/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanDrillingClient.cs

46 lines
1.6 KiB
C#

using AsbCloudApp.Data;
using AsbCloudApp.Data.ProcessMaps;
using AsbCloudApp.Requests;
using Refit;
namespace AsbCloudWebApi.IntegrationTests.Clients;
public interface IProcessMapPlanDrillingClient<TDto> where TDto : ProcessMapPlanBaseDto
{
private const string BaseRoute = "/api/well/{idWell}/ProcessMapPlanDrilling";
[Post(BaseRoute)]
Task<IApiResponse<int>> InsertRange(int idWell, [Body] IEnumerable<TDto> dtos);
[Post($"{BaseRoute}/replace")]
Task<IApiResponse<int>> ClearAndInsertRange(int idWell, [Body] IEnumerable<TDto> dtos);
[Delete(BaseRoute)]
Task<IApiResponse<int>> DeleteRange(int idWell, [Body] IEnumerable<int> ids);
[Delete($"{BaseRoute}/clear")]
Task<IApiResponse<int>> Clear(int idWell);
[Get(BaseRoute)]
Task<IApiResponse<IEnumerable<TDto>>> Get(int idWell);
[Get($"{BaseRoute}/changelogByMoment")]
Task<IApiResponse<IEnumerable<ChangeLogDto<TDto>>>> Get(int idWell, DateTimeOffset? moment);
[Get("/api/telemetry/{uid}/ProcessMapPlanDrilling")]
Task<IApiResponse<IEnumerable<ChangeLogDto<TDto>>>> Get(string uid, DateTimeOffset? updateFrom);
[Get($"{BaseRoute}/changeLogForDate")]
Task<IApiResponse<IEnumerable<TDto>>> GetChangeLog(int idWell, DateOnly? date);
[Get($"{BaseRoute}/dates")]
Task<IApiResponse<IEnumerable<DateOnly>>> GetDatesChange(int idWell);
[Put(BaseRoute)]
Task<IApiResponse<int>> UpdateOrInsertRange(int idWell, IEnumerable<TDto> dtos);
[Multipart]
[Post(BaseRoute + "/parse")]
Task<IApiResponse<ParserResultDto<TDto>>> Parse(int idWell, [AliasAs("file")] StreamPart stream);
}