type Statistics = { cpuUsage: number; ramUsage: number; storageUsage: number; }; type StaticData = { totalStorage: number; cpuModel: string; totalMemoryGB: number; }; type View = 'CPU' | 'RAM' | 'STORAGE'; type FrameWindowAction = 'CLOSE' | 'MAXIMIZE' | 'MINIMIZE'; type EventPayloadMapping = { statistics: Statistics; getStaticData: StaticData; changeView: View; sendFrameAction: FrameWindowAction; }; type UnsubscribeFunction = () => void; interface Window { electron: { subscribeStatistics: ( callback: (statistics: Statistics) => void ) => UnsubscribeFunction; getStaticData: () => Promise; subscribeChangeView: ( callback: (view: View) => void ) => UnsubscribeFunction; sendFrameAction: (payload: FrameWindowAction) => void; login: (credentials: { email: string; password: string }) => Promise; getToken: (tokenKey: string) => Promise; }; }