- Updated `EnvelopeGenerator.Extensions.csproj` to include
`Microsoft.Extensions.Caching.Memory` package.
- Refactored `HistoryController` to use `IMemoryCache` for
caching functionality.
- Replaced manual dictionary creation in `GetReferenceTypes`
with a call to `GetEnumAsDictionary<ReferenceType>()`.
- Changed enum type in `GetEnvelopeStatus` to
`ReferenceType` for consistency.
- Introduced `MemoryCacheExtensions` class with
`GetEnumAsDictionary<TEnum>` method for efficient enum
to dictionary conversion.
Introduce new extension methods in `ControllerExtensions` to safely extract user information from a `ClaimsPrincipal`. Updated methods for ID, username, surname, given name, and email to return `null` if not found, enhancing flexibility. Updated `EnvelopeReceiverController` to utilize these new methods for improved handling of absent user claims.
- Removed default email assignment in Signature record.
- Eliminated unused using directive in EnvelopeReceiverController.
- Added new parameters for document execution and connection string options in the controller's constructor.
Introduced `ResetEmailTemplateCommand` and `ResetEmailTemplateCommandHandler`, replacing the previous `ResetEnvelopeTemplateCommand` and its handler. Updated the controller to utilize the new command, ensuring consistent mapping and command sending.
- Added using directive for EnvelopeGenerator.Application.SQL.
- Updated SQL command formatting to use ToSqlParam() for improved security against SQL injection.
- Modified history creation SQL command to use string interpolation for parameters.
- Removed explicit parameter addition, streamlining SQL parameter handling.
Updated the SQL command execution in `EnvelopeReceiverController.cs` to use a formatted SQL string with `string.Format` instead of parameterized commands. This change simplifies command preparation but may increase the risk of SQL injection if input values are not properly sanitized.
Updated `CreateEnvelopeReceiverResponse` and `EnvelopeReceiverController` to rename `SentRecipients` to `SentReceiver` and `UnsentRecipients` to `UnsentReceivers`. Adjusted corresponding lists and mappings to ensure uniformity in naming conventions across the codebase.
- Updated SQL query in `EnvelopeReceiverAddReadSQL.cs` to select specific columns (`ENVELOPE_ID` and `RECEIVER_ID`) for improved performance and clarity.
- Changed mapping of `SentRecipients` in `EnvelopeReceiverController.cs` to expect a single `ReceiverReadDto` instead of a collection, reflecting a change in data handling.
- Modified `QueryAsync` in `EnvelopeReceiverExecutor.cs` to remove the generic type parameter, allowing for more flexible data handling.
- Updated `ReceiverGetOrCreateCommand` to include a required `IEnumerable<Signature>`.
- Modified `DocumentCreateCommand` to remove `DataAsByte` and enforce a required `DataAsBase64` property with immutability.
- Cleaned up SQL command formatting in `EnvelopeReceiverAddReadSQL`.
- Simplified document validation logic in `EnvelopeReceiverController` by removing redundant checks.
- Changed hardcoded connection string to a variable `_cnnStr` for improved security and flexibility.
- Added `System.ComponentModel` and `System.ComponentModel.DataAnnotations.Schema` using directives for enhanced data annotation support.
- Applied the `[NonAction]` attribute to the `CreateAsync` method to prevent it from being treated as an action method by the ASP.NET MVC framework.
Updated the `EnvelopeGenerator.GeneratorAPI.csproj` file to reflect the new versioning information, changing `Version`, `FileVersion`, and `AssemblyVersion` from `1.2.0` to `1.2.1`.
Updated the `EnvelopeReceiverController` to include a new region for creating history. Added a SQL command to insert a history state into the database, established a database connection, and executed the command within a `using` block. The result is read to check for success, and the method now returns an `Ok` response with the result.
- Changed `Signature` properties from `int` to `double` for precise positioning.
- Added necessary using directives in `EnvelopeReceiverController.cs` for database operations.
- Introduced a private `_cnnStr` field in `EnvelopeReceiverController` to store the connection string.
- Updated the constructor to accept `IOptions<ConnectionString>` for dependency injection of the connection string.
- Added a SQL command block to handle document element additions using a stored procedure.
- Configured the `ConnectionString` class in `Program.cs` to bind the connection string from app settings.
- Created a new `ConnectionString` class to manage the connection string value.
Updated the `DocumentCreateCommand` record to include a nullable `DataAsBase64` property for better encapsulation. Enhanced the `EnvelopeReceiverController` with logic to validate document data, ensuring that either `DataAsBase64` or `DataAsByte` is provided, but not both. Introduced a new static method `IsBase64String` to validate base64 string format.
Updated `EnvelopeReceiverController` with new regions for
creating envelopes and managing recipients, improving code
readability. Added service registration for `IDocumentExecutor`
in `DependencyExtensions.cs` to enhance document management.
- Updated EmailTemplateDto to allow mutable Body and Subject properties.
- Implemented IRequest interface in UpdateEmailTemplateCommand for MediatR.
- Enhanced error handling in EmailTemplateController with NotFoundException.
- Introduced UpdateEmailTemplateCommandHandler for processing update commands.
- Added NotFoundException class for improved error handling.
Updated namespace for `ResetEnvelopeTemplateCommand` and added default values for constructor parameters. Enhanced `EmailTemplateController` by making the `Update` method asynchronous, adding error handling, and incorporating a `try-catch` block for improved responsiveness and error management.
Updated the success handler to filter envelopes by Id, Status, and Uuid based on the provided envelope object. The method now returns the specific envelope instead of a list of envelopes.
Updated IEnvelopeReceiverService to include EnvelopeQuery and ReadReceiverQuery in ReadByUsernameAsync for improved filtering capabilities. Modified EnvelopeReceiverService to implement these changes, allowing for more precise data retrieval. Updated EnvelopeReceiverController to pass the new parameters when calling the service method.
Updated the `ReadByUsernameAsync` method in the `EnvelopeReceiverController` to accept additional parameters: `min_status`, `max_status`, and `ignore_statuses`. These parameters are now derived from the `envelopeReceiver` object, allowing for improved status filtering when retrieving records by username.
- Changed `EnvelopeId` in `ReadHistoryQuery` to nullable
for improved flexibility in queries.
- Introduced `withReceiver` variable in `HistoryController`
to enhance query logic for retrieving history records.
- Updated `EnvelopeHistoryRepository` to use `AsNoTracking()`
for better performance in read-only scenarios.
Updated the Get method to check for receiver.Id along with EmailAddress and Signature.
If Id is provided, it attempts to read by ID and returns NotFound if not found.
If Id is not provided, it falls back to reading by EmailAddress and Signature,
now also returning NotFound instead of a 500 error for missing receivers.
- Updated `ReadEmailTemplateQuery` to implement `IRequest<ReadEmailTemplateResponse?>`.
- Changed `ReadEmailTemplateResponse` from a record to a class with updated properties.
- Enhanced `EmailTemplateController` to inject `IEmailTemplateRepository` and `IMediator`, and made the `Get` method asynchronous.
- Introduced `ReadEmailTemplateMappingProfile` for AutoMapper mappings.
- Added `ReadEmailTemplateQueryHandler` to manage query logic and response mapping.
These changes improve the structure and maintainability of the email template querying process.
- Updated DependencyInjection to include new command handler.
- Modified CreateEnvelopeReceiverCommand for nullable responses.
- Altered SQL command in EnvelopeReceiverAddReadSQL.
- Refactored EnvelopeReceiverController with new dependencies and improved CreateAsync method.
- Expanded appsettings.json with additional configuration settings.
- Introduced new DTOs for signatures and receivers in CreateEnvelopeReceiverDtos.
This commit replaces the `AddEnvelopeGeneratorRepositories` method with `AddEnvelopeGeneratorInfrastructureServices`, allowing for more flexible configuration through `IConfiguration` and `Action<SQLExecutorParams>`. The `SQLExecutor` class now utilizes `SQLExecutorParams` for its connection string, enhancing configurability. A new `SQLExecutorParams` class has been introduced to encapsulate connection string management. Various service registration calls have been updated to integrate the new infrastructure services, improving modularity and ease of database connection management.
- Updated `ISQLExecutor<TEntity>` to inherit from new `ISQLExecutor` interface for improved SQL execution flexibility.
- Added package references for `Dapper` and `DigitalData.Core` in project files.
- Modified `CreateEnvelopeCommand` to include `[BindNever]` on `UserId` for better model binding control.
- Refactored `CreateEnvelopeCommandHandler` to use `DynamicParameters` for SQL parameter handling.
- Updated `CreateEnvelopeSQL` to select only the top record for performance.
- Introduced `GetIdOrDefault` method in `ControllerExtensions` for user ID retrieval with fallback.
- Added `CreateAsync` method in `EnvelopeController` for envelope creation using `IMediator`.
- Ensured infrastructure project has necessary package references.
- Refactored `SQLExecutor` to implement new interface and simplified constructor.
- Introduced `SQLExecutorBaseEntity` for entity-specific SQL command execution.
– Die Login-Methoden wurden überarbeitet, um NotImplementedException auszulösen und OpenAPI (Swagger) und Skalar zu konfigurieren.
– Unnötige using-Anweisungen wurden entfernt, um den Code zu optimieren.
- Integrated JWT Bearer authentication for API security.
- Replaced previous CookieAuthenticationDefaults with JwtBearerDefaults as the default authentication scheme.
- Configured JWT token validation with issuer, audience, and signing key parameters.
- Added handling for token retrieval from cookies or query strings when missing in the header.
- Updated the authentication configuration to support both Cookie and JWT authentication schemes.
- Enhanced security by validating JWT tokens against provided public keys.
- 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.
Changed target frameworks in `EnvelopeGenerator.GeneratorAPI.csproj` to only `net9.0`. Removed unused `using System.Reflection;` directive in `Program.cs` to streamline the code.
- 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.
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.
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.
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.