UNPKG

emotionctl

Version:

A secure terminal-based journaling system designed as a safe space for developers going through heartbreak, breakups, or betrayal

70 lines 1.92 kB
import { JournalEntry } from '../types'; import { AuthManager } from './AuthManager'; export declare class JournalManager { private entries; private config; private journalDir; private configFile; private entriesFile; constructor(authManager?: AuthManager); /** * Initializes the journal */ initialize(password: string): Promise<void>; /** * Loads the journal configuration and entries */ load(password: string): Promise<void>; /** * Saves the journal configuration */ private saveConfig; /** * Saves the journal entries */ private saveEntries; /** * Adds a new journal entry */ addEntry(title: string, content: string, password: string, mood?: string, tags?: string[]): Promise<JournalEntry>; /** * Gets all journal entries */ getEntries(): JournalEntry[]; /** * Gets entries by date */ getEntriesByDate(date: string): JournalEntry[]; /** * Searches entries by term */ searchEntries(term: string): JournalEntry[]; /** * Gets an entry by ID */ getEntryById(id: string): JournalEntry | undefined; /** * Deletes an entry by ID */ deleteEntry(id: string, password: string): Promise<boolean>; /** * Updates an entry */ updateEntry(id: string, updates: Partial<JournalEntry>, password: string): Promise<boolean>; /** * Creates a backup of the journal */ createBackup(password: string, outputPath?: string): Promise<string>; /** * Restores journal from backup */ restoreFromBackup(backupPath: string, password: string): Promise<void>; /** * Gets journal statistics */ getStats(): { totalEntries: number; oldestEntry?: Date; newestEntry?: Date; avgWordsPerEntry: number; }; } //# sourceMappingURL=JournalManager.d.ts.map