feat(sender): add envelope draft save command and endpoint
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||
|
||||
public record SaveEnvelopeDraftResultDto(int EnvelopeId, EnvelopeStatus Status);
|
||||
|
||||
public record SaveEnvelopeDraftCommand : IRequest<SaveEnvelopeDraftResultDto>
|
||||
{
|
||||
public int? EnvelopeId { get; init; }
|
||||
|
||||
public string? Title { get; init; }
|
||||
|
||||
public string? Message { get; init; }
|
||||
|
||||
public bool TFAEnabled { get; init; }
|
||||
|
||||
public SaveEnvelopeDraftDocumentDto? Document { get; init; }
|
||||
|
||||
public List<SaveEnvelopeDraftReceiverDto> Receivers { get; init; } = new();
|
||||
|
||||
internal int UserId { get; private set; }
|
||||
|
||||
public SaveEnvelopeDraftCommand WithAuth(int userId)
|
||||
{
|
||||
UserId = userId;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public record SaveEnvelopeDraftDocumentDto(string DataAsBase64);
|
||||
|
||||
public record SaveEnvelopeDraftFieldDto(double X, double Y, int Page);
|
||||
|
||||
public record SaveEnvelopeDraftReceiverDto(
|
||||
string EmailAddress,
|
||||
string? Name,
|
||||
string? PhoneNumber,
|
||||
List<SaveEnvelopeDraftFieldDto> Fields);
|
||||
Reference in New Issue
Block a user