315 Commits

Author SHA1 Message Date
Developer 02
40dc0ecda3 Add CreateEnvelopeReceiverResponse record
Introduces the `CreateEnvelopeReceiverResponse` record in the
`EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create`
namespace. This record inherits from `ReadEnvelopeReceiverQuery`
and includes an optional `Status` parameter of type
`EnvelopeStatusQuery`. Also adds necessary using directives.
2025-05-06 09:56:35 +02:00
Developer 02
7b7a4b4f65 Add AddEnvelopeReceiver method and SQL class
Introduces the `AddEnvelopeReceiver` method in the `Extension` class to add envelope receivers with parameters for UUID, email, salutation, and optional phone.

Also adds the `EnvelopeReceiverAddReadSQL` class implementing `ISQL<Envelope>`, containing a SQL query to create a new receiver using the stored procedure `PRSIG_API_CREATE_RECEIVER`.

Includes XML documentation for improved code readability and maintainability.
2025-05-06 09:50:20 +02:00
Developer 02
b609253893 Revert "Refactor envelope handling to use ISQLExecutor"
This reverts commit 4cabaf31917c8860411349c0e5fc1c62e7c5c384.
2025-05-06 09:45:38 +02:00
Developer 02
b0eb1b6389 Revert "Add AddReceiver method and refactor SQL classes"
This reverts commit 1b515ea9040aba4a4fb52f82488d92d1ca142c15.
2025-05-06 09:44:15 +02:00
Developer 02
1b515ea904 Add AddReceiver method and refactor SQL classes
Introduced a new `AddReceiver` method in the `Extension` class to facilitate adding a receiver to an envelope. This method includes parameters for `envelope_uuid`, `emailAdress`, `salutation`, and an optional `phone`, along with XML documentation for clarity.

