/**
 * Backend-agnostic data route factory.
 *
 * Eliminates boilerplate REST endpoints by wrapping any HazoConnectAdapter
 * into standard GET/POST/PATCH/DELETE handlers that match the request format
 * expected by client hooks (use_validation_rules, use_elements, etc.).
 *
 * Usage:
 *   import { create_data_route } from 'hazo_collab_forms/lib';
 *   import { getHazoConnect } from '@/lib/hazo_connect_setup';
 *
 *   export const { GET, POST, PATCH, DELETE } = create_data_route(getHazoConnect());
 */
import 'server-only';
/** Minimal adapter interface — avoids hard dependency on hazo_connect package */
interface HazoConnectAdapter {
    query(builder: unknown, method?: string, body?: unknown): Promise<unknown>;
    rawQuery(endpoint: string, options?: RequestInit): Promise<unknown>;
    getConfig(): Promise<unknown>;
}
export interface DataRouteOptions {
    /** Optional table whitelist for security. When set, only listed tables are accessible. */
    allowed_tables?: string[];
}
/**
 * Create GET/POST/PATCH/DELETE route handlers backed by any HazoConnectAdapter.
 *
 * Request/response format matches the existing client-side convention:
 *
 * - GET  ?table=X&filter[col]=val&orderBy=col&orderDirection=asc → { data, total }
 * - POST { table, data }                                        → { data }
 * - PATCH { table, criteria, data }                             → { data, updated }
 * - DELETE { table, criteria }                                  → { data, deleted }
 */
export declare function create_data_route(adapter: HazoConnectAdapter, options?: DataRouteOptions): {
    GET: (request: Request) => Promise<Response>;
    POST: (request: Request) => Promise<Response>;
    PATCH: (request: Request) => Promise<Response>;
    DELETE: (request: Request) => Promise<Response>;
};
export {};
//# sourceMappingURL=create_data_route.d.ts.map