// lib/types.ts — client-safe shapes for the dashboard API. No server imports. import type { SourceKind, SourceSize } from "@/lib/schemas/source"; export interface ClientSource { id: string; kind: SourceKind; label: string; enabled: boolean; config: Record; refreshSeconds: number; position: number; size: SourceSize; cols: number; rows: number; } export interface ClientSnapshot { id: string; sourceId: string; payload: unknown; fetchedAt: string; ok: boolean; error: string | null; } export interface SourceState { source: ClientSource; hasModule: boolean; configured: boolean; snapshot: ClientSnapshot | null; stale?: boolean; } export interface Todo { id: string; title: string; done: boolean; due: string | null; createdAt: string; }