Removed the `EnvelopeReceiverCreateReadSQL` class and added the `EnvelopeReceiverAddReadSQL` class, which defines the SQL command for adding a receiver. The new class also includes XML documentation comments for better understanding.
2025-05-06 01:41:42 +02:00
Developer 02
4cabaf3191 Refactor envelope handling to use ISQLExecutor
This commit removes the IEnvelopeExecutor interface and its implementation, replacing it with ISQLExecutor. The CreateEnvelopeAsync method in Extension.cs now directly creates DynamicParameters. The CreateEnvelopeCommandHandler has been updated to utilize ISQLExecutor. Additionally, the EnvelopeExecutor class has been removed, and a new SQL command class, EnvelopeReceiverCreateReadSQL, has been added for managing envelope receiver SQL operations.
2025-05-06 01:30:59 +02:00
Developer 02
8cfa28a863 Refactor envelope creation logic into Extension class
Added a new static class `Extension` in `Extension.cs` to encapsulate methods for creating parameters and asynchronous envelope creation. Removed previous implementations from `EnvelopeCreateReadSQL.cs` for better organization. Updated `using` directives in `CreateEnvelopeCommandHandler.cs` and `EnvelopeCreateReadSQL.cs` for consistency.
2025-05-05 16:36:16 +02:00
Developer 02
3955a3232d Refactor envelope creation SQL logic
Removed `CreateEnvelopeSQL` and introduced `EnvelopeCreateReadSQL` to handle envelope creation logic. Updated the `Extension` class methods and modified `CreateEnvelopeAsync` in `EnvelopeExecutor` to utilize the new SQL class.
2025-05-05 16:30:39 +02:00
Developer 02
b93ba6be17 Refactor envelope creation logic and add IEnvelopeExecutor
Updated CreateEnvelopeCommandHandler to use IEnvelopeExecutor for managing envelope creation. Introduced CreateParmas method for parameter handling in CreateEnvelopeSQL. Corrected Dapper type mapping method name and added service registration for IEnvelopeExecutor in DependencyExtensions. Refactored SQLExecutor to enhance encapsulation. Created EnvelopeExecutor class implementing IEnvelopeExecutor for dedicated envelope operations.
2025-05-05 16:11:29 +02:00
Developer 02
39ff4b8867 Refactor envelope creation logic and SQL execution
- Changed `_sqlExecutor` type in `CreateEnvelopeCommandHandler` to non-generic `ISQLExecutor`.
- Updated `Handle` method to use `CreateEnvelopeAsync` for simplified parameter handling.
- Restructured `CreateEnvelopeSQL` to implement `ISQL<Envelope>` with a raw SQL command for creating envelopes.
- Added `SetDappeTypeMap<TModel>` method in `DependencyExtensions` for Dapper type mappings.
- Improved overall code structure for better separation of concerns and maintainability.
2025-05-05 13:53:31 +02:00
Developer 02
a757749767 Refactor SQL execution and enhance envelope creation
- Updated `ISQLExecutor<TEntity>` to inherit from new `ISQLExecutor` interface for improved SQL execution flexibility.
- Added package references for `Dapper` and `DigitalData.Core` in project files.
- Modified `CreateEnvelopeCommand` to include `[BindNever]` on `UserId` for better model binding control.
- Refactored `CreateEnvelopeCommandHandler` to use `DynamicParameters` for SQL parameter handling.
- Updated `CreateEnvelopeSQL` to select only the top record for performance.
- Introduced `GetIdOrDefault` method in `ControllerExtensions` for user ID retrieval with fallback.
- Added `CreateAsync` method in `EnvelopeController` for envelope creation using `IMediator`.
- Ensured infrastructure project has necessary package references.
- Refactored `SQLExecutor` to implement new interface and simplified constructor.
- Introduced `SQLExecutorBaseEntity` for entity-specific SQL command execution.
2025-05-05 10:15:36 +02:00
Developer 02
5166f41941 Refactor CreateEnvelopeResponse to use record type
Changed CreateEnvelopeResponse from a class to a record type for improved immutability and conciseness. The new definition inherits from ReadEnvelopeResponse, reusing its functionality. Added XML documentation comments for better clarity on each parameter.
2025-05-05 02:06:33 +02:00
Developer 02
928f2a7780 Add AutoMapper profile for envelope mapping
Introduces `CreateEnvelopeMappingProfile` class to define
mapping between `Envelope` entity and `CreateEnvelopeResponse`
DTO using AutoMapper's `CreateMap` method.
2025-05-05 02:03:56 +02:00
Developer 02
d46aa6e2b8 Add envelope creation functionality and SQL integration
- Updated `EnvelopeGenerator.Application.csproj` to include `Microsoft.Data.SqlClient` package.
- Refactored `CreateEnvelopeReceiverCommand` to inherit from `CreateEnvelopeCommand`.
- Enhanced `CreateEnvelopeSQL` with a SQL script for envelope creation.
- Introduced `CreateEnvelopeCommand` to encapsulate envelope creation data.
- Added `CreateEnvelopeCommandHandler` to process commands and interact with the database.
- Created `CreateEnvelopeResponse` class for handling responses from envelope creation.
2025-05-05 02:01:01 +02:00
Developer 02
841da3c261 Refactor DI extensions and add SQL executor support
Removed `DIExtensions.cs` and integrated its content into `DependencyExtensions.cs`, enhancing the dependency injection setup with repository and SQL executor registrations. Added a new `CreateEnvelopeSQL` class implementing the `ISQL<Envelope>` interface, currently with a placeholder implementation.
2025-05-05 00:31:58 +02:00
Developer 02
adbfd69418 feat(IQueryExecutor): IQuery umbenennen 2025-04-30 16:49:26 +02:00
Developer 02
1e54b775a2 refactor: Vereinfachung der SQLExecutor-Implementierung zur Rückgabe von IQueryExecutor
- Aktualisiert `SQLExecutor<T>` um `ISQLExecutor<T>` zu implementieren und `IQueryExecutor<T>` für die weitere Abfrageausführung zurückzugeben.
- Umstrukturierte Methoden zur Verwendung von `ToExecutor()` für die Konvertierung von rohen SQL-Abfragen in einen `IQueryExecutor<T>`.
- Geänderter Konstruktor, um `IServiceProvider` für die Injektion von Abhängigkeiten von benutzerdefinierten SQL-Abfrageklassen zu akzeptieren.
2025-04-29 17:14:38 +02:00
Developer 02
6e82b24578 feat: Implement QueryExecutor for executing queries using IQueryable
- Added a record `QueryExecutor<TEntity>` implementing `IQueryExecutor<TEntity>` for executing common query operations like First, Single, and ToList both synchronously and asynchronously.
- Methods leverage the IQueryable interface to perform database queries for entity types.
2025-04-29 16:56:13 +02:00
Developer 02
5331efe3c1 feat(sql): Hinzufügen generischer Überladungen zu SQLExecutor unter Verwendung von ISQL<T> über DI
Es wurden Überladungen für ExecuteFirstAsync, ExecuteSingleAsync und ExecuteAllAsync
eingeführt, die SQL-Definitionen aus dem Dependency Injection Container mittels ISQL<T> auflösen.
Außerdem wurde ein Fehler bei der Verwendung der Direktive von .cs zu standardmäßigem Schnittstellenimport korrigiert.
2025-04-29 16:39:18 +02:00
Developer 02
3b4ad2960a feat: SQLExecutor-Klasse für die Ausführung von Roh-SQL-Abfragen mit Entity Framework Core hinzufügen 2025-04-29 16:26:26 +02:00
Developer 02
33048e185b feat(CreateEnvelopeReceiverCommandHandler): initialized 2025-04-29 14:41:21 +02:00
Developer 02
2d3987b81e Add JWT Bearer authentication support
- Integrated JWT Bearer authentication for API security.
- Replaced previous CookieAuthenticationDefaults with JwtBearerDefaults as the default authentication scheme.
- Configured JWT token validation with issuer, audience, and signing key parameters.
- Added handling for token retrieval from cookies or query strings when missing in the header.
- Updated the authentication configuration to support both Cookie and JWT authentication schemes.
- Enhanced security by validating JWT tokens against provided public keys.
2025-04-28 16:18:31 +02:00
Developer 02
875ff95278 feat(AuthTokenKeys): Erstellt, um Parameter für Authentifizierungs-Tokens zu konfigurieren.
- AuthTokenKeys aus der Konfiguration in Program.cs lesen.
 - Upgrade von Core.Abstractions auf 3.5
