feat(library): add creator wizard, folder picker, and full CRUD

This commit is contained in:
neon
2026-01-14 13:13:07 -06:00
parent 8dea90d966
commit 760cc6476f
28 changed files with 2346 additions and 53 deletions
+2 -1
View File
@@ -1 +1,2 @@
export * from './auth'
export * from './auth';
export * from './library';
+52
View File
@@ -0,0 +1,52 @@
export type OrganizationMode = 'auto' | 'book_per_file' | 'book_per_folder';
export type AccessLevel = 'viewer' | 'editor' | 'owner';
export interface LibraryFolder {
id: number;
path: string;
createdAt: string;
}
export interface Library {
id: number;
name: string;
icon?: string | null;
displayOrder: number;
watch: boolean;
autoScanCronExpression?: string | null;
metadataPrecedence: string[];
formatPriority: string[];
allowedFormats: string[];
organizationMode: OrganizationMode;
excludePatterns: string[];
markAsFinishedSecondsRemaining?: number | null;
markAsFinishedPercentComplete?: number | null;
folders: LibraryFolder[];
createdAt: string;
updatedAt: string;
}
export interface LibraryStats {
totalBooks: number;
totalSizeBytes: number;
formatCounts: Record<string, number>;
}
export interface PrescanPathResult {
path: string;
accessible: boolean;
fileCount: number;
overlapLibrary?: string;
}
export interface PrescanResult {
paths: PrescanPathResult[];
totalFiles: number;
}
export interface LibraryAccessEntry {
userId: number;
username: string;
name: string;
accessLevel: AccessLevel;
}