using ZB.MOM.WW.ScadaBridge.Commons.Types.Transport;

namespace ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Transport;

public interface IBundleExporter
{
    /// <summary>
    /// Exports the selected artifacts as an encrypted or plain bundle stream.
    /// </summary>
    /// <param name="selection">Specifies which artifact types and ids to include in the bundle.</param>
    /// <param name="user">Username of the operator performing the export, stamped in the manifest.</param>
    /// <param name="sourceEnvironment">Environment label stamped in the bundle manifest.</param>
    /// <param name="passphrase">Optional passphrase to encrypt the bundle; null produces an unencrypted bundle.</param>
    /// <param name="cancellationToken">Cancellation token.</param>
    /// <returns>A task that resolves to a seeked-to-start stream containing the bundle ZIP archive.</returns>
    Task<Stream> ExportAsync(
        ExportSelection selection,
        string user,
        string sourceEnvironment,
        string? passphrase,
        CancellationToken cancellationToken = default);
}
