/**
 * ORM Client - Runtime GraphQL executor
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import type { GraphQLAdapter, GraphQLError, QueryResult } from '@constructive-io/graphql-query/runtime';
export type { GraphQLAdapter, GraphQLError, QueryResult, } from '@constructive-io/graphql-query/runtime';
/**
 * Default adapter that uses fetch for HTTP requests.
 *
 * When no custom fetch is provided, uses @constructive-io/fetch which
 * handles *.localhost DNS rewriting and Host header preservation in
 * Node.js. Pass a custom fetch to override for test mocking or custom
 * proxy/credentials.
 */
export declare class FetchAdapter implements GraphQLAdapter {
    private endpoint;
    private headers;
    private fetchFn;
    constructor(endpoint: string, headers?: Record<string, string>, fetchFn?: typeof globalThis.fetch);
    execute<T>(document: string, variables?: Record<string, unknown>): Promise<QueryResult<T>>;
    setHeaders(headers: Record<string, string>): void;
    getEndpoint(): string;
}
/**
 * Configuration for creating an ORM client.
 * Either provide endpoint (and optional headers/fetch) for HTTP requests,
 * or provide a custom adapter for alternative execution strategies.
 */
export interface OrmClientConfig {
    /** GraphQL endpoint URL (required if adapter not provided) */
    endpoint?: string;
    /** Default headers for HTTP requests (only used with endpoint) */
    headers?: Record<string, string>;
    /**
     * Custom fetch implementation. Defaults to createFetch() from
     * @constructive-io/graphql-query/runtime which handles *.localhost
     * DNS and Host headers in Node.js. Pass your own for test mocking
     * or custom proxy/credentials.
     */
    fetch?: typeof globalThis.fetch;
    /** Custom adapter for GraphQL execution (overrides endpoint/headers/fetch) */
    adapter?: GraphQLAdapter;
}
/**
 * Error thrown when GraphQL request fails
 */
export declare class GraphQLRequestError extends Error {
    readonly errors: GraphQLError[];
    readonly data: unknown;
    constructor(errors: GraphQLError[], data?: unknown);
}
export declare class OrmClient {
    private adapter;
    constructor(config: OrmClientConfig);
    execute<T>(document: string, variables?: Record<string, unknown>): Promise<QueryResult<T>>;
    /**
     * Set headers for requests.
     * Only works if the adapter supports headers.
     */
    setHeaders(headers: Record<string, string>): void;
    /**
     * Get the endpoint URL.
     * Returns empty string if the adapter doesn't have an endpoint.
     */
    getEndpoint(): string;
}
