237 Commits

Author SHA1 Message Date
Developer 02
51920089af feat(PDFBurner): PDFBurnerParams hinzufügen und Konfiguration binden 2025-04-24 16:08:05 +02:00
Developer 02
82cb50b7e1 feat(PDFBurnerParams): erstellt, um PDFBurner zu konfigurieren 2025-04-24 15:50:08 +02:00
Developer 02
ff36dc47c1 refactor(PDFBurner): Logik hinzufügen, um den Unterschied zwischen FormField-Annotationen zu verringern 2025-04-24 15:29:22 +02:00
Developer 02
186f3c3319 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-24 12:01:55 +02:00
Developer 02
276adda516 unnötige Protokollierung entfernt 2025-04-24 11:48:54 +02:00
Developer 02
ac0ae10fab unnötige Protokollierung entfernt 2025-04-24 11:47:11 +02:00
Developer01
3713669ec5 Merge 2025-04-24 11:45:38 +02:00
Developer 02
7f0131fc2d refactor(FinalizeDocumentJob): Update für detaillierte Protokollierung 2025-04-24 11:44:29 +02:00
Developer01
d9deb589d1 MS AdminTab 2025-04-24 11:43:55 +02:00
OlgunR
c961e9fffd Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-24 11:43:18 +02:00
OlgunR
ae31b1da0f Funktion zur Aufhebung der Formfelder im Signiervorgang - Class EnvelopeEditorController, Class FlattenFormFields 2025-04-24 11:42:50 +02:00
Developer 02
bf5faf53bd refactor(frmFinalizePDF): Aktualisieren von Button1_Click zum Öffnen von PDF nach dem Brennvorgang 2025-04-24 11:37:46 +02:00
Developer 02
9a74b448f2 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-24 09:32:34 +02:00
Developer 02
784a834214 chore: auf 3.1.2 aufgerüstet 2025-04-24 09:28:27 +02:00
Developer01
3c5f5cb5f5 Neues Release plus Flatternformfleds RO 2025-04-24 08:56:33 +02:00
Developer 02
7c57b7e332 refactor(network): add bias to annot.top 2025-04-24 02:23:22 +02:00
Developer 02
4bf91df85f fx(network): add bias to left position 2025-04-24 02:11:12 +02:00
Developer 02
50796b22d9 refactor(network): convert getAnnotation params to async method 2025-04-24 02:10:18 +02:00
Developer 02
2974ddb985 feat(ConfigController): add authorize attribute 2025-04-24 02:01:09 +02:00
Developer 02
54f39103e1 feat(IAnnotation): Hinzufügen und Implementieren der Eigenschaften BackgroundColor, BorderColor, BorderStyle und BorderWidth.
- Hintergrund mit neuen Eigenschaften in Annotations.js binden
2025-04-24 00:36:24 +02:00
Developer 02
8b505ae39a feat(annotations): verbessertes Styling für Hintergrund-Anmerkungen
- Hintergrundfarbe der Hintergrund-Anmerkungen auf einen benutzerdefinierten hellen Ton geändert
- Unterstrichener Rahmenstil mit spezifischer Farbe und Breite hinzugefügt
- Blendmodus von 'multiply' zu 'normal' vereinheitlicht für bessere Konsistenz
- Visuelle Hierarchie der Anmerkungselemente verbessert
2025-04-23 22:59:45 +02:00
Developer 02
d75da655d2 feat(Hintergrund): Locate add, um die Position des Hintergrunds anhand anderer Anmerkungen zu berechnen.
- Standort des Hintergrunds zu Anmerkungen hinzugefügt
2025-04-23 18:13:46 +02:00
Developer 02
e72ea534e5 refactor(AnnotationParams): AnnotationJSObject aktualisieren, um IAnnotation (anstelle von Annotation) zu enthalten
- Hintergrund in AnnotationJSObject hinzufügen, wenn er nicht null ist
2025-04-23 17:25:58 +02:00
Developer 02
e95d1d782e feat(IAnnotation): Erstellt, um die grundlegenden Eigenschaften einer Annotation zu behandeln.
- implementiert in Annotation und Hintergrund
2025-04-23 16:50:10 +02:00
Developer 02
32be5077f9 feat(Hintergrund): Erstellen, um den Hintergrund von Anmerkungen mit der Eigenschaft MarginRatio zu konfigurieren.
- verschiebt Anmerkungen nach
2025-04-23 15:41:53 +02:00
Developer 02
d80fa0b023 feat(Background): Add Width, Height, Top and Left properties.
- Add JsonIgnroe property to BackGround
2025-04-23 15:38:14 +02:00
Developer 02
ea6ee11a4e feat(Hintergrund): Erstellen, um den Hintergrund von Anmerkungen mit der Eigenschaft MarginRatio zu konfigurieren.
- verschiebt Anmerkungen nach
2025-04-23 15:31:35 +02:00
Developer 02
13a87f29d9 refactor(Annotations.js): Hinzufügen von Container-Widget-Annotationen als Hintergrund von Annotationen ohne BoundingBox-Konfiguration.
- Konvertieren von Signaturen Hintergrundfarbe von gelb zu hellgelb.
2025-04-23 13:38:32 +02:00
Developer01
4e2682a75d DocumentRotationChanged 2025-04-23 12:40:28 +02:00
Developer01
278d56c58d Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-23 12:38:02 +02:00
Developer01
9f71579c78 MS Neue Konstante 2025-04-23 12:37:57 +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
4040741e6f Merge remote-tracking branch 'origin/bugfix/signaturfeld-rotiert' 2025-04-23 08:42:38 +02:00
Developer 02
4077786ef7 refactor(Test.Application): Configured dependencies 2025-04-23 01:01:09 +02:00
Developer 02
ba8394c749 feat(EnvelopeGenerator.Terminal): Downgrade to .net 7 2025-04-23 00:49:15 +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
45d39069aa feat(infrastructure): generisches Repository mit AutoMapper-Unterstützung integriert
- DbRepository-Registrierungen für alle Umschlag-bezogenen Entitäten mit DigitalData.Core-Infrastruktur und AutoMapper-Integration hinzugefügt. Ermöglicht optimierten Datenzugriff und Mapping-Konfiguration.
2025-04-22 21:23:16 +02:00
Developer 02
d3db1e74fa chore: aktualisierte Baget-Pakete 2025-04-22 21:06:36 +02:00
OlgunR
4d34eb7adc Funktion zur Behebung der Rotation - Class EnvelopeEditorController, Class FixPageRotation 2025-04-22 10:26:03 +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
44aeb53413 Refactor EnvelopeDocument class for clarity
Adjusted namespace and reformatted class attributes for consistency. Moved `[Table]`, `[Key]`, `[DatabaseGenerated]`, and `[Column]` attributes to align with properties. The `Elements` property was also repositioned to enhance class structure readability.
2025-04-14 15:19:10 +02:00
Developer 02
d56aa1a778 Remove unused import in EnvelopeDocumentRepository.cs 2025-04-14 15:18:47 +02:00
Developer 02
a012396dd4 Merge branch 'master' into feat/terminal 2025-04-14 14:39:31 +02:00
Developer 02
42a1016607 fix: Vereinfachung des Ziel-Frameworks in der Projektdatei
Aktualisierte `EnvelopeGenerator.Web.csproj`, um ein einziges
Ziel-Framework (`net7.0`) anstelle von mehreren Frameworks
(`net7.0;net8.0;net9.0`) anzugeben, was die Projektkonfiguration vereinfacht.
2025-04-14 14:38:56 +02:00
Developer 02
4b616896f8 Refactor CommandManager und Verbesserung von DependencyInjection
Aktualisierte Eigenschaftsnamen in CommandManager für mehr Klarheit und zusätzliche Lokalisierungsunterstützung in DependencyInjection durch Einbindung der Methode AddLocalization().
2025-04-14 13:53:07 +02:00
Developer 02
54c17f106e feat(Program.cs): Hosting-Unterstützung zu CommandManagerRunner hinzufügen
- Einführung von `Microsoft.Extensions.Hosting` in `DependencyInjection.cs`.
- Überladung für `RunCommandManagerRunner` hinzugefügt, um `IHost` zu akzeptieren.
- Aktualisiert `Program.cs`, um die neue Methode `RunCommandManagerRunner` zu verwenden.
2025-04-14 13:18:50 +02:00
Developer 02
e171b50868 Add service registrations to DependencyInjection
Added using directives for application services and registered
IEnvelopeMailService with its implementation EnvelopeMailService.
Also included in-memory caching to enhance the dependency
injection setup.
2025-04-14 13:15:19 +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
a070a0f64c Enhance CommandManager and Dependency Injection
- Updated `CommandManager` to include an `IEnvelopeReceiverService` constructor and a new property for service access. Added version printing functionality in the `Execute` method.
- Modified `AddCommandManagerRunner` in `DependencyInjection` to accept a connection string key name and added SQL Server caching configuration.
- Added `Microsoft.Extensions.Caching.SqlServer` package reference in the project file for caching support.
2025-04-14 12:55:48 +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
927b89554d feat(DependencyInjection): Verbesserung von DI und Konfigurationsmanagement
DependencyInjection wurde aktualisiert, um IConfiguration zu akzeptieren, appsettings.json für Konfigurationseinstellungen hinzugefügt und Projektreferenzen in der .csproj-Datei geändert. Program.cs wurde angepasst, um die neue Konfigurationsstruktur für die Dienstregistrierung zu nutzen.
2025-04-14 11:38:21 +02:00
Developer 02
160005e230 Merge branch 'master' into feat/terminal 2025-04-14 10:56:45 +02:00
Developer 02
2848425625 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-14 10:52:21 +02:00
Developer 02
c61b497ef2 Update target framework and clean up using directives
Changed target frameworks in `EnvelopeGenerator.GeneratorAPI.csproj` to only `net9.0`. Removed unused `using System.Reflection;` directive in `Program.cs` to streamline the code.
2025-04-14 10:49:51 +02:00
Developer 02
1ece216a27 merge with master 2025-04-14 10:39:34 +02:00
Developer 02
8f6847c060 chore: Aktualisierung der Version auf 1.2.0 für das GeneratorAPI-Projekt 2025-04-14 10:36:25 +02:00
Developer 02
0dc65a53b5 chore: Hinzufügen von IIS-Veröffentlichungsprofilen für .NET 7 und .NET 9 2025-04-14 10:02:03 +02:00
Developer 02
7b75a373bd Fix casing of Bearer scheme in Swagger configuration 2025-04-12 02:11:43 +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
6e641395d5 Add JWT Bearer authentication to Swagger setup
Implemented security definitions and requirements for JWT Bearer authentication in the Swagger configuration. This includes defining a "Bearer" security scheme and adding a security requirement to support JWT authorization via the Authorization header.
2025-04-11 23:34:43 +02:00
Developer 02
fbd09cb570 Update comments in HistoryController for clarity
Improved descriptions of historical records related to sender, receiver, system, and unknown statuses. Enhanced formatting and provided detailed explanations of associated status codes for better readability.
2025-04-11 23:18:30 +02:00
Developer 02
7389909d77 Update comments in HistoryController class
Revised comments to remove outdated information about letter sending parties. Added new comments to clarify the method's functionality in returning status references for history records, enabling client applications to stay updated.
2025-04-11 22:56:38 +02:00
Developer 02
ded88383b3 refactor(HistoryController): Added new using directives for EmailProfiler and EF Core.
- Expanded XML documentation for GetEnvelopeStatus method,
clarifying the related parameter and its usage.
 - Updated
method signature to include [FromQuery] for better
parameter binding from the query string.
2025-04-11 22:51:40 +02:00
Developer 02
1b9b51fbd2 Add GetEnvelopeStatus method to HistoryController
Implemented a new method `GetEnvelopeStatus` in the `HistoryController` class. This method is accessible via HTTP GET and requires authorization. It returns a dictionary of envelope statuses, enhancing the API's functionality. Additional comments and documentation have been included to clarify the method's purpose and the statuses it handles.
2025-04-11 22:35:47 +02:00
Developer 02
afa6dda16f Update documentation for GetReferenceTypes method
Significantly revised the comments for the GetReferenceTypes method in the HistoryController class. Removed previous summary and response code details, and added a detailed description of the roles involved in the envelope sending process (Receiver, Sender, System, Unknown). Improved clarity with a list format and simplified return type documentation.
2025-04-11 21:08:23 +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
ff34e6afab Revert "Remove GetReferenceTypes method from HistoryController"
This reverts commit a78912260a.
2025-04-11 19:45:12 +02:00
Developer 02
a78912260a Remove GetReferenceTypes method from HistoryController
This commit removes the entire GetReferenceTypes method, along with its XML documentation comments, from the HistoryController class. The method was responsible for retrieving reference types as key-value pairs and returning them in an HTTP response. Its removal indicates a change in functionality, suggesting that reference types are no longer needed or will be managed differently in the application.
2025-04-11 19:43:09 +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
6cec82abd5 Update envelope controllers and improve documentation
- Added using directives in `EnvelopeController.cs` for
  `EnvelopeGenerator.Application.Envelopes.Queries.Read`
  and `EnvelopeGenerator.Common.Constants`.
