Refactor: Rename DocumentOperator to DocumentService
Updated project and solution files to rename and restructure `DocumentOperator` to `DocumentService`. Modified project references in `DocumentService.API.csproj`, `DocumentService.Application.csproj`, and `DocumentService.Infrastructure.csproj` to reflect the new naming convention. Updated `DocumentService.sln` to remove old project references, add new ones, and adjust configuration and nested project mappings accordingly. This change aligns the project structure with the new naming convention.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Codecrete.SwissQRBill.Generator;
|
||||
|
||||
namespace DocumentService.Application.Common.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for Swiss QR Code processing operations.
|
||||
/// Extracts and parses Swiss QR Codes from PDF documents.
|
||||
/// </summary>
|
||||
public interface ISwissQrCodeProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts and parses Swiss QR Code from a PDF document.
|
||||
/// Returns both parsed Bill object and raw QR text lines.
|
||||
/// </summary>
|
||||
/// <param name="pdfStream">
|
||||
/// PDF document stream. Must be readable and positioned at the beginning (Position = 0).
|
||||
/// Non-seekable streams are supported. Caller is responsible for disposal.
|
||||
/// </param>
|
||||
/// <param name="pageNumbers">Optional: Specific page numbers to scan (1-indexed). If null, scans all pages starting with last page.</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>Tuple: (Parsed Codecrete Bill, Raw QR lines as string array)</returns>
|
||||
/// <exception cref="Domain.Common.Exceptions.NotFoundException">
|
||||
/// Thrown when no Swiss QR Code is found in the specified pages
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// Thrown when stream is empty or (for seekable streams) not positioned at the beginning
|
||||
/// </exception>
|
||||
Task<(Bill Bill, string[] RawLines)> ExtractSwissQrCodeAsync(
|
||||
Stream pdfStream,
|
||||
int[]? pageNumbers = null,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user