import { Document, Model } from 'mongoose';
export interface QueryOptions {
    q?: string;
    page?: number;
    limit?: number;
    sort?: string;
    select?: string;
    populate?: string;
    [key: string]: any;
}
export interface PaginationResult<T> {
    docs: T[];
    totalDocs: number;
    limit: number;
    page: number;
    totalPages: number;
    hasNextPage: boolean;
    hasPrevPage: boolean;
}
export declare class QueryToolkit<T extends Document> {
    private readonly model;
    private searchFields;
    private filterableFields;
    private selectableFields;
    private populatableFields;
    constructor(model: Model<T>, options?: {
        searchFields?: string[];
        filterableFields?: string[];
        selectableFields?: string[];
        populatableFields?: string[];
    });
    private buildSearchQuery;
    private buildFilterQuery;
    private parseSortString;
    private buildSelectQuery;
    private buildPopulateFields;
    findWithOptions(options?: QueryOptions): Promise<PaginationResult<T>>;
}
