Files
EnvelopeGenerator/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs
TekH fceb266630 Deprecate DocSignedNotification and cleanup annotations
Marked `DocSignedNotification` as `[Obsolete]` with a note to use `Signature.Commands.SignCommand` instead. Removed the `PsPdfKitAnnotation` record and its associated `using` directives from `DocSignedNotification.cs`.

Added missing `using EnvelopeGenerator.Application.Common.Dto;` to `AnnotationHandler.cs` and `DocStatusHandler.cs` to ensure proper DTO support.
2026-06-09 18:22:43 +02:00

36 lines
1.3 KiB
C#

using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned;
/// <summary>
/// Notification raised when a document is signed by a receiver.
/// </summary>
[Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")]
public record DocSignedNotification : INotification, ISendMailNotification
{
/// <summary>
/// The envelope receiver information.
/// </summary>
public required EnvelopeReceiverDto EnvelopeReceiver { get; init; }
/// <summary>
/// The PSPDFKit annotation data.
/// </summary>
public PsPdfKitAnnotation? PsPdfKitAnnotation { get; init; }
/// <summary>
/// Gets the email template type.
/// </summary>
public EmailTemplateType TemplateType => EmailTemplateType.DocumentSigned;
/// <summary>
/// Gets the email address of the receiver.
/// </summary>
public string EmailAddress => EnvelopeReceiver.Receiver?.EmailAddress
?? throw new InvalidOperationException($"Receiver is null." +
$"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}");
}