#region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.DataAccess.Entities.MediaLibrary.AudioLibrary.MusicLibrary;
using Lumina.Application.Common.DataAccess.Repositories.Common.Actions;
using Lumina.Application.Common.DataAccess.Repositories.Common.Base;
using Lumina.Application.Common.DTO.MediaLibrary.AudioLibrary.MusicLibrary.Tracks;
using Lumina.Application.Common.DTO.Pagination;
using Lumina.Domain.Common.Primitives;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
#endregion
namespace Lumina.Application.Common.DataAccess.Repositories.MusicLibrary;
///
/// Interface for the repository for tracks.
///
public interface ITrackRepository : IRepository,
IInsertRepositoryAction,
IUpdateRepositoryAction,
IGetByIdRepositoryAction
{
///
/// Gets the subset of that is already used by a track of the library identified by .
///
/// The Id of the library whose tracks are searched.
/// The track paths to check.
/// Cancellation token that can be used to stop the execution.
/// An containing either the paths that are already used, or an error.
Task>> GetExistingPathsAsync(Guid libraryId, IReadOnlyCollection paths, CancellationToken cancellationToken);
///
/// Gets all the tracks of the album identified by .
///
/// The Id of the album whose tracks are retrieved.
/// Cancellation token that can be used to stop the execution.
/// An containing either a collection of , or an error.
Task>> GetByAlbumIdAsync(Guid albumId, CancellationToken cancellationToken);
///
/// Gets the lightweight read models of the tracks of the album identified by , projecting only the fields needed to display the tracks of an album.
///
/// The Id of the album whose tracks are retrieved.
/// The pagination data that includes the current page and the number of items per page to retrieve. If , all matching tracks are returned.
/// Cancellation token that can be used to stop the execution.
/// An containing either a paginated result of , or an error.
Task>> GetTracksLiteByAlbumIdAsync(Guid albumId, PaginationDataDto? paginationData, CancellationToken cancellationToken);
}