import type { PolicyDecision } from '../types';
import type { DecisionContext } from './engine';
import type { ConsentDefinition, PolicySpec } from './spec';
export interface OPAClient {
    evaluate<T>(decisionPath: string, input: unknown): Promise<T>;
}
export interface OPAEvaluationResult {
    effect?: 'allow' | 'deny';
    reason?: string;
    fieldDecisions?: PolicyDecision['fieldDecisions'];
    requiredConsents?: string[];
}
export interface OPAAdapterOptions<Result = OPAEvaluationResult | null> {
    /**
     * Path fed to the OPA client (e.g., "sigil/authz/allow").
     */
    decisionPath: string;
    /**
     * Optional mapper when the OPA client returns a non-standard payload.
     */
    mapResult?: (value: unknown) => Result;
}
export declare class OPAPolicyAdapter<Result = OPAEvaluationResult | null> {
    private readonly client;
    private readonly options;
    constructor(client: OPAClient, options: OPAAdapterOptions<Result>);
    evaluate(context: DecisionContext, policies: PolicySpec[], engineDecision: PolicyDecision): Promise<PolicyDecision>;
}
export declare function buildOPAInput(context: DecisionContext, policies: PolicySpec[], engineDecision: PolicyDecision): {
    context: DecisionContext;
    decision: PolicyDecision;
    policies: {
        meta: import("./spec").PolicyMeta;
        rules: import("./spec").PolicyRule[];
        fieldPolicies: import("./spec").FieldPolicyRule[] | undefined;
        pii: import("./spec").PIIPolicy | undefined;
        relationships: import("./spec").RelationshipDefinition[] | undefined;
        consents: ConsentDefinition[] | undefined;
        rateLimits: import("./spec").RateLimitDefinition[] | undefined;
    }[];
};
