using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using PromotionExchangeDAL.DTO; namespace PromotionExchangeBLL; public interface IPromotionExchangeBLL { /// Uploads a package on behalf of whoever authenticates as originApiKey, addressed to /// destinationEnvironmentCode. Throws if the API key doesn't resolve to an active party, or if /// the destination isn't a registered party. Task UploadPackageAsync( string originApiKey, string destinationEnvironmentCode, byte[] packageBytes, CancellationToken ct); /// Lists packages waiting for whoever authenticates as destinationApiKey — the /// destination is always the caller's OWN resolved identity, never a request parameter, so a /// party can only ever see its own pending packages. Task> ListPendingAsync(string destinationApiKey, CancellationToken ct); /// Downloads and marks-collected a specific package — only if it's actually addressed /// to whoever authenticates as destinationApiKey (scoped by that resolved identity, not a /// client-supplied destination), so a party can't fetch another party's package by guessing an /// id. Throws if not found for that destination. Task DownloadPackageAsync(string destinationApiKey, int packageId, CancellationToken ct); }