/// /// declare global { const WINDOWS: boolean; const LINUX: boolean; interface Window { $app: any; AppApi: AppApi; AppApiVr: AppApiVr; WebApi: WebApi; VRCXStorage: VRCXStorage; SQLite: SQLite; LogWatcher: LogWatcher; Discord: Discord; AssetBundleManager: AssetBundleManager; webApiService: webApiService; request: any; configRepository: any; datebase: any; gameLogService: any; crypto: any; sqliteService: any; interopApi: { callDotNetMethod: ( className: any, methodName: any, args: any ) => Promise; }; electron: { openFileDialog: () => Promise; openDirectoryDialog: () => Promise; desktopNotification: ( displayName: string, body?: string, image?: string ) => Promise; onWindowPositionChanged: ( Function: ( event: any, position: { x: number; y: number } ) => void ) => void; onWindowSizeChanged: ( Function: ( event: any, size: { width: number; height: number } ) => void ) => void; onWindowStateChange: ( Function: (event: any, state: { windowState: any }) => void ) => void; restartApp: () => Promise; getWristOverlayWindow: () => Promise; getHmdOverlayWindow: () => Promise; updateVr: ( active: bool, hmdOverlay: bool, wristOverlay: bool, menuButton: bool, overlayHand: int ) => Promise; }; __APP_GLOBALS__: AppGlobals; } interface AppGlobals { debug: boolean; debugWebSocket: boolean; debugUserDiff: boolean; debugPhotonLogging: boolean; debugGameLog: boolean; debugWebRequests: boolean; debugFriendState: boolean; errorNoty: any; dontLogMeOut: boolean; endpointDomain: string; endpointDomainVrchat: string; websocketDomain: string; websocketDomainVrchat: string; } const CefSharp: { PostMessage: (message: any) => void; BindObjectAsync: (...args: string[]) => Promise; BindObject: (name: string) => any; ExecuteScriptAsync: (script: string) => Promise; ExecuteScript: (script: string) => any; RemoveObjectFromCache?: (name: string) => void; DeleteBoundObject?: (name: string) => void; }; const VRCXStorage: { Get(key: string): Promise; Set(key: string, value: string): Promise; Remove(key: string): Promise; GetAll(): Promise; Flush(): Promise; Save(): Promise; Load(): Promise; GetArray(key: string): Promise; SetArray(key: string, value: any[]): Promise; GetObject(key: string): Promise; SetObject(key: string, value: object): Promise; }; const SQLite: { Execute: ( sql: string, args: string ) => Promise<{ Item1: any; Item2: any[] }>; ExecuteJson: (sql: string, args: string) => Promise; ExecuteNonQuery: (sql: string, args: string) => Promise; }; const LogWatcher: { Get(): Promise>; SetDateTill(date: string): Promise; GetLogLines(): Array; Reset(): Promise; }; const Discord: { SetAssets( details: string, state: string, detailsUrl: string, bigIcon: string, bigIconText: string, smallIcon: string, smallIconText: string, startTime: number, endTime: number, partyId: string, partySize: number, partyMaxSize: number, buttonText: string, buttonUrl: string, appId: string, activityType: number ): Promise; SetActive(active: boolean): Promise; }; const AppApi: { // Basic App Functions ShowDevTools(): Promise; SetVR( active: boolean, hmdOverlay: boolean, wristOverlay: boolean, menuButton: boolean, overlayHand: number ): Promise; RefreshVR(): Promise; RestartVR(): Promise; SetZoom(zoomLevel: number): Promise; GetZoom(): Promise; DesktopNotification( boldText: string, text?: string, image?: string ): Promise; RestartApplication(isUpgrade: boolean): Promise; CheckForUpdateExe(): Promise; ExecuteAppFunction(key: string, json: string): Promise; ExecuteVrFeedFunction(key: string, json: string): Promise; ExecuteVrOverlayFunction(key: string, json: string): Promise; FocusWindow(): Promise; ChangeTheme(value: number): Promise; DoFunny(): Promise; GetClipboard(): Promise; SetStartup(enabled: boolean): Promise; CopyImageToClipboard(path: string): Promise; FlashWindow(): Promise; SetUserAgent(): Promise; IsRunningUnderWine(): Promise; // Common Functions MD5File(blob: string): Promise; GetColourFromUserID(userId: string): Promise; SignFile(blob: string): Promise; FileLength(blob: string): Promise; OpenLink(url: string): Promise; GetLaunchCommand(): Promise; IPCAnnounceStart(): Promise; SendIpc(type: string, data: string): Promise; CustomCss(): Promise; CustomScript(): Promise; CurrentCulture(): Promise; CurrentLanguage(): Promise; GetVersion(): Promise; VrcClosedGracefully(): Promise; GetColourBulk(userIds: string[]): Promise>; SetAppLauncherSettings( enabled: boolean, killOnExit: boolean ): Promise; GetFileBase64(path: string): Promise; // Folders GetVRChatAppDataLocation(): Promise; GetVRChatPhotosLocation(): Promise; GetUGCPhotoLocation(path?: string): Promise; GetVRChatScreenshotsLocation(): Promise; GetVRChatCacheLocation(): Promise; OpenVrcxAppDataFolder(): Promise; OpenVrcAppDataFolder(): Promise; OpenVrcPhotosFolder(): Promise; OpenUGCPhotosFolder(ugcPath?: string): Promise; OpenVrcScreenshotsFolder(): Promise; OpenCrashVrcCrashDumps(): Promise; OpenShortcutFolder(): Promise; OpenFolderAndSelectItem( path: string, isFolder?: boolean ): Promise; OpenFolderSelectorDialog(defaultPath?: string): Promise; OpenFileSelectorDialog( defaultPath?: string, defaultExt?: string, defaultFilter?: string ): Promise; // Game Handler OnProcessStateChanged(monitoredProcess: any): Promise; CheckGameRunning(): Promise; IsGameRunning(): Promise; IsSteamVRRunning(): Promise; QuitGame(): Promise; StartGame(arguments: string): Promise; StartGameFromPath(path: string, arguments: string): Promise; // Registry GetVRChatRegistryKey(key: string): Promise; GetVRChatRegistryKeyString(key: string): Promise; SetVRChatRegistryKey( key: string, value: any, typeInt: number ): Promise; GetVRChatRegistry(): Promise>>; SetVRChatRegistry(json: string): Promise; HasVRChatRegistryFolder(): Promise; DeleteVRChatRegistryFolder(): Promise; ReadVrcRegJsonFile(filepath: string): Promise; GetVRChatRegistryJson: () => Promise; // Image Functions PopulateImageHosts(json: string): Promise; GetImage(url: string, fileId: string, version: string): Promise; ResizeImageToFitLimits(base64data: string): Promise; CropAllPrints(ugcFolderPath: string): Promise; CropPrintImage(path: string): Promise; SavePrintToFile( url: string, ugcFolderPath: string, monthFolder: string, fileName: string ): Promise; SaveStickerToFile( url: string, ugcFolderPath: string, monthFolder: string, fileName: string ): Promise; SaveEmojiToFile( url: string, ugcFolderPath: string, monthFolder: string, fileName: string ): Promise; // Screenshot AddScreenshotMetadata( path: string, metadataString: string, worldId: string, changeFilename?: boolean ): Promise; GetExtraScreenshotData( path: string, carouselCache: boolean ): Promise; GetScreenshotMetadata(path: string): Promise; FindScreenshotsBySearch( searchQuery: string, searchType?: number ): Promise; GetLastScreenshot(): Promise; // Moderations GetVRChatModerations( currentUserId: string ): Promise | null>; GetVRChatUserModeration( currentUserId: string, userId: string ): Promise; SetVRChatUserModeration( currentUserId: string, userId: string, type: number ): Promise; // VRC Config ReadConfigFile(): Promise; ReadConfigFileSafe(): Promise; WriteConfigFile(json: string): Promise; // Update DownloadUpdate( fileUrl: string, hashString: string, downloadSize: number ): Promise; CancelUpdate(): Promise; CheckUpdateProgress(): Promise; // Notifications XSNotification( title: string, content: string, timeout: number, opacity: number, image?: string ): Promise; OVRTNotification( hudNotification: boolean, wristNotification: boolean, title: string, body: string, timeout: number, opacity: number, image?: string ): Promise; }; const AppApiVr: { Init(): Promise; VrInit(): Promise; ToggleSystemMonitor(enabled: boolean): Promise; CpuUsage(): Promise; GetVRDevices(): Promise; GetUptime(): Promise; CurrentCulture(): Promise; CustomVrScript(): Promise; IsRunningUnderWine(): Promise; GetExecuteVrFeedFunctionQueue(): Promise>; GetExecuteVrOverlayFunctionQueue(): Promise>; }; const WebApi: { ClearCookies(): Promise; GetCookies(): Promise; SetCookies(cookie: string): Promise; Execute(options: any): Promise<{ Item1: number; Item2: string }>; ExecuteJson(requestJson: string): Promise; }; const AssetBundleManager: { SweepCache(): Promise; GetCacheSize(): Promise; GetVRChatCacheFullLocation( fileId: string, fileVersion: number, variant: string, variantVersion: number ): Promise; CheckVRChatCache( fileId: string, fileVersion: number, variant: string, variantVersion: number ): Promise<{ Item1: number; Item2: boolean; Item3: string }>; DeleteCache( fileId: string, fileVersion: number, variant: string, variantVersion: number ): Promise; DeleteAllCache: () => Promise; }; const webApiService: { clearCookies(): Promise; getCookies(): Promise; setCookies(cookie: string): Promise; execute(options: { url: string; method?: string; uploadFilePUT?: boolean; fileData?: string; fileMIME?: string; headers?: Record; data?: any; }): Promise<{ status: number; data: string }>; }; } export {};