import { PipelineStage } from './stages/stages'; import { Paging, CursorPaging, AggregationPipeline } from '../types'; /** * @builder */ export interface PipelineBuilder { /** * Adds [pipeline stages](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-stages/introduction) to the aggregation pipeline. * * Stages are processed sequentially in the order they are provided, with each stage's output becoming the input for the next stage. * * @public * @documentationMaturity preview * @param stages - Array of [pipeline stages](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-stages/introduction). * @returns PipelineBuilder object */ withStages(stages: PipelineStage[]): PipelineBuilder; /** * Configures pagination for the aggregation pipeline results. * * You can specify either [offset](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#offset-paging) or [cursor pagination](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language#cursor-paging). * * @public * @documentationMaturity preview * @param paging - Pagination configuration. * @returns PipelineBuilder object */ withPaging(paging: Paging | CursorPaging): PipelineBuilder; /** * Builds the aggregation pipeline. * * Run this method after configuring stages and pagination to build the aggregation pipeline. Specify the pipeline as the `pipeline` parameter when calling the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method. * * @public * @documentationMaturity preview * @returns AggregationPipeline object ready for running the aggregation pipeline. */ build(): AggregationPipeline; } export declare function pipelineBuilder(): PipelineBuilder; //# sourceMappingURL=PipelineBuilder.d.ts.map