using DocumentService.Application.Common.DTOs; using DocumentService.Application.ExtractZugferd; namespace DocumentService.Client.Interfaces; /// /// Client for ZUGFeRD operations (detection, extraction). /// public interface IZugferdClient { /// /// Checks whether a PDF contains a ZUGFeRD XML attachment (multipart). /// /// PDF file stream /// Cancellation token /// ZUGFeRD check result Task HasZugferdAsync(Stream pdfStream, CancellationToken cancellationToken = default); /// /// Checks whether a PDF contains a ZUGFeRD XML attachment (Base64). /// /// PDF file as byte array /// Cancellation token /// ZUGFeRD check result Task HasZugferdAsync(byte[] pdfBytes, CancellationToken cancellationToken = default); /// /// Extracts the ZUGFeRD XML from a PDF and returns the raw XML stream (multipart). /// /// PDF file stream /// Cancellation token /// ZUGFeRD XML content as stream Task ExtractZugferdAsync(Stream pdfStream, CancellationToken cancellationToken = default); /// /// Extracts the ZUGFeRD XML from a PDF and returns the raw XML stream (Base64). /// /// PDF file as byte array /// Cancellation token /// ZUGFeRD XML content as stream Task ExtractZugferdAsync(byte[] pdfBytes, CancellationToken cancellationToken = default); /// /// Extracts ZUGFeRD metadata and XML content as a structured result (multipart). /// /// PDF file stream /// Cancellation token /// Structured ZUGFeRD extraction result Task ExtractZugferdAsResultAsync(Stream pdfStream, CancellationToken cancellationToken = default); /// /// Extracts ZUGFeRD metadata and XML content as a structured result (Base64). /// /// PDF file as byte array /// Cancellation token /// Structured ZUGFeRD extraction result Task ExtractZugferdAsResultAsync(byte[] pdfBytes, CancellationToken cancellationToken = default); }