import { type Ref } from 'vue';
export type S2RuntimeInputMode = 'sql' | 'token';
export type WhenRuntime = boolean | (() => boolean) | ((params: any) => boolean);
export type S2QueryRuntimeArgs = {
    input: S2RuntimeInputMode;
    endpoint: string;
    debounceMs: number;
    headers?: Record<string, string> | undefined;
    callback?: ((rows: any[]) => void) | null | undefined;
    when?: WhenRuntime;
    params: any;
    qs?: string[];
    tokens?: string[];
    guarded?: boolean;
};
export type S2QueryRuntimeHandle<T = any[]> = Ref<T> & {
    executed: boolean;
    loading: boolean;
    error: Error | null;
    last_update: number | null;
    length: number;
    execute: () => S2QueryRuntimeHandle<T>;
    reset: () => S2QueryRuntimeHandle<T>;
};
export declare function s2queryRuntime(args: S2QueryRuntimeArgs): S2QueryRuntimeHandle<any[]>;
