import type { QualityIntelligence } from "@oscharko-dev/keiko-contracts";
import type { NextReviewState, QualityIntelligenceReviewTransitionEvent } from "./stateMachine.js";
export declare const QUALITY_INTELLIGENCE_REVIEW_AUDIT_EVENT_SCHEMA_VERSION: 1;
export type QualityIntelligenceReviewAuditEventKind = "qi:review:opened" | "qi:review:transitioned" | "qi:review:four-eyes-paired" | "qi:review:terminated";
export declare const QUALITY_INTELLIGENCE_REVIEW_AUDIT_EVENT_KINDS: readonly QualityIntelligenceReviewAuditEventKind[];
export interface QualityIntelligenceReviewOpenedPayload {
    readonly kind: "qi:review:opened";
    readonly reviewerKind: QualityIntelligence.QualityIntelligenceReviewerKind;
}
export interface QualityIntelligenceReviewTransitionedPayload {
    readonly kind: "qi:review:transitioned";
    readonly from: QualityIntelligence.QualityIntelligenceReviewState;
    readonly to: QualityIntelligence.QualityIntelligenceReviewState;
    readonly event: QualityIntelligenceReviewTransitionEvent;
}
export interface QualityIntelligenceReviewFourEyesPairedPayload {
    readonly kind: "qi:review:four-eyes-paired";
    readonly pairedRecordId: QualityIntelligence.QualityIntelligenceReviewRecordId;
}
export interface QualityIntelligenceReviewTerminatedPayload {
    readonly kind: "qi:review:terminated";
    readonly terminalState: QualityIntelligence.QualityIntelligenceReviewState;
}
export type QualityIntelligenceReviewAuditEventPayload = QualityIntelligenceReviewOpenedPayload | QualityIntelligenceReviewTransitionedPayload | QualityIntelligenceReviewFourEyesPairedPayload | QualityIntelligenceReviewTerminatedPayload;
export interface QualityIntelligenceReviewAuditEvent {
    readonly eventSchemaVersion: typeof QUALITY_INTELLIGENCE_REVIEW_AUDIT_EVENT_SCHEMA_VERSION;
    readonly runId: QualityIntelligence.QualityIntelligenceRunId;
    readonly recordId: QualityIntelligence.QualityIntelligenceReviewRecordId;
    /** Monotonic per-run non-negative integer. Assigned by the runtime. */
    readonly sequence: number;
    /** ISO 8601 timestamp supplied by the caller. */
    readonly timestamp: string;
    /** Display-only actor label. NO PII guarantee — same rule as reviewerLabel. */
    readonly by: string;
    readonly payload: QualityIntelligenceReviewAuditEventPayload;
}
export interface BuildReviewAuditEventInput {
    readonly runId: QualityIntelligence.QualityIntelligenceRunId;
    readonly recordId: QualityIntelligence.QualityIntelligenceReviewRecordId;
    readonly sequence: number;
    readonly timestamp: string;
    readonly by: string;
    readonly payload: QualityIntelligenceReviewAuditEventPayload;
}
/**
 * Build a frozen audit-event envelope. Pure: does not consult any clock, does
 * not allocate beyond the returned envelope, does not validate `timestamp`
 * beyond presence. The runtime (#273) assigns `sequence` in observed order;
 * callers should pass the next integer for the run.
 *
 * Throws `RangeError` if `sequence` is not a non-negative integer — this is
 * the same guarantee as `assertRunEventSequenceMonotonic`.
 */
export declare const buildReviewAuditEvent: (input: BuildReviewAuditEventInput) => QualityIntelligenceReviewAuditEvent;
/**
 * Convenience derivation: build the `qi:review:transitioned` payload from a
 * `NextReviewState` produced by `applyReviewTransition`. Exposed so the
 * runtime can compose the two pure functions without re-deriving fields.
 */
export declare const transitionedPayloadFromNext: (next: NextReviewState) => QualityIntelligenceReviewTransitionedPayload;
//# sourceMappingURL=auditEvents.d.ts.map