import type { FilterSchema } from '../types'; /** * Safe deep retrieval of values from an object * similar to lodash.get * * @example * ```typescript * const obj = { a: { b: { c: 1 } } }; * const val = get(obj, 'a.b.c'); // 1 * const val2 = get(obj, ['a', 'b', 'c']); // 1 * const missing = get(obj, 'a.b.x', 'default'); // 'default' * ``` */ export declare function get(obj: any, path: string | string[], defaultValue?: T): T; /** * Generic pick function * Creates an object composed of the picked object properties */ export declare function pick(obj: T, keys: K[]): Pick; /** * Generic omit function * Creates an object composed of the object properties that are not omitted */ /** * Generic omit function * Creates an object composed of the object properties that are not omitted * Optimized to avoid 'delete' which de-optimizes object shape in V8 */ export declare function omit(obj: T, keys: K[]): Omit; /** * Pick specific fields from a schema * Useful for exposing a subset of the schema to the frontend * * @example * ```typescript * const publicSchema = pickSchemaFields(fullSchema, ['id', 'name']); * ``` */ export declare function pickSchemaFields(schema: FilterSchema, fieldsToPick: string[]): FilterSchema; /** * Omit specific fields from a schema * Useful for hiding sensitive or internal fields from the frontend * * @example * ```typescript * const publicSchema = omitSchemaFields(fullSchema, ['secret']); * ``` */ export declare function omitSchemaFields(schema: FilterSchema, fieldsToOmit: string[]): FilterSchema; /** * Default internal fields to omit when sending schema to frontend */ export declare const DEFAULT_INTERNAL_FIELDS: string[]; /** * Get a public version of the schema for the frontend * Automatically omits internal DB mappings and sensitive fields * * @example * ```typescript * // Use defaults * const publicSchema = getPublicSchema(fullSchema); * * // Custom omits (overrides defaults) * const customSchema = getPublicSchema(fullSchema, ['secret']); * * // Extend defaults * const extendedSchema = getPublicSchema(fullSchema, [...DEFAULT_INTERNAL_FIELDS, 'custom_field']); * ``` */ export declare function getPublicSchema(schema: FilterSchema, omits?: string[]): FilterSchema; //# sourceMappingURL=schema-filter.d.ts.map