import type { JournalEntry, EntryType, ImportanceResult, EntryRevision, AnchorStatus, Anchor } from '../../types/index.js'; import type { IDatabaseAdapter, CreateEntryInput } from '../core/interfaces.js'; import type { EntriesManager } from './entries/index.js'; import { AdapterDelegates } from './adapter-delegates.js'; /** * SQLite Database Adapter for Memory Journal using better-sqlite3 native driver */ export declare class DatabaseAdapter extends AdapterDelegates implements IDatabaseAdapter { createEntry(input: CreateEntryInput): JournalEntry; getEntryById(id: number, workspaceId?: string): JournalEntry | null; getEntryHistory(id: number): EntryRevision[]; getEntryByIdIncludeDeleted(id: number, workspaceId?: string): JournalEntry | null; getEntriesByIds(ids: number[]): Map; getEntriesByIdsWithImportance(ids: number[]): Map; calculateImportance(entryId: number): ImportanceResult; getRecentEntries(limit?: number, isPersonal?: boolean, sortBy?: 'timestamp' | 'importance', cursor?: string, includeArchived?: boolean, workspaceId?: string, projectNumber?: number, offset?: number): { entries: JournalEntry[]; nextCursor?: string; }; getEntriesPage(offset: number, limit: number): { entries: JournalEntry[]; nextCursor?: string; }; getActiveEntryCount(workspaceId?: string): number; updateEntry(id: number, updates: { content?: string; entryType?: EntryType; tags?: string[]; isPersonal?: boolean; significanceType?: string | null; autoContext?: string | null; projectNumber?: number | null; projectOwner?: string | null; issueNumber?: number | null; issueUrl?: string | null; prNumber?: number | null; prUrl?: string | null; prStatus?: string | null; workflowRunId?: number | null; workflowName?: string | null; workflowStatus?: string | null; isArchived?: boolean; expectedVersion?: number; trustScore?: number; impactScore?: number; validationStatus?: 'passed' | 'failed' | 'none'; workspaceId?: string; targetWorkspaceId?: string; sessionId?: string; }): JournalEntry | null; deleteEntry(id: number, permanent?: boolean, workspaceId?: string): boolean; updateAnchorStatus(id: number, status: AnchorStatus): void; getAnchorsByEntryId(entryId: number): Anchor[]; restoreEntry(id: number, workspaceId?: string): boolean; getDeletedEntries(options?: { limit?: number; offset?: number; workspaceId?: string; }): { entries: JournalEntry[]; count: number; }; createEntries(inputs: CreateEntryInput[]): { created: JournalEntry[]; errors: { index: number; error: Error; }[]; }; updateEntries(updates: { id: number; content?: string; entryType?: EntryType; tags?: string[]; isPersonal?: boolean; significanceType?: string | null; autoContext?: string | null; projectNumber?: number | null; projectOwner?: string | null; issueNumber?: number | null; issueUrl?: string | null; prNumber?: number | null; prUrl?: string | null; prStatus?: string | null; workflowRunId?: number | null; workflowName?: string | null; workflowStatus?: string | null; isArchived?: boolean; expectedVersion?: number; workspaceId?: string; trustScore?: number; impactScore?: number; validationStatus?: 'passed' | 'failed' | 'none'; sessionId?: string; }[]): { updated: JournalEntry[]; notFound: number[]; errors: { id: number; error: Error; }[]; }; deleteEntries(ids: number[], permanent?: boolean, workspaceId?: string): { deleted: number[]; notFound: number[]; errors: { id: number; error: Error; }[]; }; searchEntries(query: string, options?: { limit?: number; isPersonal?: boolean; projectNumber?: number; issueNumber?: number; prNumber?: number; prStatus?: string; workflowRunId?: number; tags?: string[]; entryType?: EntryType; startDate?: string; endDate?: string; sortBy?: 'timestamp' | 'importance'; cursor?: string; includeArchived?: boolean; includeHighlights?: boolean; fuzzy_match?: boolean; auto_correct?: boolean; workspaceId?: string; }): { entries: JournalEntry[]; nextCursor?: string; degraded?: boolean; highlights?: { id: number; snippet: string; }[]; suggestions?: string[]; correctedQuery?: string; }; getSearchFacets(query: string, options?: { isPersonal?: boolean; projectNumber?: number; issueNumber?: number; prNumber?: number; prStatus?: string; workflowRunId?: number; tags?: string[]; entryType?: EntryType; startDate?: string; endDate?: string; includeArchived?: boolean; workspaceId?: string; }): { tags: { name: string; count: number; }[]; entryTypes: { name: string; count: number; }[]; }; searchByDateRange(startDate: string, endDate: string, options?: { entryType?: EntryType; tags?: string[]; isPersonal?: boolean; projectNumber?: number; issueNumber?: number; prNumber?: number; workflowRunId?: number; limit?: number; sortBy?: 'timestamp' | 'importance'; cursor?: string; includeArchived?: boolean; workspaceId?: string; }): { entries: JournalEntry[]; nextCursor?: string; degraded?: boolean; }; getStatistics(groupBy?: 'day' | 'week' | 'month' | 'year', startDate?: string, endDate?: string, projectBreakdown?: boolean, workspaceId?: string): ReturnType; getEntriesByProject(projectNumber: number, limit?: number, workspaceId?: string): JournalEntry[]; getEntriesByIssue(issueNumber: number, limit?: number, workspaceId?: string): JournalEntry[]; getEntriesByPR(prNumber: number, limit?: number, workspaceId?: string): JournalEntry[]; getEntriesByWorkflowRun(workflowRunId: number, limit?: number, workspaceId?: string): JournalEntry[]; getEntriesBySession(sessionId: string, limit?: number, workspaceId?: string): JournalEntry[]; } //# sourceMappingURL=database-adapter.d.ts.map