Small UI changes (#3787)

This commit is contained in:
Joe Milazzo 2025-05-04 08:14:44 -06:00 committed by GitHub
parent 50a052e412
commit 5b8a643d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
203 changed files with 369 additions and 446 deletions

View File

@ -2,15 +2,15 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class AgeRestrictionDto public sealed record AgeRestrictionDto
{ {
/// <summary> /// <summary>
/// The maximum age rating a user has access to. -1 if not applicable /// The maximum age rating a user has access to. -1 if not applicable
/// </summary> /// </summary>
public required AgeRating AgeRating { get; set; } = AgeRating.NotApplicable; public required AgeRating AgeRating { get; init; } = AgeRating.NotApplicable;
/// <summary> /// <summary>
/// Are Unknowns explicitly allowed against age rating /// Are Unknowns explicitly allowed against age rating
/// </summary> /// </summary>
/// <remarks>Unknown is always lowest and default age rating. Setting this to false will ensure Teen age rating applies and unknowns are still filtered</remarks> /// <remarks>Unknown is always lowest and default age rating. Setting this to false will ensure Teen age rating applies and unknowns are still filtered</remarks>
public required bool IncludeUnknowns { get; set; } = false; public required bool IncludeUnknowns { get; init; } = false;
} }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class ConfirmEmailDto public sealed record ConfirmEmailDto
{ {
[Required] [Required]
public string Email { get; set; } = default!; public string Email { get; set; } = default!;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class ConfirmEmailUpdateDto public sealed record ConfirmEmailUpdateDto
{ {
[Required] [Required]
public string Email { get; set; } = default!; public string Email { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class ConfirmMigrationEmailDto public sealed record ConfirmMigrationEmailDto
{ {
public string Email { get; set; } = default!; public string Email { get; set; } = default!;
public string Token { get; set; } = default!; public string Token { get; set; } = default!;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class ConfirmPasswordResetDto public sealed record ConfirmPasswordResetDto
{ {
[Required] [Required]
public string Email { get; set; } = default!; public string Email { get; set; } = default!;

View File

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class InviteUserDto public sealed record InviteUserDto
{ {
[Required] [Required]
public string Email { get; set; } = default!; public string Email { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class InviteUserResponse public sealed record InviteUserResponse
{ {
/// <summary> /// <summary>
/// Email link used to setup the user account /// Email link used to setup the user account

View File

@ -1,7 +1,7 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
#nullable enable #nullable enable
public class LoginDto public sealed record LoginDto
{ {
public string Username { get; init; } = default!; public string Username { get; init; } = default!;
public string Password { get; set; } = default!; public string Password { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class MigrateUserEmailDto public sealed record MigrateUserEmailDto
{ {
public string Email { get; set; } = default!; public string Email { get; set; } = default!;
public string Username { get; set; } = default!; public string Username { get; set; } = default!;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class ResetPasswordDto public sealed record ResetPasswordDto
{ {
/// <summary> /// <summary>
/// The Username of the User /// The Username of the User

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class TokenRequestDto public sealed record TokenRequestDto
{ {
public string Token { get; init; } = default!; public string Token { get; init; } = default!;
public string RefreshToken { get; init; } = default!; public string RefreshToken { get; init; } = default!;

View File

@ -3,7 +3,7 @@ using API.Entities.Enums;
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class UpdateAgeRestrictionDto public sealed record UpdateAgeRestrictionDto
{ {
[Required] [Required]
public AgeRating AgeRating { get; set; } public AgeRating AgeRating { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Account; namespace API.DTOs.Account;
public class UpdateEmailDto public sealed record UpdateEmailDto
{ {
public string Email { get; set; } = default!; public string Email { get; set; } = default!;
public string Password { get; set; } = default!; public string Password { get; set; } = default!;

View File

@ -4,12 +4,16 @@ using System.ComponentModel.DataAnnotations;
namespace API.DTOs.Account; namespace API.DTOs.Account;
#nullable enable #nullable enable
public record UpdateUserDto public sealed record UpdateUserDto
{ {
/// <inheritdoc cref="API.Entities.AppUser.Id"/>
public int UserId { get; set; } public int UserId { get; set; }
/// <inheritdoc cref="API.Entities.AppUser.UserName"/>
public string Username { get; set; } = default!; public string Username { get; set; } = default!;
/// <summary>
/// List of Roles to assign to user. If admin not present, Pleb will be applied. /// List of Roles to assign to user. If admin not present, Pleb will be applied.
/// If admin present, all libraries will be granted access and will ignore those from DTO. /// If admin present, all libraries will be granted access and will ignore those from DTO.
/// </summary>
public IList<string> Roles { get; init; } = default!; public IList<string> Roles { get; init; } = default!;
/// <summary> /// <summary>
/// A list of libraries to grant access to /// A list of libraries to grant access to
@ -19,8 +23,6 @@ public record UpdateUserDto
/// An Age Rating which will limit the account to seeing everything equal to or below said rating. /// An Age Rating which will limit the account to seeing everything equal to or below said rating.
/// </summary> /// </summary>
public AgeRestrictionDto AgeRestriction { get; init; } = default!; public AgeRestrictionDto AgeRestriction { get; init; } = default!;
/// <summary> /// <inheritdoc cref="API.Entities.AppUser.Email"/>
/// Email of the user
/// </summary>
public string? Email { get; set; } = default!; public string? Email { get; set; } = default!;
} }

View File

@ -2,7 +2,7 @@
namespace API.DTOs; namespace API.DTOs;
public class BulkActionDto public sealed record BulkActionDto
{ {
public List<int> Ids { get; set; } public List<int> Ids { get; set; }
/** /**

View File

@ -4,7 +4,7 @@ using API.DTOs.SeriesDetail;
namespace API.DTOs; namespace API.DTOs;
public class ChapterDetailPlusDto public sealed record ChapterDetailPlusDto
{ {
public float Rating { get; set; } public float Rating { get; set; }
public bool HasBeenRated { get; set; } public bool HasBeenRated { get; set; }

View File

@ -13,37 +13,24 @@ namespace API.DTOs;
/// </summary> /// </summary>
public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
{ {
/// <inheritdoc cref="API.Entities.Chapter.Id"/>
public int Id { get; init; } public int Id { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Range"/>
/// Range of chapters. Chapter 2-4 -> "2-4". Chapter 2 -> "2". If special, will be special name.
/// </summary>
/// <remarks>This can be something like 19.HU or Alpha as some comics are like this</remarks>
public string Range { get; init; } = default!; public string Range { get; init; } = default!;
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Number"/>
/// Smallest number of the Range.
/// </summary>
[Obsolete("Use MinNumber and MaxNumber instead")] [Obsolete("Use MinNumber and MaxNumber instead")]
public string Number { get; init; } = default!; public string Number { get; init; } = default!;
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.MinNumber"/>
/// This may be 0 under the circumstance that the Issue is "Alpha" or other non-standard numbers.
/// </summary>
public float MinNumber { get; init; } public float MinNumber { get; init; }
/// <inheritdoc cref="API.Entities.Chapter.MaxNumber"/>
public float MaxNumber { get; init; } public float MaxNumber { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.SortOrder"/>
/// The sorting order of the Chapter. Inherits from MinNumber, but can be overridden.
/// </summary>
public float SortOrder { get; set; } public float SortOrder { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Pages"/>
/// Total number of pages in all MangaFiles
/// </summary>
public int Pages { get; init; } public int Pages { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.IsSpecial"/>
/// If this Chapter contains files that could only be identified as Series or has Special Identifier from filename
/// </summary>
public bool IsSpecial { get; init; } public bool IsSpecial { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Title"/>
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
/// </summary>
public string Title { get; set; } = default!; public string Title { get; set; } = default!;
/// <summary> /// <summary>
/// The files that represent this Chapter /// The files that represent this Chapter
@ -61,46 +48,25 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
/// The last time a chapter was read by current authenticated user /// The last time a chapter was read by current authenticated user
/// </summary> /// </summary>
public DateTime LastReadingProgress { get; set; } public DateTime LastReadingProgress { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.CoverImageLocked"/>
/// If the Cover Image is locked for this entity
/// </summary>
public bool CoverImageLocked { get; set; } public bool CoverImageLocked { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.VolumeId"/>
/// Volume Id this Chapter belongs to
/// </summary>
public int VolumeId { get; init; } public int VolumeId { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.CreatedUtc"/>
/// When chapter was created
/// </summary>
public DateTime CreatedUtc { get; set; } public DateTime CreatedUtc { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LastModifiedUtc"/>
public DateTime LastModifiedUtc { get; set; } public DateTime LastModifiedUtc { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Created"/>
/// When chapter was created in local server time
/// </summary>
/// <remarks>This is required for Tachiyomi Extension</remarks>
public DateTime Created { get; set; } public DateTime Created { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.ReleaseDate"/>
/// When the chapter was released.
/// </summary>
/// <remarks>Metadata field</remarks>
public DateTime ReleaseDate { get; init; } public DateTime ReleaseDate { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.TitleName"/>
/// Title of the Chapter/Issue
/// </summary>
/// <remarks>Metadata field</remarks>
public string TitleName { get; set; } = default!; public string TitleName { get; set; } = default!;
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Summary"/>
/// Summary of the Chapter
/// </summary>
/// <remarks>This is not set normally, only for Series Detail</remarks>
public string Summary { get; init; } = default!; public string Summary { get; init; } = default!;
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.AgeRating"/>
/// Age Rating for the issue/chapter
/// </summary>
public AgeRating AgeRating { get; init; } public AgeRating AgeRating { get; init; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.WordCount"/>
/// Total words in a Chapter (books only)
/// </summary>
public long WordCount { get; set; } = 0L; public long WordCount { get; set; } = 0L;
/// <summary> /// <summary>
/// Formatted Volume title ie) Volume 2. /// Formatted Volume title ie) Volume 2.
@ -113,14 +79,9 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
public int MaxHoursToRead { get; set; } public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/> /// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public float AvgHoursToRead { get; set; } public float AvgHoursToRead { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.WebLinks"/>
/// Comma-separated link of urls to external services that have some relation to the Chapter
/// </summary>
public string WebLinks { get; set; } public string WebLinks { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.ISBN"/>
/// ISBN-13 (usually) of the Chapter
/// </summary>
/// <remarks>This is guaranteed to be Valid</remarks>
public string ISBN { get; set; } public string ISBN { get; set; }
#region Metadata #region Metadata
@ -146,51 +107,60 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
/// </summary> /// </summary>
public ICollection<TagDto> Tags { get; set; } = new List<TagDto>(); public ICollection<TagDto> Tags { get; set; } = new List<TagDto>();
public PublicationStatus PublicationStatus { get; set; } public PublicationStatus PublicationStatus { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Language"/>
/// Language for the Chapter/Issue
/// </summary>
public string? Language { get; set; } public string? Language { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.Count"/>
/// Number in the TotalCount of issues
/// </summary>
public int Count { get; set; } public int Count { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.TotalCount"/>
/// Total number of issues for the series
/// </summary>
public int TotalCount { get; set; } public int TotalCount { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LanguageLocked"/>
public bool LanguageLocked { get; set; } public bool LanguageLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.SummaryLocked"/>
public bool SummaryLocked { get; set; } public bool SummaryLocked { get; set; }
/// <summary> /// <inheritdoc cref="API.Entities.Chapter.AgeRatingLocked"/>
/// Locked by user so metadata updates from scan loop will not override AgeRating
/// </summary>
public bool AgeRatingLocked { get; set; } public bool AgeRatingLocked { get; set; }
/// <summary>
/// Locked by user so metadata updates from scan loop will not override PublicationStatus
/// </summary>
public bool PublicationStatusLocked { get; set; } public bool PublicationStatusLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.GenresLocked"/>
public bool GenresLocked { get; set; } public bool GenresLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TagsLocked"/>
public bool TagsLocked { get; set; } public bool TagsLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.WriterLocked"/>
public bool WriterLocked { get; set; } public bool WriterLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.CharacterLocked"/>
public bool CharacterLocked { get; set; } public bool CharacterLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.ColoristLocked"/>
public bool ColoristLocked { get; set; } public bool ColoristLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.EditorLocked"/>
public bool EditorLocked { get; set; } public bool EditorLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.InkerLocked"/>
public bool InkerLocked { get; set; } public bool InkerLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.ImprintLocked"/>
public bool ImprintLocked { get; set; } public bool ImprintLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LettererLocked"/>
public bool LettererLocked { get; set; } public bool LettererLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.PencillerLocked"/>
public bool PencillerLocked { get; set; } public bool PencillerLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.PublisherLocked"/>
public bool PublisherLocked { get; set; } public bool PublisherLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TranslatorLocked"/>
public bool TranslatorLocked { get; set; } public bool TranslatorLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TeamLocked"/>
public bool TeamLocked { get; set; } public bool TeamLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LocationLocked"/>
public bool LocationLocked { get; set; } public bool LocationLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.CoverArtistLocked"/>
public bool CoverArtistLocked { get; set; } public bool CoverArtistLocked { get; set; }
public bool ReleaseYearLocked { get; set; } public bool ReleaseYearLocked { get; set; }
#endregion #endregion
public string CoverImage { get; set; } /// <inheritdoc cref="API.Entities.Chapter.CoverImage"/>
public string PrimaryColor { get; set; } = string.Empty; public string? CoverImage { get; set; }
public string SecondaryColor { get; set; } = string.Empty; /// <inheritdoc cref="API.Entities.Chapter.PrimaryColor"/>
public string? PrimaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Chapter.SecondaryColor"/>
public string? SecondaryColor { get; set; } = string.Empty;
public void ResetColorScape() public void ResetColorScape()
{ {

View File

@ -6,52 +6,52 @@ using API.Services.Plus;
namespace API.DTOs.Collection; namespace API.DTOs.Collection;
#nullable enable #nullable enable
public class AppUserCollectionDto : IHasCoverImage public sealed record AppUserCollectionDto : IHasCoverImage
{ {
public int Id { get; init; } public int Id { get; init; }
public string Title { get; set; } = default!; public string Title { get; init; } = default!;
public string? Summary { get; set; } = default!; public string? Summary { get; init; } = default!;
public bool Promoted { get; set; } public bool Promoted { get; init; }
public AgeRating AgeRating { get; set; } public AgeRating AgeRating { get; init; }
/// <summary> /// <summary>
/// This is used to tell the UI if it should request a Cover Image or not. If null or empty, it has not been set. /// This is used to tell the UI if it should request a Cover Image or not. If null or empty, it has not been set.
/// </summary> /// </summary>
public string? CoverImage { get; set; } = string.Empty; public string? CoverImage { get; set; } = string.Empty;
public string PrimaryColor { get; set; } = string.Empty; public string? PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty; public string? SecondaryColor { get; set; } = string.Empty;
public bool CoverImageLocked { get; set; } public bool CoverImageLocked { get; init; }
/// <summary> /// <summary>
/// Number of Series in the Collection /// Number of Series in the Collection
/// </summary> /// </summary>
public int ItemCount { get; set; } public int ItemCount { get; init; }
/// <summary> /// <summary>
/// Owner of the Collection /// Owner of the Collection
/// </summary> /// </summary>
public string? Owner { get; set; } public string? Owner { get; init; }
/// <summary> /// <summary>
/// Last time Kavita Synced the Collection with an upstream source (for non Kavita sourced collections) /// Last time Kavita Synced the Collection with an upstream source (for non Kavita sourced collections)
/// </summary> /// </summary>
public DateTime LastSyncUtc { get; set; } public DateTime LastSyncUtc { get; init; }
/// <summary> /// <summary>
/// Who created/manages the list. Non-Kavita lists are not editable by the user, except to promote /// Who created/manages the list. Non-Kavita lists are not editable by the user, except to promote
/// </summary> /// </summary>
public ScrobbleProvider Source { get; set; } = ScrobbleProvider.Kavita; public ScrobbleProvider Source { get; init; } = ScrobbleProvider.Kavita;
/// <summary> /// <summary>
/// For Non-Kavita sourced collections, the url to sync from /// For Non-Kavita sourced collections, the url to sync from
/// </summary> /// </summary>
public string? SourceUrl { get; set; } public string? SourceUrl { get; init; }
/// <summary> /// <summary>
/// Total number of items as of the last sync. Not applicable for Kavita managed collections. /// Total number of items as of the last sync. Not applicable for Kavita managed collections.
/// </summary> /// </summary>
public int TotalSourceCount { get; set; } public int TotalSourceCount { get; init; }
/// <summary> /// <summary>
/// A <br/> separated string of all missing series /// A <br/> separated string of all missing series
/// </summary> /// </summary>
public string? MissingSeriesFromSource { get; set; } public string? MissingSeriesFromSource { get; init; }
public void ResetColorScape() public void ResetColorScape()
{ {

View File

@ -2,7 +2,7 @@
namespace API.DTOs.CollectionTags; namespace API.DTOs.CollectionTags;
public class CollectionTagBulkAddDto public sealed record CollectionTagBulkAddDto
{ {
/// <summary> /// <summary>
/// Collection Tag Id /// Collection Tag Id

View File

@ -3,15 +3,21 @@
namespace API.DTOs.CollectionTags; namespace API.DTOs.CollectionTags;
[Obsolete("Use AppUserCollectionDto")] [Obsolete("Use AppUserCollectionDto")]
public class CollectionTagDto public sealed record CollectionTagDto
{ {
/// <inheritdoc cref="API.Entities.CollectionTag.Id"/>
public int Id { get; set; } public int Id { get; set; }
/// <inheritdoc cref="API.Entities.CollectionTag.Title"/>
public string Title { get; set; } = default!; public string Title { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.Summary"/>
public string Summary { get; set; } = default!; public string Summary { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.Promoted"/>
public bool Promoted { get; set; } public bool Promoted { get; set; }
/// <summary> /// <summary>
/// The cover image string. This is used on Frontend to show or hide the Cover Image /// The cover image string. This is used on Frontend to show or hide the Cover Image
/// </summary> /// </summary>
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImage"/>
public string CoverImage { get; set; } = default!; public string CoverImage { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImageLocked"/>
public bool CoverImageLocked { get; set; } public bool CoverImageLocked { get; set; }
} }

View File

@ -4,7 +4,7 @@ using API.DTOs.Collection;
namespace API.DTOs.CollectionTags; namespace API.DTOs.CollectionTags;
public class UpdateSeriesForTagDto public sealed record UpdateSeriesForTagDto
{ {
public AppUserCollectionDto Tag { get; init; } = default!; public AppUserCollectionDto Tag { get; init; } = default!;
public IEnumerable<int> SeriesIdsToRemove { get; init; } = default!; public IEnumerable<int> SeriesIdsToRemove { get; init; } = default!;

View File

@ -4,7 +4,7 @@
/// <summary> /// <summary>
/// A primary and secondary color /// A primary and secondary color
/// </summary> /// </summary>
public class ColorScape public sealed record ColorScape
{ {
public required string? Primary { get; set; } public required string? Primary { get; set; }
public required string? Secondary { get; set; } public required string? Secondary { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs; namespace API.DTOs;
public class CopySettingsFromLibraryDto public sealed record CopySettingsFromLibraryDto
{ {
public int SourceLibraryId { get; set; } public int SourceLibraryId { get; set; }
public List<int> TargetLibraryIds { get; set; } public List<int> TargetLibraryIds { get; set; }

View File

@ -3,7 +3,7 @@ using YamlDotNet.Serialization;
namespace API.DTOs.CoverDb; namespace API.DTOs.CoverDb;
public class CoverDbAuthor public sealed record CoverDbAuthor
{ {
[YamlMember(Alias = "name", ApplyNamingConventions = false)] [YamlMember(Alias = "name", ApplyNamingConventions = false)]
public string Name { get; set; } public string Name { get; set; }

View File

@ -3,7 +3,7 @@ using YamlDotNet.Serialization;
namespace API.DTOs.CoverDb; namespace API.DTOs.CoverDb;
public class CoverDbPeople public sealed record CoverDbPeople
{ {
[YamlMember(Alias = "people", ApplyNamingConventions = false)] [YamlMember(Alias = "people", ApplyNamingConventions = false)]
public List<CoverDbAuthor> People { get; set; } = new List<CoverDbAuthor>(); public List<CoverDbAuthor> People { get; set; } = new List<CoverDbAuthor>();

View File

@ -3,7 +3,7 @@
namespace API.DTOs.CoverDb; namespace API.DTOs.CoverDb;
#nullable enable #nullable enable
public class CoverDbPersonIds public sealed record CoverDbPersonIds
{ {
[YamlMember(Alias = "hardcover_id", ApplyNamingConventions = false)] [YamlMember(Alias = "hardcover_id", ApplyNamingConventions = false)]
public string? HardcoverId { get; set; } = null; public string? HardcoverId { get; set; } = null;

View File

@ -4,7 +4,7 @@ using API.Entities.Enums;
namespace API.DTOs.Dashboard; namespace API.DTOs.Dashboard;
public class DashboardStreamDto public sealed record DashboardStreamDto
{ {
public int Id { get; set; } public int Id { get; set; }
public required string Name { get; set; } public required string Name { get; set; }

View File

@ -5,7 +5,7 @@ namespace API.DTOs.Dashboard;
/// <summary> /// <summary>
/// This is a representation of a Series with some amount of underlying files within it. This is used for Recently Updated Series section /// This is a representation of a Series with some amount of underlying files within it. This is used for Recently Updated Series section
/// </summary> /// </summary>
public class GroupedSeriesDto public sealed record GroupedSeriesDto
{ {
public string SeriesName { get; set; } = default!; public string SeriesName { get; set; } = default!;
public int SeriesId { get; set; } public int SeriesId { get; set; }

View File

@ -6,7 +6,7 @@ namespace API.DTOs.Dashboard;
/// <summary> /// <summary>
/// A mesh of data for Recently added volume/chapters /// A mesh of data for Recently added volume/chapters
/// </summary> /// </summary>
public class RecentlyAddedItemDto public sealed record RecentlyAddedItemDto
{ {
public string SeriesName { get; set; } = default!; public string SeriesName { get; set; } = default!;
public int SeriesId { get; set; } public int SeriesId { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Dashboard; namespace API.DTOs.Dashboard;
public class SmartFilterDto public sealed record SmartFilterDto
{ {
public int Id { get; set; } public int Id { get; set; }
public required string Name { get; set; } public required string Name { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Dashboard; namespace API.DTOs.Dashboard;
public class UpdateDashboardStreamPositionDto public sealed record UpdateDashboardStreamPositionDto
{ {
public int FromPosition { get; set; } public int FromPosition { get; set; }
public int ToPosition { get; set; } public int ToPosition { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Dashboard; namespace API.DTOs.Dashboard;
public class UpdateStreamPositionDto public sealed record UpdateStreamPositionDto
{ {
public int FromPosition { get; set; } public int FromPosition { get; set; }
public int ToPosition { get; set; } public int ToPosition { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs; namespace API.DTOs;
public class DeleteChaptersDto public sealed record DeleteChaptersDto
{ {
public IList<int> ChapterIds { get; set; } = default!; public IList<int> ChapterIds { get; set; } = default!;
} }

View File

@ -2,7 +2,7 @@
namespace API.DTOs; namespace API.DTOs;
public class DeleteSeriesDto public sealed record DeleteSeriesDto
{ {
public IList<int> SeriesIds { get; set; } = default!; public IList<int> SeriesIds { get; set; } = default!;
} }

View File

@ -3,7 +3,7 @@ using API.Entities.Enums.Device;
namespace API.DTOs.Device; namespace API.DTOs.Device;
public class CreateDeviceDto public sealed record CreateDeviceDto
{ {
[Required] [Required]
public string Name { get; set; } = default!; public string Name { get; set; } = default!;

View File

@ -6,7 +6,7 @@ namespace API.DTOs.Device;
/// <summary> /// <summary>
/// A Device is an entity that can receive data from Kavita (kindle) /// A Device is an entity that can receive data from Kavita (kindle)
/// </summary> /// </summary>
public class DeviceDto public sealed record DeviceDto
{ {
/// <summary> /// <summary>
/// The device Id /// The device Id

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Device; namespace API.DTOs.Device;
public class SendSeriesToDeviceDto public sealed record SendSeriesToDeviceDto
{ {
public int DeviceId { get; set; } public int DeviceId { get; set; }
public int SeriesId { get; set; } public int SeriesId { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Device; namespace API.DTOs.Device;
public class SendToDeviceDto public sealed record SendToDeviceDto
{ {
public int DeviceId { get; set; } public int DeviceId { get; set; }
public IReadOnlyList<int> ChapterIds { get; set; } = default!; public IReadOnlyList<int> ChapterIds { get; set; } = default!;

View File

@ -3,7 +3,7 @@ using API.Entities.Enums.Device;
namespace API.DTOs.Device; namespace API.DTOs.Device;
public class UpdateDeviceDto public sealed record UpdateDeviceDto
{ {
[Required] [Required]
public int Id { get; set; } public int Id { get; set; }

View File

@ -4,7 +4,7 @@ using API.DTOs.Reader;
namespace API.DTOs.Downloads; namespace API.DTOs.Downloads;
public class DownloadBookmarkDto public sealed record DownloadBookmarkDto
{ {
[Required] [Required]
public IEnumerable<BookmarkDto> Bookmarks { get; set; } = default!; public IEnumerable<BookmarkDto> Bookmarks { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class ConfirmationEmailDto public sealed record ConfirmationEmailDto
{ {
public string InvitingUser { get; init; } = default!; public string InvitingUser { get; init; } = default!;
public string EmailAddress { get; init; } = default!; public string EmailAddress { get; init; } = default!;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class EmailHistoryDto public sealed record EmailHistoryDto
{ {
public long Id { get; set; } public long Id { get; set; }
public bool Sent { get; set; } public bool Sent { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class EmailMigrationDto public sealed record EmailMigrationDto
{ {
public string EmailAddress { get; init; } = default!; public string EmailAddress { get; init; } = default!;
public string Username { get; init; } = default!; public string Username { get; init; } = default!;

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Represents if Test Email Service URL was successful or not and if any error occured /// Represents if Test Email Service URL was successful or not and if any error occured
/// </summary> /// </summary>
public class EmailTestResultDto public sealed record EmailTestResultDto
{ {
public bool Successful { get; set; } public bool Successful { get; set; }
public string ErrorMessage { get; set; } = default!; public string ErrorMessage { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class PasswordResetEmailDto public sealed record PasswordResetEmailDto
{ {
public string EmailAddress { get; init; } = default!; public string EmailAddress { get; init; } = default!;
public string ServerConfirmationLink { get; init; } = default!; public string ServerConfirmationLink { get; init; } = default!;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class SendToDto public sealed record SendToDto
{ {
public string DestinationEmail { get; set; } = default!; public string DestinationEmail { get; set; } = default!;
public IEnumerable<string> FilePaths { get; set; } = default!; public IEnumerable<string> FilePaths { get; set; } = default!;

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Email; namespace API.DTOs.Email;
public class TestEmailDto public sealed record TestEmailDto
{ {
public string Url { get; set; } = default!; public string Url { get; set; } = default!;
} }

View File

@ -5,7 +5,7 @@ using API.Entities.Enums;
namespace API.DTOs.Filtering; namespace API.DTOs.Filtering;
#nullable enable #nullable enable
public class FilterDto public sealed record FilterDto
{ {
/// <summary> /// <summary>
/// The type of Formats you want to be returned. An empty list will return all formats back /// The type of Formats you want to be returned. An empty list will return all formats back

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Filtering; namespace API.DTOs.Filtering;
public class LanguageDto public sealed record LanguageDto
{ {
public required string IsoCode { get; set; } public required string IsoCode { get; set; }
public required string Title { get; set; } public required string Title { get; set; }

View File

@ -4,7 +4,7 @@
/// <summary> /// <summary>
/// Represents a range between two int/float/double /// Represents a range between two int/float/double
/// </summary> /// </summary>
public class Range<T> public sealed record Range<T>
{ {
public T? Min { get; init; } public T? Min { get; init; }
public T? Max { get; init; } public T? Max { get; init; }

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Represents the Reading Status. This is a flag and allows multiple statues /// Represents the Reading Status. This is a flag and allows multiple statues
/// </summary> /// </summary>
public class ReadStatus public sealed record ReadStatus
{ {
public bool NotRead { get; set; } = true; public bool NotRead { get; set; } = true;
public bool InProgress { get; set; } = true; public bool InProgress { get; set; } = true;

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Sorting Options for a query /// Sorting Options for a query
/// </summary> /// </summary>
public class SortOptions public sealed record SortOptions
{ {
public SortField SortField { get; set; } public SortField SortField { get; set; }
public bool IsAscending { get; set; } = true; public bool IsAscending { get; set; } = true;

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// For requesting an encoded filter to be decoded /// For requesting an encoded filter to be decoded
/// </summary> /// </summary>
public class DecodeFilterDto public sealed record DecodeFilterDto
{ {
public string EncodedFilter { get; set; } public string EncodedFilter { get; set; }
} }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Filtering.v2; namespace API.DTOs.Filtering.v2;
public class FilterStatementDto public sealed record FilterStatementDto
{ {
public FilterComparison Comparison { get; set; } public FilterComparison Comparison { get; set; }
public FilterField Field { get; set; } public FilterField Field { get; set; }

View File

@ -6,7 +6,7 @@ namespace API.DTOs.Filtering.v2;
/// <summary> /// <summary>
/// Metadata filtering for v2 API only /// Metadata filtering for v2 API only
/// </summary> /// </summary>
public class FilterV2Dto public sealed record FilterV2Dto
{ {
/// <summary> /// <summary>
/// Not used in the UI. /// Not used in the UI.

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Jobs; namespace API.DTOs.Jobs;
public class JobDto public sealed record JobDto
{ {
/// <summary> /// <summary>
/// Job Id /// Job Id

View File

@ -3,7 +3,7 @@
/// <summary> /// <summary>
/// Represents an individual button in a Jump Bar /// Represents an individual button in a Jump Bar
/// </summary> /// </summary>
public class JumpKeyDto public sealed record JumpKeyDto
{ {
/// <summary> /// <summary>
/// Number of items in this Key /// Number of items in this Key

View File

@ -1,6 +1,6 @@
namespace API.DTOs; namespace API.DTOs;
public class KavitaLocale public sealed record KavitaLocale
{ {
public string FileName { get; set; } // Key public string FileName { get; set; } // Key
public string RenderName { get; set; } public string RenderName { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.KavitaPlus.Account; namespace API.DTOs.KavitaPlus.Account;
public class AniListUpdateDto public sealed record AniListUpdateDto
{ {
public string Token { get; set; } public string Token { get; set; }
} }

View File

@ -5,7 +5,7 @@ namespace API.DTOs.KavitaPlus.Account;
/// <summary> /// <summary>
/// Represents information around a user's tokens and their status /// Represents information around a user's tokens and their status
/// </summary> /// </summary>
public class UserTokenInfo public sealed record UserTokenInfo
{ {
public int UserId { get; set; } public int UserId { get; set; }
public string Username { get; set; } public string Username { get; set; }

View File

@ -6,7 +6,7 @@ namespace API.DTOs.KavitaPlus.ExternalMetadata;
/// <summary> /// <summary>
/// Used for matching and fetching metadata on a series /// Used for matching and fetching metadata on a series
/// </summary> /// </summary>
internal class ExternalMetadataIdsDto internal sealed record ExternalMetadataIdsDto
{ {
public long? MalId { get; set; } public long? MalId { get; set; }
public int? AniListId { get; set; } public int? AniListId { get; set; }

View File

@ -4,7 +4,7 @@ using API.DTOs.Scrobbling;
namespace API.DTOs.KavitaPlus.ExternalMetadata; namespace API.DTOs.KavitaPlus.ExternalMetadata;
#nullable enable #nullable enable
internal class MatchSeriesRequestDto internal sealed record MatchSeriesRequestDto
{ {
public string SeriesName { get; set; } public string SeriesName { get; set; }
public ICollection<string> AlternativeNames { get; set; } public ICollection<string> AlternativeNames { get; set; }

View File

@ -1,11 +1,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using API.DTOs.KavitaPlus.Metadata;
using API.DTOs.Recommendation; using API.DTOs.Recommendation;
using API.DTOs.Scrobbling; using API.DTOs.Scrobbling;
using API.DTOs.SeriesDetail; using API.DTOs.SeriesDetail;
namespace API.DTOs.KavitaPlus.ExternalMetadata; namespace API.DTOs.KavitaPlus.ExternalMetadata;
internal class SeriesDetailPlusApiDto internal sealed record SeriesDetailPlusApiDto
{ {
public IEnumerable<MediaRecommendationDto> Recommendations { get; set; } public IEnumerable<MediaRecommendationDto> Recommendations { get; set; }
public IEnumerable<UserReviewDto> Reviews { get; set; } public IEnumerable<UserReviewDto> Reviews { get; set; }

View File

@ -1,7 +1,7 @@
namespace API.DTOs.KavitaPlus.License; namespace API.DTOs.KavitaPlus.License;
#nullable enable #nullable enable
public class EncryptLicenseDto public sealed record EncryptLicenseDto
{ {
public required string License { get; set; } public required string License { get; set; }
public required string InstallId { get; set; } public required string InstallId { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.KavitaPlus.License; namespace API.DTOs.KavitaPlus.License;
public class LicenseInfoDto public sealed record LicenseInfoDto
{ {
/// <summary> /// <summary>
/// If cancelled, will represent cancellation date. If not, will represent repayment date /// If cancelled, will represent cancellation date. If not, will represent repayment date

View File

@ -1,6 +1,6 @@
namespace API.DTOs.KavitaPlus.License; namespace API.DTOs.KavitaPlus.License;
public class LicenseValidDto public sealed record LicenseValidDto
{ {
public required string License { get; set; } public required string License { get; set; }
public required string InstallId { get; set; } public required string InstallId { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.KavitaPlus.License; namespace API.DTOs.KavitaPlus.License;
public class ResetLicenseDto public sealed record ResetLicenseDto
{ {
public required string License { get; set; } public required string License { get; set; }
public required string InstallId { get; set; } public required string InstallId { get; set; }

View File

@ -1,7 +1,7 @@
namespace API.DTOs.KavitaPlus.License; namespace API.DTOs.KavitaPlus.License;
#nullable enable #nullable enable
public class UpdateLicenseDto public sealed record UpdateLicenseDto
{ {
/// <summary> /// <summary>
/// License Key received from Kavita+ /// License Key received from Kavita+

View File

@ -12,7 +12,7 @@ public enum MatchStateOption
DontMatch = 4 DontMatch = 4
} }
public class ManageMatchFilterDto public sealed record ManageMatchFilterDto
{ {
public MatchStateOption MatchStateOption { get; set; } = MatchStateOption.All; public MatchStateOption MatchStateOption { get; set; } = MatchStateOption.All;
public string SearchTerm { get; set; } = string.Empty; public string SearchTerm { get; set; } = string.Empty;

View File

@ -2,7 +2,7 @@
namespace API.DTOs.KavitaPlus.Manage; namespace API.DTOs.KavitaPlus.Manage;
public class ManageMatchSeriesDto public sealed record ManageMatchSeriesDto
{ {
public SeriesDto Series { get; set; } public SeriesDto Series { get; set; }
public bool IsMatched { get; set; } public bool IsMatched { get; set; }

View File

@ -7,7 +7,7 @@ namespace API.DTOs.KavitaPlus.Metadata;
/// <summary> /// <summary>
/// Information about an individual issue/chapter/book from Kavita+ /// Information about an individual issue/chapter/book from Kavita+
/// </summary> /// </summary>
public class ExternalChapterDto public sealed record ExternalChapterDto
{ {
public string Title { get; set; } public string Title { get; set; }

View File

@ -1,16 +1,16 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using API.DTOs.KavitaPlus.Metadata; using API.DTOs.Recommendation;
using API.DTOs.Scrobbling; using API.DTOs.Scrobbling;
using API.Services.Plus; using API.Services.Plus;
namespace API.DTOs.Recommendation; namespace API.DTOs.KavitaPlus.Metadata;
#nullable enable #nullable enable
/// <summary> /// <summary>
/// This is AniListSeries /// This is AniListSeries
/// </summary> /// </summary>
public class ExternalSeriesDetailDto public sealed record ExternalSeriesDetailDto
{ {
public string Name { get; set; } public string Name { get; set; }
public int? AniListId { get; set; } public int? AniListId { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.KavitaPlus.Metadata; namespace API.DTOs.KavitaPlus.Metadata;
public class MetadataFieldMappingDto public sealed record MetadataFieldMappingDto
{ {
public int Id { get; set; } public int Id { get; set; }
public MetadataFieldType SourceType { get; set; } public MetadataFieldType SourceType { get; set; }

View File

@ -7,7 +7,7 @@ using NotImplementedException = System.NotImplementedException;
namespace API.DTOs.KavitaPlus.Metadata; namespace API.DTOs.KavitaPlus.Metadata;
public class MetadataSettingsDto public sealed record MetadataSettingsDto
{ {
/// <summary> /// <summary>
/// If writing any sort of metadata from upstream (AniList, Hardcover) source is allowed /// If writing any sort of metadata from upstream (AniList, Hardcover) source is allowed

View File

@ -9,7 +9,7 @@ public enum CharacterRole
} }
public class SeriesCharacter public sealed record SeriesCharacter
{ {
public string Name { get; set; } public string Name { get; set; }
public required string Description { get; set; } public required string Description { get; set; }

View File

@ -5,7 +5,7 @@ using API.Services.Plus;
namespace API.DTOs.KavitaPlus.Metadata; namespace API.DTOs.KavitaPlus.Metadata;
public class ALMediaTitle public sealed record ALMediaTitle
{ {
public string? EnglishTitle { get; set; } public string? EnglishTitle { get; set; }
public string RomajiTitle { get; set; } public string RomajiTitle { get; set; }
@ -13,7 +13,7 @@ public class ALMediaTitle
public string PreferredTitle { get; set; } public string PreferredTitle { get; set; }
} }
public class SeriesRelationship public sealed record SeriesRelationship
{ {
public int AniListId { get; set; } public int AniListId { get; set; }
public int? MalId { get; set; } public int? MalId { get; set; }

View File

@ -1,12 +1,11 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using API.Entities.Enums; using API.Entities.Enums;
namespace API.DTOs; namespace API.DTOs;
#nullable enable #nullable enable
public class LibraryDto public sealed record LibraryDto
{ {
public int Id { get; init; } public int Id { get; init; }
public string? Name { get; init; } public string? Name { get; init; }

View File

@ -4,7 +4,7 @@ using API.Entities.Enums;
namespace API.DTOs; namespace API.DTOs;
#nullable enable #nullable enable
public class MangaFileDto public sealed record MangaFileDto
{ {
public int Id { get; init; } public int Id { get; init; }
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@
namespace API.DTOs.MediaErrors; namespace API.DTOs.MediaErrors;
public class MediaErrorDto public sealed record MediaErrorDto
{ {
/// <summary> /// <summary>
/// Format Type (RAR, ZIP, 7Zip, Epub, PDF) /// Format Type (RAR, ZIP, 7Zip, Epub, PDF)

View File

@ -8,7 +8,7 @@ namespace API.DTOs;
/// <summary> /// <summary>
/// Represents a member of a Kavita server. /// Represents a member of a Kavita server.
/// </summary> /// </summary>
public class MemberDto public sealed record MemberDto
{ {
public int Id { get; init; } public int Id { get; init; }
public string? Username { get; init; } public string? Username { get; init; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Metadata; namespace API.DTOs.Metadata;
public class AgeRatingDto public sealed record AgeRatingDto
{ {
public AgeRating Value { get; set; } public AgeRating Value { get; set; }
public required string Title { get; set; } public required string Title { get; set; }

View File

@ -9,7 +9,7 @@ namespace API.DTOs.Metadata;
/// Exclusively metadata about a given chapter /// Exclusively metadata about a given chapter
/// </summary> /// </summary>
[Obsolete("Will not be maintained as of v0.8.1")] [Obsolete("Will not be maintained as of v0.8.1")]
public class ChapterMetadataDto public sealed record ChapterMetadataDto
{ {
public int Id { get; set; } public int Id { get; set; }
public int ChapterId { get; set; } public int ChapterId { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Metadata; namespace API.DTOs.Metadata;
public class GenreTagDto public sealed record GenreTagDto
{ {
public int Id { get; set; } public int Id { get; set; }
public required string Title { get; set; } public required string Title { get; set; }

View File

@ -1,8 +1,9 @@
using API.DTOs.KavitaPlus.Metadata;
using API.DTOs.Recommendation; using API.DTOs.Recommendation;
namespace API.DTOs.Metadata.Matching; namespace API.DTOs.Metadata.Matching;
public class ExternalSeriesMatchDto public sealed record ExternalSeriesMatchDto
{ {
public ExternalSeriesDetailDto Series { get; set; } public ExternalSeriesDetailDto Series { get; set; }
public float MatchRating { get; set; } public float MatchRating { get; set; }

View File

@ -3,7 +3,7 @@ namespace API.DTOs.Metadata.Matching;
/// <summary> /// <summary>
/// Used for matching a series with Kavita+ for metadata and scrobbling /// Used for matching a series with Kavita+ for metadata and scrobbling
/// </summary> /// </summary>
public class MatchSeriesDto public sealed record MatchSeriesDto
{ {
/// <summary> /// <summary>
/// When set, Kavita will stop attempting to match this series and will not perform any scrobbling /// When set, Kavita will stop attempting to match this series and will not perform any scrobbling

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Metadata; namespace API.DTOs.Metadata;
public class PublicationStatusDto public sealed record PublicationStatusDto
{ {
public PublicationStatus Value { get; set; } public PublicationStatus Value { get; set; }
public required string Title { get; set; } public required string Title { get; set; }

View File

@ -1,6 +1,6 @@
namespace API.DTOs.Metadata; namespace API.DTOs.Metadata;
public class TagDto public sealed record TagDto
{ {
public int Id { get; set; } public int Id { get; set; }
public required string Title { get; set; } public required string Title { get; set; }

View File

@ -4,11 +4,13 @@ using System.Xml.Serialization;
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
// TODO: OPDS Dtos are internal state, shouldn't be in DTO directory
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[XmlRoot("feed", Namespace = "http://www.w3.org/2005/Atom")] [XmlRoot("feed", Namespace = "http://www.w3.org/2005/Atom")]
public class Feed public sealed record Feed
{ {
[XmlElement("updated")] [XmlElement("updated")]
public string Updated { get; init; } = DateTime.UtcNow.ToString("s"); public string Updated { get; init; } = DateTime.UtcNow.ToString("s");

View File

@ -2,7 +2,7 @@
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
public class FeedAuthor public sealed record FeedAuthor
{ {
[XmlElement("name")] [XmlElement("name")]
public string Name { get; set; } public string Name { get; set; }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
public class FeedCategory public sealed record FeedCategory
{ {
[XmlAttribute("scheme")] [XmlAttribute("scheme")]
public string Scheme { get; } = "http://www.bisg.org/standards/bisac_subject/index.html"; public string Scheme { get; } = "http://www.bisg.org/standards/bisac_subject/index.html";

View File

@ -5,7 +5,7 @@ using System.Xml.Serialization;
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
#nullable enable #nullable enable
public class FeedEntry public sealed record FeedEntry
{ {
[XmlElement("updated")] [XmlElement("updated")]
public string Updated { get; init; } = DateTime.UtcNow.ToString("s"); public string Updated { get; init; } = DateTime.UtcNow.ToString("s");

View File

@ -2,7 +2,7 @@
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
public class FeedEntryContent public sealed record FeedEntryContent
{ {
[XmlAttribute("type")] [XmlAttribute("type")]
public string Type = "text"; public string Type = "text";

View File

@ -3,7 +3,7 @@ using System.Xml.Serialization;
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
public class FeedLink public sealed record FeedLink
{ {
[XmlIgnore] [XmlIgnore]
public bool IsPageStream { get; set; } public bool IsPageStream { get; set; }

View File

@ -3,7 +3,7 @@
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
[XmlRoot("OpenSearchDescription", Namespace = "http://a9.com/-/spec/opensearch/1.1/")] [XmlRoot("OpenSearchDescription", Namespace = "http://a9.com/-/spec/opensearch/1.1/")]
public class OpenSearchDescription public sealed record OpenSearchDescription
{ {
/// <summary> /// <summary>
/// Contains a brief human-readable title that identifies this search engine. /// Contains a brief human-readable title that identifies this search engine.

View File

@ -2,7 +2,7 @@
namespace API.DTOs.OPDS; namespace API.DTOs.OPDS;
public class SearchLink public sealed record SearchLink
{ {
[XmlAttribute("type")] [XmlAttribute("type")]
public string Type { get; set; } = default!; public string Type { get; set; } = default!;

View File

@ -3,7 +3,7 @@
namespace API.DTOs; namespace API.DTOs;
#nullable enable #nullable enable
public class UpdatePersonDto public sealed record UpdatePersonDto
{ {
[Required] [Required]
public int Id { get; init; } public int Id { get; init; }

View File

@ -5,7 +5,7 @@ namespace API.DTOs.Progress;
/// <summary> /// <summary>
/// A full progress Record from the DB (not all data, only what's needed for API) /// A full progress Record from the DB (not all data, only what's needed for API)
/// </summary> /// </summary>
public class FullProgressDto public sealed record FullProgressDto
{ {
public int Id { get; set; } public int Id { get; set; }
public int ChapterId { get; set; } public int ChapterId { get; set; }

View File

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
namespace API.DTOs.Progress; namespace API.DTOs.Progress;
#nullable enable #nullable enable
public class ProgressDto public sealed record ProgressDto
{ {
[Required] [Required]
public int VolumeId { get; set; } public int VolumeId { get; set; }

View File

@ -1,14 +1,18 @@
using API.Entities.Enums; using API.Entities;
using API.Entities.Enums;
using API.Entities.Metadata;
using API.Services.Plus; using API.Services.Plus;
namespace API.DTOs; namespace API.DTOs;
#nullable enable #nullable enable
public class RatingDto public sealed record RatingDto
{ {
public int AverageScore { get; set; } public int AverageScore { get; set; }
public int FavoriteCount { get; set; } public int FavoriteCount { get; set; }
public ScrobbleProvider Provider { get; set; } public ScrobbleProvider Provider { get; set; }
/// <inheritdoc cref="ExternalRating.Authority"/>
public RatingAuthority Authority { get; set; } = RatingAuthority.User; public RatingAuthority Authority { get; set; } = RatingAuthority.User;
public string? ProviderUrl { get; set; } public string? ProviderUrl { get; set; }
} }

View File

@ -2,7 +2,7 @@
namespace API.DTOs.Reader; namespace API.DTOs.Reader;
public class BookChapterItem public sealed record BookChapterItem
{ {
/// <summary> /// <summary>
/// Name of the Chapter /// Name of the Chapter

Some files were not shown because too many files have changed in this diff Show More