- Modified `GetAsync` method to use `ReadEnvelopeQuery`
  instead of `StatusQuery`, updating the logic for
  retrieving envelope data.
- Enhanced parameter description in
  `EnvelopeReceiverController.cs` for clarity on
  filtering criteria for envelope recipients.
2025-04-11 18:35:02 +02:00
Developer 02
26616b4cab Update HistoryController comments and response codes
Replaced "Verlaufshistorie" with "Umschlaghistorie" in
the `HistoryController` class to clarify API context.
Added detailed response codes for `GetReferenceTypes`
and `GetAllAsync` methods to enhance API documentation.
2025-04-11 15:08:37 +02:00
Developer 02
178ec9226d Enhance API documentation in EnvelopeController
Added detailed response documentation for HTTP status codes
in the EnvelopeController class. This improves clarity on
expected responses for various scenarios, including success,
client errors, unauthorized access, and server errors.
2025-04-10 19:14:05 +02:00
Developer 02
0147f525fa Update AuthController and Login model for API changes
- Updated API documentation in AuthController.cs to include an optional "id" field in the authentication request body.
- Modified the Login record in Login.cs to require a "Password" field and include optional "Id" and "Username" fields, along with updated documentation comments.
2025-04-10 19:12:01 +02:00
Developer 02
f0ed6137d1 Remove GetSecretAsync method from EnvelopeReceiverController
The GetSecretAsync method, which retrieved secret information based on a UUID, has been completely removed along with its XML documentation comments and error handling logic. This change eliminates the functionality to access secret information via the specified endpoint in the controller.
2025-04-10 19:08:49 +02:00
Developer 02
b4ab2c4423 Enhance API documentation and error handling
Updated `EnvelopeReceiverController` with additional XML documentation for HTTP response codes in key methods. Improved formatting of catch blocks and enhanced logging statements for better error context.
2025-04-10 19:08:35 +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
6550be0235 Add XML documentation for GetReferenceTypes method
This commit introduces XML documentation comments to the
GetReferenceTypes method in the HistoryController class.
The comments clarify the method's purpose, indicating that
it retrieves available reference types and returns them
as key-value pairs, along with a summary and return type
information.
2025-04-10 18:57:48 +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
Developer 02
6969f5f93e Add XML documentation for EnvelopeQuery properties
This commit introduces XML documentation comments for the `UserId`, `Username`, and `UserEmail` properties in the `EnvelopeQuery` record. The comments clarify the purpose of each property, enhancing code readability and maintainability.
2025-04-10 18:48:08 +02:00
Developer 02
7bbed3890e Add Status parameter to EnvelopeHistoryQuery records
Updated EnvelopeHistoryQuery to include a new `Status` parameter for describing the envelope's status. Modified the `ReferenceType` property to return `ReferenceType.System` when neither the envelope's `User` nor the `Receiver` is defined.

Updated ReadEnvelopeHistoryQuery to include the `Status` parameter and set default values of `null` for `Envelope` and `Receiver`, ensuring consistency with the base class.
2025-04-10 18:46:37 +02:00
Developer 02
98290c7b28 Update comments in ReadEnvelopeReceiverResponse.cs
Enhanced clarity and detail in class documentation.
Rephrased summaries and remarks for better understanding
of the class and its properties, including the relationship
between envelope and receiver. Clarified parameters
`UserId` and `Status` for improved overall documentation.
2025-04-10 18:42:51 +02:00
Developer 02
d55006fdda chore: Hinzufügen von XML-Dokumentationsgenerierung und Swagger-Kommentaren
Aktualisierte Projektdateien zur Aktivierung der XML-Dokumentationsgenerierung durch Hinzufügen der Eigenschaften `<GenerateDocumentationFile>` und `<DocumentationFile>`. Geänderte Swagger-Konfiguration in `Program.cs`, um alle XML-Dateien im Basisverzeichnis für eine flexiblere Einbindung der Dokumentation einzuschließen.
2025-04-10 18:30:12 +02:00
Developer 02
b2cc0cb65a Refactor envelope creation commands and DTOs
Removed `CreateEnvelopeCommand` and introduced `CreateEnvelopeReceiverCommand` with updated parameters. Updated `ReceiverGetOrCreateDto` to include a new `Salution` parameter. Added XML documentation for the new command and associated DTOs.
2025-04-10 18:08:35 +02:00
Developer 02
049827a133 refactor: Deutsche Dokumentation für Umschlagbefehlsdatensätze hinzugefügt
XML-Dokumentationskommentare für `CreateEnvelopeCommand`, `ReceiverGetOrCreateDto` und `DocumentCreateDto` auf Deutsch aktualisiert. Die bestehende englische Dokumentation wurde entfernt, um eine einheitliche Sprache in der Codebasis zu gewährleisten.
2025-04-10 18:03:38 +02:00
Developer01
b8e4dfdf26 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-10 17:47:25 +02:00
Developer01
8a9d5f92f3 MS Bodytext, Bugfixing deleting 2025-04-10 17:46:33 +02:00
Developer 02
b02ab585cb Hinzufügen der Methoden „Create“ und „GetById“ zu ReceiverController
Die Klasse `ReceiverController` wurde um zwei neue Methoden erweitert: `Create` und `GetById`. Beide Methoden sind mit dem Attribut `[NonAction]` gekennzeichnet und derzeit deaktiviert. Die Methode `Create` akzeptiert einen `ReceiverCreateDto`-Parameter, während die Methode `GetById` einen `int`-Parameter annimmt. Die bestehende Methode `Update` bleibt unverändert.

Übersetzt mit DeepL.com (kostenlose Version)
2025-04-10 16:45:17 +02:00
Developer 02
c8a5a8627d Verbesserung der Dokumentation im ReceiverController
Der ReceiverController wurde mit XML-Dokumentationskommentaren versehen, um seinen Zweck und seine Funktionalität zu verdeutlichen. Beibehaltung des Konstruktors mit Parametererklärungen. Verbesserung der Get-Methode für eine bessere Fehlerbehandlung und Protokollierung. Die Create-, Delete- und Update-Methoden wurden als deaktiviert markiert, während ihre Basisfunktionalität beibehalten wurde. Die #region REMOVED ENDPOINTS wurde aktualisiert, um unbenutzte Methoden zu berücksichtigen. Insgesamt verbessern diese Änderungen die Code-Dokumentation und erhalten die Kernfunktionalität.
2025-04-10 16:42:20 +02:00
Developer 02
ecf0771f9e Refactor ReceiverController to use ReadReceiverQuery
Aktualisierte Get- und Delete-Methoden, um ReadReceiverQuery
für die Parameterbehandlung zu verwenden, was die Organisation und Kapselung verbessert.
Service-Aufrufe wurden angepasst, um Eigenschaften des neuen Query-Objekts
anstelle von individuellen Parametern zu verwenden.
2025-04-10 16:40:07 +02:00
Developer 02
02c7040b39 Verbesserung von LocalizationController mit XML-Dokumentation
Die Klasse LocalizationController wurde aktualisiert, um XML-Dokumentationskommentare für eine bessere Klarheit und ein besseres Verständnis der Methoden und Eigenschaften einzuschließen. Zusammenfassungen von Konstruktoren und Methoden sowie Parameterbeschreibungen wurden in deutscher Sprache hinzugefügt. Die allgemeine Struktur und Formatierung der Klasse wurde verbessert, um die richtige Definition und Lesbarkeit zu gewährleisten.
2025-04-10 16:37:33 +02:00
Developer 02
2cb5d0c0d5 Refactor envelope and user query structures
- Introduced a new `UserQuery` record to encapsulate user-related information, replacing individual fields in `EnvelopeQuery`.
- Added a `ReferenceType` property in `EnvelopeHistoryQuery` to enhance reference handling logic.
- Modified `EnvelopeQuery` to use the new `UserQuery` structure, simplifying the data model.
- Updated `HistoryController` with a new constructor and restructured the `GetReferenceTypes` method.
- Introduced `ReadEnvelopeHistoryQuery` to allow for more specific envelope history queries.
- Overall improvements enhance code structure, clarity, and querying capabilities.
2025-04-10 16:35:40 +02:00
Developer 02
9f186afdff refactor(EnvelopeTypeController): aktualisiert zu ignoriert von open-api 2025-04-10 16:09:45 +02:00
Developer 02
ec76014ce7 Verbesserung von EnvelopeReceiverController mit neuen Funktionen
Die Klasse EnvelopeReceiverController wurde aktualisiert, um die Funktionalität und Dokumentation zu verbessern. Es wurde eine neue using-Direktive hinzugefügt und die Namespace-Deklaration verschoben. Einführung der XML-Dokumentation in deutscher Sprache für mehr Klarheit. Die GetEnvelopeReceiver-Methode wurde so geändert, dass sie einen ReadEnvelopeReceiverQuery-Parameter akzeptiert, wodurch ihre Signatur verbessert wurde. Verbesserte Fehlerbehandlung und Protokollierung bei allen Methoden. GetSecretAsync hinzugefügt, um geheime Informationen nach UUID abzurufen. CreateAsync wurde aktualisiert, um die createEnvelopeQuery über den Mediator zu senden und einen akzeptierten Status zurückzugeben.
2025-04-10 16:07:08 +02:00
Developer 02
e7bc43b339 Refactor envelope query structures and controller methods
- Aktualisiert `EnvelopeHistoryQuery` um optionale `Envelope`, `Receiver` und neue `Status` Parameter für mehr Flexibilität zu enthalten.
- Vereinfachte `EnvelopeReceiverQuery`, so dass sie nur noch einen `Status`-Parameter enthält und unnötige Parameter entfernt wurden.
- ReadEnvelopeReceiverQuery„ wurde an das neue Design von ‚EnvelopeReceiverQuery‘ angepasst, indem ein “Status"-Parameter akzeptiert wird.
- Verbesserte XML-Dokumentation in `EnvelopeController` für mehr Klarheit über Methoden und Parameter.
- Die `GetAsync`-Methode wurde gestrafft, um einen `StatusQuery`-Parameter zu akzeptieren, der separate Status-Parameter ersetzt.
- Einführung eines neuen `StatusQuery`-Datensatzes, um Statuswerte mit detaillierter Dokumentation zu kapseln.
- Aktualisierte „using“-Direktiven in relevanten Dateien, um den neuen „EnvelopeHistories“-Namensraum einzubeziehen.
2025-04-10 16:01:21 +02:00
Developer 02
26be8d4565 feat(EnvelopeHistoryQuery): Hinzufügen des EnvelopeHistoryQuery-Datensatzes für den Umschlagverlauf.
- Führt einen neuen Datensatztyp `EnvelopeHistoryQuery` im `EnvelopeGenerator.Application.EnvelopeHistories` Namespace ein. Dieser Datensatz kapselt die Parameter `EnvelopeId`, `Envelope` und `Receiver`, wobei die letzten beiden generische Typen sind, die auf `EnvelopeQuery` und `ReceiverQuery` beschränkt sind. Die XML-Dokumentation enthält Kommentare zur Beschreibung des Datensatzes und seiner Parameter.
2025-04-10 13:19:21 +02:00
Developer 02
17902c4824 Refactor DTOs und Queries für Klarheit und Konsistenz
- Aktualisiert `ReceiverGetOrCreateDto`, um E-Mail in Kleinbuchstaben korrekt zuzuordnen und verbesserte Dokumentation.
- Der Parameter `Receiver` wurde aus der `EnvelopeReceiverQuery` entfernt.
- Verbesserte Kommentare in `ReadEnvelopeReceiverQuery`, um den Zweck zu verdeutlichen.
- Detaillierte Zusammenfassungskommentare zu `ReadEnvelopeReceiverResponse` und `ReadEnvelopeResponse` zum besseren Verständnis der Eigenschaften hinzugefügt.
- Es wurden neue zusammenfassende Kommentare in `ReadReceiverQuery` und `ReadReceiverResponse` eingeführt, um ihre Rollen und Beziehungen zu beschreiben.
2025-04-10 12:45:51 +02:00
Developer 02
115cb86968 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-04-09 14:25:33 +02:00
Developer 02
4a898e40ac chore: Hinzufügen von IIS-Veröffentlichungsprofilen für .NET 7 und .NET 9
Mit diesem Commit werden zwei neue XML-Projektdateien eingeführt: `IISProfileNet7.pubxml` für .NET 7.0 und `IISProfileNet9Win64.pubxml` für .NET 9.0 mit Windows 64-bit. Diese Dateien definieren wesentliche Eigenschaften für die Veröffentlichung von .NET-Anwendungen, einschließlich der Web-Publishing-Methode, der Build-Konfiguration, des Speicherorts des Pakets und des Bereitstellungspfads, wodurch die ordnungsgemäße Paketierung und Bereitstellung für IIS erleichtert wird.
2025-04-09 14:25:17 +02:00
Developer 02
bdc0286253 chore: Aktualisierung der Ziel-Frameworks in der Projektdatei
Modifizierte `EnvelopeGenerator.GeneratorAPI.csproj`, um
mehrere Ziel-Frameworks zu unterstützen: `net7.0`, `net8.0`, und `net9.0`.
Diese Änderung verbessert die Kompatibilität und macht die Anwendung zukunftssicher.
2025-04-09 13:26:40 +02:00
Developer 02
8bdc305b82 chore: Aktualisierung der Zielframeworks in der Projektdatei
Die Projektdatei `EnvelopeGenerator.Web.csproj` wurde geändert, um mehrere Zielframeworks zu unterstützen. Das bisherige einzelne Zielframework `net7.0` wurde durch `net7.0`, `net8.0` und `net9.0` ersetzt, was eine verbesserte Kompatibilität und Zukunftssicherheit der Anwendung ermöglicht.
2025-04-09 13:25:48 +02:00
Developer 02
396c6014fb Hinzufügen von XML-Dokumentation für ReadEnvelopeQuery
Der Datensatz `ReadEnvelopeQuery` wurde um XML-Kommentare
erweitert, um seinen Zweck als Abfrage zum Lesen von Umschlägen zu verdeutlichen.
2025-04-09 10:30:36 +02:00
Developer 02
06175b0c95 feat(ReceiverQuery): Hinzufügen von XML-Dokumentation zum ReceiverQuery-Datensatz
- Verbesserte Klarheit und Benutzerfreundlichkeit des Codes durch Hinzufügen von XML-Dokumentationskommentaren zum ReceiverQuery-Datensatz, einschließlich einer Zusammenfassung und detaillierter Parameterbeschreibungen.
2025-04-09 10:28:28 +02:00
Developer 02
5375d89d5b Refactor envelope response and query records
`ReadEnvelopeReceiverResponse` wurde aktualisiert, um mehrere Empfänger zuzulassen und `HasPhoneNumber` hinzugefügt. EnvelopeQuery„ wurde durch die Einführung der optionalen Parameter ‚Username‘ und “E-Mail" für einen besseren Benutzerkontext verbessert.
2025-04-09 10:23:19 +02:00
Developer 02
abd1807b18 chore: Aktualisierung der Projekt-Metadaten in der .csproj-Datei
- Hinzufügen von Paket-ID, Titel, Autoren, Firma, Produktname,
Versionsinformationen und Paketausgabepfad zu
`EnvelopeGenerator.GeneratorAPI.csproj` für verbesserte
Identifizierung und Verwaltung in Paket-Repositories.
2025-04-09 09:59:29 +02:00
Developer 02
3f33be452c feat: Option zur Verwendung von Swagger und Scalar in der Produktion hinzufügen.
- Login-Endpunkt beheben
2025-04-09 09:53:13 +02:00
Developer01
7481691b4e MS 2025-04-07 15:00:48 +02:00
Developer01
0d635830f9 MS Merge 2025-04-07 14:57:30 +02:00
Developer01
9b72a7b472 MS Update DocumentViewer 2025-04-07 14:55:48 +02:00
Developer 02
9a4931781a Refactor envelope and receiver response models
- Updated `ReadEnvelopeReceiverResponse` to use `ReadEnvelopeResponse` instead of `ReadReceiverResponse`.
- Modified `ReadReceiverResponse` to include additional parameters in its constructor for better detail.
- Introduced a new `ReadEnvelopeResponse` record with comprehensive properties and a computed `StatusName`.
2025-04-07 14:53:31 +02:00
Developer 02
b3a2e1559a Refactor envelope handling and introduce new queries
Restructured the `CreateEnvelope` functionality by moving the `CreateEnvelopeCommand` and related DTOs to a new namespace. Der `EnvelopeReceiverController` wurde aktualisiert, um diese Änderungen widerzuspiegeln, und die Parameter wurden zur besseren Übersichtlichkeit umbenannt. Es wurden neue Abfragesätze für das Lesen von Umschlag-Empfängern und definierte Antwortstrukturen eingeführt, wodurch die Gesamtorganisation und die Wartbarkeit der Codebasis verbessert wurden.

