export const CH = { load: "data:load", refresh: "data:refresh", clearCache: "data:clear-cache", update: "data:update", windows: "data:windows", openWindow: "data:open-window", changed: "data:changed", reset: "data:reset", } as const; export type Source = "cache" | "disk" | "network" | "broadcast"; export type Item = { id: string; title: string; updatedAt: number; }; export type LoadResult = { items: Item[]; source: Source; loadedAt: number; }; export type Api = { load(): Promise; refresh(): Promise; clearCache(): Promise<{ ok: boolean }>; update(id: string, title: string): Promise; windows(): Promise; openWindow(): Promise<{ ok: boolean }>; reset(): Promise<{ ok: boolean }>; onChanged(cb: (result: LoadResult) => void): () => void; };