Changed ExportPath from a nullable string to a non-nullable string in ConfigDto and initialized it with the null-forgiving operator. This ensures ExportPath always has a value and cannot be null.
Replaced manual SQL and file read with async repository update for saving final document bytes. Removed obsolete helper methods and cleaned up unused imports for improved maintainability and testability.
Removed the SendFinalEmailWithAttachment method and all references to it from SendFinalEmailToCreator and SendFinalEmailToReceivers. The logic for determining email attachments based on FinalEmailType is no longer used. Other functionality in these methods remains unchanged.
Removed BurnAnnotationsToPdf, GetEnvelopeData, and GetAnnotationData from FinalizeDocumentJob. These methods handled document reading, annotation retrieval, and PDF annotation burning. This change reflects a refactor or shift in document processing responsibilities.
Refactored FinalizeDocumentJob to make the Finalize method asynchronous and fetch document annotations from docStatusRepo instead of using GetEnvelopeData. Updated constructor to inject IRepository<Domain.Entities.DocumentStatus>. Improved logging and removed obsolete envelopeData checks.
Refactored property declarations in the Envelope class for improved readability by removing unnecessary line breaks and nullable preprocessor directives. Added a [NotMapped] DefaultDocument property to return the first document in the Documents list, or null if none exist.
Removed numerous debug-level log statements to reduce log verbosity and focus on warnings and information logs. Updated some log messages to use interpolated strings for clarity. Refactored GetAnnotationData to use C# collection expressions for improved code conciseness.
Added RethrowOnError property to control exception rethrowing during envelope finalization. Exceptions are now logged as errors and, if RethrowOnError is true, rethrown to enable stricter error handling and halt execution on failure.
Extracted envelope finalization logic from the foreach loop into a new private Finalize(Envelope envelope) method. This improves code readability and maintainability by encapsulating all steps of the finalization process without changing functionality.
Refactored ActionService to use constructor injection for IRepository<History>. Updated all public methods to accept optional CancellationToken parameters for improved cancellation support. Added necessary using directives. Class remains a placeholder with [Obsolete] attributes and NotImplementedException.
Added an XML summary comment to the ActionService class to indicate it is being migrated from EnvelopeGenerator.CommonServices.Services.ActionService. This provides clarity on the class's origin and intended purpose; no functional changes were made.
Move per-envelope logic in FinalizeDocumentJob into its own try-catch block within the foreach loop. This ensures that exceptions in processing one envelope do not halt the processing of others, improving robustness and fault tolerance. Removed the outer try-catch-finally block and updated logging to reflect per-envelope and overall job status.
Replaced raw SQL and DataTable usage with Entity Framework LINQ queries for retrieving completed envelopes. The process now works directly with envelope entities, improving code readability, maintainability, and leveraging EF's querying capabilities. Logging and error handling have been updated to use envelope properties directly.
Deleted the EnvelopeModel class, which included the GetById method for retrieving Envelope entities from the database. Also removed related using directives and namespace declarations. This cleanup eliminates unused or redundant code.
Replaced EnvelopeModel with IRepository<Envelope> in FinalizeDocumentJob, switching to dependency-injected, repository-based, and asynchronous data access using Entity Framework. Updated envelope retrieval to use SingleOrDefaultAsync, improving maintainability and scalability. Added necessary using directives to support these changes.
The TempFiles class, including its TempPath property, constructor,
and methods (Create, CleanUpFiles, CleanUp), is now marked with
the [Obsolete("Use memory cache instead of temp files.")] attribute.
This deprecates the use of temp files in favor of a memory cache
approach for future development.
Expanded EnvelopeDto with new properties for expiration dates, reminder scheduling, notification options, and an optional comment field. These changes provide finer control over envelope lifecycle and metadata.
Removed nullable annotation from Title, making it non-nullable.
Changed Comment to be nullable with conditional compilation
support for nullable reference types.
Removed the ConstantsTests.cs file, which tested the Normalize
method for EnvelopeSigningType. Updated EnvelopeGenerator.Tests.csproj
to include a Domain folder for future test organization.
Deleted ConfigModel.cs and DbConfig.cs, removing both the configuration loading logic and the DbConfig data structure from the codebase. This eliminates database-driven configuration management functionality.
Switched FinalizeDocumentJob to use MediatR for async config retrieval, replacing direct model access. Updated _config type to ConfigDto?, injected IMediator, and removed obsolete DbConfig references. Cleaned up ExecuteAsync method for improved clarity and decoupling.
DocumentPathOrigin property and all related code references have
been removed from DbConfig, ConfigModel, and FinalizeDocumentJob.
DocumentPath is now used exclusively for document path handling,
simplifying configuration and reducing redundancy.
Expanded ConfigDto with properties for document path, timestamps, legacy GUID, and default TFA settings. Added XML documentation for each new property.
Added DocumentPath, AddedWhen, ChangedWhen, Guid, DefTfaEnabled, and DefTfaWithPhone properties to the Config entity, each mapped to corresponding database columns with appropriate data types and attributes. Also included a conditional using directive for System under NETFRAMEWORK.
The signature label now displays "Confirmed by" if READ_AND_CONFIRM is true, otherwise "Signed by". This uses the appropriate localized string when available, defaulting to "Signed by" if not. Previously, only "Signed by" was shown.
The confirmation dialog when finalizing a document now displays
context-appropriate text depending on the READ_AND_CONFIRM flag.
If true, it shows localized.confirmAgree; otherwise, it shows
localized.sigAgree, improving clarity for different workflows.
Injected IMemoryCache into ReadDefaultConfigQueryHandler and updated the Handle method to cache the default configuration for 30 minutes. This reduces database queries and improves performance for frequently accessed configuration data.
Refactored cache key usage by introducing a new static CacheKey class in the Application.Common namespace. Replaced the private DefaultConfigCacheId in ConfigService with CacheKey.DefaultConfig. Updated using statements accordingly. This change improves maintainability by centralizing cache key management and sets the stage for future cache key consolidation.
Added EnforceSingleResult to ReadDefaultConfigQuery to allow strict single-result enforcement. Updated handler logic to use SingleOrDefaultAsync when requested. Replaced InvalidOperationException with NotFoundException and improved error messaging when no configuration is found.
Introduced ReadDefaultConfigQuery and its handler to retrieve the application's default configuration using MediatR. The handler fetches the first Config entity from the repository, maps it to ConfigDto, and throws an exception if no configuration is found.
Added localized SigningProcessTitle entry to de-DE, en-US, and fr-FR resource files. Renamed RejectionInfoConfirmation to RejectionInfo1Confirmation. Removed duplicate SigningProcessTitle entries. No changes to localized values.
Progress bar label now displays "Confirmations" if isReadAndConfirm is true, otherwise it shows "Signatures". This improves clarity for users based on the envelope's required action.
Store envelope.IsReadAndConfirm() in isReadAndConfirm variable to avoid redundant calls and improve code readability when setting ViewData["Title"]. No change to logic or behavior.
Added new localized strings for document confirmation processes in de-DE, en-US, and fr-FR resource files, including confirmation messages, UI labels, and process titles. Fixed a typo in the German resource and ensured consistency for the "SigningProcessTitle" key across languages.
Refined the logic for setting ViewData["Title"] in ShowEnvelope.cshtml. Now, if the envelope requires read and confirm, the title displays "Confirm Document" instead of just "Sign Document" or "View Document", providing clearer context for users.
Added three new extension methods to the Extensions class in Resource.cs: ConfirmDoc, ConfirmAgree, and ConfirmationProcessTitle. Each method retrieves the localized value for its respective resource key and includes XML documentation, consistent with existing localization methods.
Introduced a new extension method, RejectionInfo1ForConfirmation, to the Extensions class in Resource.cs. This method retrieves the localized string for "RejectionInfo1ForConfirmation" from an IStringLocalizer instance, providing functionality similar to the existing RejectionInfo1 method.
Add logic to display a specific rejection message when an envelope is rejected as part of a "read and confirm" process. The header now distinguishes between external, confirmation-related, and default rejection scenarios for improved user feedback.
Swapped the display logic for localized titles and messages based on the IsReadAndConfirm flag. Now, "confirmed" texts are shown when IsReadAndConfirm is true, and "signed" texts when false. This update ensures correct status messaging throughout the envelope confirmation flow.
Add conditional logic to EnvelopeSigned.cshtml to display different headings and confirmation messages based on whether the document was signed or confirmed, using the IsReadAndConfirm flag. This improves user feedback by distinguishing between signing and confirming actions.
Refactored EnvelopeSigned.cshtml to use a local variable for IsReadAndConfirm when setting the page title, improving readability. Also updated Razor syntax for localizer calls in <h1> and <p> elements to ensure correct evaluation and formatting.
Set model to EnvelopeReceiverDto and import required types. Update ViewData["Title"] to use DocSigned or DocConfirmed based on Envelope.IsReadAndConfirm() result.
Previously, the "EnvelopeSigned" view was returned without a model when an envelope was already signed. Now, the er model object is passed to the view to provide additional context or data.
Added a new DocConfirmed extension method to the Extensions class in Resource.cs. This method enables retrieval of the "DocConfirmed" localized string via IStringLocalizer, similar to the existing DocSigned method.