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

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":["_Expression","require","expressions","exports","field","fieldPath","FieldExpressionImpl","text","value","TextExpressionImpl","numeric","NumericExpressionImpl","add","AddExpressionImpl","subtract","first","second","SubtractExpressionImpl","multiply","MultiplyExpressionImpl","divide","DivideExpressionImpl","sum","SumExpressionImpl","abs","expression","AbsExpressionImpl","mod","ModExpressionImpl","floor","FloorExpressionImpl","ceil","CeilExpressionImpl","concat","ConcatExpressionImpl","stringify","StringifyExpressionImpl","toLower","ToLowerExpressionImpl","toUpper","ToUpperExpressionImpl","substring","start","length","SubstringExpressionImpl","LengthExpressionImpl"],"sources":["../../../../src/api/expressions/expressions.ts"],"sourcesContent":["import {\n Expression,\n FieldExpression,\n FieldExpressionImpl,\n TextExpression,\n TextExpressionImpl,\n NumericExpression,\n NumericExpressionImpl,\n AddExpression,\n AddExpressionImpl,\n SubtractExpression,\n SubtractExpressionImpl,\n MultiplyExpression,\n MultiplyExpressionImpl,\n DivideExpression,\n DivideExpressionImpl,\n SumExpression,\n SumExpressionImpl,\n AbsExpression,\n AbsExpressionImpl,\n ModExpression,\n ModExpressionImpl,\n FloorExpression,\n FloorExpressionImpl,\n CeilExpression,\n CeilExpressionImpl,\n ConcatExpression,\n ConcatExpressionImpl,\n StringifyExpression,\n StringifyExpressionImpl,\n ToLowerExpression,\n ToLowerExpressionImpl,\n ToUpperExpression,\n ToUpperExpressionImpl,\n SubstringExpression,\n SubstringExpressionImpl,\n LengthExpression,\n LengthExpressionImpl,\n} from './Expression'\n\nexport const expressions: WixDataAggregatePipelineExpressions = {\n field: (fieldPath: string): FieldExpression =>\n new FieldExpressionImpl(fieldPath),\n text: (value: string): TextExpression => new TextExpressionImpl(value),\n numeric: (value: number): NumericExpression =>\n new NumericExpressionImpl(value),\n add: (...expressions: Expression[]): AddExpression =>\n new AddExpressionImpl(expressions),\n subtract: (first: Expression, second: Expression): SubtractExpression =>\n new SubtractExpressionImpl(first, second),\n multiply: (...expressions: Expression[]): MultiplyExpression =>\n new MultiplyExpressionImpl(expressions),\n divide: (first: Expression, second: Expression): DivideExpression =>\n new DivideExpressionImpl(first, second),\n sum: (...expressions: Expression[]): SumExpression =>\n new SumExpressionImpl(expressions),\n abs: (expression: Expression): AbsExpression =>\n new AbsExpressionImpl(expression),\n mod: (first: Expression, second: Expression): ModExpression =>\n new ModExpressionImpl(first, second),\n\n floor: (expression: Expression): FloorExpression =>\n new FloorExpressionImpl(expression),\n ceil: (expression: Expression): CeilExpression =>\n new CeilExpressionImpl(expression),\n concat: (...expressions: Expression[]): ConcatExpression =>\n new ConcatExpressionImpl(expressions),\n stringify: (expression: Expression): StringifyExpression =>\n new StringifyExpressionImpl(expression),\n toLower: (expression: Expression): ToLowerExpression =>\n new ToLowerExpressionImpl(expression),\n toUpper: (expression: Expression): ToUpperExpression =>\n new ToUpperExpressionImpl(expression),\n substring: (\n expression: Expression,\n start: Expression,\n length?: Expression\n ): SubstringExpression =>\n new SubstringExpressionImpl(expression, start, length),\n length: (expression: Expression): LengthExpression =>\n new LengthExpressionImpl(expression),\n}\n\n/**\n * @builder\n */\nexport interface WixDataAggregatePipelineExpressions {\n /**\n * TODO clarify\n * Specifies which field to resolve.\n *\n * The `field()` method configures the aggregation pipeline to resolve the value of the specified field as an expression.\n *\n * @public\n * @documentationMaturity preview\n * @param fieldPath - Path to the field containing the value to resolve. Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @returns FieldExpression object.\n */\n field(fieldPath: string): FieldExpression\n /**\n * Text value.\n *\n * @param value - Text value to run the aggregation on.\n * @returns TextExpression object.\n */\n text(value: string): TextExpression\n /**\n * Numeric value.\n *\n * @param value - Numeric value to run the aggregation on.\n * @returns NumericExpression object.\n */\n numeric(value: number): NumericExpression\n /**\n * Adds the specified expressions.\n *\n * The `add()` method refines the aggregation pipeline to add the values of the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to add together. All expressions must resolve to numbers.\n * @returns AddExpression object.\n */\n add(...expressions: Expression[]): AddExpression\n /**\n * Subtracts 1 expression from another.\n *\n * The `subtract()` method refines the aggregation pipeline to subtract the second expression from the first expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to subtract `second` from. Expression must resolve to a number.\n * @param second - Expression to subtract from `first`. Expression must resolve to a number.\n * @returns SubtractExpression object.\n */\n subtract(first: Expression, second: Expression): SubtractExpression\n /**\n * Multiplies multiple expressions together.\n *\n * The `multiply()` method refines the aggregation pipeline to multiply the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to multiply. All expressions must resolve to numbers.\n * @returns MultiplyExpression object.\n */\n multiply(...expressions: Expression[]): MultiplyExpression\n /**\n * Divides 1 expression by another.\n *\n * The `divide()` method refines the aggregation pipeline to divide the first expression by the second expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to divide by `second`. Expression must resolve to a number.\n * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number.\n * @returns DivideExpression object.\n */\n divide(first: Expression, second: Expression): DivideExpression\n /**\n * Calculates the total sum of multiple expressions.\n *\n * The `sum()` method refines the aggregation pipeline to calculate the total sum of the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to calculate the total sum of. All expressions must resolve to numbers.\n * @returns SumExpression object.\n */\n sum(...expressions: Expression[]): SumExpression\n /**\n * Finds the absolute value of an expression.\n *\n * The `abs()` method refines the aggregation pipeline to find the absolute value of the specified expression.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the absolute value of. Expression must resolve to a number.\n * @returns AbsExpression object.\n */\n abs(expression: Expression): AbsExpression\n /**\n * Finds the remainder when dividing 1 expression by another.\n *\n * The `mod()` method refines the aggregation pipeline to find the remainder when dividing the first expression by the second expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to divide by `second` to find the remainder. Expression must resolve to a number.\n * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number.\n * @returns ModExpression object.\n */\n mod(first: Expression, second: Expression): ModExpression\n /**\n * Rounds an expression down to the nearest whole number.\n *\n * The `floor()` method refines the aggregation pipeline to round the specified expression down to the nearest integer.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to round down to the nearest whole number. Expression must resolve to a number.\n * @returns FloorExpression object.\n */\n floor(expression: Expression): FloorExpression\n /**\n * Rounds an expression up to the nearest whole number.\n *\n * The `ceil()` method refines the aggregation pipeline to round the specified expression up to the nearest integer.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to round up to the nearest whole number. Expression must resolve to a number.\n * @returns CeilExpression object.\n */\n ceil(expression: Expression): CeilExpression\n /**\n * Joins multiple expressions together to create a string\n *\n * The `concat()` method refines the aggregation pipeline to join multiple expressions together to create a new string.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to join together. All expressions must resolve to strings.\n * @returns ConcatExpression object.\n */\n concat(...expressions: Expression[]): ConcatExpression\n /**\n * Converts an expression to a string.\n *\n * The `stringify()` method refines the aggregation pipeline to convert the specified expression to a string.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to a string.\n * @returns StringifyExpression object.\n */\n stringify(expression: Expression): StringifyExpression\n /**\n * Converts an expression to lowercase.\n *\n * The `toLower()` method refines the aggregation pipeline to convert the specified expression to lowercase.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to lowercase. Expression must resolve to a string.\n * @returns ToLowerExpression object.\n */\n toLower(expression: Expression): ToLowerExpression\n /**\n * Converts an expression to uppercase.\n *\n * The `toUpper()` method refines the aggregation pipeline to convert the specified expression to uppercase.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to uppercase. Expression must resolve to a string.\n * @returns ToUpperExpression object.\n */\n toUpper(expression: Expression): ToUpperExpression\n /**\n * Extracts a portion of a string expression.\n *\n * The `substring()` method refines the aggregation pipeline to extract a portion of the specified string expression.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to extract a substring from. Expression must resolve to a string.\n * @param start - Starting position of the substring to extract, specified in zero-based indexing. Expression must resolve to a number.\n * @param length - Number of characters to extract from the starting position. Expression must resolve to a number.\n * @returns SubstringExpression object.\n */\n substring(\n expression: Expression,\n start: Expression,\n length?: Expression\n ): SubstringExpression\n length(expression: Expression): LengthExpression\n}\n"],"mappings":";;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAwCO,MAAMC,WAAgD,GAAAC,OAAA,CAAAD,WAAA,GAAG;EAC9DE,KAAK,EAAGC,SAAiB,IACvB,IAAIC,+BAAmB,CAACD,SAAS,CAAC;EACpCE,IAAI,EAAGC,KAAa,IAAqB,IAAIC,8BAAkB,CAACD,KAAK,CAAC;EACtEE,OAAO,EAAGF,KAAa,IACrB,IAAIG,iCAAqB,CAACH,KAAK,CAAC;EAClCI,GAAG,EAAEA,CAAC,GAAGV,WAAyB,KAChC,IAAIW,6BAAiB,CAACX,WAAW,CAAC;EACpCY,QAAQ,EAAEA,CAACC,KAAiB,EAAEC,MAAkB,KAC9C,IAAIC,kCAAsB,CAACF,KAAK,EAAEC,MAAM,CAAC;EAC3CE,QAAQ,EAAEA,CAAC,GAAGhB,WAAyB,KACrC,IAAIiB,kCAAsB,CAACjB,WAAW,CAAC;EACzCkB,MAAM,EAAEA,CAACL,KAAiB,EAAEC,MAAkB,KAC5C,IAAIK,gCAAoB,CAACN,KAAK,EAAEC,MAAM,CAAC;EACzCM,GAAG,EAAEA,CAAC,GAAGpB,WAAyB,KAChC,IAAIqB,6BAAiB,CAACrB,WAAW,CAAC;EACpCsB,GAAG,EAAGC,UAAsB,IAC1B,IAAIC,6BAAiB,CAACD,UAAU,CAAC;EACnCE,GAAG,EAAEA,CAACZ,KAAiB,EAAEC,MAAkB,KACzC,IAAIY,6BAAiB,CAACb,KAAK,EAAEC,MAAM,CAAC;EAEtCa,KAAK,EAAGJ,UAAsB,IAC5B,IAAIK,+BAAmB,CAACL,UAAU,CAAC;EACrCM,IAAI,EAAGN,UAAsB,IAC3B,IAAIO,8BAAkB,CAACP,UAAU,CAAC;EACpCQ,MAAM,EAAEA,CAAC,GAAG/B,WAAyB,KACnC,IAAIgC,gCAAoB,CAAChC,WAAW,CAAC;EACvCiC,SAAS,EAAGV,UAAsB,IAChC,IAAIW,mCAAuB,CAACX,UAAU,CAAC;EACzCY,OAAO,EAAGZ,UAAsB,IAC9B,IAAIa,iCAAqB,CAACb,UAAU,CAAC;EACvCc,OAAO,EAAGd,UAAsB,IAC9B,IAAIe,iCAAqB,CAACf,UAAU,CAAC;EACvCgB,SAAS,EAAEA,CACThB,UAAsB,EACtBiB,KAAiB,EACjBC,MAAmB,KAEnB,IAAIC,mCAAuB,CAACnB,UAAU,EAAEiB,KAAK,EAAEC,MAAM,CAAC;EACxDA,MAAM,EAAGlB,UAAsB,IAC7B,IAAIoB,gCAAoB,CAACpB,UAAU;AACvC,CAAC;;AAED;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["_Expression","require","expressions","exports","field","fieldPath","FieldExpressionImpl","text","value","TextExpressionImpl","numeric","NumericExpressionImpl","add","AddExpressionImpl","subtract","first","second","SubtractExpressionImpl","multiply","MultiplyExpressionImpl","divide","DivideExpressionImpl","sum","SumExpressionImpl","abs","expression","AbsExpressionImpl","mod","ModExpressionImpl","floor","FloorExpressionImpl","ceil","CeilExpressionImpl","concat","ConcatExpressionImpl","stringify","StringifyExpressionImpl","toLower","ToLowerExpressionImpl","toUpper","ToUpperExpressionImpl","substring","start","length","SubstringExpressionImpl","LengthExpressionImpl"],"sources":["../../../../src/api/expressions/expressions.ts"],"sourcesContent":["import {\n Expression,\n FieldExpression,\n FieldExpressionImpl,\n TextExpression,\n TextExpressionImpl,\n NumericExpression,\n NumericExpressionImpl,\n AddExpression,\n AddExpressionImpl,\n SubtractExpression,\n SubtractExpressionImpl,\n MultiplyExpression,\n MultiplyExpressionImpl,\n DivideExpression,\n DivideExpressionImpl,\n SumExpression,\n SumExpressionImpl,\n AbsExpression,\n AbsExpressionImpl,\n ModExpression,\n ModExpressionImpl,\n FloorExpression,\n FloorExpressionImpl,\n CeilExpression,\n CeilExpressionImpl,\n ConcatExpression,\n ConcatExpressionImpl,\n StringifyExpression,\n StringifyExpressionImpl,\n ToLowerExpression,\n ToLowerExpressionImpl,\n ToUpperExpression,\n ToUpperExpressionImpl,\n SubstringExpression,\n SubstringExpressionImpl,\n LengthExpression,\n LengthExpressionImpl,\n} from './Expression'\n\nexport const expressions: WixDataAggregatePipelineExpressions = {\n field: (fieldPath: string): FieldExpression =>\n new FieldExpressionImpl(fieldPath),\n text: (value: string): TextExpression => new TextExpressionImpl(value),\n numeric: (value: number): NumericExpression =>\n new NumericExpressionImpl(value),\n add: (...expressions: Expression[]): AddExpression =>\n new AddExpressionImpl(expressions),\n subtract: (first: Expression, second: Expression): SubtractExpression =>\n new SubtractExpressionImpl(first, second),\n multiply: (...expressions: Expression[]): MultiplyExpression =>\n new MultiplyExpressionImpl(expressions),\n divide: (first: Expression, second: Expression): DivideExpression =>\n new DivideExpressionImpl(first, second),\n sum: (...expressions: Expression[]): SumExpression =>\n new SumExpressionImpl(expressions),\n abs: (expression: Expression): AbsExpression =>\n new AbsExpressionImpl(expression),\n mod: (first: Expression, second: Expression): ModExpression =>\n new ModExpressionImpl(first, second),\n\n floor: (expression: Expression): FloorExpression =>\n new FloorExpressionImpl(expression),\n ceil: (expression: Expression): CeilExpression =>\n new CeilExpressionImpl(expression),\n concat: (...expressions: Expression[]): ConcatExpression =>\n new ConcatExpressionImpl(expressions),\n stringify: (expression: Expression): StringifyExpression =>\n new StringifyExpressionImpl(expression),\n toLower: (expression: Expression): ToLowerExpression =>\n new ToLowerExpressionImpl(expression),\n toUpper: (expression: Expression): ToUpperExpression =>\n new ToUpperExpressionImpl(expression),\n substring: (\n expression: Expression,\n start: Expression,\n length?: Expression\n ): SubstringExpression =>\n new SubstringExpressionImpl(expression, start, length),\n length: (expression: Expression): LengthExpression =>\n new LengthExpressionImpl(expression),\n}\n\n/**\n * @builder\n */\nexport interface WixDataAggregatePipelineExpressions {\n /**\n * Specifies which field to resolve.\n *\n * The `field()` method configures the aggregation pipeline to resolve the value of the specified field as an expression.\n *\n * @public\n * @documentationMaturity preview\n * @param fieldPath - Path to the field containing the value to resolve. Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @returns FieldExpression object.\n */\n field(fieldPath: string): FieldExpression\n /**\n * String.\n *\n * The `text()` method configures the aggregation pipeline to run the aggregation on the specified string.\n *\n * @public\n * @documentationMaturity preview\n * @param value - String to run the aggregation on.\n * @returns TextExpression object.\n */\n text(value: string): TextExpression\n /**\n * Number.\n *\n * The `numeric()` method configures the aggregation pipeline to run the aggregation on the specified number.\n *\n * @public\n * @documentationMaturity preview\n * @param value - Number to run the aggregation on.\n * @returns NumericExpression object.\n */\n numeric(value: number): NumericExpression\n /**\n * Adds the specified expressions.\n *\n * The `add()` method configures the aggregation pipeline to add the values of the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to add together. All expressions must resolve to numbers.\n * @returns AddExpression object.\n */\n add(...expressions: Expression[]): AddExpression\n /**\n * Subtracts 1 expression from another.\n *\n * The `subtract()` method configures the aggregation pipeline to subtract the second expression from the first expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to subtract `second` from. Expression must resolve to a number.\n * @param second - Expression to subtract from `first`. Expression must resolve to a number.\n * @returns SubtractExpression object.\n */\n subtract(first: Expression, second: Expression): SubtractExpression\n /**\n * Multiplies multiple expressions together.\n *\n * The `multiply()` method configures the aggregation pipeline to multiply the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to multiply. All expressions must resolve to numbers.\n * @returns MultiplyExpression object.\n */\n multiply(...expressions: Expression[]): MultiplyExpression\n /**\n * Divides 1 expression by another.\n *\n * The `divide()` method configures the aggregation pipeline to divide the first expression by the second expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to divide by `second`. Expression must resolve to a number.\n * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number.\n * @returns DivideExpression object.\n */\n divide(first: Expression, second: Expression): DivideExpression\n /**\n * Calculates the total sum of multiple expressions.\n *\n * The `sum()` method configures the aggregation pipeline to calculate the total sum of the specified expressions.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to calculate the total sum of. All expressions must resolve to numbers.\n * @returns SumExpression object.\n */\n sum(...expressions: Expression[]): SumExpression\n /**\n * Finds the absolute value of an expression.\n *\n * The `abs()` method configures the aggregation pipeline to find the absolute value of the specified expression.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the absolute value of. Expression must resolve to a number.\n * @returns AbsExpression object.\n */\n abs(expression: Expression): AbsExpression\n /**\n * Finds the remainder when dividing 1 expression by another.\n *\n * The `mod()` method configures the aggregation pipeline to find the remainder when dividing the first expression by the second expression.\n *\n * @public\n * @documentationMaturity preview\n * @param first - Expression to divide by `second` to find the remainder. Expression must resolve to a number.\n * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number.\n * @returns ModExpression object.\n */\n mod(first: Expression, second: Expression): ModExpression\n /**\n * Rounds an expression down to the nearest whole number.\n *\n * The `floor()` method configures the aggregation pipeline to round the specified expression down to the nearest integer.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to round down to the nearest whole number. Expression must resolve to a number.\n * @returns FloorExpression object.\n */\n floor(expression: Expression): FloorExpression\n /**\n * Rounds an expression up to the nearest whole number.\n *\n * The `ceil()` method configures the aggregation pipeline to round the specified expression up to the nearest integer.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to round up to the nearest whole number. Expression must resolve to a number.\n * @returns CeilExpression object.\n */\n ceil(expression: Expression): CeilExpression\n /**\n * Joins multiple expressions together to create a string\n *\n * The `concat()` method configures the aggregation pipeline to join multiple expressions together to create a new string.\n *\n * @public\n * @documentationMaturity preview\n * @param expressions - Expressions to join together. All expressions must resolve to strings.\n * @returns ConcatExpression object.\n */\n concat(...expressions: Expression[]): ConcatExpression\n /**\n * Converts an expression to a string.\n *\n * The `stringify()` method configures the aggregation pipeline to convert the specified expression to a string.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to a string.\n * @returns StringifyExpression object.\n */\n stringify(expression: Expression): StringifyExpression\n /**\n * Converts an expression to lowercase.\n *\n * The `toLower()` method configures the aggregation pipeline to convert the specified expression to lowercase.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to lowercase. Expression must resolve to a string.\n * @returns ToLowerExpression object.\n */\n toLower(expression: Expression): ToLowerExpression\n /**\n * Converts an expression to uppercase.\n *\n * The `toUpper()` method configures the aggregation pipeline to convert the specified expression to uppercase.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to convert to uppercase. Expression must resolve to a string.\n * @returns ToUpperExpression object.\n */\n toUpper(expression: Expression): ToUpperExpression\n /**\n * Extracts a portion of a string expression.\n *\n * The `substring()` method configures the aggregation pipeline to extract a portion of the specified string expression.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to extract a substring from. Expression must resolve to a string.\n * @param start - Starting position of the substring to extract, specified in zero-based indexing. Expression must resolve to a number.\n * @param length - Number of characters to extract from the starting position. Expression must resolve to a number.\n * @returns SubstringExpression object.\n */\n substring(\n expression: Expression,\n start: Expression,\n length?: Expression\n ): SubstringExpression\n\n /**\n * Finds the length of a string expression.\n *\n * The `length()` method configures the aggregation pipeline to find the length of the specified expression.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the total number of characters of. Expression must resolve to a string.\n * @returns LengthExpression object.\n */\n length(expression: Expression): LengthExpression\n}\n"],"mappings":";;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAwCO,MAAMC,WAAgD,GAAAC,OAAA,CAAAD,WAAA,GAAG;EAC9DE,KAAK,EAAGC,SAAiB,IACvB,IAAIC,+BAAmB,CAACD,SAAS,CAAC;EACpCE,IAAI,EAAGC,KAA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AmB,KAEnB,IAAIC,mCAAuB,CAACnB,UAAU,EAAEiB,KAAK,EAAEC,MAAM,CAAC;EACxDA,MAAM,EAAGlB,UAAsB,IAC7B,IAAIoB,gCAAoB,CAACpB,UAAU;AACvC,CAAC;;AAED;AACA;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_Expression","require","GroupStageImpl","constructor","_defineProperty2","default","by","expression","key","ids","push","sum","resultFieldName","addAccumulator","avg","min","max","count","NumericExpressionImpl","first","last","type","accumulators","build","group","groupIds","map","id","accumulator","exports"],"sources":["../../../../src/api/stages/GroupStage.ts"],"sourcesContent":["import { Expression, NumericExpressionImpl } from '../expressions/Expression'\nimport * as apiTypes from '../../types/data-item-types'\nimport { PipelineStage } from './stages'\n\n/**\n * @builder\n */\nexport interface GroupStage extends PipelineStage {\n /**\n * // TODO\n * @param expression\n * @param key\n * @returns GroupStage object.\n */\n by(expression: Expression, key: string): GroupStage\n /**\n * Calculates the sum of the specified expression across all items in the group.\n *\n * The `sum()` method refines the aggregation pipeline to calculate the sum of the specified expression across all items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to calculate the group's total sum. Expression must resolve to a number.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n sum(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Calculates the average value across all items in the group based on the specified expression.\n *\n * The `avg()` method refines the aggregation pipeline to calculate the average value of the specified expression across all items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to calculate the group's average value. The expression must resolve to a number.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n avg(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the minimum value across all items in the group.\n *\n * The `min()` method refines the aggregation pipeline to find the minimum value of the specified field across all the items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the group's minimum value. Expression must resolve to a comparable value, such as a number or string.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n min(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the maximum value across all items in the group.\n *\n * The `max()` method refines the aggregation pipeline to find the maximum value of the specified field across all the items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the group's maximum value. Expression must resolve to a comparable value, such as a number or string.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n max(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Counts the number of items in the group.\n *\n * The `count()` method refines the aggregation pipeline to count the number of items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n count(resultFieldName: string): GroupStage\n /**\n * Finds the first item in the group.\n *\n * The `first()` method refines the aggregation pipeline to find the first item in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the first item in the group.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n first(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the last item in the group.\n *\n * The `last()` method refines the aggregation pipeline to find the last item in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the last item in the group.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n last(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Collects values from all items in the group into an array.\n *\n * The `push()` method refines the aggregation pipeline to collect values from all items in the group into an array.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to collect items into an array.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n\n * @returns GroupStage object.\n */\n push(expression: Expression, resultFieldName: string): GroupStage\n}\n\nexport class GroupStageImpl implements GroupStage {\n private ids: Id[] = []\n private accumulators: Accumulator[] = []\n\n by(expression: Expression, key: string): GroupStage {\n this.ids.push({ expression, key })\n return this\n }\n\n sum(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'sum', resultFieldName)\n }\n\n avg(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'avg', resultFieldName)\n }\n\n min(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'min', resultFieldName)\n }\n\n max(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'max', resultFieldName)\n }\n\n count(resultFieldName: string): GroupStage {\n return this.addAccumulator(\n new NumericExpressionImpl(1),\n 'sum',\n resultFieldName\n )\n }\n\n first(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'first', resultFieldName)\n }\n\n last(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'last', resultFieldName)\n }\n\n push(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'push', resultFieldName)\n }\n\n private addAccumulator(\n expression: Expression,\n type: AccumulatorType,\n resultFieldName: string\n ): GroupStage {\n this.accumulators.push({ type, expression, resultFieldName })\n return this\n }\n\n /** @private */\n build(): apiTypes.Stage {\n return {\n group: {\n groupIds: this.ids.map((id) => ({\n expression: id.expression.build(),\n key: id.key,\n })),\n accumulators: this.accumulators.map((accumulator) => ({\n [accumulator.type]: {\n expression: accumulator.expression.build(),\n },\n resultFieldName: accumulator.resultFieldName,\n })),\n },\n }\n }\n}\n\ntype AccumulatorType = 'avg' | 'min' | 'max' | 'sum' | 'first' | 'last' | 'push'\n\ninterface Id {\n expression: Expression\n key: string\n}\n\ninterface Accumulator {\n type: AccumulatorType\n expression: Expression\n resultFieldName: string\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAIA;AACA;AACA;;AA2HO,MAAMC,cAAc,CAAuB;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,eAC5B,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,wBACgB,EAAE;EAAA;EAExCC,EAAEA,CAACC,UAAsB,EAAEC,GAAW,EAAc;IAClD,IAAI,CAACC,GAAG,CAACC,IAAI,CAAC;MAAEH,UAAU;MAAEC;IAAI,CAAC,CAAC;IAClC,OAAO,IAAI;EACb;EAEAG,GAAGA,CAACJ,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAE,GAAGA,CAACP,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAG,GAAGA,CAACR,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAI,GAAGA,CAACT,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAK,KAAKA,CAACL,eAAuB,EAAc;IACzC,OAA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
1
+ {"version":3,"names":["_Expression","require","GroupStageImpl","constructor","_defineProperty2","default","by","expression","key","ids","push","sum","resultFieldName","addAccumulator","avg","min","max","count","NumericExpressionImpl","first","last","type","accumulators","build","group","groupIds","map","id","accumulator","exports"],"sources":["../../../../src/api/stages/GroupStage.ts"],"sourcesContent":["import { Expression, NumericExpressionImpl } from '../expressions/Expression'\nimport * as apiTypes from '../../types/data-item-types'\nimport { PipelineStage } from './stages'\n\n/**\n * @builder\n */\nexport interface GroupStage extends PipelineStage {\n /**\n * Specifies how to group items in the result.\n *\n * The `by()` method configures the aggregation pipeline to group items for which the specified `expression` resolves to the same value. The `key` and resolved `expression` determine the result item's unique `_id` property.\n *\n * > **Note**: When `by()` is not called or when called with no parameters, all items are placed in a single group.\n *\n * @param expression - Expression to determine the grouping value. Items with matching values are grouped together.\n * @param key - Name of the field in the result that contains the grouping value.\n * @returns GroupStage object.\n */\n by(expression: Expression, key: string): GroupStage\n /**\n * Calculates the sum of the specified expression across all items in the group.\n *\n * The `sum()` method refines the aggregation pipeline to calculate the sum of the specified expression across all items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to calculate the group's total sum. Expression must resolve to a number.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n sum(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Calculates the average value across all items in the group based on the specified expression.\n *\n * The `avg()` method refines the aggregation pipeline to calculate the average value of the specified expression across all items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to calculate the group's average value. The expression must resolve to a number.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n avg(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the minimum value across all items in the group.\n *\n * The `min()` method refines the aggregation pipeline to find the minimum value of the specified field across all the items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the group's minimum value. Expression must resolve to a comparable value, such as a number or string.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n min(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the maximum value across all items in the group.\n *\n * The `max()` method refines the aggregation pipeline to find the maximum value of the specified field across all the items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the group's maximum value. Expression must resolve to a comparable value, such as a number or string.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n max(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Counts the number of items in the group.\n *\n * The `count()` method refines the aggregation pipeline to count the number of items in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n count(resultFieldName: string): GroupStage\n /**\n * Finds the first item in the group.\n *\n * The `first()` method refines the aggregation pipeline to find the first item in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the first item in the group.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n first(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Finds the last item in the group.\n *\n * The `last()` method refines the aggregation pipeline to find the last item in the group.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to find the last item in the group.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @returns GroupStage object.\n */\n last(expression: Expression, resultFieldName: string): GroupStage\n /**\n * Collects values from all items in the group into an array.\n *\n * The `push()` method refines the aggregation pipeline to collect values from all items in the group into an array.\n *\n * @public\n * @documentationMaturity preview\n * @param expression - Expression to collect items into an array.\n * @param resultFieldName - Field key in the output item to store the result in.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n\n * @returns GroupStage object.\n */\n push(expression: Expression, resultFieldName: string): GroupStage\n}\n\nexport class GroupStageImpl implements GroupStage {\n private ids: Id[] = []\n private accumulators: Accumulator[] = []\n\n by(expression: Expression, key: string): GroupStage {\n this.ids.push({ expression, key })\n return this\n }\n\n sum(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'sum', resultFieldName)\n }\n\n avg(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'avg', resultFieldName)\n }\n\n min(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'min', resultFieldName)\n }\n\n max(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'max', resultFieldName)\n }\n\n count(resultFieldName: string): GroupStage {\n return this.addAccumulator(\n new NumericExpressionImpl(1),\n 'sum',\n resultFieldName\n )\n }\n\n first(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'first', resultFieldName)\n }\n\n last(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'last', resultFieldName)\n }\n\n push(expression: Expression, resultFieldName: string): GroupStage {\n return this.addAccumulator(expression, 'push', resultFieldName)\n }\n\n private addAccumulator(\n expression: Expression,\n type: AccumulatorType,\n resultFieldName: string\n ): GroupStage {\n this.accumulators.push({ type, expression, resultFieldName })\n return this\n }\n\n /** @private */\n build(): apiTypes.Stage {\n return {\n group: {\n groupIds: this.ids.map((id) => ({\n expression: id.expression.build(),\n key: id.key,\n })),\n accumulators: this.accumulators.map((accumulator) => ({\n [accumulator.type]: {\n expression: accumulator.expression.build(),\n },\n resultFieldName: accumulator.resultFieldName,\n })),\n },\n }\n }\n}\n\ntype AccumulatorType = 'avg' | 'min' | 'max' | 'sum' | 'first' | 'last' | 'push'\n\ninterface Id {\n expression: Expression\n key: string\n}\n\ninterface Accumulator {\n type: AccumulatorType\n expression: Expression\n resultFieldName: string\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAIA;AACA;AACA;;AAgIO,MAAMC,cAAc,CAAuB;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,eAC5B,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,wBACgB,EAAE;EAAA;EAExCC,EAAEA,CAACC,UAAsB,EAAEC,GAAW,EAAc;IAClD,IAAI,CAACC,GAAG,CAACC,IAAI,CAAC;MAAEH,UAAU;MAAEC;IAAI,CAAC,CAAC;IAClC,OAAO,IAAI;EACb;EAEAG,GAAGA,CAACJ,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAE,GAAGA,CAACP,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAG,GAAGA,CAACR,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAI,GAAGA,CAACT,UAAsB,EAAEK,eAAuB,EAAc;IAC/D,OAAO,IAAI,CAACC,cAAc,CAACN,UAAU,EAAE,KAAK,EAAEK,eAAe,CAAC;EAChE;EAEAK,KAAKA,CAACL,eAAuB,EAAc;IACzC,O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AI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO;YACL,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;oBAC9B,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE;oBACjC,GAAG,EAAE,EAAE,CAAC,GAAG;iBACZ,CAAC,CAAC;gBACH,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;oBACpD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;wBAClB,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE;qBAC3C;oBACD,eAAe,EAAE,WAAW,CAAC,eAAe;iBAC7C,CAAC,CAAC;aACJ;SACF,CAAA;IACH,CAAC;CACF"}
@@ -5,7 +5,6 @@ export declare const expressions: WixDataAggregatePipelineExpressions;
5
5
  */
6
6
  export interface WixDataAggregatePipelineExpressions {
7
7
  /**
8
- * TODO clarify
9
8
  * Specifies which field to resolve.
10
9
  *
11
10
  * The `field()` method configures the aggregation pipeline to resolve the value of the specified field as an expression.
@@ -17,23 +16,31 @@ export interface WixDataAggregatePipelineExpressions {
17
16
  */
18
17
  field(fieldPath: string): FieldExpression;
19
18
  /**
20
- * Text value.
19
+ * String.
21
20
  *
22
- * @param value - Text value to run the aggregation on.
21
+ * The `text()` method configures the aggregation pipeline to run the aggregation on the specified string.
22
+ *
23
+ * @public
24
+ * @documentationMaturity preview
25
+ * @param value - String to run the aggregation on.
23
26
  * @returns TextExpression object.
24
27
  */
25
28
  text(value: string): TextExpression;
26
29
  /**
27
- * Numeric value.
30
+ * Number.
28
31
  *
29
- * @param value - Numeric value to run the aggregation on.
32
+ * The `numeric()` method configures the aggregation pipeline to run the aggregation on the specified number.
33
+ *
34
+ * @public
35
+ * @documentationMaturity preview
36
+ * @param value - Number to run the aggregation on.
30
37
  * @returns NumericExpression object.
31
38
  */
32
39
  numeric(value: number): NumericExpression;
33
40
  /**
34
41
  * Adds the specified expressions.
35
42
  *
36
- * The `add()` method refines the aggregation pipeline to add the values of the specified expressions.
43
+ * The `add()` method configures the aggregation pipeline to add the values of the specified expressions.
37
44
  *
38
45
  * @public
39
46
  * @documentationMaturity preview
@@ -44,7 +51,7 @@ export interface WixDataAggregatePipelineExpressions {
44
51
  /**
45
52
  * Subtracts 1 expression from another.
46
53
  *
47
- * The `subtract()` method refines the aggregation pipeline to subtract the second expression from the first expression.
54
+ * The `subtract()` method configures the aggregation pipeline to subtract the second expression from the first expression.
48
55
  *
49
56
  * @public
50
57
  * @documentationMaturity preview
@@ -56,7 +63,7 @@ export interface WixDataAggregatePipelineExpressions {
56
63
  /**
57
64
  * Multiplies multiple expressions together.
58
65
  *
59
- * The `multiply()` method refines the aggregation pipeline to multiply the specified expressions.
66
+ * The `multiply()` method configures the aggregation pipeline to multiply the specified expressions.
60
67
  *
61
68
  * @public
62
69
  * @documentationMaturity preview
@@ -67,7 +74,7 @@ export interface WixDataAggregatePipelineExpressions {
67
74
  /**
68
75
  * Divides 1 expression by another.
69
76
  *
70
- * The `divide()` method refines the aggregation pipeline to divide the first expression by the second expression.
77
+ * The `divide()` method configures the aggregation pipeline to divide the first expression by the second expression.
71
78
  *
72
79
  * @public
73
80
  * @documentationMaturity preview
@@ -79,7 +86,7 @@ export interface WixDataAggregatePipelineExpressions {
79
86
  /**
80
87
  * Calculates the total sum of multiple expressions.
81
88
  *
82
- * The `sum()` method refines the aggregation pipeline to calculate the total sum of the specified expressions.
89
+ * The `sum()` method configures the aggregation pipeline to calculate the total sum of the specified expressions.
83
90
  *
84
91
  * @public
85
92
  * @documentationMaturity preview
@@ -90,7 +97,7 @@ export interface WixDataAggregatePipelineExpressions {
90
97
  /**
91
98
  * Finds the absolute value of an expression.
92
99
  *
93
- * The `abs()` method refines the aggregation pipeline to find the absolute value of the specified expression.
100
+ * The `abs()` method configures the aggregation pipeline to find the absolute value of the specified expression.
94
101
  *
95
102
  * @public
96
103
  * @documentationMaturity preview
@@ -101,7 +108,7 @@ export interface WixDataAggregatePipelineExpressions {
101
108
  /**
102
109
  * Finds the remainder when dividing 1 expression by another.
103
110
  *
104
- * The `mod()` method refines the aggregation pipeline to find the remainder when dividing the first expression by the second expression.
111
+ * The `mod()` method configures the aggregation pipeline to find the remainder when dividing the first expression by the second expression.
105
112
  *
106
113
  * @public
107
114
  * @documentationMaturity preview
@@ -113,7 +120,7 @@ export interface WixDataAggregatePipelineExpressions {
113
120
  /**
114
121
  * Rounds an expression down to the nearest whole number.
115
122
  *
116
- * The `floor()` method refines the aggregation pipeline to round the specified expression down to the nearest integer.
123
+ * The `floor()` method configures the aggregation pipeline to round the specified expression down to the nearest integer.
117
124
  *
118
125
  * @public
119
126
  * @documentationMaturity preview
@@ -124,7 +131,7 @@ export interface WixDataAggregatePipelineExpressions {
124
131
  /**
125
132
  * Rounds an expression up to the nearest whole number.
126
133
  *
127
- * The `ceil()` method refines the aggregation pipeline to round the specified expression up to the nearest integer.
134
+ * The `ceil()` method configures the aggregation pipeline to round the specified expression up to the nearest integer.
128
135
  *
129
136
  * @public
130
137
  * @documentationMaturity preview
@@ -135,7 +142,7 @@ export interface WixDataAggregatePipelineExpressions {
135
142
  /**
136
143
  * Joins multiple expressions together to create a string
137
144
  *
138
- * The `concat()` method refines the aggregation pipeline to join multiple expressions together to create a new string.
145
+ * The `concat()` method configures the aggregation pipeline to join multiple expressions together to create a new string.
139
146
  *
140
147
  * @public
141
148
  * @documentationMaturity preview
@@ -146,7 +153,7 @@ export interface WixDataAggregatePipelineExpressions {
146
153
  /**
147
154
  * Converts an expression to a string.
148
155
  *
149
- * The `stringify()` method refines the aggregation pipeline to convert the specified expression to a string.
156
+ * The `stringify()` method configures the aggregation pipeline to convert the specified expression to a string.
150
157
  *
151
158
  * @public
152
159
  * @documentationMaturity preview
@@ -157,7 +164,7 @@ export interface WixDataAggregatePipelineExpressions {
157
164
  /**
158
165
  * Converts an expression to lowercase.
159
166
  *
160
- * The `toLower()` method refines the aggregation pipeline to convert the specified expression to lowercase.
167
+ * The `toLower()` method configures the aggregation pipeline to convert the specified expression to lowercase.
161
168
  *
162
169
  * @public
163
170
  * @documentationMaturity preview
@@ -168,7 +175,7 @@ export interface WixDataAggregatePipelineExpressions {
168
175
  /**
169
176
  * Converts an expression to uppercase.
170
177
  *
171
- * The `toUpper()` method refines the aggregation pipeline to convert the specified expression to uppercase.
178
+ * The `toUpper()` method configures the aggregation pipeline to convert the specified expression to uppercase.
172
179
  *
173
180
  * @public
174
181
  * @documentationMaturity preview
@@ -179,7 +186,7 @@ export interface WixDataAggregatePipelineExpressions {
179
186
  /**
180
187
  * Extracts a portion of a string expression.
181
188
  *
182
- * The `substring()` method refines the aggregation pipeline to extract a portion of the specified string expression.
189
+ * The `substring()` method configures the aggregation pipeline to extract a portion of the specified string expression.
183
190
  *
184
191
  * @public
185
192
  * @documentationMaturity preview
@@ -189,6 +196,16 @@ export interface WixDataAggregatePipelineExpressions {
189
196
  * @returns SubstringExpression object.
190
197
  */
191
198
  substring(expression: Expression, start: Expression, length?: Expression): SubstringExpression;
199
+ /**
200
+ * Finds the length of a string expression.
201
+ *
202
+ * The `length()` method configures the aggregation pipeline to find the length of the specified expression.
203
+ *
204
+ * @public
205
+ * @documentationMaturity preview
206
+ * @param expression - Expression to find the total number of characters of. Expression must resolve to a string.
207
+ * @returns LengthExpression object.
208
+ */
192
209
  length(expression: Expression): LengthExpression;
193
210
  }
194
211
  //# sourceMappingURL=expressions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["../../../../src/api/expressions/expressions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,cAAc,EAEd,iBAAiB,EAEjB,aAAa,EA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AAA;IAC9C;;;;;;;;;OASG;IACH,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAAA;IAC5C;;;;;;;;;OASG;IACH,MAAM,CAAC,GAAG,WAAW,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAA;IACtD;;;;;;;;;OASG;IACH,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,mBAAmB,CAAA;IACtD;;;;;;;;;OASG;IACH,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,iBAAiB,CAAA;IAClD;;;;;;;;;OASG;IACH,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,iBAAiB,CAAA;IAClD;;;;;;;;;;;OAWG;IACH,SAAS,CACP,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,UAAU,EACjB,MAAM,CAAC,EAAE,UAAU,GAClB,mBAAmB,CAAA;IACtB,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,gBAAgB,CAAA;CACjD"}
1
+ {"version":3,"file":"expressions.d.ts","sourceRoot":"","sources":["../../../../src/api/expressions/expressions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,cAAc,EAEd,iBAAiB,EAEjB,aAAa,EAEb,kBAAkB,EAElB,kBAAkB,EAElB,gBAAgB,EAEhB,aAAa,EAEb,aAAa,EAEb,aAAa,EAEb,eAAe,EAEf,cAAc,EAEd,gBAAgB,EAEhB,mBAAmB,EAEnB,iBAAiB,EAEjB,iBAAiB,EAEjB,mBAAmB,EAEnB,gBAAgB,EAEjB,MAAM,cAAc,CAAA;AAErB,eAAO,MAAM,WAAW,EAAE,mCAyCzB,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;;;;;;OASG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,CAAA;IACzC;;;;;;;;;OASG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAA;IACnC;;;;;;;;;OASG;IACH,OAAO,C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EACjB,MAAM,CAAC,EAAE,UAAU,GAClB,mBAAmB,CAAA;IAEtB;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,gBAAgB,CAAA;CACjD"}
@@ -6,9 +6,14 @@ import { PipelineStage } from './stages';
6
6
  */
7
7
  export interface GroupStage extends PipelineStage {
8
8
  /**
9
- * // TODO
10
- * @param expression
11
- * @param key
9
+ * Specifies how to group items in the result.
10
+ *
11
+ * The `by()` method configures the aggregation pipeline to group items for which the specified `expression` resolves to the same value. The `key` and resolved `expression` determine the result item's unique `_id` property.
12
+ *
13
+ * > **Note**: When `by()` is not called or when called with no parameters, all items are placed in a single group.
14
+ *
15
+ * @param expression - Expression to determine the grouping value. Items with matching values are grouped together.
16
+ * @param key - Name of the field in the result that contains the grouping value.
12
17
  * @returns GroupStage object.
13
18
  */
14
19
  by(expression: Expression, key: string): GroupStage;
@@ -1 +1 @@
1
- {"version":3,"file":"GroupStage.d.ts","sourceRoot":"","sources":["../../../../src/api/stages/GroupStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,QAAQ,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C;;;;;OAKG;IACH,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;IACnD;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU,CAAA;IAChE;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU,CAAA;IAChE;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAA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AAE,eAAe,EAAE,MAAM,GAAG,UAAU,CAAA;CAClE;AAED,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,YAAY,CAAoB;IAExC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU;IAKnD,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIhE,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIhE,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIhE,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIhE,KAAK,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU;IAQ1C,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIlE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIjE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,GAAG,UAAU;IAIjE,OAAO,CAAC,cAAc;IAStB,eAAe;IACf,KAAK,IAAI,QAAQ,CAAC,KAAK;CAgBxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.215",
3
+ "version": "1.0.216",
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": "7cb3289eb86025d8b462fbd522c9aecaea666cc7fe4503be5ed425c2"
88
+ "falconPackageHash": "3e6ba96773d4849296929e96e10309b1c32c1e46737358eb951457c5"
89
89
  }