using MediatR;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
namespace EnvelopeGenerator.Application.Signatures.Commands;
///
/// Command to sign a document by a receiver.
///
public record SignCommand : IRequest
{
///
/// The envelope receiver information.
///
public required EnvelopeReceiverDto EnvelopeReceiver { get; init; }
///
/// The PSPDFKit annotation data.
///
[Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")]
public PsPdfKitAnnotation? PsPdfKitAnnotation { get; init; }
}
///
/// Handles the sign command. The actual work is done by SignCommandBehavior pipeline.
///
public class SignCommandHandler : IRequestHandler
{
///
/// Executes the signing command. Pipeline behaviors handle the actual processing.
///
///
///
///
public Task Handle(SignCommand request, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
}