2025-04-28 15:49:40 +02:00
Developer 02
27e9de4709 chore(Core.Abstraction): Aktualisiert auf 3.4.4 2025-04-28 15:02:49 +02:00
Developer 02
2966d64455 feat(terminal): ReadDocument-Befehl um PDF-Speicheroptionen erweitert
Optionen `save`, `dir` und `fileName` zum `ReadDocument`-Befehl hinzugefügt.
Wenn `save` aktiviert ist, wird das PDF an dem angegebenen oder dem Standardpfad gespeichert.
Ermöglicht dem Benutzer mehr Kontrolle über Speicherort und Dateinamen.
2025-04-25 19:33:29 +02:00
Developer 02
5f8df74b9d refactor(BasicDtoMappingProfile): Unter /DTOs verschieben.
- umbenennen in MappingProfile
 - Kommentare zur Dokumentation hinzufügen
2025-04-23 09:36:22 +02:00
Developer 02
ebb248969c fix(DIExtensions): AutoMapper-Konfiguration von UserManager hinzugefügt.
- In das Hauptverzeichnis des Projekts verschoben.
 - Umbenennen in DependencyInjection
2025-04-23 09:27:03 +02:00
Developer 02
97dcc0f0a1 feat(ReadDocumentMappingProfile): Added mapping profile of ReadDocumentResponse 2025-04-23 00:01:57 +02:00
Developer 02
8785505a91 feat(CommandManager): Add ReadDocument command. 2025-04-22 23:47:30 +02:00
Developer 02
975beff416 feat(ReadDocumentQueryHandler): Logik hinzugefügt 2025-04-22 23:16:22 +02:00
Developer 02
d3db1e74fa chore: aktualisierte Baget-Pakete 2025-04-22 21:06:36 +02:00
Developer 02
ba4a57512f Refaktorierung der Dienste und Aktualisierung der Paketabhängigkeiten
- Vereinfachte `IEnvelopeHistoryService`, `IEnvelopeReceiverReadOnlyService` und `IReceiverService` Schnittstellen durch Entfernung unnötiger generischer Parameter.
- Aktualisierte `EnvelopeHistoryService`, `EnvelopeReceiverReadOnlyService` und `ReceiverService` Klassen, um sie an die Schnittstellenänderungen anzupassen.
- Aktualisierte Paketverweise in mehreren Projektdateien, mit Schwerpunkt auf `DigitalData.Core` und `UserManager`.
- Hinzufügen von `DbSet<ClientUser>` zu `EGDbContext` und Einführung neuer privater Felder.
- Verfeinerung von `TestControllerBase` durch Entfernung überflüssiger Typ-Parameter in Constraints.
- Insgesamt verbessern diese Änderungen die Klarheit des Codes und gewährleisten die Kompatibilität mit aktualisierten Bibliotheken.
2025-04-16 14:25:57 +02:00
Developer 02
11f4896556 ReadDocumentQuery und Handler zum Abrufen von Dokumenten hinzufügen
Führt die Struktur `ReadDocumentQuery` zur Abfrage von Dokumenten anhand ihrer eindeutigen Kennung oder der zugehörigen Umschlagkennung ein und implementiert die Schnittstelle `IRequest<ReadDocumentResponse>` von MediatR.

Eine neue Handler-Klasse, `ReadDocumentQueryHandler`, wird erstellt, um die Abfrage zu verarbeiten, obwohl die Verarbeitungslogik noch nicht implementiert ist.

Außerdem wird eine Antwortstruktur, `ReadDocumentResponse`, definiert, um die Daten zu kapseln, die beim Lesen eines Dokuments zurückgegeben werden, einschließlich der Eigenschaften für die ID des Dokuments, die Umschlag-ID, das Hinzufügedatum und die Binärdaten.

Die erforderlichen Namespaces werden für die richtige Organisation und Funktionalität hinzugefügt.
2025-04-14 16:12:07 +02:00
Developer 02
a20c2b556f Add CommandDotNet support to IEnvelopeReceiverService
Updated IEnvelopeReceiverService to utilize CommandDotNet for command-line functionality. Added a new command attribute to the VerifyAccessCodeAsync method, allowing it to be invoked via command line. Modified the method signature to accept a string identifier for the envelope receiver, enhancing its usability and alignment with intended functionality.
2025-04-14 13:07:45 +02:00
Developer 02
c0608b457c Hinzufügen von CommandDotNet-Referenzen für mehrere Ziel-Frameworks
Hinzufügen von bedingten `<ItemGroup>`-Elementen in der Projektdatei
für `net7.0`, `net8.0` und `net9.0`, die jeweils die
entsprechende Version des `CommandDotNet`-Pakets angeben.
2025-04-14 11:53:38 +02:00
Developer 02
fe252b9979 Refactor email template commands and add controller
- Updated `UpdateEmailTemplateCommand` to use a property for `EmailTemplateQuery` with `JsonIgnore`, allowing optional body and subject parameters.
- Simplified `UpdateToDefaultCommand` by removing documentation comments and constructor parameters.
- Corrected namespace for `ReadEmailTemplateQuery` from `Query.Read` to `Queries.Read`.
- Introduced `ResetEnvelopeTemplateCommand` with optional ID and type, inheriting from `EmailTemplateQuery`, along with detailed XML documentation.
- Added `EmailTemplateController` to manage email templates, including methods for retrieval and updates, utilizing AutoMapper and authorization attributes.
2025-04-12 01:20:04 +02:00
Developer 02
f17820e011 Add UpdateToDefaultCommand for email template reset
Introduces a new namespace `EnvelopeGenerator.Application.EmailTemplates.Commands.UpdateToDefault` and defines the `UpdateToDefaultCommand` record. This command allows resetting an email template to its default values, inheriting from `EmailTemplateQuery`. It includes optional parameters for `Id` and `Type`, with comprehensive XML documentation detailing the command's purpose and the possible email template types.
2025-04-12 00:42:04 +02:00
Developer 02
a21c993cb5 Refactor email template handling and namespaces
Updated namespaces for email template files and improved
class structures. Removed the Language parameter from
EmailTemplateQuery. Added ReadEmailTemplateQuery and
ReadEmailTemplateResponse with updated parameters.
Introduced UpdateEmailTemplateCommand for template updates.
These changes enhance clarity and functionality in the
email template management system.
2025-04-12 00:37:13 +02:00
Developer 02
dd4afc5ddf Refactor email template query and response structures
Updated `EmailTemplateQuery` to use `Language` instead of `Culture` and added an explicit body. Introduced a new namespace for better organization and added `ReadEmailTemplateResponse` to provide a structured response for querying email templates, including relevant parameters.
2025-04-12 00:18:14 +02:00
Developer 02
c220b9e1c8 Add new email template types and query records
- Updated `Constants.vb` to include new email template types:
  `DocumentRejected_ADM`, `DocumentRejected_REC`, and
  `DocumentRejected_REC_2`.

- Introduced `EmailTemplateQuery` record in `EmailTemplateQuery.cs`
  with parameters for `Id`, `Type`, and `Culture`, along with
  German documentation.

- Added `ReadEmailTemplateQuery` record in
  `ReadEmailTemplateQuery.cs` that inherits from
  `EmailTemplateQuery` for reading email templates.
