import { AggregateCommand, AggregateGeoNearParam, LookupAggregateParam, QueryChainCommand, ReplaceRootParam, SampleAggregateParam, Sort, UnwindParam, bucketAutoParam, bucketParam } from '@alipay/faas-db-builder'; import { CallbackParam, CreateDatabaseOptions } from '../types'; export declare class Aggregate { private readonly options; private readonly collectionName; private readonly builder; constructor(collectionName: string, options: CreateDatabaseOptions); addFields(fields: Record): Aggregate; count(field: string): Aggregate; match(match: QueryChainCommand): Aggregate; group(group: object): Aggregate; sample(sample: SampleAggregateParam): Aggregate; lookup(lookup: LookupAggregateParam): Aggregate; project(project: Record): Aggregate; replaceRoot(root: ReplaceRootParam): Aggregate; sort(sort: Record): Aggregate; limit(limit: number): Aggregate; skip(skip: number): Aggregate; unwind(unwind: string | UnwindParam): Aggregate; geoNear(near: AggregateGeoNearParam): Aggregate; bucket(bucket: bucketParam): Aggregate; bucketAuto(bucketAuto: bucketAutoParam): Aggregate; sortByCount(sortByCount: string | object): Aggregate; end(): Promise; end(param: CallbackParam): void; private getCollectionPath; }