namespace Kbx.Shared.Configuration;

public sealed record KbxConfigurationIssue(
    string Code,
    string Key,
    string Message,
    bool Fatal);

public sealed record KbxConfigurationValidationResult(
    string Environment,
    string NonSecretFingerprint,
    IReadOnlyList<KbxConfigurationIssue> Issues)
{
    public bool IsValid => Issues.All(x => !x.Fatal);
}

public sealed record KbxDeploymentDescriptor(
    string Environment,
    string ApplicationVersion,
    string KbxContractVersion,
    string NonSecretConfigurationFingerprint,
    DateTimeOffset StartedAt);
