/** * useUpdates Hook * * Manages update checking state with cache persistence. * Update results persist across app restarts until cache expires or is cleared. */ import type { CombinedPlugin, Plugin, PluginUpdateInfo } from '../../core/types/index.js'; import { type ManualUpdateInfo, type UpdateCheckProgress } from '../../workflows/update-check.js'; /** Input can be either legacy Plugin[] or new CombinedPlugin[] */ export type PluginInput = Plugin[] | CombinedPlugin[]; export interface UseUpdatesOptions { plugins?: PluginInput; } export interface UpdatesState { updates: PluginUpdateInfo[]; upToDate: PluginUpdateInfo[]; errors: Array<{ pluginName: string; error: string; }>; skipped: Array<{ pluginName: string; reason: string; }>; manualUpdates: ManualUpdateInfo[]; checkProgress: UpdateCheckProgress | null; loading: boolean; error: string | null; lastChecked: Date | null; /** Number of plugins that used stale cached results due to API errors */ staleCacheCount: number; /** Check updates - accepts either Plugin[] or CombinedPlugin[] */ checkUpdates: (plugins: PluginInput) => Promise; /** Clear all update state and cache */ clearUpdates: () => Promise; removeFromUpdates: (pluginNames: string[]) => void; } /** * Hook for managing update checks */ export declare function useUpdates({ plugins: initialPlugins }?: UseUpdatesOptions): UpdatesState; //# sourceMappingURL=useUpdates.d.ts.map