declare type MongoQuery = { required: string[]; }; declare type PerformQuery = { perform(relative: (name: string, shouldPrefix: boolean) => string): Record; }; declare type SortType = Record; export declare type ProjectionType = Record; export declare type QueryType = Record; export declare type Relation = { local: string | null; foreign: string | null; from: string; to: string; toAlias?: string; weight?: number; }; declare type Computed = { mapper?: boolean; required: string[]; result: string[]; perform(relative: (name: string, shouldPrefix: boolean) => string): Record; }; export declare type Options = { aliases?: Record; computed?: Record; limit?: number; projection?: ProjectionType; query?: QueryType; relations?: Relation[]; skip?: number; sort?: SortType; start: string; typeMap?: Record; }; declare type GroupStep = { group: unknown; }; declare type LimitStep = { limit: number; }; declare type MatchStep = { match: unknown; }; declare type ProjectionStep = { projection: ProjectionType; }; declare type RelationStep = { relation: Relation; }; declare type SkipStep = { skip: number; }; declare type SortStep = { sort: SortType; }; declare type Step = GroupStep | LimitStep | MatchStep | ProjectionStep | RelationStep | SkipStep | SortStep; export declare function build(options: Options): ({ $group: unknown; } | { $limit: number; } | { $match: unknown; } | { $project: ProjectionType; } | { $lookup: { as: string; foreignField: string | null; from: string | undefined; localField: string | null; }; $unwind?: undefined; } | { $unwind: { path: string; preserveNullAndEmptyArrays: boolean; }; $lookup?: undefined; } | { $skip: number; } | { $sort: SortType; })[]; export declare function prepare({ aliases, computed, limit, projection, query, relations, skip, sort, start, }: Options): Step[]; export declare function translate(start: string, steps: Step[]): ({ $group: unknown; } | { $limit: number; } | { $match: unknown; } | { $project: ProjectionType; } | { $lookup: { as: string; foreignField: string | null; from: string | undefined; localField: string | null; }; $unwind?: undefined; } | { $unwind: { path: string; preserveNullAndEmptyArrays: boolean; }; $lookup?: undefined; } | { $skip: number; } | { $sort: SortType; })[]; export {};