Übersetzt mit DeepL.com (kostenlose Version)
2025-04-07 12:03:34 +02:00
Developer 02
261d1b3db9 Verbesserte Funktionen zur Erstellung von Umschlägen und Aktualisierung von Projekten
Neue DTOs und Befehle zur Erstellung von Umschlägen in CreateEnvelope.cs hinzugefügt. Aktualisierte Projektdateien, um net7.0, net8.0 und net9.0 zu unterstützen. Refactored EnvelopeController für bessere Struktur und Fehlerbehandlung. Einführung einer Methode zur Erstellung von Umschlägen in EnvelopeReceiverController unter Verwendung von IMediator. Allgemeine Verbesserungen der Funktionalität und Kompatibilität.
2025-04-04 15:36:03 +02:00
Developer 02
401d03aac2 Verbesserung der Umschlagserstellung mit neuen DTOs und Befehlen
Einführung neuer Datenübertragungsobjekte für Signaturen und Empfänger.
Aktualisiert `CreateEnvelopeCommand` um benötigte Felder wie
`Title`, `Message`, `Document` und `Receivers`, zusammen mit optionalen
Parametern. Entfernt `EnvelopeCreateDto` für einen besser strukturierten
Ansatz zur Verwaltung von Umschlagserstellungsdaten.
2025-04-04 14:02:30 +02:00
Developer 02
7871bf72f6 Add CreateEnvelope command and DTO for envelope creation
Führt den `CreateEnvelopeCommand` Datensatz und seinen Handler ein, der die `IRequest` Schnittstelle von MediatR implementiert. Der Handler wirft derzeit eine `NotImplementedException`.

