diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpoint.cs
new file mode 100644
index 00000000..24c559d0
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpoint.cs
@@ -0,0 +1,57 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.AddRole;
+
+///
+/// API endpoint for the /{culture}/admin/api-create-role route.
+///
+public class AddRoleEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public AddRoleEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.Admin.CREATE_ROLE);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Adds an authorization role.
+ ///
+ /// The request containing the details of the authorization role to add.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(AddRoleRequest request, CancellationToken cancellationToken)
+ {
+ RolePermissionsDto response = await _apiHttpClient.PostAsync(ApiRoutes.Roles.CREATE_ROLE, request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpointSummary.cs
new file mode 100644
index 00000000..d0ce5710
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/AddRole/AddRoleEndpointSummary.cs
@@ -0,0 +1,38 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.AddRole;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class AddRoleEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AddRoleEndpointSummary()
+ {
+ Summary = "Adds a new role.";
+ Description = "Creates a new authorization role with the specified permissions.";
+ RequestParam(r => r.RoleName, "The name of the role. Required.");
+ RequestParam(r => r.Permissions, "The collection of Ids of the permissions of the role. Required.");
+
+ ExampleRequest = new AddRoleRequest(
+ RoleName: "Editor",
+ Permissions: [
+ Guid.NewGuid(),
+ Guid.NewGuid(),
+ ]
+ );
+
+ Response(200, "The role is created.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpoint.cs
new file mode 100644
index 00000000..d88725ac
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.DeleteRole;
+
+///
+/// API endpoint for the /{culture}/admin/api-delete-role/{roleId} route.
+///
+public class DeleteRoleEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public DeleteRoleEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.DELETE);
+ Routes(WebRoutes.Admin.DELETE_ROLE);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Deletes the authorization role identified by the request.
+ ///
+ /// The request containing the unique identifier of the authorization role to delete.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(DeleteRoleRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.DeleteAsync(ApiRoutes.Roles.DELETE_ROLE.Replace("{roleId}", request.RoleId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpointSummary.cs
new file mode 100644
index 00000000..22a50431
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/DeleteRole/DeleteRoleEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.DeleteRole;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class DeleteRoleEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DeleteRoleEndpointSummary()
+ {
+ Summary = "Deletes a role.";
+ Description = "Deletes an existing authorization role identified by its unique identifier.";
+
+ RequestParam(r => r.RoleId, "The unique identifier of the role to delete.");
+
+ Response(200, "The role is deleted.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpoint.cs
new file mode 100644
index 00000000..dbaccd27
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.GetRolePermissions;
+
+///
+/// API endpoint for the /{culture}/admin/api-get-permissions-by-role-id/{roleId} route.
+///
+public class GetRolePermissionsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetRolePermissionsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.GET_PERMISSIONS_BY_ROLE_ID);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the permissions of the authorization role identified by the request.
+ ///
+ /// The request containing the unique identifier of the role whose permissions are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetRolePermissionsRequest request, CancellationToken cancellationToken)
+ {
+ RolePermissionsDto response = await _apiHttpClient.GetAsync(ApiRoutes.Roles.GET_ROLE_PERMISSIONS_BY_ROLE_ID.Replace("{roleId}", request.RoleId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpointSummary.cs
new file mode 100644
index 00000000..759f99f4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRolePermissions/GetRolePermissionsEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.GetRolePermissions;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetRolePermissionsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetRolePermissionsEndpointSummary()
+ {
+ Summary = "Gets the permissions of a role.";
+ Description = "Retrieves the permissions of an existing authorization role identified by its unique identifier.";
+
+ RequestParam(r => r.RoleId, "The unique identifier of the role whose permissions are retrieved.");
+
+ Response(200, "The permissions of the role are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs
new file mode 100644
index 00000000..940c1420
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.GetRoles;
+
+///
+/// API endpoint for the /{culture}/admin/api-get-roles route.
+///
+public class GetRolesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetRolesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.GET_ROLES);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the authorization roles.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ RoleDto[] roles = await _apiHttpClient.GetAsync(ApiRoutes.Roles.GET_ROLES, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(roles);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpointSummary.cs
new file mode 100644
index 00000000..12eb37e9
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/GetRoles/GetRolesEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.GetRoles;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetRolesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetRolesEndpointSummary()
+ {
+ Summary = "Gets all roles.";
+ Description = "Retrieves the collection of existing authorization roles.";
+
+ Response(200, "The collection of authorization roles is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpoint.cs
new file mode 100644
index 00000000..a5dd223e
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpoint.cs
@@ -0,0 +1,57 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.UpdateRole;
+
+///
+/// API endpoint for the /{culture}/admin/api-update-role route.
+///
+public class UpdateRoleEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public UpdateRoleEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.PUT);
+ Routes(WebRoutes.Admin.UPDATE_ROLE);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Updates an existing authorization role.
+ ///
+ /// The request containing the updated details of the authorization role.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(UpdateRoleRequest request, CancellationToken cancellationToken)
+ {
+ RolePermissionsDto response = await _apiHttpClient.PutAsync(ApiRoutes.Roles.UPDATE_ROLE, request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpointSummary.cs
new file mode 100644
index 00000000..d514eb18
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/Authorization/Roles/UpdateRole/UpdateRoleEndpointSummary.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.Authorization.Roles.UpdateRole;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class UpdateRoleEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UpdateRoleEndpointSummary()
+ {
+ Summary = "Updates a role.";
+ Description = "Updates the name and the permissions of an existing authorization role.";
+ RequestParam(r => r.RoleId, "The unique identifier of the role. Required.");
+ RequestParam(r => r.RoleName, "The name of the role. Required.");
+ RequestParam(r => r.Permissions, "The collection of Ids of the permissions of the role. Required.");
+
+ ExampleRequest = new UpdateRoleRequest(
+ RoleId: Guid.NewGuid(),
+ RoleName: "Editor",
+ Permissions: [
+ Guid.NewGuid(),
+ Guid.NewGuid(),
+ ]
+ );
+
+ Response(200, "The role is updated.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpoint.cs
new file mode 100644
index 00000000..4bcc95a4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpoint.cs
@@ -0,0 +1,60 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.ManagePermissions;
+
+///
+/// API endpoint for the /{culture}/admin/manage-permissions route.
+///
+public class ManagePermissionsViewEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ManagePermissionsViewEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.MANAGE_PERMISSIONS);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Displays the authorization permissions management view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ UserDto[] users = await _apiHttpClient.GetAsync(ApiRoutes.Authentication.USERS, cancellationToken).ConfigureAwait(false);
+ RoleDto[] roles = await _apiHttpClient.GetAsync(ApiRoutes.Roles.GET_ROLES, cancellationToken).ConfigureAwait(false);
+ PermissionDto[] permissions = await _apiHttpClient.GetAsync(ApiRoutes.Permissions.GET_PERMISSIONS, cancellationToken).ConfigureAwait(false);
+ Dictionary viewData = new() { ["users"] = users, ["roles"] = roles, ["permissions"] = permissions };
+ return View("/Core/Views/Admin/ManagePermissions.cshtml", viewData: viewData);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpointSummary.cs
new file mode 100644
index 00000000..abe4724f
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManagePermissions/ManagePermissionsViewEndpointSummary.cs
@@ -0,0 +1,24 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.ManagePermissions;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ManagePermissionsViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ManagePermissionsViewEndpointSummary()
+ {
+ Summary = "Renders the manage permissions view.";
+ Description = "Renders the view for managing the authorization permissions.";
+
+ Response(200, "The view for managing the authorization permissions is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpoint.cs
new file mode 100644
index 00000000..3203bd0c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpoint.cs
@@ -0,0 +1,58 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.ManageRoles;
+
+///
+/// API endpoint for the /{culture}/admin/manage-roles route.
+///
+public class ManageRolesViewEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ManageRolesViewEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.MANAGE_ROLES);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Displays the authorization roles management view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ RoleDto[] roles = await _apiHttpClient.GetAsync(ApiRoutes.Roles.GET_ROLES, cancellationToken).ConfigureAwait(false);
+ PermissionDto[] permissions = await _apiHttpClient.GetAsync(ApiRoutes.Permissions.GET_PERMISSIONS, cancellationToken).ConfigureAwait(false);
+ Dictionary viewData = new() { ["roles"] = roles, ["permissions"] = permissions };
+ return View("/Core/Views/Admin/ManageRoles.cshtml", viewData: viewData);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpointSummary.cs
new file mode 100644
index 00000000..91bca01d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/ManageRoles/ManageRolesViewEndpointSummary.cs
@@ -0,0 +1,24 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.ManageRoles;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ManageRolesViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ManageRolesViewEndpointSummary()
+ {
+ Summary = "Renders the manage roles view.";
+ Description = "Renders the view for managing the authorization roles.";
+
+ Response(200, "The view for managing the authorization roles is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpoint.cs
new file mode 100644
index 00000000..65bced26
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.GetUserPermissions;
+
+///
+/// API endpoint for the /{culture}/admin/api-get-permissions-by-user-id/{userId} route.
+///
+public class GetUserPermissionsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetUserPermissionsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.GET_PERMISSIONS_BY_USER_ID);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the permissions of the user identified by the request.
+ ///
+ /// The request containing the unique identifier of the user whose permissions are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetUserPermissionsRequest request, CancellationToken cancellationToken)
+ {
+ PermissionDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Authorization.GET_USER_PERMISSIONS_BY_USER_ID.Replace("{userId}", request.UserId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpointSummary.cs
new file mode 100644
index 00000000..d9646c0e
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserPermissions/GetUserPermissionsEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.GetUserPermissions;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetUserPermissionsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetUserPermissionsEndpointSummary()
+ {
+ Summary = "Gets the permissions of a user.";
+ Description = "Retrieves the authorization permissions of a user identified by its unique identifier.";
+
+ RequestParam(r => r.UserId, "The unique identifier of the user for whom to get the authorization permissions.");
+
+ Response(200, "The permissions of the user are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpoint.cs
new file mode 100644
index 00000000..872fb48c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.GetUserRole;
+
+///
+/// API endpoint for the /{culture}/admin/api-get-role-by-user-id/{userId} route.
+///
+public class GetUserRoleEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetUserRoleEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Admin.GET_ROLE_BY_USER_ID);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the authorization role of the user identified by the request.
+ ///
+ /// The request containing the unique identifier of the user whose authorization role is retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetUserRoleRequest request, CancellationToken cancellationToken)
+ {
+ RoleDto? response = await _apiHttpClient.GetAsync(ApiRoutes.Authorization.GET_USER_ROLE_BY_USER_ID.Replace("{userId}", request.UserId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpointSummary.cs
new file mode 100644
index 00000000..4711f3e7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/GetUserRole/GetUserRoleEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.GetUserRole;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetUserRoleEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetUserRoleEndpointSummary()
+ {
+ Summary = "Gets the role of a user.";
+ Description = "Retrieves the authorization role of a user identified by its unique identifier.";
+
+ RequestParam(r => r.UserId, "The unique identifier of the user for whom to get the authorization role.");
+
+ Response(200, "The role of the user is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpoint.cs
new file mode 100644
index 00000000..4d9fdfb4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpoint.cs
@@ -0,0 +1,57 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Responses.Authorization;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.UpdateUserRoleAndPermissions;
+
+///
+/// API endpoint for the /{culture}/admin/api-update-user-authorization route.
+///
+public class UpdateUserRoleAndPermissionsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public UpdateUserRoleAndPermissionsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.PUT);
+ Routes(WebRoutes.Admin.UPDATE_USER_AUTHORIZATION);
+ DontAutoTag();
+ Options(options => options.WithTags("Admin"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Updates the authorization role and permissions of the user identified by the request.
+ ///
+ /// The request containing the updated authorization role and permissions of the user.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(UpdateUserRoleAndPermissionsRequest request, CancellationToken cancellationToken)
+ {
+ GetAuthorizationResponse response = await _apiHttpClient.PutAsync(ApiRoutes.Authorization.UPDATE_USER_ROLE_AND_PERMISSIONS_BY_USER_ID.Replace("{userId}", request.UserId.ToString()), request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpointSummary.cs
new file mode 100644
index 00000000..1bfb975a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Admin/UsersManagement/Authorization/UpdateUserRoleAndPermissions/UpdateUserRoleAndPermissionsEndpointSummary.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Authorization;
+using Lumina.Presentation.Web.Common.Responses.Authorization;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Admin.UsersManagement.Authorization.UpdateUserRoleAndPermissions;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class UpdateUserRoleAndPermissionsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UpdateUserRoleAndPermissionsEndpointSummary()
+ {
+ Summary = "Updates the role and the permissions of a user.";
+ Description = "Updates the authorization role and the permissions of a user identified by its unique identifier.";
+ RequestParam(r => r.UserId, "The unique identifier of the user. Required.");
+ RequestParam(r => r.RoleId, "The unique identifier of the role. Optional.");
+ RequestParam(r => r.Permissions, "The collection of Ids of the permissions of the role. Optional.");
+
+ ExampleRequest = new UpdateUserRoleAndPermissionsRequest(
+ UserId: Guid.NewGuid(),
+ RoleId: Guid.NewGuid(),
+ Permissions: [
+ Guid.NewGuid(),
+ Guid.NewGuid(),
+ ]
+ );
+
+ Response(200, "The role and the permissions of the user are updated.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Common/BaseEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Common/BaseEndpoint.cs
new file mode 100644
index 00000000..62ca2828
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Common/BaseEndpoint.cs
@@ -0,0 +1,68 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Http;
+using Microsoft.AspNetCore.Http;
+using System.Collections.Generic;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Common;
+
+///
+/// Base class for Web endpoints.
+///
+/// The type of the request object.
+/// The type of the response object.
+public abstract class BaseEndpoint : Endpoint where TRequest : notnull
+ where TResponse : notnull
+{
+ ///
+ /// Gets the current culture taken from the culture route value.
+ ///
+ protected string Culture => HttpContext.Request.RouteValues["culture"]?.ToString() ?? "en-US";
+
+ ///
+ /// Configures the endpoint.
+ ///
+ ///
+ /// All exceptions are propagated to the application's exception handling middleware instead of being converted to error responses by the library.
+ ///
+ public override void Configure()
+ {
+ DontCatchExceptions();
+ }
+
+ ///
+ /// Renders a Razor view to the response.
+ ///
+ /// The name or path of the view to render.
+ /// The model to pass to the view.
+ /// Optional additional view data entries made available to the view via ViewData.
+ /// An that renders the view.
+ protected IResult View(string viewName, object? model = null, IReadOnlyDictionary? viewData = null)
+ {
+ // store the path of the displayed view in the session, so that the login redirect after the JWT token expires points to it; ignore the login endpoint,
+ // because it is incorrect to be redirected to the login URL, with the login URL as the return URL
+ if (HttpContext.Request.Path != "/en-us/auth/login")
+ HttpContext.Session.SetString(HttpContextItemKeys.LAST_DISPLAYED_VIEW, $"{HttpContext.Request.PathBase}{HttpContext.Request.Path}{HttpContext.Request.QueryString}");
+ return new RazorViewResult(viewName, model, viewData);
+ }
+
+ ///
+ /// Creates a JSON response indicating a successful operation, optionally wrapping .
+ ///
+ /// The payload of the successful response.
+ /// An containing the success JSON payload.
+ protected IResult JsonSuccess(object? data)
+ {
+ return Results.Json(new { success = true, data });
+ }
+
+ ///
+ /// Creates a JSON response indicating a successful operation without a payload.
+ ///
+ /// An containing the success JSON payload.
+ protected IResult JsonSuccess()
+ {
+ return Results.Json(new { success = true });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpoint.cs
new file mode 100644
index 00000000..4ef4680a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Directories;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Directories.GetDirectories;
+
+///
+/// API endpoint for the /directories/api-get-directories route.
+///
+public class GetDirectoriesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetDirectoriesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Directories.GET_DIRECTORIES);
+ DontAutoTag();
+ Options(options => options.WithTags("Directories"));
+ }
+
+ ///
+ /// Retrieves the directories of the file system path identified by the request.
+ ///
+ /// The request containing the file system path whose directories are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetDirectoriesRequest request, CancellationToken cancellationToken)
+ {
+ DirectoryDto[] response = await _apiHttpClient.GetAsync($"{ApiRoutes.Directories.GET_DIRECTORIES}?path={Uri.EscapeDataString(request.Path!)}&includeHiddenElements={request.IncludeHiddenElements}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpointSummary.cs
new file mode 100644
index 00000000..acdde3fd
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Directories/GetDirectories/GetDirectoriesEndpointSummary.cs
@@ -0,0 +1,31 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Directories;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Directories.GetDirectories;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetDirectoriesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetDirectoriesEndpointSummary()
+ {
+ Summary = "Retrieves the directories of a file system path.";
+ Description = "Retrieves the directories of the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The file system path for which to get the directories.");
+ RequestParam(r => r.IncludeHiddenElements, "Whether to include hidden file system elements or not.");
+
+ Response(200, "The directories of the file system path are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs
new file mode 100644
index 00000000..e113f456
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Drives.GetDrives;
+
+///
+/// API endpoint for the /drives/api-get-drives route.
+///
+public class GetDrivesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetDrivesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Drives.GET_DRIVES);
+ DontAutoTag();
+ Options(options => options.WithTags("Drives"));
+ }
+
+ ///
+ /// Retrieves the file system drives.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ FileSystemTreeNodeDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Drives.GET_DRIVES, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { drives = response });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpointSummary.cs
new file mode 100644
index 00000000..15107bd2
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Drives/GetDrives/GetDrivesEndpointSummary.cs
@@ -0,0 +1,26 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Drives.GetDrives;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetDrivesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetDrivesEndpointSummary()
+ {
+ Summary = "Retrieves the file system drives.";
+ Description = "Retrieves the list of file system drives of the machine.";
+
+ Response(200, "The list of file system drives is returned.", example: new { success = true, data = new { drives = new FileSystemTreeNodeDto[] { } } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs
new file mode 100644
index 00000000..bb304648
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.FileSystem.GetType;
+
+///
+/// API endpoint for the /file-system/api-get-type route.
+///
+public class GetTypeEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetTypeEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.FileSystem.GET_TYPE);
+ DontAutoTag();
+ Options(options => options.WithTags("FileSystem"));
+ }
+
+ ///
+ /// Retrieves the file system platform type.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ FileSystemTypeDto response = await _apiHttpClient.GetAsync(ApiRoutes.FileSystem.GET_TYPES, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { platformType = response.PlatformType.ToString() });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpointSummary.cs
new file mode 100644
index 00000000..c56308e2
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/FileSystem/GetType/GetTypeEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.FileSystem.GetType;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetTypeEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetTypeEndpointSummary()
+ {
+ Summary = "Retrieves the file system platform type.";
+ Description = "Retrieves the platform type of the file system of the machine.";
+
+ Response(200, "The type of the file system is returned.", example: new { success = true, data = new { platformType = "Windows" } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpoint.cs
new file mode 100644
index 00000000..3339abf9
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Files;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Files.GetFiles;
+
+///
+/// API endpoint for the /files/api-get-files route.
+///
+public class GetFilesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetFilesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Files.GET_FILES);
+ DontAutoTag();
+ Options(options => options.WithTags("Files"));
+ }
+
+ ///
+ /// Retrieves the files of the file system path identified by the request.
+ ///
+ /// The request containing the file system path whose files are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetFilesRequest request, CancellationToken cancellationToken)
+ {
+ FileDto[] response = await _apiHttpClient.GetAsync($"{ApiRoutes.Files.GET_FILES}?path={Uri.EscapeDataString(request.Path!)}&includeHiddenElements={request.IncludeHiddenElements}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpointSummary.cs
new file mode 100644
index 00000000..b1f4bbb7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetFiles/GetFilesEndpointSummary.cs
@@ -0,0 +1,31 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Files;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Files.GetFiles;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetFilesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetFilesEndpointSummary()
+ {
+ Summary = "Retrieves the files of a file system path.";
+ Description = "Retrieves the files of the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The file system path for which to get the files.");
+ RequestParam(r => r.IncludeHiddenElements, "Whether to include hidden file system elements or not.");
+
+ Response(200, "The files of the file system path are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpoint.cs
new file mode 100644
index 00000000..983877ef
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Files;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Files.GetTreeFiles;
+
+///
+/// API endpoint for the /files/api-get-tree-files route.
+///
+public class GetTreeFilesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetTreeFilesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Files.GET_TREE_FILES);
+ DontAutoTag();
+ Options(options => options.WithTags("Files"));
+ }
+
+ ///
+ /// Retrieves the file system tree of the file system path identified by the request.
+ ///
+ /// The request containing the file system path whose file system tree is retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetTreeFilesRequest request, CancellationToken cancellationToken)
+ {
+ FileSystemTreeNodeDto[] response = await _apiHttpClient.GetAsync($"{ApiRoutes.Files.GET_TREE_FILES}?path={Uri.EscapeDataString(request.Path!)}&includeHiddenElements={request.IncludeHiddenElements}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpointSummary.cs
new file mode 100644
index 00000000..da341087
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Files/GetTreeFiles/GetTreeFilesEndpointSummary.cs
@@ -0,0 +1,31 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Files;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Files.GetTreeFiles;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetTreeFilesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetTreeFilesEndpointSummary()
+ {
+ Summary = "Retrieves the file system tree of a file system path.";
+ Description = "Retrieves the file system tree of the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The file system path for which to get the tree files.");
+ RequestParam(r => r.IncludeHiddenElements, "Whether to include hidden file system elements or not.");
+
+ Response(200, "The file system tree of the file system path is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpoint.cs
new file mode 100644
index 00000000..db41a478
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.CheckPathExists;
+
+///
+/// API endpoint for the /path/api-check-path-exists route.
+///
+public class CheckPathExistsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public CheckPathExistsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.CHECK_PATH_EXISTS);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Checks whether the file system path identified by the request exists.
+ ///
+ /// The request containing the file system path whose existence is checked.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(CheckPathExistsRequest request, CancellationToken cancellationToken)
+ {
+ PathExistsDto response = await _apiHttpClient.GetAsync($"{ApiRoutes.Path.CHECK_PATH_EXISTS}?path={Uri.EscapeDataString(request.Path!)}&includeHiddenElements={request.IncludeHiddenElements}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { exists = response.Exists });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpointSummary.cs
new file mode 100644
index 00000000..6868b07c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/CheckPathExists/CheckPathExistsEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.CheckPathExists;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class CheckPathExistsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CheckPathExistsEndpointSummary()
+ {
+ Summary = "Checks the existence of a file system path.";
+ Description = "Checks whether the file system path identified by the request exists.";
+
+ RequestParam(r => r.Path, "The file system path to check the existence of.");
+ RequestParam(r => r.IncludeHiddenElements, "Whether to include hidden elements in the search results, or not.");
+
+ Response(200, "Whether the file system path exists is returned.", example: new { success = true, data = new { exists = true } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpoint.cs
new file mode 100644
index 00000000..b98013d9
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathParent;
+
+///
+/// API endpoint for the /path/api-get-path-parent route.
+///
+public class GetPathParentEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetPathParentEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.GET_PATH_PARENT);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Retrieves the parent path of the file system path identified by the request.
+ ///
+ /// The request containing the file system path whose parent path is retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetPathParentRequest request, CancellationToken cancellationToken)
+ {
+ PathSegmentDto[] response = await _apiHttpClient.GetAsync($"{ApiRoutes.Path.GET_PATH_PARENT}?path={Uri.EscapeDataString(request.Path!)}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { pathSegments = response });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpointSummary.cs
new file mode 100644
index 00000000..8403b28e
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathParent/GetPathParentEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathParent;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetPathParentEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetPathParentEndpointSummary()
+ {
+ Summary = "Retrieves the parent path of a file system path.";
+ Description = "Retrieves the path segments of the parent path of the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The path for which the parent path is retrieved.");
+
+ Response(200, "The path segments of the parent path are returned.", example: new { success = true, data = new { pathSegments = new PathSegmentDto[] { } } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpoint.cs
new file mode 100644
index 00000000..0b053d0f
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathRoot;
+
+///
+/// API endpoint for the /path/api-get-path-root route.
+///
+public class GetPathRootEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetPathRootEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.GET_PATH_ROOT);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Retrieves the root of the file system path identified by the request.
+ ///
+ /// The request containing the file system path whose root is retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetPathRootRequest request, CancellationToken cancellationToken)
+ {
+ PathSegmentDto response = await _apiHttpClient.GetAsync($"{ApiRoutes.Path.GET_PATH_ROOT}?path={Uri.EscapeDataString(request.Path!)}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { root = response });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpointSummary.cs
new file mode 100644
index 00000000..19ffc881
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathRoot/GetPathRootEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathRoot;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetPathRootEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetPathRootEndpointSummary()
+ {
+ Summary = "Retrieves the root of a file system path.";
+ Description = "Retrieves the root of the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The file system path for which to get the root.");
+
+ Response(200, "The root of the file system path is returned.", example: new { success = true, data = new { root = new PathSegmentDto() } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpoint.cs
new file mode 100644
index 00000000..d62c5666
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathSeparator;
+
+///
+/// API endpoint for the /path/api-get-path-separator route.
+///
+public class GetPathSeparatorEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetPathSeparatorEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.GET_PATH_SEPARATOR);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Retrieves the file system path separator.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ PathSeparatorDto response = await _apiHttpClient.GetAsync(ApiRoutes.Path.GET_PATH_SEPARATOR, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { pathSeparator = response.Separator });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpointSummary.cs
new file mode 100644
index 00000000..a8c70ab7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/GetPathSeparator/GetPathSeparatorEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.GetPathSeparator;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetPathSeparatorEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetPathSeparatorEndpointSummary()
+ {
+ Summary = "Retrieves the file system path separator.";
+ Description = "Retrieves the path separator of the file system of the machine.";
+
+ Response(200, "The file system path separator is returned.", example: new { success = true, data = new { pathSeparator = "\\" } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpoint.cs
new file mode 100644
index 00000000..db585f37
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.SplitPath;
+
+///
+/// API endpoint for the /path/api-split route.
+///
+public class SplitPathEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public SplitPathEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.SPLIT_PATH);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Splits the file system path identified by the request into its segments.
+ ///
+ /// The request containing the file system path to split.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(SplitPathRequest request, CancellationToken cancellationToken)
+ {
+ PathSegmentDto[] response = await _apiHttpClient.GetAsync($"{ApiRoutes.Path.SPLIT}?path={Uri.EscapeDataString(request.Path!)}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { pathSegments = response });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpointSummary.cs
new file mode 100644
index 00000000..79708895
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/SplitPath/SplitPathEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.SplitPath;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class SplitPathEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SplitPathEndpointSummary()
+ {
+ Summary = "Splits a file system path into its segments.";
+ Description = "Splits the file system path identified by the request into its path segments.";
+
+ RequestParam(r => r.Path, "The file system path for which to get the path segments.");
+
+ Response(200, "The path segments of the file system path are returned.", example: new { success = true, data = new { pathSegments = new PathSegmentDto[] { } } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpoint.cs
new file mode 100644
index 00000000..7adc0ffa
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.FileSystemManagement;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.ValidatePath;
+
+///
+/// API endpoint for the /path/api-validate route.
+///
+public class ValidatePathEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ValidatePathEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Path.VALIDATE_PATH);
+ DontAutoTag();
+ Options(options => options.WithTags("Path"));
+ }
+
+ ///
+ /// Validates the file system path identified by the request.
+ ///
+ /// The request containing the file system path to validate.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(ValidatePathRequest request, CancellationToken cancellationToken)
+ {
+ PathValidDto response = await _apiHttpClient.GetAsync($"{ApiRoutes.Path.VALIDATE}?path={Uri.EscapeDataString(request.Path!)}", cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { isValid = response.IsValid });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpointSummary.cs
new file mode 100644
index 00000000..d27cf78d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/FileSystemManagement/Path/ValidatePath/ValidatePathEndpointSummary.cs
@@ -0,0 +1,28 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.FileSystemManagement.Path;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.FileSystemManagement.Path.ValidatePath;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ValidatePathEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ValidatePathEndpointSummary()
+ {
+ Summary = "Validates a file system path.";
+ Description = "Validates the file system path identified by the request.";
+
+ RequestParam(r => r.Path, "The file system path to validate.");
+
+ Response(200, "Whether the file system path is valid is returned.", example: new { success = true, data = new { isValid = true } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpoint.cs
new file mode 100644
index 00000000..48b3be2a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpoint.cs
@@ -0,0 +1,42 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// API endpoint for the /{culture}/error route.
+///
+public class HomeErrorEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Home.ERROR);
+ DontAutoTag();
+ Options(options => options.WithTags("Home"));
+ }
+
+ ///
+ /// Displays the error page.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ ErrorViewDto errorViewDto = new() { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier };
+ return Task.FromResult(View("/Core/Views/Shared/Error.cshtml", errorViewDto));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpointSummary.cs
new file mode 100644
index 00000000..93cab65c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeErrorEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class HomeErrorEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HomeErrorEndpointSummary()
+ {
+ Summary = "Renders the error view.";
+ Description = "Renders the error page of the application.";
+
+ Response(200, "The error view is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpoint.cs
new file mode 100644
index 00000000..3650c1fc
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpoint.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// API endpoint for the / and /{culture} routes.
+///
+public class HomeIndexEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Home.INDEX, WebRoutes.Home.INDEX_CULTURED);
+ DontAutoTag();
+ Options(options => options.WithTags("Home"));
+ }
+
+ ///
+ /// Displays the home page.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Home/Index.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpointSummary.cs
new file mode 100644
index 00000000..ef423cbd
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeIndexEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class HomeIndexEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HomeIndexEndpointSummary()
+ {
+ Summary = "Renders the home page.";
+ Description = "Renders the home page of the application.";
+
+ Response(200, "The home page is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpoint.cs
new file mode 100644
index 00000000..25e9853a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpoint.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// API endpoint for the /{culture}/not-found route.
+///
+public class HomeNotFoundViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Home.NOT_FOUND);
+ DontAutoTag();
+ Options(options => options.WithTags("Home"));
+ }
+
+ ///
+ /// Displays the not-found page.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Shared/NotFound.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpointSummary.cs
new file mode 100644
index 00000000..167bb51d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomeNotFoundViewEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class HomeNotFoundViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HomeNotFoundViewEndpointSummary()
+ {
+ Summary = "Renders the not-found view.";
+ Description = "Renders the page displayed when a requested resource is not found.";
+
+ Response(200, "The not-found view is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpoint.cs
new file mode 100644
index 00000000..32059fb3
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpoint.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// API endpoint for the /{culture}/privacy route.
+///
+public class HomePrivacyEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Home.PRIVACY);
+ DontAutoTag();
+ Options(options => options.WithTags("Home"));
+ }
+
+ ///
+ /// Displays the privacy page.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Home/Privacy.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpointSummary.cs
new file mode 100644
index 00000000..c6f5d5fe
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Home/HomePrivacyEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Home;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class HomePrivacyEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HomePrivacyEndpointSummary()
+ {
+ Summary = "Renders the privacy view.";
+ Description = "Renders the privacy policy page of the application.";
+
+ Response(200, "The privacy view is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpoint.cs
new file mode 100644
index 00000000..0396bf28
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpoint.cs
@@ -0,0 +1,41 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.AddLibrary;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/item route.
+///
+public class AddLibraryViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.ADD_LIBRARY);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Displays the media library adding view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ LibraryDto library = new();
+ return Task.FromResult(View("/Core/Views/Library/Management/Item.cshtml", library));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpointSummary.cs
new file mode 100644
index 00000000..c47497e5
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/AddLibrary/AddLibraryViewEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.AddLibrary;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class AddLibraryViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AddLibraryViewEndpointSummary()
+ {
+ Summary = "Renders the add library view.";
+ Description = "Renders the view for adding a media library.";
+
+ Response(200, "The view for adding a media library is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs
new file mode 100644
index 00000000..fac161df
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.CancelLibrariesScan;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-cancel-libraries-scan route.
+///
+public class CancelLibrariesScanEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public CancelLibrariesScanEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.LibraryManagement.CANCEL_LIBRARIES_SCAN);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Cancels the running scans of all the media libraries.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PostAsync(ApiRoutes.Libraries.CANCEL_LIBRARIES_SCAN, new Web.Common.Requests.Common.EmptyRequest(), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpointSummary.cs
new file mode 100644
index 00000000..f5abed3d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibrariesScan/CancelLibrariesScanEndpointSummary.cs
@@ -0,0 +1,26 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.CancelLibrariesScan;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class CancelLibrariesScanEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CancelLibrariesScanEndpointSummary()
+ {
+ Summary = "Cancels the scan of all the media libraries.";
+ Description = "Cancels the running scans of all the media libraries.";
+
+ Response(200, "The scan of all media libraries is cancelled.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs
new file mode 100644
index 00000000..e3ccb02d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.CancelLibraryScan;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/{libraryId}/api-cancel-library-scan/{scanId} route.
+///
+public class CancelLibraryScanEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public CancelLibraryScanEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.LibraryManagement.CANCEL_LIBRARY_SCAN);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Cancels a running scan of a media library.
+ ///
+ /// The request containing the Ids of the media library and of the scan to cancel.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(CancelLibraryScanRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PostAsync(ApiRoutes.Libraries.CANCEL_LIBRARY_SCAN.Replace("{libraryId}", request.LibraryId.ToString()).Replace("{scanId}", request.ScanId.ToString()), new Lumina.Presentation.Web.Common.Requests.Common.EmptyRequest(), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpointSummary.cs
new file mode 100644
index 00000000..eca5a54c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/CancelLibraryScan/CancelLibraryScanEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.CancelLibraryScan;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class CancelLibraryScanEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CancelLibraryScanEndpointSummary()
+ {
+ Summary = "Cancels the scan of a media library.";
+ Description = "Cancels a running scan of the media library identified by the request.";
+
+ RequestParam(r => r.LibraryId, "The unique identifier of the media library whose scan is cancelled.");
+ RequestParam(r => r.ScanId, "The Id of the scan to cancel.");
+
+ Response(200, "The scan of the media library is cancelled.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpoint.cs
new file mode 100644
index 00000000..b84ee688
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.DeleteLibrary;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-item/{id} route.
+///
+public class DeleteLibraryEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public DeleteLibraryEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.DELETE);
+ Routes(WebRoutes.LibraryManagement.DELETE_LIBRARY);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Deletes a media library.
+ ///
+ /// The request containing the Id of the media library to delete.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(DeleteLibraryRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.DeleteAsync(ApiRoutes.Libraries.DELETE_LIBRARY.Replace("{id}", request.Id.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpointSummary.cs
new file mode 100644
index 00000000..7b5d012d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/DeleteLibrary/DeleteLibraryEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.DeleteLibrary;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class DeleteLibraryEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public DeleteLibraryEndpointSummary()
+ {
+ Summary = "Deletes a media library.";
+ Description = "Deletes the media library identified by the request.";
+
+ RequestParam(r => r.Id, "The unique identifier of the media library to delete.");
+
+ Response(200, "The media library is deleted.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpoint.cs
new file mode 100644
index 00000000..b0106ea2
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.EditLibrary;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/item/{id} route.
+///
+public class EditLibraryViewEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public EditLibraryViewEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.EDIT_LIBRARY);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Displays the media library editing view.
+ ///
+ /// The request containing the Id of the media library to edit.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EditLibraryRequest request, CancellationToken cancellationToken)
+ {
+ LibraryDto library = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_LIBRARY_BY_ID.Replace("{id}", request.Id.ToString()), cancellationToken).ConfigureAwait(false);
+ return View("/Core/Views/Library/Management/Item.cshtml", library);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpointSummary.cs
new file mode 100644
index 00000000..b4db6b5e
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/EditLibrary/EditLibraryViewEndpointSummary.cs
@@ -0,0 +1,28 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.EditLibrary;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class EditLibraryViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EditLibraryViewEndpointSummary()
+ {
+ Summary = "Renders the edit library view.";
+ Description = "Renders the view for editing the media library identified by the request.";
+
+ RequestParam(r => r.Id, "The unique identifier of the media library to edit.");
+
+ Response(200, "The view for editing the media library is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs
new file mode 100644
index 00000000..44c011ff
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetEnabledLibraries;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-get-enabled-libraries route.
+///
+public class GetEnabledLibrariesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetEnabledLibrariesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.GET_ENABLED_LIBRARIES);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Retrieves the enabled media libraries.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ LibraryDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_ENABLED_LIBRARIES, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpointSummary.cs
new file mode 100644
index 00000000..66e41840
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetEnabledLibraries/GetEnabledLibrariesEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetEnabledLibraries;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetEnabledLibrariesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetEnabledLibrariesEndpointSummary()
+ {
+ Summary = "Retrieves the enabled media libraries.";
+ Description = "Retrieves the collection of enabled media libraries.";
+
+ Response(200, "The collection of enabled media libraries is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs
new file mode 100644
index 00000000..6faa7a4a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetLibraries;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-get-libraries route.
+///
+public class GetLibrariesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetLibrariesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.GET_LIBRARIES);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Retrieves the media libraries.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ LibraryDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_LIBRARIES, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpointSummary.cs
new file mode 100644
index 00000000..c6072e51
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetLibraries/GetLibrariesEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetLibraries;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetLibrariesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetLibrariesEndpointSummary()
+ {
+ Summary = "Retrieves the media libraries.";
+ Description = "Retrieves the collection of media libraries.";
+
+ Response(200, "The collection of media libraries is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpoint.cs
new file mode 100644
index 00000000..c5f67185
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetMetadataProviders;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-get-metadata-providers/{libraryId} route.
+///
+public class GetMetadataProvidersEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetMetadataProvidersEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.GET_METADATA_PROVIDERS);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Retrieves the metadata providers of a media library.
+ ///
+ /// The request containing the Id of the media library whose metadata providers are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetMetadataProvidersRequest request, CancellationToken cancellationToken)
+ {
+ LibraryMetadataProviderDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_LIBRARY_METADATA_PROVIDERS.Replace("{libraryId}", request.LibraryId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpointSummary.cs
new file mode 100644
index 00000000..78d45f76
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetMetadataProviders/GetMetadataProvidersEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetMetadataProviders;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetMetadataProvidersEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetMetadataProvidersEndpointSummary()
+ {
+ Summary = "Retrieves the metadata providers of a media library.";
+ Description = "Retrieves the metadata providers of the media library identified by the request.";
+
+ RequestParam(r => r.LibraryId, "The unique identifier of the media library whose metadata providers are retrieved.");
+
+ Response(200, "The metadata providers of the media library are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs
new file mode 100644
index 00000000..676a5cea
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetRunningLibraryScans;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-get-running-library-scans route.
+///
+public class GetRunningLibraryScansEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetRunningLibraryScansEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.GET_RUNNING_LIBRARY_SCANS);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Retrieves the running media library scans.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ LibraryScanProgressDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_RUNNING_LIBRARIES_SCAN, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpointSummary.cs
new file mode 100644
index 00000000..a2f78a34
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/GetRunningLibraryScans/GetRunningLibraryScansEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.GetRunningLibraryScans;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetRunningLibraryScansEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetRunningLibraryScansEndpointSummary()
+ {
+ Summary = "Retrieves the running media library scans.";
+ Description = "Retrieves the collection of ongoing media library scans.";
+
+ Response(200, "The collection of ongoing media library scans is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpoint.cs
new file mode 100644
index 00000000..f553d0eb
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpoint.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.Index;
+
+///
+/// API endpoint for the /{culture}/libraries/manage route.
+///
+public class LibrariesIndexViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.LibraryManagement.INDEX);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ }
+
+ ///
+ /// Displays the media libraries management view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Library/Management/Index.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpointSummary.cs
new file mode 100644
index 00000000..1ae1502c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/Index/LibrariesIndexViewEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.Index;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class LibrariesIndexViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public LibrariesIndexViewEndpointSummary()
+ {
+ Summary = "Renders the libraries management view.";
+ Description = "Renders the view for managing the media libraries.";
+
+ Response(200, "The view for managing the media libraries is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpoint.cs
new file mode 100644
index 00000000..89ea7054
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ReorderMetadataProviders;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-reorder-metadata-providers route.
+///
+public class ReorderMetadataProvidersEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ReorderMetadataProvidersEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.PUT);
+ Routes(WebRoutes.LibraryManagement.REORDER_METADATA_PROVIDERS);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Reorders the metadata providers of a media library.
+ ///
+ /// The request containing the Id of the media library and the plugin Ids in the new order.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(ReorderLibraryMetadataProvidersRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PutAsync(ApiRoutes.Libraries.REORDER_LIBRARY_METADATA_PROVIDERS.Replace("{libraryId}", request.LibraryId.ToString()), request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpointSummary.cs
new file mode 100644
index 00000000..1e6ff0e6
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ReorderMetadataProviders/ReorderMetadataProvidersEndpointSummary.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ReorderMetadataProviders;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ReorderMetadataProvidersEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ReorderMetadataProvidersEndpointSummary()
+ {
+ Summary = "Reorders the metadata providers of a media library.";
+ Description = "Reorders the metadata providers of the media library identified by the request.";
+ RequestParam(r => r.LibraryId, "The Id of the media library whose metadata providers are reordered. Required.");
+ RequestParam(r => r.PluginIds, "The plugin Ids in the new order, from highest to lowest rank. Required.");
+
+ ExampleRequest = new ReorderLibraryMetadataProvidersRequest
+ {
+ LibraryId = Guid.NewGuid(),
+ PluginIds = [
+ Guid.NewGuid(),
+ Guid.NewGuid(),
+ ]
+ };
+
+ Response(200, "The metadata providers of the media library are reordered.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpoint.cs
new file mode 100644
index 00000000..8ccfdefa
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpoint.cs
@@ -0,0 +1,58 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.SaveLibrary;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-item route.
+///
+public class SaveLibraryEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public SaveLibraryEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.LibraryManagement.SAVE_LIBRARY);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ Policies(AuthorizationPolicies.REQUIRE_CREATE_LIBRARIES_PERMISSION);
+ }
+
+ ///
+ /// Creates or updates a media library.
+ ///
+ /// The request containing the details of the media library to create or update.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(LibraryDto request, CancellationToken cancellationToken)
+ {
+ LibraryDto response = request.Id.HasValue
+ ? await _apiHttpClient.PutAsync(ApiRoutes.Libraries.UPDATE_LIBRARY.Replace("{id}", request.Id.Value.ToString()), request, cancellationToken).ConfigureAwait(false)
+ : await _apiHttpClient.PostAsync(ApiRoutes.Libraries.ADD_LIBRARY, request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpointSummary.cs
new file mode 100644
index 00000000..8f00c2dd
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SaveLibrary/SaveLibraryEndpointSummary.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.SaveLibrary;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class SaveLibraryEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SaveLibraryEndpointSummary()
+ {
+ Summary = "Creates or updates a media library.";
+ Description = "Creates or updates the media library provided in the request.";
+ RequestParam(r => r.Id, "The unique identifier of the media library. Optional, when creating a new media library.");
+ RequestParam(r => r.UserId, "The unique identifier of the user owning the media library. Optional.");
+ RequestParam(r => r.Title, "The title of the media library. Required.");
+ RequestParam(r => r.LibraryType, "The type of the media library. Required.");
+ RequestParam(r => r.CoverImage, "The path of the image file used as the cover of the media library. Optional.");
+ RequestParam(r => r.ContentLocations, "The collection of directories that contain the media library files. Required.");
+ RequestParam(r => r.IsEnabled, "Whether the media library is enabled or not. Optional.");
+ RequestParam(r => r.IsLocked, "Whether the media library is locked or not. Optional.");
+ RequestParam(r => r.DownloadMetadataFromWeb, "Whether the metadata of the media library items should be downloaded from the web, or not. Optional.");
+ RequestParam(r => r.ShouldSaveMetadataInMediaDirectories, "Whether the downloaded metadata should be copied into the media library content locations, or not. Optional.");
+ RequestParam(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether the directories whose contents have not changed since the last scan should be skipped during the scan, or not. Optional.");
+
+ ExampleRequest = new LibraryDto();
+
+ Response(200, "The media library is created or updated.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs
new file mode 100644
index 00000000..7c77f6f0
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ScanLibraries;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-scan-libraries route.
+///
+public class ScanLibrariesEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ScanLibrariesEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.LibraryManagement.SCAN_LIBRARIES);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Initiates the scan of all the media libraries.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ ScanLibraryDto[] response = await _apiHttpClient.PostAsync(ApiRoutes.Libraries.SCAN_LIBRARIES, new Lumina.Presentation.Web.Common.Requests.Common.EmptyRequest(), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpointSummary.cs
new file mode 100644
index 00000000..01cc4ddc
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibraries/ScanLibrariesEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ScanLibraries;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ScanLibrariesEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ScanLibrariesEndpointSummary()
+ {
+ Summary = "Starts the scan of all the media libraries.";
+ Description = "Initiates the scan of all the media libraries.";
+
+ Response(200, "The scan of all media libraries is started.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs
new file mode 100644
index 00000000..19484e1c
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ScanLibrary;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-scan-library/{id} route.
+///
+public class ScanLibraryEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ScanLibraryEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.LibraryManagement.SCAN_LIBRARY);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Initiates the scan of a media library.
+ ///
+ /// The request containing the Id of the media library to scan.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(ScanLibraryRequest request, CancellationToken cancellationToken)
+ {
+ ScanLibraryDto response = await _apiHttpClient.PostAsync(ApiRoutes.Libraries.SCAN_LIBRARY.Replace("{id}", request.Id.ToString()), new Lumina.Presentation.Web.Common.Requests.Common.EmptyRequest(), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpointSummary.cs
new file mode 100644
index 00000000..20c24430
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/ScanLibrary/ScanLibraryEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Library.Management;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.ScanLibrary;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ScanLibraryEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ScanLibraryEndpointSummary()
+ {
+ Summary = "Starts the scan of a media library.";
+ Description = "Initiates the scan of the media library identified by the request.";
+
+ RequestParam(r => r.Id, "The unique identifier of the media library to scan.");
+
+ Response(200, "The scan of the media library is started.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpoint.cs
new file mode 100644
index 00000000..c27924c3
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.SetMetadataProviderEnabled;
+
+///
+/// API endpoint for the /{culture}/libraries/manage/api-set-metadata-provider-enabled route.
+///
+public class SetMetadataProviderEnabledEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public SetMetadataProviderEnabledEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.PUT);
+ Routes(WebRoutes.LibraryManagement.SET_METADATA_PROVIDER_ENABLED);
+ DontAutoTag();
+ Options(options => options.WithTags("Libraries"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Enables or disables a metadata provider of a media library.
+ ///
+ /// The request containing the Ids of the media library and of the plugin, and whether the provider is enabled.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(SetLibraryMetadataProviderEnabledRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PutAsync(ApiRoutes.Libraries.SET_LIBRARY_METADATA_PROVIDER_ENABLED.Replace("{libraryId}", request.LibraryId.ToString()).Replace("{pluginId}", request.PluginId.ToString()), request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpointSummary.cs
new file mode 100644
index 00000000..472df6f1
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/Management/SetMetadataProviderEnabled/SetMetadataProviderEnabledEndpointSummary.cs
@@ -0,0 +1,37 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.Management.SetMetadataProviderEnabled;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class SetMetadataProviderEnabledEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SetMetadataProviderEnabledEndpointSummary()
+ {
+ Summary = "Enables or disables a metadata provider of a media library.";
+ Description = "Enables or disables the metadata provider of the media library identified by the request.";
+ RequestParam(r => r.LibraryId, "The Id of the media library whose metadata provider is enabled or disabled. Required.");
+ RequestParam(r => r.PluginId, "The unique identifier of the plugin providing the metadata. Required.");
+ RequestParam(r => r.IsEnabled, "Whether the metadata provider should be enabled for the media library, or not. Required.");
+
+ ExampleRequest = new SetLibraryMetadataProviderEnabledRequest
+ {
+ LibraryId = Guid.NewGuid(),
+ PluginId = Guid.NewGuid(),
+ IsEnabled = true
+ };
+
+ Response(200, "The metadata provider of the media library is enabled or disabled.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpoint.cs
new file mode 100644
index 00000000..a6fd1b71
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpoint.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Library.WrittenContentLibrary.BookLibrary.Books;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.EditBook;
+
+///
+/// API endpoint for the /{culture}/library/written-content-library/books-library/books/{id} route.
+///
+public class EditBookViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Books.EDIT_BOOK);
+ DontAutoTag();
+ Options(options => options.WithTags("Books"));
+ }
+
+ ///
+ /// Displays the book editing view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(GetBookRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Library/WrittenContentLibrary/BookLibrary/Books/Item.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpointSummary.cs
new file mode 100644
index 00000000..f9024029
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/EditBook/EditBookViewEndpointSummary.cs
@@ -0,0 +1,28 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Library.WrittenContentLibrary.BookLibrary.Books;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.EditBook;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class EditBookViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public EditBookViewEndpointSummary()
+ {
+ Summary = "Renders the edit book view.";
+ Description = "Renders the view for editing the book identified by the request.";
+
+ RequestParam(r => r.Id, "The unique identifier of the book to edit.");
+
+ Response(200, "The view for editing the book is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpoint.cs
new file mode 100644
index 00000000..c8c344d4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpoint.cs
@@ -0,0 +1,81 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Libraries;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.GetLibraryItems;
+
+///
+/// API endpoint for the /{culture}/library/written-content-library/books-library/books/api-get-library-items route.
+///
+public class GetLibraryItemsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetLibraryItemsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Books.GET_LIBRARY_ITEMS);
+ DontAutoTag();
+ Options(options => options.WithTags("Books"));
+ }
+
+ ///
+ /// Retrieves the lightweight details of the books of a media library.
+ ///
+ /// The request containing the parameters used to retrieve the books.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetBooksLiteRequest request, CancellationToken cancellationToken)
+ {
+ PaginatedBookLiteDto response = await _apiHttpClient.GetAsync(BuildItemsEndpoint(request), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+
+ ///
+ /// Builds the API endpoint used to retrieve the lightweight details of the books of a media library, from the provided .
+ ///
+ /// The request containing the parameters used to retrieve the books.
+ /// The API endpoint to which the retrieval request is sent.
+ private static string BuildItemsEndpoint(GetBooksLiteRequest query)
+ {
+ StringBuilder endpoint = new(ApiRoutes.Books.GET_BOOKS_LITE);
+ endpoint.Append($"?libraryId={query.LibraryId}");
+ if (query.CurrentPage is not null)
+ endpoint.Append($"¤tPage={query.CurrentPage}");
+ if (query.PerPage is not null)
+ endpoint.Append($"&perPage={query.PerPage}");
+ if (!string.IsNullOrWhiteSpace(query.SearchTerm))
+ endpoint.Append($"&searchTerm={Uri.EscapeDataString(query.SearchTerm)}");
+ if (!string.IsNullOrWhiteSpace(query.FilterAlphaKey))
+ endpoint.Append($"&filterAlphaKey={Uri.EscapeDataString(query.FilterAlphaKey)}");
+ endpoint.Append($"&ignoreThePrefixForAlphaPicker={query.IgnoreThePrefixForAlphaPicker}");
+ if (!string.IsNullOrWhiteSpace(query.SortBy))
+ endpoint.Append($"&sortBy={Uri.EscapeDataString(query.SortBy)}");
+ if (query.SortOrder is not null)
+ endpoint.Append($"&sortOrder={query.SortOrder}");
+ return endpoint.ToString();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpointSummary.cs
new file mode 100644
index 00000000..b8f32be7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/GetLibraryItems/GetLibraryItemsEndpointSummary.cs
@@ -0,0 +1,37 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Libraries;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.GetLibraryItems;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetLibraryItemsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetLibraryItemsEndpointSummary()
+ {
+ Summary = "Retrieves the lightweight details of the books of a media library.";
+ Description = "Retrieves the lightweight details of the books of the media library identified by the request.";
+
+ RequestParam(r => r.LibraryId, "The Id of the media library whose books are retrieved.");
+ RequestParam(r => r.CurrentPage, "Optional. The page of results to retrieve.");
+ RequestParam(r => r.PerPage, "Optional. The maximum number of books to retrieve per page.");
+ RequestParam(r => r.SearchTerm, "Optional. The search term used to filter results.");
+ RequestParam(r => r.FilterAlphaKey, "Optional. The alpha key used to filter the results by the first character of their title, for the alpha picker.");
+ RequestParam(r => r.IgnoreThePrefixForAlphaPicker, "Whether the leading The prefix of a title is ignored when computing the alpha key, or not.");
+ RequestParam(r => r.SortBy, "Optional. The name of the field by which to sort the results.");
+ RequestParam(r => r.SortOrder, "Optional. The direction in which to sort the results.");
+
+ Response(200, "The lightweight details of the books of the media library are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpoint.cs
new file mode 100644
index 00000000..51c5a6b1
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpoint.cs
@@ -0,0 +1,60 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.Libraries;
+using Lumina.Presentation.Web.Common.Requests.Library.WrittenContentLibrary.BookLibrary.Books;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Common.Services;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.Index;
+
+///
+/// API endpoint for the /{culture}/library/written-content-library/books-library/books route.
+///
+public class BooksIndexViewEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+ private readonly IUrlService _urlService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ /// Injected service for generating URLs from action and controller names, with localization.
+ public BooksIndexViewEndpoint(IApiHttpClient apiHttpClient, IUrlService urlService)
+ {
+ _apiHttpClient = apiHttpClient;
+ _urlService = urlService;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Books.INDEX);
+ DontAutoTag();
+ Options(options => options.WithTags("Books"));
+ }
+
+ ///
+ /// Displays the books browsing view.
+ ///
+ /// The request containing the Id of the media library whose books are browsed.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetBooksViewRequest request, CancellationToken cancellationToken)
+ {
+ if (request.LibraryId is null)
+ return Results.Redirect(_urlService.GetAbsoluteUrl(WebRoutes.Home.INDEX_CULTURED)!);
+ LibraryDto library = await _apiHttpClient.GetAsync(ApiRoutes.Libraries.GET_LIBRARY_BY_ID.Replace("{id}", request.LibraryId.Value.ToString()), cancellationToken).ConfigureAwait(false);
+ return View("/Core/Views/Library/WrittenContentLibrary/BookLibrary/Books/Index.cshtml", library);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpointSummary.cs
new file mode 100644
index 00000000..cd6b461f
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Library/WrittenContentLibrary/BookLibrary/Books/Index/BooksIndexViewEndpointSummary.cs
@@ -0,0 +1,28 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Library.WrittenContentLibrary.BookLibrary.Books;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Library.WrittenContentLibrary.BookLibrary.Books.Index;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class BooksIndexViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public BooksIndexViewEndpointSummary()
+ {
+ Summary = "Renders the books browsing view.";
+ Description = "Renders the view for browsing the books of the media library identified by the request.";
+
+ RequestParam(r => r.LibraryId, "Optional. The unique identifier of the media library whose books are browsed.");
+
+ Response(200, "The view for browsing the books of the media library is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpoint.cs
new file mode 100644
index 00000000..9d0be7f7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPluginSettings;
+
+///
+/// API endpoint for the /{culture}/plugins/api-get-plugin-settings/{pluginId} route.
+///
+public class GetPluginSettingsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetPluginSettingsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Plugins.GET_PLUGIN_SETTINGS);
+ DontAutoTag();
+ Options(options => options.WithTags("Plugins"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the settings of the plugin identified by the request.
+ ///
+ /// The request containing the unique identifier of the plugin whose settings are retrieved.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(GetPluginSettingsRequest request, CancellationToken cancellationToken)
+ {
+ PluginSettingsDto response = await _apiHttpClient.GetAsync(ApiRoutes.Plugins.GET_PLUGIN_SETTINGS.Replace("{pluginId}", request.PluginId.ToString()), cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpointSummary.cs
new file mode 100644
index 00000000..70dfcd95
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPluginSettings/GetPluginSettingsEndpointSummary.cs
@@ -0,0 +1,30 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPluginSettings;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetPluginSettingsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetPluginSettingsEndpointSummary()
+ {
+ Summary = "Retrieves the settings of a plugin and their schema.";
+ Description = "Retrieves the settings and their schema of the plugin identified by the request.";
+
+ RequestParam(r => r.PluginId, "The unique identifier of the plugin whose settings are retrieved.");
+
+ Response(200, "The settings and their schema of the plugin are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs
new file mode 100644
index 00000000..56e66099
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpoint.cs
@@ -0,0 +1,55 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPlugins;
+
+///
+/// API endpoint for the /{culture}/plugins/api-get-plugins route.
+///
+public class GetPluginsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetPluginsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Plugins.GET_PLUGINS);
+ DontAutoTag();
+ Options(options => options.WithTags("Plugins"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Retrieves the plugins.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ PluginDto[] response = await _apiHttpClient.GetAsync(ApiRoutes.Plugins.GET_PLUGINS, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpointSummary.cs
new file mode 100644
index 00000000..b4841d86
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/GetPlugins/GetPluginsEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.GetPlugins;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetPluginsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetPluginsEndpointSummary()
+ {
+ Summary = "Retrieves the plugins.";
+ Description = "Retrieves the collection of detected plugins.";
+
+ Response(200, "The collection of detected plugins is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpoint.cs
new file mode 100644
index 00000000..b75707f4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpoint.cs
@@ -0,0 +1,62 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.DTO.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.Index;
+
+///
+/// API endpoint for the /{culture}/plugins route.
+///
+public class PluginsIndexViewEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public PluginsIndexViewEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Plugins.INDEX);
+ DontAutoTag();
+ Options(options => options.WithTags("Plugins"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ }
+
+ ///
+ /// Displays the plugins index view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ PluginDto[] plugins = await _apiHttpClient.GetAsync(ApiRoutes.Plugins.GET_PLUGINS, cancellationToken).ConfigureAwait(false);
+ Dictionary settingsByPluginId = [];
+ foreach (PluginDto plugin in plugins)
+ if (plugin.LoadStatus == Lumina.Presentation.Web.Common.Enums.Plugins.PluginLoadStatus.Loaded)
+ settingsByPluginId[plugin.Id] = await _apiHttpClient.GetAsync(ApiRoutes.Plugins.GET_PLUGIN_SETTINGS.Replace("{pluginId}", plugin.Id.ToString()), cancellationToken).ConfigureAwait(false);
+ Dictionary viewData = new() { ["pluginSettings"] = settingsByPluginId };
+ return View("/Core/Views/Plugins/Index.cshtml", plugins, viewData);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpointSummary.cs
new file mode 100644
index 00000000..9bf4802a
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/Index/PluginsIndexViewEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.Index;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class PluginsIndexViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public PluginsIndexViewEndpointSummary()
+ {
+ Summary = "Renders the plugins management view.";
+ Description = "Renders the view for managing the plugins and their settings.";
+
+ Response(200, "The view for managing the plugins and their settings is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpoint.cs
new file mode 100644
index 00000000..0cd1aba1
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpoint.cs
@@ -0,0 +1,56 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.UpdatePluginSettings;
+
+///
+/// API endpoint for the /{culture}/plugins/api-update-plugin-settings route.
+///
+public class UpdatePluginSettingsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public UpdatePluginSettingsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.PUT);
+ Routes(WebRoutes.Plugins.UPDATE_PLUGIN_SETTINGS);
+ DontAutoTag();
+ Options(options => options.WithTags("Plugins"));
+ Policies(AuthorizationPolicies.REQUIRE_ADMIN_ROLE);
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Updates the settings of the plugin identified by the request.
+ ///
+ /// The request containing the updated settings of the plugin.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(UpdatePluginSettingsRequest request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PutAsync(ApiRoutes.Plugins.UPDATE_PLUGIN_SETTINGS.Replace("{pluginId}", request.PluginId.ToString()), request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess();
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpointSummary.cs
new file mode 100644
index 00000000..80029d6d
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Plugins/UpdatePluginSettings/UpdatePluginSettingsEndpointSummary.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.Plugins;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Plugins.UpdatePluginSettings;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class UpdatePluginSettingsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UpdatePluginSettingsEndpointSummary()
+ {
+ Summary = "Updates the settings of a plugin.";
+ Description = "Updates the settings of the plugin identified by the request.";
+ RequestParam(r => r.PluginId, "The unique identifier of the plugin. Required.");
+ RequestParam(r => r.Settings, "The settings of the plugin. Optional.");
+
+ ExampleRequest = new UpdatePluginSettingsRequest
+ {
+ PluginId = Guid.NewGuid(),
+ Settings = new Dictionary
+ {
+ { "preferredLanguage", "fr" },
+ { "selectionStrategy", "first" }
+ }
+ };
+
+ Response(200, "The settings of the plugin are updated.", example: new SuccessResponse(true));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpoint.cs
new file mode 100644
index 00000000..f7e1c7e1
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpoint.cs
@@ -0,0 +1,85 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Tools;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Common.Services;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Localization;
+using Microsoft.AspNetCore.Routing;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Language.SetLanguage;
+
+///
+/// API endpoint for the /{culture}/tools/language/set-language route.
+///
+public class SetLanguageEndpoint : BaseEndpoint
+{
+ private readonly IUrlService _urlService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for generating URLs from action and controller names, with localization.
+ public SetLanguageEndpoint(IUrlService urlService)
+ {
+ _urlService = urlService;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Language.SET_LANGUAGE);
+ DontAutoTag();
+ Options(options => options.WithTags("Language"));
+ }
+
+ ///
+ /// Sets the culture used by the application.
+ ///
+ /// The request containing the new culture to set and the URL to return to.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(SetLanguageRequest request, CancellationToken cancellationToken)
+ {
+ // store the culture preference in a cookie
+ HttpContext.Response.Cookies.Append(
+ CookieRequestCultureProvider.DefaultCookieName,
+ CookieRequestCultureProvider.MakeCookieValue(new RequestCulture(request.NewCulture!)),
+ new CookieOptions
+ {
+ Expires = DateTimeOffset.UtcNow.AddYears(1),
+ IsEssential = true,
+ SameSite = SameSiteMode.Lax,
+ Path = "/" // ensure the cookie works across all paths
+ }
+ );
+ // ensure the return URL includes the correct culture
+ string returnUrl = string.IsNullOrEmpty(request.ReturnUrl) ? _urlService.GetAbsoluteUrl(WebRoutes.Home.INDEX_CULTURED)! : request.ReturnUrl;
+ // handle the culture replacement in the return URL
+ string currentCulture = Culture;
+ string culturePath = $"/{currentCulture.ToLower()}/";
+ string newCulturePath = $"/{request.NewCulture!.ToLower()}/";
+
+ // handle the base path if present
+ if (!string.IsNullOrEmpty(HttpContext.Request.PathBase))
+ returnUrl = returnUrl.Replace(HttpContext.Request.PathBase.Value!, string.Empty, StringComparison.OrdinalIgnoreCase);
+ // replace the culture in the URL
+ returnUrl = returnUrl.Replace(culturePath, newCulturePath, StringComparison.OrdinalIgnoreCase);
+
+ // re-apply the base path if present
+ if (!string.IsNullOrEmpty(HttpContext.Request.PathBase))
+ returnUrl = HttpContext.Request.PathBase.Value + returnUrl;
+
+ // redirect to the original page
+ return Results.LocalRedirect(returnUrl);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpointSummary.cs
new file mode 100644
index 00000000..33243485
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Language/SetLanguage/SetLanguageEndpointSummary.cs
@@ -0,0 +1,29 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.Tools;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Language.SetLanguage;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class SetLanguageEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SetLanguageEndpointSummary()
+ {
+ Summary = "Sets the culture of the application.";
+ Description = "Sets the culture used by the application, storing the preference in a cookie, and redirects the browser back.";
+
+ RequestParam(r => r.NewCulture, "The new culture to set.");
+ RequestParam(r => r.ReturnUrl, "The URL to return to, after setting the new culture.");
+
+ Response(200, "The culture preference is stored in a cookie, and the browser is redirected back.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpoint.cs
new file mode 100644
index 00000000..9dd135dc
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpoint.cs
@@ -0,0 +1,53 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings.GetUserSettings;
+
+///
+/// API endpoint for the /{culture}/tools/settings/api-get-user-settings route.
+///
+public class GetUserSettingsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public GetUserSettingsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Settings.GET_USER_SETTINGS);
+ DontAutoTag();
+ Options(options => options.WithTags("Settings"));
+ }
+
+ ///
+ /// Retrieves the settings of the current user.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ UserSettingsDto response = await _apiHttpClient.GetAsync(ApiRoutes.Users.GET_USER_SETTINGS, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpointSummary.cs
new file mode 100644
index 00000000..aaa64482
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/GetUserSettings/GetUserSettingsEndpointSummary.cs
@@ -0,0 +1,27 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings.GetUserSettings;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class GetUserSettingsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public GetUserSettingsEndpointSummary()
+ {
+ Summary = "Retrieves the settings of the current user.";
+ Description = "Retrieves the settings of the current user.";
+
+ Response(200, "The settings of the current user are returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpoint.cs
new file mode 100644
index 00000000..ece92a34
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpoint.cs
@@ -0,0 +1,41 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings;
+
+///
+/// API endpoint for the /{culture}/tools/settings route.
+///
+public class SettingsViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Settings.INDEX);
+ DontAutoTag();
+ Options(options => options.WithTags("Settings"));
+ }
+
+ ///
+ /// Displays the user settings view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ UserSettingsDto settings = new();
+ return Task.FromResult(View("/Core/Views/Tools/Settings.cshtml", settings));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpointSummary.cs
new file mode 100644
index 00000000..87cb9911
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/SettingsViewEndpointSummary.cs
@@ -0,0 +1,25 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class SettingsViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public SettingsViewEndpointSummary()
+ {
+ Summary = "Renders the user settings view.";
+ Description = "Renders the view for editing the settings of the current user.";
+
+ Response(200, "The view for editing the settings of the current user is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpoint.cs
new file mode 100644
index 00000000..044f7440
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpoint.cs
@@ -0,0 +1,54 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings.UpdateUserSettings;
+
+///
+/// API endpoint for the /{culture}/tools/settings/api-update-user-settings route.
+///
+public class UpdateUserSettingsEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public UpdateUserSettingsEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.Settings.UPDATE_USER_SETTINGS);
+ DontAutoTag();
+ Options(options => options.WithTags("Settings"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Updates the settings of the current user.
+ ///
+ /// The request containing the updated settings of the current user.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(UserSettingsDto request, CancellationToken cancellationToken)
+ {
+ await _apiHttpClient.PutAsync(ApiRoutes.Users.UPDATE_USER_SETTINGS, request, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(new { isUpdated = true });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpointSummary.cs
new file mode 100644
index 00000000..ead45202
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/Tools/Settings/UpdateUserSettings/UpdateUserSettingsEndpointSummary.cs
@@ -0,0 +1,32 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.UsersManagement;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.Tools.Settings.UpdateUserSettings;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class UpdateUserSettingsEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public UpdateUserSettingsEndpointSummary()
+ {
+ Summary = "Updates the settings of the current user.";
+ Description = "Updates the settings of the current user.";
+ RequestParam(r => r.UserId, "The unique identifier of the user that owns the settings. Optional.");
+ RequestParam(r => r.IsPaginationEnabled, "Whether pagination is enabled for the user, or not. Optional.");
+ RequestParam(r => r.ItemsPerPage, "The number of library items displayed per page when pagination is enabled. Optional.");
+ RequestParam(r => r.IgnoreThePrefixForAlphaPicker, "Whether the leading 'The' prefix of library item titles is ignored by the alpha picker, or not. Optional.");
+
+ ExampleRequest = new UserSettingsDto();
+
+ Response(200, "The settings of the current user are updated.", example: new { success = true, data = new { isUpdated = true } });
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpoint.cs
new file mode 100644
index 00000000..2139b2db
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpoint.cs
@@ -0,0 +1,40 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.AccessDenied;
+
+///
+/// API endpoint for the /{culture}/auth/access-denied route.
+///
+public class AccessDeniedViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Authentication.ACCESS_DENIED_VIEW);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ AllowAnonymous();
+ }
+
+ ///
+ /// Displays the access denied view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(View("/Core/Views/Auth/AccessDenied.cshtml"));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpointSummary.cs
new file mode 100644
index 00000000..9d06908b
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/AccessDenied/AccessDeniedViewEndpointSummary.cs
@@ -0,0 +1,24 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.AccessDenied;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class AccessDeniedViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AccessDeniedViewEndpointSummary()
+ {
+ Summary = "Renders the access denied view.";
+ Description = "Renders the view that is shown when the user is not authorized to access a resource.";
+
+ Response(200, "The access denied view is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpoint.cs
new file mode 100644
index 00000000..2e26cf91
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpoint.cs
@@ -0,0 +1,57 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using Lumina.Presentation.Web.Common.Responses.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.ChangePassword;
+
+///
+/// API endpoint for the /{culture}/auth/api-change-password route.
+///
+public class ChangePasswordEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ public ChangePasswordEndpoint(IApiHttpClient apiHttpClient)
+ {
+ _apiHttpClient = apiHttpClient;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.Authentication.CHANGE_PASSWORD);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Changes the password of the currently logged in account.
+ ///
+ /// The request containing the account credentials.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(ChangePasswordRequest request, CancellationToken cancellationToken)
+ {
+ // assign the currently logged in user as the user for which to change the password
+ ChangePasswordRequest changePasswordRequest = request with { Username = User?.Identity?.Name };
+ ChangePasswordResponse response = await _apiHttpClient.PostAsync(ApiRoutes.Authentication.CHANGE_PASSWORD, changePasswordRequest, cancellationToken).ConfigureAwait(false);
+ return JsonSuccess(response);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointSummary.cs
new file mode 100644
index 00000000..8d146614
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordEndpointSummary.cs
@@ -0,0 +1,39 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using Lumina.Presentation.Web.Common.Responses.UsersManagement;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.ChangePassword;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ChangePasswordEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ChangePasswordEndpointSummary()
+ {
+ Summary = "Changes the account password.";
+ Description = "Changes the password of the currently logged in account.";
+ RequestParam(r => r.Username, "The username of the account. Required.");
+ RequestParam(r => r.CurrentPassword, "The current password of the account. Required.");
+ RequestParam(r => r.NewPassword, "The new password of the account. Required.");
+ RequestParam(r => r.NewPasswordConfirm, "The confirmation of the new password of the account. Required.");
+
+ ExampleRequest = new ChangePasswordRequest(
+ Username: "JohnDoe",
+ CurrentPassword: "Abcd123$",
+ NewPassword: "Abcd1234$",
+ NewPasswordConfirm: "Abcd1234$"
+ );
+
+ Response(200, "The account password is changed.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpoint.cs
new file mode 100644
index 00000000..166cfc86
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpoint.cs
@@ -0,0 +1,41 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.ChangePassword;
+
+///
+/// API endpoint for the /{culture}/auth/change-password route.
+///
+public class ChangePasswordViewEndpoint : BaseEndpoint
+{
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Authentication.CHANGE_PASSWORD_VIEW);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ }
+
+ ///
+ /// Displays the account password change view.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ ChangePasswordRequest changePasswordRequest = new(Username: null, CurrentPassword: null, NewPassword: null, NewPasswordConfirm: null);
+ return Task.FromResult(View("/Core/Views/Auth/ChangePassword.cshtml", changePasswordRequest));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpointSummary.cs
new file mode 100644
index 00000000..2cbfeda4
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/ChangePassword/ChangePasswordViewEndpointSummary.cs
@@ -0,0 +1,24 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.ChangePassword;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class ChangePasswordViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public ChangePasswordViewEndpointSummary()
+ {
+ Summary = "Renders the change password view.";
+ Description = "Renders the view for changing the password of the account.";
+
+ Response(200, "The view for changing the account password is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpoint.cs
new file mode 100644
index 00000000..936620e7
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpoint.cs
@@ -0,0 +1,143 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Api;
+using Lumina.Presentation.Web.Common.Exceptions;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using Lumina.Presentation.Web.Common.Responses.UsersManagement;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Common.Security;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Authentication;
+using Microsoft.AspNetCore.Authentication.Cookies;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Abstractions;
+using Microsoft.AspNetCore.Mvc.Routing;
+using Microsoft.AspNetCore.Routing;
+using Microsoft.Extensions.DependencyInjection;
+using System;
+using System.Collections.Generic;
+using System.Security.Claims;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Login;
+
+///
+/// API endpoint for the /{culture}/auth/api-login route.
+///
+public class LoginEndpoint : BaseEndpoint
+{
+ private readonly IApiHttpClient _apiHttpClient;
+ private readonly ICryptographyService _cryptographyService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for interactions with the API.
+ /// Injected service for cryptographic functionality.
+ public LoginEndpoint(IApiHttpClient apiHttpClient, ICryptographyService cryptographyService)
+ {
+ _apiHttpClient = apiHttpClient;
+ _cryptographyService = cryptographyService;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.POST);
+ Routes(WebRoutes.Authentication.LOGIN);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ AllowAnonymous();
+ EnableAntiforgery();
+ }
+
+ ///
+ /// Authenticates an account and signs the user in.
+ ///
+ /// The request containing the account credentials.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(LoginRequest request, CancellationToken cancellationToken)
+ {
+ try
+ {
+ // attempt API login
+ LoginResponse response = await _apiHttpClient.PostAsync(ApiRoutes.Authentication.LOGIN_ACCOUNT, request, cancellationToken).ConfigureAwait(false);
+ // store the received token in a secure cookie
+ HttpContext.Response.Cookies.Delete("Token");
+ HttpContext.Response.Cookies.Append("Token", _cryptographyService.Encrypt(response.Token!), new CookieOptions
+ {
+ Expires = DateTimeOffset.UtcNow.AddMonths(1),
+ Path = "/",
+ HttpOnly = true,
+ Secure = true,
+ IsEssential = true,
+ SameSite = SameSiteMode.Strict
+ });
+ // tell asp.net we are logged in
+ List claims =
+ [
+ new Claim(ClaimTypes.Name, response.Username!),
+ new Claim(ClaimTypes.NameIdentifier, response.Id.ToString()!),
+ new Claim("Token", response.Token!),
+ ];
+ ClaimsIdentity claimsIdentity = new(claims, CookieAuthenticationDefaults.AuthenticationScheme);
+ await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(claimsIdentity)).ConfigureAwait(false);
+ // get current culture from route data or use default if not set
+ string currentCulture = Culture;
+ // handle ReturnUrl and ensure it includes the correct culture
+ string redirectUrl;
+ if (!string.IsNullOrEmpty(request.ReturnUrl) && IsLocalUrl(request.ReturnUrl)) // ensure that return URL contains the correct culture
+ redirectUrl = request.ReturnUrl.StartsWith($"/{currentCulture}/") ? request.ReturnUrl : $"/{currentCulture}{request.ReturnUrl}";
+ else
+ {
+ // if no ReturnUrl is provided or it's invalid, use a default URL with respect to base paths
+ redirectUrl = "/";
+
+ // handle reverse proxy scenarios by respecting any base path or forwarded headers
+ if (HttpContext.Request.Headers.TryGetValue("X-Forwarded-Prefix", out Microsoft.Extensions.Primitives.StringValues pathBase))
+ redirectUrl = pathBase + redirectUrl;
+
+ // ensure that default redirect contains the correct culture
+ if (!redirectUrl.StartsWith($"/{currentCulture}/"))
+ redirectUrl = $"/{currentCulture}{redirectUrl}";
+ }
+
+ // return success status and redirect URL
+ return JsonSuccess(redirectUrl);
+ }
+ catch (ApiException apiException)
+ {
+ // in this particular case, we DO NOT want to let the exception handling middleware take care of this exception, because when the user has 2FA enabled, the first auth step involves sending
+ // only the username and password, in which case the server API will respond with a validation error, that TOTP code is not valid (empty); it is then that we catch this error here
+ // and display the form that asks the user for the TOTP code
+ if (apiException.ProblemDetails is not null && apiException.ProblemDetails.Extensions?.Count > 0 && apiException.ProblemDetails.Extensions.TryGetValue("errors", out JsonElement errorsObj))
+ if (errorsObj is JsonElement jsonElement && jsonElement.ValueKind == JsonValueKind.Object)
+ foreach (JsonProperty error in jsonElement.EnumerateObject())
+ if (error.Value.ValueKind == JsonValueKind.Array)
+ foreach (JsonElement errorValue in error.Value.EnumerateArray())
+ if (errorValue.ValueKind == JsonValueKind.String && errorValue.GetString() == "InvalidTotpCode" && string.IsNullOrEmpty(request.TotpCode))
+ return JsonSuccess(new { isTotpRequired = true }); // only get here when user did not enter a TOTP code at all, otherwise rethrow the validation error
+ throw;
+ }
+ }
+
+ ///
+ /// Determines whether the specified URL is a local URL.
+ ///
+ /// The URL to inspect.
+ /// if the URL is local, otherwise.
+ private bool IsLocalUrl(string? url)
+ {
+ IUrlHelperFactory urlHelperFactory = HttpContext.RequestServices.GetRequiredService();
+ RouteData routeData = HttpContext.GetRouteData() ?? new RouteData();
+ IUrlHelper urlHelper = urlHelperFactory.GetUrlHelper(new ActionContext(HttpContext, routeData, new ActionDescriptor()));
+ return urlHelper.IsLocalUrl(url);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointSummary.cs
new file mode 100644
index 00000000..88eb86ba
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginEndpointSummary.cs
@@ -0,0 +1,38 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.DTO.Common;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Login;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class LoginEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public LoginEndpointSummary()
+ {
+ Summary = "Authenticates a user.";
+ Description = "Authenticates an account and signs the user in, returning the URL to redirect to.";
+ RequestParam(r => r.Username, "The username of the account. Required.");
+ RequestParam(r => r.Password, "The password of the account. Required.");
+ RequestParam(r => r.TotpCode, "The TOTP (Time-Based One-Time Password) code used for two-factor authentication. Optional.");
+ RequestParam(r => r.ReturnUrl, "The URL to return to, after login. Optional.");
+
+ ExampleRequest = new LoginRequest(
+ Username: "JohnDoe",
+ Password: "Abcd123$",
+ TotpCode: "123456",
+ ReturnUrl: "/"
+ );
+
+ Response(200, "The user is authenticated, and the URL to redirect to is returned.", example: new SuccessResponse(true, default));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpoint.cs
new file mode 100644
index 00000000..4a758ef8
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpoint.cs
@@ -0,0 +1,66 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Authorization;
+using Lumina.Presentation.Web.Common.Http;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement.Authentication;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Common.Services;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Login;
+
+///
+/// API endpoint for the /{culture}/auth/login/{returnUrl?} route.
+///
+public class LoginViewEndpoint : BaseEndpoint
+{
+ private readonly IUrlService _urlService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for generating URLs from action and controller names, with localization.
+ public LoginViewEndpoint(IUrlService urlService)
+ {
+ _urlService = urlService;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Authentication.LOGIN_VIEW);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ AllowAnonymous();
+ PreProcessor>();
+ }
+
+ ///
+ /// Displays the account login view.
+ ///
+ /// The request containing the URL to return to, after login.
+ /// Cancellation token that can be used to stop the execution.
+ public override Task ExecuteAsync(LoginViewRequest request, CancellationToken cancellationToken)
+ {
+ Dictionary viewData = new() { ["ReturnUrl"] = request.ReturnUrl };
+ // if the user is already logged in, redirect them to the home page
+ if (User?.Identity?.IsAuthenticated == true)
+ return Task.FromResult(Results.Redirect(_urlService.GetAbsoluteUrl(WebRoutes.Home.INDEX_CULTURED)!));
+ // check if the application is initialized (does contain at least the super user account); if it's not, redirect to registration view
+ string? isPendingSuperAdminSetup = HttpContext.Session.GetString(HttpContextItemKeys.PENDING_SUPER_ADMIN_SETUP);
+ if (isPendingSuperAdminSetup == "true")
+ return Task.FromResult(Results.Redirect(_urlService.GetAbsoluteUrl(WebRoutes.Authentication.REGISTER_VIEW)!));
+ return Task.FromResult(View("/Core/Views/Auth/Login.cshtml", new LoginRequest(), viewData));
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpointSummary.cs
new file mode 100644
index 00000000..612c6bda
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Login/LoginViewEndpointSummary.cs
@@ -0,0 +1,28 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Requests.UsersManagement.Authentication;
+using System;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Login;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class LoginViewEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public LoginViewEndpointSummary()
+ {
+ Summary = "Renders the account login view.";
+ Description = "Renders the account login view, using the specified URL to return to after login.";
+
+ RequestParam(r => r.ReturnUrl, "The URL to return to, after login.");
+
+ Response(200, "The account login view is rendered.");
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpoint.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpoint.cs
new file mode 100644
index 00000000..b6dae3b9
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpoint.cs
@@ -0,0 +1,58 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using Lumina.Presentation.Web.Common.Routes;
+using Lumina.Presentation.Web.Common.Services;
+using Lumina.Presentation.Web.Core.Endpoints.Common;
+using Microsoft.AspNetCore.Authentication;
+using Microsoft.AspNetCore.Authentication.Cookies;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Http;
+using System.Threading;
+using System.Threading.Tasks;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Logout;
+
+///
+/// API endpoint for the /{culture}/auth/logout route.
+///
+public class LogoutEndpoint : BaseEndpoint
+{
+ private readonly IUrlService _urlService;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Injected service for generating URLs from action and controller names, with localization.
+ public LogoutEndpoint(IUrlService urlService)
+ {
+ _urlService = urlService;
+ }
+
+ ///
+ /// Configures the endpoint.
+ ///
+ public override void Configure()
+ {
+ base.Configure();
+ Verbs(Http.GET);
+ Routes(WebRoutes.Authentication.LOGOUT);
+ DontAutoTag();
+ Options(options => options.WithTags("Authentication"));
+ }
+
+ ///
+ /// Logs out the account and redirects to the login page.
+ ///
+ /// The request object.
+ /// Cancellation token that can be used to stop the execution.
+ public override async Task ExecuteAsync(EmptyRequest request, CancellationToken cancellationToken)
+ {
+ // if the user is not logged in, redirect them to the home page
+ if (User?.Identity?.IsAuthenticated == false)
+ return Results.Redirect(_urlService.GetAbsoluteUrl(WebRoutes.Home.INDEX_CULTURED)!);
+ HttpContext.Response.Cookies.Delete("Token");
+ await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme).ConfigureAwait(false);
+ return Results.Redirect(_urlService.GetAbsoluteUrl(WebRoutes.Authentication.LOGIN_VIEW)!);
+ }
+}
diff --git a/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpointSummary.cs b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpointSummary.cs
new file mode 100644
index 00000000..480cd8cb
--- /dev/null
+++ b/src/Lumina.Presentation.Web/Core/Endpoints/UsersManagement/Authentication/Logout/LogoutEndpointSummary.cs
@@ -0,0 +1,24 @@
+#region ========================================================================= USING =====================================================================================
+using FastEndpoints;
+using System.Diagnostics.CodeAnalysis;
+#endregion
+
+namespace Lumina.Presentation.Web.Core.Endpoints.UsersManagement.Authentication.Logout;
+
+///
+/// Class used for providing a textual description for the endpoint, for OpenAPI.
+///
+[ExcludeFromCodeCoverage]
+public class LogoutEndpointSummary : Summary
+{
+ ///
+ /// Initializes a new instance of the