@@ -5,8 +5,10 @@ import type { EnrichmentConfig } from '@/enrichments/types'
55
66/**
77 * Work Email enrichment. Finds a person's work email from their full name and
8- * company domain, trying Hunter first (deterministic finder) then People Data
9- * Labs (record match) as a fallback.
8+ * company domain via a provider waterfall: deterministic finders first (Hunter,
9+ * Findymail), then enrichment/reveal providers (Prospeo, Wiza), then People Data
10+ * Labs as a broad record-match fallback. The first provider to return an email
11+ * wins; each provider supports hosted keys so the cascade runs without BYOK.
1012 */
1113export const workEmailEnrichment : EnrichmentConfig = {
1214 id : 'work-email' ,
@@ -34,6 +36,55 @@ export const workEmailEnrichment: EnrichmentConfig = {
3436 return email ? { email } : null
3537 } ,
3638 } ) ,
39+ toolProvider ( {
40+ id : 'findymail' ,
41+ label : 'Findymail' ,
42+ toolId : 'findymail_find_email_from_name' ,
43+ buildParams : ( inputs ) => {
44+ const name = str ( inputs . fullName )
45+ const domain = normalizeDomain ( inputs . companyDomain )
46+ if ( ! name || ! domain ) return null
47+ return { name, domain }
48+ } ,
49+ mapOutput : ( output ) => {
50+ const contact = output . contact as Record < string , unknown > | null
51+ const email = str ( contact ?. email )
52+ return email ? { email } : null
53+ } ,
54+ } ) ,
55+ toolProvider ( {
56+ id : 'prospeo' ,
57+ label : 'Prospeo' ,
58+ toolId : 'prospeo_enrich_person' ,
59+ buildParams : ( inputs ) => {
60+ const fullName = str ( inputs . fullName )
61+ const companyWebsite = normalizeDomain ( inputs . companyDomain )
62+ if ( ! fullName || ! companyWebsite ) return null
63+ return { full_name : fullName , company_website : companyWebsite }
64+ } ,
65+ mapOutput : ( output ) => {
66+ const person = output . person as Record < string , unknown > | undefined
67+ const emailObj = person ?. email as Record < string , unknown > | undefined
68+ const email = str ( emailObj ?. email )
69+ return email ? { email } : null
70+ } ,
71+ } ) ,
72+ toolProvider ( {
73+ id : 'wiza' ,
74+ label : 'Wiza' ,
75+ toolId : 'wiza_individual_reveal' ,
76+ buildParams : ( inputs ) => {
77+ const fullName = str ( inputs . fullName )
78+ const domain = normalizeDomain ( inputs . companyDomain )
79+ if ( ! fullName || ! domain ) return null
80+ // 'partial' reveals the email only (2 credits); avoids phone charges.
81+ return { full_name : fullName , domain, enrichment_level : 'partial' }
82+ } ,
83+ mapOutput : ( output ) => {
84+ const email = str ( output . email )
85+ return email ? { email } : null
86+ } ,
87+ } ) ,
3788 toolProvider ( {
3889 id : 'pdl' ,
3990 label : 'People Data Labs' ,
0 commit comments