2024-01-25 10:35:16 +05:00
|
|
|
using AsbCloudApp.Data;
|
2024-03-22 12:42:48 +05:00
|
|
|
using AsbCloudApp.Data.WellOperation;
|
2024-02-05 08:54:18 +05:00
|
|
|
using AsbCloudApp.Requests;
|
2024-03-22 12:42:48 +05:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
2024-01-25 10:35:16 +05:00
|
|
|
using Refit;
|
|
|
|
|
|
|
|
namespace AsbCloudWebApi.IntegrationTests.Clients;
|
|
|
|
|
|
|
|
public interface IWellOperationClient
|
|
|
|
{
|
2024-07-04 11:02:45 +05:00
|
|
|
private const string BaseRoute = "/api/well/{idWell}/wellOperations";
|
2024-01-25 15:56:34 +05:00
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
[Post(BaseRoute + "/{deleteBeforeInsert}")]
|
|
|
|
Task<IApiResponse<int>> InsertRangeAsync(int idWell,
|
|
|
|
bool deleteBeforeInsert,
|
|
|
|
[Body] IEnumerable<WellOperationDto> dtos);
|
2024-01-25 10:35:16 +05:00
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
[Put(BaseRoute)]
|
|
|
|
Task<IApiResponse<int>> UpdateRangeAsync(int idWell, [Body] IEnumerable<WellOperationDto> dtos);
|
2024-01-25 17:13:56 +05:00
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
[Get(BaseRoute)]
|
|
|
|
Task<IApiResponse<PaginationContainer<WellOperationDto>>> GetPageOperationsAsync(int idWell, [Query] WellOperationRequestBase request);
|
2024-02-06 11:41:51 +05:00
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
[Multipart]
|
|
|
|
[Post(BaseRoute + "/parse/{idType}")]
|
|
|
|
Task<IApiResponse<ParserResultDto<WellOperationDto>>> ParseAsync(int idWell,
|
|
|
|
int idType,
|
|
|
|
[AliasAs("file")] StreamPart file);
|
2024-03-22 12:42:48 +05:00
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
[Get(BaseRoute + "/export")]
|
|
|
|
Task<IApiResponse<PhysicalFileResult>> ExportAsync(int idWell, int idType);
|
2024-04-23 14:43:17 +05:00
|
|
|
|
|
|
|
[Get(BaseRoute + "/template")]
|
|
|
|
Task<IApiResponse<Stream>> GetTemplate(int idWell, int idType);
|
|
|
|
|
|
|
|
[Get(BaseRoute + "/categories")]
|
|
|
|
Task<IApiResponse<IEnumerable<WellOperationCategoryDto>>> GetCategories(int idWell, bool includeParents, bool includeHidden);
|
2024-01-25 10:35:16 +05:00
|
|
|
}
|