feat: Add specialized client implementations for PDF operations

This commit is contained in:
2026-08-11 10:29:24 +02:00
parent 14250f0b4b
commit 058cb9327d
7 changed files with 711 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using DocumentService.Client.Interfaces;
using DocumentService.Client.Models.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");
}
}