Introduced four new pipeline behaviors (`AnnotationBehavior`,
`DocStatusBehavior`, `HistoryBehavior`, and `SendSignedMailBehavior`)
to modularize the signing process. These behaviors handle annotation
persistence, document status creation, history recording, and signed
mail notifications, respectively.
- `AnnotationBehavior`: Saves annotations using `IRepository`.
- `DocStatusBehavior`: Creates document status via `ISender`.
- `HistoryBehavior`: Records signing history and validates receiver
information.
- `SendSignedMailBehavior`: Sends signed mail notifications using
email templates and dynamic placeholder replacement.
Added error handling for missing data in `HistoryBehavior` and
`SendSignedMailBehavior`. Updated the signing pipeline to execute
these behaviors sequentially, ensuring a structured and extensible
workflow.
Introduce `SignCommand` and `SignCommandHandler` in the `EnvelopeGenerator.Application.Signature.Commands` namespace.
- `SignCommand` is a CQRS command that encapsulates the envelope receiver's information (`EnvelopeReceiverDto`) and optional PSPDFKit annotation data.
- Added computed properties for email template type (`TemplateType`) and receiver's email address (`EmailAddress`), with validation for null receivers.
- `SignCommandHandler` implements the `IRequestHandler<SignCommand>` interface, with a placeholder `Handle` method delegating processing to pipeline behaviors.
- Added necessary `using` directives for MediatR, DTOs, extensions, and constants.