AdminPanel/Netina.AdminPanel.PWA/Services/RestServices/IProductRestApi.cs

26 lines
1.1 KiB
C#

namespace Netina.AdminPanel.PWA.Services.RestServices;
public interface IProductRestApi
{
[Put("/{productId}/displayed")]
Task<bool> ChangeDisplayedAsync(Guid productId, [Query]bool beDisplayed, [Header("Authorization")]string authorization);
[Put("/{productId}/cost")]
Task<bool> ChangeCostAsync(Guid productId, [Query] double cost, [Header("Authorization")] string authorization);
[Get("/{productId}")]
Task<GetProductResponseDto> ReadOne(Guid productId);
[Get("/{productId}/sub")]
Task<List<SubProductSDto>> GetSubProductsAsync(Guid productId);
[Get("")]
Task<GetProductsResponseDto> ReadAll([Query] string productName, [Header("Authorization")] string authorization);
[Get("")]
Task<GetProductsResponseDto> ReadAll([Query] int page, [Query] string? productName, [Query] Guid? categoryId, [Query] bool? isActive, [Header("Authorization")] string authorization);
[Get("")]
Task<GetProductsResponseDto> ReadAll([Query] string productName, [Query] Guid categoryId, [Header("Authorization")] string authorization);
}