/**
 * Universal Response Contracts for Vorion API
 * All API responses MUST conform to these shapes.
 */
import type { Timestamp } from '../types.js';
export interface VorionResponse<T = unknown> {
    success: true;
    data: T;
    meta: ResponseMeta;
    trace?: Trace;
    evidence?: EvidenceItem[];
}
export interface VorionErrorResponse {
    success: false;
    error: ApiError;
    meta: ResponseMeta;
    trace?: Trace;
}
export type ApiResponse<T = unknown> = VorionResponse<T> | VorionErrorResponse;
export interface ResponseMeta {
    requestId: string;
    timestamp: Timestamp;
    version?: string;
    pagination?: PaginationMeta;
}
export interface PaginationMeta {
    cursor?: string;
    hasMore: boolean;
    count?: number;
    total?: number;
}
export interface ApiError {
    code: string;
    message: string;
    details?: Record<string, unknown>;
    retryAfter?: number;
}
export interface Trace {
    traceId: string;
    spanId?: string;
    intent?: string;
    rigor?: 'light' | 'standard' | 'deep';
    evaluator?: string;
    ruleHits?: RuleHit[];
    timings?: StepTiming[];
}
export interface RuleHit {
    ruleId: string;
    ruleName: string;
    action: 'allow' | 'deny' | 'escalate' | 'limit' | 'monitor';
    reason?: string;
}
export interface StepTiming {
    step: string;
    durationMs: number;
    status: 'success' | 'failure' | 'skipped';
}
export interface EvidenceItem {
    type: 'input' | 'computed' | 'codepath' | 'external';
    pointer: string;
    summary: string;
    hash?: string;
}
export interface Confidence {
    score: number;
    descriptor: 'very_low' | 'low' | 'medium' | 'high' | 'very_high';
    assumptions: string[];
    invalidityConditions: string[];
}
export declare function createSuccessResponse<T>(data: T, requestId: string, options?: {
    trace?: Trace;
    evidence?: EvidenceItem[];
    pagination?: PaginationMeta;
}): VorionResponse<T>;
export declare function createErrorResponse(code: string, message: string, requestId: string, options?: {
    details?: Record<string, unknown>;
    retryAfter?: number;
    trace?: Trace;
}): VorionErrorResponse;
export declare function isErrorResponse(response: ApiResponse): response is VorionErrorResponse;
//# sourceMappingURL=output.d.ts.map