import { Q as QueryHandlerOptions, F as FormattedResults } from '../index-DqGaV9Ln.js';
import { ResultRecord, Query, StoredObject, CompilerError } from '@ronin/compiler';
import { S as StorableObject } from '../index-DoqAPnhq.js';
import '@ronin/syntax/queries';
import '@ronin/syntax/schema';

declare function runQueriesWithStorageAndTriggers<T extends ResultRecord>(queries: Array<Query>, options: QueryHandlerOptions): Promise<FormattedResults<T>>;
declare function runQueriesWithStorageAndTriggers<T extends ResultRecord>(queries: Record<string, Array<Query>>, options: QueryHandlerOptions): Promise<Record<string, FormattedResults<T>>>;

/**
 * Determines whether the provided value is storable as a binary object, or not.
 *
 * @param value - The value to check.
 *
 * @returns A boolean indicating whether the provided value is storable, or not.
 */
declare const isStorableObject: (value: unknown) => boolean;
/**
 * ## 🚧 For internal use only! 🚧
 *
 * Process `StorableObjectValue`s contained in queries.
 *
 * @param queries - Array of queries that contain `StorableObjectValue`s.
 * @param upload - A function that receives `StorableObject`s and uploads them.
 *
 * @returns Queries with `StorableObjectValue`s replaced by `StoredObject`s.
 */
declare const processStorableObjects: (queries: Array<Query>, upload: (objects: Array<StorableObject>) => Promise<Array<StoredObject>> | Array<StoredObject>) => Promise<Array<Query>>;

interface ClientErrorDetails {
    message: string;
    code: 'JSON_PARSE_ERROR' | 'TRIGGER_REQUIRED' | 'AUTH_INVALID_ACCESS' | CompilerError['code'];
}
declare class ClientError extends Error {
    message: ClientErrorDetails['message'];
    code: ClientErrorDetails['code'];
    constructor(details: ClientErrorDetails);
}

export { ClientError, isStorableObject, processStorableObjects, runQueriesWithStorageAndTriggers as runQueries };
