using BuildingBlock.Identity.Contracts.Requests;
using BuildingBlock.Identity.Contracts.Responses;
using Thalos.Domain.Contracts;

namespace Thalos.Domain.Decisions;

/// <summary>
/// Defines domain decision boundary for identity policy workflows.
/// </summary>
public interface IIdentityPolicyDecisionService
{
    /// <summary>
    /// Builds policy context request from policy evaluation request.
    /// </summary>
    IdentityPolicyContextRequest BuildPolicyContextRequest(EvaluateIdentityPolicyRequest request);

    /// <summary>
    /// Evaluates policy response from contextual data.
    /// </summary>
    EvaluateIdentityPolicyResponse Evaluate(
        EvaluateIdentityPolicyRequest request,
        IdentityPolicyContextData policyContextData);
}
