using DbFirst.BlazorWebApp.Models;
using DbFirst.Contracts.Catalogs;

namespace DbFirst.BlazorWebApp.Services;

public interface ICatalogApiClient
{
    Task<List<CatalogReadDto>> GetAllAsync(CancellationToken ct = default);
    Task<CatalogReadDto?> GetByIdAsync(int id, CancellationToken ct = default);
    Task<ApiResult<CatalogReadDto?>> CreateAsync(CatalogWriteDto dto, CancellationToken ct = default);
    Task<ApiResult<bool>> UpdateAsync(int id, CatalogWriteDto dto, CancellationToken ct = default);
    Task<ApiResult<bool>> DeleteAsync(int id, CancellationToken ct = default);
}