@wix/wix-data-items-common 1.0.220 → 1.0.221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PipelineBuilderImpl","constructor","_defineProperty2","default","withStages","stages","withPaging","paging","isCursor","cursorPaging","undefined","offsetPaging","build","map","stage","pipelineBuilder"],"sources":["../../../src/api/PipelineBuilder.ts"],"sourcesContent":["import { PipelineStage } from './stages/stages'\nimport { Paging, CursorPaging, AggregationPipeline } from '../types'\n\n/**\n * @builder\n */\nexport interface PipelineBuilder {\n /**\n * Adds pipeline stages to the aggregation pipeline.\n *\n * Stages are processed sequentially in the order they are provided, with each stage's output becoming the input for the next stage.\n *\n * @public\n * @documentationMaturity preview\n * @param stages - Array of pipeline stages to execute in sequence\n * @returns The PipelineBuilder instance for method chaining\n */\n withStages(stages: PipelineStage[]): PipelineBuilder\n\n /**\n * Configures pagination for the aggregation pipeline results.\n *\n * Supports both offset-based and cursor-based pagination methods. Only one pagination method can be used at a time.\n *\n * @public\n * @documentationMaturity preview\n * @param paging - Pagination configuration - either offset-based (Paging) or cursor-based (CursorPaging)\n * @returns The PipelineBuilder instance for method chaining\n */\n withPaging(paging: Paging | CursorPaging): PipelineBuilder\n\n /**\n * Builds and returns the final aggregation pipeline configuration.\n *\n * This method should be called after configuring stages and pagination to create the complete pipeline ready for execution.\n *\n * @public\n * @documentationMaturity preview\n * @returns Complete AggregationPipeline object ready for execution\n */\n build(): AggregationPipeline\n}\n\nclass PipelineBuilderImpl implements PipelineBuilder {\n private stages: PipelineStage[] = []\n private offsetPaging?: Paging\n private cursorPaging?: CursorPaging\n\n withStages(stages: PipelineStage[]) {\n this.stages = stages\n return this\n }\n\n withPaging(paging: Paging | CursorPaging) {\n const isCursor = 'cursor' in paging\n this.cursorPaging = isCursor ? paging : undefined\n this.offsetPaging = isCursor ? undefined : paging\n return this\n }\n\n build() {\n return {\n stages: this.stages.map((stage) => stage.build()),\n ...(this.offsetPaging && { paging: this.offsetPaging }),\n ...(this.cursorPaging && { cursorPaging: this.cursorPaging }),\n }\n }\n}\n\nexport function pipelineBuilder(): PipelineBuilder {\n return new PipelineBuilderImpl()\n}\n"],"mappings":";;;;;;AAGA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["PipelineBuilderImpl","constructor","_defineProperty2","default","withStages","stages","withPaging","paging","isCursor","cursorPaging","undefined","offsetPaging","build","map","stage","pipelineBuilder"],"sources":["../../../src/api/PipelineBuilder.ts"],"sourcesContent":["import { PipelineStage } from './stages/stages'\nimport { Paging, CursorPaging, AggregationPipeline } from '../types'\n\n/**\n * @builder\n */\nexport interface PipelineBuilder {\n /**\n * Adds pipeline stages to the aggregation pipeline.\n *\n * Stages are processed sequentially in the order they are provided, with each stage's output becoming the input for the next stage.\n *\n * @public\n * @documentationMaturity preview\n * @param stages - Array of pipeline stages to execute in sequence\n * @returns The PipelineBuilder instance for method chaining\n */\n withStages(stages: PipelineStage[]): PipelineBuilder\n\n /**\n * Configures pagination for the aggregation pipeline results.\n *\n * Supports both offset-based and cursor-based pagination methods. Only one pagination method can be used at a time.\n *\n * @public\n * @documentationMaturity preview\n * @param paging - Pagination configuration - either offset-based (Paging) or cursor-based (CursorPaging)\n * @returns The PipelineBuilder instance for method chaining\n */\n withPaging(paging: Paging | CursorPaging): PipelineBuilder\n\n /**\n * Builds and returns the final aggregation pipeline configuration object.\n * The returned object contains all configured stages and pagination settings.\n *\n * This method should be called after configuring stages and pagination to create the complete pipeline ready for execution.\n *\n * @public\n * @documentationMaturity preview\n * @returns Complete AggregationPipeline object ready for execution\n */\n build(): AggregationPipeline\n}\n\nclass PipelineBuilderImpl implements PipelineBuilder {\n private stages: PipelineStage[] = []\n private offsetPaging?: Paging\n private cursorPaging?: CursorPaging\n\n withStages(stages: PipelineStage[]) {\n this.stages = stages\n return this\n }\n\n withPaging(paging: Paging | CursorPaging) {\n const isCursor = 'cursor' in paging\n this.cursorPaging = isCursor ? paging : undefined\n this.offsetPaging = isCursor ? undefined : paging\n return this\n }\n\n build() {\n return {\n stages: this.stages.map((stage) => stage.build()),\n ...(this.offsetPaging && { paging: this.offsetPaging }),\n ...(this.cursorPaging && { cursorPaging: this.cursorPaging }),\n }\n }\n}\n\nexport function pipelineBuilder(): PipelineBuilder {\n return new PipelineBuilderImpl()\n}\n"],"mappings":";;;;;;AAGA;AACA;AACA;;AAuCA,MAAMA,mBAAmB,CAA4B;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,kBACjB,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAIpCC,UAAUA,CAACC,MAAuB,EAAE;IAClC,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,OAAO,IAAI;EACb;EAEAC,UAAUA,CAACC,MAA6B,EAAE;IACxC,MAAMC,QAAQ,GAAG,QAAQ,IAAID,MAAM;IACnC,IAAI,CAACE,YAAY,GAAGD,QAAQ,GAAGD,MAAM,GAAGG,SAAS;IACjD,IAAI,CAACC,YAAY,GAAGH,QAAQ,GAAGE,SAAS,GAAGH,MAAM;IACjD,OAAO,IAAI;EACb;EAEAK,KAAKA,CAAA,EAAG;IACN,OAAO;MACLP,MAAM,EAAE,IAAI,CAACA,MAAM,CAACQ,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACF,KAAK,CAAC,CAAC,CAAC;MACjD,IAAI,IAAI,CAACD,YAAY,IAAI;QAAEJ,MAAM,EAAE,IAAI,CAACI;MAAa,CAAC,CAAC;MACvD,IAAI,IAAI,CAACF,YAAY,IAAI;QAAEA,YAAY,EAAE,IAAI,CAACA;MAAa,CAAC;IAC9D,CAAC;EACH;AACF;AAEO,SAASM,eAAeA,CAAA,EAAoB;EACjD,OAAO,IAAIf,mBAAmB,CAAC,CAAC;AAClC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineBuilder.js","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PipelineBuilder.js","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"AA4CA,MAAM,mBAAmB;IAAzB;QACU,WAAM,GAAoB,EAAE,CAAA;IAuBtC,CAAC;IAnBC,UAAU,CAAC,MAAuB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,MAA6B;QACtC,MAAM,QAAQ,GAAG,QAAQ,IAAI,MAAM,CAAA;QACnC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;QACjD,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAA;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK;QACH,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACjD,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;YACvD,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;SAC9D,CAAA;IACH,CAAC;CACF;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,mBAAmB,EAAE,CAAA;AAClC,CAAC"}
|
|
@@ -27,7 +27,8 @@ export interface PipelineBuilder {
|
|
|
27
27
|
*/
|
|
28
28
|
withPaging(paging: Paging | CursorPaging): PipelineBuilder;
|
|
29
29
|
/**
|
|
30
|
-
* Builds and returns the final aggregation pipeline configuration.
|
|
30
|
+
* Builds and returns the final aggregation pipeline configuration object.
|
|
31
|
+
* The returned object contains all configured stages and pagination settings.
|
|
31
32
|
*
|
|
32
33
|
* This method should be called after configuring stages and pagination to create the complete pipeline ready for execution.
|
|
33
34
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelineBuilder.d.ts","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;OASG;IACH,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,eAAe,CAAA;IAEpD;;;;;;;;;OASG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,eAAe,CAAA;IAE1D
|
|
1
|
+
{"version":3,"file":"PipelineBuilder.d.ts","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;OASG;IACH,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,eAAe,CAAA;IAEpD;;;;;;;;;OASG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,eAAe,CAAA;IAE1D;;;;;;;;;OASG;IACH,KAAK,IAAI,mBAAmB,CAAA;CAC7B;AA4BD,wBAAgB,eAAe,IAAI,eAAe,CAEjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/wix-data-items-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.221",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rimvydas Gimbutas",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"wallaby": {
|
|
86
86
|
"autoDetect": true
|
|
87
87
|
},
|
|
88
|
-
"falconPackageHash": "
|
|
88
|
+
"falconPackageHash": "7cf1874572227ac6b64d39990660c0fb01309756b0f93fdfc06af0a4"
|
|
89
89
|
}
|