import { type TunnelMode, type TunnelScope, type TunnelStatus } from '../stores/tunnelStore'; interface TunnelStatusResponse { mode: TunnelMode; scope: TunnelScope; projectId: string | null; status: TunnelStatus; url: string | null; error: string | null; binaryInstalled: boolean; isRunning: boolean; hostname: string | null; ottorouterConnected: boolean; } interface TunnelStartResponse { ok: boolean; url?: string | null; message?: string; code?: string; error?: string; } interface TunnelQrResponse { ok: boolean; url?: string; qrCode?: string; error?: string; } export interface TunnelShare { id: string; projectId: string; token: string; url: string; createdAt: number; } export interface TunnelScopeArgs { scope: TunnelScope; mode?: TunnelMode; projectId?: string | null; } /** * Polls daemon tunnel status for one (scope, mode) pair and mirrors it into * that pair's dedicated store slot, so e.g. a quick-mode poll can never * overwrite live managed remote-control state. Refetches on window focus and * every 3s while mounted, keeping the sidebar in sync with changes made from * other surfaces (desktop Machines tab, CLI). */ export declare function useTunnelStatus(args: TunnelScopeArgs): import("@tanstack/react-query").UseQueryResult; export declare function useStartTunnel(args: TunnelScopeArgs): import("@tanstack/react-query").UseMutationResult; export declare function useStopTunnel(args: TunnelScopeArgs): import("@tanstack/react-query").UseMutationResult<{ ok: boolean; message?: string; error?: string; }, Error, void, unknown>; export declare function useTunnelQr(args: TunnelScopeArgs): import("@tanstack/react-query").UseQueryResult; /** * Subscribes to the daemon SSE tunnel stream for one (scope, mode) pair and * mirrors events into that pair's store slot while the sidebar is expanded. */ export declare function useTunnelStream(args: TunnelScopeArgs): { connect: () => () => void; }; /** Lists active managed project shares. */ export declare function useTunnelShares(enabled?: boolean): import("@tanstack/react-query").UseQueryResult; /** Creates a managed project share for the given project. */ export declare function useCreateTunnelShare(): import("@tanstack/react-query").UseMutationResult; /** Revokes a managed project share by id. */ export declare function useRevokeTunnelShare(): import("@tanstack/react-query").UseMutationResult; export {}; //# sourceMappingURL=useTunnel.d.ts.map