/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
import type { EnvVarStatus } from './useConnectionPackages';
export interface ConnectionOauthDetail {
    appKey: string;
    available: boolean;
    scopes?: string[];
    reason?: 'no_credentials';
}
export interface ConnectionDetail {
    name: string;
    displayName: string;
    description: string | null;
    icon: string | null;
    category: string | null;
    /** From spec.json auth.type — drives which UI branch the page renders. */
    authType: 'bearer' | 'api-key' | 'basic' | 'oauth' | 'none' | string;
    envVars: EnvVarStatus[];
    oauth: ConnectionOauthDetail | null;
}
export interface ConnectionDetailResult {
    data: ConnectionDetail | null;
    error: string | null;
    loading: boolean;
    refetch: () => void;
    saveSecret: (name: string, value: string) => Promise<void>;
}
/**
 * Fetches `/api/connections/:packageName` from the runtime and exposes
 * a `saveSecret` writer that POSTs to `/api/secrets/:name`. Used by the
 * per-connection configure page.
 */
export declare function useConnectionDetail(packageName: string): ConnectionDetailResult;
