feat: add board/settings type definitions and Zod validation schemas
This commit is contained in:
64
src/types/board.ts
Normal file
64
src/types/board.ts
Normal 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
5
src/types/settings.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface AppSettings {
|
||||
theme: "light" | "dark" | "system";
|
||||
dataDirectory: string | null;
|
||||
recentBoardIds: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user