import type { OpraFilter } from '@opra/common';
import type { ExecutionContext } from '@opra/core';
import { type Repository } from '@sqb/connect';
import _prepareFilter from './adapter-utils/prepare-filter.js';
/**
 * SQBAdapter namespace provides types and utility functions for integrating SQB with Opra.
 */
export declare namespace SQBAdapter {
    /**
     * Represents a single identifier type.
     */
    type Id = string | number | boolean | Date;
    /**
     * Represents a single identifier or a composite key.
     */
    type IdOrIds = Id | Record<string, Id>;
    /**
     * Represents the input for a filter, which can be an Opra filter expression,
     * a SQB filter object, a string, or undefined.
     */
    type FilterInput = OpraFilter.Expression | Repository.FindManyOptions['filter'] | string | undefined;
    /**
     * Parses the given filter input into a SQB filter expression.
     * @deprecated Use {@link prepareFilter} instead.
     */
    const parseFilter: typeof _prepareFilter;
    /**
     * Prepares the given filter input into a SQB filter expression.
     */
    const prepareFilter: typeof _prepareFilter;
    /**
     * Represents a request that has been transformed for SQB operations.
     */
    interface TransformedRequest {
        /**
         * The operation method name.
         */
        method: 'create' | 'delete' | 'deleteMany' | 'get' | 'replace' | 'findMany' | 'update' | 'updateMany';
        /**
         * The primary key for the operation, if applicable.
         */
        key?: any;
        /**
         * The data object for create or update operations.
         */
        data?: any;
        /**
         * Additional options for the SQB operation.
         */
        options: any;
    }
    /**
     * Parses an execution context and transforms it into a SQB-compatible request.
     *
     * @param context - The execution context to parse.
     * @returns A promise that resolves to the transformed request.
     * @throws {TypeError} If the context transport is not 'http'.
     * @throws {Error} If the operation is not compatible with SQB Adapter.
     */
    function parseRequest(context: ExecutionContext): Promise<TransformedRequest>;
}
