refactor: Move request DTOs to DocumentService.Client.Models namespace
This commit is contained in:
@@ -2,6 +2,7 @@ using DocumentService.Application.AddAttachments;
|
|||||||
using DocumentService.Application.CheckPdfAttachments.Queries;
|
using DocumentService.Application.CheckPdfAttachments.Queries;
|
||||||
using DocumentService.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentService.Application.ExtractPdfAttachments;
|
using DocumentService.Application.ExtractPdfAttachments;
|
||||||
|
using DocumentService.Client.Models.Requests;
|
||||||
using DocumentService.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using DocumentService.Application.ConvertFromPdfA;
|
using DocumentService.Application.ConvertFromPdfA;
|
||||||
using DocumentService.Application.ConvertToPdfA;
|
using DocumentService.Application.ConvertToPdfA;
|
||||||
|
using DocumentService.Client.Models.Requests;
|
||||||
using DocumentService.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
@@ -179,33 +180,3 @@ public class PdfConversionController(IMediator mediator) : ControllerBase
|
|||||||
return File(resultPdf, "application/pdf", "converted-pdf.pdf");
|
return File(resultPdf, "application/pdf", "converted-pdf.pdf");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for converting PDF to PDF/A
|
|
||||||
/// </summary>
|
|
||||||
public record ConvertToPdfARequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public required string Base64Pdf { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Target PDF/A level (default: "PDF/A-3b")
|
|
||||||
/// </summary>
|
|
||||||
/// <example>PDF/A-3b</example>
|
|
||||||
public string? PdfALevel { get; init; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for converting PDF/A to PDF
|
|
||||||
/// </summary>
|
|
||||||
public record ConvertFromPdfARequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF/A document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public required string Base64Pdf { get; init; }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using DocumentService.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentService.Application.ValidatePdf.Queries;
|
using DocumentService.Application.ValidatePdf.Queries;
|
||||||
using DocumentService.Application.ValidatePdfA.Queries;
|
using DocumentService.Application.ValidatePdfA.Queries;
|
||||||
|
using DocumentService.Client.Models.Requests;
|
||||||
using DocumentService.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@@ -167,27 +168,3 @@ public class PdfValidationController(IMediator Mediator) : ControllerBase
|
|||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for Base64-encoded PDF validation
|
|
||||||
/// </summary>
|
|
||||||
public record ValidatePdfBase64Request
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public string Base64Pdf { get; init; } = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for Base64-encoded PDF/A validation
|
|
||||||
/// </summary>
|
|
||||||
public record ValidatePdfABase64Request
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public string Base64Pdf { get; init; } = string.Empty;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using DocumentService.Application.Common.DTOs;
|
using DocumentService.Application.Common.DTOs;
|
||||||
using DocumentService.Application.ExtractZugferd;
|
using DocumentService.Application.ExtractZugferd;
|
||||||
using DocumentService.Application.HasZugferd.Queries;
|
using DocumentService.Application.HasZugferd.Queries;
|
||||||
|
using DocumentService.Client.Models.Requests;
|
||||||
using DocumentService.Domain.Common.Exceptions;
|
using DocumentService.Domain.Common.Exceptions;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
@@ -176,27 +177,3 @@ public class ZugferdController(IMediator mediator) : ControllerBase
|
|||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for Base64-encoded PDF ZUGFeRD check
|
|
||||||
/// </summary>
|
|
||||||
public record HasZugferdRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public string Base64Pdf { get; init; } = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Request DTO for Base64-encoded PDF ZUGFeRD extraction
|
|
||||||
/// </summary>
|
|
||||||
public record ExtractZugferdRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// PDF document encoded as Base64 string
|
|
||||||
/// </summary>
|
|
||||||
/// <example>JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c...</example>
|
|
||||||
public required string Base64Pdf { get; init; }
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user