Fügt die Klasse „EnvelopeCreateDto“ mit Eigenschaften für Titel, Nachricht, Sprache, Verfallsdaten, Vertragstyp und TFA-Flag hinzu. Erforderliche Felder werden mit Datenanmerkungen validiert, und für bestimmte Eigenschaften werden Standardwerte festgelegt.
2025-04-03 17:48:49 +02:00
Developer 02
7e07afa384 Add MediatR package reference to project
This commit adds a new package reference for "MediatR"
with version "11.1.0" to the project file
`EnvelopeGenerator.Application.csproj`.
2025-04-03 13:21:08 +02:00
Developer 02
251420134a Verbesserung der Authentifizierungsmethoden und der Dokumentation
Die XML-Dokumentation für die Methode „Login“ wurde aktualisiert, um die Antwortcodes zu verdeutlichen, und es wurden Beispielanfragen hinzugefügt. Einführung einer neuen „Logout“-Methode mit entsprechender Dokumentation und Autorisierung. Hinzufügen einer Methode `IsAuthenticated` zur Überprüfung auf gültige Token, mit aktualisierter Antwortbehandlung und Dokumentation. Das `AllowAnonymous`-Attribut von `IsAuthenticated` wurde entfernt, um die Autorisierung zu erzwingen.
2025-04-03 11:12:33 +02:00
Developer 02
701b26289b Refactor AuthController and update Login method
- Added using directive for EnvelopeGenerator.GeneratorAPI.Models.
- Changed Login method parameter type from LogInDto to Login.
- Modified HTTP route for Login method from "/form" to "form".
- Enhanced XML documentation for better clarity on method usage.
- Specified response type for successful login as text/javascript.
- Removed ProducesResponseType for 500 Internal Server Error.
2025-04-03 08:02:42 +02:00
Developer 02
754e3ddc7a Verbesserung des AuthControllers und der Projektdokumentation
- AuthController.cs mit XML-Dokumentation aktualisiert und Parameter der Login-Methode umstrukturiert.
- Geänderte Klassendefinition zu partiell für Erweiterbarkeit.
- XML-Dokumentationsgenerierung zur Projektdatei hinzugefügt.
- Verbesserte Swagger-Dokumentation in Program.cs und korrigierte API-Beschreibung.
- Einführung einer neuen Datei Login.cs für ein strukturiertes Login-Datenmodell.
2025-04-02 17:07:07 +02:00
Developer 02
a0e8cc6989 Das Swagger-Setup wurde aktualisiert und enthält nun eine detaillierte Dokumentation mit Versionsangaben, Titel, Beschreibung und Kontaktinformationen. 2025-04-02 15:12:59 +02:00
Developer 02
b9f25a0ac4 Update Swashbuckle.AspNetCore to version 8.1.0 2025-04-02 15:02:36 +02:00
Developer 02
f40ee49977 Verbesserung der Login-Methode und Vereinfachung der IsAuthenticated-Route
- Die Login-Methode wurde geändert, um einen zusätzlichen `bool cookie`-Parameter für mehr Flexibilität zu akzeptieren.
- Hinzufügen einer neuen Login-Methode, die LogInDto aus Formulardaten verarbeitet und die ursprüngliche Methode mit `cookie` auf true setzt.
- Aufnahme eines Platzhalters für JWT- und Cookie-Handling in die ursprüngliche Login-Methode.
2025-04-02 14:40:02 +02:00
Developer 02
d08e93cbef Aktualisieren Sie das Projekt auf .NET 9.0 und verbessern Sie die API-Unterstützung
- Zielen Sie nur auf .NET 9.0 in `EnvelopeGenerator.GeneratorAPI.csproj`.
- Fügen Sie das Paket `AspNetCore.Scalar` hinzu und aktualisieren Sie `Microsoft.AspNetCore.OpenApi` auf Version 9.0.3.
- Scalar.AspNetCore„ in die Datei “Program.cs" einbinden.
- Integrieren Sie OpenAPI-Unterstützung mit `AddOpenApi()` und bilden Sie Endpunkte mit `app.MapOpenApi()` und `app.MapScalarApiReference()` ab.
2025-04-02 11:21:31 +02:00
Developer 02
4a48bbb3e2 Update target frameworks in project file
The project file `EnvelopeGenerator.GeneratorAPI.csproj` has been modified to target multiple frameworks, replacing the single target `net7.0` with `net8.0` and `net9.0`. This change enables the project to be built for the latest versions of .NET.
2025-04-01 20:43:35 +02:00
Developer 02
9725e2a729 fix(Programm): Update des „Envelope Generator“-Repositorys und der Dienstkonfiguration 2025-04-01 19:05:33 +02:00
Developer 02
031f0d4cce Hinzufügen des EnvelopeGenerator.Terminal-Projekts mit CLI-Unterstützung
Die Lösung wurde aktualisiert und enthält nun ein neues Projekt `EnvelopeGenerator.Terminal` für .NET 8.0. Hinzufügen der Klassen `CommandManager` und `DependencyInjection` für die Befehlsausführung und die Injektion von Abhängigkeiten mit CommandDotNet. Die Klasse `Program` wurde eingeführt, um den Anwendungshost einzurichten und Befehle auszuführen. Hinzufügen der erforderlichen Paketverweise in der Projektdatei zur Unterstützung neuer Funktionen.
2025-04-01 18:58:26 +02:00
Developer 02
ea09edbc7f chore: Hinzufügen von Infrastruktur- und Präsentationsprojekten zur Lösung
- Einführung der neuen Projekte "Infrastruktur" und "Präsentation" mit ihren jeweiligen GUIDs.
- Die Projektkonfiguration wurde aktualisiert und enthält nun eine „Release“-Einstellung für das angegebene Projekt.
- Angepasste verschachtelte Projektbeziehungen, um die neuen Projekte einzubeziehen.
2025-03-31 11:48:11 +02:00
Developer 02
bd150bf0c0 chore: Aktualisiert auf 3.1.1 2025-03-31 10:31:16 +02:00
Developer 02
4a53e24618 refacto(DocumentStatusDto): Eigenschaft-Value veränderbar gemacht 2025-03-28 15:14:45 +01:00
Developer 02
7c969c8950 ignore annotations.json for bug fix 2025-03-28 15:12:26 +01:00
Developer 02
77831592f9 ignore bug fix test 2025-03-28 15:07:56 +01:00
Developer 02
55290c93e7 feat(mock): Unterstützung für echte Datenbankkonfiguration hinzugefügt
- Parameter `useRealDb` zur Methode `CreateHost` hinzugefügt, um zwischen In-Memory- und echter Datenbank zu wechseln.
- `Microsoft.EntityFrameworkCore` für die Datenbankkonfiguration integriert.
- SQL Server-Verbindung konfiguriert, wenn `useRealDb` auf `true` gesetzt ist, ansonsten wird standardmäßig eine In-Memory-Datenbank verwendet.
2025-03-28 14:08:38 +01:00
Developer 02
77713997bf refactor(DIExtensions): Option zum Hinzufügen von db-Kontext über dbContextOptions-Eingang hinzugefügt 2025-03-28 13:42:49 +01:00
Developer 02
8824bfef00 refactor(DocumentStatusServiceTests): Service-Verzeichnis verschieben. 2025-03-28 13:29:09 +01:00
Developer 02
cc6b4e63a9 feat(Mock): Erstellt, um gefälschte Daten zu erzeugen.
- Methode zur Erstellung eines gefälschten Hosts hinzugefügt.
2025-03-28 13:14:30 +01:00
Developer 02
99f7a5ee43 refactor(EnvelopeGenerator.Tests): umbenannt in EnvelopeGenerator.Tests.Application 2025-03-28 11:45:48 +01:00
Developer 02
b566785668 chore(EnvelopeGenerator.Tests): Fügen Sie das Paket Microsoft.Extensions.DependencyInjection.Abstractions entsprechend der Framework-Version hinzu 2025-03-28 11:40:31 +01:00
Developer 02
0e0f3f412d feat(DocumentStatusServiceTests): initalisiert 2025-03-28 11:27:35 +01:00
Developer 02
f8920a573b feat(EnvelopeGenerator.Test): Erstellt, um Einheitstest von Projekten zu behandeln 2025-03-28 10:57:19 +01:00
Developer 02
cc07a65f09 refactor(Service): Unnötige Importe entfernen 2025-03-28 10:25:25 +01:00
Developer 02
fbba7f2bfc refactor(EnvelopeGenerator.BBTests): Hinzufügen des Nuget-Pakets DigitalData.Controls.DocumentViewer 2025-03-28 10:23:52 +01:00
Developer 02
ba392eb128 Fix: Konflikte beim Zusammenführen 2025-03-28 10:12:07 +01:00
Developer 02
e4906ad9be refactor(EnvelopeGenerator.Test): Umbenennung von EnvelopeGenerator.BBTests 2025-03-28 10:05:54 +01:00
Developer 02
98773eb888 chore: Projekte sind in zwei separate Lösungsdateien unterteilt, „src“ und „tests“. 2025-03-28 09:54:04 +01:00
Developer 02
943481da80 refactor(Core): in Kleinbuchstaben umgewandelt 2025-03-28 09:46:26 +01:00
Developer01
b5579a68cd Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-03-27 17:16:59 +01:00
Developer01
fb069d0ee2 MS 2025-03-27 17:16:50 +01:00
Developer 02
559c4b6340 chore: Aufgerüstet auf 3.1.0 2025-03-27 16:47:12 +01:00
Developer 02
891436ceef refactor(frmFinalizePDF): _ignoredLabels „Position“, „Stellung“ hinzufügen 2025-03-27 16:19:57 +01:00
Developer 02
88777e0c27 refactor(Config): Standardliste IgnoredLabels aktualisieren 2025-03-27 14:01:33 +01:00
Developer 02
7eb8ae6697 Merge branch 'master' into feat/position 2025-03-26 15:10:57 +01:00
Developer01
deda2480b0 MS EG.Test Baget Refresh 2025-03-26 15:10:11 +01:00
Developer01
269be5109c MS Form Baget References 2025-03-26 14:59:28 +01:00
Developer01
3b40a889a3 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-03-26 14:41:08 +01:00
Developer01
5b60326fbe MS Common GDPicture Update, Baget Integration 2025-03-26 14:40:52 +01:00
Developer 02
6083eea496 refactor(frmFinalizePDF): Aktualisiert, um die Datei aus der DB zu lesen 2025-03-26 13:55:24 +01:00
Developer 02
88c2721ba5 refactor(appsettings): bearbeitete Größenparameter der annotations 2025-03-26 10:55:46 +01:00
Developer 02
db5a2a8640 feat(AnnotationParams): Hinzufügen der Eigenschaft AnnotationDictionary, um Anmerkungen in Form eines Wörterbuchs zu speichern. 2025-03-26 10:42:34 +01:00
Developer 02
fb0022bd2c fix(annotation): Die klassenbasierte Struktur wurde entfernt und die Methode createSignature in die Methode createAnnotations integriert. 2025-03-26 10:15:05 +01:00
Developer 02
c45e6875d0 feat(postion): Hinzufügen und Konfigurieren von Positions- und Positionsbeschriftungsannotationen. 2025-03-25 17:13:51 +01:00
Developer 02
0f855158c3 fix(annotation.js): Unnötige Variablen entfernen. 2025-03-24 13:19:59 +01:00
Developer 02
e9cb49c6a7 feat(annotation.js): Konfigurierte Beschriftungen 2025-03-24 12:48:28 +01:00
Developer 02
9ae1efb946 refactor(network): Die Methode getAnnotationParams wurde aktualisiert, um die Anmerkung übersetzen und das Verhältnis ihrer Größe ändern zu können. 2025-03-24 10:24:35 +01:00
Developer 02
eef6bf27f1 feat(ConfigController): GetAnnotationParams aktualisiert, um Wörterbuch zu senden 2025-03-21 16:14:31 +01:00
Developer 02
2dfe508552 feat(network.js): Methode zum Abrufen von Anmerkungsparametern hinzugefügt 2025-03-21 15:39:24 +01:00
Developer 02
a7b980bd28 refactor(Annotation): Aktualisiert, um null anstelle von Standard zu verwenden 2025-03-21 14:13:49 +01:00
Developer 02
2d7c0a292b feat(appsettings): Konfigurierte AnnotationParams 2025-03-21 13:11:54 +01:00
Developer 02
91f1296e9b Revert "feat(ClientCoefficient): Erstellt, um die Dimensionen für den Kunden bis zu einem gewissen Grad zu erhöhen"
This reverts commit 80e1e7dcf3.
2025-03-21 12:29:39 +01:00
Developer 02
80e1e7dcf3 feat(ClientCoefficient): Erstellt, um die Dimensionen für den Kunden bis zu einem gewissen Grad zu erhöhen 2025-03-21 12:01:42 +01:00
Developer 02
eb024acfa7 featAnnotation): Hinzufügen von Verhältnisanteilen, um die Konfiguration über das Verhältnis zu ermöglichen 2025-03-20 17:16:42 +01:00
Developer 02
210ce072f8 refactor(AnnotationParams): vereinfacht 2025-03-20 17:01:13 +01:00
Developer 02
036e1f68a8 refactor(Annotation): Default.set hinzugefügt, um Standardwerte zu setzen 2025-03-20 16:48:42 +01:00
Developer 02
0b87a3746a fix(Annotation): Aktualisiert, um MarginLeft und Top bei der Berechnung von HorBoundary und VerBoundary zu berücksichtigen 2025-03-20 15:52:21 +01:00
Developer 02
db84abf0e7 feat(Anmerkung): JsonIgnore-Attribut für nicht-clientbezogene Entitäten hinzugefügt 2025-03-20 14:58:41 +01:00
Developer 02
14be46d3d6 refactor(Annotation): Umbenennen von left in marginLeft, top in marginTop, posX in Left und posY in top für eine CSS-ähnlichere Benennung 2025-03-20 14:56:36 +01:00
Developer 02
78b5e3f5cc feat(Annotations): Konvertiere _annots von Dictionary zu IEnumerable.
- Zugehörige Index- und TryGet-Methoden hinzugefügt.
2025-03-20 14:44:57 +01:00
Developer 02
093e64de81 feat(Annotation): Hinzufügen der Eigenschaft Name 2025-03-20 14:27:58 +01:00
Developer 02
43db4e275b fix(Annotation): JsonIgnore-Attribut zu HorBoundAnnot und VerBoundAnnot hinzufügen 2025-03-20 12:46:57 +01:00
Developer 02
353f7698f4 feat(ConfigController): Erstellt, um Webanwendungen über den Server zu konfigurieren.
- GetAnnotationParams Endpunkt hinzufügen, um Annotationsdaten zu senden
2025-03-20 11:50:59 +01:00
Developer 02
d5b4ea46d3 feat(DefaultAnnotation): Hinzufügen der Möglichkeit, eine Annotation mit zentralen Standardwerten zu konfigurieren. 2025-03-20 11:39:40 +01:00
Developer 02
b6563d71b0 feat(Annotation): marginX in left und marginY in top umbenannt. 2025-03-20 10:27:53 +01:00
Developer 02
8a6a11c1bc feat(AnnotationParams): Aktualisiert, um Standardwerte in Annots.init zu setzen. 2025-03-20 10:23:33 +01:00
Developer 02
cbd71aa2b9 feat(AnnotationParams): Logik zur Initialisierung von gebundenen Annotationen hinzugefügt Annots.init 2025-03-20 09:41:51 +01:00
Developer 02
df019a7243 feat(AnnotationParams): Erstellt, um Annotationen über Appsettings zu konfigurieren. 2025-03-20 09:22:36 +01:00
Developer 02
6c222ca9ad Merge branch 'master' into feat/position 2025-03-20 09:05:36 +01:00
Developer 02
53c64ef83e feat(Annotation): Erstellt, um Größe und Layout der Anmerkungen von Umschlägen zu handhaben 2025-03-20 09:00:56 +01:00
Developer 02
3ac0cbeaae chore(frmFinalizePDF): Modul „Encryption“ hinzufügen. 2025-03-18 12:00:58 +01:00
Developer 02
b471c469b5 chore(frmFinalizePDF): GdPicture-Lizenzschlüssel aktualisieren 2025-03-18 11:58:44 +01:00
Developer 02
31a1c0e3a8 chore: GdPicture aktualisieren 2025-03-18 11:57:49 +01:00
Developer 02
08dd6a9aa7 feat(EnvelopeReceiverService): Erstellen der Methode ReadWithSecretByUuidAsync ohne Implementierung. 2025-03-18 11:50:20 +01:00
Developer 02
b6e15dbf03 fix(EnvelopeGenerator.Web): DDModules-Abhängigkeiten unter 2_DLL Projekte verschoben. 2025-03-18 11:46:53 +01:00
Developer 02
146dd2e9d3 Revert "refactor: Erforderliche Abhängigkeiten für GdPicture hinzugefügt und Lizenzschlüssel von frmFinalizePDF aktualisiert"
This reverts commit fa70360c9e.
2025-03-18 11:21:44 +01:00
Developer 02
2cca1b6d4d Revert "refactor(EnvelopeGenerator.Form): GdPicture aktualisieren"
This reverts commit ddc96b96e7.
2025-03-18 11:21:26 +01:00
Developer 02
ddc96b96e7 refactor(EnvelopeGenerator.Form): GdPicture aktualisieren 2025-03-18 10:59:57 +01:00
Developer 02
fa70360c9e refactor: Erforderliche Abhängigkeiten für GdPicture hinzugefügt und Lizenzschlüssel von frmFinalizePDF aktualisiert 2025-03-18 10:38:12 +01:00
Developer 02
da3c7bc0c2 feat(annotation.js): Datum und Ort wurden vertauscht, um die Lesbarkeit zu verbessern. 2025-03-17 15:47:38 +01:00
Developer 02
0692922f12 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-03-05 11:45:12 +01:00
Developer01
e15e27db16 MS Layout Signaturfeld 2025-02-25 16:23:24 +01:00
Developer01
ac279148ba MS Handling Löschen 2025-02-25 15:17:47 +01:00
Developer01
ab5fdbd41e Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-02-25 10:22:47 +01:00
Developer01
0b93f96a20 MS 2025-02-25 10:22:32 +01:00
Developer 02
1a8d3c2e76 chore(Web): Hochgestuft auf 3 2025-02-13 01:32:07 +01:00
Developer 02
43019e6710 feat(Main.cshtml): Bindung des Titels mit Appettigns über MainViewModel 2025-02-13 01:27:44 +01:00
Developer 02
2f634f18bd refactor(Main.cshtml): App-Logo mit Appsettings über CustomImages verbunden.
- Logo aktualisiert.
 - CSS für Logo hinzugefügt
2025-02-13 01:06:46 +01:00
Developer 02
41b5b62f2c feat(CustomImages): Implementiert anstelle von Bildern, um mehrere Bilder über ein Wörterbuch zu konfigurieren 2025-02-13 00:48:47 +01:00
Developer 02
1e34042f77 refactor(Logo): umbenannt in Img 2025-02-13 00:30:03 +01:00
Developer 02
54e3eed557 feat(Logo): Konvertierung von Klassen in ein Wörterbuch anstelle von getrennten Eigenschaften 2025-02-13 00:19:59 +01:00
Developer 02
934414c3b6 fix(EGDbContext): Unnötige Trigger-Konfiguration entfernt 2025-02-12 21:12:40 +01:00
Developer 02
f9c34ef8fd refactor(EGDbContext): AddTrigger zur Konfiguration von Triggern über appsettings.json erstellt und implementiert 2025-02-12 21:11:08 +01:00
Developer 02
4615205aa5 refactor: Aktualisierung der Anwendungs- und Infrastrukturebenen, so dass die Infrastruktur von der Anwendung abhängig ist.
- Repository-Schnittstellen wurden in die Anwendungsschicht verschoben.
 - Erweiterungsmethoden für die Injektion von Repository-Abhängigkeiten wurden in die Infrastruktur verschoben.
2025-02-12 19:31:13 +01:00
Developer 02
a5a8a9e416 refactor(DbTriggerParams): Erstellt, um Trigger über appsettings.json zu konfigurieren 2025-02-12 18:49:53 +01:00
Developer 02
255843d760 chore: Hochgestuft auf 2.11 2025-02-11 16:44:51 +01:00
Developer 02
121f0568ad feat(network.js): Aktualisiertes Logout, um bei erfolgreicher Logout-Anfrage auf die Startseite umzuleiten 2025-02-11 16:44:06 +01:00
Developer 02
5d95f2f221 feat(network.js): Logout-Anforderungsmethode hinzugefügt.
- Logout-Methode zum LOGOUT-Ereignis hinzugefügt
2025-02-11 16:28:50 +01:00
Developer 02
3d5053d177 feat(TFARegController): Logout-Methode hinzugefügt 2025-02-11 16:13:24 +01:00
Developer 02
b79bc2e418 feat(ui.js): Schaltfläche zum Abmelden mit Icon hinzugefügt.
- Mock-Button auf der rechten Seite hinzugefügt, um ein Padding auf die rechte Seite zu setzen
 - Mock-Aktion zur Abmelde-Schaltfläche hinzugefügt
