Renamed methods across multiple client classes for consistency, shortening and aligning naming conventions (e.g., `CheckAttachmentsAsync` → `CheckAsync`, `ValidatePdfAsync` → `ValidateAsync`). Updated corresponding interfaces, unit tests, and documentation to reflect the new method names. Standardized method signatures to support both `Stream` and `byte[]` overloads consistently. Improved error handling in tests and updated examples in the README for batch processing and validation scenarios. Enhanced API endpoint overview for clarity.
29 lines
1.2 KiB
C#
29 lines
1.2 KiB
C#
using DocumentService.Application.Common.DTOs;
|
|
|
|
namespace DocumentService.Client.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Client for Swiss QR Code extraction operations.
|
|
/// </summary>
|
|
public interface ISwissQrCodeClient
|
|
{
|
|
/// <summary>
|
|
/// Extracts Swiss QR Code from PDF (multipart).
|
|
/// </summary>
|
|
/// <param name="pdfStream">PDF file stream</param>
|
|
/// <param name="raw">If true, returns raw QR text lines instead of parsed Bill object</param>
|
|
/// <param name="cancellationToken">Cancellation token</param>
|
|
/// <returns>Swiss QR Code extraction result</returns>
|
|
Task<SwissQrCodeExtractionResult> ExtractAsync(Stream pdfStream, bool raw = false, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Extracts Swiss QR Code from PDF (Base64).
|
|
/// </summary>
|
|
/// <param name="pdfBytes">PDF file as byte array</param>
|
|
/// <param name="raw">If true, returns raw QR text lines instead of parsed Bill object</param>
|
|
/// <param name="cancellationToken">Cancellation token</param>
|
|
/// <returns>Swiss QR Code extraction result</returns>
|
|
Task<SwissQrCodeExtractionResult> ExtractAsync(byte[] pdfBytes, bool raw = false, CancellationToken cancellationToken = default);
|
|
}
|
|
|