feat: add board/settings type definitions and Zod validation schemas

This commit is contained in:
Your Name
2026-02-15 18:38:05 +02:00
parent 13cda71721
commit 7818a446ca
3 changed files with 130 additions and 0 deletions

64
src/types/board.ts Normal file
View File

@@ -0,0 +1,64 @@
export interface Board {
id: string;
title: string;
color: string;
createdAt: string;
updatedAt: string;
columns: Column[];
cards: Record<string, Card>;
labels: Label[];
settings: BoardSettings;
}
export interface Column {
id: string;
title: string;
cardIds: string[];
width: ColumnWidth;
}
export type ColumnWidth = "narrow" | "standard" | "wide";
export interface Card {
id: string;
title: string;
description: string;
labels: string[];
checklist: ChecklistItem[];
dueDate: string | null;
attachments: Attachment[];
createdAt: string;
updatedAt: string;
}
export interface Label {
id: string;
name: string;
color: string;
}
export interface ChecklistItem {
id: string;
text: string;
checked: boolean;
}
export interface Attachment {
id: string;
name: string;
path: string;
mode: "link" | "copy";
}
export interface BoardSettings {
attachmentMode: "link" | "copy";
}
export interface BoardMeta {
id: string;
title: string;
color: string;
cardCount: number;
columnCount: number;
updatedAt: string;
}

5
src/types/settings.ts Normal file
View File

@@ -0,0 +1,5 @@
export interface AppSettings {
theme: "light" | "dark" | "system";
dataDirectory: string | null;
recentBoardIds: string[];
}