#nullable enable
namespace Baya.Application.Contracts.Common;

/// <summary>
/// Blob/object storage seam keyed by an opaque storage key. The mock stores blobs on local disk; the
/// real implementation swaps to MinIO/S3/ArvanCloud (presigned URLs) without changing callers.
/// </summary>
public interface IObjectStorage
{
    ValueTask PutAsync(
        string key,
        Stream content,
        string contentType,
        CancellationToken cancellationToken = default);

    ValueTask<Stream?> GetAsync(string key, CancellationToken cancellationToken = default);

    ValueTask DeleteAsync(string key, CancellationToken cancellationToken = default);

    /// <summary>A retrievable URL for the stored object (presigned by the real provider).</summary>
    string GetUrl(string key);
}
