Merged v0.5.1 develop into main.
This commit is contained in:
commit
150479e755
256 changed files with 6898 additions and 1833 deletions
16
API/DTOs/Account/ConfirmEmailDto.cs
Normal file
16
API/DTOs/Account/ConfirmEmailDto.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.DTOs.Account;
|
||||
|
||||
public class ConfirmEmailDto
|
||||
{
|
||||
[Required]
|
||||
public string Email { get; set; }
|
||||
[Required]
|
||||
public string Token { get; set; }
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
public string Password { get; set; }
|
||||
[Required]
|
||||
public string Username { get; set; }
|
||||
}
|
7
API/DTOs/Account/ConfirmMigrationEmailDto.cs
Normal file
7
API/DTOs/Account/ConfirmMigrationEmailDto.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace API.DTOs.Account;
|
||||
|
||||
public class ConfirmMigrationEmailDto
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public string Token { get; set; }
|
||||
}
|
14
API/DTOs/Account/ConfirmPasswordResetDto.cs
Normal file
14
API/DTOs/Account/ConfirmPasswordResetDto.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.DTOs.Account;
|
||||
|
||||
public class ConfirmPasswordResetDto
|
||||
{
|
||||
[Required]
|
||||
public string Email { get; set; }
|
||||
[Required]
|
||||
public string Token { get; set; }
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
public string Password { get; set; }
|
||||
}
|
21
API/DTOs/Account/InviteUserDto.cs
Normal file
21
API/DTOs/Account/InviteUserDto.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.DTOs.Account;
|
||||
|
||||
public class InviteUserDto
|
||||
{
|
||||
[Required]
|
||||
public string Email { get; init; }
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public ICollection<string> Roles { get; init; }
|
||||
/// <summary>
|
||||
/// A list of libraries to grant access to
|
||||
/// </summary>
|
||||
public IList<int> Libraries { get; init; }
|
||||
|
||||
public bool SendEmail { get; init; } = true;
|
||||
}
|
9
API/DTOs/Account/MigrateUserEmailDto.cs
Normal file
9
API/DTOs/Account/MigrateUserEmailDto.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
namespace API.DTOs.Account;
|
||||
|
||||
public class MigrateUserEmailDto
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool SendEmail { get; set; }
|
||||
}
|
7
API/DTOs/Account/TokenRequestDto.cs
Normal file
7
API/DTOs/Account/TokenRequestDto.cs
Normal file
|
@ -0,0 +1,7 @@
|
|||
namespace API.DTOs.Account;
|
||||
|
||||
public class TokenRequestDto
|
||||
{
|
||||
public string Token { get; init; }
|
||||
public string RefreshToken { get; init; }
|
||||
}
|
23
API/DTOs/Account/UpdateUserDto.cs
Normal file
23
API/DTOs/Account/UpdateUserDto.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace API.DTOs.Account;
|
||||
|
||||
public record UpdateUserDto
|
||||
{
|
||||
public int UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
/// <summary>
|
||||
/// This field will not result in any change to the User model. Changing email is not supported.
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public IList<string> Roles { get; init; }
|
||||
/// <summary>
|
||||
/// A list of libraries to grant access to
|
||||
/// </summary>
|
||||
public IList<int> Libraries { get; init; }
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using API.DTOs.Metadata;
|
||||
using API.Entities;
|
||||
|
||||
namespace API.DTOs
|
||||
{
|
||||
|
|
12
API/DTOs/Email/ConfirmationEmailDto.cs
Normal file
12
API/DTOs/Email/ConfirmationEmailDto.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
namespace API.DTOs.Email;
|
||||
|
||||
public class ConfirmationEmailDto
|
||||
{
|
||||
public string InvitingUser { get; init; }
|
||||
public string EmailAddress { get; init; }
|
||||
public string ServerConfirmationLink { get; init; }
|
||||
/// <summary>
|
||||
/// InstallId of this Kavita Instance
|
||||
/// </summary>
|
||||
public string InstallId { get; init; }
|
||||
}
|
12
API/DTOs/Email/EmailMigrationDto.cs
Normal file
12
API/DTOs/Email/EmailMigrationDto.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
namespace API.DTOs.Email;
|
||||
|
||||
public class EmailMigrationDto
|
||||
{
|
||||
public string EmailAddress { get; init; }
|
||||
public string Username { get; init; }
|
||||
public string ServerConfirmationLink { get; init; }
|
||||
/// <summary>
|
||||
/// InstallId of this Kavita Instance
|
||||
/// </summary>
|
||||
public string InstallId { get; init; }
|
||||
}
|
10
API/DTOs/Email/EmailTestResultDto.cs
Normal file
10
API/DTOs/Email/EmailTestResultDto.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
namespace API.DTOs.Email;
|
||||
|
||||
/// <summary>
|
||||
/// Represents if Test Email Service URL was successful or not and if any error occured
|
||||
/// </summary>
|
||||
public class EmailTestResultDto
|
||||
{
|
||||
public bool Successful { get; set; }
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
11
API/DTOs/Email/PasswordResetEmailDto.cs
Normal file
11
API/DTOs/Email/PasswordResetEmailDto.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
namespace API.DTOs.Email;
|
||||
|
||||
public class PasswordResetEmailDto
|
||||
{
|
||||
public string EmailAddress { get; init; }
|
||||
public string ServerConfirmationLink { get; init; }
|
||||
/// <summary>
|
||||
/// InstallId of this Kavita Instance
|
||||
/// </summary>
|
||||
public string InstallId { get; init; }
|
||||
}
|
6
API/DTOs/Email/TestEmailDto.cs
Normal file
6
API/DTOs/Email/TestEmailDto.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
namespace API.DTOs.Email;
|
||||
|
||||
public class TestEmailDto
|
||||
{
|
||||
public string Url { get; set; }
|
||||
}
|
|
@ -80,7 +80,7 @@ namespace API.DTOs.Filtering
|
|||
/// <summary>
|
||||
/// Sorting Options for a query. Defaults to null, which uses the queries natural sorting order
|
||||
/// </summary>
|
||||
public SortOptions SortOptions { get; init; } = null;
|
||||
public SortOptions SortOptions { get; set; } = null;
|
||||
/// <summary>
|
||||
/// Age Ratings. Empty list will return everything back
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
|
||||
namespace API.DTOs.Filtering;
|
||||
namespace API.DTOs.Filtering;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the Reading Status. This is a flag and allows multiple statues
|
||||
|
|
32
API/DTOs/GroupedSeriesDto.cs
Normal file
32
API/DTOs/GroupedSeriesDto.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using API.Entities.Enums;
|
||||
|
||||
namespace API.DTOs;
|
||||
/// <summary>
|
||||
/// This is a representation of a Series with some amount of underlying files within it. This is used for Recently Updated Series section
|
||||
/// </summary>
|
||||
public class GroupedSeriesDto
|
||||
{
|
||||
public string SeriesName { get; set; }
|
||||
public int SeriesId { get; set; }
|
||||
public int LibraryId { get; set; }
|
||||
public LibraryType LibraryType { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
/// <summary>
|
||||
/// Chapter Id if this is a chapter. Not guaranteed to be set.
|
||||
/// </summary>
|
||||
public int ChapterId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Volume Id if this is a chapter. Not guaranteed to be set.
|
||||
/// </summary>
|
||||
public int VolumeId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// This is used only on the UI. It is just index of being added.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
public MangaFormat Format { get; set; }
|
||||
/// <summary>
|
||||
/// Number of items that are updated. This provides a sort of grouping when multiple chapters are added per Volume/Series
|
||||
/// </summary>
|
||||
public int Count { get; set; }
|
||||
}
|
|
@ -4,15 +4,16 @@ using System.Collections.Generic;
|
|||
namespace API.DTOs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a member of a Kavita server.
|
||||
/// Represents a member of a Kavita server.
|
||||
/// </summary>
|
||||
public class MemberDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public string Username { get; init; }
|
||||
public string Email { get; init; }
|
||||
public DateTime Created { get; init; }
|
||||
public DateTime LastActive { get; init; }
|
||||
public IEnumerable<LibraryDto> Libraries { get; init; }
|
||||
public IEnumerable<string> Roles { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace API.DTOs
|
||||
namespace API.DTOs.Reader
|
||||
{
|
||||
public class BookChapterItem
|
||||
{
|
||||
|
@ -16,6 +16,6 @@ namespace API.DTOs
|
|||
/// Page Number to load for the chapter
|
||||
/// </summary>
|
||||
public int Page { get; set; }
|
||||
public ICollection<BookChapterItem> Children { get; set; }
|
||||
public ICollection<BookChapterItem> Children { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
34
API/DTOs/RecentlyAddedItemDto.cs
Normal file
34
API/DTOs/RecentlyAddedItemDto.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using API.Entities.Enums;
|
||||
|
||||
namespace API.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// A mesh of data for Recently added volume/chapters
|
||||
/// </summary>
|
||||
public class RecentlyAddedItemDto
|
||||
{
|
||||
public string SeriesName { get; set; }
|
||||
public int SeriesId { get; set; }
|
||||
public int LibraryId { get; set; }
|
||||
public LibraryType LibraryType { get; set; }
|
||||
/// <summary>
|
||||
/// This will automatically map to Volume X, Chapter Y, etc.
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
public DateTime Created { get; set; }
|
||||
/// <summary>
|
||||
/// Chapter Id if this is a chapter. Not guaranteed to be set.
|
||||
/// </summary>
|
||||
public int ChapterId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Volume Id if this is a chapter. Not guaranteed to be set.
|
||||
/// </summary>
|
||||
public int VolumeId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// This is used only on the UI. It is just index of being added.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
public MangaFormat Format { get; set; }
|
||||
|
||||
}
|
|
@ -7,8 +7,9 @@ namespace API.DTOs
|
|||
[Required]
|
||||
public string Username { get; init; }
|
||||
[Required]
|
||||
public string Email { get; init; }
|
||||
[Required]
|
||||
[StringLength(32, MinimumLength = 6)]
|
||||
public string Password { get; set; }
|
||||
public bool IsAdmin { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using API.Entities.Enums;
|
||||
|
||||
namespace API.DTOs
|
||||
namespace API.DTOs.Search
|
||||
{
|
||||
public class SearchResultDto
|
||||
{
|
21
API/DTOs/Search/SearchResultGroupDto.cs
Normal file
21
API/DTOs/Search/SearchResultGroupDto.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.Collections.Generic;
|
||||
using API.DTOs.CollectionTags;
|
||||
using API.DTOs.Metadata;
|
||||
using API.DTOs.ReadingLists;
|
||||
|
||||
namespace API.DTOs.Search;
|
||||
|
||||
/// <summary>
|
||||
/// Represents all Search results for a query
|
||||
/// </summary>
|
||||
public class SearchResultGroupDto
|
||||
{
|
||||
public IEnumerable<LibraryDto> Libraries { get; set; }
|
||||
public IEnumerable<SearchResultDto> Series { get; set; }
|
||||
public IEnumerable<CollectionTagDto> Collections { get; set; }
|
||||
public IEnumerable<ReadingListDto> ReadingLists { get; set; }
|
||||
public IEnumerable<PersonDto> Persons { get; set; }
|
||||
public IEnumerable<GenreTagDto> Genres { get; set; }
|
||||
public IEnumerable<TagDto> Tags { get; set; }
|
||||
|
||||
}
|
|
@ -23,11 +23,6 @@ namespace API.DTOs.Settings
|
|||
/// Enables OPDS connections to be made to the server.
|
||||
/// </summary>
|
||||
public bool EnableOpds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables Authentication on the server. Defaults to true.
|
||||
/// </summary>
|
||||
public bool EnableAuthentication { get; set; }
|
||||
/// <summary>
|
||||
/// Base Url for the kavita. Requires restart to take effect.
|
||||
/// </summary>
|
||||
|
@ -37,5 +32,10 @@ namespace API.DTOs.Settings
|
|||
/// </summary>
|
||||
/// <remarks>If null or empty string, will default back to default install setting aka <see cref="DirectoryService.BookmarkDirectory"/></remarks>
|
||||
public string BookmarksDirectory { get; set; }
|
||||
/// <summary>
|
||||
/// Email service to use for the invite user flow, forgot password, etc.
|
||||
/// </summary>
|
||||
/// <remarks>If null or empty string, will default back to default install setting aka <see cref="EmailService.DefaultApiUrl"/></remarks>
|
||||
public string EmailServiceUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,5 +8,7 @@
|
|||
public string DotnetVersion { get; set; }
|
||||
public string KavitaVersion { get; set; }
|
||||
public int NumOfCores { get; set; }
|
||||
public int NumberOfLibraries { get; set; }
|
||||
public bool HasBookmarks { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ namespace API.DTOs
|
|||
public class UserDto
|
||||
{
|
||||
public string Username { get; init; }
|
||||
public string Email { get; init; }
|
||||
public string Token { get; init; }
|
||||
public string RefreshToken { get; init; }
|
||||
public string ApiKey { get; init; }
|
||||
public UserPreferencesDto Preferences { get; set; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue