feat: proper sidebar and import persistence
This commit is contained in:
18
src/renderer/types/electron.d.ts
vendored
18
src/renderer/types/electron.d.ts
vendored
@@ -1,5 +1,16 @@
|
||||
// Type definitions for the Electron API exposed via preload
|
||||
|
||||
export interface ImportDefinitionData {
|
||||
id: string;
|
||||
projectId: string;
|
||||
name: string;
|
||||
wxrFilePath: string | null;
|
||||
uploadsFolderPath: string | null;
|
||||
lastAnalysisResult: unknown | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ProjectMetadata {
|
||||
name: string;
|
||||
description?: string;
|
||||
@@ -386,6 +397,13 @@ export interface ElectronAPI {
|
||||
analyzeFile: (filePath: string, uploadsFolder?: string) => Promise<unknown>;
|
||||
selectUploadsFolder: () => Promise<string | null>;
|
||||
};
|
||||
importDefinitions: {
|
||||
create: (name?: string) => Promise<ImportDefinitionData>;
|
||||
get: (id: string) => Promise<ImportDefinitionData | null>;
|
||||
getAll: () => Promise<ImportDefinitionData[]>;
|
||||
update: (id: string, updates: Partial<Pick<ImportDefinitionData, 'name' | 'wxrFilePath' | 'uploadsFolderPath' | 'lastAnalysisResult'>>) => Promise<ImportDefinitionData | null>;
|
||||
delete: (id: string) => Promise<boolean>;
|
||||
};
|
||||
chat: {
|
||||
// API Key Management
|
||||
checkReady: () => Promise<ChatReadyStatus>;
|
||||
|
||||
Reference in New Issue
Block a user