Add strongly typed notification records for remaining email templates that do not require document URL composition.
Each record maps template placeholders to explicit properties and returns the matching EmailTemplateType.
Also includes XML documentation so placeholder-to-property mapping is self-describing.
Replaced raw `int` values with the strongly-typed `FinalEmailType`
enum for `FinalEmailToCreator` and `FinalEmailToReceivers` across
the codebase. Updated DTOs, entities, commands, handlers, Razor
components, and test controllers to reflect this change.
This improves type safety, code readability, and maintainability.
Default values now use `FinalEmailType.No` instead of integer
casting. Adjusted database mappings and added necessary imports
to support the new enum type.
Updated `EnvelopeDto` to use `EnvelopeTypeDefaultsDto` for the `Defaults` property, decoupling domain entities from external layers.
Refactored `IEnvelopeTypeRepository`, `IEnvelopeTypeService`, and `EnvelopeTypeService` to use `EnvelopeType` as the identifier type instead of `int`, improving domain specificity and consistency.
Introduced caching in `EnvelopeTypeService` with a static `CacheKey` and `IMemoryCache` dependency for performance optimization.
Aligned `EnvelopeTypeRepository` with the updated identifier type and repository interface.
Replaced all instances of `EnvelopeTypeId` (int/int?) with `Type`
(EnvelopeType/EnvelopeType?) across the codebase to improve type
safety and readability. Updated affected properties, methods, and
logic in DTOs, commands, handlers, and Razor components.
Introduced conditional compilation to handle differences between
.NET and .NET Framework where necessary. Removed obsolete helper
methods for `EnvelopeTypeId`. This refactor ensures consistent use
of the strongly-typed `EnvelopeType` enum, reducing the risk of
invalid values and aligning with best practices.
Removed `CertificationType` and `ContractType` properties and logic across the codebase as they were redundant. Updated `EnvelopeType` to include a validation extension method for improved data integrity. Refactored `CreateEnvelopeWizardPopup.razor` and other UI components to simplify handling of `EnvelopeType`.
Conditionally included `CertificationType` and `ContractType` for `NETFRAMEWORK` targets using `#if NETFRAMEWORK` directives to ensure compatibility. Removed unused enums, imports, and methods. Updated `CreateEnvelopeCommandHandler` and related classes to reflect these changes.
Updated the `EnvelopeDto` class to rename the `EnvelopeType` property to `Defaults` for better clarity. Updated all references to `EnvelopeType` in `SenderEditorPage.razor` to use the new `Defaults` property. This includes updates to properties such as `_sendReminderEmails`, `_firstReminderDays`, `_reminderIntervalDays`, `_expiresWhenDays`, and `_expiresWarningWhenDays`. Ensured consistent usage of the renamed property across the application.
Replaced all references to `Envelope.Type` with `Envelope.Defaults` across the application for consistency and clarity.
- Updated `MappingProfile` to map `Defaults.Title` instead of `Type.Title` for `EnvelopeTypeTitle`.
- Modified `ReadEnvelopeQueryHandler` to use `Defaults` in place of `Type` and updated query includes.
- Renamed `Type` to `Defaults` in the `Envelope` entity while preserving its foreign key relationship.
- Updated `EnvelopeModel` to retrieve `Defaults` using `EnvelopeTypeModel.GetById`.
- Refactored `frmEnvelopeMainData` to replace all `Type` references with `Defaults` and adjusted logic for `ContractType` and `EnvelopeType`.
These changes ensure consistent naming and improve code readability.
Renamed `EnvelopeTypeDto` to `EnvelopeTypeDefaultsDto` to better reflect its purpose as a DTO for default envelope type configurations.
Updated all references to `EnvelopeTypeDto` across the application, including:
- Service interfaces (`IEnvelopeTypeService`) and implementations.
- AutoMapper mappings in `MappingProfile.cs`.
- Query handlers (`ReadEnvelopeTypesQuery` and `ReadEnvelopeTypesQueryHandler`).
- Razor components (`CreateEnvelopeWizardPopup.razor`, `SenderEditorPage.razor`, `SenderPage.razor`).
- Client-side services (`EnvelopeTypeService`).
- Controller (`TestEnvelopeTypeController`).
These changes ensure consistency and clarity in naming conventions while maintaining functionality.
Replaced the `EnvelopeType` class with `EnvelopeTypeDefaults` across the codebase to standardize the data model. Updated DTOs, repositories, services, mappings, and database contexts to reflect this change.
Key updates include:
- Updated `EnvelopeDto` to use `EnvelopeTypeDefaults`.
- Modified `IEnvelopeTypeRepository` and `IEnvelopeTypeService` interfaces.
- Adjusted mappings in `MappingProfile.cs` for `EnvelopeTypeDefaults`.
- Updated `ReadEnvelopeTypesQueryHandler` and `CreateEnvelopeCommandHandler` to use `EnvelopeTypeDefaults`.
- Replaced `EnvelopeType` with `EnvelopeTypeDefaults` in `EnvelopeTypeModel.vb`, `frmEnvelopeMainData.vb`, and `EGDbContextBase`.
- Introduced the `EnvelopeTypeDefaults` class with updated schema mappings.
- Updated `EnvelopeTypeRepository` and `TestEnvelopeTypeController` to use `EnvelopeTypeDefaults`.
These changes ensure consistency and improve maintainability across the application.
Refactored `LoginSenderPage.razor` to introduce a modern layout, dynamic branding support, and enhanced validation. Updated localization files (`de-DE`, `en-US`, `fr-FR`) with new keys for improved messaging. Added client-side validation for required fields and error handling for invalid credentials.
Enabled anonymous access to `CustomImagesController` for displaying branding before authentication. Updated CSS for consistent theming and responsive design. Cleaned up redundant code and improved maintainability. Footer now dynamically displays the current year and company name.
Reduced wizard steps from 5 to 4 by merging document upload into step 3. Added a new localized hint (`SenderWizard_FinalUploadHint`) to guide users during the final document upload. Removed redundant document preview functionality and associated UI elements.
Refactored the document upload area to always remain visible on the right side of the wizard, using the `PdfFileDropZone` component. Removed the "Skip" button for optional steps and cleaned up unused methods, properties, and CSS classes.
Updated step titles and descriptions to reflect the new flow. General code cleanup to simplify logic and improve maintainability.
Introduced a "Send Confirmation" popup to improve user experience
when sending envelopes. The popup allows users to review recipients,
signature fields, and settings before confirming the send action.
- Added localized strings in `Resource.de-DE.resx`, `Resource.en-US.resx`,
and `Resource.fr-FR.resx` for confirmation messages and actions.
- Updated `SenderEditorPage.razor` to include the confirmation popup
(`DxPopup`) with body and footer templates.
- Added `RequestSendAsync` and `ConfirmSendAsync` methods to manage
the confirmation process and sending logic.
- Replaced the old success popup logic with direct navigation to the
sender dashboard after a successful send.
- Updated the toolbar button to trigger the confirmation popup.
- Styled the confirmation popup in `envelope-viewer.css`, including
support for dark themes.
- Ensured proper state management for the popup and sending process.
These changes enhance usability by providing a clear confirmation
step and progress feedback during envelope sending.
Added a confirmation popup to `SenderEditorPage.razor` for clearing all signature fields, requiring user confirmation before proceeding. Updated resource files (`Resource.de-DE.resx`, `Resource.en-US.resx`, `Resource.fr-FR.resx`) with localized confirmation messages. Modified the "Remove all signature fields" button to trigger the popup instead of directly invoking the clear action.
Introduced a new `_clearFieldsConfirmVisible` variable to manage popup visibility. Updated the `ClearAllFieldsAsync` method to close the popup before clearing fields. Added new CSS styles in `envelope-viewer.css` to style the confirmation popup and its elements.
Enhanced the `CreateEnvelopeWizardPopup` component:
- Added a new grid layout (`sender-create-wizard__body-layout`) to separate main content and side panel.
- Introduced a collapsible side panel for document upload and preview.
- Replaced old upload logic with `PdfFileDropZone` and added support for displaying document metadata (name, size) and replacement hints.
- Added asynchronous document preview rendering with `EnsureDocumentPreviewPreparedAsync`.
Localization updates:
- Added new localized strings for document upload hints in `de-DE`, `en-US`, and `fr-FR`.
CSS updates:
- Styled the new layout and side panel with transitions.
- Updated `PdfFileDropZone` styles for different states (e.g., document uploaded).
Refactored code for better maintainability and improved user feedback during document upload and preview preparation.
Updated "FinalEmailToCreator" and "FinalEmailToReceivers" text in `.resx` files to use "Completed Document" terminology in English, German, and French. Adjusted corresponding labels, tooltips, and aria-labels in `CreateEnvelopeWizardPopup.razor` to reflect these changes in German.
Added a new localization key `SenderWizard_Step_Start` to resource files for German, English, and French locales. Updated `CreateEnvelopeWizardPopup.razor` to replace `SenderWizard_Step_Basics` with `SenderWizard_Step_Start` for step 0, ensuring consistent naming of the first wizard step across the application.
Add IsReadAndConfirm to DocumentSignedNotification and derive the action, status, and final action labels from it so read-only envelopes do not report a signature.
Pass the envelope read-and-confirm mode when finalizing so the signed email matches the receiver workflow.
Send notifications via IMessagingServiceClient and PublishEmailViaSmtpCommand instead of the static EmailSender. The sender address now comes from NotificationOptions and attachments are added through the command builder.
Rename the Notify parameter to receiverEmail so the call site contract is explicit.
The private static method `ReplacePlaceHolders` was removed from `CreateEnvelopeCommandHandler.cs`. This method was used to replace placeholders in a string with values from a dictionary. Its removal indicates that this functionality is either no longer needed or has been refactored elsewhere in the codebase.
Refactored `DocumentReceivedNotification` to use new properties `Origin`, `EnvelopeUuid`, and `ReceiverSignature` for constructing `EnvelopeURL`. Updated `LinkToDocument` and `LinkToDocumentText` to derive from `EnvelopeURL`.
Simplified `CreateEnvelopeCommandHandler` with record-like syntax, removing private fields and directly injecting dependencies.
Renamed and refactored `QueueInvitationEmailsAsync` to `SendInvitationEmailsAsync`, using `EnvNtfService.Notify` for email notifications, centralizing logic and improving clarity.
Improved error handling in email sending with logging. Updated variable names for clarity and cleaned up `using` directives.
Updated the `ContractType` property in the `EnvelopeTypeDto` class from a nullable integer (`int?`) to a nullable `ContractType` enum (`ContractType?`). This change enhances type safety and clarifies the expected values for the property.
Introduce the IRequestContext interface with an Origin property
in the EnvelopeGenerator.Application.Common.Interfaces namespace.
Implement this interface in the new RequestContext class within
EnvelopeGenerator.Server.Services, using IHttpContextAccessor to
access the Origin header. Register IRequestContext with the DI
container in Program.cs using AddScoped. Update using directives
to include necessary namespaces and reorganize for clarity.
Changed the `ContractType` property in `EnvelopeDto`, `CreateEnvelopeCommandHandler`, and `Envelope` classes from a nullable `int` to a nullable `ContractType` enum. This improves type safety and consistency across the codebase by using a specific enum type instead of a generic integer. Updated logic in `CreateEnvelopeCommandHandler` to remove unnecessary casting.
Added new record types `CreateEnvelopeDocumentDto`, `CreateEnvelopeFieldDto`, and `CreateEnvelopeReceiverDto` with XML documentation in `CreateEnvelopeCommand.cs`. Marked `ConfigService` as obsolete in `CreateEnvelopeCommandHandler.cs`. Modified `CertificationType` usage in `Fake.cs` to use the enum directly. Updated `EnvelopeGenerator.Tests.csproj` with a new project reference and compile directives. Introduced `MailTemplatePlaceholderDbTests` and `ReplacePlaceholderExtensionsTests` to verify placeholder replacement functionality. Added supporting model classes for testing. These changes improve code functionality and test coverage.
Changed the `Attachments` property type in `EnvelopeNotificationBase.cs` from `List` to `IReadOnlyList` to enhance immutability and thread safety. Updated the `FinalizeEnvelopeCommandHandler` in `FinalizeEnvelopeCommand.cs` to use a single-line syntax for `Attachments` initialization, improving code readability.
Introduced `EnvelopeNotificationBase` as a new base class for notifications, providing a unified structure with an abstract `GetTemplateType` method and optional attachments. Added `DocumentReceivedNotification` and updated `DocumentSignedNotification` to inherit from this base class, streamlining attachment handling and template type determination.
Refactored `IEnvelopeNotificationService` to use a generic `Notify` method, allowing for flexibility with different notification types. Updated `FinalizeEnvelopeCommandHandler` to align with the new attachment handling.
Added `EnvelopeNotificationExtensions` for converting attachments to `EmailAttachmentDto` objects and introduced `ReplacePlaceholderExtensions` for dynamic placeholder replacement in email templates using reflection. Removed outdated placeholder logic from `EnvelopeNotificationService`.
Added a check in SendMailHandler to prevent sending emails for deleted envelopes with a status of EnvelopeSaved or lower. Updated project version in EnvelopeGenerator.Server.csproj from 1.7.0 to 1.8.0 to reflect these changes.
Refactored `ReadDocumentDetailsQueryHandler` to remove AutoMapper, improving performance by manually selecting necessary data. Simplified `SenderEditorPage.razor` by removing bootstrap logic and updating the UI for a more compact design. Streamlined envelope creation in `SenderPage.razor` by eliminating the bootstrap token. Updated styles in `envelope-viewer.css` for better alignment and readability.
Introduced `RemoveEnvelopeReceiverCommand` and its handler to
facilitate the removal of envelope receivers. Updated the
`EnvelopeReceiverController` to use C# 9's record-like syntax
for dependency injection, eliminating explicit private fields.
Added a `RemoveAsync` method to handle DELETE requests for
removing envelope receivers. Enhanced code documentation with
additional XML comments.
Introduce `SignatureFieldParams` class to manage signature field dimensions with configurable `Width` and `Height`. Integrate this configuration into the service collection and replace hardcoded dimensions in `CreateEnvelopeCommandHandler.cs` and `SenderEditorPage.razor`. Update `appsettings.json` to include the new configuration section, allowing runtime adjustments.
Changed CertificationType from int? to CertificationType? enum across multiple files, including EnvelopeDto, EnvelopeTypeDto, and CreateEnvelopeCommand, to improve type safety. Removed the NormalizeCertificationType method as it is no longer necessary. Updated components and records to use the enum directly, enhancing code clarity and reducing potential errors. Added necessary using directives for the enum.
Introduce `NormalizeCertificationType` method to ensure consistent handling of certification types across the application. Update `CreateEnvelopeCommandHandler`, `CreateEnvelopeWizardPopup.razor`, and `SenderEditorPage.razor` to use this method. Modify `CertificationType` enum to include `ElectronicSignature` and remove `QualifiedSignature`. Update UI components to reflect these changes by removing the `QualifiedSignature` option.
Introduced a new boolean property `IncludeDocAndDocRes` in the `ReadEnvelopeQuery` class to control the inclusion of document and document result details in query results. Updated `ReadEnvelopeQueryHandler` to handle this property, returning a simplified `EnvelopeDto` when set to `false`.
Modified `SenderPage.razor` to exclude document details by passing `includeDocAndDocRes: false` to `EnvelopeService.GetAsync()`. Enhanced `EnvelopeService` to accept and process the `includeDocAndDocRes` parameter, ensuring API requests respect this preference.
Revised FinalizeEnvelopeCommand to notify each receiver
individually instead of converting documents to Base64.
Adjusted IsActive method in EnvelopeStatusExtensions to
include EnvelopePartlySigned as active. Updated project
version to 1.7.0-beta to reflect these changes.
Replaced PKCS#11-based cryptographic operations with a new DocumentService API integration. Removed all PKCS#11-related code, configurations, and dependencies, including options, self-test status, and signing logic. Updated `FinalizeEnvelopeCommand` to include a notification service and added base64 conversion for documents. Updated `ServiceCollectionExtensions` to register the new DocumentService client. Removed outdated documentation and diagrams related to PKCS#11. Updated project files and configurations to reflect these changes and incremented the version number. Added a comment in `EnvelopeFinalizationWorker` for future RabbitMQ integration.
Replaced UnauthorizedAccessException with a custom
AuthorizationException in SignPdfByEnvelopeCommandHandler
to provide more meaningful error handling. Added the
EnvelopeGenerator.Domain.Exceptions namespace to support
this change.
Introduced `ESignParams` for configurable e-signature settings,
including `ApplicationName` and `DefaultReason`. Updated
`DocReceiverElementDto` and `PdfSignOptionsDto` to support
new properties. Registered `ESignParams` in DI container.
Refactored `SignPdfByElementCommand` to include new fields
and improved error handling. Added `SignPdfByEnvelopeReceiverCommand`
to enable signing documents for envelope receivers.
Replaced DevExpress with PdfSharp for PDF rendering in
`ReceiverSignedPage.razor`, improving layout and flexibility.
Enhanced `PdfSignatureController` with a new endpoint for
signing documents by envelope key.
Added `DataIntegrityException` for better error handling.
Updated `appsettings.json` with `ESignParams` configuration.
Added enums `PdfSignatureCoordinateUnit` and `PdfSignatureCoordinateOrigin` to support defining signature coordinates in points or inches and relative to either the bottom-left or top-left corner of the page.
Updated `PdfSignatureAppearanceDto` to include `CoordinateUnit` and `CoordinateOrigin` parameters with default values. Refactored `PdfDigitalSignatureService` to use a new `BuildSignatureBounds` method for calculating signature bounds, which handles unit conversion, origin adjustments, and validation.
Introduced `GetPageHeightInPoints` to retrieve page height for top-left origin calculations. Improved signature field naming precision and added error handling for invalid dimensions and page numbers.
Included a TODO for optimizing the signature check algorithm.
Extended `DocReceiverElementDto` to include an optional `Document` reference. Enhanced `ReadDocReceiverElementQuery` with `Id` and `IncludeDocument` properties for filtering and document inclusion.
Updated `ReadDocReceiverElementQueryHandler` to handle new query properties, enabling filtering by `Id` and optionally including associated documents.
Introduced `SignPdfByElementCommand` and its handler to support signing PDFs using either a provided `DocReceiverElementDto` or an `ElementId`. Added validation via `SignPdfByElementCommandValidator` to ensure proper usage.
Refactored and added necessary `using` directives for new dependencies.
Updated namespaces for `CreateEnvelopeReceiverCommand` and related classes to `EnvelopeGenerator.Application.EnvelopeReceivers.Commands.CreateEnvelopeReceiver` for better organization and clarity.
- Updated namespaces in `CreateEnvelopeReceiverCommand`, `CreateEnvelopeReceiverCommandHandler`, and `CreateEnvelopeReceiverResponse`.
- Adjusted imports in `MappingProfile.cs`, `EnvelopeReceiverService.cs`, and `Fake.cs` to reflect the new namespace.
- Modified `EnvelopeReceiverController.cs` to use the updated namespace and simplified type reference in a `foreach` loop.
Updated the `ComposeSignaturePreviewPng` method in the `IPdfPageImageRenderer` interface to return a `Stream` instead of a `byte[]` for improved memory efficiency when handling large image data.
- Added `ComposeSignaturePreviewPngBytes` extension method to convert the `Stream` to a `byte[]` for backward compatibility.
- Updated `PdfPageImageRenderer` to return a `Stream` and adjusted its internal logic to reset the `MemoryStream` position before returning.
- Modified `DevSignatureInkController` to use the `Stream`-based implementation for HTTP responses.
- Made minor formatting adjustments in `PdfPageImageRenderer`.
These changes optimize memory usage while maintaining compatibility with existing workflows that require `byte[]`.
Introduced `ISignatureInkPayload` interface to standardize signature ink data and metadata. Updated `DocReceiverElementDto` and `DocReceiverElement` to implement this interface. Enhanced `IPdfPageImageRenderer` with methods for signature preview generation and image format validation.
Replaced `PdfSharp` with `DevExpress` for PDF rendering in `ReceiverSignedPage.razor`. Added `DevSignatureInkController` with endpoints for downloading raw and composed signature images. Updated project files to remove `SixLabors.ImageSharp` and integrate DevExpress.
Added configuration for development endpoints in `appsettings.json`. Improved exception handling, validation, and code maintainability.
Updated `PdfSignOptionsDto` and `PdfSignatureCheckItemDto` to use `DocumentElementId` (long) instead of `UUID` (string). Modified `PdfDigitalSignatureService` to reflect this change, including updates to `SignatureReasonMetaRegex`, `BuildReasonWithMeta`, and `ParseReasonMeta`. Adjusted method signatures, return values, and property assignments to ensure consistent use of `DocumentElementId`. These changes align with a shift in the application's data model to use numeric identifiers for document elements.
Refactored `Pkcs11Options` by removing `DefaultCertificationLevel` and improving property documentation. Replaced `VisualSignature` in `PdfSignOptionsDto` with `Appearance` using the new `PdfSignatureAppearanceDto` class, which encapsulates signature appearance details, including font and color settings.
Enhanced `PdfSignatureCertificationLevel` enum with more descriptive values and added XML documentation. Updated `IPdfDigitalSignatureService` to support optional signature images and removed redundant methods.
Refactored `PdfDigitalSignatureService` to streamline appearance handling, validate inputs, and improve maintainability. Removed unused methods and added support for `PdfSignatureAppearanceDto`.
Simplified `PdfSignatureController` by consolidating form properties into `PdfSignOptionsDto`. Improved code readability and flexibility while removing redundant logic.
Refactored `PdfSignOptionsDto` and `PdfVisualSignatureOptionsDto`:
- Converted both to immutable `record` types with non-nullable properties.
- Added XML documentation comments for properties and parameters.
Simplified `PdfDigitalSignatureService`:
- Updated `SignPdfAsync` to enforce non-nullable `PdfSignOptionsDto`.
- Removed redundant null checks and inlined `CreateSignatureBounds`.
- Simplified signature appearance and image data logic.
- Refactored `TryGetKeySize` to use `bool` with `out` parameter.
General improvements:
- Enhanced code readability and maintainability.
- Reduced nullable references and enforced stricter type safety.