wulf-pulse/lib/utils
lorentz 9a448d111c feat: contacts sync — add all missing fields + UDFs
Migration 057:
- ADD user_defined_fields JSONB (GIN indexed)
- ADD middle_initial, note, external_id, country_id, company_location_id
- ADD create_date, impersonator_creator_resource_id
- ADD is_opted_out_from_bulk_email, bulk_email_opt_out_time
- ADD solicitation_opt_out_time, survey_opt_out
- ADD receives_email_notifications, billing_contact

entity-mapper.ts mapContact():
- Fix broken snake_case field refs → correct camelCase API names:
  alternate_phone → alternatePhone, mobile_phone → mobilePhone
  name_prefix/suffix → namePrefix/nameSuffix
  facebook/twitter/linkedin_url → facebookUrl/twitterUrl/linkedInUrl
  primary_contact → primaryContact, solicitation_opt_out → solicitationOptOut
  last_activity/modified_date → lastActivityDate/lastModifiedDate
  api_vendor_id → apiVendorID, is_active → isActive, is_deleted → isDeleted
- Add UDF conversion: userDefinedFields[] → JSONB {name: value}
- 17 UDFs stored: UserID, Birthday, O365License, VIP User, Department,
  Password, Email Password, Archive Email, User System Profile, etc.

Results: 4234 contacts synced, 3318 with UDFs, 4140 with create_date
2026-03-26 13:16:13 -04:00
..
api-helpers.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
db-helpers.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
device-lookup.ts Restructure: rename to Pulse and move app to root 2025-10-28 23:08:54 -04:00
entity-mapper.ts feat: contacts sync — add all missing fields + UDFs 2026-03-26 13:16:13 -04:00
issue-type-helper.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
logger.ts Add comprehensive admin features and multi-system integration 2025-11-19 14:18:16 -05:00
openclaw-auth.ts feat: OpenClaw external agent sync API at /api/openclaw/* 2026-03-17 23:26:44 -04:00
sync-helpers.ts feat: add project_phases entity sync with task project_id backfill 2026-03-24 13:57:33 -04:00
sync-logger.ts feat: implement structured logging for sync operations 2026-01-23 08:02:02 -05:00