@wix/wix-data-items-common 1.0.217 → 1.0.218
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.
|
@@ -4,6 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.pipelineBuilder = pipelineBuilder;
|
|
6
6
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
/**
|
|
8
|
+
* @builder
|
|
9
|
+
*/
|
|
10
|
+
|
|
7
11
|
class PipelineBuilderImpl {
|
|
8
12
|
constructor() {
|
|
9
13
|
(0, _defineProperty2.default)(this, "stages", []);
|
|
@@ -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\nexport interface PipelineBuilder {\n /**\n * Adds pipeline stages to the aggregation pipeline.\n *\n * Stages are processed in the order they are provided, with each stage operating on the output of the previous 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":";;;;;;
|
|
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 in the order they are provided, with each stage operating on the output of the previous 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;;AAsCA,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":"AA2CA,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"}
|
|
@@ -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,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;;;;;;;;OAQG;IACH,KAAK,IAAI,mBAAmB,CAAA;CAC7B;AA4BD,wBAAgB,eAAe,IAAI,eAAe,CAEjD"}
|
|
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;;;;;;;;OAQG;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.218",
|
|
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": "7b71b442b8bcb29d0dc54ac2fd2682399eebb58431a03afe787fc3b9"
|
|
89
89
|
}
|