diff --git a/frontend/src/types/fileContext.ts b/frontend/src/types/fileContext.ts index a7a745c5f..12e911621 100644 --- a/frontend/src/types/fileContext.ts +++ b/frontend/src/types/fileContext.ts @@ -8,26 +8,6 @@ import { FileId, BaseFileMetadata } from './file'; // Re-export FileId for convenience export type { FileId }; -export type ModeType = - | 'viewer' - | 'pageEditor' - | 'fileEditor' - | 'merge' - | 'split' - | 'compress' - | 'ocr' - | 'convert' - | 'sanitize' - | 'addPassword' - | 'changePermissions' - | 'addWatermark' - | 'removePassword' - | 'single-large-page' - | 'repair' - | 'unlockPdfForms' - | 'removeCertificateSign' - | 'auto-rename-pdf-file'; - // Normalized state types export interface ProcessedFilePage { thumbnail?: string; @@ -209,32 +189,6 @@ export function revokeFileResources(record: StirlingFileStub): void { } } -export type OperationType = 'merge' | 'split' | 'compress' | 'add' | 'remove' | 'replace' | 'convert' | 'upload' | 'ocr' | 'sanitize'; - -export interface FileOperation { - id: string; - type: OperationType; - timestamp: number; - fileIds: FileId[]; - status: 'pending' | 'applied' | 'failed'; - data?: any; - metadata?: { - originalFileName?: string; - outputFileNames?: string[]; - fileSize?: number; - pageCount?: number; - error?: string; - }; -} - -export interface FileOperationHistory { - fileId: FileId; - fileName: string; - operations: (FileOperation | PageOperation)[]; - createdAt: number; - lastModified: number; -} - export interface ViewerConfig { zoom: number; currentPage: number; diff --git a/frontend/src/utils/toolOperationTracker.ts b/frontend/src/utils/toolOperationTracker.ts deleted file mode 100644 index b4feb1c8c..000000000 --- a/frontend/src/utils/toolOperationTracker.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { FileId } from '../types/file'; -import { FileOperation } from '../types/fileContext'; - -/** - * Creates operation tracking data for FileContext integration - */ -export const createOperation = ( - operationType: string, - _params: TParams, - selectedFiles: File[] -): { operation: FileOperation; operationId: string; fileId: FileId } => { - const operationId = `${operationType}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; - const fileId = selectedFiles.map(f => f.name).join(',') as FileId; - - const operation: FileOperation = { - id: operationId, - type: operationType, - timestamp: Date.now(), - fileIds: selectedFiles.map(f => f.name), - status: 'pending', - metadata: { - originalFileName: selectedFiles[0]?.name, - fileSize: selectedFiles.reduce((sum, f) => sum + f.size, 0) - } - } as any /* FIX ME*/; - - return { operation, operationId, fileId }; -};