@wix/wix-data-items-common 1.0.181 → 1.0.183

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":[],"sources":["../../../src/api/WixDataAggregatePipeline.ts"],"sourcesContent":["import { WixDataAggregateOptions } from './types'\nimport { WixDataResult } from './WixDataResult'\n\nexport interface WixDataAggregatePipeline {\n /**\n * Runs the aggregation and returns the results.\n *\n * The `run()` method returns a Promise that resolves to the results found\n * by the aggregation and some information about the results.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be\n * > used on [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code).\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when running an aggregation.\n * @returns Promise that resolves to the results of the aggregation.\n */\n run(\n options?: WixDataAggregateOptions\n ): Promise<WixDataResult<Record<string, any>>>\n\n /**\n * Limits the number of items or groups the aggregation returns.\n *\n * The `limit()` method defines the number of results an aggregation returns in each\n * page. Only one page of results is retrieved at a time. The `next()`\n * method is used to navigate the pages of a query result.\n *\n * By default, `limit` is set to `50`.\n *\n * The maximum value that `limit()` can accept is `1000`.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be used on [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code).\n * @public\n * @documentationMaturity preview\n * @param limit - Number of items or groups to return.\n * @requiredField limit\n * @returns `WixDataAggregate` object representing the refined aggregation.\n */\n limit(limit: number): WixDataAggregatePipeline\n\n /**\n * Sets the number of items or groups to skip before returning aggregation results.\n *\n * The `skip()` method defines the number of results to skip in the aggregation\n * results before returning new aggregation results.\n *\n * For example, if you perform an aggregation on a collection and 10 groups match\n * your aggregation, but you set `skip` to 3, the results returned will skip\n * the first 3 groups that match and return the 4th through 10th items.\n *\n * By default, `skip` is set to 0.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be\n * > used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections).\n * @public\n * @documentationMaturity preview\n * @param skip - Number of items or groups to skip in the aggregation results before returning the results.\n * @requiredField skip\n * @returns `WixDataAggregate` object representing the refined aggregation.\n */\n skip(skip: number): WixDataAggregatePipeline\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/WixDataAggregatePipeline.ts"],"sourcesContent":["import { WixDataAggregateOptions } from './types'\nimport { WixDataResult } from './WixDataResult'\n\n/**\n * @builder\n */\nexport interface WixDataAggregatePipeline {\n /**\n * Runs the aggregation and returns the results.\n *\n * The `run()` method returns a Promise that resolves to the results found\n * by the aggregation and some information about the results.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be\n * > used on [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code).\n * @public\n * @documentationMaturity preview\n * @param options - Options to use when running an aggregation.\n * @returns Promise that resolves to the results of the aggregation.\n */\n run(\n options?: WixDataAggregateOptions\n ): Promise<WixDataResult<Record<string, any>>>\n\n /**\n * Limits the number of items or groups the aggregation returns.\n *\n * The `limit()` method defines the number of results an aggregation returns in each\n * page. Only one page of results is retrieved at a time. The `next()`\n * method is used to navigate the pages of a query result.\n *\n * By default, `limit` is set to `50`.\n *\n * The maximum value that `limit()` can accept is `1000`.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be used on [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code).\n * @public\n * @documentationMaturity preview\n * @param limit - Number of items or groups to return.\n * @requiredField limit\n * @returns `WixDataAggregate` object representing the refined aggregation.\n */\n limit(limit: number): WixDataAggregatePipeline\n\n /**\n * Sets the number of items or groups to skip before returning aggregation results.\n *\n * The `skip()` method defines the number of results to skip in the aggregation\n * results before returning new aggregation results.\n *\n * For example, if you perform an aggregation on a collection and 10 groups match\n * your aggregation, but you set `skip` to 3, the results returned will skip\n * the first 3 groups that match and return the 4th through 10th items.\n *\n * By default, `skip` is set to 0.\n *\n * > **Note:** Aggregations can only be used on collections you have created. They cannot be\n * > used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections).\n * @public\n * @documentationMaturity preview\n * @param skip - Number of items or groups to skip in the aggregation results before returning the results.\n * @requiredField skip\n * @returns `WixDataAggregate` object representing the refined aggregation.\n */\n skip(skip: number): WixDataAggregatePipeline\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,33 +1,65 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  exports.__esModule = true;
4
- exports.ProjectStage = exports.ProjectFieldBuilder = void 0;
5
+ exports.ProjectStage = void 0;
6
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
5
7
  class ProjectStage {
6
- include(_fieldName) {
7
- throw new Error('Not implemented');
8
+ constructor() {
9
+ (0, _defineProperty2.default)(this, "fields", []);
8
10
  }
9
- exclude(_fieldName) {
10
- throw new Error('Not implemented');
11
+ include(...fieldNames) {
12
+ fieldNames.forEach(fieldName => {
13
+ this.fields.push({
14
+ include: {
15
+ fieldName
16
+ }
17
+ });
18
+ });
19
+ return this;
11
20
  }
12
- project(expression) {
13
- return new ProjectFieldBuilder(this, expression);
21
+ exclude(...fieldNames) {
22
+ fieldNames.forEach(fieldName => {
23
+ this.fields.push({
24
+ exclude: {
25
+ fieldName
26
+ }
27
+ });
28
+ });
29
+ return this;
14
30
  }
15
- addField(_expression, _fieldName) {
16
- throw new Error('Not implemented');
31
+ with(expression, fieldName) {
32
+ this.addField(expression, fieldName);
33
+ return this;
17
34
  }
18
- toProto() {
19
- throw new Error('Not implemented');
35
+ withNested(stage, fieldName) {
36
+ return this.addNestedProjectionField(fieldName, stage.fields);
20
37
  }
21
- }
22
- exports.ProjectStage = ProjectStage;
23
- class ProjectFieldBuilder {
24
- constructor(stage, expression) {
25
- this.stage = stage;
26
- this.expression = expression;
38
+ addField(expression, fieldName) {
39
+ this.fields.push({
40
+ projectionExpression: {
41
+ fieldName,
42
+ expression: expression.toProto()
43
+ }
44
+ });
45
+ return this;
27
46
  }
28
- as(fieldName) {
29
- return this.stage.addField(this.expression, fieldName);
47
+ addNestedProjectionField(fieldName, fields) {
48
+ this.fields.push({
49
+ projectionFields: {
50
+ fieldName,
51
+ fields
52
+ }
53
+ });
54
+ return this;
55
+ }
56
+ toProto() {
57
+ return {
58
+ projection: {
59
+ fields: this.fields
60
+ }
61
+ };
30
62
  }
31
63
  }
32
- exports.ProjectFieldBuilder = ProjectFieldBuilder;
64
+ exports.ProjectStage = ProjectStage;
33
65
  //# sourceMappingURL=ProjectStage.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ProjectStage","include","_fieldName","Error","exclude","project","expression","ProjectFieldBuilder","addField","_expression","toProto","exports","constructor","stage","as","fieldName"],"sources":["../../../../src/api/stages/ProjectStage.ts"],"sourcesContent":["import { Expression } from '../expressions/Expression'\nimport * as apiTypes from '../../types/data-item-types'\nimport { PipelineStage } from './stages'\n\nexport class ProjectStage implements PipelineStage {\n include(_fieldName: string): ProjectStage {\n throw new Error('Not implemented')\n }\n\n exclude(_fieldName: string): ProjectStage {\n throw new Error('Not implemented')\n }\n\n project(expression: Expression): ProjectFieldBuilder {\n return new ProjectFieldBuilder(this, expression)\n }\n\n addField(_expression: Expression, _fieldName: string): ProjectStage {\n throw new Error('Not implemented')\n }\n\n toProto(): apiTypes.Stage {\n throw new Error('Not implemented')\n }\n}\n\nexport class ProjectFieldBuilder {\n constructor(private stage: ProjectStage, private expression: Expression) {}\n\n as(fieldName: string): ProjectStage {\n return this.stage.addField(this.expression, fieldName)\n }\n}\n"],"mappings":";;;;AAIO,MAAMA,YAAY,CAA0B;EACjDC,OAAOA,CAACC,UAAkB,EAAgB;IACxC,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC;EAEAC,OAAOA,CAACF,UAAkB,EAAgB;IACxC,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC;EAEAE,OAAOA,CAACC,UAAsB,EAAuB;IACnD,OAAO,IAAIC,mBAAmB,CAAC,IAAI,EAAED,UAAU,CAAC;EAClD;EAEAE,QAAQA,CAACC,WAAuB,EAAEP,UAAkB,EAAgB;IAClE,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EACpC;EAEAO,OAAOA,CAAA,EAAmB;IACxB,MAAM,IAAIP,KAAK,CAAC,iBAAiB,CAAC;EACpC;AACF;AAACQ,OAAA,CAAAX,YAAA,GAAAA,YAAA;AAEM,MAAMO,mBAAmB,CAAC;EAC/BK,WAAWA,CAASC,KAAmB,EAAUP,UAAsB,EAAE;IAAA,KAArDO,KAAmB,GAAnBA,KAAmB;IAAA,KAAUP,UAAsB,GAAtBA,UAAsB;EAAG;EAE1EQ,EAAEA,CAACC,SAAiB,EAAgB;IAClC,OAAO,IAAI,CAACF,KAAK,CAACL,QAAQ,CAAC,IAAI,CAACF,UAAU,EAAES,SAAS,CAAC;EACxD;AACF;AAACJ,OAAA,CAAAJ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["ProjectStage","constructor","_defineProperty2","default","include","fieldNames","forEach","fieldName","fields","push","exclude","with","expression","addField","withNested","stage","addNestedProjectionField","projectionExpression","toProto","projectionFields","projection","exports"],"sources":["../../../../src/api/stages/ProjectStage.ts"],"sourcesContent":["import { Expression } from '../expressions/Expression'\nimport * as apiTypes from '../../types/data-item-types'\nimport { PipelineStage } from './stages'\n\nexport class ProjectStage implements PipelineStage {\n fields: apiTypes.Field[] = []\n\n include(...fieldNames: string[]): ProjectStage {\n fieldNames.forEach((fieldName) => {\n this.fields.push({ include: { fieldName } })\n })\n return this\n }\n\n exclude(...fieldNames: string[]): ProjectStage {\n fieldNames.forEach((fieldName) => {\n this.fields.push({ exclude: { fieldName } })\n })\n return this\n }\n\n with(expression: Expression, fieldName: string): ProjectStage {\n this.addField(expression, fieldName)\n return this\n }\n\n withNested(stage: ProjectStage, fieldName: string): ProjectStage {\n return this.addNestedProjectionField(fieldName, stage.fields)\n }\n\n private addField(expression: Expression, fieldName: string): ProjectStage {\n this.fields.push({\n projectionExpression: { fieldName, expression: expression.toProto() },\n })\n return this\n }\n\n private addNestedProjectionField(\n fieldName: string,\n fields: apiTypes.Field[]\n ): ProjectStage {\n this.fields.push({ projectionFields: { fieldName, fields } })\n return this\n }\n\n toProto(): apiTypes.Stage {\n return { projection: { fields: this.fields } }\n }\n}\n"],"mappings":";;;;;;AAIO,MAAMA,YAAY,CAA0B;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,kBACtB,EAAE;EAAA;EAE7BC,OAAOA,CAAC,GAAGC,UAAoB,EAAgB;IAC7CA,UAAU,CAACC,OAAO,CAAEC,SAAS,IAAK;MAChC,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC;QAAEL,OAAO,EAAE;UAAEG;QAAU;MAAE,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEAG,OAAOA,CAAC,GAAGL,UAAoB,EAAgB;IAC7CA,UAAU,CAACC,OAAO,CAAEC,SAAS,IAAK;MAChC,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC;QAAEC,OAAO,EAAE;UAAEH;QAAU;MAAE,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEAI,IAAIA,CAACC,UAAsB,EAAEL,SAAiB,EAAgB;IAC5D,IAAI,CAACM,QAAQ,CAACD,UAAU,EAAEL,SAAS,CAAC;IACpC,OAAO,IAAI;EACb;EAEAO,UAAUA,CAACC,KAAmB,EAAER,SAAiB,EAAgB;IAC/D,OAAO,IAAI,CAACS,wBAAwB,CAACT,SAAS,EAAEQ,KAAK,CAACP,MAAM,CAAC;EAC/D;EAEQK,QAAQA,CAACD,UAAsB,EAAEL,SAAiB,EAAgB;IACxE,IAAI,CAACC,MAAM,CAACC,IAAI,CAAC;MACfQ,oBAAoB,EAAE;QAAEV,SAAS;QAAEK,UAAU,EAAEA,UAAU,CAACM,OAAO,CAAC;MAAE;IACtE,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEQF,wBAAwBA,CAC9BT,SAAiB,EACjBC,MAAwB,EACV;IACd,IAAI,CAACA,MAAM,CAACC,IAAI,CAAC;MAAEU,gBAAgB,EAAE;QAAEZ,SAAS;QAAEC;MAAO;IAAE,CAAC,CAAC;IAC7D,OAAO,IAAI;EACb;EAEAU,OAAOA,CAAA,EAAmB;IACxB,OAAO;MAAEE,UAAU,EAAE;QAAEZ,MAAM,EAAE,IAAI,CAACA;MAAO;IAAE,CAAC;EAChD;AACF;AAACa,OAAA,CAAArB,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,27 +1,38 @@
1
1
  export class ProjectStage {
2
- include(_fieldName) {
3
- throw new Error('Not implemented');
2
+ constructor() {
3
+ this.fields = [];
4
4
  }
5
- exclude(_fieldName) {
6
- throw new Error('Not implemented');
5
+ include(...fieldNames) {
6
+ fieldNames.forEach((fieldName) => {
7
+ this.fields.push({ include: { fieldName } });
8
+ });
9
+ return this;
7
10
  }
8
- project(expression) {
9
- return new ProjectFieldBuilder(this, expression);
11
+ exclude(...fieldNames) {
12
+ fieldNames.forEach((fieldName) => {
13
+ this.fields.push({ exclude: { fieldName } });
14
+ });
15
+ return this;
10
16
  }
11
- addField(_expression, _fieldName) {
12
- throw new Error('Not implemented');
17
+ with(expression, fieldName) {
18
+ this.addField(expression, fieldName);
19
+ return this;
13
20
  }
14
- toProto() {
15
- throw new Error('Not implemented');
21
+ withNested(stage, fieldName) {
22
+ return this.addNestedProjectionField(fieldName, stage.fields);
16
23
  }
17
- }
18
- export class ProjectFieldBuilder {
19
- constructor(stage, expression) {
20
- this.stage = stage;
21
- this.expression = expression;
24
+ addField(expression, fieldName) {
25
+ this.fields.push({
26
+ projectionExpression: { fieldName, expression: expression.toProto() },
27
+ });
28
+ return this;
22
29
  }
23
- as(fieldName) {
24
- return this.stage.addField(this.expression, fieldName);
30
+ addNestedProjectionField(fieldName, fields) {
31
+ this.fields.push({ projectionFields: { fieldName, fields } });
32
+ return this;
33
+ }
34
+ toProto() {
35
+ return { projection: { fields: this.fields } };
25
36
  }
26
37
  }
27
38
  //# sourceMappingURL=ProjectStage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectStage.js","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;IACvB,OAAO,CAAC,UAAkB;QACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAED,OAAO,CAAC,UAAkB;QACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAED,OAAO,CAAC,UAAsB;QAC5B,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAClD,CAAC;IAED,QAAQ,CAAC,WAAuB,EAAE,UAAkB;QAClD,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAED,OAAO;QACL,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACpC,CAAC;CACF;AAED,MAAM,OAAO,mBAAmB;IAC9B,YAAoB,KAAmB,EAAU,UAAsB;QAAnD,UAAK,GAAL,KAAK,CAAc;QAAU,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE3E,EAAE,CAAC,SAAiB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;IACxD,CAAC;CACF"}
1
+ {"version":3,"file":"ProjectStage.js","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;IAAzB;QACE,WAAM,GAAqB,EAAE,CAAA;IA2C/B,CAAC;IAzCC,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,CAAC,UAAsB,EAAE,SAAiB;QAC5C,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,KAAmB,EAAE,SAAiB;QAC/C,OAAO,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/D,CAAC;IAEO,QAAQ,CAAC,UAAsB,EAAE,SAAiB;QACxD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,oBAAoB,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE;SACtE,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,wBAAwB,CAC9B,SAAiB,EACjB,MAAwB;QAExB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO;QACL,OAAO,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;IAChD,CAAC;CACF"}
@@ -1,5 +1,8 @@
1
1
  import { WixDataAggregateOptions } from './types';
2
2
  import { WixDataResult } from './WixDataResult';
3
+ /**
4
+ * @builder
5
+ */
3
6
  export interface WixDataAggregatePipeline {
4
7
  /**
5
8
  * Runs the aggregation and returns the results.
@@ -1 +1 @@
1
- {"version":3,"file":"WixDataAggregatePipeline.d.ts","sourceRoot":"","sources":["../../../src/api/WixDataAggregatePipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;;;;OAYG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IAE9C;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAA;IAE9C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAAA;CAC7C"}
1
+ {"version":3,"file":"WixDataAggregatePipeline.d.ts","sourceRoot":"","sources":["../../../src/api/WixDataAggregatePipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;;;;;;OAYG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;IAE9C;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAA;IAE9C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAAA;CAC7C"}
@@ -2,16 +2,13 @@ import { Expression } from '../expressions/Expression';
2
2
  import * as apiTypes from '../../types/data-item-types';
3
3
  import { PipelineStage } from './stages';
4
4
  export declare class ProjectStage implements PipelineStage {
5
- include(_fieldName: string): ProjectStage;
6
- exclude(_fieldName: string): ProjectStage;
7
- project(expression: Expression): ProjectFieldBuilder;
8
- addField(_expression: Expression, _fieldName: string): ProjectStage;
5
+ fields: apiTypes.Field[];
6
+ include(...fieldNames: string[]): ProjectStage;
7
+ exclude(...fieldNames: string[]): ProjectStage;
8
+ with(expression: Expression, fieldName: string): ProjectStage;
9
+ withNested(stage: ProjectStage, fieldName: string): ProjectStage;
10
+ private addField;
11
+ private addNestedProjectionField;
9
12
  toProto(): apiTypes.Stage;
10
13
  }
11
- export declare class ProjectFieldBuilder {
12
- private stage;
13
- private expression;
14
- constructor(stage: ProjectStage, expression: Expression);
15
- as(fieldName: string): ProjectStage;
16
- }
17
14
  //# sourceMappingURL=ProjectStage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAIzC,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAIzC,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,mBAAmB;IAIpD,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,YAAY;IAInE,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B;AAED,qBAAa,mBAAmB;IAClB,OAAO,CAAC,KAAK;IAAgB,OAAO,CAAC,UAAU;gBAAvC,KAAK,EAAE,YAAY,EAAU,UAAU,EAAE,UAAU;IAEvE,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;CAGpC"}
1
+ {"version":3,"file":"ProjectStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,YAAa,YAAW,aAAa;IAChD,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAK;IAE7B,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY;IAO9C,OAAO,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY;IAO9C,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY;IAK7D,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY;IAIhE,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,wBAAwB;IAQhC,OAAO,IAAI,QAAQ,CAAC,KAAK;CAG1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.181",
3
+ "version": "1.0.183",
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": "575c3700692b11822c4dff69cbac9c0dfb0345015ba482bfed9d8793"
88
+ "falconPackageHash": "4646b119fdd926c99e739d0a70a3e127f7d8a1960e301b943b7f2592"
89
89
  }