import * as _tanstack_react_query from '@tanstack/react-query';
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.
 * For more informations and examples, head over to `examples/example-vite-react-sql` example
 *
 *
 * @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: _tanstack_react_query.NoInfer<Output>;
    error: Error | null;
    isPending: false;
    isRefetching: boolean;
};

export { queryTorii, useToriiSQLQuery };
