import type { VirtualFS } from '../virtual-fs';
export declare const DEFAULT_NETLIFY_API_BASE_URL = "https://api.netlify.com/api/v1";
export declare const DEFAULT_NETLIFY_WEB_UI_URL = "https://app.netlify.com";
export declare const NETLIFY_CONFIG_PATH = "/home/user/.config/netlify/config.json";
export declare const NETLIFY_LEGACY_CONFIG_PATH = "/home/user/.netlify/config.json";
export declare const NETLIFY_CLI_CLIENT_ID = "d6f37de6614df7ae58664cfca524744d73807a377f5ee71f1a254f78412e3750";
export interface NetlifyStoredUser {
    id: string;
    name: string | null;
    email: string | null;
    accessToken: string | null;
}
export interface NetlifyConfig {
    accessToken: string | null;
    currentUser: NetlifyStoredUser | null;
    path: string | null;
    raw: Record<string, unknown>;
    userId: string | null;
    users: Record<string, NetlifyStoredUser>;
}
export interface NetlifyTicket {
    authorized: boolean;
    clientId: string | null;
    createdAt: string | null;
    id: string;
}
export interface NetlifyTicketExchange {
    accessToken: string | null;
    createdAt: string | null;
    id: string;
    userEmail: string | null;
    userId: string | null;
}
export interface NetlifyCurrentUser {
    email: string | null;
    id: string | null;
    name: string | null;
}
export declare function normalizeNetlifyApiBaseUrl(value?: string | null): string;
export declare function normalizeNetlifyWebUiUrl(value?: string | null): string;
export declare function buildNetlifyAuthorizeUrl(webUiUrl: string, ticketId: string): string;
export declare function readNetlifyConfig(vfs: VirtualFS): NetlifyConfig;
export declare function readNetlifyAccessToken(vfs: VirtualFS): string | null;
export declare function writeNetlifyAccessToken(vfs: VirtualFS, session: {
    accessToken: string;
    email?: string | null;
    name?: string | null;
    userId?: string | null;
}): void;
export declare function deleteNetlifyAccessToken(vfs: VirtualFS): boolean;
export declare function prepareNetlifyAuthPopup(): Window | null;
export declare function cancelPreparedNetlifyAuthPopup(): void;
export declare function openNetlifyAuthWindow(url: string): void;
export declare function createNetlifyTicket(apiBaseUrl: string, options?: {
    clientId?: string;
    message?: string;
}): Promise<NetlifyTicket>;
export declare function getNetlifyTicket(apiBaseUrl: string, ticketId: string): Promise<NetlifyTicket>;
export declare function exchangeNetlifyTicket(apiBaseUrl: string, ticketId: string): Promise<NetlifyTicketExchange>;
export declare function waitForNetlifyTicketAccessToken(apiBaseUrl: string, ticketId: string, options?: {
    pollIntervalMs?: number;
    signal?: AbortSignal;
    timeoutMs?: number;
}): Promise<NetlifyTicketExchange>;
export interface NetlifyAccount {
    id: string;
    slug: string;
    name: string | null;
    type: string | null;
}
export declare function fetchNetlifyAccounts(apiBaseUrl: string, token: string): Promise<NetlifyAccount[]>;
export declare function fetchNetlifyCurrentUser(apiBaseUrl: string, token: string): Promise<NetlifyCurrentUser>;
//# sourceMappingURL=netlify-auth.d.ts.map