diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index fc143675..a0bb2582 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -19,7 +19,7 @@ - Contributors are expected to add themselves to the list at the end of this file. ## Documentation Standards -- **Every** construct (class, interface, struct, record, method, property, etc.) should have documentation. For example: +- **Every** construct (class, interface, struct, record, method, property, etc.) should have documentation. Every production project generates an XML documentation file and treats a missing XML comment on a publicly visible member (CS1591) as an error, so undocumented public API fails the build. For example: ```csharp /// /// Represents a user in the application. @@ -41,7 +41,7 @@ public class User } /// -/// Query for getting a user identified by . +/// Query for getting a user identified by . /// /// The id of the user to get. public record GetUserQuery(int UserId); @@ -68,14 +68,14 @@ public enum ThemeStyle public interface IUserService { /// - /// Gets a user identified by . + /// Gets a user identified by . /// /// The unique identifier of the user. /// The user associated with the specified identifier. User GetUserById(Guid userId); /// - /// Updates the profile of the specified . + /// Updates the profile of the specified . /// /// The user object containing updated information. void UpdateUserProfile(User user); diff --git a/docs/technical/templates/CSharpConventions.md b/docs/technical/templates/CSharpConventions.md index 0786b944..fddac500 100644 --- a/docs/technical/templates/CSharpConventions.md +++ b/docs/technical/templates/CSharpConventions.md @@ -30,7 +30,7 @@ This project enforces many style rules via `.editorconfig` as build errors, so t - **Naming quality**: names must be explicit, even if long. Domain names must match the project's Ubiquitous Language exactly. Lambda parameters must be named descriptively, never single letters or shortened anti-pattern names (no `x`, `e`, `s`, etc). - **Domain nullability**: domain code must never use nullable value types or reference nulls directly, it must use the `Optional` and `Result` types instead. Flag any raw `null`/`?` usage in domain code. - **Comments**: should explain *why*, not *what* (the code already shows what). Wrap only when substantially exceeding a 1920px monitor's width. Flag comments that just restate the code. Comment text is written as a sentence: the first word is capitalized and the sentence ends with a period, in every code file the repository contains (C#, JavaScript, CSS, Razor, HTML, MSBuild/XML, SVG, YAML, Dockerfiles, and the bundled theme archives). Generated files (`*.Designer.cs`, `*ModelSnapshot.cs`, `AssemblyInfo.cs`) and tool configuration files (`.editorconfig`, `.gitignore`) are excluded. Section labels and marker comments follow the same rule, except the `// Arrange`, `// Act` and `// Assert` markers, which are always written bare, without a period. `TODO`, `FIXME`, `HACK`, `XXX` and `NOTE` already provide the capitalized first word, so the body after the colon is written in lowercase, unless it starts with a proper noun or a code identifier. Commented-out code is not prose and is left exactly as written. -- **XML documentation**: required on every public construct, and also on private properties and methods. Use `` for language keywords, not `etc`. Method summaries must not expose internal implementation details, unless truly relevant, in which case put that detail in a `` block instead of the summary. +- **XML documentation**: required on every public construct, and also on private properties and methods. Every production project generates an XML documentation file and treats CS1591 as an error, so an undocumented publicly visible member fails the build; private properties and methods remain a review rule. Use `` for language keywords, not `etc`. Method summaries must not expose internal implementation details, unless truly relevant, in which case put that detail in a `` block instead of the summary. - **``**: avoid on classes implementing interface members. Developers usually work in the implementing class and should see documentation there directly, without having to open the interface. - **Boolean naming**: boolean fields, properties, and methods returning booleans must start with a verb implying true/false: `is`, `are`, `should`, `has`, `was`, `can`, etc. - **Error handling**: rule violations return `Result`. Never throw exceptions unless explicitly justified (e.g. startup/configuration code). Flag any `throw` outside that context. diff --git a/plugins/Directory.Build.props b/plugins/Directory.Build.props new file mode 100644 index 00000000..ff7ed375 --- /dev/null +++ b/plugins/Directory.Build.props @@ -0,0 +1,9 @@ + + + + true + true + $(WarningsAsErrors);CS1591 + $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 + + diff --git a/plugins/Lumina.Plugins.Calibre/Lumina.Plugins.Calibre.csproj b/plugins/Lumina.Plugins.Calibre/Lumina.Plugins.Calibre.csproj index f53969c4..5f26928c 100644 --- a/plugins/Lumina.Plugins.Calibre/Lumina.Plugins.Calibre.csproj +++ b/plugins/Lumina.Plugins.Calibre/Lumina.Plugins.Calibre.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/plugins/Lumina.Plugins.CoverArtArchive/Lumina.Plugins.CoverArtArchive.csproj b/plugins/Lumina.Plugins.CoverArtArchive/Lumina.Plugins.CoverArtArchive.csproj index f9b9e720..5dd3d785 100644 --- a/plugins/Lumina.Plugins.CoverArtArchive/Lumina.Plugins.CoverArtArchive.csproj +++ b/plugins/Lumina.Plugins.CoverArtArchive/Lumina.Plugins.CoverArtArchive.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 true diff --git a/plugins/Lumina.Plugins.Epub/Lumina.Plugins.Epub.csproj b/plugins/Lumina.Plugins.Epub/Lumina.Plugins.Epub.csproj index f53969c4..5f26928c 100644 --- a/plugins/Lumina.Plugins.Epub/Lumina.Plugins.Epub.csproj +++ b/plugins/Lumina.Plugins.Epub/Lumina.Plugins.Epub.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/plugins/Lumina.Plugins.ID3/Lumina.Plugins.ID3.csproj b/plugins/Lumina.Plugins.ID3/Lumina.Plugins.ID3.csproj index 8d4bae2e..92652176 100644 --- a/plugins/Lumina.Plugins.ID3/Lumina.Plugins.ID3.csproj +++ b/plugins/Lumina.Plugins.ID3/Lumina.Plugins.ID3.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 true diff --git a/plugins/Lumina.Plugins.LocalMusicArtwork/Lumina.Plugins.LocalMusicArtwork.csproj b/plugins/Lumina.Plugins.LocalMusicArtwork/Lumina.Plugins.LocalMusicArtwork.csproj index 9b8a88f6..20b1847c 100644 --- a/plugins/Lumina.Plugins.LocalMusicArtwork/Lumina.Plugins.LocalMusicArtwork.csproj +++ b/plugins/Lumina.Plugins.LocalMusicArtwork/Lumina.Plugins.LocalMusicArtwork.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 true diff --git a/plugins/Lumina.Plugins.MusicBrainz/Lumina.Plugins.MusicBrainz.csproj b/plugins/Lumina.Plugins.MusicBrainz/Lumina.Plugins.MusicBrainz.csproj index f9b9e720..5dd3d785 100644 --- a/plugins/Lumina.Plugins.MusicBrainz/Lumina.Plugins.MusicBrainz.csproj +++ b/plugins/Lumina.Plugins.MusicBrainz/Lumina.Plugins.MusicBrainz.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 true diff --git a/plugins/Lumina.Plugins.OpenLibrary/Lumina.Plugins.OpenLibrary.csproj b/plugins/Lumina.Plugins.OpenLibrary/Lumina.Plugins.OpenLibrary.csproj index 5d74e545..b821a9fa 100644 --- a/plugins/Lumina.Plugins.OpenLibrary/Lumina.Plugins.OpenLibrary.csproj +++ b/plugins/Lumina.Plugins.OpenLibrary/Lumina.Plugins.OpenLibrary.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/plugins/Lumina.Plugins.Pdf/Lumina.Plugins.Pdf.csproj b/plugins/Lumina.Plugins.Pdf/Lumina.Plugins.Pdf.csproj index de4aec64..48744e31 100644 --- a/plugins/Lumina.Plugins.Pdf/Lumina.Plugins.Pdf.csproj +++ b/plugins/Lumina.Plugins.Pdf/Lumina.Plugins.Pdf.csproj @@ -5,9 +5,6 @@ enable $(SolutionDir)..\bin\plugins\ false - true - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 true diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..bf383816 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,9 @@ + + + + true + true + $(WarningsAsErrors);CS1591 + $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 + + diff --git a/src/Lumina.Application/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntity.cs b/src/Lumina.Application/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntity.cs index 39b29f1b..05cd770f 100644 --- a/src/Lumina.Application/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntity.cs +++ b/src/Lumina.Application/Common/DataAccess/Entities/MediaLibrary/WrittenContentLibrary/BookLibrary/BookEntity.cs @@ -142,9 +142,9 @@ public class BookEntity : IStorageEntity, IAuditableEntity /// public float? VolumeNumber { get; set; } // TODO: uncomment when series is implemented. - /// - /// Gets or sets the series id, if the book is part of a series. - /// + ///// + ///// Gets or sets the series id, if the book is part of a series. + ///// //public Guid? BookSeriesId { get; set; } /// @@ -183,7 +183,7 @@ public class BookEntity : IStorageEntity, IAuditableEntity public string? GoogleBooksId { get; set; } /// - /// Gets or sets the Barnes & Noble ID of the book. + /// Gets or sets the Barnes & Noble ID of the book. /// public string? BarnesAndNobleId { get; set; } diff --git a/src/Lumina.Application/Common/DataAccess/Repositories/MediaLibrary/ILibraryScanRepository.cs b/src/Lumina.Application/Common/DataAccess/Repositories/MediaLibrary/ILibraryScanRepository.cs index 90d65fed..5ddaa720 100644 --- a/src/Lumina.Application/Common/DataAccess/Repositories/MediaLibrary/ILibraryScanRepository.cs +++ b/src/Lumina.Application/Common/DataAccess/Repositories/MediaLibrary/ILibraryScanRepository.cs @@ -23,6 +23,7 @@ public interface ILibraryScanRepository : IRepository, /// /// Gets the media library scans that belong to a media library identified by , for the previous month, from the storage medium. /// + /// The unique identifier of the media library whose scans are retrieved. /// Cancellation token that can be used to stop the execution. /// An containing either a collection of , or an error. Task>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken); diff --git a/src/Lumina.Application/Common/Errors/Errors.Authentication.cs b/src/Lumina.Application/Common/Errors/Errors.Authentication.cs index df71803f..a599a9b1 100644 --- a/src/Lumina.Application/Common/Errors/Errors.Authentication.cs +++ b/src/Lumina.Application/Common/Errors/Errors.Authentication.cs @@ -9,25 +9,99 @@ namespace Lumina.Application.Common.Errors; /// public static partial class Errors { + /// + /// Error types for application authentication operations. + /// public static class Authentication { + /// + /// Gets the error that reports that a username already exists. + /// public static Error UsernameAlreadyExists => Error.Conflict(description: nameof(UsernameAlreadyExists)); + + /// + /// Gets the error that reports that a username does not exist. + /// public static Error UsernameDoesNotExist => Error.NotFound(description: nameof(UsernameDoesNotExist)); + + /// + /// Gets the error that reports that a username cannot be empty. + /// public static Error UsernameCannotBeEmpty => Error.Validation(description: nameof(UsernameCannotBeEmpty)); + + /// + /// Gets the error that reports that a time-based one-time password cannot be empty. + /// public static Error TotpCannotBeEmpty => Error.Validation(description: nameof(TotpCannotBeEmpty)); + + /// + /// Gets the error that reports that a password cannot be empty. + /// public static Error PasswordCannotBeEmpty => Error.Validation(description: nameof(PasswordCannotBeEmpty)); + + /// + /// Gets the error that reports that a new password cannot be empty. + /// public static Error NewPasswordCannotBeEmpty => Error.Validation(description: nameof(NewPasswordCannotBeEmpty)); + + /// + /// Gets the error that reports that a current password cannot be empty. + /// public static Error CurrentPasswordCannotBeEmpty => Error.Validation(description: nameof(CurrentPasswordCannotBeEmpty)); + + /// + /// Gets the error that reports that a password confirmation cannot be empty. + /// public static Error PasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(PasswordConfirmCannotBeEmpty)); + + /// + /// Gets the error that reports that a new password confirmation cannot be empty. + /// public static Error NewPasswordConfirmCannotBeEmpty => Error.Validation(description: nameof(NewPasswordConfirmCannotBeEmpty)); + + /// + /// Gets the error that reports that a password is invalid. + /// public static Error InvalidPassword => Error.Validation(description: nameof(InvalidPassword)); + + /// + /// Gets the error that reports that a username must be between 3 and 255 characters long. + /// public static Error UsernameMustBeBetween3And255CharactersLong => Error.Validation(description: nameof(UsernameMustBeBetween3And255CharactersLong)); + + /// + /// Gets the error that reports that a username is invalid. + /// public static Error InvalidUsername => Error.Validation(description: nameof(InvalidUsername)); + + /// + /// Gets the error that reports that a password and its confirmation do not match. + /// public static Error PasswordsNotMatch => Error.Validation(description: nameof(PasswordsNotMatch)); + + /// + /// Gets the error that reports that a time-based one-time password code is invalid. + /// public static Error InvalidTotpCode => Error.Validation(description: nameof(InvalidTotpCode)); + + /// + /// Gets the error that reports that the combination of a username and a password is invalid. + /// public static Error InvalidUsernameOrPassword => Error.Failure(description: nameof(InvalidUsernameOrPassword)); + + /// + /// Gets the error that reports that a current password is invalid. + /// public static Error InvalidCurrentPassword => Error.Failure(description: nameof(InvalidCurrentPassword)); + + /// + /// Gets the error that reports that a temporary password has expired. + /// public static Error TempPasswordExpired => Error.Failure(description: nameof(TempPasswordExpired)); + + /// + /// Gets the error that reports that a password reset has already been requested. + /// public static Error PasswordResetAlreadyRequested => Error.Failure(description: nameof(PasswordResetAlreadyRequested)); } } diff --git a/src/Lumina.Application/Common/Errors/Errors.Authorization.cs b/src/Lumina.Application/Common/Errors/Errors.Authorization.cs index 1edb0511..7a26f75b 100644 --- a/src/Lumina.Application/Common/Errors/Errors.Authorization.cs +++ b/src/Lumina.Application/Common/Errors/Errors.Authorization.cs @@ -9,24 +9,94 @@ namespace Lumina.Application.Common.Errors; /// public static partial class Errors { + /// + /// Error types for application authorization operations. + /// public static class Authorization { + /// + /// Gets the error that reports that the caller is not authorized to perform the operation. + /// public static Error NotAuthorized => Error.Unauthorized(description: nameof(NotAuthorized)); + + /// + /// Gets the error that reports that the administrator account has already been created. + /// public static Error AdminAccountAlreadyCreated => Error.Conflict(description: nameof(AdminAccountAlreadyCreated)); + + /// + /// Gets the error that reports that the administrator account does not exist. + /// public static Error AdminAccountNotFound => Error.NotFound(description: nameof(AdminAccountNotFound)); + + /// + /// Gets the error that reports that the administrator role does not exist. + /// public static Error AdminRoleNotFound => Error.NotFound(description: nameof(AdminRoleNotFound)); + + /// + /// Gets the error that reports that the administrator role cannot be deleted. + /// public static Error AdminRoleCannotBeDeleted => Error.Forbidden(description: nameof(AdminRoleCannotBeDeleted)); + + /// + /// Gets the error that reports that a role does not exist. + /// public static Error RoleNotFound => Error.NotFound(description: nameof(RoleNotFound)); + + /// + /// Gets the error that reports that a permission does not exist. + /// public static Error PermissionNotFound => Error.NotFound(description: nameof(PermissionNotFound)); + + /// + /// Gets the error that reports that a permission already exists. + /// public static Error PermissionAlreadyExists => Error.Conflict(description: nameof(PermissionAlreadyExists)); + + /// + /// Gets the error that reports that a role already exists. + /// public static Error RoleAlreadyExists => Error.Conflict(description: nameof(RoleAlreadyExists)); + + /// + /// Gets the error that reports that a role identifier cannot be empty. + /// public static Error RoleIdCannotBeEmpty => Error.Validation(description: nameof(RoleIdCannotBeEmpty)); + + /// + /// Gets the error that reports that a permissions list cannot be . + /// public static Error PermissionsListCannotBeNull => Error.Validation(description: nameof(PermissionsListCannotBeNull)); + + /// + /// Gets the error that reports that a permissions list cannot be empty. + /// public static Error PermissionsListCannotBeEmpty => Error.Validation(description: nameof(PermissionsListCannotBeEmpty)); + + /// + /// Gets the error that reports that a permission identifier cannot be empty. + /// public static Error PermissionIdCannotBeEmpty => Error.Validation(description: nameof(PermissionIdCannotBeEmpty)); + + /// + /// Gets the error that reports that a role name cannot be empty. + /// public static Error RoleNameCannotBeEmpty => Error.Validation(description: nameof(RoleNameCannotBeEmpty)); + + /// + /// Gets the error that reports that a role name cannot be . + /// public static Error RoleNameCannotBeNull => Error.Validation(description: nameof(RoleNameCannotBeNull)); + + /// + /// Gets the error that reports that the last administrator account cannot be removed. + /// public static Error CannotRemoveLastAdmin => Error.Forbidden(description: nameof(CannotRemoveLastAdmin)); + + /// + /// Gets the error that reports that a user must have a role or direct permissions. + /// public static Error UserMustHaveRoleOrDirectPermissions => Error.Forbidden(description: nameof(UserMustHaveRoleOrDirectPermissions)); } } diff --git a/src/Lumina.Application/Common/Errors/Errors.Persistence.cs b/src/Lumina.Application/Common/Errors/Errors.Persistence.cs index 6d58d1cd..8034836e 100644 --- a/src/Lumina.Application/Common/Errors/Errors.Persistence.cs +++ b/src/Lumina.Application/Common/Errors/Errors.Persistence.cs @@ -9,11 +9,29 @@ namespace Lumina.Application.Common.Errors; /// public static partial class Errors { + /// + /// Error types for application persistence operations. + /// public static class Persistence { + /// + /// Gets the error that reports that a media library could not be persisted. + /// public static Error ErrorPersistingMediaLibrary => Error.Failure(description: nameof(ErrorPersistingMediaLibrary)); + + /// + /// Gets the error that reports that an authorization role could not be persisted. + /// public static Error ErrorPersistingAuthorizationRole => Error.Failure(description: nameof(ErrorPersistingAuthorizationRole)); + + /// + /// Gets the error that reports that a unique constraint was violated. + /// public static Error UniqueConstraintViolation => Error.Conflict(description: nameof(UniqueConstraintViolation)); + + /// + /// Gets the error that reports that a concurrency conflict occurred while persisting changes. + /// public static Error ConcurrencyConflict => Error.Conflict(description: nameof(ConcurrencyConflict)); } } diff --git a/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/MediaSettingsDto.cs b/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/MediaSettingsDto.cs index 67fa84a6..d5add9f1 100644 --- a/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/MediaSettingsDto.cs +++ b/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/MediaSettingsDto.cs @@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class MediaSettingsDto { + /// + /// The name of the configuration section that holds the media settings. + /// public const string SECTION_NAME = "MediaSettings"; /// diff --git a/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/PluginsSettingsDto.cs b/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/PluginsSettingsDto.cs index b8baeafc..5e2c00d1 100644 --- a/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/PluginsSettingsDto.cs +++ b/src/Lumina.Application/Common/Infrastructure/Models/DTO/Configuration/PluginsSettingsDto.cs @@ -10,6 +10,9 @@ namespace Lumina.Application.Common.Infrastructure.Models.DTO.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class PluginsSettingsDto { + /// + /// The name of the configuration section that holds the plugins settings. + /// public const string SECTION_NAME = "PluginsSettings"; /// diff --git a/src/Lumina.Application/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMapping.cs b/src/Lumina.Application/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMapping.cs index 52535ce1..b88ee45f 100644 --- a/src/Lumina.Application/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMapping.cs +++ b/src/Lumina.Application/Common/Mapping/FileSystemManagement/FileSystem/FileSystemItemMapping.cs @@ -54,7 +54,7 @@ public static class FileSystemItemMapping } /// - /// Converts to . + /// Converts to a collection of . /// /// The domain entities to be converted. /// The converted entities. diff --git a/src/Lumina.Application/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMapping.cs b/src/Lumina.Application/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMapping.cs index 05490543..c2f2a19b 100644 --- a/src/Lumina.Application/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMapping.cs +++ b/src/Lumina.Application/Common/Mapping/FileSystemManagement/Files/GetTreeFilesRequestMapping.cs @@ -11,7 +11,7 @@ namespace Lumina.Application.Common.Mapping.FileSystemManagement.Files; public static class GetTreeFilesRequestMapping { /// - /// Converts to . + /// Converts to . /// /// The request to be converted. /// The converted query. diff --git a/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs b/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs index 27bc9a0e..e1bacf87 100644 --- a/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs +++ b/src/Lumina.Application/Common/Utilities/ValidatorUtilities.cs @@ -346,7 +346,7 @@ public static class ValidatorUtilities /// /// /// If the property is or not a string, this rule fails (use - /// to skip optional properties). + /// When to skip optional properties). /// /// The type of the request being validated. /// The type of the property being validated. diff --git a/src/Lumina.Application/Core/MediaConsumption/Queries/GetResumePoint/GetResumePointQueryHandler.cs b/src/Lumina.Application/Core/MediaConsumption/Queries/GetResumePoint/GetResumePointQueryHandler.cs index 058cd5b4..35c9ccd1 100644 --- a/src/Lumina.Application/Core/MediaConsumption/Queries/GetResumePoint/GetResumePointQueryHandler.cs +++ b/src/Lumina.Application/Core/MediaConsumption/Queries/GetResumePoint/GetResumePointQueryHandler.cs @@ -165,7 +165,7 @@ public class GetResumePointQueryHandler : IQueryHandler /// - /// The request transaction is committed by only when the response is a success, and this query intentionally + /// The request transaction is committed by the EventualConsistencyMiddleware only when the response is a success, and this query intentionally /// responds with a not-found error after it cleans up, so the deletion is committed here. A failed save has nothing to persist, and a concurrency /// conflict means that the row is already gone, which is the desired outcome. Committing when no transaction is open is a no-op, which keeps the handler usable outside of the HTTP pipeline. /// diff --git a/src/Lumina.Application/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/PlaybackDeliveryId.cs b/src/Lumina.Application/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/PlaybackDeliveryId.cs index 655ad28d..2365f221 100644 --- a/src/Lumina.Application/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/PlaybackDeliveryId.cs +++ b/src/Lumina.Application/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/PlaybackDeliveryId.cs @@ -4,7 +4,7 @@ namespace Lumina.Application.Core.MediaLibrary.AudioLibrary.MusicLibrary.Playbac /// Defines the format of the opaque delivery handle of a playback manifest. /// /// -/// A handle is a rendered with the N format: exactly 32 lowercase hexadecimal characters, with no separator. Every producer +/// A handle is a rendered with the N format: exactly 32 lowercase hexadecimal characters, with no separator. Every producer /// and consumer of a handle uses this rule, so a handle is never silently normalized into another value. /// public static class PlaybackDeliveryId diff --git a/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/AddBook/AddBookCommand.cs b/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/AddBook/AddBookCommand.cs index 365d765c..4f193230 100644 --- a/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/AddBook/AddBookCommand.cs +++ b/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/AddBook/AddBookCommand.cs @@ -28,7 +28,7 @@ namespace Lumina.Application.Core.MediaLibrary.WrittenContentLibrary.BookLibrary /// The Open Library ID of the book, if applicable. /// The LibraryThing ID of the book, if applicable. /// The Google Books ID of the book, if applicable. -/// The Barnes & Noble ID of the book, if applicable. +/// The Barnes & Noble ID of the book, if applicable. /// The Apple Books ID of the book, if applicable. /// The list of ISBN (International Standard Book Number) of the book. /// The list of media contributors that contributed to this book. diff --git a/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/UpdateBook/UpdateBookCommand.cs b/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/UpdateBook/UpdateBookCommand.cs index 459f4159..1b4f8982 100644 --- a/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/UpdateBook/UpdateBookCommand.cs +++ b/src/Lumina.Application/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/Commands/UpdateBook/UpdateBookCommand.cs @@ -28,7 +28,7 @@ namespace Lumina.Application.Core.MediaLibrary.WrittenContentLibrary.BookLibrary /// The Open Library ID of the book, if applicable. /// The LibraryThing ID of the book, if applicable. /// The Google Books ID of the book, if applicable. -/// The Barnes & Noble ID of the book, if applicable. +/// The Barnes & Noble ID of the book, if applicable. /// The Apple Books ID of the book, if applicable. /// The list of ISBN (International Standard Book Number) of the book. /// The list of media contributors that contributed to this book. diff --git a/src/Lumina.Application/Lumina.Application.csproj b/src/Lumina.Application/Lumina.Application.csproj index 82ad1e4f..21546f33 100644 --- a/src/Lumina.Application/Lumina.Application.csproj +++ b/src/Lumina.Application/Lumina.Application.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Contracts/DTO/MediaLibrary/Management/LibraryContentLocationDto.cs b/src/Lumina.Contracts/DTO/MediaLibrary/Management/LibraryContentLocationDto.cs index 1caace4c..93704cf9 100644 --- a/src/Lumina.Contracts/DTO/MediaLibrary/Management/LibraryContentLocationDto.cs +++ b/src/Lumina.Contracts/DTO/MediaLibrary/Management/LibraryContentLocationDto.cs @@ -7,6 +7,7 @@ namespace Lumina.Contracts.DTO.MediaLibrary.Management; /// /// Data transfer object for a media library content location. /// +/// The file system path of the content location. [DebuggerDisplay("Path: {Path}")] public record LibraryContentLocationDto( string Path diff --git a/src/Lumina.Contracts/Lumina.Contracts.csproj b/src/Lumina.Contracts/Lumina.Contracts.csproj index 7c054dd5..9f426f05 100644 --- a/src/Lumina.Contracts/Lumina.Contracts.csproj +++ b/src/Lumina.Contracts/Lumina.Contracts.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequest.cs b/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequest.cs index 0de7c352..a1663227 100644 --- a/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequest.cs +++ b/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/AddBookRequest.cs @@ -26,7 +26,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra /// The Open Library Id of the book. Optional. /// The LibraryThing Id of the book. Optional. /// The Google Books Id of the book. Optional. -/// The Barnes & Noble Id of the book. Optional. +/// The Barnes & Noble Id of the book. Optional. /// The Apple Books Id of the book. Optional. /// The list of ISBN (International Standard Book Number) of the book. Required. /// The list of media contributors of the book. Required. diff --git a/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/UpdateBookRequest.cs b/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/UpdateBookRequest.cs index 4abc5ed9..a05d6903 100644 --- a/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/UpdateBookRequest.cs +++ b/src/Lumina.Contracts/Requests/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/UpdateBookRequest.cs @@ -24,7 +24,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.WrittenContentLibrary.BookLibra /// The Open Library Id of the book. Optional. /// The LibraryThing Id of the book. Optional. /// The Google Books Id of the book. Optional. -/// The Barnes & Noble Id of the book. Optional. +/// The Barnes & Noble Id of the book. Optional. /// The Apple Books Id of the book. Optional. /// The list of ISBN (International Standard Book Number) of the book. Required. /// The list of media contributors of the book. Required. diff --git a/src/Lumina.Contracts/Responses/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookResponse.cs b/src/Lumina.Contracts/Responses/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookResponse.cs index b8111399..31998897 100644 --- a/src/Lumina.Contracts/Responses/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookResponse.cs +++ b/src/Lumina.Contracts/Responses/MediaLibrary/WrittenContentLibrary/BookLibrary/Books/BookResponse.cs @@ -29,7 +29,7 @@ namespace Lumina.Contracts.Responses.MediaLibrary.WrittenContentLibrary.BookLibr /// The Open Library ID of the book, if applicable. /// The LibraryThing ID of the book, if applicable. /// The Google Books ID of the book, if applicable. -/// The Barnes & Noble ID of the book, if applicable. +/// The Barnes & Noble ID of the book, if applicable. /// The Apple Books ID of the book, if applicable. /// The list of ISBN (International Standard Book Number) of the book. /// The list of references to the media contributors that contributed to this book, each with the role they played. diff --git a/src/Lumina.Contracts/Responses/UsersManagement/InitializationResponse.cs b/src/Lumina.Contracts/Responses/UsersManagement/InitializationResponse.cs index d837321d..e697109c 100644 --- a/src/Lumina.Contracts/Responses/UsersManagement/InitializationResponse.cs +++ b/src/Lumina.Contracts/Responses/UsersManagement/InitializationResponse.cs @@ -4,7 +4,7 @@ using System.Diagnostics; namespace Lumina.Contracts.Responses.UsersManagement; -/// +/// /// Represents a response for verifying the initialization status of the application. /// /// Indicates whether the application has been run before, and the super admin account has been created. diff --git a/src/Lumina.DataAccess/Common/Dapper/SqliteGuidTypeHandler.cs b/src/Lumina.DataAccess/Common/Dapper/SqliteGuidTypeHandler.cs index 097367c8..5913a2e8 100644 --- a/src/Lumina.DataAccess/Common/Dapper/SqliteGuidTypeHandler.cs +++ b/src/Lumina.DataAccess/Common/Dapper/SqliteGuidTypeHandler.cs @@ -11,7 +11,7 @@ namespace Lumina.DataAccess.Common.Dapper; /// /// /// The SQLite provider stores columns as upper case TEXT. Dapper falls back to Convert.ChangeType when materializing -/// such columns into properties. has no string , so that conversion +/// such columns into properties. has no string , so that conversion /// throws an ; this handler performs the conversion explicitly instead, and writes the same upper case /// representation so raw key comparisons and foreign keys match the rows created by Entity Framework. /// diff --git a/src/Lumina.DataAccess/Core/Repositories/Authorization/RoleRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Authorization/RoleRepository.cs index 83941416..f7d03959 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Authorization/RoleRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Authorization/RoleRepository.cs @@ -124,6 +124,8 @@ internal sealed class RoleRepository : IRoleRepository /// Gets a identified by from the storage medium. /// /// The id of the authorization role to get. + /// Whether the navigation properties of the role should be loaded together with the role itself. + /// Whether the retrieved role should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/BookLibrary/BookRepository.cs b/src/Lumina.DataAccess/Core/Repositories/BookLibrary/BookRepository.cs index a1d8ce5c..2b87b384 100644 --- a/src/Lumina.DataAccess/Core/Repositories/BookLibrary/BookRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/BookLibrary/BookRepository.cs @@ -88,6 +88,8 @@ internal sealed class BookRepository : IBookRepository /// Gets a book by its Id. /// /// The Id of the book to get. + /// Whether the navigation properties of the book should be loaded together with the book itself. + /// Whether the retrieved book should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryRepository.cs index 9636335c..430baf80 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryRepository.cs @@ -54,6 +54,8 @@ internal sealed class LibraryRepository : ILibraryRepository /// Gets a identified by from the storage medium. /// /// The Id of the library to get. + /// Whether the navigation properties of the library should be loaded together with the library itself. + /// Whether the retrieved library should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryScanRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryScanRepository.cs index 4b031477..6d95051a 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryScanRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Libraries/LibraryScanRepository.cs @@ -53,6 +53,8 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository /// Gets a identified by from the storage medium. /// /// The id of the library scan to get. + /// Whether the navigation properties of the library scan should be loaded together with the library scan itself. + /// Whether the retrieved library scan should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) @@ -71,6 +73,7 @@ internal sealed class LibraryScanRepository : ILibraryScanRepository /// /// Gets the media library scans that belong to a media library identified by , for the previous month, from the storage medium. /// + /// The Id of the media library whose scans are retrieved. /// Cancellation token that can be used to stop the execution. /// An containing either a collection of , or an error. public async Task>> GetPastMonthScansByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken) diff --git a/src/Lumina.DataAccess/Core/Repositories/Plugins/PluginRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Plugins/PluginRepository.cs index 7d3d7b4c..18a38475 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Plugins/PluginRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Plugins/PluginRepository.cs @@ -37,6 +37,8 @@ internal sealed class PluginRepository : IPluginRepository /// Gets a plugin by its Id. /// /// The Id of the plugin to get. + /// Whether the navigation properties of the plugin should be loaded together with the plugin itself. + /// Whether the retrieved plugin should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobExecutionRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobExecutionRepository.cs index ae14ea56..2545126b 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobExecutionRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobExecutionRepository.cs @@ -35,6 +35,8 @@ internal sealed class ScheduledJobExecutionRepository : IScheduledJobExecutionRe /// Gets an execution identified by from the storage medium. /// /// The id of the execution to get. + /// Whether the navigation properties of the execution should be loaded together with the execution itself. + /// Whether the retrieved execution should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobRepository.cs index 60f7ec50..05b6f644 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Scheduling/ScheduledJobRepository.cs @@ -39,6 +39,8 @@ internal sealed class ScheduledJobRepository : IScheduledJobRepository /// Gets a scheduled job identified by from the storage medium. /// /// The id of the scheduled job to get. + /// Whether the navigation properties of the scheduled job should be loaded together with the scheduled job itself. + /// Whether the retrieved scheduled job should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Users/UserRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Users/UserRepository.cs index 2ee42ed7..eb8c497d 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Users/UserRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Users/UserRepository.cs @@ -180,6 +180,8 @@ internal sealed class UserRepository : IUserRepository /// Gets a identified by from the storage medium. /// /// The id of the user to get. + /// Whether the navigation properties of the user should be loaded together with the user itself. + /// Whether the retrieved user should be tracked by the persistence medium, so that changes to it can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either a identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Repositories/Users/UserSettingsRepository.cs b/src/Lumina.DataAccess/Core/Repositories/Users/UserSettingsRepository.cs index b540ce1c..6d266604 100644 --- a/src/Lumina.DataAccess/Core/Repositories/Users/UserSettingsRepository.cs +++ b/src/Lumina.DataAccess/Core/Repositories/Users/UserSettingsRepository.cs @@ -50,6 +50,8 @@ internal sealed class UserSettingsRepository : IUserSettingsRepository /// Gets the settings identified by , if they exist. /// /// The Id of the user settings to get. + /// Whether the navigation properties of the user settings should be loaded together with the user settings themselves. + /// Whether the retrieved user settings should be tracked by the persistence medium, so that changes to them can be saved. /// Cancellation token that can be used to stop the execution. /// An containing either the identified by , or an error. public async Task> GetByIdAsync(Guid id, bool shouldIncludeNavigationProperties = true, bool shouldTrackEntities = true, CancellationToken cancellationToken = default) diff --git a/src/Lumina.DataAccess/Core/Seed/DataSeedService.cs b/src/Lumina.DataAccess/Core/Seed/DataSeedService.cs index 974698bf..8a2c29f6 100644 --- a/src/Lumina.DataAccess/Core/Seed/DataSeedService.cs +++ b/src/Lumina.DataAccess/Core/Seed/DataSeedService.cs @@ -30,7 +30,7 @@ public class DataSeedService : IDataSeedService /// /// Initializes a new instance of the class. /// - /// Injected unit of work for interacting with the data access layer repositories.Injected unit of work for interacting with the data access layer repositories. /// Injected service for time related concerns. public DataSeedService(IUnitOfWork unitOfWork, IDateTimeProvider dateTimeProvider) { diff --git a/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs b/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs index 110d10d0..8ae80df5 100644 --- a/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs +++ b/src/Lumina.DataAccess/Core/UoW/LuminaDbContext.cs @@ -23,39 +23,174 @@ namespace Lumina.DataAccess.Core.UoW; /// To update the database: update-database -p Lumina.DataAccess -s Lumina.Presentation.Api public class LuminaDbContext : DbContext { + /// + /// Gets or sets the books stored in the database. + /// public virtual DbSet Books { get; set; } = null!; + + /// + /// Gets or sets the artists stored in the database. + /// public virtual DbSet Artists { get; set; } = null!; + + /// + /// Gets or sets the albums stored in the database. + /// public virtual DbSet Albums { get; set; } = null!; + + /// + /// Gets or sets the tracks stored in the database. + /// public virtual DbSet Tracks { get; set; } = null!; + + /// + /// Gets or sets the artwork of the music library items stored in the database. + /// public virtual DbSet MusicArtwork { get; set; } = null!; + + /// + /// Gets or sets the metadata extracted from the music files discovered during a scan, stored in the database. + /// public virtual DbSet MusicLibraryScanItemMetadata { get; set; } = null!; + + /// + /// Gets or sets the users stored in the database. + /// public virtual DbSet Users { get; set; } = null!; + + /// + /// Gets or sets the settings of the users stored in the database. + /// public virtual DbSet UserSettings { get; set; } = null!; + + /// + /// Gets or sets the media libraries stored in the database. + /// public virtual DbSet Libraries { get; set; } = null!; + + /// + /// Gets or sets the scans of the media libraries stored in the database. + /// public virtual DbSet LibraryScans { get; set; } = null!; + + /// + /// Gets or sets the results of the media library scans stored in the database. + /// public virtual DbSet LibraryScanResults { get; set; } = null!; + + /// + /// Gets or sets the snapshots of the media library items produced by the scans, stored in the database. + /// public virtual DbSet LibraryScanSnapshots { get; set; } = null!; + + /// + /// Gets or sets the staging results of the media library scans, holding the discovered file system items, stored in the database. + /// public virtual DbSet LibraryScanStagingResults { get; set; } = null!; + + /// + /// Gets or sets the fingerprints of the scanned directories, holding their last write time, stored in the database. + /// public virtual DbSet DirectoryScanFingerprints { get; set; } = null!; + + /// + /// Gets or sets the authorization roles stored in the database. + /// public virtual DbSet Roles { get; set; } = null!; + + /// + /// Gets or sets the associations between users and roles stored in the database. + /// public virtual DbSet UserRoles { get; set; } = null!; + + /// + /// Gets or sets the authorization permissions stored in the database. + /// public virtual DbSet Permissions { get; set; } = null!; + + /// + /// Gets or sets the associations between users and permissions stored in the database. + /// public virtual DbSet UserPermissions { get; set; } = null!; + + /// + /// Gets or sets the associations between roles and permissions stored in the database. + /// public virtual DbSet RolePermissions { get; set; } = null!; + + /// + /// Gets or sets the plugins stored in the database. + /// public virtual DbSet Plugins { get; set; } = null!; + + /// + /// Gets or sets the metadata provider configurations of the media libraries stored in the database. + /// public virtual DbSet LibraryMetadataProviderConfigurations { get; set; } = null!; + + /// + /// Gets or sets the artwork provider configurations of the media libraries stored in the database. + /// public virtual DbSet LibraryArtworkProviderConfigurations { get; set; } = null!; + + /// + /// Gets or sets the book reader configurations of the media libraries stored in the database. + /// public virtual DbSet LibraryBookReaderConfigurations { get; set; } = null!; + + /// + /// Gets or sets the themes stored in the database. + /// public virtual DbSet Themes { get; set; } = null!; + + /// + /// Gets or sets the media contributors stored in the database. + /// public virtual DbSet MediaContributors { get; set; } = null!; + + /// + /// Gets or sets the participations of the media contributors in books stored in the database. + /// public virtual DbSet BookContributors { get; set; } = null!; + + /// + /// Gets or sets the scheduled jobs stored in the database. + /// public virtual DbSet ScheduledJobs { get; set; } = null!; + + /// + /// Gets or sets the executions of the scheduled jobs stored in the database. + /// public virtual DbSet ScheduledJobExecutions { get; set; } = null!; + + /// + /// Gets or sets the display preferences of the scheduler page of the users stored in the database. + /// public virtual DbSet SchedulerDisplayPreferences { get; set; } = null!; + + /// + /// Gets or sets the playlists stored in the database. + /// public virtual DbSet Playlists { get; set; } = null!; + + /// + /// Gets or sets the entries of the playlists stored in the database. + /// public virtual DbSet PlaylistEntries { get; set; } = null!; + + /// + /// Gets or sets the favorites stored in the database. + /// public virtual DbSet Favorites { get; set; } = null!; + + /// + /// Gets or sets the media consumption records stored in the database. + /// public virtual DbSet MediaConsumptionRecords { get; set; } = null!; + + /// + /// Gets or sets the media resume points stored in the database. + /// public virtual DbSet MediaResumePoints { get; set; } = null!; /// diff --git a/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs b/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs index dfa06347..fd24c8c5 100644 --- a/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs +++ b/src/Lumina.DataAccess/Core/UoW/UnitOfWork.cs @@ -198,6 +198,9 @@ public class UnitOfWork : IUnitOfWork, IDisposable } } + /// + /// Gets the media contributor repository. + /// public IMediaContributorRepository MediaContributorRepository { get diff --git a/src/Lumina.DataAccess/Lumina.DataAccess.csproj b/src/Lumina.DataAccess/Lumina.DataAccess.csproj index d461fe99..7554c5c8 100644 --- a/src/Lumina.DataAccess/Lumina.DataAccess.csproj +++ b/src/Lumina.DataAccess/Lumina.DataAccess.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Domain.SharedKernel/Common/Enums/Authorization/AuthorizationPermission.cs b/src/Lumina.Domain.SharedKernel/Common/Enums/Authorization/AuthorizationPermission.cs index b1ea35f0..fd04e2b9 100644 --- a/src/Lumina.Domain.SharedKernel/Common/Enums/Authorization/AuthorizationPermission.cs +++ b/src/Lumina.Domain.SharedKernel/Common/Enums/Authorization/AuthorizationPermission.cs @@ -5,9 +5,28 @@ namespace Lumina.Domain.SharedKernel.Common.Enums.Authorization; /// public enum AuthorizationPermission { + /// + /// No permission is granted. + /// None = 0, + + /// + /// Permission to view the existing users. + /// CanViewUsers, + + /// + /// Permission to delete the existing users. + /// CanDeleteUsers, + + /// + /// Permission to register new users. + /// CanRegisterUsers, + + /// + /// Permission to create and manage media libraries. + /// CanCreateLibraries } diff --git a/src/Lumina.Domain.SharedKernel/Common/Enums/MediaLibrary/LibraryType.cs b/src/Lumina.Domain.SharedKernel/Common/Enums/MediaLibrary/LibraryType.cs index f42225b6..6ea8ac97 100644 --- a/src/Lumina.Domain.SharedKernel/Common/Enums/MediaLibrary/LibraryType.cs +++ b/src/Lumina.Domain.SharedKernel/Common/Enums/MediaLibrary/LibraryType.cs @@ -101,7 +101,7 @@ public enum LibraryType LiveRecordingVideo, /// - /// Recorded conversations and Q&A sessions in video format. + /// Recorded conversations and Q&A sessions in video format. /// InterviewVideo, @@ -131,7 +131,7 @@ public enum LibraryType LiveRecordingAudio, /// - /// Recorded conversations and Q&A sessions in audio format. + /// Recorded conversations and Q&A sessions in audio format. /// InterviewAudio, diff --git a/src/Lumina.Domain.SharedKernel/Lumina.Domain.SharedKernel.csproj b/src/Lumina.Domain.SharedKernel/Lumina.Domain.SharedKernel.csproj index 0c1b73ae..5203e19b 100644 --- a/src/Lumina.Domain.SharedKernel/Lumina.Domain.SharedKernel.csproj +++ b/src/Lumina.Domain.SharedKernel/Lumina.Domain.SharedKernel.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Domain/Common/Errors/Errors.Favorite.cs b/src/Lumina.Domain/Common/Errors/Errors.Favorite.cs index 9d40ee8e..a60dc8d3 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Favorite.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Favorite.cs @@ -9,14 +9,44 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report favorite rule violations and missing favorites. + /// public static class Favorites { + /// + /// Gets the error that reports that the requested favorite was not found. + /// public static Error FavoriteNotFound => Error.NotFound(description: nameof(FavoriteNotFound)); + + /// + /// Gets the error that reports that the user already has the media item in favorites. + /// public static Error FavoriteAlreadyExists => Error.Conflict(description: nameof(FavoriteAlreadyExists)); + + /// + /// Gets the error that reports that the favorite media kind is not a defined value. + /// public static Error FavoriteMediaKindIsInvalid => Error.Validation(description: nameof(FavoriteMediaKindIsInvalid)); + + /// + /// Gets the error that reports that the media kind cannot be favorited because no library provides it yet. + /// public static Error FavoriteMediaKindIsNotSupported => Error.Validation(description: nameof(FavoriteMediaKindIsNotSupported)); + + /// + /// Gets the error that reports that the media item identifier of the favorite cannot be empty. + /// public static Error FavoriteMediaItemIdCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the list of media item identifiers cannot be empty. + /// public static Error FavoriteMediaItemIdsCannotBeEmpty => Error.Validation(description: nameof(FavoriteMediaItemIdsCannotBeEmpty)); + + /// + /// Gets the error that reports that the list of media item identifiers exceeds the maximum allowed count. + /// public static Error FavoriteMediaItemIdsExceedMaximumCount => Error.Validation(description: nameof(FavoriteMediaItemIdsExceedMaximumCount)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.FileSystemManagement.cs b/src/Lumina.Domain/Common/Errors/Errors.FileSystemManagement.cs index 26eba934..2d2afdf6 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.FileSystemManagement.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.FileSystemManagement.cs @@ -9,28 +9,114 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report file system navigation, validation and operation failures. + /// public static class FileSystemManagement { + /// + /// Gets the error that reports that a file system operation failed because its parent node is . + /// public static Error ParentNodeCannotBeNull => Error.Failure(description: nameof(ParentNodeCannotBeNull)); + + /// + /// Gets the error that reports that a file system operation failed because the path exceeds the maximum length of 260 characters. + /// public static Error PathMustBeMaximum260CharactersLong => Error.Failure(description: nameof(PathMustBeMaximum260CharactersLong)); + + /// + /// Gets the error that reports that copying a file failed. + /// public static Error FileCopyError => Error.Failure(description: nameof(FileCopyError)); + + /// + /// Gets the error that reports that moving a file failed. + /// public static Error FileMoveError => Error.Failure(description: nameof(FileMoveError)); + + /// + /// Gets the error that reports that deleting a file failed. + /// public static Error FileDeleteError => Error.Failure(description: nameof(FileDeleteError)); + + /// + /// Gets the error that reports that copying a directory failed. + /// public static Error DirectoryCopyError => Error.Failure(description: nameof(DirectoryCopyError)); + + /// + /// Gets the error that reports that moving a directory failed. + /// public static Error DirectoryMoveError => Error.Failure(description: nameof(DirectoryMoveError)); + + /// + /// Gets the error that reports that the requested file was not found. + /// public static Error FileNotFound => Error.NotFound(description: nameof(FileNotFound)); + + /// + /// Gets the error that reports that the file system path is not valid. + /// public static Error InvalidPath => Error.Validation(description: nameof(InvalidPath)); + + /// + /// Gets the error that reports that the file system path cannot be empty. + /// public static Error PathCannotBeEmpty => Error.Validation(description: nameof(PathCannotBeEmpty)); + + /// + /// Gets the error that reports that the file extension cannot be empty. + /// public static Error ExtensionCannotBeEmpty => Error.Validation(description: nameof(ExtensionCannotBeEmpty)); + + /// + /// Gets the error that reports that the stream identifier cannot be empty. + /// public static Error StreamIdCannotBeEmpty => Error.Validation(description: nameof(StreamIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the codec name cannot be empty. + /// public static Error CodecCannotBeEmpty => Error.Validation(description: nameof(CodecCannotBeEmpty)); + + /// + /// Gets the error that reports that the bitrate must be a positive number. + /// public static Error BitrateMustBeAPositiveNumber => Error.Validation(description: nameof(BitrateMustBeAPositiveNumber)); + + /// + /// Gets the error that reports that the file system browser cannot navigate above the root directory. + /// public static Error CannotNavigateUp => Error.Failure(description: nameof(CannotNavigateUp)); + + /// + /// Gets the error that reports that the name of the file system node cannot be empty. + /// public static Error NameCannotBeEmpty => Error.Validation(description: nameof(NameCannotBeEmpty)); + + /// + /// Gets the error that reports that the file name cannot be empty. + /// public static Error FileNameCannotBeEmpty => Error.Validation(description: nameof(FileNameCannotBeEmpty)); + + /// + /// Gets the error that reports that a file with the same name already exists in the target directory. + /// public static Error FileAlreadyExists => Error.Conflict(description: nameof(FileAlreadyExists)); + + /// + /// Gets the error that reports that the requested directory was not found. + /// public static Error DirectoryNotFound => Error.NotFound(description: nameof(DirectoryNotFound)); + + /// + /// Gets the error that reports that a directory with the same name already exists in the target location. + /// public static Error DirectoryAlreadyExists => Error.Conflict(description: nameof(DirectoryAlreadyExists)); + + /// + /// Gets the error that reports that the file exceeds the maximum allowed size. + /// public static Error FileTooLarge => Error.Validation(description: nameof(FileTooLarge)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Library.cs b/src/Lumina.Domain/Common/Errors/Errors.Library.cs index cb5fad2d..eb4002e5 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Library.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Library.cs @@ -9,27 +9,109 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report media library rule violations and missing libraries. + /// public static class Library { + /// + /// Gets the error that reports that a locked media library cannot be scanned. + /// public static Error CannotScanLockedLibrary => Error.Forbidden(description: nameof(CannotScanLockedLibrary)); + + /// + /// Gets the error that reports that a disabled media library cannot be scanned. + /// public static Error CannotScanDisabledLibrary => Error.Forbidden(description: nameof(CannotScanDisabledLibrary)); + + /// + /// Gets the error that reports that the library identifier cannot be empty. + /// public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty)); + + /// + /// Gets the error that reports that a library-scoped filter must include a library identifier. + /// public static Error FilterMustIncludeLibraryId => Error.Validation(description: nameof(FilterMustIncludeLibraryId)); + + /// + /// Gets the error that reports that the alphabetical filter key is not valid. + /// public static Error InvalidFilterAlphaKey => Error.Validation(description: nameof(InvalidFilterAlphaKey)); + + /// + /// Gets the error that reports that a media library with the same identifier already exists. + /// public static Error LibraryAlreadyExists => Error.Conflict(description: nameof(LibraryAlreadyExists)); + + /// + /// Gets the error that reports that the requested media library was not found. + /// public static Error LibraryNotFound => Error.NotFound(description: nameof(LibraryNotFound)); + + /// + /// Gets the error that reports that the library type must not be . + /// public static Error LibraryTypeCannotBeNull => Error.Validation(description: nameof(LibraryTypeCannotBeNull)); + + /// + /// Gets the error that reports that the library cover file must be an image. + /// public static Error CoverFileMustBeAnImage => Error.Validation(description: nameof(CoverFileMustBeAnImage)); + + /// + /// Gets the error that reports that the operation cannot be performed because the library type is not recognized. + /// public static Error UnknownLibraryType => Error.Forbidden(description: nameof(UnknownLibraryType)); + + /// + /// Gets the error that reports that the list of library content paths must not be . + /// public static Error PathsListCannotBeNull => Error.Validation(description: nameof(PathsListCannotBeNull)); + + /// + /// Gets the error that reports that the list of library content paths cannot be empty. + /// public static Error PathsListCannotBeEmpty => Error.Validation(description: nameof(PathsListCannotBeEmpty)); + + /// + /// Gets the error that reports that the library title cannot be empty. + /// public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty)); + + /// + /// Gets the error that reports that the library title exceeds the maximum length of 255 characters. + /// public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that a literal part of the path template cannot be empty. + /// public static Error PathTemplateLiteralCannotBeEmpty => Error.Validation(description: nameof(PathTemplateLiteralCannotBeEmpty)); + + /// + /// Gets the error that reports that a value part of the path template must contain exactly one placeholder. + /// public static Error PathTemplateValuePartMustContainSinglePlaceholder => Error.Validation(description: nameof(PathTemplateValuePartMustContainSinglePlaceholder)); + + /// + /// Gets the error that reports that a path template part kind is not supported for the library type. + /// public static Error PathTemplatePartKindNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplatePartKindNotSupportedForLibraryType)); + + /// + /// Gets the error that reports that path templates are not supported for the library type. + /// public static Error PathTemplateIsNotSupportedForLibraryType => Error.Validation(description: nameof(PathTemplateIsNotSupportedForLibraryType)); + + /// + /// Gets the error that reports that the completion threshold percentage must be omitted when progress tracking is disabled. + /// public static Error CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeNullWhenProgressTrackingIsOff)); + + /// + /// Gets the error that reports that the completion threshold percentage must be between 0 and 100. + /// public static Error CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(CompletionThresholdPercentageMustBeBetweenZeroAndOneHundred)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.LibraryScanning.cs b/src/Lumina.Domain/Common/Errors/Errors.LibraryScanning.cs index 2ae920bc..3773e197 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.LibraryScanning.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.LibraryScanning.cs @@ -9,24 +9,94 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report media library scan rule violations and missing scans. + /// public static class LibraryScanning { + /// + /// Gets the error that reports that the library scan identifier cannot be empty. + /// public static Error LibraryScanIdCannotBeEmpty => Error.Validation(description: nameof(LibraryScanIdCannotBeEmpty)); + + /// + /// Gets the error that reports that only a pending scan can be started. + /// public static Error CanOnlyStartPendingScans => Error.Forbidden(description: nameof(CanOnlyStartPendingScans)); + + /// + /// Gets the error that reports that only a running scan can be completed. + /// public static Error CanOnlyCompleteRunningScans => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScans)); + + /// + /// Gets the error that reports that only a pending or running scan can be cancelled. + /// public static Error CanOnlyCancelPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyCancelPendingOrRunningScans)); + + /// + /// Gets the error that reports that only a pending or running scan can be marked as failed. + /// public static Error CanOnlyFailPendingOrRunningScans => Error.Forbidden(description: nameof(CanOnlyFailPendingOrRunningScans)); + + /// + /// Gets the error that reports that the scan identifier cannot be empty. + /// public static Error ScanIdCannotBeEmpty => Error.Validation(description: nameof(ScanIdCannotBeEmpty)); + + /// + /// Gets the error that reports that a media library scan with the same identifier already exists. + /// public static Error LibraryScanAlreadyExists => Error.Conflict(description: nameof(LibraryScanAlreadyExists)); + + /// + /// Gets the error that reports that the library is already being scanned. + /// public static Error LibraryAlreadyBeingScanned => Error.Forbidden(description: nameof(LibraryAlreadyBeingScanned)); + + /// + /// Gets the error that reports that the requested library scan was not found. + /// public static Error LibraryScanNotFound => Error.NotFound(description: nameof(LibraryScanNotFound)); + + /// + /// Gets the error that reports that the total scan job items count cannot be negative. + /// public static Error TotalScanJobItemsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobItemsCountMustBePositive)); + + /// + /// Gets the error that reports that the total scan jobs count cannot be negative, and cannot be zero unless the scan is pending. + /// public static Error TotalScanJobsCountMustBePositive => Error.Validation(description: nameof(TotalScanJobsCountMustBePositive)); + + /// + /// Gets the error that reports that the completed scan job items count cannot be negative. + /// public static Error CompletedScanJobItemsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobItemsCountMustBePositive)); + + /// + /// Gets the error that reports that the completed scan jobs count cannot be negative. + /// public static Error CompletedScanJobsCountMustBePositive => Error.Validation(description: nameof(CompletedScanJobsCountMustBePositive)); + + /// + /// Gets the error that reports that the completed scan job items count cannot exceed the total scan job items count. + /// public static Error CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount => Error.Validation(description: nameof(CompletedScanJobItemsCountCantExceedTotalScanJobItemsCount)); + + /// + /// Gets the error that reports that the completed scan jobs count cannot exceed the total scan jobs count. + /// public static Error CompletedScanJobsCountCantExceedTotalScanJobsCount => Error.Validation(description: nameof(CompletedScanJobsCountCantExceedTotalScanJobsCount)); + + /// + /// Gets the error that reports that the current operation of a scan job cannot be empty. + /// public static Error ScanJobCurrentOperationCannotBeEmpty => Error.Validation(description: nameof(ScanJobCurrentOperationCannotBeEmpty)); + + /// + /// Gets the error that reports that no scanner is implemented for the requested library type. + /// public static Error NoScannerForLibraryType => Error.NotImplemented(description: nameof(NoScannerForLibraryType)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.MediaConsumption.cs b/src/Lumina.Domain/Common/Errors/Errors.MediaConsumption.cs index 09a5a71a..f37c632d 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.MediaConsumption.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.MediaConsumption.cs @@ -9,29 +9,119 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report media consumption rule violations and missing consumption records. + /// public static class MediaConsumption { + /// + /// Gets the error that reports that the media kind does not support consumption tracking. + /// public static Error UnsupportedMediaKind => Error.Validation(description: nameof(UnsupportedMediaKind)); + + /// + /// Gets the error that reports that the media kind cannot start in a completed state because it is not a one-shot kind. + /// public static Error MediaKindCannotStartCompleted => Error.Forbidden(description: nameof(MediaKindCannotStartCompleted)); + + /// + /// Gets the error that reports that a consumption of the media kind cannot be resumed. + /// public static Error MediaKindCannotResume => Error.Forbidden(description: nameof(MediaKindCannotResume)); + + /// + /// Gets the error that reports that the requested consumption record was not found. + /// public static Error ConsumptionRecordNotFound => Error.NotFound(description: nameof(ConsumptionRecordNotFound)); + + /// + /// Gets the error that reports that the resume point of the media item was not found. + /// public static Error MediaResumePointNotFound => Error.NotFound(description: nameof(MediaResumePointNotFound)); + + /// + /// Gets the error that reports that the consumption record identifier cannot be empty. + /// public static Error ConsumptionRecordIdCannotBeEmpty => Error.Validation(description: nameof(ConsumptionRecordIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the media item identifier cannot be empty. + /// public static Error MediaItemIdCannotBeEmpty => Error.Validation(description: nameof(MediaItemIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the target user identifier is not valid. + /// public static Error TargetUserIdIsInvalid => Error.Validation(description: nameof(TargetUserIdIsInvalid)); + + /// + /// Gets the error that reports that the consumption date range is not valid. + /// public static Error ConsumptionDateRangeIsInvalid => Error.Validation(description: nameof(ConsumptionDateRangeIsInvalid)); + + /// + /// Gets the error that reports that the media position is not valid. + /// public static Error InvalidMediaPosition => Error.Validation(description: nameof(InvalidMediaPosition)); + + /// + /// Gets the error that reports that the progress fraction is not valid. + /// public static Error InvalidProgressFraction => Error.Validation(description: nameof(InvalidProgressFraction)); + + /// + /// Gets the error that reports that the consumed duration cannot be negative. + /// public static Error ConsumedDurationMustBeNonNegative => Error.Validation(description: nameof(ConsumedDurationMustBeNonNegative)); + + /// + /// Gets the error that reports that the consumed duration is outside the allowed range. + /// public static Error ConsumedDurationIsOutOfRange => Error.Validation(description: nameof(ConsumedDurationIsOutOfRange)); + + /// + /// Gets the error that reports that the consumed duration cannot decrease. + /// public static Error ConsumedDurationCannotDecrease => Error.Forbidden(description: nameof(ConsumedDurationCannotDecrease)); + + /// + /// Gets the error that reports that the consecutive pages read count cannot be negative. + /// public static Error ConsecutivePagesReadMustBeNonNegative => Error.Validation(description: nameof(ConsecutivePagesReadMustBeNonNegative)); + + /// + /// Gets the error that reports that consecutive pages read is only supported for page-based media. + /// public static Error ConsecutivePagesReadIsOnlySupportedForPageBasedMedia => Error.Forbidden(description: nameof(ConsecutivePagesReadIsOnlySupportedForPageBasedMedia)); + + /// + /// Gets the error that reports that the consumption is not in progress. + /// public static Error ConsumptionIsNotInProgress => Error.Conflict(description: nameof(ConsumptionIsNotInProgress)); + + /// + /// Gets the error that reports that the consumption already reached a terminal state. + /// public static Error ConsumptionIsAlreadyTerminal => Error.Conflict(description: nameof(ConsumptionIsAlreadyTerminal)); + + /// + /// Gets the error that reports that a consumption in progress cannot have an end time. + /// public static Error InProgressConsumptionCannotHaveEndTime => Error.Validation(description: nameof(InProgressConsumptionCannotHaveEndTime)); + + /// + /// Gets the error that reports that an ended consumption must have an end time. + /// public static Error EndedConsumptionMustHaveEndTime => Error.Validation(description: nameof(EndedConsumptionMustHaveEndTime)); + + /// + /// Gets the error that reports that the last activity of a consumption cannot precede its start. + /// public static Error LastActivityCannotPrecedeStart => Error.Forbidden(description: nameof(LastActivityCannotPrecedeStart)); + + /// + /// Gets the error that reports that the end of a consumption cannot precede its last activity. + /// public static Error EndedConsumptionCannotPrecedeLastActivity => Error.Forbidden(description: nameof(EndedConsumptionCannotPrecedeLastActivity)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs b/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs index 7c71d685..c7712b9b 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.MediaContributor.cs @@ -9,20 +9,74 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report media contributor rule violations and missing contributors. + /// public static class MediaContributor { + /// + /// Gets the error that reports that the contributor name cannot be empty. + /// public static Error ContributorNameCannotBeEmpty => Error.Validation(description: nameof(ContributorNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the contributor display name cannot be empty. + /// public static Error ContributorDisplayNameCannotBeEmpty => Error.Validation(description: nameof(ContributorDisplayNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the contributor display name exceeds the maximum length of 100 characters. + /// public static Error ContributorDisplayNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorDisplayNameMustBeMaximum100CharactersLong)); + + /// + /// Gets the error that reports that the contributor legal name exceeds the maximum length of 100 characters. + /// public static Error ContributorLegalNameMustBeMaximum100CharactersLong => Error.Validation(description: nameof(ContributorLegalNameMustBeMaximum100CharactersLong)); + + /// + /// Gets the error that reports that the contributor role name cannot be empty. + /// public static Error RoleNameCannotBeEmpty => Error.Validation(description: nameof(RoleNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the contributor role name exceeds the maximum length of 50 characters. + /// public static Error RoleNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(RoleNameMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the contributor role category cannot be empty. + /// public static Error RoleCategoryCannotBeEmpty => Error.Validation(description: nameof(RoleCategoryCannotBeEmpty)); + + /// + /// Gets the error that reports that the contributor role must not be . + /// public static Error ContributorRoleCannotBeNull => Error.Validation(description: nameof(ContributorRoleCannotBeNull)); + + /// + /// Gets the error that reports that the contributors list must not be . + /// public static Error ContributorsListCannotBeNull => Error.Validation(description: nameof(ContributorsListCannotBeNull)); + + /// + /// Gets the error that reports that the media contributor identifier cannot be empty. + /// public static Error MediaContributorIdCannotBeEmpty => Error.Validation(description: nameof(MediaContributorIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the requested media contributor was not found. + /// public static Error MediaContributorNotFound => Error.NotFound(description: nameof(MediaContributorNotFound)); + + /// + /// Gets the error that reports that the media contributor already exists. + /// public static Error MediaContributorAlreadyExists => Error.Conflict(description: nameof(MediaContributorAlreadyExists)); + + /// + /// Gets the error that reports that the media contributor role is not a defined value. + /// public static Error UnknownMediaContributorRole => Error.Validation(description: nameof(UnknownMediaContributorRole)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.MediaContributors.cs b/src/Lumina.Domain/Common/Errors/Errors.MediaContributors.cs index c6bccb77..7b9eca7b 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.MediaContributors.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.MediaContributors.cs @@ -9,9 +9,19 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report media item contributor name rule violations. + /// public static class MediaContributors { + /// + /// Gets the error that reports that the name of a media contributor cannot be empty. + /// public static Error MediaContributorNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the role name of a media contributor cannot be empty. + /// public static Error MediaContributorRoleNameCannotBeEmpty => Error.Validation(description: nameof(MediaContributorRoleNameCannotBeEmpty)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs b/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs index 26a0d1cf..d488b982 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Metadata.cs @@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Defines the errors that report failures raised while working with the metadata of media items. + /// public static class Metadata { + /// + /// Gets the error that reports that the metadata of a media item cannot be . + /// public static Error MetadataCannotBeNull => Error.Validation(description: nameof(MetadataCannotBeNull)); + + /// + /// Gets the error that reports that the title of a media item cannot be empty. + /// public static Error TitleCannotBeEmpty => Error.Validation(description: nameof(TitleCannotBeEmpty)); + + /// + /// Gets the error that reports that the title of a media item exceeds the maximum length of 255 characters. + /// public static Error TitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(TitleMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the original title of a media item exceeds the maximum length of 255 characters. + /// public static Error OriginalTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(OriginalTitleMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the description of a media item exceeds the maximum length of 2000 characters. + /// public static Error DescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(DescriptionMustBeMaximum2000CharactersLong)); + + /// + /// Gets the error that reports that the collection of genres for a media item cannot be . + /// public static Error GenresListCannotBeNull => Error.Validation(description: nameof(GenresListCannotBeNull)); + + /// + /// Gets the error that reports that the name of a genre cannot be empty. + /// public static Error GenreNameCannotBeEmpty => Error.Validation(description: nameof(GenreNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the name of a genre exceeds the maximum length of 50 characters. + /// public static Error GenreNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(GenreNameMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the collection of tags for a media item cannot be . + /// public static Error TagsListCannotBeNull => Error.Validation(description: nameof(TagsListCannotBeNull)); + + /// + /// Gets the error that reports that the name of a tag cannot be empty. + /// public static Error TagNameCannotBeEmpty => Error.Validation(description: nameof(TagNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the name of a tag exceeds the maximum length of 50 characters. + /// public static Error TagNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(TagNameMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the name of a mood cannot be empty. + /// public static Error MoodNameCannotBeEmpty => Error.Validation(description: nameof(MoodNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the code of a language cannot be empty. + /// public static Error LanguageCodeCannotBeEmpty => Error.Validation(description: nameof(LanguageCodeCannotBeEmpty)); + + /// + /// Gets the error that reports that the name of a language cannot be empty. + /// public static Error LanguageNameCannotBeEmpty => Error.Validation(description: nameof(LanguageNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the code of a language must be exactly 2 characters long. + /// public static Error LanguageCodeMustBe2CharactersLong => Error.Validation(description: nameof(LanguageCodeMustBe2CharactersLong)); + + /// + /// Gets the error that reports that the name of a language exceeds the maximum length of 50 characters. + /// public static Error LanguageNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNameMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the native name of a language exceeds the maximum length of 50 characters. + /// public static Error LanguageNativeNameMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LanguageNativeNameMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the original release year of a media item is outside the range from 1 to 9999. + /// public static Error OriginalReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(OriginalReleaseYearMustBeBetween1And9999)); + + /// + /// Gets the error that reports that the re-release year of a media item is outside the range from 1 to 9999. + /// public static Error ReReleaseYearMustBeBetween1And9999 => Error.Validation(description: nameof(ReReleaseYearMustBeBetween1And9999)); + + /// + /// Gets the error that reports that the re-release year of a media item is earlier than its original release year. + /// public static Error ReReleaseYearCannotBeEarlierThanOriginalReleaseYear => Error.Validation(description: nameof(ReReleaseYearCannotBeEarlierThanOriginalReleaseYear)); + + /// + /// Gets the error that reports that the code of a release country must be exactly 2 characters long. + /// public static Error CountryCodeMustBe2CharactersLong => Error.Validation(description: nameof(CountryCodeMustBe2CharactersLong)); + + /// + /// Gets the error that reports that the release version of a media item exceeds the maximum length of 50 characters. + /// public static Error ReleaseVersionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ReleaseVersionMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the original release date and the original release year of a media item refer to different years. + /// public static Error OriginalReleaseDateAndYearMustMatch => Error.Validation(description: nameof(OriginalReleaseDateAndYearMustMatch)); + + /// + /// Gets the error that reports that the re-release date and the re-release year of a media item refer to different years. + /// public static Error ReReleaseDateAndYearMustMatch => Error.Validation(description: nameof(ReReleaseDateAndYearMustMatch)); + + /// + /// Gets the error that reports that the re-release date of a media item is earlier than its original release date. + /// public static Error ReReleaseDateCannotBeEarlierThanOriginalReleaseDate => Error.Validation(description: nameof(ReReleaseDateCannotBeEarlierThanOriginalReleaseDate)); + + /// + /// Gets the error that reports that the release information of a media item cannot be . + /// public static Error ReleaseInfoCannotBeNull => Error.Validation(description: nameof(ReleaseInfoCannotBeNull)); + + /// + /// Gets the error that reports that the value or the maximum value of a rating is negative. + /// public static Error RatingValueMustBePositive => Error.Validation(description: nameof(RatingValueMustBePositive)); + + /// + /// Gets the error that reports that the maximum value of a rating must be positive. + /// public static Error RatingMaxValueMustBePositive => Error.Validation(description: nameof(RatingMaxValueMustBePositive)); + + /// + /// Gets the error that reports that the value of a rating is greater than the maximum value of the same rating. + /// public static Error RatingValueCannotBeGreaterThanMaxValue => Error.Validation(description: nameof(RatingValueCannotBeGreaterThanMaxValue)); + + /// + /// Gets the error that reports that the vote count of a rating must be positive. + /// public static Error RatingVoteCountMustBePositive => Error.Validation(description: nameof(RatingVoteCountMustBePositive)); + + /// + /// Gets the error that reports that the collection of ratings for a media item cannot be . + /// public static Error RatingsListCannotBeNull => Error.Validation(description: nameof(RatingsListCannotBeNull)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Music.cs b/src/Lumina.Domain/Common/Errors/Errors.Music.cs index f3031651..fbe65f2a 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Music.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Music.cs @@ -9,65 +9,299 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Defines the errors that report failures raised while working with music artists, albums and tracks. + /// public static class Music { + /// + /// Gets the error that reports that the requested music artist does not exist. + /// public static Error ArtistNotFound => Error.NotFound(description: nameof(ArtistNotFound)); + + /// + /// Gets the error that reports that a music artist with the same identifier or name already exists in the library. + /// public static Error ArtistAlreadyExists => Error.Conflict(description: nameof(ArtistAlreadyExists)); + + /// + /// Gets the error that reports that a music artist identifier cannot be empty. + /// public static Error ArtistIdCannotBeEmpty => Error.Validation(description: nameof(ArtistIdCannotBeEmpty)); + + /// + /// Gets the error that reports that a music artist name cannot be empty. + /// public static Error ArtistNameCannotBeEmpty => Error.Validation(description: nameof(ArtistNameCannotBeEmpty)); + + /// + /// Gets the error that reports that a music artist name exceeds the maximum length of 255 characters. + /// public static Error ArtistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistNameMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that a music artist website exceeds the maximum length of 2048 characters. + /// public static Error ArtistWebsiteMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(ArtistWebsiteMustBeMaximum2048CharactersLong)); + + /// + /// Gets the error that reports that a MusicBrainz identifier does not have a valid format. + /// public static Error MusicBrainzIdInvalidFormat => Error.Validation(description: nameof(MusicBrainzIdInvalidFormat)); + + /// + /// Gets the error that reports that an ISRC value cannot be empty. + /// public static Error IsrcValueCannotBeEmpty => Error.Validation(description: nameof(IsrcValueCannotBeEmpty)); + + /// + /// Gets the error that reports that an ISRC value does not have a valid ISRC format. + /// public static Error IsrcInvalidFormat => Error.Validation(description: nameof(IsrcInvalidFormat)); + + /// + /// Gets the error that reports that a barcode value cannot be empty. + /// public static Error BarcodeValueCannotBeEmpty => Error.Validation(description: nameof(BarcodeValueCannotBeEmpty)); + + /// + /// Gets the error that reports that a barcode is not made of 12 or 13 digits. + /// public static Error InvalidFormatForBarcode => Error.Validation(description: nameof(InvalidFormatForBarcode)); + + /// + /// Gets the error that reports that the requested music album does not exist. + /// public static Error AlbumNotFound => Error.NotFound(description: nameof(AlbumNotFound)); + + /// + /// Gets the error that reports that a music album with the same identifier already exists in the library. + /// public static Error AlbumAlreadyExists => Error.Conflict(description: nameof(AlbumAlreadyExists)); + + /// + /// Gets the error that reports that a music artist cannot exist without at least one album. + /// public static Error ArtistMustHaveAtLeastOneAlbum => Error.Forbidden(description: nameof(ArtistMustHaveAtLeastOneAlbum)); + + /// + /// Gets the error that reports that a music album identifier cannot be empty. + /// public static Error AlbumIdCannotBeEmpty => Error.Validation(description: nameof(AlbumIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the collection of albums for a music artist cannot be . + /// public static Error AlbumsListCannotBeNull => Error.Validation(description: nameof(AlbumsListCannotBeNull)); + + /// + /// Gets the error that reports that a music album title cannot be empty. + /// public static Error AlbumTitleCannotBeEmpty => Error.Validation(description: nameof(AlbumTitleCannotBeEmpty)); + + /// + /// Gets the error that reports that a music album title exceeds the maximum length of 255 characters. + /// public static Error AlbumTitleMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AlbumTitleMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the total number of discs in a music album must be greater than zero. + /// public static Error TotalDiscsMustBeGreaterThanZero => Error.Validation(description: nameof(TotalDiscsMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the total number of tracks in a music album must be greater than zero. + /// public static Error TotalTracksMustBeGreaterThanZero => Error.Validation(description: nameof(TotalTracksMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that a music release type is not a recognized value. + /// public static Error UnknownMusicReleaseType => Error.Validation(description: nameof(UnknownMusicReleaseType)); + + /// + /// Gets the error that reports that a music release status is not a recognized value. + /// public static Error UnknownMusicReleaseStatus => Error.Validation(description: nameof(UnknownMusicReleaseStatus)); + + /// + /// Gets the error that reports that a music media format is not a recognized value. + /// public static Error UnknownMusicMediaFormat => Error.Validation(description: nameof(UnknownMusicMediaFormat)); + + /// + /// Gets the error that reports that a music release packaging is not a recognized value. + /// public static Error UnknownMusicReleasePackaging => Error.Validation(description: nameof(UnknownMusicReleasePackaging)); + + /// + /// Gets the error that reports that a music key is not a recognized value. + /// public static Error UnknownMusicKey => Error.Validation(description: nameof(UnknownMusicKey)); + + /// + /// Gets the error that reports that a music album catalog number exceeds the maximum length of 50 characters. + /// public static Error CatalogNumberMustBeMaximum50CharactersLong => Error.Validation(description: nameof(CatalogNumberMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the requested music track does not exist. + /// public static Error TrackNotFound => Error.NotFound(description: nameof(TrackNotFound)); + + /// + /// Gets the error that reports that the audio file of a music track does not exist or cannot be read. + /// public static Error TrackFileNotFound => Error.NotFound(description: nameof(TrackFileNotFound)); + + /// + /// Gets the error that reports that a music track with the same identifier or file path already exists in the library. + /// public static Error TrackAlreadyExists => Error.Conflict(description: nameof(TrackAlreadyExists)); + + /// + /// Gets the error that reports that a music track identifier cannot be empty. + /// public static Error TrackIdCannotBeEmpty => Error.Validation(description: nameof(TrackIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the collection of tracks for a music album cannot be . + /// public static Error TracksListCannotBeNull => Error.Validation(description: nameof(TracksListCannotBeNull)); + + /// + /// Gets the error that reports that a music track file path cannot be empty. + /// public static Error TrackPathCannotBeEmpty => Error.Validation(description: nameof(TrackPathCannotBeEmpty)); + + /// + /// Gets the error that reports that a music track file path exceeds the maximum length of 2048 characters. + /// public static Error TrackPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(TrackPathMustBeMaximum2048CharactersLong)); + + /// + /// Gets the error that reports that a music track file path does not reside within any of the content locations of the library. + /// public static Error TrackPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(TrackPathMustBeWithinLibraryContentLocations)); + + /// + /// Gets the error that reports that the number of a music track must be greater than zero. + /// public static Error TrackNumberMustBeGreaterThanZero => Error.Validation(description: nameof(TrackNumberMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the disc number of a music track must be greater than zero. + /// public static Error DiscNumberMustBeGreaterThanZero => Error.Validation(description: nameof(DiscNumberMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that a music script exceeds the maximum length of 50 characters. + /// public static Error ScriptMustBeMaximum50CharactersLong => Error.Validation(description: nameof(ScriptMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the title of a music work exceeds the maximum length of 255 characters. + /// public static Error WorkMustBeMaximum255CharactersLong => Error.Validation(description: nameof(WorkMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the beats per minute value of a music track must be greater than zero. + /// public static Error BpmMustBeGreaterThanZero => Error.Validation(description: nameof(BpmMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the album cannot be added to the music artist because the artist already has it. + /// public static Error TheArtistAlreadyHasTheAlbum => Error.Forbidden(description: nameof(TheArtistAlreadyHasTheAlbum)); + + /// + /// Gets the error that reports that the album cannot be removed from the music artist because the artist does not have it. + /// public static Error TheArtistDoesNotHaveTheAlbum => Error.Forbidden(description: nameof(TheArtistDoesNotHaveTheAlbum)); + + /// + /// Gets the error that reports that the track cannot be added to the music album because the album already contains it. + /// public static Error TheTrackIsAlreadyInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsAlreadyInTheAlbum)); + + /// + /// Gets the error that reports that the track cannot be removed from the music album because the album does not contain it. + /// public static Error TheTrackIsNotInTheAlbum => Error.Forbidden(description: nameof(TheTrackIsNotInTheAlbum)); + + /// + /// Gets the error that reports that the name of a music area cannot be empty. + /// public static Error AreaNameCannotBeEmpty => Error.Validation(description: nameof(AreaNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the name of a music artist alias cannot be empty. + /// public static Error ArtistAliasNameCannotBeEmpty => Error.Validation(description: nameof(ArtistAliasNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the name of a music artist alias exceeds the maximum length of 255 characters. + /// public static Error ArtistAliasNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(ArtistAliasNameMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the name of a music area exceeds the maximum length of 255 characters. + /// public static Error AreaNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(AreaNameMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that a music artist type is not a recognized value. + /// public static Error UnknownMusicArtistType => Error.Validation(description: nameof(UnknownMusicArtistType)); + + /// + /// Gets the error that reports that a music artist gender is not a recognized value. + /// public static Error UnknownMusicArtistGender => Error.Validation(description: nameof(UnknownMusicArtistGender)); + + /// + /// Gets the error that reports that a music artist country exceeds the maximum length of 2 characters. + /// public static Error CountryMustBeMaximum2CharactersLong => Error.Validation(description: nameof(CountryMustBeMaximum2CharactersLong)); + + /// + /// Gets the error that reports that an IPI value cannot be empty. + /// public static Error IpiValueCannotBeEmpty => Error.Validation(description: nameof(IpiValueCannotBeEmpty)); + + /// + /// Gets the error that reports that an IPI value exceeds the maximum length of 20 characters. + /// public static Error IpiValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IpiValueMustBeMaximum20CharactersLong)); + + /// + /// Gets the error that reports that an ISNI value cannot be empty. + /// public static Error IsniValueCannotBeEmpty => Error.Validation(description: nameof(IsniValueCannotBeEmpty)); + + /// + /// Gets the error that reports that an ISNI value exceeds the maximum length of 20 characters. + /// public static Error IsniValueMustBeMaximum20CharactersLong => Error.Validation(description: nameof(IsniValueMustBeMaximum20CharactersLong)); + + /// + /// Gets the error that reports that the title of a music work cannot be empty. + /// public static Error WorkTitleCannotBeEmpty => Error.Validation(description: nameof(WorkTitleCannotBeEmpty)); + + /// + /// Gets the error that reports that the cover image of a music artist or album cannot be . + /// public static Error CoverCannotBeNull => Error.Validation(description: nameof(CoverCannotBeNull)); + + /// + /// Gets the error that reports that the number of tracks requested for shuffling must be greater than zero. + /// public static Error ShuffleTrackCountMustBeGreaterThanZero => Error.Validation(description: nameof(ShuffleTrackCountMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the number of tracks requested for shuffling cannot exceed 500. + /// public static Error ShuffleTrackCountMustBeAtMost500 => Error.Validation(description: nameof(ShuffleTrackCountMustBeAtMost500)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Permission.cs b/src/Lumina.Domain/Common/Errors/Errors.Permission.cs index 7dc123e3..8ce09499 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Permission.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Permission.cs @@ -9,8 +9,14 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report denied access to file system resources. + /// public static class Permission { + /// + /// Gets the error that reports that the current user is not authorized to access the requested resource. + /// public static Error UnauthorizedAccess => Error.Failure(description: nameof(UnauthorizedAccess)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Playback.cs b/src/Lumina.Domain/Common/Errors/Errors.Playback.cs index c18c8c5a..330752c2 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Playback.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Playback.cs @@ -9,24 +9,94 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report playback delivery and track normalization failures. + /// public static class Playback { + /// + /// Gets the error that reports that no supported playback format is available for the requested track. + /// public static Error NoSupportedPlaybackFormat => Error.Forbidden(description: nameof(NoSupportedPlaybackFormat)); + + /// + /// Gets the error that reports that the playback delivery changed before it could be used. + /// public static Error PlaybackDeliveryChanged => Error.Conflict(description: nameof(PlaybackDeliveryChanged)); + + /// + /// Gets the error that reports that the requested playback delivery was not found. + /// public static Error PlaybackDeliveryNotFound => Error.NotFound(description: nameof(PlaybackDeliveryNotFound)); + + /// + /// Gets the error that reports that the playback delivery identifier cannot be empty. + /// public static Error DeliveryIdCannotBeEmpty => Error.Validation(description: nameof(DeliveryIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the playback delivery identifier is not valid. + /// public static Error DeliveryIdIsInvalid => Error.Validation(description: nameof(DeliveryIdIsInvalid)); + + /// + /// Gets the error that reports that the playback format has no implementation. + /// public static Error PlaybackFormatNotImplemented => Error.Internal(description: nameof(PlaybackFormatNotImplemented)); + + /// + /// Gets the error that reports that the normalized track cache entry was not found. + /// public static Error NormalizedTrackCacheEntryNotFound => Error.NotFound(description: nameof(NormalizedTrackCacheEntryNotFound)); + + /// + /// Gets the error that reports that the normalized track segment was not found. + /// public static Error NormalizedTrackSegmentNotFound => Error.NotFound(description: nameof(NormalizedTrackSegmentNotFound)); + + /// + /// Gets the error that reports that the track normalization failed. + /// public static Error NormalizationFailed => Error.Failure(description: nameof(NormalizationFailed)); + + /// + /// Gets the error that reports that the normalized track cache limit was exceeded. + /// public static Error NormalizationCacheLimitExceeded => Error.Failure(description: nameof(NormalizationCacheLimitExceeded)); + + /// + /// Gets the error that reports that the track normalization timed out. + /// public static Error NormalizationTimedOut => Error.Timeout(description: nameof(NormalizationTimedOut)); + + /// + /// Gets the error that reports that the track normalization is unavailable because a required resource cannot be used. + /// public static Error NormalizationUnavailable => Error.ResourceUnavailable(description: nameof(NormalizationUnavailable)); + + /// + /// Gets the error that reports that normalization is not required for a directly played track. + /// public static Error NormalizationIsNotRequiredForDirectPlay => Error.Conflict(description: nameof(NormalizationIsNotRequiredForDirectPlay)); + + /// + /// Gets the error that reports that the segment duration must be a positive number. + /// public static Error SegmentDurationMustBePositive => Error.Validation(description: nameof(SegmentDurationMustBePositive)); + + /// + /// Gets the error that reports that the segment index cannot be empty. + /// public static Error SegmentIndexCannotBeEmpty => Error.Validation(description: nameof(SegmentIndexCannotBeEmpty)); + + /// + /// Gets the error that reports that the segment index is not valid. + /// public static Error SegmentIndexMustBeValid => Error.Validation(description: nameof(SegmentIndexMustBeValid)); + + /// + /// Gets the error that reports that the track duration must be a positive number. + /// public static Error TrackDurationMustBePositive => Error.Validation(description: nameof(TrackDurationMustBePositive)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Playlist.cs b/src/Lumina.Domain/Common/Errors/Errors.Playlist.cs index 01245db5..d48c8502 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Playlist.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Playlist.cs @@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report playlist rule violations and missing playlists. + /// public static class Playlists { + /// + /// Gets the error that reports that the requested playlist was not found. + /// public static Error PlaylistNotFound => Error.NotFound(description: nameof(PlaylistNotFound)); + + /// + /// Gets the error that reports that a playlist with the same identifier already exists. + /// public static Error PlaylistAlreadyExists => Error.Conflict(description: nameof(PlaylistAlreadyExists)); + + /// + /// Gets the error that reports that the playlist identifier cannot be empty. + /// public static Error PlaylistIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the playlist entry identifier cannot be empty. + /// public static Error PlaylistEntryIdCannotBeEmpty => Error.Validation(description: nameof(PlaylistEntryIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the playlist name cannot be empty. + /// public static Error PlaylistNameCannotBeEmpty => Error.Validation(description: nameof(PlaylistNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the playlist name exceeds the maximum length of 255 characters. + /// public static Error PlaylistNameMustBeMaximum255CharactersLong => Error.Validation(description: nameof(PlaylistNameMustBeMaximum255CharactersLong)); + + /// + /// Gets the error that reports that the playlist description exceeds the maximum length of 2000 characters. + /// public static Error PlaylistDescriptionMustBeMaximum2000CharactersLong => Error.Validation(description: nameof(PlaylistDescriptionMustBeMaximum2000CharactersLong)); + + /// + /// Gets the error that reports that the playlist type is not a defined value. + /// public static Error PlaylistTypeIsInvalid => Error.Validation(description: nameof(PlaylistTypeIsInvalid)); + + /// + /// Gets the error that reports that the playlist type does not accept media items. + /// public static Error PlaylistDoesNotAcceptMediaItems => Error.Forbidden(description: nameof(PlaylistDoesNotAcceptMediaItems)); + + /// + /// Gets the error that reports that the requested playlist entry was not found. + /// public static Error PlaylistEntryNotFound => Error.NotFound(description: nameof(PlaylistEntryNotFound)); + + /// + /// Gets the error that reports that the positions of the playlist entries are not valid. + /// public static Error PlaylistEntryPositionsAreInvalid => Error.Validation(description: nameof(PlaylistEntryPositionsAreInvalid)); + + /// + /// Gets the error that reports that the target position of the playlist entry move is not valid. + /// public static Error PlaylistMoveTargetPositionIsInvalid => Error.Validation(description: nameof(PlaylistMoveTargetPositionIsInvalid)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Plugins.cs b/src/Lumina.Domain/Common/Errors/Errors.Plugins.cs index bad24145..3860033a 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Plugins.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Plugins.cs @@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report plugin rule violations and plugin loading failures. + /// public static class Plugins { + /// + /// Gets the error that reports that the requested plugin was not found. + /// public static Error PluginNotFound => Error.NotFound(description: nameof(PluginNotFound)); + + /// + /// Gets the error that reports that the plugin identifier cannot be empty. + /// public static Error PluginIdCannotBeEmpty => Error.Validation(description: nameof(PluginIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the plugin settings must not be . + /// public static Error PluginSettingsCannotBeNull => Error.Validation(description: nameof(PluginSettingsCannotBeNull)); + + /// + /// Gets the error that reports that the library identifier cannot be empty. + /// public static Error LibraryIdCannotBeEmpty => Error.Validation(description: nameof(LibraryIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the plugin identifiers must be unique. + /// public static Error PluginIdsMustBeUnique => Error.Validation(description: nameof(PluginIdsMustBeUnique)); + + /// + /// Gets the error that reports that the plugin is not supported for the library type. + /// public static Error PluginNotSupportedForLibraryType => Error.Validation(description: nameof(PluginNotSupportedForLibraryType)); + + /// + /// Gets the error that reports that the metadata provider configuration of the library was not found. + /// public static Error LibraryMetadataProviderConfigurationNotFound => Error.NotFound(description: nameof(LibraryMetadataProviderConfigurationNotFound)); + + /// + /// Gets the error that reports that the plugin archive must not be . + /// public static Error PluginArchiveCannotBeNull => Error.Validation(description: nameof(PluginArchiveCannotBeNull)); + + /// + /// Gets the error that reports that the plugin file name cannot be empty. + /// public static Error PluginFileNameCannotBeEmpty => Error.Validation(description: nameof(PluginFileNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the plugin file type is not supported. + /// public static Error UnsupportedPluginFileType => Error.Validation(description: nameof(UnsupportedPluginFileType)); + + /// + /// Gets the error that reports that the plugin archive could not be read. + /// public static Error PluginArchiveNotReadable => Error.Failure(description: nameof(PluginArchiveNotReadable)); + + /// + /// Gets the error that reports that the plugin archive contains no assemblies. + /// public static Error PluginArchiveContainsNoAssemblies => Error.Failure(description: nameof(PluginArchiveContainsNoAssemblies)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Reading.cs b/src/Lumina.Domain/Common/Errors/Errors.Reading.cs index ebe6790b..52d5892f 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Reading.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Reading.cs @@ -9,15 +9,49 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report reading rule violations and missing reading resources. + /// public static class Reading { + /// + /// Gets the error that reports that the reading location reference cannot be empty. + /// public static Error LocationRefCannotBeEmpty => Error.Validation(description: nameof(LocationRefCannotBeEmpty)); + + /// + /// Gets the error that reports that the reading resource key cannot be empty. + /// public static Error ResourceKeyCannotBeEmpty => Error.Validation(description: nameof(ResourceKeyCannotBeEmpty)); + + /// + /// Gets the error that reports that the requested book was not found. + /// public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound)); + + /// + /// Gets the error that reports that no book reader is available. + /// public static Error NoReaderAvailable => Error.NotFound(description: nameof(NoReaderAvailable)); + + /// + /// Gets the error that reports that the requested book reader was not found because it is disabled. + /// public static Error ReaderDisabled => Error.NotFound(description: nameof(ReaderDisabled)); + + /// + /// Gets the error that reports that the file of the requested book was not found. + /// public static Error BookFileNotFound => Error.NotFound(description: nameof(BookFileNotFound)); + + /// + /// Gets the error that reports that the requested book section was not found. + /// public static Error SectionNotFound => Error.NotFound(description: nameof(SectionNotFound)); + + /// + /// Gets the error that reports that the requested reading resource was not found. + /// public static Error ResourceNotFound => Error.NotFound(description: nameof(ResourceNotFound)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Scheduling.cs b/src/Lumina.Domain/Common/Errors/Errors.Scheduling.cs index e20fd6f6..010121ea 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Scheduling.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Scheduling.cs @@ -9,21 +9,79 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report scheduled job rule violations and scheduling conflicts. + /// public static class Scheduling { + /// + /// Gets the error that reports that the scheduled job name cannot be empty. + /// public static Error ScheduledJobNameCannotBeEmpty => Error.Validation(description: nameof(ScheduledJobNameCannotBeEmpty)); + + /// + /// Gets the error that reports that the interval in minutes must be a positive number. + /// public static Error IntervalMinutesMustBePositive => Error.Validation(description: nameof(IntervalMinutesMustBePositive)); + + /// + /// Gets the error that reports that the hour must be between 0 and 23. + /// public static Error HourMustBeBetweenZeroAndTwentyThree => Error.Validation(description: nameof(HourMustBeBetweenZeroAndTwentyThree)); + + /// + /// Gets the error that reports that the minute must be between 0 and 59. + /// public static Error MinuteMustBeBetweenZeroAndFiftyNine => Error.Validation(description: nameof(MinuteMustBeBetweenZeroAndFiftyNine)); + + /// + /// Gets the error that reports that the scheduled job already exists. + /// public static Error ScheduledJobAlreadyExists => Error.Conflict(description: nameof(ScheduledJobAlreadyExists)); + + /// + /// Gets the error that reports that the requested scheduled job was not found. + /// public static Error ScheduledJobNotFound => Error.NotFound(description: nameof(ScheduledJobNotFound)); + + /// + /// Gets the error that reports that the scheduled job execution already exists. + /// public static Error ScheduledJobExecutionAlreadyExists => Error.Conflict(description: nameof(ScheduledJobExecutionAlreadyExists)); + + /// + /// Gets the error that reports that the requested scheduled job execution was not found. + /// public static Error ScheduledJobExecutionNotFound => Error.NotFound(description: nameof(ScheduledJobExecutionNotFound)); + + /// + /// Gets the error that reports that the cycle of the scheduled job was already started. + /// public static Error ScheduledJobCycleAlreadyStarted => Error.Forbidden(description: nameof(ScheduledJobCycleAlreadyStarted)); + + /// + /// Gets the error that reports that the cycle of the scheduled job was not started. + /// public static Error ScheduledJobNotStarted => Error.Forbidden(description: nameof(ScheduledJobNotStarted)); + + /// + /// Gets the error that reports that the scheduled job is already running. + /// public static Error ScheduledJobAlreadyRunning => Error.Forbidden(description: nameof(ScheduledJobAlreadyRunning)); + + /// + /// Gets the error that reports that only a running scheduled job can be completed. + /// public static Error CanOnlyCompleteRunningScheduledJob => Error.Forbidden(description: nameof(CanOnlyCompleteRunningScheduledJob)); + + /// + /// Gets the error that reports that the schedule type is not a defined value. + /// public static Error InvalidScheduleType => Error.Validation(description: nameof(InvalidScheduleType)); + + /// + /// Gets the error that reports that the scheduler display time span must be a positive value. + /// public static Error SchedulerDisplayTimeSpanMustBePositive => Error.Validation(description: nameof(SchedulerDisplayTimeSpanMustBePositive)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Themes.cs b/src/Lumina.Domain/Common/Errors/Errors.Themes.cs index b86cbc82..4a35f227 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Themes.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Themes.cs @@ -9,19 +9,69 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report theme rule violations and theme file failures. + /// public static class Themes { + /// + /// Gets the error that reports that the requested theme was not found. + /// public static Error ThemeNotFound => Error.NotFound(description: nameof(ThemeNotFound)); + + /// + /// Gets the error that reports that the theme identifier cannot be empty. + /// public static Error ThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the theme page key cannot be empty. + /// public static Error PageKeyCannotBeEmpty => Error.Validation(description: nameof(PageKeyCannotBeEmpty)); + + /// + /// Gets the error that reports that the theme asset path cannot be empty. + /// public static Error ThemeAssetPathCannotBeEmpty => Error.Validation(description: nameof(ThemeAssetPathCannotBeEmpty)); + + /// + /// Gets the error that reports that the theme archive must not be . + /// public static Error ThemeArchiveCannotBeNull => Error.Validation(description: nameof(ThemeArchiveCannotBeNull)); + + /// + /// Gets the error that reports that the last bundled theme cannot be deleted. + /// public static Error LastBundledThemeCannotBeDeleted => Error.Forbidden(description: nameof(LastBundledThemeCannotBeDeleted)); + + /// + /// Gets the error that reports that the theme cannot be deleted. + /// public static Error ThemeCannotBeDeleted => Error.Forbidden(description: nameof(ThemeCannotBeDeleted)); + + /// + /// Gets the error that reports that the theme cannot be restored. + /// public static Error ThemeCannotBeRestored => Error.Forbidden(description: nameof(ThemeCannotBeRestored)); + + /// + /// Gets the error that reports that the theme archive could not be read. + /// public static Error ThemeArchiveNotReadable => Error.Failure(description: nameof(ThemeArchiveNotReadable)); + + /// + /// Gets the error that reports that the files of the theme could not be read. + /// public static Error ThemeFilesUnreadable => Error.Failure(description: nameof(ThemeFilesUnreadable)); + + /// + /// Gets the error that reports that the requested theme template was not found. + /// public static Error ThemeTemplateNotFound => Error.NotFound(description: nameof(ThemeTemplateNotFound)); + + /// + /// Gets the error that reports that the theme is not available for the requested page. + /// public static Error ThemeNotAvailable => Error.Failure(description: nameof(ThemeNotAvailable)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs b/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs index 44aa2a5e..d7aba89f 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Thumbnails.cs @@ -9,9 +9,19 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report thumbnail generation failures and image quality rule violations. + /// public static class Thumbnails { + /// + /// Gets the error that reports that no thumbnail is available for the requested media item. + /// public static Error NoThumbnail => Error.Failure(description: nameof(NoThumbnail)); + + /// + /// Gets the error that reports that the image quality must be between 0 and 100. + /// public static Error ImageQualityMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(ImageQualityMustBeBetweenZeroAndOneHundred)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.UserSettings.cs b/src/Lumina.Domain/Common/Errors/Errors.UserSettings.cs index ae7a784f..b8e15404 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.UserSettings.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.UserSettings.cs @@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Defines the errors that report failures raised while working with user settings. + /// public static class UserSettings { + /// + /// Gets the error that reports that settings already exist for the user. + /// public static Error UserSettingsAlreadyExists => Error.Conflict(description: nameof(UserSettingsAlreadyExists)); + + /// + /// Gets the error that reports that no settings exist for the requested user. + /// public static Error UserSettingsNotFound => Error.NotFound(description: nameof(UserSettingsNotFound)); + + /// + /// Gets the error that reports that the number of items shown per page must be greater than zero. + /// public static Error ItemsPerPageMustBeGreaterThanZero => Error.Validation(description: nameof(ItemsPerPageMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the playback volume cannot be . + /// public static Error VolumeCannotBeNull => Error.Validation(description: nameof(VolumeCannotBeNull)); + + /// + /// Gets the error that reports that the playback volume must be between 0 and 1, inclusive. + /// public static Error VolumeMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VolumeMustBeBetweenZeroAndOne)); + + /// + /// Gets the error that reports that the mute state cannot be . + /// public static Error IsMutedCannotBeNull => Error.Validation(description: nameof(IsMutedCannotBeNull)); + + /// + /// Gets the error that reports that the option to keep downloading while playback is paused cannot be . + /// public static Error ShouldKeepDownloadingWhilePausedCannotBeNull => Error.Validation(description: nameof(ShouldKeepDownloadingWhilePausedCannotBeNull)); + + /// + /// Gets the error that reports that the autoplay option cannot be . + /// public static Error ShouldAutoplayCannotBeNull => Error.Validation(description: nameof(ShouldAutoplayCannotBeNull)); + + /// + /// Gets the error that reports that the gapless playback option cannot be . + /// public static Error IsGaplessPlaybackEnabledCannotBeNull => Error.Validation(description: nameof(IsGaplessPlaybackEnabledCannotBeNull)); + + /// + /// Gets the error that reports that the replay gain mode cannot be . + /// public static Error ReplayGainModeCannotBeNull => Error.Validation(description: nameof(ReplayGainModeCannotBeNull)); + + /// + /// Gets the error that reports that the streaming quality cannot be . + /// public static Error StreamingQualityCannotBeNull => Error.Validation(description: nameof(StreamingQualityCannotBeNull)); + + /// + /// Gets the error that reports that the replay gain mode is not a recognized value. + /// public static Error InvalidReplayGainMode => Error.Validation(description: nameof(InvalidReplayGainMode)); + + /// + /// Gets the error that reports that the streaming quality is not a recognized value. + /// public static Error InvalidStreamingQuality => Error.Validation(description: nameof(InvalidStreamingQuality)); + + /// + /// Gets the error that reports that the VU meter orientation cannot be . + /// public static Error VuMeterOrientationCannotBeNull => Error.Validation(description: nameof(VuMeterOrientationCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter orientation is not a recognized value. + /// public static Error InvalidVuMeterOrientation => Error.Validation(description: nameof(InvalidVuMeterOrientation)); + + /// + /// Gets the error that reports that the VU meter segment count cannot be . + /// public static Error VuMeterSegmentCountCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentCountCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter segment count must be between 1 and 128, inclusive. + /// public static Error VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight => Error.Validation(description: nameof(VuMeterSegmentCountMustBeBetweenOneAndOneHundredTwentyEight)); + + /// + /// Gets the error that reports that the VU meter segment gap cannot be . + /// public static Error VuMeterSegmentGapCannotBeNull => Error.Validation(description: nameof(VuMeterSegmentGapCannotBeNull)); + + /// + /// Gets the error that reports that the gap between the VU meter segments, in pixels, must be between 0 and 32, inclusive. + /// public static Error VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo => Error.Validation(description: nameof(VuMeterSegmentGapMustBeBetweenZeroAndThirtyTwo)); + + /// + /// Gets the error that reports that the VU meter medium threshold cannot be . + /// public static Error VuMeterMediumThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterMediumThresholdCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter medium threshold must be between 0 and 1, inclusive. + /// public static Error VuMeterMediumThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterMediumThresholdMustBeBetweenZeroAndOne)); + + /// + /// Gets the error that reports that the VU meter high threshold cannot be . + /// public static Error VuMeterHighThresholdCannotBeNull => Error.Validation(description: nameof(VuMeterHighThresholdCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter high threshold must be between 0 and 1, inclusive. + /// public static Error VuMeterHighThresholdMustBeBetweenZeroAndOne => Error.Validation(description: nameof(VuMeterHighThresholdMustBeBetweenZeroAndOne)); + + /// + /// Gets the error that reports that the VU meter high threshold is lower than its medium threshold. + /// public static Error VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold => Error.Validation(description: nameof(VuMeterHighThresholdMustBeGreaterThanOrEqualToMediumThreshold)); + + /// + /// Gets the error that reports that the option to show the VU meter peak cannot be . + /// public static Error VuMeterShowPeakCannotBeNull => Error.Validation(description: nameof(VuMeterShowPeakCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter peak hold duration cannot be . + /// public static Error VuMeterPeakHoldDurationCannotBeNull => Error.Validation(description: nameof(VuMeterPeakHoldDurationCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter peak hold duration, in milliseconds, must be between 0 and 10000, inclusive. + /// public static Error VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds => Error.Validation(description: nameof(VuMeterPeakHoldDurationMustBeBetweenZeroAndTenThousandMilliseconds)); + + /// + /// Gets the error that reports that the VU meter release rate per second cannot be . + /// public static Error VuMeterReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterReleasePerSecondCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter release rate per second must be between 0 and 100, inclusive. + /// public static Error VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterReleasePerSecondMustBeBetweenZeroAndOneHundred)); + + /// + /// Gets the error that reports that the VU meter peak release rate per second cannot be . + /// public static Error VuMeterPeakReleasePerSecondCannotBeNull => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondCannotBeNull)); + + /// + /// Gets the error that reports that the VU meter peak release rate per second must be between 0 and 100, inclusive. + /// public static Error VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred => Error.Validation(description: nameof(VuMeterPeakReleasePerSecondMustBeBetweenZeroAndOneHundred)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.Users.cs b/src/Lumina.Domain/Common/Errors/Errors.Users.cs index 498b5865..a0fb2c7d 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.Users.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.Users.cs @@ -9,10 +9,24 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Groups the errors that report user rule violations and missing users. + /// public static class Users { + /// + /// Gets the error that reports that the user already exists. + /// public static Error UserAlreadyExists => Error.Conflict(description: nameof(UserAlreadyExists)); + + /// + /// Gets the error that reports that the requested user does not exist. + /// public static Error UserDoesNotExist => Error.NotFound(description: nameof(UserDoesNotExist)); + + /// + /// Gets the error that reports that the user identifier cannot be empty. + /// public static Error UserIdCannotBeEmpty => Error.Validation(description: nameof(UserIdCannotBeEmpty)); } } diff --git a/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs b/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs index ad7eff46..08bdb344 100644 --- a/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs +++ b/src/Lumina.Domain/Common/Errors/Errors.WrittenContent.cs @@ -9,38 +9,164 @@ namespace Lumina.Domain.Common.Errors; /// public static partial class Errors { + /// + /// Defines the errors that report failures raised while working with books and book series. + /// public static class WrittenContent { + /// + /// Gets the error that reports that a book with the same identifier or file path already exists in the library. + /// public static Error BookAlreadyExists => Error.Conflict(description: nameof(BookAlreadyExists)); + + /// + /// Gets the error that reports that an ISBN value cannot be empty. + /// public static Error IsbnValueCannotBeEmpty => Error.Validation(description: nameof(IsbnValueCannotBeEmpty)); + + /// + /// Gets the error that reports that the collection of ISBNs for a book cannot be . + /// public static Error IsbnListCannotBeNull => Error.Validation(description: nameof(IsbnListCannotBeNull)); + + /// + /// Gets the error that reports that an ISBN-10 value does not have a valid ISBN-10 format. + /// public static Error InvalidIsbn10Format => Error.Validation(description: nameof(InvalidIsbn10Format)); + + /// + /// Gets the error that reports that an ISBN-13 value does not have a valid ISBN-13 format. + /// public static Error InvalidIsbn13Format => Error.Validation(description: nameof(InvalidIsbn13Format)); + + /// + /// Gets the error that reports that an ISBN format is not a recognized ISBN-10 or ISBN-13 value. + /// public static Error UnknownIsbnFormat => Error.Unexpected(description: nameof(UnknownIsbnFormat)); + + /// + /// Gets the error that reports that the book cannot be added to the series because the series already contains it. + /// public static Error TheBookIsAlreadyInTheSeries => Error.Forbidden(description: nameof(TheBookIsAlreadyInTheSeries)); + + /// + /// Gets the error that reports that the book cannot be removed from the series because the series does not contain it. + /// public static Error TheBookIsNotInTheSeries => Error.Forbidden(description: nameof(TheBookIsNotInTheSeries)); + + /// + /// Gets the error that reports that an ASIN must be exactly 10 characters long. + /// public static Error AsinMustBe10CharactersLong => Error.Validation(description: nameof(AsinMustBe10CharactersLong)); + + /// + /// Gets the error that reports that a Goodreads identifier is not made of digits. + /// public static Error GoodreadsIdMustBeNumeric => Error.Validation(description: nameof(GoodreadsIdMustBeNumeric)); + + /// + /// Gets the error that reports that an LCCN does not have a valid Library of Congress Control Number format. + /// public static Error InvalidLccnFormat => Error.Validation(description: nameof(InvalidLccnFormat)); + + /// + /// Gets the error that reports that an OCLC number does not have a valid OCLC format. + /// public static Error InvalidOclcFormat => Error.Validation(description: nameof(InvalidOclcFormat)); + + /// + /// Gets the error that reports that an Open Library identifier does not have a valid format. + /// public static Error InvalidOpenLibraryId => Error.Validation(description: nameof(InvalidOpenLibraryId)); + + /// + /// Gets the error that reports that a LibraryThing identifier exceeds the maximum length of 50 characters. + /// public static Error LibraryThingIdMustBeMaximum50CharactersLong => Error.Validation(description: nameof(LibraryThingIdMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that a Google Books identifier must be exactly 12 characters long. + /// public static Error GoogleBooksIdMustBe12CharactersLong => Error.Validation(description: nameof(GoogleBooksIdMustBe12CharactersLong)); + + /// + /// Gets the error that reports that a Google Books identifier contains characters other than letters, digits, underscores and hyphens. + /// public static Error InvalidGoogleBooksIdFormat => Error.Validation(description: nameof(InvalidGoogleBooksIdFormat)); + + /// + /// Gets the error that reports that a Barnes and Noble identifier must be exactly 10 characters long. + /// public static Error BarnesAndNoblesIdMustBe10CharactersLong => Error.Validation(description: nameof(BarnesAndNoblesIdMustBe10CharactersLong)); + + /// + /// Gets the error that reports that a Barnes and Noble identifier is not made of digits. + /// public static Error InvalidBarnesAndNoblesIdFormat => Error.Validation(description: nameof(InvalidBarnesAndNoblesIdFormat)); + + /// + /// Gets the error that reports that an Apple Books identifier does not have the expected id prefix followed by digits. + /// public static Error InvalidAppleBooksIdFormat => Error.Validation(description: nameof(InvalidAppleBooksIdFormat)); + + /// + /// Gets the error that reports that the publisher of a book exceeds the maximum length of 100 characters. + /// public static Error PublisherMustBeMaximum100CharactersLong => Error.Validation(description: nameof(PublisherMustBeMaximum100CharactersLong)); + + /// + /// Gets the error that reports that the page count of a book must be greater than zero. + /// public static Error PageCountMustBeGreaterThanZero => Error.Validation(description: nameof(PageCountMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that a book format is not a recognized value. + /// public static Error UnknownBookFormat => Error.Validation(description: nameof(UnknownBookFormat)); + + /// + /// Gets the error that reports that the edition of a book exceeds the maximum length of 50 characters. + /// public static Error EditionMustBeMaximum50CharactersLong => Error.Validation(description: nameof(EditionMustBeMaximum50CharactersLong)); + + /// + /// Gets the error that reports that the volume number of a book must be greater than zero. + /// public static Error VolumeNumberMustBeGreaterThanZero => Error.Validation(description: nameof(VolumeNumberMustBeGreaterThanZero)); + + /// + /// Gets the error that reports that the book library cannot be . + /// public static Error BookLibraryCannotBeNull => Error.Validation(description: nameof(BookLibraryCannotBeNull)); + + /// + /// Gets the error that reports that the file path of a book cannot be empty. + /// public static Error BookPathCannotBeEmpty => Error.Validation(description: nameof(BookPathCannotBeEmpty)); + + /// + /// Gets the error that reports that the file path of a book exceeds the maximum length of 2048 characters. + /// public static Error BookPathMustBeMaximum2048CharactersLong => Error.Validation(description: nameof(BookPathMustBeMaximum2048CharactersLong)); + + /// + /// Gets the error that reports that a book file path does not reside within any of the content locations of the library. + /// public static Error BookPathMustBeWithinLibraryContentLocations => Error.Validation(description: nameof(BookPathMustBeWithinLibraryContentLocations)); + + /// + /// Gets the error that reports that a book identifier cannot be empty. + /// public static Error BookIdCannotBeEmpty => Error.Validation(description: nameof(BookIdCannotBeEmpty)); + + /// + /// Gets the error that reports that the cover image of a book cannot be . + /// public static Error BookCoverCannotBeNull => Error.Validation(description: nameof(BookCoverCannotBeNull)); + + /// + /// Gets the error that reports that the requested book does not exist. + /// public static Error BookNotFound => Error.NotFound(description: nameof(BookNotFound)); } } diff --git a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs index 53c0c9a5..04ce2b8c 100644 --- a/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs +++ b/src/Lumina.Domain/Common/Models/Core/AggregateRoot.cs @@ -11,6 +11,9 @@ namespace Lumina.Domain.Common.Models.Core; /// The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type. public abstract class AggregateRoot : Entity where TId : notnull { + /// + /// The domain events raised by this aggregate root that have not been collected yet. + /// protected readonly List _domainEvents = []; /// diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/Directory.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/Directory.cs index 7222d01d..5539381e 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/Directory.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/Directory.cs @@ -1,6 +1,5 @@ #region ========================================================================= USING ===================================================================================== using Lumina.Domain.Common.Primitives; - using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects; using Lumina.Domain.SharedKernel.Common.Enums.FileSystem; using System; @@ -49,6 +48,7 @@ public sealed class Directory : FileSystemItem /// /// Creates a new instance of the class. /// + /// The file system path of the directory. /// The name of the directory. /// The date and time the directory was created. Can be optional if unknown. /// The date and time the directory was last modified. Can be optional if unknown. @@ -86,6 +86,7 @@ public sealed class Directory : FileSystemItem /// /// Creates a new instance of the class. /// + /// The unique identifier of the directory in the file system path. /// The name of the directory. /// The date and time the directory was created. Can be optional if unknown. /// The date and time the directory was last modified. Can be optional if unknown. diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/File.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/File.cs index 92834db3..941244ca 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/File.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Entities/File.cs @@ -1,6 +1,5 @@ #region ========================================================================= USING ===================================================================================== using Lumina.Domain.Common.Primitives; - using Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext.FileSystemManagementAggregate.ValueObjects; using Lumina.Domain.SharedKernel.Common.Enums.FileSystem; using Lumina.Domain.Common.Errors; @@ -49,6 +48,7 @@ public sealed class File : FileSystemItem /// /// Creates a new instance of the class. /// + /// The file system path of the file. /// The name of the file. /// The date and time the file was created. Can be optional if unknown. /// The date and time the file was last modified. Can be optional if unknown. diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DriveService.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DriveService.cs index 5bd68ba7..1c431a17 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DriveService.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DriveService.cs @@ -24,6 +24,7 @@ public class DriveService : IDriveService /// Initializes a new instance of the class. /// /// Injected service used to interact with the local filesystem. + /// Injected facade service for platform contextual services. public DriveService(IFileSystem fileSystem, IPlatformContextManager platformContextManager) { _fileSystem = fileSystem; diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileService.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileService.cs index b2d098a9..6b2cde43 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileService.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileService.cs @@ -322,6 +322,14 @@ public class FileService : IFileService return _environmentContext.FileProviderService.DeleteFile(path); } + /// + /// Reads the file at the specified . + /// + /// + /// This method is a placeholder that always reports success without reading the file, so it has no error path yet. + /// + /// The identifier of the file system path of the file to read. + /// A that currently always contains . public Result ReadFile(FileSystemPathId path) { return true; diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileTypeService.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileTypeService.cs index e366b8e7..f6ec05cf 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileTypeService.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/FileTypeService.cs @@ -123,7 +123,7 @@ public class FileTypeService : IFileTypeService /// Identifies the image type based on the provided header bytes. /// /// The first bytes of the file, typically used to identify the file type. - /// The type of the image, or if unrecognized. + /// The type of the image, or if unrecognized. private static ImageType IdentifyHeader(byte[] firstBytes) { if (Encoding.ASCII.GetBytes("BM").SequenceEqual(firstBytes[..2])) diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/IPathService.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/IPathService.cs index a8bbb10f..86aa07ad 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/IPathService.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/IPathService.cs @@ -35,7 +35,7 @@ public interface IPathService /// Tries to combine with . /// /// The path to be combined. - /// The name to be combined with the path. + /// The name to be combined with the path. /// An containing the combined path, or an error. Result CombinePath(string path, string name); diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/IPathStrategy.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/IPathStrategy.cs index 01b544fa..ad9f6fab 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/IPathStrategy.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/IPathStrategy.cs @@ -11,6 +11,9 @@ namespace Lumina.Domain.Core.BoundedContexts.FileSystemManagementBoundedContext. /// public interface IPathStrategy { + /// + /// Gets the character used to separate path segments on the current platform. + /// char PathSeparator { get; } /// @@ -32,7 +35,7 @@ public interface IPathStrategy /// Tries to combine with . /// /// The path to be combined. - /// The name to be combined with the path. + /// The name to be combined with the path. /// An containing the combined path, or an error. Result CombinePath(FileSystemPathId path, string name); diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategy.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategy.cs index 0f2f6010..33bfbba6 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategy.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/UnixPathStrategy.cs @@ -19,6 +19,9 @@ public class UnixPathStrategy : IUnixPathStrategy { private readonly IFileSystem _fileSystem; + /// + /// Gets the character used to separate path segments on UNIX platforms. + /// public char PathSeparator => '/'; /// diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategy.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategy.cs index efb203ca..49aabdc5 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategy.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Strategies/Path/WindowsPathStrategy.cs @@ -19,6 +19,9 @@ public class WindowsPathStrategy : IWindowsPathStrategy { private readonly IFileSystem _fileSystem; + /// + /// Gets the character used to separate path segments on Windows platforms. + /// public char PathSeparator => '\\'; /// diff --git a/src/Lumina.Domain/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryScanAggregate/Services/Jobs/MediaLibraryScanJob.cs b/src/Lumina.Domain/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryScanAggregate/Services/Jobs/MediaLibraryScanJob.cs index 1a654e80..5cdb2f0f 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryScanAggregate/Services/Jobs/MediaLibraryScanJob.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/LibraryManagementBoundedContext/LibraryScanAggregate/Services/Jobs/MediaLibraryScanJob.cs @@ -16,6 +16,9 @@ namespace Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.Lib /// public abstract class MediaLibraryScanJob : IMediaLibraryScanJob { + /// + /// The number of parent media library scan jobs whose payloads have completed and triggered this job. It is incremented atomically, because jobs can run in parallel. + /// protected int parentsPayloadsExecuted; /// diff --git a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Episode.cs b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Episode.cs index fa923684..73245f9c 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Episode.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Episode.cs @@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi [DebuggerDisplay("{Id}: {Title}")] public sealed class Episode : Entity { + /// + /// Initializes a new instance of the class. + /// + /// The unique identifier of the episode. public Episode(EpisodeId id) : base(id) { } diff --git a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Season.cs b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Season.cs index 54073a8f..d6329125 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Season.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/Entities/Season.cs @@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi [DebuggerDisplay("{Id}: {Title}")] public sealed class Season : Entity { + /// + /// Initializes a new instance of the class. + /// + /// The unique identifier of the season. public Season(SeasonId id) : base(id) { } diff --git a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/TvShow.cs b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/TvShow.cs index 9c089648..4e4b1a42 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/TvShow.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/VideoLibraryBoundedContext/TvShowLibraryAggregate/TvShow.cs @@ -12,6 +12,10 @@ namespace Lumina.Domain.Core.BoundedContexts.VideoLibraryBoundedContext.TvShowLi [DebuggerDisplay("{Id}: {Title}")] public sealed class TvShow : Entity { + /// + /// Initializes a new instance of the class. + /// + /// The unique identifier of the TV show. public TvShow(TvShowId id) : base(id) { } diff --git a/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/Book.cs b/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/Book.cs index 9f4ccca6..6f73e385 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/Book.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/Book.cs @@ -93,7 +93,7 @@ public sealed class Book : AggregateRoot public Optional GoogleBooksId { get; private set; } /// - /// Gets the Barnes & Noble ID of the book, if applicable. + /// Gets the Barnes & Noble ID of the book, if applicable. /// public Optional BarnesAndNobleId { get; private set; } @@ -136,7 +136,7 @@ public sealed class Book : AggregateRoot /// The optional Open Library ID of the book. /// The optional LibraryThing ID of the book. /// The optional Google Books ID of the book. - /// The optional Barnes & Noble ID of the book. + /// The optional Barnes & Noble ID of the book. /// The optional Apple Books ID of the book. /// The date and time when the entity was created. /// The date and time when the entity was last updated. @@ -208,7 +208,7 @@ public sealed class Book : AggregateRoot /// The optional Open Library ID of the book. /// The optional LibraryThing ID of the book. /// The optional Google Books ID of the book. - /// The optional Barnes & Noble ID of the book. + /// The optional Barnes & Noble ID of the book. /// The optional Apple Books ID of the book. /// The list of ISBNs of the book. /// The list of media contributors of the book, each carrying the role the contributor played. @@ -282,7 +282,7 @@ public sealed class Book : AggregateRoot /// The optional Open Library ID of the book. /// The optional LibraryThing ID of the book. /// The optional Google Books ID of the book. - /// The optional Barnes & Noble ID of the book. + /// The optional Barnes & Noble ID of the book. /// The optional Apple Books ID of the book. /// The date and time when the entity was created. /// The date and time when the entity was last updated. diff --git a/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookSeriesId.cs b/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookSeriesId.cs index 67c9d8f4..4027baf6 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookSeriesId.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/WrittenContentLibraryBoundedContext/BookLibraryAggregate/ValueObjects/BookSeriesId.cs @@ -13,6 +13,9 @@ namespace Lumina.Domain.Core.BoundedContexts.WrittenContentLibraryBoundedContext [DebuggerDisplay("{Value}")] public sealed class BookSeriesId : ValueObject { + /// + /// Gets the unique identifier value of the book series. + /// public Guid Value { get; } /// diff --git a/src/Lumina.Domain/Lumina.Domain.csproj b/src/Lumina.Domain/Lumina.Domain.csproj index 7d68034f..722ab8b4 100644 --- a/src/Lumina.Domain/Lumina.Domain.csproj +++ b/src/Lumina.Domain/Lumina.Domain.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs b/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs index ff960a4d..574d7594 100644 --- a/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs +++ b/src/Lumina.Infrastructure/Common/Errors/Errors.Configuration.cs @@ -9,45 +9,199 @@ namespace Lumina.Infrastructure.Common.Errors; /// public static partial class Errors { + /// + /// Configuration error types. + /// public static class Configuration { + /// + /// Gets the error that reports a validation failure when the database connection string is empty. + /// public static Error DatabaseConnectionStringCannotBeEmpty => Error.Validation(description: nameof(DatabaseConnectionStringCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the media root directory is empty. + /// public static Error MediaRootDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaRootDirectoryCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the media libraries directory is empty. + /// public static Error MediaLibrariesDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaLibrariesDirectoryCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the media books directory is empty. + /// public static Error MediaBooksDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaBooksDirectoryCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the media music directory is empty. + /// public static Error MediaMusicDirectoryCannotBeEmpty => Error.Validation(description: nameof(MediaMusicDirectoryCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the encryption secret key is empty. + /// public static Error EncryptionSecretKeyCannotBeEmpty => Error.Validation(description: nameof(EncryptionSecretKeyCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the encryption secret key is not a valid Base64 string. + /// public static Error EncryptionSecretKeyMustBeABase64String => Error.Validation(description: nameof(EncryptionSecretKeyMustBeABase64String)); + + /// + /// Gets the error that reports a validation failure when the JWT secret key is empty. + /// public static Error JwtSecretKeyCannotBeEmpty => Error.Validation(description: nameof(JwtSecretKeyCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the JWT secret key is shorter than the required 32 characters. + /// public static Error JwtSecretKeyTooShort => Error.Validation(description: nameof(JwtSecretKeyTooShort)); + + /// + /// Gets the error that reports a validation failure when the JWT expiry duration, in minutes, is not a positive number. + /// public static Error JwtExpiryMinutesMustBePositive => Error.Validation(description: nameof(JwtExpiryMinutesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the JWT issuer is empty. + /// public static Error JwtIssuerCannotBeEmpty => Error.Validation(description: nameof(JwtIssuerCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the JWT audience is empty. + /// public static Error JwtAudienceCannotBeEmpty => Error.Validation(description: nameof(JwtAudienceCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when no cross-origin resource sharing origin is configured, or when one of the configured origins is empty. + /// public static Error CorsOriginsCannotBeEmpty => Error.Validation(description: nameof(CorsOriginsCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when a configured cross-origin resource sharing origin is not the wildcard origin, is not an absolute HTTP or HTTPS URL, or ends with a slash. + /// public static Error CorsOriginIsInvalid => Error.Validation(description: nameof(CorsOriginIsInvalid)); + + /// + /// Gets the error that reports a validation failure when the plugins directory is empty. + /// public static Error PluginsDirectoryCannotBeEmpty => Error.Validation(description: nameof(PluginsDirectoryCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the theme storage path is empty. + /// public static Error ThemeStoragePathCannotBeEmpty => Error.Validation(description: nameof(ThemeStoragePathCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the path of the bundled themes is empty. + /// public static Error ThemeBundledThemesPathCannotBeEmpty => Error.Validation(description: nameof(ThemeBundledThemesPathCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the identifier of the default theme is empty. + /// public static Error ThemeDefaultThemeIdCannotBeEmpty => Error.Validation(description: nameof(ThemeDefaultThemeIdCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the maximum allowed size of a theme archive, in bytes, is not a positive number. + /// public static Error ThemeMaxArchiveBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxArchiveBytesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the maximum allowed expanded size of a theme pack, in bytes, is not a positive number. + /// public static Error ThemeMaxExpandedBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxExpandedBytesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the maximum allowed size of a single file in a theme pack, in bytes, is not a positive number. + /// public static Error ThemeMaxSingleFileBytesMustBePositive => Error.Validation(description: nameof(ThemeMaxSingleFileBytesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the maximum allowed number of entries in a theme pack archive is not a positive number. + /// public static Error ThemeMaxEntriesMustBePositive => Error.Validation(description: nameof(ThemeMaxEntriesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the path of the ffmpeg binary is empty. + /// public static Error TranscodingFfmpegPathCannotBeEmpty => Error.Validation(description: nameof(TranscodingFfmpegPathCannotBeEmpty)); + + /// + /// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs is not a positive number. + /// public static Error TranscodingMaxConcurrentJobsMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs exceeds 64. + /// public static Error TranscodingMaxConcurrentJobsIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsIsTooLarge)); + + /// + /// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user is not a positive number. + /// public static Error TranscodingMaxConcurrentJobsPerUserMustBePositive => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user exceeds 64. + /// public static Error TranscodingMaxConcurrentJobsPerUserIsTooLarge => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserIsTooLarge)); + + /// + /// Gets the error that reports a validation failure when the maximum number of concurrent normalization jobs per user exceeds the global maximum. + /// public static Error TranscodingMaxConcurrentJobsPerUserExceedsGlobal => Error.Validation(description: nameof(TranscodingMaxConcurrentJobsPerUserExceedsGlobal)); + + /// + /// Gets the error that reports a validation failure when the maximum size of the normalized audio cache, in bytes, is not a positive number. + /// public static Error TranscodingMaxCacheBytesMustBePositive => Error.Validation(description: nameof(TranscodingMaxCacheBytesMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the normalization job timeout, in seconds, is not a positive number. + /// public static Error TranscodingJobTimeoutMustBePositive => Error.Validation(description: nameof(TranscodingJobTimeoutMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the normalization job timeout exceeds 86400 seconds. + /// public static Error TranscodingJobTimeoutIsTooLong => Error.Validation(description: nameof(TranscodingJobTimeoutIsTooLong)); + + /// + /// Gets the error that reports a validation failure when the eviction grace period of the normalized audio cache, in seconds, is not a positive number. + /// public static Error TranscodingEvictionGraceSecondsMustBePositive => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsMustBePositive)); + + /// + /// Gets the error that reports a validation failure when the eviction grace period of the normalized audio cache exceeds 86400 seconds. + /// public static Error TranscodingEvictionGraceSecondsIsTooLong => Error.Validation(description: nameof(TranscodingEvictionGraceSecondsIsTooLong)); + + /// + /// Gets the error that reports a validation failure when the configured normalized audio cache directory is not a valid file system path. + /// public static Error TranscodingCacheDirectoryIsInvalid => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInvalid)); + + /// + /// Gets the error that reports a validation failure when the configured normalized audio cache directory is inside the media root, or is the media root itself. + /// public static Error TranscodingCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryIsInsideMediaRoot)); + + /// + /// Gets the error that reports a validation failure when the configured normalized audio cache directory contains the media root. + /// public static Error TranscodingCacheDirectoryContainsMediaRoot => Error.Validation(description: nameof(TranscodingCacheDirectoryContainsMediaRoot)); + + /// + /// Gets the error that reports a validation failure when the configured normalized audio cache directory is a file system root, the application base directory or one of its ancestors, or overlaps the logs or plugins directories. + /// public static Error TranscodingCacheDirectoryIsUnsafeLocation => Error.Validation(description: nameof(TranscodingCacheDirectoryIsUnsafeLocation)); + + /// + /// Gets the error that reports a validation failure when the default normalized audio cache directory, used when no cache directory is configured, is inside the media root. + /// public static Error TranscodingDefaultCacheDirectoryIsInsideMediaRoot => Error.Validation(description: nameof(TranscodingDefaultCacheDirectoryIsInsideMediaRoot)); } } diff --git a/src/Lumina.Infrastructure/Common/Errors/Errors.LibraryScanning.cs b/src/Lumina.Infrastructure/Common/Errors/Errors.LibraryScanning.cs index 40653d00..49df4ce9 100644 --- a/src/Lumina.Infrastructure/Common/Errors/Errors.LibraryScanning.cs +++ b/src/Lumina.Infrastructure/Common/Errors/Errors.LibraryScanning.cs @@ -9,8 +9,14 @@ namespace Lumina.Infrastructure.Common.Errors; /// public static partial class Errors { + /// + /// Media library scan error types. + /// public static class LibraryScanning { + /// + /// Gets the error that reports a failure when the progress tracker of a media library scan job could not be created. + /// public static Error FailedToCreateScanJobProgress => Error.Failure(description: nameof(FailedToCreateScanJobProgress)); } } diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/CorsSettingsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/CorsSettingsDto.cs index 0578ad02..2dbff13a 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/CorsSettingsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/CorsSettingsDto.cs @@ -5,11 +5,14 @@ using System.Diagnostics; namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; /// -/// Data transfer object for deserializing media settings. +/// Data transfer object for deserializing cross-origin resource sharing settings. /// [DebuggerDisplay("{SECTION_NAME}")] public class CorsSettingsDto { + /// + /// The name of the configuration section that holds the cross-origin resource sharing settings. + /// public const string SECTION_NAME = "CorsSettings"; /// diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/DatabaseSettingsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/DatabaseSettingsDto.cs index affe88f0..30872270 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/DatabaseSettingsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/DatabaseSettingsDto.cs @@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; [DebuggerDisplay("{SECTION_NAME}")] public class DatabaseSettingsDto { + /// + /// The name of the configuration section that holds the database connection strings. + /// public const string SECTION_NAME = "ConnectionStrings"; /// diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/EncryptionSettingsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/EncryptionSettingsDto.cs index fc9f2894..99070166 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/EncryptionSettingsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/EncryptionSettingsDto.cs @@ -5,15 +5,18 @@ using System.Diagnostics; namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; /// -/// Data transfer object for deserializing media settings. +/// Data transfer object for deserializing encryption settings. /// [DebuggerDisplay("{SECTION_NAME}")] public class EncryptionSettingsDto { + /// + /// The name of the configuration section that holds the encryption settings. + /// public const string SECTION_NAME = "EncryptionSettings"; /// - /// Gets or sets the root directory where media files are stored. + /// Gets or sets the Base64 encoded secret key used to encrypt and decrypt protected data. /// public required string SecretKey { get; init; } } diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/JwtSettingsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/JwtSettingsDto.cs index c390263f..cf952d5d 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/JwtSettingsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/JwtSettingsDto.cs @@ -5,11 +5,14 @@ using System.Diagnostics; namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; /// -/// Data transfer object for deserializing media settings. +/// Data transfer object for deserializing JSON Web Token settings. /// [DebuggerDisplay("{SECTION_NAME}")] public class JwtSettingsDto { + /// + /// The name of the configuration section that holds the JSON Web Token settings. + /// public const string SECTION_NAME = "JwtSettings"; /// diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/ThemeEngineOptionsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/ThemeEngineOptionsDto.cs index 1a416220..1b7ca13b 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/ThemeEngineOptionsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/ThemeEngineOptionsDto.cs @@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; [DebuggerDisplay("Section name: {SECTION_NAME}")] public sealed class ThemeEngineOptionsDto { + /// + /// The name of the configuration section that holds the theme engine settings. + /// public const string SECTION_NAME = "ThemeEngine"; /// diff --git a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/TranscodingSettingsDto.cs b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/TranscodingSettingsDto.cs index 140a1771..eb34e912 100644 --- a/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/TranscodingSettingsDto.cs +++ b/src/Lumina.Infrastructure/Common/Models/DTO/Configuration/TranscodingSettingsDto.cs @@ -10,6 +10,9 @@ namespace Lumina.Infrastructure.Common.Models.DTO.Configuration; [DebuggerDisplay("Section name: {SECTION_NAME}")] public sealed class TranscodingSettingsDto { + /// + /// The name of the configuration section that holds the settings of the audio normalization pipeline. + /// public const string SECTION_NAME = "TranscodingSettings"; /// diff --git a/src/Lumina.Infrastructure/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/TrackNormalizationService.cs b/src/Lumina.Infrastructure/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/TrackNormalizationService.cs index e81ff6ac..a3d5a2ea 100644 --- a/src/Lumina.Infrastructure/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/TrackNormalizationService.cs +++ b/src/Lumina.Infrastructure/Core/MediaLibrary/AudioLibrary/MusicLibrary/Playback/TrackNormalizationService.cs @@ -718,6 +718,7 @@ internal sealed class TrackNormalizationService : ITrackNormalizationService, ID /// /// Runs ffmpeg to write the normalized audio of a track into a temporary directory, and builds the index of the produced segments. /// + /// The opaque identifier of the cache entry the normalized audio is produced for. /// The track, the delivery decision and the quality cap the normalized audio is produced with. /// The path of the private snapshot of the stored audio file, which was copied from the validated handle. /// The container and codec combination the normalized audio is produced in. diff --git a/src/Lumina.Infrastructure/Core/MediaLibrary/Management/Scanning/Jobs/Audio/Music/MusicMediaLibraryScanMetadataEnricher.cs b/src/Lumina.Infrastructure/Core/MediaLibrary/Management/Scanning/Jobs/Audio/Music/MusicMediaLibraryScanMetadataEnricher.cs index 2c631cb0..85daaa66 100644 --- a/src/Lumina.Infrastructure/Core/MediaLibrary/Management/Scanning/Jobs/Audio/Music/MusicMediaLibraryScanMetadataEnricher.cs +++ b/src/Lumina.Infrastructure/Core/MediaLibrary/Management/Scanning/Jobs/Audio/Music/MusicMediaLibraryScanMetadataEnricher.cs @@ -470,7 +470,7 @@ internal sealed class MusicMediaLibraryScanMetadataEnricher : IMediaLibraryScanM } /// - /// Finds the media contributor with the name of the provided , or creates it, caching it by its normalized display name + /// Finds the media contributors with the names of the provided , or creates them, caching them by their normalized display name /// so that a contributor is only created once even when the same person is discovered for many items of the same page. /// /// The metadata contributors to resolve. diff --git a/src/Lumina.Infrastructure/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Reading/ReadingContentSanitizer.cs b/src/Lumina.Infrastructure/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Reading/ReadingContentSanitizer.cs index 9ca2e837..bb68caed 100644 --- a/src/Lumina.Infrastructure/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Reading/ReadingContentSanitizer.cs +++ b/src/Lumina.Infrastructure/Core/MediaLibrary/WrittenContentLibrary/BookLibrary/Reading/ReadingContentSanitizer.cs @@ -1,7 +1,5 @@ #region ========================================================================= USING ===================================================================================== using Ganss.Xss; -using System; -using System.Collections.Generic; #endregion namespace Lumina.Infrastructure.Core.MediaLibrary.WrittenContentLibrary.BookLibrary.Reading; @@ -12,6 +10,9 @@ namespace Lumina.Infrastructure.Core.MediaLibrary.WrittenContentLibrary.BookLibr /// public static class ReadingContentSanitizer { + /// + /// The name of the attribute that carries the opaque key of a resource referenced by a reading section, which the reader replaces with the URL of the resource endpoint. + /// public const string RESOURCE_ATTRIBUTE = "data-lumina-resource"; // The sanitizer that preserves the style attribute, used for the users who want the books to keep their original look, and the diff --git a/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj b/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj index 68c0bb03..ff092a01 100644 --- a/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj +++ b/src/Lumina.Infrastructure/Lumina.Infrastructure.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 True diff --git a/src/Lumina.Plugins.Contracts/Lumina.Plugins.Contracts.csproj b/src/Lumina.Plugins.Contracts/Lumina.Plugins.Contracts.csproj index fb1d93bf..34d399e0 100644 --- a/src/Lumina.Plugins.Contracts/Lumina.Plugins.Contracts.csproj +++ b/src/Lumina.Plugins.Contracts/Lumina.Plugins.Contracts.csproj @@ -5,8 +5,6 @@ enable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 diff --git a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs index 95b3d951..ed229315 100644 --- a/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs +++ b/src/Lumina.Presentation.Api/Common/DependencyInjection/PresentationApiLayerServices.cs @@ -32,7 +32,14 @@ namespace Lumina.Presentation.Api.Common.DependencyInjection; [ExcludeFromCodeCoverage] public static class PresentationApiLayerServices { + /// + /// The name of the rate limiting policy applied to the authentication endpoints. + /// public const string AUTHENTICATION_RATE_LIMIT_POLICY = "authenticationPolicy"; + + /// + /// The name of the rate limiting policy applied to the endpoints that stream tracks. + /// public const string TRACK_STREAM_RATE_LIMIT_POLICY = "trackStreamPolicy"; /// diff --git a/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs b/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs index bcc445d3..a7718be8 100644 --- a/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs +++ b/src/Lumina.Presentation.Api/Common/Http/HttpContextItemKeys.cs @@ -5,5 +5,8 @@ namespace Lumina.Presentation.Api.Common.Http; /// public static class HttpContextItemKeys { + /// + /// The key under which the errors of the current HTTP request are stored in the items collection of the HTTP context. + /// public const string ERRORS = "errors"; } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Permissions.cs b/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Permissions.cs index 1d89716c..469bf7be 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Permissions.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Permissions.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Permissions { + /// + /// The route for getting the authorization permissions. + /// public const string GET_PERMISSIONS = "/auth/permissions"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Roles.cs b/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Roles.cs index ba1fd0a0..6f72cc83 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Roles.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Admin/ApiRoutes.Roles.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class Roles { + /// + /// The route for getting the permissions granted to a role. + /// public const string GET_ROLE_PERMISSIONS_BY_ROLE_ID = "/auth/roles/{roleId}/permissions"; + + /// + /// The route for getting the roles. + /// public const string GET_ROLES = "/auth/roles"; + + /// + /// The route for creating a role. + /// public const string CREATE_ROLE = "/auth/roles"; + + /// + /// The route for updating a role. + /// public const string UPDATE_ROLE = "/auth/roles"; + + /// + /// The route for deleting a role. + /// public const string DELETE_ROLE = "/auth/roles/{roleId}"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Favorites/ApiRoutes.Favorites.cs b/src/Lumina.Presentation.Api/Common/Routes/Favorites/ApiRoutes.Favorites.cs index 4b4c95f3..699f2988 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Favorites/ApiRoutes.Favorites.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Favorites/ApiRoutes.Favorites.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Favorites { + /// + /// The route for getting the favorites of the current user. + /// public const string GET_FAVORITES = "/users/me/favorites"; + + /// + /// The route for adding a media item to the favorites of the current user. + /// public const string ADD_FAVORITE = "/users/me/favorites"; + + /// + /// The route for removing a media item from the favorites of the current user. + /// public const string REMOVE_FAVORITE = "/users/me/favorites/{mediaKind}/{mediaItemId}"; + + /// + /// The route for getting the favorite status of a media item of the current user. + /// public const string GET_FAVORITE_STATUS = "/users/me/favorites/status"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Directories.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Directories.cs index 6292274a..b86bb496 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Directories.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Directories.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Directories { + /// + /// The route for getting the directories of a path. + /// public const string GET_DIRECTORIES = "/directories/get-directories"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Drives.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Drives.cs index d61baeee..0b4e2c86 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Drives.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Drives.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Drives { + /// + /// The route for getting the drives of the file system. + /// public const string GET_DRIVES = "/drives/get-drives"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.FileSystem.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.FileSystem.cs index c1d62bb7..a690b5d9 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.FileSystem.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.FileSystem.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class FileSystem { + /// + /// The route for getting the type of the file system. + /// public const string GET_TYPES = "/file-system/get-type"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Files.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Files.cs index 8450b778..43d12df4 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Files.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Files.cs @@ -10,7 +10,14 @@ public static partial class ApiRoutes /// public static class Files { + /// + /// The route for getting the files of a directory as a tree. + /// public const string GET_TREE_FILES = "/files/get-tree-files"; + + /// + /// The route for getting the files of a directory. + /// public const string GET_FILES = "/files/get-files"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Path.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Path.cs index e30d3c1d..13cb2e21 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Path.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Path.cs @@ -10,12 +10,39 @@ public static partial class ApiRoutes /// public static class Path { + /// + /// The route for getting the root of a file system path. + /// public const string GET_PATH_ROOT = "/path/get-path-root"; + + /// + /// The route for getting the separator used by the file system paths of the current platform. + /// public const string GET_PATH_SEPARATOR = "/path/get-path-separator"; + + /// + /// The route for getting the parent of a file system path. + /// public const string GET_PATH_PARENT = "/path/get-path-parent"; + + /// + /// The route for combining the segments of a file system path. + /// public const string COMBINE = "/path/combine"; + + /// + /// The route for splitting a file system path into its segments. + /// public const string SPLIT = "/path/split"; + + /// + /// The route for validating a file system path. + /// public const string VALIDATE = "/path/validate"; + + /// + /// The route for checking whether a file system path exists. + /// public const string CHECK_PATH_EXISTS = "/path/check-path-exists"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Thumbnails.cs b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Thumbnails.cs index fff0fffe..cfe3cd83 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Thumbnails.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/FileSystemManagement/ApiRoutes.Thumbnails.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Thumbnails { + /// + /// The route for getting the thumbnail of a file. + /// public const string GET_THUMBNAIL = "/thumbnails/get-thumbnail"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Albums.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Albums.cs index 35d0bd7a..737254b7 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Albums.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Albums.cs @@ -10,16 +10,59 @@ public static partial class ApiRoutes /// public static class Albums { + /// + /// The route for getting the albums of an artist in a library. + /// public const string GET_ARTIST_ALBUMS = "/libraries/{libraryId}/artists/{artistId}/albums"; + + /// + /// The route for getting the albums of an artist in a library in their lightweight form. + /// public const string GET_ARTIST_ALBUMS_LITE = "/libraries/{libraryId}/artists/{artistId}/albums/lite"; + + /// + /// The route for adding an album to an artist in a library. + /// public const string ADD_ALBUM = "/libraries/{libraryId}/artists/{artistId}/albums"; + + /// + /// The route for getting an album of an artist in a library. + /// public const string GET_ALBUM_BY_ID = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for updating an album of an artist in a library. + /// public const string UPDATE_ALBUM = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for updating the cover of an album of an artist in a library. + /// public const string UPDATE_ALBUM_COVER = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/cover"; + + /// + /// The route for deleting an album of an artist in a library. + /// public const string DELETE_ALBUM = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for getting the deleted albums of a library. + /// public const string GET_DELETED_ALBUMS = "/libraries/{libraryId}/albums/deleted-items"; + + /// + /// The route for restoring a deleted album of an artist in a library. + /// public const string RESTORE_ALBUM = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/restore"; + + /// + /// The route for getting the tracks of an album of an artist in a library. + /// public const string GET_ALBUM_TRACKS = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks"; + + /// + /// The route for getting the tracks of an album of an artist in a library in their lightweight form. + /// public const string GET_ALBUM_TRACKS_LITE = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/lite"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Artists.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Artists.cs index 9504495b..e5e0fdb1 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Artists.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Artists.cs @@ -10,14 +10,49 @@ public static partial class ApiRoutes /// public static class Artists { + /// + /// The route for getting an artist of a library. + /// public const string GET_ARTIST_BY_ID = "/libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for getting the artists of a library. + /// public const string GET_ARTISTS = "/libraries/{libraryId}/artists"; + + /// + /// The route for getting the artists of a library in their lightweight form. + /// public const string GET_ARTISTS_LITE = "/libraries/{libraryId}/artists/lite"; + + /// + /// The route for adding an artist to a library. + /// public const string ADD_ARTIST = "/libraries/{libraryId}/artists"; + + /// + /// The route for updating an artist of a library. + /// public const string UPDATE_ARTIST = "/libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for updating the cover of an artist of a library. + /// public const string UPDATE_ARTIST_COVER = "/libraries/{libraryId}/artists/{artistId}/cover"; + + /// + /// The route for deleting an artist of a library. + /// public const string DELETE_ARTIST = "/libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for getting the deleted artists of a library. + /// public const string GET_DELETED_ARTISTS = "/libraries/{libraryId}/artists/deleted-items"; + + /// + /// The route for restoring a deleted artist of a library. + /// public const string RESTORE_ARTIST = "/libraries/{libraryId}/artists/{artistId}/restore"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Tracks.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Tracks.cs index bbf56a7e..ec6d353e 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Tracks.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/AudioLibrary/MusicLibrary/ApiRoutes.Tracks.cs @@ -10,15 +10,54 @@ public static partial class ApiRoutes /// public static class Tracks { + /// + /// The route for adding a track to an album of an artist in a library. + /// public const string ADD_TRACK = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks"; + + /// + /// The route for getting a track of an album of an artist in a library. + /// public const string GET_TRACK_BY_ID = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for getting a shuffled selection of the tracks of a library. + /// public const string SHUFFLE_TRACKS = "/libraries/{libraryId}/tracks/shuffle"; + + /// + /// The route for updating a track of an album of an artist in a library. + /// public const string UPDATE_TRACK = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for deleting a track of an album of an artist in a library. + /// public const string DELETE_TRACK = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for getting the deleted tracks of a library. + /// public const string GET_DELETED_TRACKS = "/libraries/{libraryId}/tracks/deleted-items"; + + /// + /// The route for restoring a deleted track of an album of an artist in a library. + /// public const string RESTORE_TRACK = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/restore"; + + /// + /// The route for streaming a track of an album of an artist in a library. + /// public const string STREAM_TRACK = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/stream"; + + /// + /// The route for streaming a segment of a track delivery of a track of an album of an artist in a library. + /// public const string STREAM_TRACK_SEGMENT = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/stream/deliveries/{deliveryId}/segments/{segmentIndex}"; + + /// + /// The route for getting the playback manifest of a track of an album of an artist in a library. + /// public const string GET_PLAYBACK_MANIFEST = "/libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/playback-manifest"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/Management/ApiRoutes.Libraries.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/Management/ApiRoutes.Libraries.cs index 5a0d88dc..cd21bca1 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/Management/ApiRoutes.Libraries.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/Management/ApiRoutes.Libraries.cs @@ -10,24 +10,99 @@ public static partial class ApiRoutes /// public static class Libraries { + /// + /// The route for getting a media library. + /// public const string GET_LIBRARY_BY_ID = "/libraries/{id}"; + + /// + /// The route for getting the media libraries. + /// public const string GET_LIBRARIES = "/libraries"; + + /// + /// The route for getting the enabled media libraries. + /// public const string GET_ENABLED_LIBRARIES = "/libraries/enabled"; + + /// + /// The route for adding a media library. + /// public const string ADD_LIBRARY = "/libraries"; + + /// + /// The route for updating a media library. + /// public const string UPDATE_LIBRARY = "/libraries/{id}"; + + /// + /// The route for deleting a media library. + /// public const string DELETE_LIBRARY = "/libraries/{id}"; + + /// + /// The route for starting a scan of all media libraries. + /// public const string SCAN_LIBRARIES = "/libraries/scans"; + + /// + /// The route for starting a scan of a media library. + /// public const string SCAN_LIBRARY = "/libraries/{id}/scans"; + + /// + /// The route for getting the progress of a scan of a media library. + /// public const string LIBRARY_SCAN_PROGRESS = "/libraries/{libraryId}/scans/{scanId}/progress"; + + /// + /// The route for getting the scans of media libraries that are currently running. + /// public const string GET_RUNNING_LIBRARIES_SCAN = "/libraries/scans/running"; + + /// + /// The route for cancelling the running scan of all media libraries. + /// public const string CANCEL_LIBRARIES_SCAN = "/libraries/scans/cancel"; + + /// + /// The route for cancelling a scan of a media library. + /// public const string CANCEL_LIBRARY_SCAN = "/libraries/{libraryId}/scans/{scanId}/cancel"; + + /// + /// The route for getting the metadata providers available to a media library. + /// public const string GET_LIBRARY_METADATA_PROVIDERS = "/libraries/{libraryId}/metadata-providers"; + + /// + /// The route for getting the artwork providers available to a media library. + /// public const string GET_LIBRARY_ARTWORK_PROVIDERS = "/libraries/{libraryId}/artwork-providers"; + + /// + /// The route for getting the path template parts available to a media library type. + /// public const string GET_LIBRARY_PATH_TEMPLATE_PARTS = "/libraries/path-template-parts/{libraryType}"; + + /// + /// The route for getting the book readers available to a media library. + /// public const string GET_LIBRARY_BOOK_READERS = "/libraries/{libraryId}/book-readers"; + + /// + /// The route for getting the metadata providers available to a media library type. + /// public const string GET_LIBRARY_TYPE_METADATA_PROVIDERS = "/libraries/metadata-providers/{libraryType}"; + + /// + /// The route for getting the artwork providers available to a media library type. + /// public const string GET_LIBRARY_TYPE_ARTWORK_PROVIDERS = "/libraries/artwork-providers/{libraryType}"; + + /// + /// The route for getting the book readers available to a media library type. + /// public const string GET_LIBRARY_TYPE_BOOK_READERS = "/libraries/book-readers/{libraryType}"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/Statistics/ApiRoutes.LibraryStatistics.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/Statistics/ApiRoutes.LibraryStatistics.cs index 2eb93dc2..546ad9e2 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/Statistics/ApiRoutes.LibraryStatistics.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/Statistics/ApiRoutes.LibraryStatistics.cs @@ -10,24 +10,99 @@ public static partial class ApiRoutes /// public static class LibraryStatistics { + /// + /// The route for getting the media items recently consumed by the current user. + /// public const string GET_RECENTLY_CONSUMED = "/users/me/consumption-history/recently-consumed"; + + /// + /// The route for getting the most consumed media items of the current user. + /// public const string GET_MOST_CONSUMED = "/users/me/consumption-history/most-consumed"; + + /// + /// The route for getting the consumption statistics of the current user. + /// public const string GET_CONSUMPTION_STATISTICS = "/users/me/consumption-statistics"; + + /// + /// The route for getting the tag consumption of the current user. + /// public const string GET_TAG_CONSUMPTION = "/users/me/consumption-statistics/tags"; + + /// + /// The route for getting the genre consumption of the current user. + /// public const string GET_GENRE_CONSUMPTION = "/users/me/consumption-statistics/genres"; + + /// + /// The route for getting the media items recently consumed by a user. + /// public const string GET_USER_RECENTLY_CONSUMED = "/users/{userId}/consumption-history/recently-consumed"; + + /// + /// The route for getting the most consumed media items of a user. + /// public const string GET_USER_MOST_CONSUMED = "/users/{userId}/consumption-history/most-consumed"; + + /// + /// The route for getting the consumption statistics of a user. + /// public const string GET_USER_CONSUMPTION_STATISTICS = "/users/{userId}/consumption-statistics"; + + /// + /// The route for getting the tag consumption of a user. + /// public const string GET_USER_TAG_CONSUMPTION = "/users/{userId}/consumption-statistics/tags"; + + /// + /// The route for getting the genre consumption of a user. + /// public const string GET_USER_GENRE_CONSUMPTION = "/users/{userId}/consumption-statistics/genres"; + + /// + /// The route for getting the consumption statistics of every user. + /// public const string GET_ALL_USERS_CONSUMPTION_STATISTICS = "/users/consumption-statistics"; + + /// + /// The route for deleting a consumption record of the current user. + /// public const string DELETE_CONSUMPTION_RECORD = "/users/me/consumption-history/{recordId}"; + + /// + /// The route for deleting a consumption record of a user. + /// public const string DELETE_USER_CONSUMPTION_RECORD = "/users/{userId}/consumption-history/{recordId}"; + + /// + /// The route for deleting the consumption history of a media item of the current user in a library. + /// public const string DELETE_CONSUMPTION_ITEM_HISTORY = "/users/me/consumption-history/media-items/{mediaKind}/{mediaItemId}/{libraryId}"; + + /// + /// The route for deleting the consumption history of a media item of a user in a library. + /// public const string DELETE_USER_CONSUMPTION_ITEM_HISTORY = "/users/{userId}/consumption-history/media-items/{mediaKind}/{mediaItemId}/{libraryId}"; + + /// + /// The route for clearing the consumption history of the current user. + /// public const string CLEAR_CONSUMPTION_HISTORY = "/users/me/consumption-history"; + + /// + /// The route for clearing the consumption history of a user. + /// public const string CLEAR_USER_CONSUMPTION_HISTORY = "/users/{userId}/consumption-history"; + + /// + /// The route for clearing the media resume points of the current user. + /// public const string CLEAR_RESUME_POINTS = "/users/me/media-resume-points"; + + /// + /// The route for clearing the media resume points of a user. + /// public const string CLEAR_USER_RESUME_POINTS = "/users/{userId}/media-resume-points"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Library/WrittenContentLibrary/BookLibrary/ApiRoutes.Books.cs b/src/Lumina.Presentation.Api/Common/Routes/Library/WrittenContentLibrary/BookLibrary/ApiRoutes.Books.cs index 36a435ab..d19f22ae 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Library/WrittenContentLibrary/BookLibrary/ApiRoutes.Books.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Library/WrittenContentLibrary/BookLibrary/ApiRoutes.Books.cs @@ -10,18 +10,69 @@ public static partial class ApiRoutes /// public static class Books { + /// + /// The route for getting a book of a library. + /// public const string GET_BOOK_BY_ID = "/libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for getting the books of a library. + /// public const string GET_BOOKS = "/libraries/{libraryId}/books"; + + /// + /// The route for getting the books of a library in their lightweight form. + /// public const string GET_BOOKS_LITE = "/libraries/{libraryId}/books/lite"; + + /// + /// The route for getting the deleted books of a library. + /// public const string GET_DELETED_BOOKS = "/libraries/{libraryId}/books/deleted-items"; + + /// + /// The route for restoring a deleted book of a library. + /// public const string RESTORE_BOOK = "/libraries/{libraryId}/books/{bookId}/restore"; + + /// + /// The route for adding a book to a library. + /// public const string ADD_BOOK = "/libraries/{libraryId}/books"; + + /// + /// The route for updating a book of a library. + /// public const string UPDATE_BOOK = "/libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for deleting a book of a library. + /// public const string DELETE_BOOK = "/libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for updating the cover of a book of a library. + /// public const string UPDATE_BOOK_COVER = "/libraries/{libraryId}/books/{bookId}/cover"; + + /// + /// The route for getting the reading manifest of a book of a library. + /// public const string GET_BOOK_READING_MANIFEST = "/libraries/{libraryId}/books/{bookId}/reading/manifest"; + + /// + /// The route for getting the reading availability of a book of a library. + /// public const string GET_BOOK_READING_AVAILABILITY = "/libraries/{libraryId}/books/{bookId}/reading/availability"; + + /// + /// The route for getting a reading section of a book of a library. + /// public const string GET_BOOK_READING_SECTION = "/libraries/{libraryId}/books/{bookId}/reading/sections/{locationRef}"; + + /// + /// The route for getting a reading resource of a book of a library. + /// public const string GET_BOOK_READING_RESOURCE = "/libraries/{libraryId}/books/{bookId}/reading/resources/{resourceKey}"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Health.cs b/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Health.cs index bad03b91..a4b66cfb 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Health.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Health.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Health { + /// + /// The route for checking the health of the application. + /// public const string CHECK_HEALTH = "/check-health"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Initialization.cs b/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Initialization.cs index 86e190c0..f51e439b 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Initialization.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Maintenance/ApiRoutes.Initialization.cs @@ -10,7 +10,14 @@ public static partial class ApiRoutes /// public static class Initialization { + /// + /// The route for setting up the application. + /// public const string SETUP_APPLICATION = "/initialization"; + + /// + /// The route for checking whether the application is initialized. + /// public const string CHECK_INITIALIZATION = "/initialization"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/MediaConsumption/ApiRoutes.MediaConsumption.cs b/src/Lumina.Presentation.Api/Common/Routes/MediaConsumption/ApiRoutes.MediaConsumption.cs index 980e4eaa..0417c3f9 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/MediaConsumption/ApiRoutes.MediaConsumption.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/MediaConsumption/ApiRoutes.MediaConsumption.cs @@ -10,11 +10,34 @@ public static partial class ApiRoutes /// public static class MediaConsumption { + /// + /// The route for starting the consumption of a media item of a library. + /// public const string START_CONSUMPTION = "/libraries/{libraryId}/media-items/{mediaKind}/{mediaItemId}/consumption-records"; + + /// + /// The route for getting a consumption record of the current user. + /// public const string GET_CONSUMPTION_RECORD = "/users/me/consumption-records/{recordId}"; + + /// + /// The route for reporting the progress of a consumption record of the current user. + /// public const string REPORT_CONSUMPTION_PROGRESS = "/users/me/consumption-records/{recordId}/progress"; + + /// + /// The route for completing a consumption record of the current user. + /// public const string COMPLETE_CONSUMPTION = "/users/me/consumption-records/{recordId}/complete"; + + /// + /// The route for stopping a consumption record of the current user. + /// public const string STOP_CONSUMPTION = "/users/me/consumption-records/{recordId}/stop"; + + /// + /// The route for getting the resume point of a media item of the current user. + /// public const string GET_RESUME_POINT = "/users/me/media-resume-points/{mediaKind}/{mediaItemId}"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Playlists/ApiRoutes.Playlists.cs b/src/Lumina.Presentation.Api/Common/Routes/Playlists/ApiRoutes.Playlists.cs index 6c26c625..0a419803 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Playlists/ApiRoutes.Playlists.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Playlists/ApiRoutes.Playlists.cs @@ -10,15 +10,54 @@ public static partial class ApiRoutes /// public static class Playlists { + /// + /// The route for getting the playlists of the current user. + /// public const string GET_PLAYLISTS = "/users/me/playlists"; + + /// + /// The route for creating a playlist of the current user. + /// public const string CREATE_PLAYLIST = "/users/me/playlists"; + + /// + /// The route for getting a playlist of the current user. + /// public const string GET_PLAYLIST = "/users/me/playlists/{playlistId}"; + + /// + /// The route for updating a playlist of the current user. + /// public const string UPDATE_PLAYLIST = "/users/me/playlists/{playlistId}"; + + /// + /// The route for deleting a playlist of the current user. + /// public const string DELETE_PLAYLIST = "/users/me/playlists/{playlistId}"; + + /// + /// The route for adding an entry to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRY = "/users/me/playlists/{playlistId}/entries"; + + /// + /// The route for adding several entries to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRIES = "/users/me/playlists/{playlistId}/entries-batch"; + + /// + /// The route for adding every track of a music library, an artist or an album to a playlist of the current user. + /// public const string ADD_PLAYLIST_SCOPE_ENTRIES = "/users/me/playlists/{playlistId}/entries-scope"; + + /// + /// The route for removing an entry from a playlist of the current user. + /// public const string REMOVE_PLAYLIST_ENTRY = "/users/me/playlists/{playlistId}/entries/{playlistEntryId}"; + + /// + /// The route for moving an entry within a playlist of the current user. + /// public const string MOVE_PLAYLIST_ENTRY = "/users/me/playlists/{playlistId}/entries/{playlistEntryId}/move"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Plugins/ApiRoutes.Plugins.cs b/src/Lumina.Presentation.Api/Common/Routes/Plugins/ApiRoutes.Plugins.cs index 721e8557..6a31c931 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Plugins/ApiRoutes.Plugins.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Plugins/ApiRoutes.Plugins.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Plugins { + /// + /// The route for getting the installed plugins. + /// public const string GET_PLUGINS = "/plugins"; + + /// + /// The route for getting the settings of a plugin. + /// public const string GET_PLUGIN_SETTINGS = "/plugins/{pluginId}/settings"; + + /// + /// The route for updating the settings of a plugin. + /// public const string UPDATE_PLUGIN_SETTINGS = "/plugins/{pluginId}/settings"; + + /// + /// The route for installing a plugin. + /// public const string INSTALL_PLUGIN = "/plugins"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Scheduling/ApiRoutes.Scheduling.cs b/src/Lumina.Presentation.Api/Common/Routes/Scheduling/ApiRoutes.Scheduling.cs index a57c13f9..5aa0abec 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Scheduling/ApiRoutes.Scheduling.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Scheduling/ApiRoutes.Scheduling.cs @@ -5,16 +5,54 @@ namespace Lumina.Presentation.Api.Common.Routes.Scheduling; /// public static partial class ApiRoutes { + /// + /// Routes for the scheduled jobs of the application. + /// public static class ScheduledJobs { + /// + /// The route for getting the scheduled jobs. + /// public const string GET_SCHEDULED_JOBS = "/scheduled-jobs"; + + /// + /// The route for adding a scheduled job. + /// public const string ADD_SCHEDULED_JOB = "/scheduled-jobs"; + + /// + /// The route for getting the execution history of the scheduled jobs. + /// public const string GET_SCHEDULED_JOB_HISTORY = "/scheduled-jobs/history"; + + /// + /// The route for removing a scheduled job. + /// public const string REMOVE_SCHEDULED_JOB = "/scheduled-jobs/{scheduledJobId}"; + + /// + /// The route for starting a scheduled job. + /// public const string START_SCHEDULED_JOB = "/scheduled-jobs/{scheduledJobId}/start"; + + /// + /// The route for stopping a scheduled job. + /// public const string STOP_SCHEDULED_JOB = "/scheduled-jobs/{scheduledJobId}/stop"; + + /// + /// The route for firing a scheduled job immediately. + /// public const string FIRE_SCHEDULED_JOB = "/scheduled-jobs/{scheduledJobId}/fire"; + + /// + /// The route for getting the display preferences of the scheduler. + /// public const string GET_DISPLAY_PREFERENCES = "/scheduled-jobs/display-preferences"; + + /// + /// The route for updating the display preferences of the scheduler. + /// public const string UPDATE_DISPLAY_PREFERENCES = "/scheduled-jobs/display-preferences"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/Themes/ApiRoutes.Themes.cs b/src/Lumina.Presentation.Api/Common/Routes/Themes/ApiRoutes.Themes.cs index 3c094d40..81c4f5f2 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/Themes/ApiRoutes.Themes.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/Themes/ApiRoutes.Themes.cs @@ -5,17 +5,59 @@ namespace Lumina.Presentation.Api.Common.Routes.Themes; /// public static partial class ApiRoutes { + /// + /// Routes for the themes of the application. + /// public static class Themes { + /// + /// The route for getting the installed themes. + /// public const string GET_THEMES = "/themes"; + + /// + /// The route for installing a theme. + /// public const string INSTALL_THEME = "/themes"; + + /// + /// The route for getting the theme engine settings. + /// public const string GET_THEME_SETTINGS = "/themes/settings"; + + /// + /// The route for getting the current theme. + /// public const string GET_CURRENT_THEME = "/themes/current"; + + /// + /// The route for setting the current theme. + /// public const string SET_CURRENT_THEME = "/themes/current"; + + /// + /// The route for getting a page template of a theme. + /// public const string GET_THEME_TEMPLATE = "/themes/{themeId}/templates/{*pageKey}"; + + /// + /// The route for getting an asset of a theme. + /// public const string GET_THEME_ASSET = "/themes/{themeId}/assets/{*assetPath}"; + + /// + /// The route for getting the archive of a theme. + /// public const string GET_THEME_ARCHIVE = "/themes/{themeId}/archive"; + + /// + /// The route for restoring a deleted theme. + /// public const string RESTORE_THEME = "/themes/{themeId}/restore"; + + /// + /// The route for deleting a theme. + /// public const string DELETE_THEME = "/themes/{themeId}"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authentication.cs b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authentication.cs index 3a922fa5..d1dc3a6a 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authentication.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authentication.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class Authentication { + /// + /// The route for registering a user account. + /// public const string REGISTER_ACCOUNT = "/auth/register"; + + /// + /// The route for logging into a user account. + /// public const string LOGIN_ACCOUNT = "/auth/login"; + + /// + /// The route for recovering the password of a user account. + /// public const string RECOVER_PASSWORD = "/auth/recover-password"; + + /// + /// The route for changing the password of a user account. + /// public const string CHANGE_PASSWORD = "/auth/change-password"; + + /// + /// The route for getting the user accounts. + /// public const string USERS = "/auth/users"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authorization.cs b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authorization.cs index 903356d5..96151985 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authorization.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Authorization.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Authorization { + /// + /// The route for updating the role and permissions of a user. + /// public const string UPDATE_USER_ROLE_AND_PERMISSIONS_BY_USER_ID = "/auth/users/{userId}/role-and-permissions"; + + /// + /// The route for getting the permissions of a user. + /// public const string GET_USER_PERMISSIONS_BY_USER_ID = "/auth/users/{userId}/permissions"; + + /// + /// The route for getting the role of a user. + /// public const string GET_USER_ROLE_BY_USER_ID = "/auth/users/{userId}/role"; + + /// + /// The route for getting the authorization roles and permissions of an account. + /// public const string GET_AUTHORIZATION = "/auth/get-authorization"; } } diff --git a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Users.cs b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Users.cs index 5f5fb5e6..8fa3a96e 100644 --- a/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Users.cs +++ b/src/Lumina.Presentation.Api/Common/Routes/UsersManagement/ApiRoutes.Users.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class Users { + /// + /// The route for getting a user. + /// public const string GET_USER_BY_ID = "/users/{id}"; + + /// + /// The route for getting the settings of the current user. + /// public const string GET_USER_SETTINGS = "/users/me/settings"; // Uses "me" because it is always for the currently authenticated user. + + /// + /// The route for updating the settings of the current user. + /// public const string UPDATE_USER_SETTINGS = "/users/me/settings"; + + /// + /// The route for getting the playback state of the current user. + /// public const string GET_PLAYBACK_STATE = "/users/me/settings/playback-state"; + + /// + /// The route for updating the playback state of the current user. + /// public const string UPDATE_PLAYBACK_STATE = "/users/me/settings/playback-state"; } } diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Permissions/GetPermissions/GetPermissionsEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Permissions/GetPermissions/GetPermissionsEndpoint.cs index 130ad1d5..2ed35c46 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Permissions/GetPermissions/GetPermissionsEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Permissions/GetPermissions/GetPermissionsEndpoint.cs @@ -44,6 +44,7 @@ public class GetPermissionsEndpoint : BaseEndpoint /// /// Gets the list of authorization permissions. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs index 1bf4de5b..f75b8a3d 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs @@ -44,6 +44,7 @@ public class GetRolesEndpoint : BaseEndpoint /// /// Gets the list of authorization roles. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs index 250491b6..0242b1af 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs @@ -44,6 +44,7 @@ public class GetDrivesEndpoint : BaseEndpoint /// /// Gets the list of file system drives. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs index 535d0dac..2b6233c8 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs @@ -42,6 +42,7 @@ public class GetTypeEndpoint : BaseEndpoint /// /// Gets the type of the file system. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs index 6b33c512..4a6e9f63 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs @@ -42,6 +42,7 @@ public class CancelLibrariesScanEndpoint : BaseEndpoint /// /// Cancels a previously started scan of all media libraries. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs index 9c60751c..a2145500 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs @@ -41,8 +41,9 @@ public class CancelLibraryScanEndpoint : BaseEndpoint - /// Cancels a previously started scan of all media libraries. + /// Cancels a previously started scan of a media library. /// + /// The request containing the media library and the scan to cancel. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(CancelLibraryScanRequest request, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs index d06966a9..d2b9d621 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs @@ -43,6 +43,7 @@ public class GetEnabledLibrariesEndpoint : BaseEndpoint /// /// Gets the list of enabled media libraries. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs index a6e7262e..017866eb 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs @@ -43,6 +43,7 @@ public class GetLibrariesEndpoint : BaseEndpoint /// /// Gets the list of media libraries. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs index 1fb92cbd..70be9694 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs @@ -44,6 +44,7 @@ public class GetRunningLibraryScansEndpoint : BaseEndpoint /// Gets the list of ongoing media libraries scans. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs index 51e00320..e4575d71 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs @@ -43,6 +43,7 @@ public class ScanLibrariesEndpoint : BaseEndpoint /// Initiates a scan of all media libraries. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(FastEndpoints.EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs index d7f54d39..6a1a6e2c 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs @@ -44,6 +44,7 @@ public class ScanLibraryEndpoint : BaseEndpoint /// /// Initiates a scan of a media library. /// + /// The request containing the media library to scan. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(ScanLibraryRequest request, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/ApplicationSetup/CheckInitializationEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/ApplicationSetup/CheckInitializationEndpoint.cs index 1c74f417..c569f3c9 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/ApplicationSetup/CheckInitializationEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/ApplicationSetup/CheckInitializationEndpoint.cs @@ -43,6 +43,7 @@ public class CheckInitializationEndpoint : BaseEndpoint /// /// Checks the initialization status of the application (if the Admin account exists). /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/CheckHealthEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/CheckHealthEndpoint.cs index 8bbd5e38..2ee53cb1 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/CheckHealthEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Maintenance/CheckHealthEndpoint.cs @@ -29,6 +29,7 @@ public class CheckHealthEndpoint : BaseEndpoint /// /// Gwts the health status of the backend system. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs index 2dd0a159..0e2a220b 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs @@ -44,6 +44,7 @@ public class GetPluginsEndpoint : BaseEndpoint /// /// Gets the list of all the detected plugins. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Scheduling/GetSchedulerDisplayPreferences/GetSchedulerDisplayPreferencesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Scheduling/GetSchedulerDisplayPreferences/GetSchedulerDisplayPreferencesEndpoint.cs index 82b8cbd7..be926e1b 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Scheduling/GetSchedulerDisplayPreferences/GetSchedulerDisplayPreferencesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Scheduling/GetSchedulerDisplayPreferences/GetSchedulerDisplayPreferencesEndpoint.cs @@ -42,6 +42,7 @@ public class GetSchedulerDisplayPreferencesEndpoint : BaseEndpoint /// Gets the display preferences of the scheduler page of the current user. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(FastEndpoints.EmptyRequest request, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetCurrentTheme/GetCurrentThemeEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetCurrentTheme/GetCurrentThemeEndpoint.cs index dd802fcd..a9b4def9 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetCurrentTheme/GetCurrentThemeEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetCurrentTheme/GetCurrentThemeEndpoint.cs @@ -45,6 +45,7 @@ public class GetCurrentThemeEndpoint : BaseEndpoint /// /// Gets the currently active theme. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemeSettings/GetThemeSettingsEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemeSettings/GetThemeSettingsEndpoint.cs index 64c9cf35..40c89f18 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemeSettings/GetThemeSettingsEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemeSettings/GetThemeSettingsEndpoint.cs @@ -45,6 +45,7 @@ public class GetThemeSettingsEndpoint : BaseEndpoint /// /// Gets the theme engine settings. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemes/GetThemesEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemes/GetThemesEndpoint.cs index d6f0282d..4b85d215 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemes/GetThemesEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/Themes/Queries/GetThemes/GetThemesEndpoint.cs @@ -44,6 +44,7 @@ public class GetThemesEndpoint : BaseEndpoint /// /// Gets the list of all the installed themes. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Authentication/GetUsers/GetUsersEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Authentication/GetUsers/GetUsersEndpoint.cs index ebd1343d..d464af86 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Authentication/GetUsers/GetUsersEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Authentication/GetUsers/GetUsersEndpoint.cs @@ -44,6 +44,7 @@ public class GetUsersEndpoint : BaseEndpoint /// /// Gets the list of users. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest _, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetPlaybackState/GetPlaybackStateEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetPlaybackState/GetPlaybackStateEndpoint.cs index aebd1029..fe994c07 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetPlaybackState/GetPlaybackStateEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetPlaybackState/GetPlaybackStateEndpoint.cs @@ -46,6 +46,7 @@ public class GetPlaybackStateEndpoint : BaseEndpoint /// /// Gets the playback state the player reported for the current user automatically. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetUserSettings/GetUserSettingsEndpoint.cs b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetUserSettings/GetUserSettingsEndpoint.cs index ccb607ce..861e2528 100644 --- a/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetUserSettings/GetUserSettingsEndpoint.cs +++ b/src/Lumina.Presentation.Api/Core/Endpoints/UsersManagement/Settings/GetUserSettings/GetUserSettingsEndpoint.cs @@ -46,6 +46,7 @@ public class GetUserSettingsEndpoint : BaseEndpoint /// /// Gets the settings of the current user. /// + /// The empty request, which carries no data. /// Cancellation token that can be used to stop the execution. public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken) { diff --git a/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj b/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj index 891bdb5e..c4aa1809 100644 --- a/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj +++ b/src/Lumina.Presentation.Api/Lumina.Presentation.Api.csproj @@ -5,8 +5,6 @@ disable $(SolutionDir)..\bin\api\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 37d55c87-4374-4971-82e9-012fcaad1853 Linux lumina-api diff --git a/src/Lumina.Presentation.Web/Common/Authorization/AuthorizationPolicies.cs b/src/Lumina.Presentation.Web/Common/Authorization/AuthorizationPolicies.cs index 87034320..a78c4888 100644 --- a/src/Lumina.Presentation.Web/Common/Authorization/AuthorizationPolicies.cs +++ b/src/Lumina.Presentation.Web/Common/Authorization/AuthorizationPolicies.cs @@ -5,7 +5,18 @@ namespace Lumina.Presentation.Web.Common.Authorization; /// public static class AuthorizationPolicies { + /// + /// The name of the authorization policy that requires the administrator role. + /// public const string REQUIRE_ADMIN_ROLE = "RequireAdminRole"; + + /// + /// The name of the authorization policy that requires the permission to create media libraries. + /// public const string REQUIRE_CREATE_LIBRARIES_PERMISSION = "RequireCreateLibrariesPermission"; + + /// + /// The name of the authorization policy that requires the application to be initialized. + /// public const string REQUIRE_INITIALIZATION = "RequireInitialization"; } diff --git a/src/Lumina.Presentation.Web/Common/DTO/Configuration/EncryptionSettingsDto.cs b/src/Lumina.Presentation.Web/Common/DTO/Configuration/EncryptionSettingsDto.cs index 50c288b1..56ae2bcc 100644 --- a/src/Lumina.Presentation.Web/Common/DTO/Configuration/EncryptionSettingsDto.cs +++ b/src/Lumina.Presentation.Web/Common/DTO/Configuration/EncryptionSettingsDto.cs @@ -5,15 +5,18 @@ using System.Diagnostics; namespace Lumina.Presentation.Web.Common.DTO.Configuration; /// -/// Data transfer object for deserializing media settings. +/// Data transfer object for deserializing encryption settings. /// [DebuggerDisplay("Section name: {SECTION_NAME}")] public class EncryptionSettingsDto { + /// + /// The name of the configuration section that holds the encryption settings. + /// public const string SECTION_NAME = "EncryptionSettings"; /// - /// Gets or sets the root directory where media files are stored. + /// Gets or sets the Base64 encoded secret key used to encrypt and decrypt protected data. /// public required string SecretKey { get; init; } } diff --git a/src/Lumina.Presentation.Web/Common/DTO/Configuration/ServerConfigurationDto.cs b/src/Lumina.Presentation.Web/Common/DTO/Configuration/ServerConfigurationDto.cs index 43dbc4f1..1bb566fe 100644 --- a/src/Lumina.Presentation.Web/Common/DTO/Configuration/ServerConfigurationDto.cs +++ b/src/Lumina.Presentation.Web/Common/DTO/Configuration/ServerConfigurationDto.cs @@ -10,15 +10,18 @@ namespace Lumina.Presentation.Web.Common.DTO.Configuration; [DebuggerDisplay("Section name: {SECTION_NAME}")] public class ServerConfigurationDto { + /// + /// The name of the configuration section that holds the server settings. + /// public const string SECTION_NAME = "ServerConfiguration"; /// - /// Gets or sets the remote API server path. + /// Gets or sets the version of the remote API used in the request URL. /// public required char ApiVersion { get; init; } /// - /// Gets or sets the remote API server path. + /// Gets or sets the remote API server address. /// public required string BaseAddress { get; init; } diff --git a/src/Lumina.Presentation.Web/Common/DTO/WrittenContentLibrary/BookLibrary/BookDto.cs b/src/Lumina.Presentation.Web/Common/DTO/WrittenContentLibrary/BookLibrary/BookDto.cs index ae119295..25e8e542 100644 --- a/src/Lumina.Presentation.Web/Common/DTO/WrittenContentLibrary/BookLibrary/BookDto.cs +++ b/src/Lumina.Presentation.Web/Common/DTO/WrittenContentLibrary/BookLibrary/BookDto.cs @@ -140,9 +140,9 @@ public class BookDto /// public float? VolumeNumber { get; init; } - /// - /// Gets the series id, if the book is part of a series. - /// + ///// + ///// Gets the series id, if the book is part of a series. + ///// //public Guid? BookSeriesId { get; init; } = null; /// @@ -181,7 +181,7 @@ public class BookDto public string? GoogleBooksId { get; init; } = null!; /// - /// Gets the Barnes & Noble ID of the book. + /// Gets the Barnes & Noble ID of the book. /// public string? BarnesAndNobleId { get; init; } = null!; @@ -195,9 +195,9 @@ public class BookDto /// public List ISBNs { get; set; } = []; - /// - /// Gets the list of media contributors that contributed to this book. - /// + ///// + ///// Gets the list of media contributors that contributed to this book. + ///// //public List ContributorIds { get; init; } = []; /// diff --git a/src/Lumina.Presentation.Web/Common/Enums/Authorization/AuthorizationPermission.cs b/src/Lumina.Presentation.Web/Common/Enums/Authorization/AuthorizationPermission.cs index e56b9514..06975e67 100644 --- a/src/Lumina.Presentation.Web/Common/Enums/Authorization/AuthorizationPermission.cs +++ b/src/Lumina.Presentation.Web/Common/Enums/Authorization/AuthorizationPermission.cs @@ -5,9 +5,28 @@ namespace Lumina.Presentation.Web.Common.Enums.Authorization; /// public enum AuthorizationPermission { + /// + /// No permission is granted. + /// None = 0, + + /// + /// Permission to view the existing users. + /// CanViewUsers, + + /// + /// Permission to delete the existing users. + /// CanDeleteUsers, + + /// + /// Permission to register new users. + /// CanRegisterUsers, + + /// + /// Permission to create and manage media libraries. + /// CanCreateLibraries } diff --git a/src/Lumina.Presentation.Web/Common/Enums/Library/LibraryType.cs b/src/Lumina.Presentation.Web/Common/Enums/Library/LibraryType.cs index 26eb34d2..b057b431 100644 --- a/src/Lumina.Presentation.Web/Common/Enums/Library/LibraryType.cs +++ b/src/Lumina.Presentation.Web/Common/Enums/Library/LibraryType.cs @@ -101,7 +101,7 @@ public enum LibraryType LiveRecordingVideo, /// - /// Recorded conversations and Q&A sessions in video format. + /// Recorded conversations and Q&A sessions in video format. /// InterviewVideo, @@ -131,7 +131,7 @@ public enum LibraryType LiveRecordingAudio, /// - /// Recorded conversations and Q&A sessions in audio format. + /// Recorded conversations and Q&A sessions in audio format. /// InterviewAudio, diff --git a/src/Lumina.Presentation.Web/Common/Http/HttpContextItemKeys.cs b/src/Lumina.Presentation.Web/Common/Http/HttpContextItemKeys.cs index 77ccf82f..57c47d8f 100644 --- a/src/Lumina.Presentation.Web/Common/Http/HttpContextItemKeys.cs +++ b/src/Lumina.Presentation.Web/Common/Http/HttpContextItemKeys.cs @@ -5,8 +5,19 @@ namespace Lumina.Presentation.Web.Common.Http; /// public static class HttpContextItemKeys { + /// + /// The key under which the validation errors of the current request are stored. + /// public const string ERRORS = "errors"; + + /// + /// The key under which the flag indicating that the super administrator account still has to be set up is stored. + /// public const string PENDING_SUPER_ADMIN_SETUP = "PendingSuperAdminSetup"; + + /// + /// The key under which the URL of the last displayed view is stored. + /// public const string LAST_DISPLAYED_VIEW = "LastViewUrl"; /// diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authentication.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authentication.cs index 0d17674c..2362cbde 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authentication.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authentication.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class Authentication { + /// + /// The route for the account registration API endpoint. + /// public const string REGISTER_ACCOUNT = "auth/register"; + + /// + /// The route for the account login API endpoint. + /// public const string LOGIN_ACCOUNT = "auth/login"; + + /// + /// The route for the password recovery API endpoint. + /// public const string RECOVER_PASSWORD = "auth/recover-password"; + + /// + /// The route for the password change API endpoint. + /// public const string CHANGE_PASSWORD = "auth/change-password"; + + /// + /// The route for the user accounts API endpoint. + /// public const string USERS = "auth/users"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authorization.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authorization.cs index d1b2a239..8dedd3e5 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authorization.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Authorization.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Authorization { + /// + /// The route for the API endpoint that updates the role and permissions of a user. + /// public const string UPDATE_USER_ROLE_AND_PERMISSIONS_BY_USER_ID = "auth/users/{userId}/role-and-permissions"; + + /// + /// The route for the API endpoint that retrieves the permissions of a user. + /// public const string GET_USER_PERMISSIONS_BY_USER_ID = "auth/users/{userId}/permissions"; + + /// + /// The route for the API endpoint that retrieves the role of a user. + /// public const string GET_USER_ROLE_BY_USER_ID = "auth/users/{userId}/role"; + + /// + /// The route for the authorization retrieval API endpoint. + /// public const string GET_AUTHORIZATION = "auth/get-authorization"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Books.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Books.cs index 677abcd5..99fbc91d 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Books.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Books.cs @@ -10,16 +10,59 @@ public static partial class ApiRoutes /// public static class Books { + /// + /// The route for the API endpoint that retrieves the lightweight list of books of a library. + /// public const string GET_BOOKS_LITE = "libraries/{libraryId}/books/lite"; + + /// + /// The route for the API endpoint that retrieves a book of a library. + /// public const string GET_BOOK = "libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for the API endpoint that updates a book of a library. + /// public const string UPDATE_BOOK = "libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for the API endpoint that deletes a book of a library. + /// public const string DELETE_BOOK = "libraries/{libraryId}/books/{bookId}"; + + /// + /// The route for the API endpoint that retrieves the deleted books of a library. + /// public const string GET_DELETED_BOOKS = "libraries/{libraryId}/books/deleted-items"; + + /// + /// The route for the API endpoint that restores a deleted book of a library. + /// public const string RESTORE_BOOK = "libraries/{libraryId}/books/{bookId}/restore"; + + /// + /// The route for the API endpoint that updates the cover of a book of a library. + /// public const string UPDATE_BOOK_COVER = "libraries/{libraryId}/books/{bookId}/cover"; + + /// + /// The route for the API endpoint that retrieves the reading manifest of a book. + /// public const string GET_BOOK_READING_MANIFEST = "libraries/{libraryId}/books/{bookId}/reading/manifest"; + + /// + /// The route for the API endpoint that retrieves the reading availability of a book. + /// public const string GET_BOOK_READING_AVAILABILITY = "libraries/{libraryId}/books/{bookId}/reading/availability"; + + /// + /// The route for the API endpoint that retrieves a reading section of a book. + /// public const string GET_BOOK_READING_SECTION = "libraries/{libraryId}/books/{bookId}/reading/sections/{locationRef}"; + + /// + /// The route for the API endpoint that retrieves a reading resource of a book. + /// public const string GET_BOOK_READING_RESOURCE = "libraries/{libraryId}/books/{bookId}/reading/resources/{resourceKey}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Directories.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Directories.cs index f79175fb..8fa11097 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Directories.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Directories.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Directories { + /// + /// The route for the API endpoint that retrieves the subdirectories of a directory. + /// public const string GET_DIRECTORIES = "directories/get-directories"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Drives.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Drives.cs index 288d9d14..0117c89d 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Drives.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Drives.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Drives { + /// + /// The route for the API endpoint that retrieves the drives of the host machine. + /// public const string GET_DRIVES = "drives/get-drives"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Favorites.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Favorites.cs index 5631c035..dab92066 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Favorites.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Favorites.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Favorites { + /// + /// The route for the API endpoint that retrieves the favorites of the current user. + /// public const string GET_FAVORITES = "users/me/favorites"; + + /// + /// The route for the API endpoint that adds a media item to the favorites of the current user. + /// public const string ADD_FAVORITE = "users/me/favorites"; + + /// + /// The route for the API endpoint that removes a media item from the favorites of the current user. + /// public const string REMOVE_FAVORITE = "users/me/favorites/{mediaKind}/{mediaItemId}"; + + /// + /// The route for the API endpoint that retrieves the favorite status of a media item for the current user. + /// public const string GET_FAVORITE_STATUS = "users/me/favorites/status"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.FileSystem.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.FileSystem.cs index b317b02b..5d072fe8 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.FileSystem.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.FileSystem.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class FileSystem { + /// + /// The route for getting the type of the file system. + /// public const string GET_TYPES = "file-system/get-type"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Files.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Files.cs index 2d5d3c78..7fd7e2f6 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Files.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Files.cs @@ -10,7 +10,14 @@ public static partial class ApiRoutes /// public static class Files { + /// + /// The route for the API endpoint that retrieves the files of a directory as a tree. + /// public const string GET_TREE_FILES = "files/get-tree-files"; + + /// + /// The route for the API endpoint that retrieves the files of a directory. + /// public const string GET_FILES = "files/get-files"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Initialization.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Initialization.cs index 7f7921c0..2a9480ca 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Initialization.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Initialization.cs @@ -10,7 +10,14 @@ public static partial class ApiRoutes /// public static class Initialization { + /// + /// The route for the application setup API endpoint. + /// public const string SETUP_APPLICATION = "initialization"; + + /// + /// The route for the initialization status API endpoint. + /// public const string CHECK_INITIALIZATION = "initialization"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Libraries.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Libraries.cs index 837be446..c0415456 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Libraries.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Libraries.cs @@ -10,23 +10,94 @@ public static partial class ApiRoutes /// public static class Libraries { + /// + /// The route for the API endpoint that retrieves a media library by its Id. + /// public const string GET_LIBRARY_BY_ID = "libraries/{id}"; + + /// + /// The route for the API endpoint that retrieves all media libraries. + /// public const string GET_LIBRARIES = "libraries"; + + /// + /// The route for the API endpoint that retrieves the enabled media libraries. + /// public const string GET_ENABLED_LIBRARIES = "libraries/enabled"; + + /// + /// The route for the API endpoint that adds a media library. + /// public const string ADD_LIBRARY = "libraries"; + + /// + /// The route for the API endpoint that updates a media library. + /// public const string UPDATE_LIBRARY = "libraries/{id}"; + + /// + /// The route for the API endpoint that deletes a media library. + /// public const string DELETE_LIBRARY = "libraries/{id}"; + + /// + /// The route for the API endpoint that scans all media libraries. + /// public const string SCAN_LIBRARIES = "libraries/scans"; + + /// + /// The route for the API endpoint that scans a single media library. + /// public const string SCAN_LIBRARY = "libraries/{id}/scans"; + + /// + /// The route for the API endpoint that retrieves the scans currently running on the media libraries. + /// public const string GET_RUNNING_LIBRARIES_SCAN = "libraries/scans/running"; + + /// + /// The route for the API endpoint that cancels the scans running on all media libraries. + /// public const string CANCEL_LIBRARIES_SCAN = "libraries/scans/cancel"; + + /// + /// The route for the API endpoint that cancels a scan running on a single media library. + /// public const string CANCEL_LIBRARY_SCAN = "libraries/{libraryId}/scans/{scanId}/cancel"; + + /// + /// The route for the API endpoint that retrieves the path template parts of a library type. + /// public const string GET_LIBRARY_PATH_TEMPLATE_PARTS = "libraries/path-template-parts/{libraryType}"; + + /// + /// The route for the API endpoint that retrieves the metadata providers of a media library. + /// public const string GET_LIBRARY_METADATA_PROVIDERS = "libraries/{libraryId}/metadata-providers"; + + /// + /// The route for the API endpoint that retrieves the artwork providers of a media library. + /// public const string GET_LIBRARY_ARTWORK_PROVIDERS = "libraries/{libraryId}/artwork-providers"; + + /// + /// The route for the API endpoint that retrieves the book readers of a media library. + /// public const string GET_LIBRARY_BOOK_READERS = "libraries/{libraryId}/book-readers"; + + /// + /// The route for the API endpoint that retrieves the metadata providers of a library type. + /// public const string GET_LIBRARY_TYPE_METADATA_PROVIDERS = "libraries/metadata-providers/{libraryType}"; + + /// + /// The route for the API endpoint that retrieves the artwork providers of a library type. + /// public const string GET_LIBRARY_TYPE_ARTWORK_PROVIDERS = "libraries/artwork-providers/{libraryType}"; + + /// + /// The route for the API endpoint that retrieves the book readers of a library type. + /// public const string GET_LIBRARY_TYPE_BOOK_READERS = "libraries/book-readers/{libraryType}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.LibraryStatistics.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.LibraryStatistics.cs index ea682d5f..004afdb3 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.LibraryStatistics.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.LibraryStatistics.cs @@ -10,22 +10,89 @@ public static partial class ApiRoutes /// public static class LibraryStatistics { + /// + /// The route for the API endpoint that retrieves the recently consumed media items of the current user. + /// public const string GET_RECENTLY_CONSUMED = "users/me/consumption-history/recently-consumed"; + + /// + /// The route for the API endpoint that retrieves the most consumed media items of the current user. + /// public const string GET_MOST_CONSUMED = "users/me/consumption-history/most-consumed"; + + /// + /// The route for the API endpoint that retrieves the consumption statistics of the current user. + /// public const string GET_CONSUMPTION_STATISTICS = "users/me/consumption-statistics"; + + /// + /// The route for the API endpoint that retrieves the tag consumption statistics of the current user. + /// public const string GET_TAG_CONSUMPTION = "users/me/consumption-statistics/tags"; + + /// + /// The route for the API endpoint that retrieves the genre consumption statistics of the current user. + /// public const string GET_GENRE_CONSUMPTION = "users/me/consumption-statistics/genres"; + + /// + /// The route for the API endpoint that retrieves the recently consumed media items of a user. + /// public const string GET_USER_RECENTLY_CONSUMED = "users/{userId}/consumption-history/recently-consumed"; + + /// + /// The route for the API endpoint that retrieves the most consumed media items of a user. + /// public const string GET_USER_MOST_CONSUMED = "users/{userId}/consumption-history/most-consumed"; + + /// + /// The route for the API endpoint that retrieves the consumption statistics of a user. + /// public const string GET_USER_CONSUMPTION_STATISTICS = "users/{userId}/consumption-statistics"; + + /// + /// The route for the API endpoint that retrieves the tag consumption statistics of a user. + /// public const string GET_USER_TAG_CONSUMPTION = "users/{userId}/consumption-statistics/tags"; + + /// + /// The route for the API endpoint that retrieves the genre consumption statistics of a user. + /// public const string GET_USER_GENRE_CONSUMPTION = "users/{userId}/consumption-statistics/genres"; + + /// + /// The route for the API endpoint that retrieves the consumption statistics of all users. + /// public const string GET_ALL_USERS_CONSUMPTION_STATISTICS = "users/consumption-statistics"; + + /// + /// The route for the API endpoint that deletes a media item from the consumption history of the current user. + /// public const string DELETE_CONSUMPTION_ITEM_HISTORY = "users/me/consumption-history/media-items/{mediaKind}/{mediaItemId}/{libraryId}"; + + /// + /// The route for the API endpoint that deletes a media item from the consumption history of a user. + /// public const string DELETE_USER_CONSUMPTION_ITEM_HISTORY = "users/{userId}/consumption-history/media-items/{mediaKind}/{mediaItemId}/{libraryId}"; + + /// + /// The route for the API endpoint that clears the consumption history of the current user. + /// public const string CLEAR_CONSUMPTION_HISTORY = "users/me/consumption-history"; + + /// + /// The route for the API endpoint that clears the consumption history of a user. + /// public const string CLEAR_USER_CONSUMPTION_HISTORY = "users/{userId}/consumption-history"; + + /// + /// The route for the API endpoint that clears the media resume points of the current user. + /// public const string CLEAR_RESUME_POINTS = "users/me/media-resume-points"; + + /// + /// The route for the API endpoint that clears the media resume points of a user. + /// public const string CLEAR_USER_RESUME_POINTS = "users/{userId}/media-resume-points"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.MediaConsumption.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.MediaConsumption.cs index e0282348..edac594c 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.MediaConsumption.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.MediaConsumption.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class MediaConsumption { + /// + /// The route for the API endpoint that starts the consumption of a media item. + /// public const string START_CONSUMPTION = "libraries/{libraryId}/media-items/{mediaKind}/{mediaItemId}/consumption-records"; + + /// + /// The route for the API endpoint that reports the progress of a consumption record. + /// public const string REPORT_CONSUMPTION_PROGRESS = "users/me/consumption-records/{recordId}/progress"; + + /// + /// The route for the API endpoint that completes a consumption record. + /// public const string COMPLETE_CONSUMPTION = "users/me/consumption-records/{recordId}/complete"; + + /// + /// The route for the API endpoint that stops a consumption record. + /// public const string STOP_CONSUMPTION = "users/me/consumption-records/{recordId}/stop"; + + /// + /// The route for the API endpoint that retrieves the resume point of a media item of the current user. + /// public const string GET_RESUME_POINT = "users/me/media-resume-points/{mediaKind}/{mediaItemId}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Music.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Music.cs index 4e66deb9..ff1ddfc9 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Music.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Music.cs @@ -10,29 +10,124 @@ public static partial class ApiRoutes /// public static class Music { + /// + /// The route for the API endpoint that retrieves the lightweight list of artists of a library. + /// public const string GET_ARTISTS_LITE = "libraries/{libraryId}/artists/lite"; + + /// + /// The route for the API endpoint that retrieves an artist of a library. + /// public const string GET_ARTIST = "libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for the API endpoint that updates an artist of a library. + /// public const string UPDATE_ARTIST = "libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for the API endpoint that updates the cover of an artist of a library. + /// public const string UPDATE_ARTIST_COVER = "libraries/{libraryId}/artists/{artistId}/cover"; + + /// + /// The route for the API endpoint that deletes an artist of a library. + /// public const string DELETE_ARTIST = "libraries/{libraryId}/artists/{artistId}"; + + /// + /// The route for the API endpoint that retrieves the deleted artists of a library. + /// public const string GET_DELETED_ARTISTS = "libraries/{libraryId}/artists/deleted-items"; + + /// + /// The route for the API endpoint that restores a deleted artist of a library. + /// public const string RESTORE_ARTIST = "libraries/{libraryId}/artists/{artistId}/restore"; + + /// + /// The route for the API endpoint that retrieves the lightweight list of albums of an artist. + /// public const string GET_ARTIST_ALBUMS_LITE = "libraries/{libraryId}/artists/{artistId}/albums/lite"; + + /// + /// The route for the API endpoint that retrieves an album of an artist. + /// public const string GET_ALBUM = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for the API endpoint that updates an album of an artist. + /// public const string UPDATE_ALBUM = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for the API endpoint that updates the cover of an album of an artist. + /// public const string UPDATE_ALBUM_COVER = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/cover"; + + /// + /// The route for the API endpoint that deletes an album of an artist. + /// public const string DELETE_ALBUM = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for the API endpoint that retrieves the deleted albums of a library. + /// public const string GET_DELETED_ALBUMS = "libraries/{libraryId}/albums/deleted-items"; + + /// + /// The route for the API endpoint that restores a deleted album of an artist. + /// public const string RESTORE_ALBUM = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/restore"; + + /// + /// The route for the API endpoint that retrieves the lightweight list of tracks of an album. + /// public const string GET_ALBUM_TRACKS_LITE = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/lite"; + + /// + /// The route for the API endpoint that shuffles the tracks of a library. + /// public const string SHUFFLE_TRACKS = "libraries/{libraryId}/tracks/shuffle"; + + /// + /// The route for the API endpoint that retrieves a track of an album. + /// public const string GET_TRACK = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for the API endpoint that updates a track of an album. + /// public const string UPDATE_TRACK = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for the API endpoint that deletes a track of an album. + /// public const string DELETE_TRACK = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for the API endpoint that retrieves the deleted tracks of a library. + /// public const string GET_DELETED_TRACKS = "libraries/{libraryId}/tracks/deleted-items"; + + /// + /// The route for the API endpoint that restores a deleted track of an album. + /// public const string RESTORE_TRACK = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/restore"; + + /// + /// The route for the API endpoint that streams a track of an album. + /// public const string STREAM_TRACK = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/stream"; + + /// + /// The route for the API endpoint that streams a segment of a track delivery. + /// public const string STREAM_TRACK_SEGMENT = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/stream/deliveries/{deliveryId}/segments/{segmentIndex}"; + + /// + /// The route for the API endpoint that retrieves the playback manifest of a track. + /// public const string GET_PLAYBACK_MANIFEST = "libraries/{libraryId}/artists/{artistId}/albums/{albumId}/tracks/{trackId}/playback-manifest"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Path.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Path.cs index 4e056a6a..94c2537b 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Path.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Path.cs @@ -10,11 +10,34 @@ public static partial class ApiRoutes /// public static class Path { + /// + /// The route for the API endpoint that retrieves the root of a path. + /// public const string GET_PATH_ROOT = "path/get-path-root"; + + /// + /// The route for the API endpoint that retrieves the separator of the current platform. + /// public const string GET_PATH_SEPARATOR = "path/get-path-separator"; + + /// + /// The route for the API endpoint that retrieves the parent of a path. + /// public const string GET_PATH_PARENT = "path/get-path-parent"; + + /// + /// The route for the API endpoint that splits a path into its parts. + /// public const string SPLIT = "path/split"; + + /// + /// The route for the API endpoint that validates a path. + /// public const string VALIDATE = "path/validate"; + + /// + /// The route for the API endpoint that checks whether a path exists. + /// public const string CHECK_PATH_EXISTS = "path/check-path-exists"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Permissions.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Permissions.cs index 5ccaf316..deb50f4f 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Permissions.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Permissions.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Permissions { + /// + /// The route for the permissions retrieval API endpoint. + /// public const string GET_PERMISSIONS = "auth/permissions"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Playlists.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Playlists.cs index e698d4ed..2b868ea8 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Playlists.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Playlists.cs @@ -10,15 +10,54 @@ public static partial class ApiRoutes /// public static class Playlists { + /// + /// The route for the API endpoint that retrieves the playlists of the current user. + /// public const string GET_PLAYLISTS = "users/me/playlists"; + + /// + /// The route for the API endpoint that creates a playlist for the current user. + /// public const string CREATE_PLAYLIST = "users/me/playlists"; + + /// + /// The route for the API endpoint that retrieves a playlist of the current user. + /// public const string GET_PLAYLIST = "users/me/playlists/{playlistId}"; + + /// + /// The route for the API endpoint that updates a playlist of the current user. + /// public const string UPDATE_PLAYLIST = "users/me/playlists/{playlistId}"; + + /// + /// The route for the API endpoint that deletes a playlist of the current user. + /// public const string DELETE_PLAYLIST = "users/me/playlists/{playlistId}"; + + /// + /// The route for the API endpoint that adds an entry to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRY = "users/me/playlists/{playlistId}/entries"; + + /// + /// The route for the API endpoint that adds multiple entries to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRIES = "users/me/playlists/{playlistId}/entries-batch"; + + /// + /// The route for the API endpoint that adds every track of a library, an artist, or an album to a playlist of the current user. + /// public const string ADD_PLAYLIST_SCOPE_ENTRIES = "users/me/playlists/{playlistId}/entries-scope"; + + /// + /// The route for the API endpoint that removes an entry from a playlist of the current user. + /// public const string REMOVE_PLAYLIST_ENTRY = "users/me/playlists/{playlistId}/entries/{playlistEntryId}"; + + /// + /// The route for the API endpoint that moves an entry within a playlist of the current user. + /// public const string MOVE_PLAYLIST_ENTRY = "users/me/playlists/{playlistId}/entries/{playlistEntryId}/move"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Plugins.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Plugins.cs index 17d5074b..316bb947 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Plugins.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Plugins.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Plugins { + /// + /// The route for the API endpoint that retrieves the installed plugins. + /// public const string GET_PLUGINS = "plugins"; + + /// + /// The route for the API endpoint that retrieves the settings of a plugin. + /// public const string GET_PLUGIN_SETTINGS = "plugins/{pluginId}/settings"; + + /// + /// The route for the API endpoint that updates the settings of a plugin. + /// public const string UPDATE_PLUGIN_SETTINGS = "plugins/{pluginId}/settings"; + + /// + /// The route for the API endpoint that installs a plugin. + /// public const string INSTALL_PLUGIN = "plugins"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Roles.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Roles.cs index 09691d9b..8217228b 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Roles.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Roles.cs @@ -10,10 +10,29 @@ public static partial class ApiRoutes /// public static class Roles { + /// + /// The route for the API endpoint that retrieves the permissions of a role. + /// public const string GET_ROLE_PERMISSIONS_BY_ROLE_ID = "auth/roles/{roleId}/permissions"; + + /// + /// The route for the API endpoint that retrieves the roles. + /// public const string GET_ROLES = "auth/roles"; + + /// + /// The route for the API endpoint that creates a role. + /// public const string CREATE_ROLE = "auth/roles"; + + /// + /// The route for the API endpoint that updates a role. + /// public const string UPDATE_ROLE = "auth/roles"; + + /// + /// The route for the API endpoint that deletes a role. + /// public const string DELETE_ROLE = "auth/roles/{roleId}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Scheduling.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Scheduling.cs index 27b85cac..4209299f 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Scheduling.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Scheduling.cs @@ -10,14 +10,49 @@ public static partial class ApiRoutes /// public static class ScheduledJobs { + /// + /// The route for the API endpoint that retrieves the scheduled jobs. + /// public const string GET_SCHEDULED_JOBS = "scheduled-jobs"; + + /// + /// The route for the API endpoint that adds a scheduled job. + /// public const string ADD_SCHEDULED_JOB = "scheduled-jobs"; + + /// + /// The route for the API endpoint that retrieves the execution history of the scheduled jobs. + /// public const string GET_SCHEDULED_JOB_HISTORY = "scheduled-jobs/history"; + + /// + /// The route for the API endpoint that removes a scheduled job. + /// public const string REMOVE_SCHEDULED_JOB = "scheduled-jobs/{scheduledJobId}"; + + /// + /// The route for the API endpoint that starts a scheduled job. + /// public const string START_SCHEDULED_JOB = "scheduled-jobs/{scheduledJobId}/start"; + + /// + /// The route for the API endpoint that stops a scheduled job. + /// public const string STOP_SCHEDULED_JOB = "scheduled-jobs/{scheduledJobId}/stop"; + + /// + /// The route for the API endpoint that fires a scheduled job immediately. + /// public const string FIRE_SCHEDULED_JOB = "scheduled-jobs/{scheduledJobId}/fire"; + + /// + /// The route for the API endpoint that retrieves the display preferences of the scheduled jobs. + /// public const string GET_DISPLAY_PREFERENCES = "scheduled-jobs/display-preferences"; + + /// + /// The route for the API endpoint that updates the display preferences of the scheduled jobs. + /// public const string UPDATE_DISPLAY_PREFERENCES = "scheduled-jobs/display-preferences"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Themes.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Themes.cs index 040bdf48..a1d775aa 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Themes.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Themes.cs @@ -10,15 +10,54 @@ public static partial class ApiRoutes /// public static class Themes { + /// + /// The route for the API endpoint that retrieves the installed themes. + /// public const string GET_THEMES = "themes"; + + /// + /// The route for the API endpoint that installs a theme. + /// public const string INSTALL_THEME = "themes"; + + /// + /// The route for the API endpoint that retrieves the settings of the installed themes. + /// public const string GET_THEME_SETTINGS = "themes/settings"; + + /// + /// The route for the API endpoint that retrieves the current theme. + /// public const string GET_CURRENT_THEME = "themes/current"; + + /// + /// The route for the API endpoint that sets the current theme. + /// public const string SET_CURRENT_THEME = "themes/current"; + + /// + /// The route for the API endpoint that retrieves a page template of a theme. + /// public const string GET_THEME_TEMPLATE = "themes/{themeId}/templates/{*pageKey}"; + + /// + /// The route for the API endpoint that retrieves an asset of a theme. + /// public const string GET_THEME_ASSET = "themes/{themeId}/assets/{*assetPath}"; + + /// + /// The route for the API endpoint that downloads the archive of a theme. + /// public const string GET_THEME_ARCHIVE = "themes/{themeId}/archive"; + + /// + /// The route for the API endpoint that restores a deleted theme. + /// public const string RESTORE_THEME = "themes/{themeId}/restore"; + + /// + /// The route for the API endpoint that deletes a theme. + /// public const string DELETE_THEME = "themes/{themeId}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Thumbnails.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Thumbnails.cs index f0f3f206..5fa5d263 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Thumbnails.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Thumbnails.cs @@ -10,6 +10,9 @@ public static partial class ApiRoutes /// public static class Thumbnails { + /// + /// The route for the thumbnail retrieval API endpoint. + /// public const string GET_THUMBNAIL = "thumbnails/get-thumbnail"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Users.cs b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Users.cs index dbcfecf3..7ff93c98 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Users.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/ApiRoutes.Users.cs @@ -10,9 +10,24 @@ public static partial class ApiRoutes /// public static class Users { + /// + /// The route for the API endpoint that retrieves the settings of the current user. + /// public const string GET_USER_SETTINGS = "users/me/settings"; + + /// + /// The route for the API endpoint that updates the settings of the current user. + /// public const string UPDATE_USER_SETTINGS = "users/me/settings"; + + /// + /// The route for the API endpoint that retrieves the playback state of the current user. + /// public const string GET_PLAYBACK_STATE = "users/me/settings/playback-state"; + + /// + /// The route for the API endpoint that updates the playback state of the current user. + /// public const string UPDATE_PLAYBACK_STATE = "users/me/settings/playback-state"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Admin.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Admin.cs index 88a84d5d..7b02416c 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Admin.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Admin.cs @@ -10,16 +10,59 @@ public static partial class WebRoutes /// public static class Admin { + /// + /// The route for the role management page. + /// public const string MANAGE_ROLES = "{culture}/admin/manage-roles"; + + /// + /// The route for the permission management page. + /// public const string MANAGE_PERMISSIONS = "{culture}/admin/manage-permissions"; + + /// + /// The route for the theme management page. + /// public const string MANAGE_THEMES = "{culture}/admin/manage-themes"; + + /// + /// The route for the action that retrieves the permissions of a role. + /// public const string GET_PERMISSIONS_BY_ROLE_ID = "{culture}/admin/api-get-permissions-by-role-id/{roleId}"; + + /// + /// The route for the action that retrieves the permissions of a user. + /// public const string GET_PERMISSIONS_BY_USER_ID = "{culture}/admin/api-get-permissions-by-user-id/{userId}"; + + /// + /// The route for the action that retrieves the role of a user. + /// public const string GET_ROLE_BY_USER_ID = "{culture}/admin/api-get-role-by-user-id/{userId}"; + + /// + /// The route for the action that retrieves the roles. + /// public const string GET_ROLES = "{culture}/admin/api-get-roles"; + + /// + /// The route for the action that creates a role. + /// public const string CREATE_ROLE = "{culture}/admin/api-create-role"; + + /// + /// The route for the action that updates a role. + /// public const string UPDATE_ROLE = "{culture}/admin/api-update-role"; + + /// + /// The route for the action that deletes a role. + /// public const string DELETE_ROLE = "{culture}/admin/api-delete-role/{roleId}"; + + /// + /// The route for the action that updates the authorization of a user. + /// public const string UPDATE_USER_AUTHORIZATION = "{culture}/admin/api-update-user-authorization"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Authentication.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Authentication.cs index a545d7ba..fdb15d6b 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Authentication.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Authentication.cs @@ -10,17 +10,64 @@ public static partial class WebRoutes /// public static class Authentication { + /// + /// The route for the account registration page. + /// public const string REGISTER_VIEW = "{culture}/auth/register"; + + /// + /// The route for the account login page. + /// public const string LOGIN_VIEW = "{culture}/auth/login/{returnUrl?}"; + + /// + /// The route for the password recovery page. + /// public const string RECOVER_PASSWORD_VIEW = "{culture}/auth/recover-password"; + + /// + /// The route for the password change page. + /// public const string CHANGE_PASSWORD_VIEW = "{culture}/auth/change-password"; + + /// + /// The route for the user profile page. + /// public const string PROFILE_VIEW = "{culture}/auth/profile"; + + /// + /// The route for the access denied page. + /// public const string ACCESS_DENIED_VIEW = "{culture}/auth/access-denied"; + + /// + /// The route for the action that logs the current user out. + /// public const string LOGOUT = "{culture}/auth/logout"; + + /// + /// The route for the action that retrieves an API access token. + /// public const string GET_API_ACCESS_TOKEN = "{culture}/auth/api-access-token"; + + /// + /// The route for the action that registers an account through the Web application. + /// public const string REGISTER = "{culture}/auth/api-register"; + + /// + /// The route for the action that logs an account in through the Web application. + /// public const string LOGIN = "{culture}/auth/api-login"; + + /// + /// The route for the action that recovers the password of an account through the Web application. + /// public const string RECOVER_PASSWORD = "{culture}/auth/api-recover-password"; + + /// + /// The route for the action that changes the password of an account through the Web application. + /// public const string CHANGE_PASSWORD = "{culture}/auth/api-change-password"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Books.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Books.cs index 30ed0735..d0aa22cb 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Books.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Books.cs @@ -10,19 +10,74 @@ public static partial class WebRoutes /// public static class Books { + /// + /// The route for the books library page. + /// public const string INDEX = "{culture}/library/written-content-library/books-library/books"; + + /// + /// The route for the action that retrieves the library items of the books library page. + /// public const string GET_LIBRARY_ITEMS = "{culture}/library/written-content-library/books-library/books/api-get-library-items"; + + /// + /// The route for the book editing page. + /// public const string EDIT_BOOK = "{culture}/library/written-content-library/books-library/books/{bookId}"; + + /// + /// The route for the action that retrieves the details of a book. + /// public const string GET_BOOK_DETAILS = "{culture}/library/written-content-library/books-library/books/{bookId}/api-get-book"; + + /// + /// The route for the action that saves a book. + /// public const string SAVE_BOOK = "{culture}/library/written-content-library/books-library/books/{bookId}/api-save-book"; + + /// + /// The route for the action that deletes a book. + /// public const string DELETE_BOOK = "{culture}/library/written-content-library/books-library/books/{bookId}/api-delete-book"; + + /// + /// The route for the deleted books page. + /// public const string DELETED_BOOKS = "{culture}/library/written-content-library/books-library/books/deleted-items"; + + /// + /// The route for the action that restores a deleted book. + /// public const string RESTORE_BOOK = "{culture}/library/written-content-library/books-library/books/{bookId}/api-restore-book"; + + /// + /// The route for the action that updates the cover of a book. + /// public const string UPDATE_BOOK_COVER = "{culture}/library/written-content-library/books-library/books/{bookId}/api-update-cover"; + + /// + /// The route for the book reading page. + /// public const string READ = "{culture}/library/written-content-library/books-library/books/{bookId}/read"; + + /// + /// The route for the action that retrieves the reading manifest of a book. + /// public const string GET_READING_MANIFEST = "{culture}/library/written-content-library/books-library/books/{bookId}/api-get-reading-manifest"; + + /// + /// The route for the action that retrieves the reading availability of a book. + /// public const string GET_READING_AVAILABILITY = "{culture}/library/written-content-library/books-library/books/{bookId}/api-get-reading-availability"; + + /// + /// The route for the action that retrieves a reading section of a book. + /// public const string GET_READING_SECTION = "{culture}/library/written-content-library/books-library/books/{bookId}/api-get-reading-section"; + + /// + /// The route for the action that retrieves a reading resource of a book. + /// public const string GET_READING_RESOURCE = "{culture}/library/written-content-library/books-library/books/{bookId}/api-get-reading-resource"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Directories.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Directories.cs index 921c3392..e96a39b7 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Directories.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Directories.cs @@ -10,6 +10,9 @@ public static partial class WebRoutes /// public static class Directories { + /// + /// The route for the action that retrieves the subdirectories of a directory. + /// public const string GET_DIRECTORIES = "directories/api-get-directories"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Drives.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Drives.cs index 23a36942..9a4dc4f3 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Drives.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Drives.cs @@ -10,6 +10,9 @@ public static partial class WebRoutes /// public static class Drives { + /// + /// The route for the action that retrieves the drives of the host machine. + /// public const string GET_DRIVES = "drives/api-get-drives"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Favorites.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Favorites.cs index f9b59e20..c41b67db 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Favorites.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Favorites.cs @@ -10,10 +10,29 @@ public static partial class WebRoutes /// public static class Favorites { + /// + /// The route for the favorites page. + /// public const string INDEX = "{culture}/favorites"; + + /// + /// The route for the action that retrieves the favorites of the current user. + /// public const string GET_FAVORITES = "{culture}/favorites/api-get-favorites"; + + /// + /// The route for the action that retrieves the favorite status of a media item for the current user. + /// public const string GET_FAVORITE_STATUS = "{culture}/favorites/api-get-favorite-status"; + + /// + /// The route for the action that adds a media item to the favorites of the current user. + /// public const string ADD_FAVORITE = "{culture}/favorites/api-add-favorite"; + + /// + /// The route for the action that removes a media item from the favorites of the current user. + /// public const string REMOVE_FAVORITE = "{culture}/favorites/{mediaKind}/{mediaItemId}/api-remove-favorite"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.FileSystem.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.FileSystem.cs index e1b550de..017ac108 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.FileSystem.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.FileSystem.cs @@ -10,6 +10,9 @@ public static partial class WebRoutes /// public static class FileSystem { + /// + /// The route for the action that retrieves the file system type of the host machine. + /// public const string GET_TYPE = "file-system/api-get-type"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Files.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Files.cs index 9756c9c7..b3c6003c 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Files.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Files.cs @@ -10,7 +10,14 @@ public static partial class WebRoutes /// public static class Files { + /// + /// The route for the action that retrieves the files of a directory as a tree. + /// public const string GET_TREE_FILES = "files/api-get-tree-files"; + + /// + /// The route for the action that retrieves the files of a directory. + /// public const string GET_FILES = "files/api-get-files"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Home.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Home.cs index 9cde8458..b5e47960 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Home.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Home.cs @@ -10,10 +10,29 @@ public static partial class WebRoutes /// public static class Home { + /// + /// The route for the home page at the root of the application. + /// public const string INDEX = "/"; + + /// + /// The route for the culture-specific home page. + /// public const string INDEX_CULTURED = "{culture}"; + + /// + /// The route for the privacy policy page. + /// public const string PRIVACY = "{culture}/privacy"; + + /// + /// The route for the error page. + /// public const string ERROR = "{culture}/error"; + + /// + /// The route for the not found page. + /// public const string NOT_FOUND = "{culture}/not-found"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Language.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Language.cs index 5c2938e8..6152ada7 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Language.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Language.cs @@ -10,6 +10,9 @@ public static partial class WebRoutes /// public static class Language { + /// + /// The route for the action that sets the display language of the Web application. + /// public const string SET_LANGUAGE = "{culture}/tools/language/set-language"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryManagement.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryManagement.cs index 2f1a8cdf..a3cfccd0 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryManagement.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryManagement.cs @@ -10,24 +10,99 @@ public static partial class WebRoutes /// public static class LibraryManagement { + /// + /// The route for the library management page. + /// public const string INDEX = "{culture}/libraries/manage"; + + /// + /// The route for the library creation page. + /// public const string ADD_LIBRARY = "{culture}/libraries/manage/item"; + + /// + /// The route for the library editing page. + /// public const string EDIT_LIBRARY = "{culture}/libraries/manage/item/{id}"; + + /// + /// The route for the action that retrieves the media libraries. + /// public const string GET_LIBRARIES = "{culture}/libraries/manage/api-get-libraries"; + + /// + /// The route for the action that retrieves the enabled media libraries. + /// public const string GET_ENABLED_LIBRARIES = "{culture}/libraries/manage/api-get-enabled-libraries"; + + /// + /// The route for the action that saves a media library. + /// public const string SAVE_LIBRARY = "{culture}/libraries/manage/api-item"; + + /// + /// The route for the action that deletes a media library. + /// public const string DELETE_LIBRARY = "{culture}/libraries/manage/api-item/{id}"; + + /// + /// The route for the action that retrieves the scans currently running on the media libraries. + /// public const string GET_RUNNING_LIBRARY_SCANS = "{culture}/libraries/manage/api-get-running-library-scans"; + + /// + /// The route for the action that scans all media libraries. + /// public const string SCAN_LIBRARIES = "{culture}/libraries/manage/api-scan-libraries"; + + /// + /// The route for the action that scans a single media library. + /// public const string SCAN_LIBRARY = "{culture}/libraries/manage/api-scan-library/{id}"; + + /// + /// The route for the action that cancels the scans running on all media libraries. + /// public const string CANCEL_LIBRARIES_SCAN = "{culture}/libraries/manage/api-cancel-libraries-scan"; + + /// + /// The route for the action that cancels a scan running on a single media library. + /// public const string CANCEL_LIBRARY_SCAN = "{culture}/libraries/manage/{libraryId}/api-cancel-library-scan/{scanId}"; + + /// + /// The route for the action that retrieves the path template parts of a library type. + /// public const string GET_LIBRARY_PATH_TEMPLATE_PARTS = "{culture}/libraries/manage/api-get-path-template-parts/{libraryType}"; + + /// + /// The route for the action that retrieves the metadata providers of a media library. + /// public const string GET_METADATA_PROVIDERS = "{culture}/libraries/manage/api-get-metadata-providers/{libraryId}"; + + /// + /// The route for the action that retrieves the artwork providers of a media library. + /// public const string GET_ARTWORK_PROVIDERS = "{culture}/libraries/manage/api-get-artwork-providers/{libraryId}"; + + /// + /// The route for the action that retrieves the book readers of a media library. + /// public const string GET_BOOK_READERS = "{culture}/libraries/manage/api-get-book-readers/{libraryId}"; + + /// + /// The route for the action that retrieves the metadata providers of a library type. + /// public const string GET_LIBRARY_TYPE_METADATA_PROVIDERS = "{culture}/libraries/manage/api-get-library-type-metadata-providers/{libraryType}"; + + /// + /// The route for the action that retrieves the artwork providers of a library type. + /// public const string GET_LIBRARY_TYPE_ARTWORK_PROVIDERS = "{culture}/libraries/manage/api-get-library-type-artwork-providers/{libraryType}"; + + /// + /// The route for the action that retrieves the book readers of a library type. + /// public const string GET_LIBRARY_TYPE_BOOK_READERS = "{culture}/libraries/manage/api-get-library-type-book-readers/{libraryType}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryStatistics.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryStatistics.cs index 9135ff8e..9fc89712 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryStatistics.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.LibraryStatistics.cs @@ -10,17 +10,64 @@ public static partial class WebRoutes /// public static class LibraryStatistics { + /// + /// The route for the library statistics page. + /// public const string INDEX = "{culture}/library/statistics"; + + /// + /// The route for the action that retrieves the consumption statistics of the selected user. + /// public const string GET_STATISTICS = "{culture}/library/statistics/api-get-statistics"; + + /// + /// The route for the action that retrieves the consumption statistics of all users. + /// public const string GET_ALL_USERS_STATISTICS = "{culture}/library/statistics/api-get-all-users-statistics"; + + /// + /// The route for the action that retrieves the recently consumed media items of the selected user. + /// public const string GET_RECENTLY_CONSUMED = "{culture}/library/statistics/api-get-recently-consumed"; + + /// + /// The route for the action that retrieves the most consumed media items of the selected user. + /// public const string GET_MOST_CONSUMED = "{culture}/library/statistics/api-get-most-consumed"; + + /// + /// The route for the action that retrieves the tag consumption statistics of the selected user. + /// public const string GET_TAG_CONSUMPTION = "{culture}/library/statistics/api-get-tag-consumption"; + + /// + /// The route for the action that retrieves the genre consumption statistics of the selected user. + /// public const string GET_GENRE_CONSUMPTION = "{culture}/library/statistics/api-get-genre-consumption"; + + /// + /// The route for the action that retrieves the enabled media libraries available for the statistics filter. + /// public const string GET_LIBRARIES = "{culture}/library/statistics/api-get-libraries"; + + /// + /// The route for the action that retrieves the users available for the statistics user selector. + /// public const string GET_USERS = "{culture}/library/statistics/api-get-users"; + + /// + /// The route for the action that deletes a media item from the consumption history. + /// public const string DELETE_CONSUMPTION_ITEM_HISTORY = "{culture}/library/statistics/api-delete-consumption-item-history"; + + /// + /// The route for the action that clears the consumption history. + /// public const string CLEAR_CONSUMPTION_HISTORY = "{culture}/library/statistics/api-clear-consumption-history"; + + /// + /// The route for the action that clears the media resume points. + /// public const string CLEAR_RESUME_POINTS = "{culture}/library/statistics/api-clear-resume-points"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.MediaConsumption.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.MediaConsumption.cs index d35e3935..a7947bf6 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.MediaConsumption.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.MediaConsumption.cs @@ -10,10 +10,29 @@ public static partial class WebRoutes /// public static class MediaConsumption { + /// + /// The route for the action that starts the consumption of a media item. + /// public const string START_CONSUMPTION = "{culture}/media-consumption/api-start-consumption/{libraryId}/{mediaKind}/{mediaItemId}"; + + /// + /// The route for the action that reports the progress of a consumption record. + /// public const string REPORT_CONSUMPTION_PROGRESS = "{culture}/media-consumption/api-report-consumption-progress/{recordId}"; + + /// + /// The route for the action that completes a consumption record. + /// public const string COMPLETE_CONSUMPTION = "{culture}/media-consumption/api-complete-consumption/{recordId}"; + + /// + /// The route for the action that stops a consumption record. + /// public const string STOP_CONSUMPTION = "{culture}/media-consumption/api-stop-consumption/{recordId}"; + + /// + /// The route for the action that retrieves the resume point of a media item of the current user. + /// public const string GET_RESUME_POINT = "{culture}/media-consumption/api-get-resume-point/{mediaKind}/{mediaItemId}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Music.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Music.cs index af5c0562..cf32d276 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Music.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Music.cs @@ -10,31 +10,134 @@ public static partial class WebRoutes /// public static class Music { + /// + /// The route for the artists page of the music library. + /// public const string ARTISTS_INDEX = "{culture}/library/audio-library/music-library/artists"; + + /// + /// The route for the deleted music items page. + /// public const string DELETED_MUSIC_ITEMS = "{culture}/library/audio-library/music-library/deleted-items"; + + /// + /// The route for the action that retrieves the artists of the music library. + /// public const string GET_ARTISTS = "{culture}/library/audio-library/music-library/artists/api-get-artists"; + + /// + /// The route for the artist editing page. + /// public const string ARTIST = "{culture}/library/audio-library/music-library/artists/{artistId}"; + + /// + /// The route for the action that retrieves the details of an artist. + /// public const string GET_ARTIST = "{culture}/library/audio-library/music-library/artists/{artistId}/api-get-artist"; + + /// + /// The route for the action that saves an artist. + /// public const string SAVE_ARTIST = "{culture}/library/audio-library/music-library/artists/{artistId}/api-save-artist"; + + /// + /// The route for the action that updates the cover of an artist. + /// public const string UPDATE_ARTIST_COVER = "{culture}/library/audio-library/music-library/artists/{artistId}/api-update-cover"; + + /// + /// The route for the action that deletes an artist. + /// public const string DELETE_ARTIST = "{culture}/library/audio-library/music-library/artists/{artistId}/api-delete-artist"; + + /// + /// The route for the action that restores a deleted artist. + /// public const string RESTORE_ARTIST = "{culture}/library/audio-library/music-library/artists/{artistId}/api-restore-artist"; + + /// + /// The route for the action that retrieves the albums of an artist. + /// public const string GET_ARTIST_ALBUMS = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/api-get-albums"; + + /// + /// The route for the album editing page. + /// public const string ALBUM = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}"; + + /// + /// The route for the action that retrieves the details of an album. + /// public const string GET_ALBUM = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/api-get-album"; + + /// + /// The route for the action that saves an album. + /// public const string SAVE_ALBUM = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/api-save-album"; + + /// + /// The route for the action that updates the cover of an album. + /// public const string UPDATE_ALBUM_COVER = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/api-update-cover"; + + /// + /// The route for the action that deletes an album. + /// public const string DELETE_ALBUM = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/api-delete-album"; + + /// + /// The route for the action that restores a deleted album. + /// public const string RESTORE_ALBUM = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/api-restore-album"; + + /// + /// The route for the action that retrieves the tracks of an album. + /// public const string GET_ALBUM_TRACKS = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/api-get-tracks"; + + /// + /// The route for the action that shuffles the tracks of the music library. + /// public const string SHUFFLE_TRACKS = "{culture}/library/audio-library/music-library/tracks/api-shuffle-tracks"; + + /// + /// The route for the track editing page. + /// public const string TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}"; + + /// + /// The route for the action that retrieves the details of a track. + /// public const string GET_TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-get-track"; + + /// + /// The route for the action that saves a track. + /// public const string SAVE_TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-save-track"; + + /// + /// The route for the action that deletes a track. + /// public const string DELETE_TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-delete-track"; + + /// + /// The route for the action that restores a deleted track. + /// public const string RESTORE_TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-restore-track"; + + /// + /// The route for the action that streams a track. + /// public const string STREAM_TRACK = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-stream-track"; + + /// + /// The route for the action that streams a segment of a track delivery. + /// public const string STREAM_TRACK_SEGMENT = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-stream-track-segment/{deliveryId}/{segmentIndex}"; + + /// + /// The route for the action that retrieves the playback manifest of a track. + /// public const string GET_PLAYBACK_MANIFEST = "{culture}/library/audio-library/music-library/artists/{artistId}/albums/{albumId}/tracks/{trackId}/api-get-playback-manifest"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Path.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Path.cs index ebc7bab3..034b6aa8 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Path.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Path.cs @@ -10,11 +10,34 @@ public static partial class WebRoutes /// public static class Path { + /// + /// The route for the action that retrieves the root of a path. + /// public const string GET_PATH_ROOT = "path/api-get-path-root"; + + /// + /// The route for the action that retrieves the separator of the current platform. + /// public const string GET_PATH_SEPARATOR = "path/api-get-path-separator"; + + /// + /// The route for the action that retrieves the parent of a path. + /// public const string GET_PATH_PARENT = "path/api-get-path-parent"; + + /// + /// The route for the action that splits a path into its parts. + /// public const string SPLIT_PATH = "path/api-split"; + + /// + /// The route for the action that validates a path. + /// public const string VALIDATE_PATH = "path/api-validate"; + + /// + /// The route for the action that checks whether a path exists. + /// public const string CHECK_PATH_EXISTS = "path/api-check-path-exists"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Playlists.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Playlists.cs index 390a4fc6..2ba0b571 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Playlists.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Playlists.cs @@ -10,18 +10,69 @@ public static partial class WebRoutes /// public static class Playlists { + /// + /// The route for the playlists page. + /// public const string INDEX = "{culture}/playlists"; + + /// + /// The route for the action that retrieves the playlists of the current user. + /// public const string GET_PLAYLISTS = "{culture}/playlists/api-get-playlists"; + + /// + /// The route for the action that creates a playlist for the current user. + /// public const string CREATE_PLAYLIST = "{culture}/playlists/api-create-playlist"; + + /// + /// The route for the playlist creation page. + /// public const string ADD = "{culture}/playlists/item"; + + /// + /// The route for the playlist details page. + /// public const string ITEM = "{culture}/playlists/item/{playlistId}"; + + /// + /// The route for the action that retrieves a playlist of the current user. + /// public const string GET_PLAYLIST = "{culture}/playlists/item/{playlistId}/api-get-playlist"; + + /// + /// The route for the action that updates a playlist of the current user. + /// public const string UPDATE_PLAYLIST = "{culture}/playlists/item/{playlistId}/api-update-playlist"; + + /// + /// The route for the action that deletes a playlist of the current user. + /// public const string DELETE_PLAYLIST = "{culture}/playlists/item/{playlistId}/api-delete-playlist"; + + /// + /// The route for the action that adds an entry to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRY = "{culture}/playlists/item/{playlistId}/entries/api-add-entry"; + + /// + /// The route for the action that adds multiple entries to a playlist of the current user. + /// public const string ADD_PLAYLIST_ENTRIES = "{culture}/playlists/item/{playlistId}/api-add-entries"; + + /// + /// The route for the action that adds every track of a library, an artist, or an album to a playlist of the current user. + /// public const string ADD_PLAYLIST_SCOPE_ENTRIES = "{culture}/playlists/item/{playlistId}/api-add-scope-entries"; + + /// + /// The route for the action that removes an entry from a playlist of the current user. + /// public const string REMOVE_PLAYLIST_ENTRY = "{culture}/playlists/item/{playlistId}/entries/{playlistEntryId}/api-remove-entry"; + + /// + /// The route for the action that moves an entry within a playlist of the current user. + /// public const string MOVE_PLAYLIST_ENTRY = "{culture}/playlists/item/{playlistId}/entries/{playlistEntryId}/api-move-entry"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Plugins.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Plugins.cs index e9f8d817..a34e2577 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Plugins.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Plugins.cs @@ -10,10 +10,29 @@ public static partial class WebRoutes /// public static class Plugins { + /// + /// The route for the plugin management page. + /// public const string INDEX = "{culture}/admin/manage-plugins"; + + /// + /// The route for the action that retrieves the installed plugins. + /// public const string GET_PLUGINS = "{culture}/admin/manage-plugins/api-get-plugins"; + + /// + /// The route for the action that retrieves the settings of a plugin. + /// public const string GET_PLUGIN_SETTINGS = "{culture}/admin/manage-plugins/api-get-plugin-settings/{pluginId}"; + + /// + /// The route for the action that updates the settings of a plugin. + /// public const string UPDATE_PLUGIN_SETTINGS = "{culture}/admin/manage-plugins/api-update-plugin-settings"; + + /// + /// The route for the action that installs a plugin. + /// public const string INSTALL_PLUGIN = "{culture}/admin/manage-plugins/api-install-plugin"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Scheduler.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Scheduler.cs index c8694626..2731defd 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Scheduler.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Scheduler.cs @@ -10,15 +10,54 @@ public static partial class WebRoutes /// public static class Scheduler { + /// + /// The route for the scheduled jobs page. + /// public const string INDEX = "{culture}/admin/scheduled-jobs"; + + /// + /// The route for the action that retrieves the scheduled jobs. + /// public const string GET_SCHEDULED_JOBS = "{culture}/admin/api-scheduled-jobs"; + + /// + /// The route for the action that adds a scheduled job. + /// public const string ADD_SCHEDULED_JOB = "{culture}/admin/api-scheduled-jobs/add"; + + /// + /// The route for the action that retrieves the execution history of the scheduled jobs. + /// public const string GET_SCHEDULED_JOB_HISTORY = "{culture}/admin/api-scheduled-jobs/history"; + + /// + /// The route for the action that removes a scheduled job. + /// public const string REMOVE_SCHEDULED_JOB = "{culture}/admin/api-scheduled-jobs/{scheduledJobId}"; + + /// + /// The route for the action that starts a scheduled job. + /// public const string START_SCHEDULED_JOB = "{culture}/admin/api-scheduled-jobs/{scheduledJobId}/start"; + + /// + /// The route for the action that stops a scheduled job. + /// public const string STOP_SCHEDULED_JOB = "{culture}/admin/api-scheduled-jobs/{scheduledJobId}/stop"; + + /// + /// The route for the action that fires a scheduled job immediately. + /// public const string FIRE_SCHEDULED_JOB = "{culture}/admin/api-scheduled-jobs/{scheduledJobId}/fire"; + + /// + /// The route for the action that retrieves the display preferences of the scheduled jobs. + /// public const string GET_DISPLAY_PREFERENCES = "{culture}/admin/api-scheduled-jobs/display-preferences"; + + /// + /// The route for the action that updates the display preferences of the scheduled jobs. + /// public const string UPDATE_DISPLAY_PREFERENCES = "{culture}/admin/api-scheduled-jobs/display-preferences"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Settings.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Settings.cs index 3806b805..5bbdb0dc 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Settings.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Settings.cs @@ -10,10 +10,29 @@ public static partial class WebRoutes /// public static class Settings { + /// + /// The route for the user settings page. + /// public const string INDEX = "{culture}/tools/settings"; + + /// + /// The route for the action that retrieves the settings of the current user. + /// public const string GET_USER_SETTINGS = "{culture}/tools/settings/api-get-user-settings"; + + /// + /// The route for the action that updates the settings of the current user. + /// public const string UPDATE_USER_SETTINGS = "{culture}/tools/settings/api-update-user-settings"; + + /// + /// The route for the action that retrieves the playback state of the current user. + /// public const string GET_PLAYBACK_STATE = "{culture}/tools/settings/api-get-playback-state"; + + /// + /// The route for the action that updates the playback state of the current user. + /// public const string UPDATE_PLAYBACK_STATE = "{culture}/tools/settings/api-update-playback-state"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Themes.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Themes.cs index 52ca707e..ce6b6b43 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Themes.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Themes.cs @@ -10,12 +10,39 @@ public static partial class WebRoutes /// public static class Themes { + /// + /// The route for the action that retrieves the installed themes. + /// public const string GET_THEMES = "{culture}/admin/themes/api-get-themes"; + + /// + /// The route for the action that installs a theme. + /// public const string INSTALL_THEME = "{culture}/admin/themes/api-install-theme"; + + /// + /// The route for the action that sets the current theme. + /// public const string SET_CURRENT_THEME = "{culture}/admin/themes/api-set-current-theme"; + + /// + /// The route for the action that restores a deleted theme. + /// public const string RESTORE_THEME = "{culture}/admin/themes/api-restore-theme/{themeId}"; + + /// + /// The route for the action that deletes a theme. + /// public const string DELETE_THEME = "{culture}/admin/themes/api-delete-theme/{themeId}"; + + /// + /// The route for the action that downloads the archive of a theme. + /// public const string DOWNLOAD_THEME = "{culture}/admin/themes/api-download-theme/{themeId}"; + + /// + /// The route for the action that serves the assets of a theme. + /// public const string THEME_ASSETS = "theme-assets/{themeId}/{*path}"; } } diff --git a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Thumbnails.cs b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Thumbnails.cs index 7f14febb..05782407 100644 --- a/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Thumbnails.cs +++ b/src/Lumina.Presentation.Web/Common/Routes/WebRoutes.Thumbnails.cs @@ -10,6 +10,9 @@ public static partial class WebRoutes /// public static class Thumbnails { + /// + /// The route for the action that retrieves a thumbnail. + /// public const string GET_THUMBNAIL = "thumbnails/api-get-thumbnail"; } } diff --git a/src/Lumina.Presentation.Web/Common/Utilities/ValidatorUtilities.cs b/src/Lumina.Presentation.Web/Common/Utilities/ValidatorUtilities.cs index f444023c..ba6f3d8c 100644 --- a/src/Lumina.Presentation.Web/Common/Utilities/ValidatorUtilities.cs +++ b/src/Lumina.Presentation.Web/Common/Utilities/ValidatorUtilities.cs @@ -308,7 +308,7 @@ public static class ValidatorUtilities /// /// /// If the property is or not a string, this rule fails (use - /// to skip optional properties). + /// When to skip optional properties). /// /// The type of the request being validated. /// The type of the property being validated. diff --git a/src/Lumina.Presentation.Web/Core/ViewComponents/FileSystemBrowserViewComponent.cs b/src/Lumina.Presentation.Web/Core/ViewComponents/FileSystemBrowserViewComponent.cs index cc5f39ad..0cc189e5 100644 --- a/src/Lumina.Presentation.Web/Core/ViewComponents/FileSystemBrowserViewComponent.cs +++ b/src/Lumina.Presentation.Web/Core/ViewComponents/FileSystemBrowserViewComponent.cs @@ -29,7 +29,7 @@ public class FileSystemBrowserViewComponent : ViewComponent } /// - /// Invokes the view component, rendering the theme template of the file system browser when available. + /// Invokes the FileSystemBrowser view component, rendering the theme template of the file system browser when available. /// /// An that renders the themed component, or the application fallback view when the theme template is unavailable. public async Task InvokeAsync() diff --git a/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj b/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj index fb2baeab..47285fc2 100644 --- a/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj +++ b/src/Lumina.Presentation.Web/Lumina.Presentation.Web.csproj @@ -5,8 +5,7 @@ disable $(SolutionDir)..\bin\web\ false - true - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904;EXTEXP0018 + $(WarningsNotAsErrors);EXTEXP0018 10a94da9-18ed-4c70-a9da-b461e08958c4 Linux lumina-web