import { Query, NestedQuery, BasicValueQuery, ValueQuery, ShapeQuery } from 'sift';
import { DeepPartial, AnyObject, CollectionItem, AnyValue } from './types/custom_type.types.cjs';

declare type RawQueryType<T = never> = Query<T>;
declare type NestedQueryType<T = never> = NestedQuery<T>;
declare type BasicValueQueryType<T = never> = BasicValueQuery<T>;
declare type ValueQueryType<T = never> = ValueQuery<T>;
declare type ShapeQueryType<T = never> = ShapeQuery<T>;
declare type QueryType<T = never> = DeepPartial<Exclude<NestedQuery<T>, RegExp>>;
declare type ModelQueryType<T = never> = QueryType<T | Record<string, T[any]>> | DeepPartial<T | Record<string, DeepPartial<string | symbol | number | RegExp>>>;
declare type DeepQueryType<T = never> = (T extends AnyObject ? {
    [key in keyof T]?: DeepQueryType<T[key]>;
} : (ModelQueryType<T> | T)) | (ModelQueryType<T> | T);
declare type FindManyQueryType = {
    <Col, TItem extends CollectionItem<Col> = CollectionItem<Col>, TSChema extends TItem | AnyValue = TItem>(col: Col | undefined, query?: DeepQueryType<TItem>, customCondition?: (element: TItem, index: number, _: TItem[], filterFullfil: boolean) => boolean): TItem[];
    <Col, TItem extends CollectionItem<Col> = CollectionItem<Col>, TSchema extends TItem | AnyValue = TItem>(col: Col | undefined, query?: TSchema, customCondition?: (element: TItem, index: number, _: TItem[], filterFullfil: boolean) => boolean): TItem[];
};
declare const findManyQuery: FindManyQueryType;
declare type FindQueryType = {
    <Col, TItem extends CollectionItem<Col> = CollectionItem<Col>, TSChema extends TItem | AnyValue = TItem>(col: Col | undefined, query?: DeepQueryType<TItem>, customCondition?: (element: TItem, index: number, _: TItem[], filterFullfil: boolean) => boolean): TItem | undefined;
    <Col, TItem extends CollectionItem<Col> = CollectionItem<Col>, TSchema extends TItem | AnyValue = TItem>(col: Col | undefined, query?: TSchema, customCondition?: (element: TItem, index: number, _: TItem[], filterFullfil: boolean) => boolean): TItem | undefined;
};
declare const findQuery: FindQueryType;

export { BasicValueQueryType, DeepQueryType, FindManyQueryType, FindQueryType, ModelQueryType, NestedQueryType, QueryType, RawQueryType, ShapeQueryType, ValueQueryType, findManyQuery, findQuery };
