diff --git a/src/lib/api.ts b/src/lib/api.ts index 6a3d732..5111a52 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -209,6 +209,11 @@ export interface CalendarEventDetail { participants: Participant[]; } +export interface CalendarCleanupResult { + deleted: number; + protected: number; +} + export type SyncKind = "webdav" | "onedrive" | "dropbox" | "box"; // What the UI sees about a target — NEVER includes the secret (FR-SYNC-6). @@ -318,6 +323,9 @@ export interface AppSettings { retention_max_size_gb: number | null; pst_last_path: string | null; pst_auto_sync: boolean; + // Days of history to import (both a manual Import click and pst_auto_sync); + // null = full mailbox history. + pst_import_range_days: number | null; audio_output_device: string | null; microphone_enabled: boolean; audio_input_device: string | null; @@ -387,6 +395,14 @@ export const api = { invoke("set_recording_retention", { meetingId, record }), acknowledgeRecordingConsent: () => invoke("acknowledge_recording_consent"), + // Live notes (Granola-style redesign): both live-session only, err once + // the meeting is finalized — use updateNotes on the merged notes.md instead. + updateLiveNotes: (meetingId: MeetingId, markdown: string) => + invoke("update_live_notes", { meetingId, markdown }), + // anchorMs: the clicked segment's start_ms (not its id). text: "" clears it. + setSegmentNote: (meetingId: MeetingId, anchorMs: number, text: string) => + invoke("set_segment_note", { meetingId, anchorMs, text }), + appInfo: () => invoke("app_info"), openUrl: (url: string) => invoke("open_url", { url }), hardwareStatus: () => invoke("hardware_status"), @@ -458,7 +474,15 @@ export const api = { invoke("confirm_action_items", { meetingId, items }), generateTags: (meetingId: MeetingId) => invoke("generate_tags", { meetingId }), - importPst: (path: string, password?: string) => invoke("import_pst", { path, password }), + // rangeDays: only import events starting within the last N days; omitted/undefined imports + // the full mailbox history (a long-lived .pst otherwise re-imports years of recurring/holiday + // entries on every launch when pst_auto_sync is on). + importPst: (path: string, password?: string, rangeDays?: number) => + invoke("import_pst", { path, password, rangeDays }), + // olderThanDays: undefined deletes every unlinked event ("Delete all"). + // An event attached to a recorded meeting is always kept either way. + cleanupCalendarEvents: (olderThanDays?: number) => + invoke("cleanup_calendar_events", { olderThanDays }), listCalendarEvents: (from?: number, to?: number) => invoke("list_calendar_events", { from, to }), getCalendarEvent: (eventId: string) =>