linkedin-secret-sauce 0.12.0 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -21
- package/dist/cosiall-client.d.ts +1 -1
- package/dist/cosiall-client.js +1 -1
- package/dist/enrichment/index.d.ts +3 -3
- package/dist/enrichment/index.js +19 -2
- package/dist/enrichment/matching.d.ts +29 -9
- package/dist/enrichment/matching.js +545 -142
- package/dist/enrichment/providers/bounceban.d.ts +82 -0
- package/dist/enrichment/providers/bounceban.js +447 -0
- package/dist/enrichment/providers/bouncer.d.ts +1 -1
- package/dist/enrichment/providers/bouncer.js +19 -21
- package/dist/enrichment/providers/construct.d.ts +1 -1
- package/dist/enrichment/providers/construct.js +22 -38
- package/dist/enrichment/providers/cosiall.d.ts +27 -0
- package/dist/enrichment/providers/cosiall.js +109 -0
- package/dist/enrichment/providers/dropcontact.d.ts +15 -9
- package/dist/enrichment/providers/dropcontact.js +188 -19
- package/dist/enrichment/providers/hunter.d.ts +8 -1
- package/dist/enrichment/providers/hunter.js +52 -28
- package/dist/enrichment/providers/index.d.ts +10 -7
- package/dist/enrichment/providers/index.js +12 -1
- package/dist/enrichment/providers/ldd.d.ts +1 -10
- package/dist/enrichment/providers/ldd.js +20 -97
- package/dist/enrichment/providers/smartprospect.js +28 -48
- package/dist/enrichment/providers/snovio.d.ts +1 -1
- package/dist/enrichment/providers/snovio.js +29 -31
- package/dist/enrichment/providers/trykitt.d.ts +63 -0
- package/dist/enrichment/providers/trykitt.js +210 -0
- package/dist/enrichment/types.d.ts +234 -17
- package/dist/enrichment/types.js +60 -48
- package/dist/enrichment/utils/candidate-parser.d.ts +107 -0
- package/dist/enrichment/utils/candidate-parser.js +173 -0
- package/dist/enrichment/utils/noop-provider.d.ts +39 -0
- package/dist/enrichment/utils/noop-provider.js +37 -0
- package/dist/enrichment/utils/rate-limiter.d.ts +103 -0
- package/dist/enrichment/utils/rate-limiter.js +204 -0
- package/dist/enrichment/utils/validation.d.ts +75 -3
- package/dist/enrichment/utils/validation.js +164 -11
- package/dist/linkedin-api.d.ts +40 -1
- package/dist/linkedin-api.js +160 -27
- package/dist/types.d.ts +50 -1
- package/dist/utils/lru-cache.d.ts +105 -0
- package/dist/utils/lru-cache.js +175 -0
- package/package.json +25 -26
package/README.md
CHANGED
|
@@ -8,10 +8,16 @@ A complete LinkedIn Sales Navigator client + Email Enrichment library for Node.j
|
|
|
8
8
|
|
|
9
9
|
## Documentation
|
|
10
10
|
|
|
11
|
-
- [Full API Documentation](https://enerage.github.io/LinkedInSecretSauce/) - Auto-generated TypeDoc
|
|
12
11
|
- [Integration Guide](docs/INTEGRATION.md) - Step-by-step setup
|
|
13
12
|
- [Sales Search Guide](docs/SALES_SEARCH.md) - Advanced search filters
|
|
14
13
|
- [Playground Guide](docs/PLAYGROUND.md) - Local dev UI
|
|
14
|
+
- [Cosiall Profile Emails](docs/COSIALL_PROFILE_EMAILS.md) - Profile email lookups
|
|
15
|
+
|
|
16
|
+
**Generate API docs locally:**
|
|
17
|
+
```bash
|
|
18
|
+
pnpm docs
|
|
19
|
+
# Opens TypeDoc documentation in your browser
|
|
20
|
+
```
|
|
15
21
|
|
|
16
22
|
## Installation
|
|
17
23
|
|
|
@@ -193,13 +199,40 @@ Find and verify business emails using multiple providers with waterfall/parallel
|
|
|
193
199
|
|
|
194
200
|
| Provider | Type | Cost | Best For |
|
|
195
201
|
|----------|------|------|----------|
|
|
196
|
-
| **
|
|
197
|
-
| **
|
|
202
|
+
| **LDD** | Database | FREE | LinkedIn profile emails (~500M profiles) |
|
|
203
|
+
| **SmartProspect** | Database | FREE* | SmartLead's prospect database |
|
|
204
|
+
| **Cosiall** | Profile Lookup | FREE | Emails from LinkedIn profiles |
|
|
205
|
+
| **Construct** | Pattern + MX | FREE | Pattern guessing with MX verification |
|
|
198
206
|
| **Bouncer** | SMTP Verify | $0.006/email | Catch-all detection, 99%+ accuracy |
|
|
199
207
|
| **Snov.io** | Email Finder | $0.02/email | Finding emails by name+domain |
|
|
200
208
|
| **Hunter** | Email Finder | $0.005/email | Domain search, email finder |
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
|
|
210
|
+
*SmartProspect is FREE if you have a SmartLead subscription
|
|
211
|
+
|
|
212
|
+
### Cosiall Profile Emails (Standalone)
|
|
213
|
+
|
|
214
|
+
Lookup emails directly from LinkedIn profiles without the full enrichment pipeline:
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
import { fetchProfileEmailsFromCosiall } from 'linkedin-secret-sauce';
|
|
218
|
+
|
|
219
|
+
// Lookup by ObjectURN (most precise)
|
|
220
|
+
const result = await fetchProfileEmailsFromCosiall({
|
|
221
|
+
objectUrn: 'urn:li:member:129147375'
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// Or by LinkedIn URL
|
|
225
|
+
const result = await fetchProfileEmailsFromCosiall({
|
|
226
|
+
linkedInUrl: 'https://www.linkedin.com/in/john-doe/'
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Or by vanity name
|
|
230
|
+
const result = await fetchProfileEmailsFromCosiall({
|
|
231
|
+
vanity: 'john-doe'
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
console.log(result.emails); // ['john@company.com', 'john.doe@gmail.com']
|
|
235
|
+
```
|
|
203
236
|
|
|
204
237
|
### Quick Start
|
|
205
238
|
|
|
@@ -208,29 +241,25 @@ import { createEnrichmentClient } from 'linkedin-secret-sauce';
|
|
|
208
241
|
|
|
209
242
|
const enrichment = createEnrichmentClient({
|
|
210
243
|
providers: {
|
|
211
|
-
// FREE providers
|
|
212
|
-
construct: {},
|
|
213
|
-
|
|
214
|
-
// Paid providers (add your API keys)
|
|
215
|
-
hunter: { apiKey: process.env.HUNTER_API_KEY },
|
|
216
|
-
apollo: { apiKey: process.env.APOLLO_API_KEY },
|
|
217
|
-
bouncer: { apiKey: process.env.BOUNCER_API_KEY },
|
|
218
|
-
snovio: {
|
|
219
|
-
clientId: process.env.SNOVIO_CLIENT_ID,
|
|
220
|
-
clientSecret: process.env.SNOVIO_CLIENT_SECRET
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
// Your private LinkedIn data dump
|
|
244
|
+
// FREE providers - all run automatically in parallel
|
|
224
245
|
ldd: {
|
|
225
246
|
apiUrl: process.env.LDD_API_URL,
|
|
226
247
|
apiToken: process.env.LDD_API_TOKEN
|
|
227
248
|
},
|
|
228
|
-
|
|
229
|
-
// SmartLead (supports credentials or direct token)
|
|
230
249
|
smartprospect: {
|
|
231
250
|
email: process.env.SMARTLEAD_EMAIL,
|
|
232
251
|
password: process.env.SMARTLEAD_PASSWORD,
|
|
233
252
|
},
|
|
253
|
+
// cosiall: enabled by default (uses global Cosiall config)
|
|
254
|
+
// construct: enabled by default (pattern guessing)
|
|
255
|
+
|
|
256
|
+
// PAID providers - only used if FREE providers don't find email
|
|
257
|
+
bouncer: { apiKey: process.env.BOUNCER_API_KEY },
|
|
258
|
+
snovio: {
|
|
259
|
+
userId: process.env.SNOVIO_USER_ID,
|
|
260
|
+
apiSecret: process.env.SNOVIO_API_SECRET
|
|
261
|
+
},
|
|
262
|
+
hunter: { apiKey: process.env.HUNTER_API_KEY },
|
|
234
263
|
},
|
|
235
264
|
|
|
236
265
|
// Optional: cost tracking callback
|
|
@@ -554,4 +583,4 @@ UNLICENSED - Private package
|
|
|
554
583
|
## Support
|
|
555
584
|
|
|
556
585
|
- Issues: [GitHub Issues](https://github.com/enerage/LinkedInSecretSauce/issues)
|
|
557
|
-
- Docs:
|
|
586
|
+
- Docs: Run `pnpm docs` to generate TypeDoc locally
|
package/dist/cosiall-client.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare function fetchCookiesFromCosiall(): Promise<AccountCookies[]>;
|
|
|
41
41
|
* ```typescript
|
|
42
42
|
* // Lookup by ObjectURN (most precise)
|
|
43
43
|
* const result = await fetchProfileEmailsFromCosiall({
|
|
44
|
-
* objectUrn: 'urn:li:
|
|
44
|
+
* objectUrn: 'urn:li:member:129147375'
|
|
45
45
|
* });
|
|
46
46
|
*
|
|
47
47
|
* // Lookup by LinkedIn URL
|
package/dist/cosiall-client.js
CHANGED
|
@@ -149,7 +149,7 @@ async function fetchCookiesFromCosiall() {
|
|
|
149
149
|
* ```typescript
|
|
150
150
|
* // Lookup by ObjectURN (most precise)
|
|
151
151
|
* const result = await fetchProfileEmailsFromCosiall({
|
|
152
|
-
* objectUrn: 'urn:li:
|
|
152
|
+
* objectUrn: 'urn:li:member:129147375'
|
|
153
153
|
* });
|
|
154
154
|
*
|
|
155
155
|
* // Lookup by LinkedIn URL
|
|
@@ -40,10 +40,10 @@ export { PROVIDER_COSTS, DEFAULT_PROVIDER_ORDER } from "./types";
|
|
|
40
40
|
export { isPersonalEmail, isBusinessEmail, isPersonalDomain, PERSONAL_DOMAINS, } from "./utils/personal-domains";
|
|
41
41
|
export { isDisposableEmail, isDisposableDomain, DISPOSABLE_DOMAINS, } from "./utils/disposable-domains";
|
|
42
42
|
export { isValidEmailSyntax, isRoleAccount, asciiFold, cleanNamePart, hostnameFromUrl, extractLinkedInUsername, } from "./utils/validation";
|
|
43
|
-
export { verifyEmailMx, checkDomainCatchAll, verifyEmailsExist } from "./verification/mx";
|
|
44
|
-
export { createConstructProvider, createLddProvider, createSmartProspectProvider, createHunterProvider, createDropcontactProvider, createBouncerProvider, createSnovioProvider, verifyEmailWithBouncer, checkCatchAllDomain, verifyEmailsBatch, findEmailsWithSnovio, verifyEmailWithSnovio, clearSnovioTokenCache, } from "./providers";
|
|
43
|
+
export { verifyEmailMx, checkDomainCatchAll, verifyEmailsExist, } from "./verification/mx";
|
|
44
|
+
export { createConstructProvider, createLddProvider, createSmartProspectProvider, createCosiallProvider, createTryKittProvider, createHunterProvider, createDropcontactProvider, createBouncerProvider, createBounceBanProvider, createSnovioProvider, findEmailWithTryKitt, verifyEmailWithTryKitt, verifyEmailWithBouncer, checkCatchAllDomain, verifyEmailsBatch, verifyEmailWithBounceBan, verifyEmailsBatchWithBounceBan, checkCatchAllWithBounceBan, findEmailsWithSnovio, verifyEmailWithSnovio, clearSnovioTokenCache, } from "./providers";
|
|
45
45
|
export { extractNumericLinkedInId } from "./providers/ldd";
|
|
46
46
|
export { createSmartProspectClient, type SmartProspectClient, type SmartProspectLocationOptions, } from "./providers/smartprospect";
|
|
47
|
-
export { enrichBusinessEmail, enrichBatch, enrichAllEmails, enrichAllBatch } from "./orchestrator";
|
|
47
|
+
export { enrichBusinessEmail, enrichBatch, enrichAllEmails, enrichAllBatch, } from "./orchestrator";
|
|
48
48
|
export { getSmartLeadToken, getSmartLeadUser, clearSmartLeadToken, clearAllSmartLeadTokens, getSmartLeadTokenCacheStats, enableFileCache, disableFileCache, isFileCacheEnabled, clearFileCache, type SmartLeadCredentials, type SmartLeadAuthConfig, type SmartLeadUser, type SmartLeadLoginResponse, } from "./auth";
|
|
49
49
|
export { calculateMatchConfidence, classifyMatchQuality, findBestMatch, matchContacts, buildSmartProspectFiltersFromLinkedIn, parseLinkedInSearchResponse, enrichLinkedInContact, enrichLinkedInContactsBatch, createLinkedInEnricher, getEmailsForLinkedInContact, getEmailsForLinkedInContactsBatch, salesLeadToContact, type LinkedInContact, type MatchResult, type MatchOptions, type LinkedInEnrichmentResult, type LinkedInEnrichmentOptions, type EmailSource, type EmailResult, type GetEmailsResult, type GetEmailsConfig, type GetEmailsOptions, } from "./matching";
|
package/dist/enrichment/index.js
CHANGED
|
@@ -43,13 +43,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
43
43
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
47
|
-
exports.salesLeadToContact = exports.getEmailsForLinkedInContactsBatch = exports.getEmailsForLinkedInContact = exports.createLinkedInEnricher = exports.enrichLinkedInContactsBatch = exports.enrichLinkedInContact = exports.parseLinkedInSearchResponse = exports.buildSmartProspectFiltersFromLinkedIn = void 0;
|
|
46
|
+
exports.getSmartLeadTokenCacheStats = exports.clearAllSmartLeadTokens = exports.clearSmartLeadToken = exports.getSmartLeadUser = exports.getSmartLeadToken = exports.enrichAllBatch = exports.enrichAllEmails = exports.enrichBatch = exports.enrichBusinessEmail = exports.createSmartProspectClient = exports.extractNumericLinkedInId = exports.clearSnovioTokenCache = exports.verifyEmailWithSnovio = exports.findEmailsWithSnovio = exports.checkCatchAllWithBounceBan = exports.verifyEmailsBatchWithBounceBan = exports.verifyEmailWithBounceBan = exports.verifyEmailsBatch = exports.checkCatchAllDomain = exports.verifyEmailWithBouncer = exports.verifyEmailWithTryKitt = exports.findEmailWithTryKitt = exports.createSnovioProvider = exports.createBounceBanProvider = exports.createBouncerProvider = exports.createDropcontactProvider = exports.createHunterProvider = exports.createTryKittProvider = exports.createCosiallProvider = exports.createSmartProspectProvider = exports.createLddProvider = exports.createConstructProvider = exports.verifyEmailsExist = exports.checkDomainCatchAll = exports.verifyEmailMx = exports.extractLinkedInUsername = exports.hostnameFromUrl = exports.cleanNamePart = exports.asciiFold = exports.isRoleAccount = exports.isValidEmailSyntax = exports.DISPOSABLE_DOMAINS = exports.isDisposableDomain = exports.isDisposableEmail = exports.PERSONAL_DOMAINS = exports.isPersonalDomain = exports.isBusinessEmail = exports.isPersonalEmail = exports.DEFAULT_PROVIDER_ORDER = exports.PROVIDER_COSTS = void 0;
|
|
47
|
+
exports.salesLeadToContact = exports.getEmailsForLinkedInContactsBatch = exports.getEmailsForLinkedInContact = exports.createLinkedInEnricher = exports.enrichLinkedInContactsBatch = exports.enrichLinkedInContact = exports.parseLinkedInSearchResponse = exports.buildSmartProspectFiltersFromLinkedIn = exports.matchContacts = exports.findBestMatch = exports.classifyMatchQuality = exports.calculateMatchConfidence = exports.clearFileCache = exports.isFileCacheEnabled = exports.disableFileCache = exports.enableFileCache = void 0;
|
|
48
48
|
exports.createEnrichmentClient = createEnrichmentClient;
|
|
49
49
|
const orchestrator_1 = require("./orchestrator");
|
|
50
50
|
const construct_1 = require("./providers/construct");
|
|
51
51
|
const ldd_1 = require("./providers/ldd");
|
|
52
52
|
const smartprospect_1 = require("./providers/smartprospect");
|
|
53
|
+
const cosiall_1 = require("./providers/cosiall");
|
|
53
54
|
const hunter_1 = require("./providers/hunter");
|
|
54
55
|
const dropcontact_1 = require("./providers/dropcontact");
|
|
55
56
|
const bouncer_1 = require("./providers/bouncer");
|
|
@@ -60,6 +61,7 @@ const snovio_1 = require("./providers/snovio");
|
|
|
60
61
|
* PHASE 1 - Free lookups (real data):
|
|
61
62
|
* - ldd: LinkedIn Data Dump - real verified emails (FREE)
|
|
62
63
|
* - smartprospect: SmartLead API - real verified emails (FREE with subscription)
|
|
64
|
+
* - cosiall: Cosiall Profile Emails - emails from LinkedIn profiles (FREE)
|
|
63
65
|
* - construct: Pattern guessing + MX check (FREE)
|
|
64
66
|
*
|
|
65
67
|
* PHASE 2 - Paid verification/finding (only if needed):
|
|
@@ -72,6 +74,7 @@ const snovio_1 = require("./providers/snovio");
|
|
|
72
74
|
const DEFAULT_ORDER = [
|
|
73
75
|
"ldd",
|
|
74
76
|
"smartprospect",
|
|
77
|
+
"cosiall",
|
|
75
78
|
"construct",
|
|
76
79
|
"bouncer",
|
|
77
80
|
"snovio",
|
|
@@ -96,6 +99,10 @@ function createEnrichmentClient(config) {
|
|
|
96
99
|
if (providerConfigs.smartprospect) {
|
|
97
100
|
providerFuncs.set("smartprospect", (0, smartprospect_1.createSmartProspectProvider)(providerConfigs.smartprospect));
|
|
98
101
|
}
|
|
102
|
+
// Cosiall is FREE - always create if not explicitly disabled
|
|
103
|
+
if (providerConfigs.cosiall?.enabled !== false) {
|
|
104
|
+
providerFuncs.set("cosiall", (0, cosiall_1.createCosiallProvider)(providerConfigs.cosiall));
|
|
105
|
+
}
|
|
99
106
|
if (providerConfigs.hunter) {
|
|
100
107
|
providerFuncs.set("hunter", (0, hunter_1.createHunterProvider)(providerConfigs.hunter));
|
|
101
108
|
}
|
|
@@ -270,14 +277,24 @@ var providers_1 = require("./providers");
|
|
|
270
277
|
Object.defineProperty(exports, "createConstructProvider", { enumerable: true, get: function () { return providers_1.createConstructProvider; } });
|
|
271
278
|
Object.defineProperty(exports, "createLddProvider", { enumerable: true, get: function () { return providers_1.createLddProvider; } });
|
|
272
279
|
Object.defineProperty(exports, "createSmartProspectProvider", { enumerable: true, get: function () { return providers_1.createSmartProspectProvider; } });
|
|
280
|
+
Object.defineProperty(exports, "createCosiallProvider", { enumerable: true, get: function () { return providers_1.createCosiallProvider; } });
|
|
281
|
+
Object.defineProperty(exports, "createTryKittProvider", { enumerable: true, get: function () { return providers_1.createTryKittProvider; } });
|
|
273
282
|
Object.defineProperty(exports, "createHunterProvider", { enumerable: true, get: function () { return providers_1.createHunterProvider; } });
|
|
274
283
|
Object.defineProperty(exports, "createDropcontactProvider", { enumerable: true, get: function () { return providers_1.createDropcontactProvider; } });
|
|
275
284
|
Object.defineProperty(exports, "createBouncerProvider", { enumerable: true, get: function () { return providers_1.createBouncerProvider; } });
|
|
285
|
+
Object.defineProperty(exports, "createBounceBanProvider", { enumerable: true, get: function () { return providers_1.createBounceBanProvider; } });
|
|
276
286
|
Object.defineProperty(exports, "createSnovioProvider", { enumerable: true, get: function () { return providers_1.createSnovioProvider; } });
|
|
287
|
+
// TryKitt utilities
|
|
288
|
+
Object.defineProperty(exports, "findEmailWithTryKitt", { enumerable: true, get: function () { return providers_1.findEmailWithTryKitt; } });
|
|
289
|
+
Object.defineProperty(exports, "verifyEmailWithTryKitt", { enumerable: true, get: function () { return providers_1.verifyEmailWithTryKitt; } });
|
|
277
290
|
// Bouncer utilities
|
|
278
291
|
Object.defineProperty(exports, "verifyEmailWithBouncer", { enumerable: true, get: function () { return providers_1.verifyEmailWithBouncer; } });
|
|
279
292
|
Object.defineProperty(exports, "checkCatchAllDomain", { enumerable: true, get: function () { return providers_1.checkCatchAllDomain; } });
|
|
280
293
|
Object.defineProperty(exports, "verifyEmailsBatch", { enumerable: true, get: function () { return providers_1.verifyEmailsBatch; } });
|
|
294
|
+
// BounceBan utilities
|
|
295
|
+
Object.defineProperty(exports, "verifyEmailWithBounceBan", { enumerable: true, get: function () { return providers_1.verifyEmailWithBounceBan; } });
|
|
296
|
+
Object.defineProperty(exports, "verifyEmailsBatchWithBounceBan", { enumerable: true, get: function () { return providers_1.verifyEmailsBatchWithBounceBan; } });
|
|
297
|
+
Object.defineProperty(exports, "checkCatchAllWithBounceBan", { enumerable: true, get: function () { return providers_1.checkCatchAllWithBounceBan; } });
|
|
281
298
|
// Snov.io utilities
|
|
282
299
|
Object.defineProperty(exports, "findEmailsWithSnovio", { enumerable: true, get: function () { return providers_1.findEmailsWithSnovio; } });
|
|
283
300
|
Object.defineProperty(exports, "verifyEmailWithSnovio", { enumerable: true, get: function () { return providers_1.verifyEmailWithSnovio; } });
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Matches contacts between LinkedIn Sales Navigator and SmartProspect
|
|
5
5
|
* to find the same person across both platforms.
|
|
6
6
|
*/
|
|
7
|
-
import type { SmartProspectContact, SmartProspectConfig, SmartProspectFetchResponse, LddConfig } from
|
|
8
|
-
import type { SalesLeadSearchResult } from
|
|
9
|
-
import { type SmartProspectClient } from
|
|
7
|
+
import type { SmartProspectContact, SmartProspectConfig, SmartProspectFetchResponse, LddConfig } from "./types";
|
|
8
|
+
import type { SalesLeadSearchResult } from "../types";
|
|
9
|
+
import { type SmartProspectClient } from "./providers/smartprospect";
|
|
10
10
|
/**
|
|
11
11
|
* LinkedIn Sales Navigator contact (simplified from API response)
|
|
12
12
|
*/
|
|
@@ -68,7 +68,7 @@ export interface MatchResult {
|
|
|
68
68
|
/** Which fields matched */
|
|
69
69
|
matchedFields: string[];
|
|
70
70
|
/** Match quality classification */
|
|
71
|
-
quality:
|
|
71
|
+
quality: "exact" | "high" | "medium" | "low" | "none";
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Options for matching
|
|
@@ -91,7 +91,7 @@ export declare function calculateMatchConfidence(linkedin: LinkedInContact, smar
|
|
|
91
91
|
/**
|
|
92
92
|
* Classify match quality based on confidence and matched fields
|
|
93
93
|
*/
|
|
94
|
-
export declare function classifyMatchQuality(confidence: number, matchedFields: string[]):
|
|
94
|
+
export declare function classifyMatchQuality(confidence: number, matchedFields: string[]): "exact" | "high" | "medium" | "low" | "none";
|
|
95
95
|
/**
|
|
96
96
|
* Find the best matching SmartProspect contact for a LinkedIn contact
|
|
97
97
|
*/
|
|
@@ -130,7 +130,7 @@ export interface LinkedInEnrichmentResult {
|
|
|
130
130
|
/** Match confidence score (0-100) */
|
|
131
131
|
matchConfidence: number;
|
|
132
132
|
/** Match quality classification */
|
|
133
|
-
matchQuality:
|
|
133
|
+
matchQuality: "exact" | "high" | "medium" | "low" | "none";
|
|
134
134
|
/** Which fields matched */
|
|
135
135
|
matchedFields: string[];
|
|
136
136
|
/** Enriched email (if fetched) */
|
|
@@ -258,7 +258,7 @@ export declare function createLinkedInEnricher(smartProspectConfig: SmartProspec
|
|
|
258
258
|
/**
|
|
259
259
|
* Email source - where the email was found
|
|
260
260
|
*/
|
|
261
|
-
export type EmailSource =
|
|
261
|
+
export type EmailSource = "ldd" | "smartprospect" | "cosiall" | "trykitt" | "linkedin" | "pattern" | "hunter" | "bouncer" | "bounceban" | "snovio";
|
|
262
262
|
/**
|
|
263
263
|
* Email result from unified lookup
|
|
264
264
|
*/
|
|
@@ -270,7 +270,7 @@ export interface EmailResult {
|
|
|
270
270
|
/** Confidence score (0-100) */
|
|
271
271
|
confidence: number;
|
|
272
272
|
/** Email type classification */
|
|
273
|
-
type:
|
|
273
|
+
type: "business" | "personal" | "unknown";
|
|
274
274
|
/** Whether the email was verified */
|
|
275
275
|
verified: boolean;
|
|
276
276
|
/** Email deliverability score (0-1) for SmartProspect emails */
|
|
@@ -305,6 +305,14 @@ export interface GetEmailsConfig {
|
|
|
305
305
|
ldd?: LddConfig;
|
|
306
306
|
/** SmartProspect configuration (FREE for FlexIQ - already paying monthly) */
|
|
307
307
|
smartprospect?: SmartProspectConfig;
|
|
308
|
+
/** Cosiall Profile Emails (FREE - uses global Cosiall config, no config needed here) */
|
|
309
|
+
cosiall?: {
|
|
310
|
+
enabled?: boolean;
|
|
311
|
+
};
|
|
312
|
+
/** TryKitt.ai configuration (FREE for individuals - unlimited) */
|
|
313
|
+
trykitt?: {
|
|
314
|
+
apiKey: string;
|
|
315
|
+
};
|
|
308
316
|
/** Company domain for email pattern guessing (optional - if not provided, will try to discover) */
|
|
309
317
|
companyDomain?: string;
|
|
310
318
|
/**
|
|
@@ -323,6 +331,12 @@ export interface GetEmailsConfig {
|
|
|
323
331
|
bouncer?: {
|
|
324
332
|
apiKey: string;
|
|
325
333
|
};
|
|
334
|
+
/** BounceBan configuration (FREE single / catch-all specialist) */
|
|
335
|
+
bounceban?: {
|
|
336
|
+
apiKey: string;
|
|
337
|
+
useDeepVerify?: boolean;
|
|
338
|
+
useWaterfall?: boolean;
|
|
339
|
+
};
|
|
326
340
|
/** Snov.io configuration (PAID - email finder) */
|
|
327
341
|
snovio?: {
|
|
328
342
|
userId: string;
|
|
@@ -337,11 +351,17 @@ export interface GetEmailsOptions {
|
|
|
337
351
|
skipLdd?: boolean;
|
|
338
352
|
/** Skip SmartProspect lookup (default: false) */
|
|
339
353
|
skipSmartProspect?: boolean;
|
|
354
|
+
/** Skip Cosiall Profile Emails lookup (default: false) */
|
|
355
|
+
skipCosiall?: boolean;
|
|
356
|
+
/** Skip TryKitt.ai lookup (default: false) */
|
|
357
|
+
skipTryKitt?: boolean;
|
|
340
358
|
/** Skip email pattern guessing (default: false) */
|
|
341
359
|
skipPatternGuessing?: boolean;
|
|
360
|
+
/** Skip BounceBan catch-all verification (default: false) */
|
|
361
|
+
skipBounceBan?: boolean;
|
|
342
362
|
/** Skip LinkedIn company lookup for domain discovery (default: false) */
|
|
343
363
|
skipLinkedInCompanyLookup?: boolean;
|
|
344
|
-
/** Skip paid providers Hunter/
|
|
364
|
+
/** Skip paid providers Hunter/Snovio (default: false) */
|
|
345
365
|
skipPaidProviders?: boolean;
|
|
346
366
|
/** Minimum match confidence for SmartProspect (default: 60) */
|
|
347
367
|
minMatchConfidence?: number;
|