2025-02-11 16:07:38 +01:00
Developer 02
b4154b60a7 feat(HomeController): LogInEnvelope-Methode aktualisiert, um show-envelope-view zu senden, wenn der Client die FullyAuth-Rolle hat 2025-02-11 15:47:27 +01:00
Developer 02
0090fc0dfa fix(EnvelopeReceiverBase): HasPhoneNumber getter Methode aktualisiert, um false nicht nur für null, sondern auch für Leerzeichen zurückzugeben. 2025-02-11 15:42:00 +01:00
Developer 02
6eac92b7cb refactor(HomeController): renamed TryShowEnvelope as CreateShowEnvelopeView 2025-02-11 15:18:09 +01:00
Developer 02
1b1edca23c feat(HomeController): TryShowEnvelope-Methode erstellt, um die Generierung der Show-Envelope-Ansicht zu zentrieren
- TryShowEnvelope-Methode zum EnvelopeLocked-Endpunkt hinzugefügt, um den Umschlag anzuzeigen, wenn der Benutzer bereits autorisiert wurde.
2025-02-11 15:02:10 +01:00
Developer01
57ea9e01f8 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-02-11 14:04:11 +01:00
Developer01
1a99041c60 MS Changes OrderFiles, TFA without OPhone 2025-02-11 14:03:58 +01:00
Developer 02
56c735890d Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-02-11 13:52:39 +01:00
Developer01
c63f369bd6 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-02-04 15:08:07 +01:00
Developer01
c50e16d74f MS Überarbeitung 2025-02-04 15:07:53 +01:00
342 changed files with 8771 additions and 2918 deletions

2
.gitignore vendored
View File

@@ -363,3 +363,5 @@ MigrationBackup/
FodyWeavers.xsd
/EnvelopeGenerator.Web/.config/dotnet-tools.json
/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-ui/.vscode
/EnvelopeGenerator.Tests.Application/Services/BugFixTests.cs
/EnvelopeGenerator.Tests.Application/annotations.json

View File

@@ -0,0 +1,5 @@
namespace EnvelopeGenerator.Application.Configurations;
public class DbTriggerParams : Dictionary<string, IEnumerable<string>>
{
}

View File

@@ -1,19 +0,0 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IAuthenticator
{
string GenerateCode(int length);
string GenerateTotpSecretKey(int? length = null);
byte[] GenerateTotpQrCode(string userEmail, string secretKey, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
byte[] GenerateTotpQrCode(string userEmail, int? length = null, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
string GenerateTotp(string secretKey, int step = 30);
bool VerifyTotp(string totpCode, string secretKey, int step = 30, VerificationWindow? window = null);
}
}

View File

@@ -1,17 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IConfigService : IReadService<ConfigDto, Config, int>
{
Task<DataResult<ConfigDto>> ReadFirstAsync();
Task<ConfigDto> ReadDefaultAsync();
Task<string> ReadDefaultSignatureHost();
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IDocumentReceiverElementService : IBasicCRUDService<DocumentReceiverElementDto, DocumentReceiverElement, int>
{
}
}

View File

@@ -1,9 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IDocumentStatusService : IBasicCRUDService<DocumentStatusDto, DocumentStatus, int>
{
}
}

View File

@@ -1,13 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEmailTemplateService : IBasicCRUDService<EmailTemplateDto, EmailTemplate, int>
{
Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type);
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
{
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeDocumentService : IBasicCRUDService<EnvelopeDocumentDto, EnvelopeDocument, int>
{
}
}

View File

@@ -1,28 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeHistoryService : ICRUDService<EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistoryDto, EnvelopeHistory, long>
{
Task<int> CountAsync(int? envelopeId = null, string? userReference = null, int? status = null);
Task<bool> AccessCodeAlreadyRequested(int envelopeId, string userReference);
Task<bool> IsSigned(int envelopeId, string userReference);
Task<bool> IsRejected(int envelopeId, string? userReference = null);
Task<IEnumerable<EnvelopeHistoryDto>> ReadAsync(int? envelopeId = null, string? userReference = null, ReferenceType? referenceType = null, int? status = null, bool withSender = false, bool withReceiver = false);
Task<IEnumerable<EnvelopeHistoryDto>> ReadRejectedAsync(int envelopeId, string? userReference = null);
Task<IEnumerable<ReceiverReadDto>> ReadRejectingReceivers(int envelopeId);
Task<DataResult<long>> RecordAsync(int envelopeId, string userReference, EnvelopeStatus status, string? comment = null);
}
}

View File

@@ -1,19 +0,0 @@
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeMailService : IEmailOutService
{
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType, Dictionary<string, object>? optionalPlaceholders = null);
Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto, Dictionary<string, object>? optionalPlaceholders = null);
Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
Task<DataResult<int>> SendTFAQrCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeReceiverReadOnlyService : ICRUDService<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnlyDto, EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly, long>
{
}
}

View File

@@ -1,38 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeReceiverService : IBasicCRUDService<EnvelopeReceiverDto, EnvelopeReceiver, (int Envelope, int Receiver)>
{
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true);
Task<DataResult<IEnumerable<string?>>> ReadAccessCodeByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverSecretDto>> ReadWithSecretByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<string>> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
Task<DataResult<bool>> VerifyAccessCodeAsync(string uuid, string signature, string accessCode);
Task<DataResult<bool>> VerifyAccessCodeAsync(string envelopeReceiverId, string accessCode);
Task<DataResult<bool>> IsExisting(string envelopeReceiverId);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
}
}

View File

@@ -1,16 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeService : IBasicCRUDService<EnvelopeDto, Envelope, int>
{
Task<DataResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool history = false, bool documentReceiverElement = false);
Task<DataResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withHistory = false, bool withDocumentReceiverElement = false, bool withUser = false, bool withAll = false);
Task<DataResult<IEnumerable<EnvelopeDto>>> ReadByUserAsync(int userId, int? min_status = null, int? max_status = null, params int[]ignore_statuses);
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeTypeService : IBasicCRUDService<EnvelopeTypeDto, EnvelopeType, int>
{
}
}

View File

@@ -1,17 +0,0 @@
using DigitalData.Core.Abstractions;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>
{
Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null);
Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>;
}
}

View File

