using FluentResults;
using NexusReader.Application.Queries.Reader;
namespace NexusReader.Application.Abstractions.Services;
///
/// Reads and parses EPUB content for a specific ebook and chapter.
///
public interface IEpubReader
{
///
/// Retrieves the content blocks for a given chapter of the specified ebook.
///
/// The unique ID of the ebook to read.
/// Zero-based chapter index.
/// The authenticated user's ID (used for tenant isolation in the DB lookup).
/// Cancellation token.
Task> GetEpubContentAsync(
Guid ebookId,
int chapterIndex,
string? userId = null,
CancellationToken cancellationToken = default);
///
/// Retrieves a resource (like an image) from the EPUB as a byte array.
///
/// The unique ID of the ebook to read.
/// The path of the resource within the EPUB archive.
/// The authenticated user's ID (used for tenant isolation).
/// Cancellation token.
Task> GetEpubResourceAsync(
Guid ebookId,
string resourcePath,
string? userId = null,
CancellationToken cancellationToken = default);
}