import { GenericObject } from "@mongez/reinforcements"; import { Aggregate, Pipeline } from "../aggregate"; import { Joinable } from "./joinable"; import { ChunkCallback, Filter, PaginationListing } from "./types"; export declare class ModelAggregate extends Aggregate { protected readonly model: any; /** * Constructor */ constructor(model: any); /** * {@inheritDoc} */ get(mapData?: (record: any) => any): Promise; /** * {@inheritdoc} */ chunk(limit: number, callback: ChunkCallback, mapData?: (data: any) => any): Promise; /** * {@inheritDoc} */ first(mapData?: (data: any) => any): Promise; /** * {@inheritDoc} */ last(filters?: Filter): Promise; /** * {@inheritDoc} */ paginate(page?: number, limit?: any): Promise>; /** * Delete records */ delete(): Promise; /** * Perform a join */ joining(joining: string | Joinable, options?: { where?: GenericObject; select?: string[]; pipeline: (GenericObject | Pipeline)[]; as?: string; }): this; /** * Get joinable instance for current model */ protected getJoinable(joinable: string | Joinable): Joinable; /** * Perform a join and count the records of the joined collection */ countJoining(joining: string | Joinable, options?: { where?: GenericObject; select?: string[]; pipeline: (GenericObject | Pipeline)[]; as?: string; }): this; /** * Join the given alias */ with(alias: string, ...moreParams: any[]): this; /** * Clone the aggregate model class */ clone(): this; } //# sourceMappingURL=ModelAggregate.d.ts.map