refactor: Introduce dedicated Document and Asset types and migrate codebase from DocumentLike.

This commit is contained in:
2025-11-26 00:38:01 +01:00
parent 93dcde471f
commit 342714528a
31 changed files with 282 additions and 442 deletions
@@ -5,14 +5,7 @@ import { DownloadIcon } from '../ui/icons';
import PdfViewer from './PdfViewer';
import { AUDIO_EXTENSIONS, VIDEO_EXTENSIONS } from '../constants/preview';
interface DocumentLike {
id?: string;
title?: string;
mime_type?: string;
filename?: string;
original_name?: string;
[key: string]: unknown;
}
import type { Document } from '../types/documents';
interface DocumentLink {
url?: string;
@@ -36,7 +29,7 @@ interface ContentTabConfig {
type LayoutMode = 'split' | 'stacked' | (string & {});
interface DocumentViewerLayoutProps {
document?: DocumentLike | null;
document?: Document | null;
documentLink?: DocumentLink | null;
summaryProps?: Record<string, unknown>;
metadataPayload?: unknown;