// src/preload/index.d.ts export interface ConnectionConfig { id: string name: string host: string port: number auth: string username: string tls: boolean tlsCaPath: string tlsCertPath: string tlsKeyPath: string sshEnabled: boolean sshHost: string sshPort: number sshUsername: string sshPassword: string sshPrivateKeyPath: string cluster: boolean sentinelMasterName: string separator: string order: number createdAt: number color?: string } export interface ElectronAPI { window: { minimize: () => void maximize: () => void close: () => void } theme: { get: () => Promise set: (theme: 'system' | 'dark' | 'light') => void onOsUpdated: (callback: (isDark: boolean) => void) => void } dialog: { openFile: (options: { title?: string; filters?: { name: string; extensions: string[] }[] }) => Promise<{ path: string; content: string } | null> } credential: { encrypt: (text: string) => Promise decrypt: (encoded: string) => Promise } storage: { getConnections: () => Promise saveConnection: (conn: ConnectionConfig) => Promise deleteConnection: (id: string) => Promise reorderConnections: (ids: string[]) => Promise getSettings: () => Promise saveSettings: (settings: any) => Promise } redis: { connect: (id: string, opts: any) => Promise<{ success: boolean; error?: string }> disconnect: (id: string) => Promise execute: (id: string, command: string, args: string[]) => Promise getInfo: (id: string) => Promise scanKeys: (id: string, cursor: string, pattern: string, count: number) => Promise<{ cursor: string; keys: string[] }> getKeyType: (id: string, key: string) => Promise getKeyTTL: (id: string, key: string) => Promise getString: (id: string, key: string) => Promise setString: (id: string, key: string, value: string) => Promise deleteKey: (id: string, key: string) => Promise hashScan: (id: string, key: string, cursor: string, count: number) => Promise<{ cursor: string; fields: [string, string][] }> hashSet: (id: string, key: string, field: string, value: string) => Promise hashDel: (id: string, key: string, field: string) => Promise setTTL: (id: string, key: string, ttl: number) => Promise selectDb: (id: string, db: number) => Promise dbSize: (id: string) => Promise } } declare global { interface Window { electronAPI: ElectronAPI } }