import type { CreatePublishJobResponse, DesktopAccountInfo, DesktopPublishTaskListResponse, DesktopRuntimeSessionSyncRequest, ListDesktopPublishTasksParams, } from "@geo/shared-types"; import type { DesktopObservedRequest } from "../shared/network-debug"; import type { DesktopRuntimeSnapshot } from "./types"; export {}; declare global { interface DesktopAppSettings { openAtLogin: boolean; keepRunningInBackground: boolean; } interface Window { desktopBridge: { app: { ping(): Promise; deviceInfo(): Promise<{ device_name: string; os: string; cpu_arch: string; }>; clientId(scope: { tenant_id: number; workspace_id: number; user_id: number; }): Promise; runtimeSnapshot(): Promise; runtimeAccountSnapshot(accountId: string): Promise; bindPublishAccount(platformId: string): Promise; refreshRuntimeAccounts(): Promise; probeRuntimeAccount(accountId: string): Promise; openPublishAccountConsole(account: { id: string; platform: string; platformUid: string; displayName: string; }): Promise; unbindPublishAccount(accountId: string, syncVersion: number): Promise; listPublishTasks(params?: ListDesktopPublishTasksParams): Promise; retryPublishTask(taskId: string): Promise; openExternalUrl(url: string): Promise; openSettingsWindow(): Promise; getAppSettings(): Promise; setAppSetting(key: keyof DesktopAppSettings, value: boolean): Promise; syncRuntimeSession(session: DesktopRuntimeSessionSyncRequest | null): Promise; releaseRuntimeSession(revoke?: boolean): Promise; setWindowMode(mode: "login" | "main", request?: { source?: "auth-state" | "login" | "logout"; animate?: boolean; }): Promise; onRuntimeInvalidated( listener: (event: { reason: "account-health"; at: number; accountId?: string }) => void, ): () => void; onNetworkObserved(listener: (event: DesktopObservedRequest) => void): () => void; }; }; } }