/** * Utilities for resolving and mutating nested object paths using dot notation. */ /** * Check if a string is a dot-notation path (contains at least one "."). * * @param key - The string to check * @returns true if the key contains a dot */ export declare function isDotPath(key: string): boolean; /** * Get a nested value from an object using dot notation. * Handles single-segment paths (no ".") as direct property access with no overhead. * * @param obj - The object to get the value from * @param path - The dot-separated path to the value (e.g., "metadata.views") * @returns The value at the path, or undefined if not found * * @example * getNestedValue({ a: { b: 1 } }, "a.b") // returns 1 * getNestedValue({ a: { b: 1 } }, "a") // returns { b: 1 } * getNestedValue({ a: { b: 1 } }, "a.c") // returns undefined * getNestedValue({ name: "foo" }, "name") // returns "foo" (single-segment, direct access) */ export declare function getNestedValue(obj: Record, path: string): unknown; /** * Recursively collect all paths in an object that have string values. * Used for auto-discovering searchable fields when no explicit fields are specified. * * @param obj - The object to traverse * @param prefix - The current path prefix (used during recursion) * @returns An array of dot-notation paths pointing to string values * * @example * collectStringPaths({ name: "foo", metadata: { description: "bar", count: 5 } }) * // returns ["name", "metadata.description"] */ export declare function collectStringPaths(obj: Record, prefix?: string): ReadonlyArray; /** * Set a nested value on an object using dot notation, returning a new object (immutable). * Creates intermediate objects along the path if they don't exist. * Handles single-segment paths (no ".") as direct property set with no overhead. * * @param obj - The source object * @param path - The dot-separated path where to set the value (e.g., "metadata.views") * @param value - The value to set * @returns A new object with the value set at the path * * @example * setNestedValue({ a: { b: 1 } }, "a.b", 2) // returns { a: { b: 2 } } * setNestedValue({ a: { b: 1 } }, "a.c", 3) // returns { a: { b: 1, c: 3 } } * setNestedValue({}, "a.b.c", 1) // returns { a: { b: { c: 1 } } } * setNestedValue({ name: "foo" }, "name", "bar") // returns { name: "bar" } (single-segment) */ export declare function setNestedValue(obj: Record, path: string, value: unknown): Record; //# sourceMappingURL=nested-path.d.ts.map