Introduced BlazorSignaturePayload and BlazorSignatureEntry classes in EnvelopeGenerator.API.Models. These DTOs provide a transport-neutral format for submitting signature data from the Blazor receiver UI, including image, metadata, and timestamp. Added detailed XML documentation describing their usage and relation to legacy formats.
43 lines
1.7 KiB
C#
43 lines
1.7 KiB
C#
namespace EnvelopeGenerator.API.Models;
|
|
|
|
/// <summary>
|
|
/// Lightweight payload used by the Blazor receiver UI to submit signatures.
|
|
/// Each entry corresponds to one signature placeholder rendered as an
|
|
/// overlay on top of the DevExpress PDF viewer.
|
|
///
|
|
/// The legacy MVC flow ships a full PSPDFKit InstantJSON payload via
|
|
/// <see cref="EnvelopeGenerator.Application.Common.Notifications.DocSigned.PsPdfKitAnnotation"/>.
|
|
/// That format is browser-library specific. The Blazor client uses a
|
|
/// transport-neutral DTO instead: only what the server actually needs
|
|
/// to persist the signed document (image + metadata per placeholder).
|
|
///
|
|
/// Conversion to the internal <c>PsPdfKitAnnotation</c> happens inside
|
|
/// <see cref="EnvelopeGenerator.API.Controllers.AnnotationController"/>.
|
|
/// </summary>
|
|
public class BlazorSignaturePayload
|
|
{
|
|
/// <summary>The receiver-specific signed placeholders for this envelope.</summary>
|
|
public List<BlazorSignatureEntry> Signatures { get; set; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// A single signed placeholder.
|
|
/// </summary>
|
|
public class BlazorSignatureEntry
|
|
{
|
|
/// <summary>The receiver's <c>DocumentReceiverElement.Id</c> being signed.</summary>
|
|
public int ElementId { get; set; }
|
|
|
|
/// <summary>Signature image as a data URL (e.g. "data:image/png;base64,...").</summary>
|
|
public string SignatureDataUrl { get; set; } = string.Empty;
|
|
|
|
/// <summary>Optional position / job title entered by the receiver.</summary>
|
|
public string? Position { get; set; }
|
|
|
|
/// <summary>Optional city / location entered by the receiver.</summary>
|
|
public string? City { get; set; }
|
|
|
|
/// <summary>Capture timestamp (client local time).</summary>
|
|
public DateTime SignedAt { get; set; }
|
|
}
|