feat(storage): add shared package types and configuration

Add missing tsconfig.json and source files for @storage/shared package
to fix type-check failures. Includes type definitions for StorageFile,
StorageFolder, FileVersion, Share, Tag, and FileTag interfaces.
This commit is contained in:
Wuesteon 2025-12-03 00:04:35 +01:00
parent 6cc9f70a4a
commit 2635281fd4
3 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1 @@
export * from './types';

View file

@ -0,0 +1,72 @@
export interface StorageFile {
id: string;
userId: string;
name: string;
originalName: string;
mimeType: string;
size: number;
storagePath: string;
storageKey: string;
parentFolderId: string | null;
currentVersion: number;
isFavorite: boolean;
isDeleted: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface StorageFolder {
id: string;
userId: string;
name: string;
description: string | null;
parentFolderId: string | null;
path: string;
depth: number;
isFavorite: boolean;
isDeleted: boolean;
deletedAt: Date | null;
createdAt: Date;
updatedAt: Date;
}
export interface FileVersion {
id: string;
fileId: string;
versionNumber: number;
storagePath: string;
storageKey: string;
size: number;
comment: string | null;
createdBy: string;
createdAt: Date;
}
export interface Share {
id: string;
userId: string;
fileId: string | null;
folderId: string | null;
shareType: 'file' | 'folder';
shareToken: string;
accessLevel: 'view' | 'edit' | 'download';
password: string | null;
maxDownloads: number | null;
downloadCount: number;
expiresAt: Date | null;
createdAt: Date;
}
export interface Tag {
id: string;
userId: string;
name: string;
color: string;
createdAt: Date;
}
export interface FileTag {
fileId: string;
tagId: string;
}

View file

@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"declarationMap": true,
"noEmit": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}