import { F } from './hydration-CeGZtiZv.js';
import { UseQueryOptions } from '@tanstack/react-query';

/**
 * Simple function to query Torii instance over sql endpoint.
 *
 * This endpoint is mainly meant to be used as analytical query system.
 * Explore `examples/example-dojo-showcase` for end-to-end usage patterns.
 *
 *
 * @template Input - The type your data have raw, just straight out of sql
 * @template Output - The type that will have your data after going through `formatFn`
 * @param {string} toriiUrl - Torii url
 * @param {string} query - Your raw sql query
 * @param {(rows: Input) => Output} formatFn - Format function callback
 * @returns {Promise<Output>} - Formatted data
 */
declare function queryTorii<Input, Output>(toriiUrl: string, query: string, formatFn: (rows: Input) => Output): Promise<Output>;
/**
 *
 */
declare function useToriiSQLQuery<Output, Input>(query: string, formatFn: (rows: Input) => Output, defaultValue?: UseQueryOptions<Output>["placeholderData"], toriiUrl?: string): {
    data: F<Output>;
    error: Error | null;
    isPending: false;
    isRefetching: boolean;
};

export { queryTorii, useToriiSQLQuery };
