UNPKG

@notes-sync/service

Version:

Background service for AI-powered note synchronization

54 lines (53 loc) 1.83 kB
import { AIService } from './ai/ai-service'; import { AIQueryRequest, AIQueryResponse, ViewNotesRequest, ViewNotesResponse } from '@notes-sync/shared'; export declare class NoteInteractor { private notesDir; private noteFile; private aiService?; constructor(notesDir: string, noteFile: string, aiService?: AIService | undefined); writeNewDay(): Promise<void>; private getRecentNotesContext; append(text: string): void; private readNotesFile; private parseDays; private extractSection; private getTodaySection; getPreviousDays(days: number): string[]; getDate(date: Date): string; getTodos(dayText: string): string[]; getNotes(dayText: string): string; addTodo(text: string): Promise<void>; addNote(text: string): Promise<void>; markTodoComplete(todoText: string): boolean; deleteTodo(todoText: string): boolean; searchNotes(query: string, daysBack?: number): Array<{ date: string; context: string; }>; getIncompleteTodos(daysBack?: number): Array<{ date: string; todo: string; }>; archiveCompletedTodos(): number; formatDocument(): { formatted: boolean; changesMade: string[]; }; formatSection(sectionName: string): boolean; validateFormatting(): { isValid: boolean; issues: string[]; }; hasTodaySection(): boolean; checkForMissingDays(): string[]; autoCreateDailySection(force?: boolean): Promise<{ created: boolean; reason: string; }>; getTimeSinceLastEntry(): number; processAIQuery(request: AIQueryRequest): Promise<AIQueryResponse>; private extractFullDayContext; private truncateDayContent; private extractActionableItems; viewNotes(request: ViewNotesRequest): Promise<ViewNotesResponse>; }