namespace Nalu.Web.Enrichers;

public record EnrichmentResult
{
    public string? Value { get; init; }
    public bool WasInvalidated { get; init; }

    public static EnrichmentResult Ok(string? value) => new() { Value = value };
    public static EnrichmentResult NotFound() => new() { WasInvalidated = true };
}

public interface IEnricher
{
    string Name { get; }
    Task<EnrichmentResult> EnrichAsync(string value, CancellationToken ct = default);
}
