Add interfaces and DTOs for PDF operations support
Introduced multiple interfaces and DTOs to support a wide range of PDF-related operations, including attachment handling, conversion, validation, annotation, stamping, and metadata extraction. Key changes: - Added `DocumentServiceClientOptions` for HTTP client config. - Introduced `IPdfAttachmentClient` for attachment operations. - Added `IPdfConversionClient` for PDF/A conversion (marked obsolete). - Added `IPdfOperationsClient` for merge, annotate, and stamp ops. - Introduced `IPdfValidationClient` for PDF and PDF/A validation. - Added `ISwissQrCodeClient` for Swiss QR Code extraction. - Added `IZugferdClient` for ZUGFeRD detection and extraction. - Created request DTOs for Base64-encoded operations. - Added enums for annotation, stamp, and validation configurations. These changes provide a flexible and extensible foundation for interacting with PDF documents, supporting both multipart and Base64-encoded inputs, and ensuring type safety with enums and records.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
namespace DocumentService.Client.Configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Configuration options for DocumentService HTTP client.
|
||||
/// </summary>
|
||||
public class DocumentServiceClientOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Base URL of the DocumentService API.
|
||||
/// </summary>
|
||||
/// <example>https://api.example.com</example>
|
||||
public string BaseUrl { get; set; } = "http://localhost:5000";
|
||||
|
||||
/// <summary>
|
||||
/// HTTP request timeout duration.
|
||||
/// </summary>
|
||||
public TimeSpan Timeout { get; set; } = TimeSpan.FromMinutes(5);
|
||||
|
||||
/// <summary>
|
||||
/// Maximum number of retry attempts for failed requests.
|
||||
/// </summary>
|
||||
public int MaxRetries { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to throw exceptions on HTTP error responses (4xx, 5xx).
|
||||
/// If false, returns null/default values instead.
|
||||
/// </summary>
|
||||
public bool ThrowOnError { get; set; } = true;
|
||||
}
|
||||
Reference in New Issue
Block a user