Refactor namespaces to EnvelopeGenerator.API

Replaced all EnvelopeGenerator.GeneratorAPI namespaces with EnvelopeGenerator.API across controllers, models, extensions, middleware, and annotation-related files. Updated using/import statements and namespace declarations accordingly. Added wwwroot folder to project file. Minor code adjustments made for consistency. This unifies API naming for improved clarity and maintainability.
This commit is contained in:
2026-02-02 10:00:21 +01:00
parent cf40449112
commit f59c0d90ad
34 changed files with 58 additions and 57 deletions

View File

@@ -6,14 +6,14 @@ using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
using EnvelopeGenerator.Application.Histories.Queries;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.GeneratorAPI.Extensions;
using EnvelopeGenerator.API.Extensions;
using MediatR;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Manages annotations and signature lifecycle for envelopes.

View File

@@ -4,9 +4,9 @@ using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using EnvelopeGenerator.GeneratorAPI.Models;
using EnvelopeGenerator.API.Models;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Controller verantwortlich für die Benutzer-Authentifizierung, einschließlich Anmelden, Abmelden und Überprüfung des Authentifizierungsstatus.

View File

@@ -1,9 +1,9 @@
using EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
using EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Exposes configuration data required by the client applications.

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
namespace EnvelopeGenerator.GeneratorAPI.Controllers
namespace EnvelopeGenerator.API.Controllers
{
/// <summary>
/// Provides extension methods for extracting user information from a <see cref="ClaimsPrincipal"/>.

View File

@@ -6,7 +6,7 @@ using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Provides access to envelope documents for authenticated receivers.

View File

@@ -12,7 +12,7 @@ using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Controller for managing temp templates.

View File

@@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Dieser Controller stellt Endpunkte für die Verwaltung von Umschlägen bereit.

View File

@@ -3,7 +3,7 @@ using EnvelopeGenerator.Application.EnvelopeReceivers.Commands;
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
using EnvelopeGenerator.Application.Envelopes.Queries;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.GeneratorAPI.Models;
using EnvelopeGenerator.API.Models;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -14,7 +14,7 @@ using EnvelopeGenerator.Application.Common.SQL;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Controller für die Verwaltung von Umschlagempfängern.

View File

@@ -6,7 +6,7 @@ using EnvelopeGenerator.Application.Histories.Queries;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Extensions;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Dieser Controller stellt Endpunkte für den Zugriff auf die Umschlaghistorie bereit.
@@ -113,6 +113,6 @@ public class HistoryController : ControllerBase
public async Task<IActionResult> GetAllAsync([FromQuery] ReadHistoryQuery historyQuery, CancellationToken cancel)
{
var history = await _mediator.Send(historyQuery, cancel).ThrowIfEmpty(Exceptions.NotFound);
return Ok((historyQuery.OnlyLast ?? false) ? history.MaxBy(h => h.AddedWhen) : history);
return Ok((historyQuery.OnlyLast) ? history.MaxBy(h => h.AddedWhen) : history);
}
}

View File

@@ -2,12 +2,12 @@ using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.GeneratorAPI.Extensions;
using EnvelopeGenerator.API.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Manages read-only envelope sharing flows.

View File

@@ -3,8 +3,7 @@ using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.GeneratorAPI.Extensions;
using EnvelopeGenerator.GeneratorAPI.Models;
using EnvelopeGenerator.API.Models;
using Ganss.Xss;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
@@ -13,7 +12,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
namespace EnvelopeGenerator.API.Controllers;
/// <summary>
/// Exposes endpoints for registering and managing two-factor authentication for envelope receivers.

View File

@@ -1,18 +1,17 @@
namespace EnvelopeGenerator.GeneratorAPI
namespace EnvelopeGenerator.API;
/// <summary>
/// Provides custom claim types for envelope-related information.
/// </summary>
public static class EnvelopeClaimTypes
{
/// <summary>
/// Provides custom claim types for envelope-related information.
/// Claim type for the title of an envelope.
/// </summary>
public static class EnvelopeClaimTypes
{
/// <summary>
/// Claim type for the title of an envelope.
/// </summary>
public static readonly string Title = $"Envelope{nameof(Title)}";
public static readonly string Title = $"Envelope{nameof(Title)}";
/// <summary>
/// Claim type for the ID of an envelope.
/// </summary>
public static readonly string Id = $"Envelope{nameof(Id)}";
}
}
/// <summary>
/// Claim type for the ID of an envelope.
/// </summary>
public static readonly string Id = $"Envelope{nameof(Id)}";
}

View File

@@ -50,6 +50,7 @@
<ItemGroup>
<Folder Include="ClientApp\" />
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>

View File

@@ -3,7 +3,7 @@ using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
namespace EnvelopeGenerator.GeneratorAPI.Extensions;
namespace EnvelopeGenerator.API.Extensions;
/// <summary>
/// Provides helper methods for working with envelope-specific authentication claims.

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Middleware;
namespace EnvelopeGenerator.API.Middleware;
using DigitalData.Core.Exceptions;
using Microsoft.AspNetCore.Http;

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public record Auth(string? AccessCode = null, string? SmsCode = null, string? AuthenticatorCode = null, bool UserSelectSMS = default)
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
/// <summary>
/// Represents the keys and default values used for authentication token handling

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
/// <summary>
///

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models
namespace EnvelopeGenerator.API.Models
{
/// <summary>
/// Represents a hyperlink for contact purposes with various HTML attributes.

View File

@@ -1,6 +1,6 @@
using System.Globalization;
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class Culture
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class Cultures : List<Culture>
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class CustomImages : Dictionary<string, Image>
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class ErrorViewModel
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class Image
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
/// <summary>
/// Repräsentiert ein Login-Modell mit erforderlichem Passwort und optionaler ID und Benutzername.

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
public class MainViewModel
{

View File

@@ -1,6 +1,7 @@
using System.Text.Json.Serialization;
using EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
public record Annotation : IAnnotation
{

View File

@@ -1,6 +1,7 @@
using System.Text.Json.Serialization;
using EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
public class AnnotationParams
{

View File

@@ -1,6 +1,6 @@
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
/// <summary>
/// The Background is an annotation for the PSPDF Kit. However, it has no function.

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
public record Color
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
public static class Extensions
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
namespace EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
public interface IAnnotation
{

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.GeneratorAPI.Models;
namespace EnvelopeGenerator.API.Models;
/// <summary>
/// Represents the parameters for two-factor authentication (2FA) registration.

View File

@@ -11,11 +11,11 @@ using DigitalData.UserManager.DependencyInjection;
using EnvelopeGenerator.Application;
using DigitalData.Auth.Client;
using DigitalData.Core.Abstractions;
using EnvelopeGenerator.GeneratorAPI.Models;
using EnvelopeGenerator.API.Models;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using DigitalData.Core.Abstractions.Security.Extensions;
using EnvelopeGenerator.GeneratorAPI.Middleware;
using EnvelopeGenerator.API.Middleware;
using NLog.Web;
using NLog;