using ErrorOr;
using MuiCharts.Domain.Models;
namespace MuiCharts.Domain.Repositories;
///
/// Represents a repository for managing points.
///
public interface IPointRepository
{
///
/// Adds a new point asynchronously.
///
/// The point to add.
/// A task that represents the asynchronous operation. The task result contains the added point or an error.
Task> AddPointAsync(Point point);
///
/// Retrieves a point by its ID asynchronously.
///
/// The ID of the point to retrieve.
/// A task that represents the asynchronous operation. The task result contains the retrieved point or an error.
Task> GetPointAsync(int id);
///
/// Retrieves a range of points asynchronously.
///
/// A task that represents the asynchronous operation. The task result contains a queryable collection of points.
Task> GetPointsRangeAsync();
///
/// Adds or updates a point asynchronously.
///
/// The point to add or update.
/// A task that represents the asynchronous operation. The task result contains the added or updated point or an error.
Task> AddOrUpdatePointAsync(Point point);
///
/// Deletes a point by its ID asynchronously.
///
/// The ID of the point to delete.
/// A task that represents the asynchronous operation. The task result contains a flag indicating if the point was deleted successfully or an error.
Task> DeletePointAsync(int id);
}