export type UUID = string; export type TimeRange = { start: string; // ISO date end: string; // ISO date }; export type TimePoint = { time: string; // ISO datetime }; export type TimeRecurring = | { mode: "daily"; } | { mode: "weekly"; start?: number; end?: number; }; export type Time = | (TimeRange & { type: "range" }) | (TimePoint & { type: "point" }) | (TimeRecurring & { type: "recurring" }); export type TodoData = { title: string; note: string; time?: Time; tags?: UUID[]; category?: UUID; checks?: string[]; // ISO dates }; export type Todo = TodoData & { uuid: UUID }; export type Label = { uuid: UUID; name: string; color: string; // "#RRGGBB" }; export type Category = Label & { icon: string; }; export type PushSubscriptionJSON = { endpoint: string; expirationTime?: number | null; keys: { auth: string; p256dh: string; }; };