feat: migrate crustdata to live person enrich API (CM-1354) - #4447
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates Crustdata enrichment to the live person API and adapts normalization to its nested response schema.
Changes:
- Updates authentication, credit checks, and enrichment requests.
- Remaps profile, social, education, and employment data.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
types.ts |
Defines the new API response types. |
service.ts |
Implements requests and normalization. |
Suppressed comments (2)
services/apps/members_enrichment_worker/src/sources/crustdata/service.ts:214
- This documents Crustdata's no-match response contract but provides no source. Link the external reference as required by the project's comment convention.
// No match returns 200 with empty matches[].
services/apps/members_enrichment_worker/src/sources/crustdata/service.ts:326
- These lines restate the mappings already expressed by
linkedinUrlandgithubUrlbelow. Remove them to keep the code self-explanatory without redundant comments.
// Crustdata social_handles use generic identifiers:
// professional_network = LinkedIn, dev_platform = GitHub.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1a22a8e to
30681a1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
services/apps/members_enrichment_worker/src/sources/crustdata/types.ts:28
- The live payload keeps
dev_platform_identifierpresent withprofile_url: nullwhen no developer profile is found. Model that nullable value explicitly so the declared response/cache shape matches what callers actually receive.
profile_url?: string
services/apps/members_enrichment_worker/src/sources/crustdata/types.ts:8
- Live enrich responses use
nullfor an ongoing role'send_date, not just an omitted value. Excludingnullmakes the API/cache contract inaccurate and lets callers assume a present value is always a string; include it explicitly.
This issue also appears on line 28 of the same file.
end_date?: string
Summary
POST /person/professional_network/enrich/live.Bearer+x-api-version), credits check, response parsing, and normalizer field paths for 1:1 parity with the fields we use today (emails and org description intentionally deferred).Changes
fields(basic_profile,social_handles,professional_network,experience,education,skills).GET /account/creditsand gate onaccount.credits > 7.person_data(+ CDP metadata) and type the enrich response envelope (matched_on,match_type,matches[].confidence_score).professional_network_id→ LinkedIn company identity).