mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 12:05:51 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
34 lines
2.2 KiB
C#
34 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Kavita.Models.DTOs.Progress;
|
|
using Kavita.Models.Entities.Enums;
|
|
using Kavita.Models.Entities.Progress;
|
|
|
|
namespace Kavita.API.Repositories;
|
|
|
|
public interface IAppUserProgressRepository
|
|
{
|
|
void Update(AppUserProgress userProgress);
|
|
void Remove(AppUserProgress userProgress);
|
|
Task<int> CleanupAbandonedChapters(CancellationToken ct = default);
|
|
Task<bool> UserHasProgress(LibraryType libraryType, int userId, CancellationToken ct = default);
|
|
Task<AppUserProgress?> GetUserProgressAsync(int chapterId, int userId, CancellationToken ct = default);
|
|
Task<bool> HasAnyProgressOnSeriesAsync(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<IEnumerable<AppUserProgress>> GetUserProgressForSeriesAsync(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<IEnumerable<AppUserProgress>> GetAllProgress(CancellationToken ct = default);
|
|
Task<DateTime> GetLatestProgress(CancellationToken ct = default);
|
|
Task<ProgressDto?> GetUserProgressDtoAsync(int chapterId, int userId, CancellationToken ct = default);
|
|
Task<bool> AnyUserProgressForSeriesAsync(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<int> GetHighestFullyReadChapterForSeries(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<float> GetHighestFullyReadVolumeForSeries(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<DateTime?> GetLatestProgressForSeries(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<DateTime?> GetLatestProgressForVolume(int volumeId, int userId, CancellationToken ct = default);
|
|
Task<DateTime?> GetLatestProgressForChapter(int chapterId, int userId, CancellationToken ct = default);
|
|
Task<DateTime?> GetFirstProgressForSeries(int seriesId, int userId, CancellationToken ct = default);
|
|
Task<DateTime?> GetFirstProgressForUser(int userId, CancellationToken ct = default);
|
|
Task UpdateAllProgressThatAreMoreThanChapterPages(CancellationToken ct = default);
|
|
Task<IList<FullProgressDto>> GetUserProgressForChapter(int chapterId, int userId = 0, CancellationToken ct = default);
|
|
}
|