@@ -1,10 +0,0 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IUserReceiverService : IBasicCRUDService<UserReceiverDto, UserReceiver, int>
{
}
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IConfigRepository : ICRUDRepository<Config, int>
{
Task<Config?> ReadFirstAsync();
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IDocumentReceiverElementRepository : ICRUDRepository<DocumentReceiverElement, int>
{
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IDocumentStatusRepository : ICRUDRepository<DocumentStatus, int>
{
}

View File

@@ -0,0 +1,10 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEmailTemplateRepository : ICRUDRepository<EmailTemplate, int>
{
Task<EmailTemplate?> ReadByNameAsync(EmailTemplateType type);
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeCertificateRepository : ICRUDRepository<EnvelopeCertificate, int>
{
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeDocumentRepository : ICRUDRepository<EnvelopeDocument, int>
{
}

View File

@@ -0,0 +1,11 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeHistoryRepository : ICRUDRepository<EnvelopeHistory, long>
{
Task<int> CountAsync(int? envelopeId = null, string? userReference = null, int? status = null);
Task<IEnumerable<EnvelopeHistory>> ReadAsync(int? envelopeId = null, string? userReference = null, int? status = null, bool withSender = false, bool withReceiver = false);
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeReceiverReadOnlyRepository : ICRUDRepository<EnvelopeReceiverReadOnly, long>
{
}

View File

@@ -0,0 +1,25 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeReceiverRepository : ICRUDRepository<EnvelopeReceiver, (int Envelope, int Receiver)>
{
Task<IEnumerable<EnvelopeReceiver>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true);
Task<IEnumerable<EnvelopeReceiver>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true);
Task<EnvelopeReceiver?> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<string?> ReadAccessCodeAsync(string uuid, string signature, bool readOnly = true);
Task<int> CountAsync(string uuid, string signature);
Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId, bool readOnly = true);
Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId, bool readOnly = true);
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<EnvelopeReceiver?> ReadLastByReceiver(string email);
}

View File

@@ -0,0 +1,13 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeRepository : ICRUDRepository<Envelope, int>
{
Task<IEnumerable<Envelope>> ReadAllWithAsync(bool documents = false, bool history = false, bool documentReceiverElement = false);
Task<Envelope?> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withHistory = false, bool withDocumentReceiverElement = false, bool withUser = false, bool withAll = false);
Task<IEnumerable<Envelope>> ReadByUserAsync(int userId, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IEnvelopeTypeRepository : ICRUDRepository<EnvelopeType, int>
{
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IReceiverRepository : ICRUDRepository<Receiver, int>
{
Task<Receiver?> ReadByAsync(string? emailAddress = null, string? signature = null);
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
public interface IUserReceiverRepository : ICRUDRepository<UserReceiver, int>
{
}

View File

@@ -0,0 +1,18 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IAuthenticator
{
string GenerateCode(int length);
string GenerateTotpSecretKey(int? length = null);
byte[] GenerateTotpQrCode(string userEmail, string secretKey, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
byte[] GenerateTotpQrCode(string userEmail, int? length = null, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
string GenerateTotp(string secretKey, int step = 30);
bool VerifyTotp(string totpCode, string secretKey, int step = 30, VerificationWindow? window = null);
}

View File

@@ -0,0 +1,16 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IConfigService : IReadService<ConfigDto, Config, int>
{
Task<DataResult<ConfigDto>> ReadFirstAsync();
Task<ConfigDto> ReadDefaultAsync();
Task<string> ReadDefaultSignatureHost();
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IDocumentReceiverElementService : IBasicCRUDService<DocumentReceiverElementDto, DocumentReceiverElement, int>
{
}

View File

@@ -0,0 +1,8 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IDocumentStatusService : IBasicCRUDService<DocumentStatusDto, DocumentStatus, int>
{
}

View File

@@ -0,0 +1,12 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEmailTemplateService : IBasicCRUDService<EmailTemplateDto, EmailTemplate, int>
{
Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type);
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
{
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeDocumentService : IBasicCRUDService<EnvelopeDocumentDto, EnvelopeDocument, int>
{
}

View File

@@ -0,0 +1,27 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeHistoryService : ICRUDService<EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistory, long>
{
Task<int> CountAsync(int? envelopeId = null, string? userReference = null, int? status = null);
Task<bool> AccessCodeAlreadyRequested(int envelopeId, string userReference);
Task<bool> IsSigned(int envelopeId, string userReference);
Task<bool> IsRejected(int envelopeId, string? userReference = null);
Task<IEnumerable<EnvelopeHistoryDto>> ReadAsync(int? envelopeId = null, string? userReference = null, ReferenceType? referenceType = null, int? status = null, bool withSender = false, bool withReceiver = false);
Task<IEnumerable<EnvelopeHistoryDto>> ReadRejectedAsync(int envelopeId, string? userReference = null);
Task<IEnumerable<ReceiverReadDto>> ReadRejectingReceivers(int envelopeId);
Task<DataResult<long>> RecordAsync(int envelopeId, string userReference, EnvelopeStatus status, string? comment = null);
}

View File

@@ -0,0 +1,18 @@
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeMailService : IEmailOutService
{
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType, Dictionary<string, object>? optionalPlaceholders = null);
Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto, Dictionary<string, object>? optionalPlaceholders = null);
Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
Task<DataResult<int>> SendTFAQrCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeReceiverReadOnlyService : ICRUDService<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnlyDto, EnvelopeReceiverReadOnly, long>
{
}

View File

@@ -0,0 +1,40 @@
using CommandDotNet;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeReceiverService : IBasicCRUDService<EnvelopeReceiverDto, EnvelopeReceiver, (int Envelope, int Receiver)>
{
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true);
Task<DataResult<IEnumerable<string?>>> ReadAccessCodeByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverSecretDto>> ReadWithSecretByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
Task<DataResult<string>> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
Task<DataResult<bool>> VerifyAccessCodeAsync(string uuid, string signature, string accessCode);
[Command("verify-access-code-async-by-id")]
Task<DataResult<bool>> VerifyAccessCodeAsync(string envelopeReceiverId, string accessCode);
Task<DataResult<bool>> IsExisting(string envelopeReceiverId);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
Task<DataResult<IEnumerable<EnvelopeReceiverSecretDto>>> ReadWithSecretByUuidAsync(string uuid);
}

View File

@@ -0,0 +1,15 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeService : IBasicCRUDService<EnvelopeDto, Envelope, int>
{
Task<DataResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool history = false, bool documentReceiverElement = false);
Task<DataResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withHistory = false, bool withDocumentReceiverElement = false, bool withUser = false, bool withAll = false);
Task<DataResult<IEnumerable<EnvelopeDto>>> ReadByUserAsync(int userId, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
}

View File

@@ -1,7 +1,7 @@
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Contracts;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeSmsHandler
{

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IEnvelopeTypeService : IBasicCRUDService<EnvelopeTypeDto, EnvelopeType, int>
{
}

View File

@@ -0,0 +1,16 @@
using DigitalData.Core.Abstractions;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverReadDto, Receiver, int>
{
Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null);
Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>;
}

View File

@@ -1,6 +1,6 @@
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Contracts;
namespace EnvelopeGenerator.Application.Contracts.Services;
//TODO: move to DigitalData.Core
public interface ISmsSender

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
public interface IUserReceiverService : IBasicCRUDService<UserReceiverDto, UserReceiver, int>
{
}

View File

@@ -1,9 +1,11 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record ConfigDto(
string DocumentPath,
int SendingProfile,

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record DocumentReceiverElementDto(
int Id,
int DocumentId,

View File

@@ -1,14 +1,18 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record DocumentStatusDto(
int Id,
int EnvelopeId,
int ReceiverId,
int Status,
DateTime? StatusChangedWhen,
string Value,
DateTime AddedWhen,
DateTime? ChangedWhen) : IUnique<int>;
DateTime? ChangedWhen) : IUnique<int>
{
public string? Value { get; set; }
};
}

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EmailTemplateDto(
int Id,
string Name,

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeCertificateDto(
int Id,
int EnvelopeId,

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeDocumentDto
(
int Id,

View File

@@ -2,9 +2,11 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeDto() : IUnique<int>
{
public int Id { get; set; }

View File

@@ -1,5 +1,8 @@
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeHistoryCreateDto(
int EnvelopeId,
string UserReference,

View File

@@ -2,10 +2,12 @@
using DigitalData.Core.DTO;
using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Application.DTOs.Receiver;
using Microsoft.AspNetCore.Mvc;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeHistoryDto(
long Id,
int EnvelopeId,

View File

@@ -1,8 +1,10 @@
using DigitalData.Core.Abstractions;
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverBasicDto() : IUnique<(int Envelope, int Receiver)>
{
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);

View File

@@ -1,7 +1,9 @@
using EnvelopeGenerator.Application.DTOs.Receiver;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverDto() : EnvelopeReceiverBasicDto()
{
public EnvelopeDto? Envelope { get; set; }

View File

@@ -1,5 +1,8 @@
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverSecretDto() : EnvelopeReceiverDto()
{
public string? AccessCode { get; init; }

View File

@@ -1,8 +1,10 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverReadOnlyCreateDto(
DateTime DateValid)
{

View File

@@ -1,7 +1,9 @@
using EnvelopeGenerator.Application.DTOs.Receiver;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverReadOnlyDto(
long Id,
long EnvelopeId,

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeReceiverReadOnlyUpdateDto(
long Id,
DateTime DateValid,

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeTypeDto(
int Id,
string Title,

View File

@@ -0,0 +1,70 @@
using AutoMapper;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Application.Extensions;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.DTOs;
/// <summary>
/// Represents the AutoMapper profile configuration for mapping between
/// domain entities and data transfer objects (DTOs) used within the EnvelopeGenerator application.
/// </summary>
public class MappingProfile : Profile
{
/// <summary>
/// Initializes a new instance of the <see cref="MappingProfile"/> class.
/// Configures the mappings between entities and DTOs used throughout the application.
/// </summary>
public MappingProfile()
{
// Entity to DTO mappings
CreateMap<Config, ConfigDto>();
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
CreateMap<DocumentStatus, DocumentStatusDto>();
CreateMap<EmailTemplate, EmailTemplateDto>();
CreateMap<Envelope, EnvelopeDto>();
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverDto>();
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverSecretDto>();
CreateMap<EnvelopeType, EnvelopeTypeDto>();
CreateMap<Domain.Entities.Receiver, ReceiverReadDto>();
CreateMap<Domain.Entities.Receiver, ReceiverCreateDto>();
CreateMap<Domain.Entities.Receiver, ReceiverUpdateDto>();
CreateMap<UserReceiver, UserReceiverDto>();
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
// DTO to Entity mappings
CreateMap<ConfigDto, Config>();
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
CreateMap<DocumentStatusDto, DocumentStatus>();
CreateMap<EmailTemplateDto, EmailTemplate>();
CreateMap<EnvelopeDto, Envelope>();
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();
CreateMap<EnvelopeReceiverDto, Domain.Entities.EnvelopeReceiver>();
CreateMap<EnvelopeTypeDto, EnvelopeType>();
CreateMap<ReceiverReadDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
CreateMap<ReceiverCreateDto, Domain.Entities.Receiver>();
CreateMap<ReceiverUpdateDto, Domain.Entities.Receiver>();
CreateMap<UserReceiverDto, UserReceiver>();
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
// Messaging mappings
// for GTX messaging
CreateMap<GtxMessagingResponse, SmsResponse>()
.ConstructUsing(gtxRes => gtxRes.Ok()
? new SmsResponse() { Ok = true }
: new SmsResponse() { Ok = false, Errors = gtxRes });
}
}

View File

@@ -1,4 +1,7 @@
namespace EnvelopeGenerator.Application.DTOs.Messaging
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.Messaging
{
[ApiExplorerSettings(IgnoreApi = true)]
public class GtxMessagingResponse : Dictionary<string, object?> { }
}

View File

@@ -1,5 +1,8 @@
namespace EnvelopeGenerator.Application.DTOs.Messaging
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.Messaging
{
[ApiExplorerSettings(IgnoreApi = true)]
public record SmsResponse
{
public required bool Ok { get; init; }

View File

@@ -1,9 +1,11 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using System.Security.Cryptography;
using System.Text;
namespace EnvelopeGenerator.Application.DTOs.Receiver
{
[ApiExplorerSettings(IgnoreApi = true)]
public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null)
{
public string Signature => sha256HexOfMail.Value;

View File

@@ -2,10 +2,12 @@
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using Microsoft.AspNetCore.Mvc;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.Receiver;
[ApiExplorerSettings(IgnoreApi = true)]
public record ReceiverReadDto(
int Id,
string EmailAddress,

View File

@@ -1,5 +1,7 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.Receiver;
[ApiExplorerSettings(IgnoreApi = true)]
public record ReceiverUpdateDto(int Id, string? TotpSecretkey = null, DateTime? TfaRegDeadline = null) : IUnique<int>;

View File

@@ -1,7 +1,9 @@
using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
[ApiExplorerSettings(IgnoreApi = true)]
public record UserReceiverDto(
int Id,
int UserId,

View File

@@ -1,39 +1,29 @@
using DigitalData.UserManager.Application.MappingProfiles;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.MappingProfiles;
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Services;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Infrastructure.Repositories;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using DigitalData.Core.Client;
using QRCoder;
using EnvelopeGenerator.Application.Contracts.Services;
using System.Reflection;
namespace EnvelopeGenerator.Application.Extensions;
namespace EnvelopeGenerator.Application;
public static class DIExtensions
/// <summary>
/// Extensions method for dependency injection
/// </summary>
public static class DependencyInjection
{
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config)
/// <summary>
/// Adds all required services for envelope generator application
/// </summary>
/// <param name="services"></param>
/// <param name="config"></param>
/// <returns></returns>
public static IServiceCollection AddEnvelopeGeneratorServices(this IServiceCollection services, IConfiguration config)
{
//Inject CRUD Service and repositoriesad
services.TryAddScoped<IConfigRepository, ConfigRepository>();
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.TryAddScoped<IConfigRepository, ConfigRepository>();
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
services.TryAddScoped<IConfigService, ConfigService>();
services.TryAddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
@@ -50,13 +40,14 @@ public static class DIExtensions
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
//Auto mapping profiles
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
services.AddAutoMapper(Assembly.GetExecutingAssembly());
services.AddAutoMapper(typeof(DigitalData.UserManager.Application.DIExtensions));
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
services.Configure<DbTriggerParams>(config.GetSection(nameof(DbTriggerParams)));
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
@@ -64,6 +55,11 @@ public static class DIExtensions
services.TryAddSingleton<IAuthenticator, Authenticator>();
services.TryAddSingleton<QRCodeGenerator>();
services.AddMediatR(cfg =>
{
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
});
return services;
}
}

View File

@@ -0,0 +1,18 @@
using AutoMapper;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
/// <summary>
///
/// </summary>
public class ReadDocumentMappingProfile : Profile
{
/// <summary>
///
/// </summary>
public ReadDocumentMappingProfile()
{
CreateMap<EnvelopeDocument, ReadDocumentResponse>();
}
}

View File

@@ -0,0 +1,12 @@
using MediatR;
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
/// <summary>
/// Represents a query to read a document based on its unique identifier or associated envelope identifier.
/// </summary>
/// <param name="Id">The unique identifier of the document. Optional.</param>
/// <param name="EnvelopeId">The identifier of the envelope associated with the document. Optional.</param>
public record ReadDocumentQuery(int? Id = null, int? EnvelopeId = null) : IRequest<ReadDocumentResponse?>
{
}

View File

@@ -0,0 +1,47 @@
using DigitalData.Core.Abstractions.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using MediatR;
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
/// <summary>
/// Handles queries for reading <see cref="EnvelopeDocument"/> data based on either the document ID or the envelope ID.
/// </summary>
public class ReadDocumentQueryHandler : IRequestHandler<ReadDocumentQuery, ReadDocumentResponse?>
{
/// <summary>
/// Repository for accessing <see cref="EnvelopeDocument"/> entities.
/// </summary>
private readonly IRepository<EnvelopeDocument> _repo;
/// <summary>
/// Initializes a new instance of the <see cref="ReadDocumentQueryHandler"/> class.
/// </summary>
/// <param name="envelopeDocumentRepository">The repository used to access <see cref="EnvelopeDocument"/> entities.</param>
public ReadDocumentQueryHandler(IRepository<EnvelopeDocument> envelopeDocumentRepository)
{
_repo = envelopeDocumentRepository;
}
/// <summary>
/// Handles the <see cref="ReadDocumentQuery"/> and returns a <see cref="ReadDocumentResponse"/> based on the provided identifiers.
/// </summary>
/// <param name="query">The query containing the document ID or envelope ID to search for.</param>
/// <param name="cancellationToken">A token to monitor for cancellation requests.</param>
/// <returns>
/// A <see cref="ReadDocumentResponse"/> if a matching document is found; otherwise, <c>null</c>.
/// </returns>
/// <exception cref="InvalidOperationException">
/// Thrown when neither <see cref="ReadDocumentQuery.Id"/> nor <see cref="ReadDocumentQuery.EnvelopeId"/> is provided.
/// </exception>
public async Task<ReadDocumentResponse?> Handle(ReadDocumentQuery query, CancellationToken cancellationToken)
{
if (query.Id is not null)
return await _repo.ReadOrDefaultAsync<ReadDocumentResponse>(d => d.Id == query.Id);
else if (query.EnvelopeId is not null)
return await _repo.ReadOrDefaultAsync<ReadDocumentResponse>(d => d.EnvelopeId == query.EnvelopeId);
throw new InvalidOperationException(
$"Invalid {nameof(ReadDocumentQuery)}: either {nameof(query.Id)} or {nameof(query.EnvelopeId)} must be provided.");
}
}

View File

@@ -0,0 +1,27 @@
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
/// <summary>
/// Represents the response for reading a document.
/// </summary>
public class ReadDocumentResponse
{
/// <summary>
/// The unique identifier of the document.
/// </summary>
public int Guid { get; init; }
/// <summary>
/// The identifier of the associated envelope.
/// </summary>
public int EnvelopeId { get; init; }
/// <summary>
/// The date and time when the document was added.
/// </summary>
public DateTime AddedWhen { get; init; }
/// <summary>
/// The binary data of the document, if available.
/// </summary>
public byte[]? ByteData { get; init; }
}

View File

@@ -0,0 +1,22 @@
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
/// <summary>
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
/// </summary>
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional). Beispiele:
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
/// </param>
public record ResetEnvelopeTemplateCommand(int? Id, Constants.EmailTemplateType? Type) : EmailTemplateQuery(Id, Type);

View File

@@ -0,0 +1,22 @@
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Update;
/// <summary>
/// Befehl zum Aktualisieren einer E-Mail-Vorlage.
/// </summary>
/// <param name="Body">
/// (Optional)Der neue Inhalt des E-Mail-Textkörpers. Wenn null, bleibt der vorhandene Inhalt unverändert.
/// </param>
/// <param name="Subject">
/// (Optional) Der neue Betreff der E-Mail. Wenn null, bleibt der vorhandene Betreff unverändert.
/// </param>
public record UpdateEmailTemplateCommand(string? Body = null, string? Subject = null)
{
/// <param>
/// Die Abfrage, die die E-Mail-Vorlage darstellt, die aktualisiert werden soll.
/// </param>
[JsonIgnore]
public EmailTemplateQuery? EmailTemplateQuery { get; set; }
}

View File

@@ -0,0 +1,24 @@
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.EmailTemplates;
/// <summary>
/// Repräsentiert eine Abfrage für E-Mail-Vorlagen, die für Absender und Empfänger von Umschlägen verwendet werden.
/// Die Standardkultur ist "de-DE".
/// </summary>
/// <param name="Id">Die eindeutige Kennung der E-Mail-Vorlage (optional).</param>
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional). Beispiele:
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
/// </param>
public record EmailTemplateQuery(int? Id = null, Constants.EmailTemplateType? Type = null)
{
}

View File

@@ -0,0 +1,10 @@
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
/// <summary>
/// Stellt eine Abfrage dar, um eine E-Mail-Vorlage zu lesen.
/// Diese Klasse erbt von <see cref="EmailTemplateQuery"/>.
/// </summary>
public record ReadEmailTemplateQuery : EmailTemplateQuery
{
}

View File

@@ -0,0 +1,20 @@
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
/// <summary>
/// Stellt die Antwort für eine Abfrage von E-Mail-Vorlagen bereit.
/// </summary>
/// <param name="Id">Die eindeutige Kennung der E-Mail-Vorlage.</param>
/// <param name="Type">Der Typ der E-Mail-Vorlage.</param>
/// <param name="AddedWhen">Das Datum und die Uhrzeit, wann die Vorlage hinzugefügt wurde.</param>
/// <param name="Body">Der Inhalt (Body) der E-Mail-Vorlage. Kann null sein.</param>
/// <param name="Subject">Der Betreff der E-Mail-Vorlage. Kann null sein.</param>
/// <param name="ChangedWhen">Das Datum und die Uhrzeit, wann die Vorlage zuletzt geändert wurde. Kann null sein.</param>
public record ReadEmailTemplateResponse(
int Id,
int Type,
DateTime AddedWhen,
string? Body = null,
string? Subject = null,
DateTime? ChangedWhen = null)
{
}

View File

@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
@@ -11,23 +13,23 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.4.3" />
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.0.0" />
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
<PackageReference Include="Otp.NET" Version="1.4.0" />
<PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
<PackageReference Include="UserManager.Application" Version="2.0.0" />
<PackageReference Include="UserManager.Infrastructure" Version="2.0.0" />
<PackageReference Include="UserManager" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj" />
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
<ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
@@ -57,4 +59,25 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="CommandDotNet">
<Version>7.0.5</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="AutoMapper" Version="14.0.0" />
<PackageReference Include="CommandDotNet">
<Version>8.1.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="AutoMapper" Version="14.0.0" />
<PackageReference Include="CommandDotNet">
<Version>8.1.1</Version>
</PackageReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,59 @@
using MediatR;
using System.ComponentModel.DataAnnotations;
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
/// <summary>
/// Befehl zur Erstellung eines Umschlags.
/// </summary>
/// <param name="Title">Der Titel des Umschlags. Dies ist ein Pflichtfeld.</param>
/// <param name="Message">Die Nachricht, die im Umschlag enthalten sein soll. Dies ist ein Pflichtfeld.</param>
/// <param name="Document">Das mit dem Umschlag verknüpfte Dokument. Dies ist ein Pflichtfeld.</param>
/// <param name="Receivers">Eine Sammlung von Empfängern, die den Umschlag erhalten. Dies ist ein Pflichtfeld.</param>
/// <param name="TFAEnabled">Gibt an, ob die Zwei-Faktor-Authentifizierung für den Umschlag aktiviert ist. Standardmäßig false.</param>
public record CreateEnvelopeReceiverCommand(
[Required] string Title,
[Required] string Message,
[Required] DocumentCreateCommand Document,
[Required] IEnumerable<ReceiverGetOrCreateCommand> Receivers,
bool TFAEnabled = false
) : IRequest;
#region DTOs
/// <summary>
/// Signaturposition auf einem Dokument.
/// </summary>
/// <param name="X">X-Position</param>
/// <param name="Y">Y-Position</param>
/// <param name="Page">Seite, auf der sie sich befindet</param>
public record Signature([Required] int X, [Required] int Y, [Required] int Page);
/// <summary>
/// DTO für Empfänger, die erstellt oder abgerufen werden sollen.
/// Wenn nicht, wird sie erstellt und mit einer Signatur versehen.
/// </summary>
/// <param name="Signatures">Unterschriften auf Dokumenten.</param>
/// <param name="Salution">Der Name, mit dem der Empfänger angesprochen werden soll. Bei Null oder keinem Wert wird der zuletzt verwendete Name verwendet.</param>
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
{
private string _emailAddress = string.Empty;
/// <summary>
/// E-Mail-Adresse des Empfängers.
/// </summary>
[Required]
public required string EmailAddress { get => _emailAddress.ToLower(); init => _emailAddress = _emailAddress.ToLower(); }
};
/// <summary>
/// DTO zum Erstellen eines Dokuments.
/// </summary>
/// <param name="DataAsByte">
/// Die Dokumentdaten im Byte-Array-Format. Wird verwendet, wenn das Dokument als Roh-Binärdaten bereitgestellt wird.
/// </param>
/// <param name="DataAsBase64">
/// Die Dokumentdaten im Base64-String-Format. Wird verwendet, wenn das Dokument als Base64-codierter String bereitgestellt wird.
/// </param>
public record DocumentCreateCommand(byte[]? DataAsByte = null, string? DataAsBase64 = null);
#endregion

View File

@@ -0,0 +1,47 @@
using EnvelopeGenerator.Application.Histories;
namespace EnvelopeGenerator.Application.EnvelopeReceivers;
/// <summary>
/// Stellt eine Abfrage für einen Envelope-Empfänger dar.
/// </summary>
/// <param name="Status">Der Status der Abfrage, optional.</param>
public record EnvelopeReceiverQuery(EnvelopeStatusQuery? Status = null);
/// <summary>
/// Repräsentiert den Status eines Umschlags und dessen Beziehung zum Empfänger. (vgl. auch <see cref="Common.Constants.EnvelopeStatus"/>
/// Invalid (0): Ungültiger Status.
/// EnvelopeCreated (1001): Der Umschlag wurde erstellt.
/// EnvelopeSaved (1002): Der Umschlag wurde gespeichert.
/// EnvelopeQueued (1003): Der Umschlag wurde zur Verarbeitung eingeplant.
/// EnvelopeSent (1004): Der Umschlag wurde versendet. (Nicht verwendet)
/// EnvelopePartlySigned (1005): Der Umschlag wurde teilweise unterschrieben.
/// EnvelopeCompletelySigned (1006): Der Umschlag wurde vollständig unterschrieben.
/// EnvelopeReportCreated (1007): Ein Abschlussbericht wurde für den Umschlag erstellt.
/// EnvelopeArchived (1008): Der Umschlag wurde archiviert.
/// EnvelopeDeleted (1009): Der Umschlag wurde gelöscht.
/// AccessCodeRequested (2001): Der Zugriffscode wurde angefordert.
/// AccessCodeCorrect (2002): Der Zugriffscode war korrekt.
/// AccessCodeIncorrect (2003): Der Zugriffscode war falsch.
/// DocumentOpened (2004): Das Dokument wurde geöffnet.
/// DocumentSigned (2005): Ein Dokument wurde unterschrieben.
/// SignatureConfirmed (2006): Die Signatur wurde bestätigt.
/// DocumentRejected (2007): Ein Dokument wurde abgelehnt.
/// EnvelopeShared (2008): Der Umschlag wurde geteilt.
/// EnvelopeViewed (2009): Der Umschlag wurde angesehen.
/// DocumentForwarded (4001): Das Dokument wurde weitergeleitet.
/// MessageInvitationSent (3001): Einladung wurde gesendet (vom Trigger verwendet).
/// MessageAccessCodeSent (3002): Zugriffscode wurde gesendet.
/// MessageConfirmationSent (3003): Bestätigungsnachricht wurde gesendet.
/// MessageDeletionSent (3004): Löschbenachrichtigung wurde gesendet.
/// MessageCompletionSent (3005): Abschlussbenachrichtigung wurde gesendet.
/// <param name="Min">Der minimale Statuswert, der berücksichtigt werden soll.</param>
/// <param name="Max">Der maximale Statuswert, der berücksichtigt werden soll.</param>
/// <param name="Ignore">Eine Liste von Statuswerten, die ignoriert werden sollen.</param>
/// </summary>
public record EnvelopeStatusQuery(
int? Min = null,
int? Max = null,
int[]? Ignore = null)
{
}

View File

@@ -0,0 +1,30 @@
using EnvelopeGenerator.Application.Histories;
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
using EnvelopeGenerator.Application.Receivers.Queries.Read;
using MediatR;
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Queries.Read;
/// <summary>
/// Repräsentiert eine Abfrage zum Lesen eines Envelope-Empfängers.
/// </summary>
/// <remarks>
/// Diese Abfrage kombiniert Informationen über einen Umschlag (<see cref="ReadEnvelopeQuery"/>)
/// und einen Empfänger (<see cref="ReadReceiverQuery"/>), um eine vollständige Antwort
/// (<see cref="ReadEnvelopeReceiverResponse"/>) zu generieren.
/// Die Antwort enthält Details wie den Status, die Zuordnung zwischen Umschlag und Empfänger
/// sowie zusätzliche Metadaten.
/// </remarks>
/// <param name="Status">Umschlag oder Empfängerstatus.</param>
public record ReadEnvelopeReceiverQuery(EnvelopeStatusQuery? Status = null) : EnvelopeReceiverQuery(Status), IRequest<ReadEnvelopeReceiverResponse>
{
/// <summary>
/// Der Umschlag, der mit dem Empfänger verknüpft ist.
/// </summary>
public ReadEnvelopeQuery? Envelope { get; init; }
/// <summary>
/// Der Empfänger, der mit dem Umschlag verknüpft ist.
/// </summary>
public ReadReceiverQuery? Receiver { get; init; }
};

View File

@@ -0,0 +1,94 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
using EnvelopeGenerator.Application.Receivers.Queries.Read;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Queries.Read;
/// <summary>
/// Repräsentiert die Antwort für das Lesen eines Envelope-Empfängers.
/// </summary>
/// <remarks>
/// Diese Klasse enthält Informationen über einen spezifischen Empfänger eines Umschlags (Envelope).
/// Sie verknüpft die Empfängerinformationen mit den zugehörigen Umschlagsdaten und bietet zusätzliche Metadaten.
/// </remarks>
/// <param name="UserId">Die eindeutige Kennung des Benutzers, der den Empfänger erstellt hat.</param>
/// <param name="Status">Der Status des Empfängers als numerischer Wert.</param>
public record ReadEnvelopeReceiverResponse(int UserId, int Status)
{
/// <summary>
/// Gibt die zusammengesetzte Kennung des Empfängers zurück, bestehend aus der Umschlags-ID und der Empfänger-ID.
/// </summary>
/// <remarks>
/// Diese Eigenschaft kombiniert die eindeutige Kennung des Umschlags (EnvelopeId) und die des Empfängers (ReceiverId)
/// zu einer einzigen, leicht zugänglichen Struktur.
/// </remarks>
[NotMapped]
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
/// <summary>
/// Die eindeutige Kennung des zugehörigen Umschlags.
/// </summary>
[Required]
public int EnvelopeId { get; init; }
/// <summary>
/// Die eindeutige Kennung des Empfängers.
/// </summary>
[Required]
public int ReceiverId { get; init; }
/// <summary>
/// Die Reihenfolge des Empfängers innerhalb des Umschlags.
/// </summary>
public int Sequence { get; init; }
/// <summary>
/// Der Name des Empfängers. Kann als Platzhalter verwendet werden.
/// </summary>
[TemplatePlaceholder("[NAME_RECEIVER]")]
public string? Name { get; init; }
/// <summary>
/// Die Berufsbezeichnung des Empfängers.
/// </summary>
public string? JobTitle { get; init; }
/// <summary>
/// Der Firmenname des Empfängers.
/// </summary>
public string? CompanyName { get; init; }
/// <summary>
/// Eine private Nachricht, die mit dem Empfänger verknüpft ist.
/// </summary>
public string? PrivateMessage { get; init; }
/// <summary>
/// Das Datum und die Uhrzeit, wann der Empfänger hinzugefügt wurde.
/// </summary>
public DateTime AddedWhen { get; init; }
/// <summary>
/// Das Datum und die Uhrzeit, wann der Empfänger zuletzt geändert wurde (falls vorhanden).
/// </summary>
public DateTime? ChangedWhen { get; init; }
/// <summary>
/// Gibt an, ob der Empfänger eine Telefonnummer hat.
/// </summary>
public bool HasPhoneNumber { get; init; }
/// <summary>
/// Die zugehörigen Umschlagsdaten.
/// </summary>
[Required]
public required ReadEnvelopeResponse Envelope { get; init; }
/// <summary>
/// Die Liste der Empfängerinformationen.
/// </summary>
[Required]
public IEnumerable<ReadReceiverResponse> Receiver { get; init; } = new List<ReadReceiverResponse>();
}

View File

@@ -0,0 +1,16 @@
using MediatR;
namespace EnvelopeGenerator.Application.Envelopes;
/// <summary>
/// Repräsentiert eine Abfrage für Umschläge.
/// </summary>
/// <param name="Id">Die eindeutige Kennung des Umschlags.</param>
/// <param name="Status">Der Status des Umschlags.</param>
/// <param name="Uuid">Die universell eindeutige Kennung des Umschlags.</param>
public record EnvelopeQuery(
int? Id = null,
int? Status = null,
string? Uuid = null) : IRequest
{
};

View File

@@ -0,0 +1,8 @@
namespace EnvelopeGenerator.Application.Envelopes.Queries.Read;
/// <summary>
/// Stellt eine Abfrage zum Lesen von Briefumschlägen dar.
/// </summary>
public record ReadEnvelopeQuery : EnvelopeQuery
{
}

View File

@@ -0,0 +1,36 @@
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Envelopes.Queries.Read;
/// <summary>
/// Repräsentiert die Antwort für das Lesen eines Umschlags.
/// </summary>
/// <param name="Id">Die eindeutige Kennung des Umschlags.</param>
/// <param name="UserId">Die Kennung des Benutzers, der den Umschlag erstellt hat.</param>
/// <param name="Status">Der Status des Umschlags als numerischer Wert.</param>
/// <param name="Uuid">Die universelle eindeutige Kennung (UUID) des Umschlags.</param>
/// <param name="Message">Eine optionale Nachricht, die mit dem Umschlag verknüpft ist.</param>
/// <param name="AddedWhen">Das Datum und die Uhrzeit, wann der Umschlag hinzugefügt wurde.</param>
/// <param name="ChangedWhen">Das Datum und die Uhrzeit, wann der Umschlag zuletzt geändert wurde (falls vorhanden).</param>
/// <param name="Title">Ein optionaler Titel des Umschlags.</param>
/// <param name="Language">Die Sprache, die mit dem Umschlag verknüpft ist.</param>
/// <param name="TFAEnabled">Gibt an, ob die Zwei-Faktor-Authentifizierung (TFA) aktiviert ist.</param>
/// <param name="User">Das Benutzerobjekt, das mit dem Umschlag verknüpft ist.</param>
public record ReadEnvelopeResponse(
int Id,
int UserId,
int Status,
string Uuid,
string? Message,
DateTime AddedWhen,
DateTime? ChangedWhen,
string? Title,
string Language,
bool TFAEnabled,
DigitalData.UserManager.Domain.Entities.User User)
{
/// <summary>
/// Gibt den Namen des Status zurück, der dem numerischen Statuswert entspricht.
/// </summary>
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
}

View File

@@ -0,0 +1,13 @@
using EnvelopeGenerator.Application.Receivers.Queries.Read;
namespace EnvelopeGenerator.Application.Envelopes.Queries.ReceiverName;
/// <summary>
/// Eine Abfrage, um die zuletzt verwendete Anrede eines Empfängers zu ermitteln,
/// damit diese für zukünftige Umschläge wiederverwendet werden kann.
/// </summary>
/// <param name="Envelope">Der Umschlag, für den die Anrede des Empfängers ermittelt werden soll.</param>
/// <param name="OnlyLast">Gibt an, ob nur die zuletzt verwendete Anrede zurückgegeben werden soll.</param>
public record ReadReceiverNameQuery(EnvelopeQuery? Envelope = null, bool OnlyLast = true) : ReadReceiverQuery
{
}

View File

@@ -0,0 +1,20 @@
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
using EnvelopeGenerator.Application.Receivers.Queries.Read;
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
/// <summary>
/// Repräsentiert eine Abfrage für die Verlaufshistorie eines Umschlags.
/// </summary>
/// <param name="EnvelopeId">Die eindeutige Kennung des Umschlags.</param>
/// <param name="Envelope">Die Abfrage, die den Umschlag beschreibt.</param>
/// <param name="Receiver">Die Abfrage, die den Empfänger beschreibt.</param>
/// <param name="Related">Abfrage, die angibt, worauf sich der Datensatz bezieht. Ob er sich auf den Empfänger, den Sender oder das System bezieht, wird durch 0, 1 bzw. 2 dargestellt.</param>
/// <param name="OnlyLast">Abfrage zur Steuerung, ob nur der aktuelle Status oder der gesamte Datensatz zurückgegeben wird.</param>
public record ReadHistoryQuery(
int EnvelopeId,
ReadEnvelopeQuery? Envelope = null,
ReadReceiverQuery? Receiver = null,
Constants.ReferenceType? Related = null,
bool? OnlyLast = true);

View File

@@ -1,64 +0,0 @@
using AutoMapper;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Application.Extensions;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.MappingProfiles
{
public class BasicDtoMappingProfile : Profile
{
public BasicDtoMappingProfile()
{
// Entity to DTO mappings
CreateMap<Config, ConfigDto>();
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
CreateMap<DocumentStatus, DocumentStatusDto>();
CreateMap<EmailTemplate, EmailTemplateDto>();
CreateMap<Envelope, EnvelopeDto>();
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
CreateMap<EnvelopeHistory, EnvelopeHistoryDto>();
CreateMap<EnvelopeHistory, EnvelopeHistoryCreateDto>();
CreateMap<EnvelopeReceiver, EnvelopeReceiverDto>();
CreateMap<EnvelopeReceiver, EnvelopeReceiverSecretDto>();
CreateMap<EnvelopeType, EnvelopeTypeDto>();
CreateMap<Receiver, ReceiverReadDto>();
CreateMap<Receiver, ReceiverCreateDto>();
CreateMap<Receiver, ReceiverUpdateDto>();
CreateMap<UserReceiver, UserReceiverDto>();
CreateMap<EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
// DTO to Entity mappings
CreateMap<ConfigDto, Config>();
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
CreateMap<DocumentStatusDto, DocumentStatus>();
CreateMap<EmailTemplateDto, EmailTemplate>();
CreateMap<EnvelopeDto, Envelope>();
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
CreateMap<EnvelopeHistoryDto, EnvelopeHistory>();
CreateMap<EnvelopeHistoryCreateDto, EnvelopeHistory>();
CreateMap<EnvelopeReceiverDto, EnvelopeReceiver>();
CreateMap<EnvelopeTypeDto, EnvelopeType>();
CreateMap<ReceiverReadDto, Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
CreateMap<ReceiverCreateDto, Receiver>();
CreateMap<ReceiverUpdateDto, Receiver>();
CreateMap<UserReceiverDto, UserReceiver>();
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
CreateMap<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnly>();
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly>();
// Messaging mappings
// for GTX messaging
CreateMap<GtxMessagingResponse, SmsResponse>()
.ConstructUsing(gtxRes => gtxRes.Ok()
? new SmsResponse() { Ok = true }
: new SmsResponse() { Ok = false, Errors = gtxRes });
}
}
}

View File

@@ -0,0 +1,10 @@
namespace EnvelopeGenerator.Application.Receivers.Queries.Read;
/// <summary>
/// Stellt eine Abfrage dar, um die Details eines Empfängers zu lesen.
/// Diese Abfrage erbt von <see cref="ReceiverQuery"/> und wird verwendet,
/// um spezifische Informationen über einen Empfänger abzurufen.
/// </summary>
public record ReadReceiverQuery : ReceiverQuery
{
}

View File

@@ -0,0 +1,12 @@
namespace EnvelopeGenerator.Application.Receivers.Queries.Read;
/// <summary>
/// Repräsentiert die Antwort auf eine Abfrage, um einen Empfänger zu lesen.
/// </summary>
/// <param name="Id">Die eindeutige Identifikationsnummer des Empfängers.</param>
/// <param name="EmailAddress">Die E-Mail-Adresse des Empfängers.</param>
/// <param name="AddedWhen">Das Datum und die Uhrzeit, wann der Empfänger hinzugefügt wurde.</param>
/// <param name="Signature">Die Signatur des Empfängers.</param>
public record ReadReceiverResponse(int Id, string EmailAddress, DateTime AddedWhen, string Signature)
{
}

View File

@@ -0,0 +1,9 @@
namespace EnvelopeGenerator.Application.Receivers;
/// <summary>
/// Empfänger des Umschlags
/// </summary>
/// <param name="Id">ID des Empfängers</param>
/// <param name="EmailAddress">E-Mail Adresse des Empfängers</param>
/// <param name="Signature">Eindeutige Signatur des Empfängers</param>
public record ReceiverQuery(int? Id = null, string? EmailAddress = null, string? Signature = null);

View File

@@ -1,5 +1,5 @@
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Contracts.Services;
using Microsoft.Extensions.Options;
using OtpNet;
using QRCoder;

View File

@@ -1,33 +1,33 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Contracts.Repositories;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
namespace EnvelopeGenerator.Application.Services
namespace EnvelopeGenerator.Application.Services;
public class ConfigService : ReadService<IConfigRepository, ConfigDto, Config, int>, IConfigService
{
public class ConfigService : ReadService<IConfigRepository, ConfigDto, Config, int>, IConfigService
{
private static readonly Guid DefaultConfigCacheId = Guid.NewGuid();
private readonly IMemoryCache _cache;
private readonly ILogger<ConfigService> _logger;
private readonly ILogger<ConfigService> _logger;
public ConfigService(IConfigRepository repository, IMapper mapper, IMemoryCache memoryCache, ILogger<ConfigService> logger) : base(repository, mapper)
{
{
_cache = memoryCache;
_logger = logger;
}
_logger = logger;
}
public async Task<DataResult<ConfigDto>> ReadFirstAsync()
{
var config = await _repository.ReadFirstAsync();
return config is null
? Result.Fail<ConfigDto>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, "There is no configuration in DB.")
: Result.Success(_mapper.Map<ConfigDto>(config));
}
public async Task<DataResult<ConfigDto>> ReadFirstAsync()
{
var config = await _repository.ReadFirstAsync();
return config is null
? Result.Fail<ConfigDto>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, "There is no configuration in DB.")
: Result.Success(_mapper.Map<ConfigDto>(config));
}
/// <summary>
/// Reads the default configuration asynchronously.
@@ -43,18 +43,17 @@ namespace EnvelopeGenerator.Application.Services
/// Thrown when the default configuration cannot be found.
/// </exception>
public async Task<ConfigDto> ReadDefaultAsync()
{
var config = await _cache.GetOrCreateAsync(DefaultConfigCacheId, _ => ReadFirstAsync().ThenAsync(
Success: config => config,
Fail: (mssg, ntc) =>
{
_logger.LogNotice(ntc);
throw new InvalidOperationException("Default configuration cannot find.");
}));
{
var config = await _cache.GetOrCreateAsync(DefaultConfigCacheId, _ => ReadFirstAsync().ThenAsync(
Success: config => config,
Fail: (mssg, ntc) =>
{
_logger.LogNotice(ntc);
throw new InvalidOperationException("Default configuration cannot find.");
}));
return config!;
}
public async Task<string> ReadDefaultSignatureHost() => (await ReadDefaultAsync()).SignatureHost;
return config!;
}
public async Task<string> ReadDefaultSignatureHost() => (await ReadDefaultAsync()).SignatureHost;
}

View File

@@ -1,17 +1,16 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Application.Services
namespace EnvelopeGenerator.Application.Services;
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, DocumentReceiverElementDto, DocumentReceiverElement, int>, IDocumentReceiverElementService
{
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, DocumentReceiverElementDto, DocumentReceiverElement, int>, IDocumentReceiverElementService
public DocumentReceiverElementService(IDocumentReceiverElementRepository repository, IMapper mapper)
: base(repository, mapper)
{
public DocumentReceiverElementService(IDocumentReceiverElementRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -1,17 +1,16 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Application.Services
namespace EnvelopeGenerator.Application.Services;
public class DocumentStatusService : BasicCRUDService<IDocumentStatusRepository, DocumentStatusDto, DocumentStatus, int>, IDocumentStatusService
{
public class DocumentStatusService : BasicCRUDService<IDocumentStatusRepository, DocumentStatusDto, DocumentStatus, int>, IDocumentStatusService
public DocumentStatusService(IDocumentStatusRepository repository, IMapper mapper)
: base(repository, mapper)
{
public DocumentStatusService(IDocumentStatusRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -1,30 +1,29 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Contracts.Repositories;
using static EnvelopeGenerator.Common.Constants;
using DigitalData.Core.DTO;
using Microsoft.Extensions.Logging;
using EnvelopeGenerator.Application.Contracts.Services;
namespace EnvelopeGenerator.Application.Services
namespace EnvelopeGenerator.Application.Services;
public class EmailTemplateService : BasicCRUDService<IEmailTemplateRepository, EmailTemplateDto, EmailTemplate, int>, IEmailTemplateService
{
public class EmailTemplateService : BasicCRUDService<IEmailTemplateRepository, EmailTemplateDto, EmailTemplate, int>, IEmailTemplateService
public EmailTemplateService(IEmailTemplateRepository repository, IMapper mapper)
: base(repository, mapper)
{
public EmailTemplateService(IEmailTemplateRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
public async Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type)
{
var temp = await _repository.ReadByNameAsync(type);
return temp is null
? Result.Fail<EmailTemplateDto>()
.Message(Key.InnerServiceError)
.Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"EmailTemplateType '{type}' is not found in DB. Please, define required e-mail template.")
: Result.Success(_mapper.Map<EmailTemplateDto>(temp));
}
public async Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type)
{
var temp = await _repository.ReadByNameAsync(type);
return temp is null
? Result.Fail<EmailTemplateDto>()
.Message(Key.InnerServiceError)
.Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"EmailTemplateType '{type}' is not found in DB. Please, define required e-mail template.")
: Result.Success(_mapper.Map<EmailTemplateDto>(temp));
}
}

View File

@@ -1,19 +1,17 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Application.Contracts.Repositories;
using EnvelopeGenerator.Application.Contracts.Services;
namespace EnvelopeGenerator.Application.Services
namespace EnvelopeGenerator.Application.Services;
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
{
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
: base(repository, mapper)
{
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

Some files were not shown because too many files have changed in this diff Show More