/** * E2E Test Runner - JSONPath Evaluator * * Evaluates JSONPath expressions to extract values from objects/arrays. * Supports common JSONPath syntax: $, ., [], [*], recursive descent (..) */ /** * Result of a JSONPath evaluation */ export interface JSONPathResult { value: unknown; found: boolean; path: string; } /** * Evaluate a JSONPath expression against an object * * @param obj - The object to query * @param path - JSONPath expression (e.g., "$.data.items[0].name") * @returns The value at the path or undefined if not found * * @example * const obj = { data: { items: [{ name: 'test' }] } }; * evaluateJSONPath(obj, '$.data.items[0].name'); // 'test' * evaluateJSONPath(obj, '$.data.items[*].name'); // ['test'] */ export declare function evaluateJSONPath(obj: unknown, path: string): unknown; /** * Evaluate JSONPath with metadata about the result * * @param obj - The object to query * @param path - JSONPath expression * @returns Result with value, found flag, and normalized path */ export declare function evaluateJSONPathWithMeta(obj: unknown, path: string): JSONPathResult; /** * Check if a value exists at the given path * * @param obj - The object to query * @param path - JSONPath expression * @returns true if a value exists at the path */ export declare function hasJSONPath(obj: unknown, path: string): boolean; /** * Get all values matching a JSONPath with wildcards * * @param obj - The object to query * @param path - JSONPath expression with wildcards * @returns Array of all matching values */ export declare function queryJSONPath(obj: unknown, path: string): unknown[]; /** * Parse a path string into a simple property path array * This is a simplified helper for common cases * * @example * parseSimplePath('data.items.0.name') // ['data', 'items', '0', 'name'] */ export declare function parseSimplePath(path: string): string[]; /** * Get a value from an object using a simple dot-notation path * More performant than full JSONPath for simple cases * * @example * getByPath({ a: { b: { c: 1 } } }, 'a.b.c') // 1 */ export declare function getByPath(obj: unknown, path: string): unknown; /** * Check if a path is a valid JSONPath expression */ export declare function isValidJSONPath(path: string): boolean; //# sourceMappingURL=jsonpath.d.ts.map