Skip to content

Conversation

@pettinarip
Copy link
Member

Refactors API handlers (rfp, wishlist, direct-grant, office-hours) to use the centralized mapFormDataToSalesforce() function.

Description

  • Centralized field mapping: All handlers now use mapFormDataToSalesforce() from sf-field-mappings.ts as the single source of truth
  • Removed TypeScript interfaces: Handlers now derive types directly from Zod schemas (z.infer)
  • Decoupled Office Hours logic: Moved Office Hours-specific logic (Name field, conditional fields, company fallback) from the mapping function to the office-hours.ts handler
  • Reduced duplication: Eliminated manual field mapping code across all four handlers

corwintines
corwintines previously approved these changes Nov 27, 2025
Base automatically changed from tests-sf-contract to master January 13, 2026 14:46
@pettinarip pettinarip dismissed corwintines’s stale review January 13, 2026 14:46

The base branch was changed.

…ny fallback

- Add comprehensive test suite for sf-field-mappings covering field mapping,
  system field exclusion, null handling, and company fallback logic
- Remove redundant company fallback from api.ts since it's now handled
  centrally in mapFormDataToSalesforce
@pettinarip pettinarip force-pushed the refactor-field-mappings branch 2 times, most recently from 1881f80 to 7cabd98 Compare January 14, 2026 10:27
Set up GitHub Actions to run on pushes and PRs to master branch.
Uses pnpm for package management. Salesforce contract tests use
credentials from GitHub secrets.
@pettinarip pettinarip force-pushed the refactor-field-mappings branch from 7cabd98 to 1111195 Compare January 14, 2026 10:30
@pettinarip pettinarip merged commit 7c663ab into master Jan 14, 2026
6 checks passed
@pettinarip pettinarip deleted the refactor-field-mappings branch January 14, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants