62 Commits

Author SHA1 Message Date
e2c3d4ad52 init DocSignedNotificationTest 2025-09-10 14:21:14 +02:00
c76a772768 fix references 2025-09-09 19:23:04 +02:00
3ba7bfd15a refactor(EnvelopeHistoryDto): rename HostoryDto 2025-09-09 19:01:20 +02:00
ae669d05e7 refactor(EnvelopeDocument): rename as Document 2025-09-09 18:56:55 +02:00
fbfc20705d refactor(Extensions): move to common 2025-09-09 18:26:06 +02:00
390cbf9db5 refactor(Dto): move to common 2025-09-09 18:18:47 +02:00
f6e34c6d91 refactor(HistoryTests): Verbesserung von HistoryTests mit realistischen Daten und konsistenter Struktur
- Verwendung tatsächlicher Umschlag- und Empfängerdaten anstelle von magischen Zahlen
- Ersetzen von fest codierten EnvelopeId und UserReference durch dynamisch erstellte Entitäten
- Aktualisierung von ReadHistoryQuery zur Verwendung der Objektinitialisierungssyntax
- Fügen Sie CancellationToken zu Mediator.Send-Aufrufen hinzu, um Konsistenz zu gewährleisten
- Verwenden Sie EnvelopeHistoryDto explizit in der Assertion
- Verbessern Sie die Lesbarkeit und den Realismus des Tests, indem Sie vollständige Voraussetzungdaten einrichten
- Korrigieren Sie die Schreibweise im Kommentar: „EnvelopeReceiver” -> „envelope receiver”
2025-09-03 10:08:42 +02:00
1c9d0a6c47 refactor(MappingProfile): update to ignore Envelope, Sender and Receiver 2025-09-02 23:58:35 +02:00
23ec4fe322 remove re-read process 2025-09-02 23:14:16 +02:00
c67bac3e16 test(history): Aktualisieren Sie HistoryTests, um die Erstellung von Umschlägen auf Repository-Basis zu verwenden. 2025-09-02 18:48:18 +02:00
6cdd1db7a9 feat(Fake): add extension method to Fake to create Envelope 2025-09-02 15:25:59 +02:00
d48514bbad refactor(Extensions): update CreateEnvelopeCommand to make UseSQLExecutor false 2025-09-01 17:27:14 +02:00
ee7eb08e75 refactor(CreateEnvelopeCommand): add UseSQLExecutor-property 2025-09-01 17:07:16 +02:00
6a34b65825 rename as ToEnvelopeKey 2025-09-01 15:43:13 +02:00
20d312a84e update to create key by EncodeEnvelopeReceiverId 2025-09-01 15:42:33 +02:00
87c5e7e4de feat(HistoryTests): add create receiver logic 2025-09-01 15:27:32 +02:00
bb93b980b4 refactor(HistoryTests): create and implement TestBase 2025-09-01 15:19:52 +02:00
950ae5a418 Update HistoryTests with new commands and setup changes
- Added new using directives for additional namespaces.
- Replaced `_host.AddSampleReceivers()` with `_host.AddSamples()` in the Setup method.
- Introduced `createEnvelopeCmd` in the test method to create an envelope before executing the history command.
2025-09-01 15:06:10 +02:00
582cc1eb13 Refactor CreateHistoryCommand and update tests
- Simplified `CreateHistoryCommand` method by removing generic type parameters.
- Updated `using` directives in `HistoryTests` to include necessary constants.
- Revised test method to utilize `Fake.Provider.CreateHistoryCommand` for improved maintainability.
2025-09-01 14:52:49 +02:00
c5c040fb15 Refactor enum usage in codebase
Updated references from `Constants` to direct usage of `EnvelopeStatus` and `EmailTemplateType` enums. This change enhances code readability and reduces dependency on the `Constants` class.

Modified properties and parameters across command classes, DTOs, repositories, and services to use the enums directly. Updated `ModifyDocStatusCommandBase`, `EnvelopeHistoryDto`, and `ResetEmailTemplateCommand` for improved clarity.

Consistent updates across multiple files indicate a systematic refactoring aimed at streamlining the codebase and improving maintainability. Comments and documentation have also been revised to reflect these changes.
2025-09-01 11:04:40 +02:00
fc4187bb9e Refactor constants and update CreateHistoryCommand
Updated `CreateHistoryCommand.cs` to use the `EnvelopeStatus` enum directly from the `EnvelopeGenerator.Domain.Constants` namespace. Refactored `Constants.cs` to consolidate multiple enums related to statuses, types, and roles. Modified `Fake.cs` to align with the new enum structure and introduced `Value.cs` for better organization of constant string values. Overall, these changes enhance code clarity and maintainability.
2025-09-01 10:41:36 +02:00
09eb91b6be Add history command support and enum selection method
- Introduced new using directives for histories and models.
- Added `PickEnum<T>` method to randomly select enum values.
- Renamed region from `#region Envelope Command` to `#region Envelope`.
- Implemented `CreateHistoryCommand<TEnvelopeQuery, TReceiverQuery>` for creating history commands.
- Organized new method under a new region `#region History`.
2025-09-01 10:16:50 +02:00
145a2ebe8f feat(Extensions): add PDF generation support for EnvelopeGenerator tests
- Introduced QuestPDF dependency to generate PDF documents in tests.
- Added `CreatePdfAsBase64` extension method for generating random PDF content.
- Added `CreateDocumentCommand` and `CreateDocumentCommands` helpers for creating document test data.
- Refactored using statements and added `EnvelopeGenerator.Application.EnvelopeReceivers.Commands`.
- Maintains existing sample user and receiver setup for integration testing.
2025-08-29 16:11:14 +02:00
68878c0fc8 feat(Fake): Erweiterung von Fake.Host um Repository-Zugriff und Unterstützung für Beispielbenutzer
- IRepository<TEntity>-Verknüpfung zum Auflösen von Repositorys hinzugefügt
 - AddSamples()-Hilfsprogramm zum gemeinsamen Initialisieren von Empfängern und Benutzern eingeführt
 - SampleReceivers mit Validierungsüberwachung verbessert
 - Beispiel für Benutzerinitialisierung über Repository mit AddSampleUser() hinzugefügt
 - using-Anweisungen aktualisiert, um DigitalData.Core.Abstraction.Application.Repository und DigitalData.UserManager.Domain.Entities einzubeziehen
2025-08-29 14:57:51 +02:00
d3e5d3d791 refactor(Extensions): add CreateUserCommand and CreateUserCommands 2025-08-29 14:37:24 +02:00
a7f6b94d20 create CreateUserCommand with handler and mapping profile 2025-08-29 14:31:36 +02:00
777f20eddb create faker-extension method for Envelope Commands 2025-08-29 14:00:00 +02:00
e9202ad23e refactor(Fake): Ersetzen der Roh-E-Mail-Generierung durch CreateReceiverCommand-Helfer
- Direkte Verwendung von `Internet.EMailList()` für Beispielempfänger entfernt.
- Erweiterungsmethoden `CreateReceiverCommand` und `CreateReceiverCommands` in `Faker` eingeführt.
- `AddSampleReceivers` aktualisiert, um `CreateReceiverCommands` für eine sauberere, konsistentere Testdatenerstellung zu verwenden.
2025-08-29 13:25:36 +02:00
954eff7101 refactor(tests): replace static sample emails with Bogus-generated random emails 2025-08-29 13:12:33 +02:00
ac501dffb1 fix(Mock): rename Fake 2025-08-29 12:53:03 +02:00
baf2207d03 refactor(Mock): Host-Klasse für csetup erstellen und MediatR integrieren
- Migration zu Microsoft.Extensions.Hosting.CreateDefaultBuilder
- Optionale Parameter und echte DB-Unterstützung in Tests entfernt
- InMemoryDatabase zum Testen hinzugefügt
- MediatR für die Befehlsverarbeitung integriert
- Beispielmethode zum Initialisieren von Empfängern im Test-Host hinzugefügt
2025-08-29 12:46:38 +02:00
6863ada4be feat(HistoryTests): add Receiver to provide random receiver 2025-08-29 11:11:15 +02:00
8a22075abe update to use deconstructed 2025-08-29 11:05:52 +02:00
bcb2e79fa1 feat: Duplikatsprüfung beim Erstellen eines Empfängers hinzufügen
- `CreateReceiverCommand` wurde aktualisiert, sodass nun `(Id, AlreadyExists)` anstelle von nur `Id` zurückgegeben wird.
- Der Handler wurde geändert, um zu überprüfen, ob bereits ein Empfänger mit derselben E-Mail-Adresse vorhanden ist.
- Es wird nur dann ein neuer Empfänger erstellt, wenn dieser noch nicht vorhanden ist.
- `Microsoft.EntityFrameworkCore` wurde für die Abfrageunterstützung hinzugefügt.
2025-08-29 10:58:27 +02:00
c8dae1d8ff test: extend HistoryTests by adding receiver initialization with CreateReceiverCommand 2025-08-29 10:45:00 +02:00
8783cb9cd8 move ReceiverCreateDto to commands 2025-08-29 10:01:17 +02:00
e49be2b7c3 make set up Setup 2025-08-29 09:57:57 +02:00
14a565d202 refactor(HistoryTests): Vereinfachung von HistoryTests durch direkte Einbindung von IMediator
- Entfernen der benutzerdefinierten Hilfsmethode Send<T>
 - Einführung der Mediator-Eigenschaft, die aus dem DI-Container aufgelöst wird
 - Ersetzen aller Send(request)-Aufrufe durch Mediator.Send(request)
 - Reduzierung unnötiger Indirektionen, wodurch Tests übersichtlicher und leichter lesbar werden
