UNPKG

virtue-cli

Version:

Personal character development CLI tool for tracking virtues and philosophical alignment

42 lines 2.21 kB
import SQLite from 'better-sqlite3'; import { Profile, Virtue, DailyEntry, Session, MonthlyDeepDive } from '../types/index.js'; export declare class Database { private db; private static migrationCompleted; private dbPath; constructor(dbPath?: string); getDatabase(): SQLite.Database; waitForMigrations(): Promise<void>; private initialize; private runMigrationsWithLock; private runMigrations; private migrateVirtueVersioning; private migrateExistingVirtuesToVersions; private migrateAutoExport; createProfile(profile: Omit<Profile, 'id' | 'created_at' | 'updated_at'>): Promise<Profile>; getProfile(id: string): Profile | null; getAllProfiles(): Profile[]; hasProfiles(): boolean; updateProfile(id: string, updates: Partial<Profile>): Profile | null; deleteProfile(id: string): boolean; createVirtue(virtue: Omit<Virtue, 'id' | 'created_at'>): Promise<Virtue>; private createInitialVirtueVersion; getVirtue(id: string): Virtue | null; getVirtuesForProfile(profileId: string): Virtue[]; createDailyEntry(entry: Omit<DailyEntry, 'id' | 'created_at'>): Promise<DailyEntry>; getDailyEntry(id: string): DailyEntry | null; getDailyEntryByDate(profileId: string, date: string): DailyEntry | null; getEntriesForProfile(profileId: string, cutoffDateOrDays?: Date | number): DailyEntry[]; getLatestEntry(profileId: string): DailyEntry | null; createSession(session: Omit<Session, 'id' | 'created_at'>): Promise<Session>; getSession(id: string): Session | null; createMonthlyDeepDive(deepDive: Omit<MonthlyDeepDive, 'id' | 'created_at'>): Promise<MonthlyDeepDive>; getMonthlyDeepDiveById(id: string): MonthlyDeepDive | null; getMonthlyDeepDiveByMonth(profileId: string, month: string): MonthlyDeepDive | null; calculateCurrentStreak(profileId: string): number; calculateAverageCoherence(profileId: string, days?: number): number; createMonthlyDeepDiveSimple(profileId: string, month: string, analysisData: string, interventionPlan: string | null): string; getAllMonthlyDeepDives(profileId: string): MonthlyDeepDive[]; close(): void; } //# sourceMappingURL=Database.d.ts.map