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

42 lines
1.6 KiB
C#

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