1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// 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<string, unknown>;
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;
}
|