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.
49 lines
2.2 KiB
C#
49 lines
2.2 KiB
C#
using DocumentService.Client.Interfaces;
|
|
using DocumentService.Application.Common.DTOs.Requests;
|
|
using Microsoft.Extensions.Logging;
|
|
using System.Net.Http;
|
|
|
|
namespace DocumentService.Client.Clients;
|
|
|
|
/// <summary>
|
|
/// Implementation of PDF conversion client (PDF ? PDF/A).
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// All methods throw <see cref="NotImplementedException"/> because the corresponding
|
|
/// API endpoints are not yet implemented on the server side.
|
|
/// </remarks>
|
|
public class PdfConversionClient(HttpClient httpClient, ILogger<PdfConversionClient> logger) : BaseDocumentClient(httpClient, logger), IPdfConversionClient
|
|
{
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertToPdfAAsync(Stream pdfStream, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertToPdfAAsync(byte[] pdfBytes, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertFromPdfAAsync(Stream pdfStream, CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("API endpoint not implemented yet")]
|
|
public Task<Stream> ConvertFromPdfAAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
|
|
{
|
|
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
|
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
|
}
|
|
}
|