import { GenericEvaluationContext, InSegmentCondition, SegmentCondition, SegmentContext } from '../evaluation/models.js'; /** * Whether the context belongs to a segment, i.e. it matches ALL of the segment's rules. * * @param context - Evaluation context to match against the segment's rules * @param segment - Segment to match, never matched when it has no rules * @returns true if the context belongs to the segment */ export declare function isContextInSegment(context: GenericEvaluationContext, segment: SegmentContext): boolean; /** * Evaluates whether a segment condition matches the identity's traits or context values. * * Handles different types of conditions: * - PERCENTAGE_SPLIT: Deterministic percentage-based bucketing using identity key * - IS_SET/IS_NOT_SET: Checks for trait existence * - Standard operators: EQUAL, NOT_EQUAL, etc. via SegmentConditionModel * - JSONPath expressions: $.identity.identifier, $.environment.name, etc. * * @param condition - The condition to evaluate (property, operator, value) * @param segmentKey - Key of the segment (used for percentage split hashing) * @param context - Evaluation context containing identity, traits, and environment * @returns true if the condition matches */ export declare function traitsMatchSegmentCondition(condition: SegmentCondition | InSegmentCondition, segmentKey: string, context?: GenericEvaluationContext): boolean; /** * Evaluates JSONPath expressions against the evaluation context. * * Supports accessing nested context values using JSONPath syntax. * Commonly used paths: * - $.identity.identifier - User's unique identifier * - $.identity.key - User's internal key * - $.environment.name - Environment name * - $.environment.key - Environment key * * @param jsonPath - JSONPath expression starting with '$.' * @param context - Evaluation context to query against * @returns The resolved value, or undefined if path doesn't exist or is invalid */ export declare function getContextValue(jsonPath: string, context?: GenericEvaluationContext): any;