import type { Rating, Dispute, GraphNode, GraphEdge } from './types.js'; export interface Storage { putRating(rating: Rating): void; getRatingsByTarget(target: string): Rating[]; getRatingsByRater(rater: string): Rating[]; getRatingById(id: string): Rating | null; getAllRatings(): Rating[]; deleteRating(id: string): boolean; putDispute(dispute: Dispute): void; getDisputesByRating(ratingId: string): Dispute[]; getOpenDisputes(): Dispute[]; updateDispute(dispute: Dispute): void; upsertNode(node: GraphNode): void; getNode(id: string): GraphNode | null; getAllNodes(): GraphNode[]; getEdges(from?: string, to?: string): GraphEdge[]; rebuildEdges(): void; close(): void; } export declare class MemoryStorage implements Storage { private ratings; private disputes; private nodes; private edges; putRating(r: Rating): void; getRatingsByTarget(target: string): Rating[]; getRatingsByRater(rater: string): Rating[]; getRatingById(id: string): Rating | null; getAllRatings(): Rating[]; deleteRating(id: string): boolean; putDispute(d: Dispute): void; getDisputesByRating(ratingId: string): Dispute[]; getOpenDisputes(): Dispute[]; updateDispute(d: Dispute): void; upsertNode(n: GraphNode): void; getNode(id: string): GraphNode | null; getAllNodes(): GraphNode[]; getEdges(from?: string, to?: string): GraphEdge[]; rebuildEdges(): void; close(): void; } export declare class SqliteStorage implements Storage { private db; constructor(dbPath: string); private migrate; putRating(r: Rating): void; getRatingsByTarget(target: string): Rating[]; getRatingsByRater(rater: string): Rating[]; getRatingById(id: string): Rating | null; getAllRatings(): Rating[]; deleteRating(id: string): boolean; putDispute(d: Dispute): void; getDisputesByRating(ratingId: string): Dispute[]; getOpenDisputes(): Dispute[]; updateDispute(d: Dispute): void; upsertNode(n: GraphNode): void; getNode(id: string): GraphNode | null; getAllNodes(): GraphNode[]; getEdges(from?: string, to?: string): GraphEdge[]; rebuildEdges(): void; close(): void; private rowToRating; private rowToDispute; private rowToNode; } export declare function createStorage(config: { storage: 'sqlite' | 'memory'; dbPath?: string; }): Storage;