import { BooleanExpression, ConditionExpression, GreaterThanExpression, SizeExpression, Expression, FieldExpression, TextExpression, NumericExpression, AddExpression, SubtractExpression, MultiplyExpression, DivideExpression, SumExpression, AbsExpression, ModExpression, FloorExpression, CeilExpression, ConcatExpression, StringifyExpression, ToLowerExpression, ToUpperExpression, SubstringExpression, LengthExpression } from './Expression'; export declare const expressions: WixDataAggregatePipelineExpressions; /** * @builder */ export interface WixDataAggregatePipelineExpressions { /** * Creates a Boolean literal expression. * @public * @documentationMaturity preview * @param value - Boolean literal value. * @returns BooleanExpression object. */ boolean(value: boolean): BooleanExpression; /** * Returns whenTrue or whenFalse based on the condition expression. * @public * @documentationMaturity preview * @param ifExpression - Expression that resolves to a Boolean condition. * @param whenTrue - Expression returned when the condition is true. * @param whenFalse - Expression returned when the condition is false. * @returns ConditionExpression object. */ condition(ifExpression: Expression, whenTrue: Expression, whenFalse: Expression): ConditionExpression; /** * Checks whether the first expression is greater than the second expression. * @public * @documentationMaturity preview * @param first - Left operand of the comparison. * @param second - Right operand of the comparison. * @returns GreaterThanExpression object. */ gt(first: Expression, second: Expression): GreaterThanExpression; /** * Returns the number of elements in an array expression. * @public * @documentationMaturity preview * @param expression - Expression that resolves to an array. * @returns SizeExpression object. */ size(expression: Expression): SizeExpression; /** * Specifies which field to resolve. * * The `field()` method configures the aggregation pipeline to resolve the value of the specified field as an expression. * * @public * @documentationMaturity preview * @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`. * @returns FieldExpression object. */ field(fieldPath: string): FieldExpression; /** * String. * * The `text()` method configures the aggregation pipeline to run the aggregation on the specified string. * * @public * @documentationMaturity preview * @param value - String to run the aggregation on. * @returns TextExpression object. */ text(value: string): TextExpression; /** * Number. * * The `numeric()` method configures the aggregation pipeline to run the aggregation on the specified number. * * @public * @documentationMaturity preview * @param value - Number to run the aggregation on. * @returns NumericExpression object. */ numeric(value: number): NumericExpression; /** * Adds the specified expressions. * * The `add()` method configures the aggregation pipeline to add the values of the specified expressions. * * @public * @documentationMaturity preview * @param expressions - Expressions to add together. All expressions must resolve to numbers. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns AddExpression object. */ add(...expressions: Expression[]): AddExpression; /** * Subtracts 1 expression from another. * * The `subtract()` method configures the aggregation pipeline to subtract the second expression from the first expression. * * @public * @documentationMaturity preview * @param first - Expression to subtract `second` from. Expression must resolve to a number. * @param second - Expression to subtract from `first`. Expression must resolve to a number. * @returns SubtractExpression object. */ subtract(first: Expression, second: Expression): SubtractExpression; /** * Multiplies multiple expressions together. * * The `multiply()` method configures the aggregation pipeline to multiply the specified expressions. * * @public * @documentationMaturity preview * @param expressions - Expressions to multiply. All expressions must resolve to numbers. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns MultiplyExpression object. */ multiply(...expressions: Expression[]): MultiplyExpression; /** * Divides 1 expression by another. * * The `divide()` method configures the aggregation pipeline to divide the first expression by the second expression. * * @public * @documentationMaturity preview * @param first - Expression to divide by `second`. Expression must resolve to a number. * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number. * @returns DivideExpression object. */ divide(first: Expression, second: Expression): DivideExpression; /** * Calculates the total sum of multiple expressions. * * The `sum()` method configures the aggregation pipeline to calculate the total sum of the specified expressions. * * @public * @documentationMaturity preview * @param expressions - Expressions to calculate the total sum of. All expressions must resolve to numbers. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns SumExpression object. */ sum(...expressions: Expression[]): SumExpression; /** * Finds the absolute value of an expression. * * The `abs()` method configures the aggregation pipeline to find the absolute value of the specified expression. * * @public * @documentationMaturity preview * @param expression - Expression to find the absolute value of. Expression must resolve to a number. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns AbsExpression object. */ abs(expression: Expression): AbsExpression; /** * Finds the remainder when dividing 1 expression by another. * * The `mod()` method configures the aggregation pipeline to find the remainder when dividing the first expression by the second expression. * * @public * @documentationMaturity preview * @param first - Expression to divide by `second` to find the remainder. Expression must resolve to a number. * @param second - Expression to divide `first` by. Expression must resolve to a non-zero number. * @returns ModExpression object. */ mod(first: Expression, second: Expression): ModExpression; /** * Rounds an expression down to the nearest whole number. * * The `floor()` method configures the aggregation pipeline to round the specified expression down to the nearest integer. * * @public * @documentationMaturity preview * @param expression - Expression to round down to the nearest whole number. Expression must resolve to a number. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns FloorExpression object. */ floor(expression: Expression): FloorExpression; /** * Rounds an expression up to the nearest whole number. * * The `ceil()` method configures the aggregation pipeline to round the specified expression up to the nearest integer. * * @public * @documentationMaturity preview * @param expression - Expression to round up to the nearest whole number. Expression must resolve to a number. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns CeilExpression object. */ ceil(expression: Expression): CeilExpression; /** * Joins multiple expressions together to create a string. * * The `concat()` method configures the aggregation pipeline to join multiple expressions together to create a new string. * * @public * @documentationMaturity preview * @param expressions - Expressions to join together. All expressions must resolve to strings. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns ConcatExpression object. */ concat(...expressions: Expression[]): ConcatExpression; /** * Converts an expression to a string. * * The `stringify()` method configures the aggregation pipeline to convert the specified expression to a string. * * @public * @documentationMaturity preview * @param expression - Expression to convert to a string. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns StringifyExpression object. */ stringify(expression: Expression): StringifyExpression; /** * Converts an expression to lowercase. * * The `toLower()` method configures the aggregation pipeline to convert the specified expression to lowercase. * * @public * @documentationMaturity preview * @param expression - Expression to convert to lowercase. Expression must resolve to a string. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns ToLowerExpression object. */ toLower(expression: Expression): ToLowerExpression; /** * Converts an expression to uppercase. * * The `toUpper()` method configures the aggregation pipeline to convert the specified expression to uppercase. * * @public * @documentationMaturity preview * @param expression - Expression to convert to uppercase. Expression must resolve to a string. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns ToUpperExpression object. */ toUpper(expression: Expression): ToUpperExpression; /** * Extracts a portion of a string expression. * * The `substring()` method configures the aggregation pipeline to extract a portion of the specified string expression. * * @public * @documentationMaturity preview * @param expression - Expression to extract a substring from. Expression must resolve to a string. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @param start - Starting position of the substring to extract, specified in zero-based indexing. Expression must resolve to a number. * @param length - Number of characters to extract from the starting position. Expression must resolve to a number. * @returns SubstringExpression object. */ substring(expression: Expression, start: Expression, length?: Expression): SubstringExpression; /** * Finds the length of a string expression. * * The `length()` method configures the aggregation pipeline to find the length of the specified expression. * * @public * @documentationMaturity preview * @param expression - Expression to find the total number of characters of. Expression must resolve to a string. Learn more about using [expressions in aggregation pipelines](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate-pipeline-expressions/introduction). * @returns LengthExpression object. */ length(expression: Expression): LengthExpression; } //# sourceMappingURL=expressions.d.ts.map