40 lines
883 B
TypeScript
40 lines
883 B
TypeScript
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: {
|
|
login: (credentials: { email: string; password: string }) => Promise<any>;
|
|
logout: () => Promise<any>;
|
|
getToken: (tokenKey: "ACCESS_TOKEN" | "REFRESH_TOKEN") => Promise<string | null>;
|
|
uploadScreenshot: () => {};
|
|
getActiveAppDetails: () => {};
|
|
toggleCloseBtn: (shouldEnable: boolean) => {},
|
|
resizeWindow: (width: number, height: number) => {},
|
|
};
|
|
}
|
|
|
|
|
|
|