export const stringifyMap = (map?: Record) => { const newMap: Record = {}; Object.entries(map || {}).forEach(([key, value]) => { if (value === undefined || value === null) return; newMap[key] = typeof value === 'string' ? value : JSON.stringify(value); }); return newMap; };