Consolidated DTOs under `DocumentService.Application.Common.DTOs.Requests` to centralize and align them with the application layer. Introduced `PdfBase64RequestBase` to encapsulate shared properties, reducing redundancy across request DTOs. Updated controllers, clients, and tests to use the new DTO structure. Removed redundant DTOs and cleaned up unused namespaces and comments. Improved documentation and ensured consistent naming conventions across the codebase.
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
namespace DocumentService.Application.Common.DTOs.Requests;
|
|
|
|
/// <summary>
|
|
/// Request DTO for Base64-encoded PDF attachment check
|
|
/// </summary>
|
|
public record CheckPdfAttachmentsRequest : PdfBase64RequestBase;
|
|
|
|
/// <summary>
|
|
/// Request DTO for Base64-encoded PDF attachment extraction
|
|
/// </summary>
|
|
public record ExtractPdfAttachmentsRequest : PdfBase64RequestBase;
|
|
|
|
/// <summary>
|
|
/// Request DTO for Base64-encoded PDF with attachments to add
|
|
/// </summary>
|
|
public record AddAttachmentsRequest : PdfBase64RequestBase
|
|
{
|
|
/// <summary>
|
|
/// List of attachments to embed
|
|
/// </summary>
|
|
public required List<AttachmentRequestDto> Attachments { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// DTO for a single attachment file in a request
|
|
/// </summary>
|
|
public record AttachmentRequestDto
|
|
{
|
|
/// <summary>
|
|
/// File name (e.g., "invoice.xml", "document.pdf")
|
|
/// </summary>
|
|
/// <example>factur-x.xml</example>
|
|
public required string FileName { get; init; }
|
|
|
|
/// <summary>
|
|
/// File content encoded as Base64 string
|
|
/// </summary>
|
|
/// <example>PD94bWwgdmVyc2lvbj0iMS4wIj8+...</example>
|
|
public required string Base64Content { get; init; }
|
|
|
|
/// <summary>
|
|
/// MIME type (optional, e.g., "application/xml")
|
|
/// </summary>
|
|
/// <example>application/xml</example>
|
|
public string? MimeType { get; init; }
|
|
}
|