2025-04-12 00:11:21 +02:00
Developer 02
778a498e00 Refactor command records for envelope creation
Updated `CreateEnvelopeReceiverCommand` to use new types for `Document` and `Receivers`. Renamed `ReceiverGetOrCreateDto` to `ReceiverGetOrCreateCommand` and `DocumentCreateDto` to `DocumentCreateCommand` to align with the new command structure. Properties within these records remain unchanged.
2025-04-11 23:46:14 +02:00
Developer 02
48240f2f30 Change namespace and update documentation comments
Updated the namespace for the `EnvelopeReceiverQuery` class to `EnvelopeGenerator.Application.EnvelopeReceivers`. Revised the documentation for the `EnvelopeStatusQuery` record to provide a more concise list of envelope statuses while keeping the existing parameters.
2025-04-11 23:43:46 +02:00
Developer 02
e3dfa8dd39 Add ApiExplorerSettings to DTOs and update controllers
This commit introduces the `[ApiExplorerSettings(IgnoreApi = true)]` attribute to various DTO classes to exclude them from API documentation. The `using Microsoft.AspNetCore.Mvc;` directive has been added to several files to support ASP.NET Core MVC features.

Additionally, comments in `HistoryController.cs` have been reformatted for clarity, and `LocalizationController.cs` has been updated with standard API controller attributes. These changes improve code organization and maintain cleaner API documentation.
2025-04-11 23:41:47 +02:00
Developer 02
994c844f25 Refactor envelope and history query structures
- Removed `Sender` parameter and properties from `EnvelopeQuery`.
- Deleted `SenderQuery` class entirely.
- Cleaned up `HistoryQuery` by removing unused `using` directives and `ReferenceType` logic.
- Added `Related` parameter to `ReadHistoryQuery` for reference type indication.
- Updated `ReferenceType` enum in `Constants.vb` to use explicit integer values.
- Modified `HistoryController` to utilize the new `Related` property for determining sender/receiver inclusion.
2025-04-11 20:51:21 +02:00
Developer 02
4551e5dc64 Refactor envelope history queries and namespaces
Renamed `EnvelopeHistoryQuery` to `HistoryQuery` and
`ReadEnvelopeHistoryQuery` to `ReadHistoryQuery` to improve
clarity. Moved `StatusQuery` to the new
`EnvelopeGenerator.Application.Histories` namespace. Updated
`HistoryController` to use `ReadHistoryQuery`. Removed
unused `using` directives and added relevant ones to align
with the new structure. These changes enhance code
maintainability and organization.
2025-04-11 20:23:51 +02:00
Developer 02
c1e81c546f Add OnlyLast parameter to history query records
Updated `EnvelopeHistoryQuery` and `ReadEnvelopeHistoryQuery` to include a new optional `OnlyLast` parameter, removing the `Status` parameter. Documentation comments have been revised to reflect these changes, including updates in the `HistoryController` class.
2025-04-11 19:39:58 +02:00
Developer 02
9a950ae37d Enhance EnvelopeReceiver queries and controller
- Updated `EnvelopeReceiverQuery` to include an optional, nullable `Status` parameter.
- Modified `ReadEnvelopeReceiverQuery` to inherit from the updated `EnvelopeReceiverQuery`.
- Added new using directives in `EnvelopeReceiverController` and enhanced response documentation to include a 401 Unauthorized response.
- Implemented authorization for the `GetEnvelopeReceiver` method.
- Improved documentation and method signature for `GetReceiverName` to accept a `ReadReceiverNameQuery` object.
- Introduced a new `ReadReceiverNameQuery` record for querying the last used salutation of a receiver.
2025-04-11 19:27:53 +02:00
Developer 02
5715343651 Refactor envelope command and controller response
Removed unnecessary parameters from CreateEnvelopeReceiverCommand, simplifying envelope creation. Updated EnvelopeReceiverController to reflect these changes by removing related fields from the JSON response, focusing on essential information.
2025-04-10 19:04:22 +02:00
Developer 02
99b0dba79f Refactor envelope sender handling and update namespaces
Changed the namespace for `EnvelopeQuery` and updated the `Sender` parameter type to `SenderQuery?`. Removed `UserQuery.cs` as it is no longer needed. Introduced `SenderQuery.cs` with properties for sender details and added XML documentation for clarity.
2025-04-10 18:50:24 +02:00
Developer 02
2f8d5f1fc8 Refactor Envelope classes to use Sender instead of User
Updated the `EnvelopeHistoryQuery` to determine `ReferenceType` based on the presence of a `Sender` instead of a `User`.

In the `EnvelopeQuery`, replaced the `User` parameter with `Sender`, and updated related properties to reflect this change. This refactor shifts the focus from a user-centric model to a sender-centric model for envelope queries.
2025-04-10 18:49:01 +02:00