import { Context } from "hono";
import { LoginSession } from "@authhero/adapter-interfaces";
import { Bindings, Variables } from "../types";
export declare const TRY_CONNECTION_STATE_KEY = "try_connection_result";
export interface TryConnectionSuccess {
    status: "success";
    connection_id: string;
    connection_name: string;
    strategy: string;
    userinfo: Record<string, unknown>;
    raw: Record<string, unknown> | null;
    completed_at: string;
}
export interface TryConnectionError {
    status: "error";
    connection_id?: string;
    connection_name?: string;
    strategy?: string;
    error: string;
    error_description?: string;
    completed_at: string;
}
export type TryConnectionResult = TryConnectionSuccess | TryConnectionError;
/**
 * Persist a try-connection outcome onto the originating login session's
 * `state_data` and 302 to the redirect_uri the test client requested,
 * preserving the original state so the result screen can locate the row.
 */
export declare function writeTryConnectionResult(ctx: Context<{
    Bindings: Bindings;
    Variables: Variables;
}>, tenantId: string, loginSession: LoginSession, result: TryConnectionResult): Promise<Response>;
export declare function readTryConnectionResult(loginSession: LoginSession): TryConnectionResult | null;
