/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { type PureModel, type ValueSpecification, LambdaFunctionInstanceValue, PRIMITIVE_TYPE, VariableExpression, type Type, SimpleFunctionExpression, AbstractPropertyExpression, CollectionInstanceValue, type ObserverContext, InstanceValue } from '@finos/legend-graph';
import type { QueryBuilderState } from './QueryBuilderState.js';
export declare const getNonCollectionValueSpecificationType: (valueSpecification: ValueSpecification) => Type | undefined;
export declare const getCollectionValueSpecificationType: (graph: PureModel, values: ValueSpecification[]) => Type | undefined;
export declare const isValidInstanceValue: (value: InstanceValue) => boolean;
export declare const unwrapNotExpression: (expression: SimpleFunctionExpression) => SimpleFunctionExpression | undefined;
export declare const buildNotExpression: (expression: ValueSpecification) => ValueSpecification;
export declare const isPropertyExpressionChainOptional: (expression: ValueSpecification | undefined) => boolean;
/**
 * Maps a type to its equivalent standard PRIMITIVE_TYPE for compatibility checks.
 * For standard primitive types, returns their own enum value.
 * For precise primitive types, returns their standard equivalent.
 * Returns undefined for non-primitive types (e.g. Enumeration, Class).
 */
export declare const getStandardPrimitiveTypeEquivalent: (type: Type) => PRIMITIVE_TYPE | undefined;
export declare const isTypeCompatibleForAssignment: (type: Type | undefined, assignmentType: Type) => boolean;
export declare const generateDefaultValueForPrimitiveType: (type: PRIMITIVE_TYPE) => unknown;
export declare const buildGenericLambdaFunctionInstanceValue: (lambdaParameterNames: string[], lambdaBodyExpressions: ValueSpecification[], graph: PureModel) => LambdaFunctionInstanceValue;
/**
 * Checks if the milestoning property expression is valid in terms of number of parameter values provided
 * in relation to its milestoning type.
 *
 * NOTE: this takes date propgation into account. See the table below for all
 * the combination:
 *
 *             | [source] |          |          |          |          |
 * ----------------------------------------------------------------------
 *   [target]  |          |   NONE   |  PR_TMP  |  BI_TMP  |  BU_TMP  |
 * ----------------------------------------------------------------------
 *             |   NONE   |   N.A.   |   PRD    | PRD,BUD  |    BUD   |
 * ----------------------------------------------------------------------
 *             |  PR_TMP  |   N.A.   |    X     | PRD,BUD  |    BUD   |
 * ----------------------------------------------------------------------
 *             |  BI_TMP  |   N.A.   |    X     |    X     |    X     |
 * ----------------------------------------------------------------------
 *             |  BU_TMP  |   N.A.   |   PRD    | PRD,BUD  |    X     |
 * ----------------------------------------------------------------------
 *
 * Annotations:
 *
 * [source]: source temporal type
 * [target]: target temporal type
 *
 * PR_TMP  : processing temporal
 * BI_TMP  : bitemporal
 * BU_TMP  : business temporal
 *
 * X       : no default date propagated
 * PRD     : default processing date is propagated
 * BUD     : default business date is propgated
 */
export declare const validatePropertyExpressionChain: (propertyExpression: AbstractPropertyExpression, graph: PureModel, queryBuilderState: QueryBuilderState) => void;
export declare const extractNullableStringFromInstanceValue: (value: ValueSpecification) => string | undefined;
export declare const extractNullableNumberFromInstanceValue: (value: ValueSpecification) => number | undefined;
/**
 * NOTE: Pure doesn't have a nullish value, rather we use empty collection of type Nil
 */
export declare const createNullishValue: (graph: PureModel) => CollectionInstanceValue;
export declare const isValueExpressionReferencedInValue: (variable: VariableExpression, value: ValueSpecification) => boolean;
/**
 * Some expression which represents a value and can be simplified to make
 * editing experience easier
 *
 * e.g. -5 is often represented as minus(5), which is a function expression
 * but we want to simplify it to a primitive instance value with value -5
 */
export declare const simplifyValueExpression: (value: ValueSpecification, observerContext: ObserverContext) => ValueSpecification;
//# sourceMappingURL=QueryBuilderValueSpecificationHelper.d.ts.map