export interface OAuthCallbackResult {
    code?: string;
    access_token?: string;
    refresh_token?: string;
}
export interface OAuthServer {
    /** The port the server is listening on. */
    port: number;
    /** The full callback URL to use as the redirect URI. */
    callbackUrl: string;
    /** Promise that resolves with the code when the callback is received. */
    waitForCallback: () => Promise<OAuthCallbackResult>;
    /** Manually close the server (e.g., on cancellation). */
    close: () => void;
}
/**
 * Start a temporary HTTP server on a random port to receive the OAuth callback.
 * The server listens only on 127.0.0.1 and closes automatically after the
 * callback is received or after a 5-minute timeout.
 */
export declare function startOAuthServer(): Promise<OAuthServer>;
//# sourceMappingURL=oauth-server.d.ts.map