@kareemaly/researcher
Version:
CLI tool for web research
19 lines (18 loc) • 752 B
TypeScript
import { SearchResult, ProcessedContent, IStorage, StorageStats } from "../types";
export declare class FileSystemStorage implements IStorage {
private basePath;
private searchesDir;
private contentDir;
constructor({ basePath }: {
basePath: string;
});
initialize(): Promise<void>;
saveSearch(search: SearchResult): Promise<string>;
getSearch(id: string): Promise<SearchResult | null>;
listSearches(): Promise<SearchResult[]>;
saveContent(searchId: string, content: ProcessedContent): Promise<void>;
getContent(searchId: string, url: string): Promise<ProcessedContent | null>;
getStats(): Promise<StorageStats>;
cleanAll(): Promise<number>;
cleanOlderThan(date: Date): Promise<number>;
}