@wix/wix-data-items-common 1.0.214 → 1.0.215

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":["PipelineBuilder","constructor","_defineProperty2","default","withStages","stages","withPaging","paging","isCursor","cursorPaging","undefined","offsetPaging","build","map","stage","exports"],"sources":["../../../src/api/PipelineBuilder.ts"],"sourcesContent":["import { PipelineStage } from './stages/stages'\nimport { Paging, CursorPaging, AggregationPipeline } from '../types'\n\nexport class PipelineBuilder {\n private stages: PipelineStage[] = []\n private offsetPaging?: Paging\n private cursorPaging?: CursorPaging\n\n withStages(stages: PipelineStage[]): PipelineBuilder {\n this.stages = stages\n return this\n }\n\n withPaging(paging: Paging | CursorPaging): PipelineBuilder {\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(): AggregationPipeline {\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"],"mappings":";;;;;;AAGO,MAAMA,eAAe,CAAC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,kBACO,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAIpCC,UAAUA,CAACC,MAAuB,EAAmB;IACnD,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,OAAO,IAAI;EACb;EAEAC,UAAUA,CAACC,MAA6B,EAAmB;IACzD,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,EAAwB;IAC3B,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;AAACM,OAAA,CAAAf,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["PipelineBuilder","constructor","_defineProperty2","default","withStages","stages","withPaging","paging","isCursor","cursorPaging","undefined","offsetPaging","build","map","stage","exports"],"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\nexport class PipelineBuilder implements PipelineBuilder {\n private stages: PipelineStage[] = []\n private offsetPaging?: Paging\n private cursorPaging?: CursorPaging\n\n withStages(stages: PipelineStage[]): PipelineBuilder {\n this.stages = stages\n return this\n }\n\n withPaging(paging: Paging | CursorPaging): PipelineBuilder {\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(): AggregationPipeline {\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"],"mappings":";;;;;;AAwCO,MAAMA,eAAe,CAA4B;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,kBACpB,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;EAAA;EAIpCC,UAAUA,CAACC,MAAuB,EAAmB;IACnD,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,OAAO,IAAI;EACb;EAEAC,UAAUA,CAACC,MAA6B,EAAmB;IACzD,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,EAAwB;IAC3B,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;AAACM,OAAA,CAAAf,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"PipelineBuilder.js","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,eAAe;IAA5B;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"}
1
+ {"version":3,"file":"PipelineBuilder.js","sourceRoot":"","sources":["../../../src/api/PipelineBuilder.ts"],"names":[],"mappings":"AAwCA,MAAM,OAAO,eAAe;IAA5B;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"}
@@ -1,11 +1,42 @@
1
1
  import { PipelineStage } from './stages/stages';
2
2
  import { Paging, CursorPaging, AggregationPipeline } from '../types';
3
- export declare class PipelineBuilder {
4
- private stages;
5
- private offsetPaging?;
6
- private cursorPaging?;
3
+ export interface PipelineBuilder {
4
+ /**
5
+ * Adds pipeline stages to the aggregation pipeline.
6
+ *
7
+ * Stages are processed in the order they are provided, with each stage operating on the output of the previous stage.
8
+ *
9
+ * @public
10
+ * @documentationMaturity preview
11
+ * @param stages - Array of pipeline stages to execute in sequence
12
+ * @returns The PipelineBuilder instance for method chaining
13
+ */
7
14
  withStages(stages: PipelineStage[]): PipelineBuilder;
15
+ /**
16
+ * Configures pagination for the aggregation pipeline results.
17
+ *
18
+ * Supports both offset-based and cursor-based pagination methods. Only one pagination method can be used at a time.
19
+ *
20
+ * @public
21
+ * @documentationMaturity preview
22
+ * @param paging - Pagination configuration - either offset-based (Paging) or cursor-based (CursorPaging)
23
+ * @returns The PipelineBuilder instance for method chaining
24
+ */
8
25
  withPaging(paging: Paging | CursorPaging): PipelineBuilder;
26
+ /**
27
+ * Builds and returns the final aggregation pipeline configuration.
28
+ *
29
+ * This method should be called after configuring stages and pagination to create the complete pipeline ready for execution.
30
+ *
31
+ * @public
32
+ * @documentationMaturity preview
33
+ * @returns Complete AggregationPipeline object ready for execution
34
+ */
9
35
  build(): AggregationPipeline;
10
36
  }
37
+ export declare class PipelineBuilder implements PipelineBuilder {
38
+ private stages;
39
+ private offsetPaging?;
40
+ private cursorPaging?;
41
+ }
11
42
  //# sourceMappingURL=PipelineBuilder.d.ts.map
@@ -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,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAc;IAEnC,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,eAAe;IAKpD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,eAAe;IAO1D,KAAK,IAAI,mBAAmB;CAO7B"}
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;AAED,qBAAa,eAAgB,YAAW,eAAe;IACrD,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,YAAY,CAAC,CAAQ;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAc;CAqBpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.214",
3
+ "version": "1.0.215",
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": "a417ca083b6b45dbc7e432885682332c2938268ae0fb502b7982f4ce"
88
+ "falconPackageHash": "7cb3289eb86025d8b462fbd522c9aecaea666cc7fe4503be5ed425c2"
89
89
  }