import type { VirtualFS } from '../virtual-fs';
export declare const DEFAULT_FLY_API_BASE_URL = "https://api.fly.io";
export declare const FLY_CONFIG_PATH = "/home/user/.fly/config.yml";
export interface FlyConfig {
    accessToken: string | null;
    lastLogin: string | null;
    appName: string | null;
    rawText: string;
}
export interface FlyCliSession {
    id: string;
    authUrl: string | null;
    accessToken: string | null;
    metadata?: Record<string, unknown>;
}
export interface FlyCurrentUser {
    id?: string;
    email: string | null;
}
export declare function normalizeFlyApiBaseUrl(value?: string | null): string;
export declare function readFlyConfig(vfs: VirtualFS): FlyConfig;
export declare function readFlyAccessToken(vfs: VirtualFS): string | null;
export declare function readFlyAppName(vfs: VirtualFS): string | null;
export declare function writeFlyAccessToken(vfs: VirtualFS, token: string, lastLogin?: string): void;
export declare function writeFlyAppName(vfs: VirtualFS, appName: string): void;
export declare function deleteFlyAccessToken(vfs: VirtualFS): boolean;
export declare function prepareFlyAuthPopup(): Window | null;
export declare function cancelPreparedFlyAuthPopup(): void;
export declare function openFlyAuthWindow(url: string): void;
export declare function startFlyCliSession(apiBaseUrl: string, sessionName: string, options?: {
    signup?: boolean;
    target?: string;
    metadata?: Record<string, unknown>;
}): Promise<FlyCliSession>;
export declare function getFlyCliSessionState(apiBaseUrl: string, sessionId: string): Promise<FlyCliSession>;
export declare function waitForFlyCliSessionToken(apiBaseUrl: string, sessionId: string, options?: {
    signal?: AbortSignal;
    timeoutMs?: number;
    pollIntervalMs?: number;
}): Promise<string>;
export declare function getFlyAuthorizationHeader(token: string): string;
export interface FlyAppSummary {
    id: string;
    name: string;
    organizationSlug: string | null;
    status: string | null;
}
export declare function fetchFlyApps(apiBaseUrl: string, token: string): Promise<FlyAppSummary[]>;
export declare function fetchFlyCurrentUser(apiBaseUrl: string, token: string): Promise<FlyCurrentUser>;
//# sourceMappingURL=fly-auth.d.ts.map