2025-08-29 09:52:34 +02:00
Developer 02
5bd045b998 init HistoryTests 2025-08-28 20:07:34 +02:00
a3bc26bd08 feat(SaveDocStatusCommand): enhance SaveDocStatusCommandHandler with flexible envelope & receiver filters
- Added support for filtering by Envelope.Id or Envelope.Uuid
- Added support for filtering by Receiver.Id, Receiver.EmailAddress, or Receiver.Signature
- Throw BadRequestException when required identifiers are missing
- Updated repository queries to combine envelope and receiver filters
2025-08-25 15:02:57 +02:00
02ef05f054 feat(envelope-receivers): add query handler for reading envelope receiver with filtering
- Implemented ReadEnvelopeReceiverQueryHandler using MediatR
- Added filtering support for Envelope (Id, Status, Uuid) and Receiver (Id, EmailAddress, Signature)
- Included related navigation properties (Envelope, Documents, Elements, History, User, Receiver)
- Mapped result to EnvelopeReceiverDto using AutoMapper
2025-08-21 18:32:41 +02:00
07cab88e0d Refactor service registration with lambda expression 2025-06-30 15:53:38 +02:00
1c90e693da Deprecate services in favor of MediatR integration
This commit introduces the `[Obsolete("Use MediatR")]` attribute to various service fields and methods across multiple controllers and extension classes, signaling a transition to MediatR for handling requests and commands.

Key changes include:
- Marking `IEnvelopeService`, `IEnvelopeReceiverService`, and `IEnvelopeTypeService` as obsolete in their respective controllers.
- Updating `AddEnvelopeGeneratorInfrastructureServices` to utilize `IRepository`.
- Refactoring `AddCommandManagerRunner` and `CreateHost` methods to indicate obsolescence.
- Replacing `DigitalData.Core.DTO` with `DigitalData.Core.Abstraction.Application.DTO` in using directives.

These changes modernize the codebase and improve command and query handling while cleaning up service dependencies.
2025-06-30 10:05:36 +02:00
db05183137 Update package versions for UserManager and DigitalData.Core.API
- Updated `UserManager` from `1.0.0` to `1.1.0` in
  `EnvelopeGenerator.Application.csproj` and
  `EnvelopeGenerator.Infrastructure.csproj`.

- Updated `DigitalData.Core.API` from `2.2.0` to `2.2.1` in
  `EnvelopeGenerator.GeneratorAPI.csproj`,
  `EnvelopeGenerator.Tests.Application.csproj`, and
  `EnvelopeGenerator.Web.csproj`.
2025-06-26 14:17:48 +02:00
Developer 02
3c60f31050 Refactor: Aktualisierung von APIs und Anwendungsschichten zur Umsetzung von Änderungen im Bereich 2025-05-28 12:55:11 +02:00
Developer 02
08e1187124 Refactor namespaces and simplify DTOs
Updated namespaces to align with the new DigitalData.Core structure, replacing `DigitalData.Core.Abstractions` with `DigitalData.Core.Application.Interfaces` and `DigitalData.Core.Client.Interface`. Removed the `IUnique<int>` interface from several DTOs, simplifying their design and altering the handling of entity identification. Updated project files to reflect new dependency versions for improved compatibility and features. Cleaned up using directives to remove obsolete references, enhancing code maintainability.
2025-05-20 15:14:58 +02:00
Developer 02
1b923dc93b Update DigitalData.Core package references
Updated `DigitalData.Core.Abstractions` to version `4.0.0` and `DigitalData.Core.Application` to version `3.3.0` across multiple project files. Also upgraded `DigitalData.Core.Infrastructure` to version `2.1.0` in `Infrastructure.csproj`. These changes may include important bug fixes, new features, and performance improvements.
2025-05-20 10:58:57 +02:00
Developer 02
a42e4287ff Refactor envelope generator service dependencies
This commit replaces the `AddEnvelopeGeneratorRepositories` method with `AddEnvelopeGeneratorInfrastructureServices`, allowing for more flexible configuration through `IConfiguration` and `Action<SQLExecutorParams>`. The `SQLExecutor` class now utilizes `SQLExecutorParams` for its connection string, enhancing configurability. A new `SQLExecutorParams` class has been introduced to encapsulate connection string management. Various service registration calls have been updated to integrate the new infrastructure services, improving modularity and ease of database connection management.
2025-05-05 10:47:00 +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