/**
 * GraphQL Schema Introspection for URL State Management
 *
 * Fetches GraphQL schema via introspection query at runtime (works behind auth).
 * Caches schema in localStorage + memory for performance.
 */
import { GraphQLSchema } from 'graphql';
import { VariableDefinition } from './graphql-parser';
/**
 * GraphQL Introspection Manager
 *
 * Singleton class that handles schema introspection with caching.
 * Fetches schema once per session and caches for 24 hours.
 */
export declare class GraphQLIntrospector {
    private schema;
    private cacheKey;
    private cacheDuration;
    private schemaVersion;
    /**
     * Fetch GraphQL schema via introspection query
     *
     * @param endpoint - GraphQL endpoint URL
     * @param headers - HTTP headers (e.g., authentication)
     * @param skipCache - Force fresh fetch, ignore cache
     *
     * @example
     * await introspector.fetchSchema(
     *   'http://localhost/api/graphql',
     *   { 'Authorization': 'Bearer token123' }
     * )
     */
    fetchSchema(endpoint: string, headers?: Record<string, string>, skipCache?: boolean): Promise<void>;
    /**
     * Get fields from a GraphQL input object type
     *
     * @param typeName - Name of the input type (e.g., "LogFilterInput")
     * @returns Record of field definitions
     *
     * @example
     * const fields = introspector.getInputTypeFields('LogFilterInput')
     * // {
     * //   severity: { name: 'severity', type: 'array', ... },
     * //   toolType: { name: 'toolType', type: 'array', ... }
     * // }
     */
    getInputTypeFields(typeName: string): Record<string, VariableDefinition>;
    /**
     * Check if a type exists in the schema
     */
    hasType(typeName: string): boolean;
    /**
     * Get the schema (if loaded)
     */
    getSchema(): GraphQLSchema | null;
    /**
     * Check if schema is loaded
     */
    isLoaded(): boolean;
    /**
     * Clear cached schema
     */
    clearCache(): void;
    /**
     * Unwrap GraphQL type to get base type info
     * Handles NonNull and List wrappers
     */
    private unwrapType;
    /**
     * Map GraphQL types to JavaScript types for URL handling
     */
    private mapGraphQLTypeToJS;
    /**
     * Load schema from localStorage cache
     */
    private loadFromCache;
    /**
     * Save schema to localStorage cache
     */
    private saveToCache;
}
/**
 * Singleton introspector instance
 *
 * Use this instance throughout the application to share schema cache
 *
 * @example
 * import { introspector } from '@flamingo/ui-kit/hooks/state'
 *
 * // Initialize after auth
 * await introspector.fetchSchema(endpoint, { Authorization: token })
 *
 * // Get input type fields
 * const fields = introspector.getInputTypeFields('LogFilterInput')
 */
export declare const introspector: GraphQLIntrospector;
//# sourceMappingURL=introspection.d.ts.map