/** * Mapper Utility Functions * * Common utilities for data transformation in mappers. */ /** * Convert snake_case to camelCase */ export declare function snakeToCamel(str: string): string; /** * Convert camelCase to snake_case */ export declare function camelToSnake(str: string): string; /** * Parse ISO date string to Date object */ export declare function parseDate(dateString: string | null | undefined): Date | null; /** * Format Date to ISO string for API */ export declare function formatDate(date: Date | null | undefined): string | null; /** * Trim string if defined */ export declare function trimString(str: string | undefined): string | undefined; /** * Pick only defined values from object (for PATCH requests) */ export declare function pickDefined>(obj: T): Partial; /** * Convert object keys from snake_case to camelCase */ export declare function keysToCamel>(obj: T): Record; /** * Convert object keys from camelCase to snake_case */ export declare function keysToSnake>(obj: T): Record; /** * Map nullable DB field to optional response field. * Converts null/undefined to undefined for API responses. */ export declare function toOptional(value: T | null | undefined): T | undefined; /** * Map optional entity value to nullable DB field. * Converts undefined to null for database storage. */ export declare function toNullable(value: T | undefined): T | null; /** * Map optional Date to nullable ISO string for DB storage. * Converts Date to ISO string, undefined to null. */ export declare function dateToNullable(value: Date | undefined): string | null; /** * Get field value from object supporting both snake_case and camelCase keys. * Useful for mappers that need to handle responses in either format. * Prefers camelCase if both exist. */ export declare function getField(data: Record, snakeKey: string, camelKey: string): T | undefined; /** * Parse date from either string or Date, handling both formats. * Returns undefined for invalid dates. */ export declare function parseDateSafe(value: unknown): Date | undefined; //# sourceMappingURL=mapperUtils.d.ts.map