#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Enums;
using Jellyfin.Database.Implementations.Entities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
namespace MediaBrowser.Controller.Persistence;
/// 
/// Provides an interface to implement an Item repository.
/// 
public interface IItemRepository
{
    /// 
    /// Deletes the item.
    /// 
    /// The identifier to delete.
    void DeleteItem(params IReadOnlyList ids);
    /// 
    /// Saves the items.
    /// 
    /// The items.
    /// The cancellation token.
    void SaveItems(IReadOnlyList items, CancellationToken cancellationToken);
    void SaveImages(BaseItem item);
    /// 
    /// Retrieves the item.
    /// 
    /// The id.
    /// BaseItem.
    BaseItem RetrieveItem(Guid id);
    /// 
    /// Gets the items.
    /// 
    /// The query.
    /// QueryResult<BaseItem>.
    QueryResult GetItems(InternalItemsQuery filter);
    /// 
    /// Gets the item ids list.
    /// 
    /// The query.
    /// List<Guid>.
    IReadOnlyList GetItemIdsList(InternalItemsQuery filter);
    /// 
    /// Gets the item list.
    /// 
    /// The query.
    /// List<BaseItem>.
    IReadOnlyList GetItemList(InternalItemsQuery filter);
    /// 
    /// Gets the item list. Used mainly by the Latest api endpoint.
    /// 
    /// The query.
    /// Collection Type.
    /// List<BaseItem>.
    IReadOnlyList GetLatestItemList(InternalItemsQuery filter, CollectionType collectionType);
    /// 
    /// Gets the list of series presentation keys for next up.
    /// 
    /// The query.
    /// The minimum date for a series to have been most recently watched.
    /// The list of keys.
    IReadOnlyList GetNextUpSeriesKeys(InternalItemsQuery filter, DateTime dateCutoff);
    /// 
    /// Updates the inherited values.
    /// 
    void UpdateInheritedValues();
    int GetCount(InternalItemsQuery filter);
    ItemCounts GetItemCounts(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetGenres(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetMusicGenres(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetStudios(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetArtists(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetAlbumArtists(InternalItemsQuery filter);
    QueryResult<(BaseItem Item, ItemCounts ItemCounts)> GetAllArtists(InternalItemsQuery filter);
    IReadOnlyList GetMusicGenreNames();
    IReadOnlyList GetStudioNames();
    IReadOnlyList GetGenreNames();
    IReadOnlyList GetAllArtistNames();
    /// 
    /// Checks if an item has been persisted to the database.
    /// 
    /// The id to check.
    /// True if the item exists, otherwise false.
    Task ItemExistsAsync(Guid id);
    /// 
    /// Gets a value indicating wherever all children of the requested Id has been played.
    /// 
    /// The userdata to check against.
    /// The Top id to check.
    /// Whever the check should be done recursive. Warning expensive operation.
    /// A value indicating whever all children has been played.
    bool GetIsPlayed(User user, Guid id, bool recursive);
    /// 
    /// Gets all artist matches from the db.
    /// 
    /// The names of the artists.
    /// A map of the artist name and the potential matches.
    IReadOnlyDictionary FindArtists(IReadOnlyList artistNames);
}