@coldiq/mcp 0.3.37 → 0.3.39
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/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +121 -21
- package/dist/registry.js.map +1 -1
- package/dist/utils/provider-resolver.d.ts.map +1 -1
- package/dist/utils/provider-resolver.js +1 -0
- package/dist/utils/provider-resolver.js.map +1 -1
- package/package.json +1 -1
- package/src/registry.ts +127 -21
- package/src/utils/provider-resolver.ts +1 -0
- package/tests/registry-linkupapi.test.ts +2 -2
- package/tests/registry.test.ts +23 -9
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAA;IACpC;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IACtD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,qCAAqC;IACrC,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IACtC,kDAAkD;IAClD,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,MAAM,CAAA;CACzC;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,KAAK,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA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E,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAIlG;AA0BD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAgCD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAclE;AAKD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAGpF;AA04GD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CAE1E;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,GACjB,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,CAI3D;AAID;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,UAAU,GAAG,aAAa,EAAE,CASpE;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,EAAE,CAkB5E"}
|
package/dist/registry.js
CHANGED
|
@@ -1494,7 +1494,7 @@ const findEmailProviders = [
|
|
|
1494
1494
|
id: 'findymail',
|
|
1495
1495
|
endpoint: '/findymail/search/name',
|
|
1496
1496
|
method: 'POST',
|
|
1497
|
-
priority:
|
|
1497
|
+
priority: 7,
|
|
1498
1498
|
isApplicable: (input) => typeof input.first_name === 'string' && input.first_name.length > 0 &&
|
|
1499
1499
|
((typeof input.domain === 'string' && input.domain.length > 0) ||
|
|
1500
1500
|
(typeof input.company_name === 'string' && input.company_name.length > 0)),
|
|
@@ -1516,7 +1516,7 @@ const findEmailProviders = [
|
|
|
1516
1516
|
id: 'icypeas',
|
|
1517
1517
|
endpoint: '/icypeas/email-search',
|
|
1518
1518
|
method: 'POST',
|
|
1519
|
-
priority:
|
|
1519
|
+
priority: 11,
|
|
1520
1520
|
mapParams: (input) => ({
|
|
1521
1521
|
body: {
|
|
1522
1522
|
firstname: input.first_name,
|
|
@@ -1534,7 +1534,7 @@ const findEmailProviders = [
|
|
|
1534
1534
|
id: 'limadata-work-email',
|
|
1535
1535
|
endpoint: '/coldiq/find/work-email',
|
|
1536
1536
|
method: 'POST',
|
|
1537
|
-
priority:
|
|
1537
|
+
priority: 1,
|
|
1538
1538
|
mapParams: (input) => {
|
|
1539
1539
|
const fullName = [input.first_name, input.last_name].filter(Boolean).join(' ');
|
|
1540
1540
|
return {
|
|
@@ -1564,7 +1564,7 @@ const findEmailProviders = [
|
|
|
1564
1564
|
id: 'prospeo',
|
|
1565
1565
|
endpoint: '/prospeo/enrich-person',
|
|
1566
1566
|
method: 'POST',
|
|
1567
|
-
priority:
|
|
1567
|
+
priority: 3,
|
|
1568
1568
|
mapParams: (input) => {
|
|
1569
1569
|
if (input.linkedin_url) {
|
|
1570
1570
|
return { body: { data: { linkedin_url: input.linkedin_url } } };
|
|
@@ -1590,7 +1590,7 @@ const findEmailProviders = [
|
|
|
1590
1590
|
id: 'blitzapi',
|
|
1591
1591
|
endpoint: '/blitzapi/enrichment/find-work-email',
|
|
1592
1592
|
method: 'POST',
|
|
1593
|
-
priority:
|
|
1593
|
+
priority: 4,
|
|
1594
1594
|
mapParams: (input) => ({
|
|
1595
1595
|
body: { person_linkedin_url: input.linkedin_url },
|
|
1596
1596
|
}),
|
|
@@ -1604,7 +1604,7 @@ const findEmailProviders = [
|
|
|
1604
1604
|
id: 'fullenrich',
|
|
1605
1605
|
endpoint: '/fullenrich/contact/enrich/bulk',
|
|
1606
1606
|
method: 'POST',
|
|
1607
|
-
priority:
|
|
1607
|
+
priority: 8,
|
|
1608
1608
|
mapParams: (input) => ({
|
|
1609
1609
|
body: {
|
|
1610
1610
|
name: 'mcp-enrich',
|
|
@@ -1645,7 +1645,7 @@ const findEmailProviders = [
|
|
|
1645
1645
|
id: 'limadata-work-email-linkedin',
|
|
1646
1646
|
endpoint: '/coldiq/find/work-email-linkedin',
|
|
1647
1647
|
method: 'POST',
|
|
1648
|
-
priority:
|
|
1648
|
+
priority: 5,
|
|
1649
1649
|
mapParams: (input) => ({
|
|
1650
1650
|
body: { linkedin_url: input.linkedin_url },
|
|
1651
1651
|
}),
|
|
@@ -1666,7 +1666,7 @@ const findEmailProviders = [
|
|
|
1666
1666
|
id: 'linkupapi',
|
|
1667
1667
|
endpoint: '/linkupapi/data/mail/finder',
|
|
1668
1668
|
method: 'POST',
|
|
1669
|
-
priority:
|
|
1669
|
+
priority: 10,
|
|
1670
1670
|
mapParams: (input) => ({
|
|
1671
1671
|
body: {
|
|
1672
1672
|
first_name: input.first_name,
|
|
@@ -1685,7 +1685,7 @@ const findEmailProviders = [
|
|
|
1685
1685
|
id: 'apollo-people-match',
|
|
1686
1686
|
endpoint: '/apollo/people/match',
|
|
1687
1687
|
method: 'POST',
|
|
1688
|
-
priority:
|
|
1688
|
+
priority: 6,
|
|
1689
1689
|
isApplicable: (input) => (typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0) ||
|
|
1690
1690
|
(!!input.first_name && !!input.last_name && !!(input.domain || input.company_name)),
|
|
1691
1691
|
mapParams: (input) => ({
|
|
@@ -1711,7 +1711,7 @@ const findEmailProviders = [
|
|
|
1711
1711
|
id: 'pdl-person-enrich',
|
|
1712
1712
|
endpoint: '/pdl/person/enrich',
|
|
1713
1713
|
method: 'POST',
|
|
1714
|
-
priority:
|
|
1714
|
+
priority: 9,
|
|
1715
1715
|
isApplicable: (input) => (typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0) ||
|
|
1716
1716
|
(!!input.first_name && !!input.last_name && !!(input.domain || input.company_name)),
|
|
1717
1717
|
mapParams: (input) => ({
|
|
@@ -1730,6 +1730,28 @@ const findEmailProviders = [
|
|
|
1730
1730
|
return !!rec && typeof rec.work_email === 'string' && rec.work_email.includes('@');
|
|
1731
1731
|
},
|
|
1732
1732
|
},
|
|
1733
|
+
{
|
|
1734
|
+
id: 'leadmagic',
|
|
1735
|
+
endpoint: '/leadmagic/people/email-finder',
|
|
1736
|
+
method: 'POST',
|
|
1737
|
+
priority: 2,
|
|
1738
|
+
isApplicable: (input) => typeof input.first_name === 'string' && input.first_name.length > 0 &&
|
|
1739
|
+
((typeof input.domain === 'string' && input.domain.length > 0) ||
|
|
1740
|
+
(typeof input.company_name === 'string' && input.company_name.length > 0)),
|
|
1741
|
+
mapParams: (input) => ({
|
|
1742
|
+
body: {
|
|
1743
|
+
first_name: input.first_name,
|
|
1744
|
+
last_name: input.last_name,
|
|
1745
|
+
domain: input.domain,
|
|
1746
|
+
company_name: input.company_name,
|
|
1747
|
+
},
|
|
1748
|
+
}),
|
|
1749
|
+
hasResult: (data) => {
|
|
1750
|
+
// A miss is HTTP 200 with a message string and no email field.
|
|
1751
|
+
const d = data;
|
|
1752
|
+
return typeof d.email === 'string' && d.email.includes('@');
|
|
1753
|
+
},
|
|
1754
|
+
},
|
|
1733
1755
|
];
|
|
1734
1756
|
// ---------------------------------------------------------------------------
|
|
1735
1757
|
// verify_email
|
|
@@ -1740,7 +1762,7 @@ const verifyEmailProviders = [
|
|
|
1740
1762
|
id: 'findymail',
|
|
1741
1763
|
endpoint: '/findymail/verify',
|
|
1742
1764
|
method: 'POST',
|
|
1743
|
-
priority:
|
|
1765
|
+
priority: 2,
|
|
1744
1766
|
mapParams: (input) => ({ body: { email: input.email } }),
|
|
1745
1767
|
hasResult: (data) => {
|
|
1746
1768
|
const d = data;
|
|
@@ -1752,7 +1774,7 @@ const verifyEmailProviders = [
|
|
|
1752
1774
|
id: 'icypeas',
|
|
1753
1775
|
endpoint: '/icypeas/email-verification',
|
|
1754
1776
|
method: 'POST',
|
|
1755
|
-
priority:
|
|
1777
|
+
priority: 3,
|
|
1756
1778
|
mapParams: (input) => ({ body: { email: input.email } }),
|
|
1757
1779
|
hasResult: (data) => {
|
|
1758
1780
|
const d = data;
|
|
@@ -1764,7 +1786,7 @@ const verifyEmailProviders = [
|
|
|
1764
1786
|
id: 'instantly',
|
|
1765
1787
|
endpoint: '/instantly/email-verification',
|
|
1766
1788
|
method: 'POST',
|
|
1767
|
-
priority:
|
|
1789
|
+
priority: 4,
|
|
1768
1790
|
mapParams: (input) => ({ body: { email: input.email } }),
|
|
1769
1791
|
hasResult: (data) => {
|
|
1770
1792
|
const d = data;
|
|
@@ -1792,13 +1814,24 @@ const verifyEmailProviders = [
|
|
|
1792
1814
|
id: 'linkupapi-validate',
|
|
1793
1815
|
endpoint: '/linkupapi/data/mail/validate',
|
|
1794
1816
|
method: 'POST',
|
|
1795
|
-
priority:
|
|
1817
|
+
priority: 5,
|
|
1796
1818
|
mapParams: (input) => ({ body: { email: input.email } }),
|
|
1797
1819
|
hasResult: (data) => {
|
|
1798
1820
|
const d = data;
|
|
1799
1821
|
return d.verified !== undefined || d.status !== undefined || d.result !== undefined || d.valid !== undefined;
|
|
1800
1822
|
},
|
|
1801
1823
|
},
|
|
1824
|
+
{
|
|
1825
|
+
id: 'leadmagic',
|
|
1826
|
+
endpoint: '/leadmagic/people/email-validation',
|
|
1827
|
+
method: 'POST',
|
|
1828
|
+
priority: 1,
|
|
1829
|
+
mapParams: (input) => ({ body: { email: input.email } }),
|
|
1830
|
+
hasResult: (data) => {
|
|
1831
|
+
const d = data;
|
|
1832
|
+
return d.email_status === 'valid' || d.email_status === 'invalid';
|
|
1833
|
+
},
|
|
1834
|
+
},
|
|
1802
1835
|
];
|
|
1803
1836
|
// ---------------------------------------------------------------------------
|
|
1804
1837
|
// find_phone
|
|
@@ -1808,7 +1841,7 @@ const findPhoneProviders = [
|
|
|
1808
1841
|
id: 'findymail',
|
|
1809
1842
|
endpoint: '/findymail/search/phone',
|
|
1810
1843
|
method: 'POST',
|
|
1811
|
-
priority:
|
|
1844
|
+
priority: 2,
|
|
1812
1845
|
isApplicable: (input) => typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0,
|
|
1813
1846
|
mapParams: (input) => ({ body: { linkedin_url: input.linkedin_url } }),
|
|
1814
1847
|
hasResult: (data) => {
|
|
@@ -1820,7 +1853,7 @@ const findPhoneProviders = [
|
|
|
1820
1853
|
id: 'limadata',
|
|
1821
1854
|
endpoint: '/coldiq/find/phone',
|
|
1822
1855
|
method: 'POST',
|
|
1823
|
-
priority:
|
|
1856
|
+
priority: 3,
|
|
1824
1857
|
isApplicable: (input) => {
|
|
1825
1858
|
if (typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0)
|
|
1826
1859
|
return true;
|
|
@@ -1865,7 +1898,7 @@ const findPhoneProviders = [
|
|
|
1865
1898
|
id: 'ai-ark',
|
|
1866
1899
|
endpoint: '/ai-ark/people/mobile-phone-finder',
|
|
1867
1900
|
method: 'POST',
|
|
1868
|
-
priority:
|
|
1901
|
+
priority: 4,
|
|
1869
1902
|
isApplicable: (input) => {
|
|
1870
1903
|
if (typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0)
|
|
1871
1904
|
return true;
|
|
@@ -1892,6 +1925,23 @@ const findPhoneProviders = [
|
|
|
1892
1925
|
d.data.some((arr) => Array.isArray(arr) && arr.length > 0 && typeof arr[0] === 'string');
|
|
1893
1926
|
},
|
|
1894
1927
|
},
|
|
1928
|
+
{
|
|
1929
|
+
id: 'leadmagic',
|
|
1930
|
+
endpoint: '/leadmagic/people/mobile-finder',
|
|
1931
|
+
method: 'POST',
|
|
1932
|
+
priority: 1,
|
|
1933
|
+
isApplicable: (input) => (typeof input.linkedin_url === 'string' && input.linkedin_url.length > 0) ||
|
|
1934
|
+
(typeof input.email === 'string' && input.email.length > 0),
|
|
1935
|
+
mapParams: (input) => ({
|
|
1936
|
+
body: input.linkedin_url
|
|
1937
|
+
? { profile_url: input.linkedin_url }
|
|
1938
|
+
: { work_email: input.email },
|
|
1939
|
+
}),
|
|
1940
|
+
hasResult: (data) => {
|
|
1941
|
+
const d = data;
|
|
1942
|
+
return typeof d.mobile_number === 'string' && d.mobile_number.length > 0;
|
|
1943
|
+
},
|
|
1944
|
+
},
|
|
1895
1945
|
];
|
|
1896
1946
|
// ---------------------------------------------------------------------------
|
|
1897
1947
|
// enrich_company
|
|
@@ -2357,12 +2407,62 @@ function _adPlatformAllows(input, mine) {
|
|
|
2357
2407
|
const p = input.platform;
|
|
2358
2408
|
return p === undefined || p === null || p === '' || p === mine;
|
|
2359
2409
|
}
|
|
2410
|
+
/** Adyntel takes a bare `company.com` domain — strip protocol, www, and any path. */
|
|
2411
|
+
function _adyntelStripDomain(d) {
|
|
2412
|
+
return String(d ?? '')
|
|
2413
|
+
.trim()
|
|
2414
|
+
.replace(/^https?:\/\//i, '')
|
|
2415
|
+
.replace(/^www\./i, '')
|
|
2416
|
+
.replace(/\/.*$/, '');
|
|
2417
|
+
}
|
|
2418
|
+
/** True only for a single-domain query — Adyntel looks up one company per call. */
|
|
2419
|
+
function _adyntelSingleDomain(input) {
|
|
2420
|
+
return Array.isArray(input.domains) && input.domains.length === 1;
|
|
2421
|
+
}
|
|
2360
2422
|
const searchAdsProviders = [
|
|
2423
|
+
// Adyntel — synchronous, domain-first (mirror of the API registry; execution
|
|
2424
|
+
// order + predicates live server-side in src/router/registry.ts).
|
|
2425
|
+
{
|
|
2426
|
+
id: 'adyntel_google',
|
|
2427
|
+
endpoint: '/adyntel/google',
|
|
2428
|
+
method: 'POST',
|
|
2429
|
+
priority: 1,
|
|
2430
|
+
isApplicable: (input) => _adPlatformAllows(input, 'google') && _adyntelSingleDomain(input),
|
|
2431
|
+
mapParams: (input) => ({
|
|
2432
|
+
body: { company_domain: _adyntelStripDomain(input.domains[0]) },
|
|
2433
|
+
}),
|
|
2434
|
+
hasResult: (data) => isNonEmptyArray(data.ads),
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
id: 'adyntel_linkedin',
|
|
2438
|
+
endpoint: '/adyntel/linkedin',
|
|
2439
|
+
method: 'POST',
|
|
2440
|
+
priority: 2,
|
|
2441
|
+
isApplicable: (input) => _adPlatformAllows(input, 'linkedin') && _adyntelSingleDomain(input),
|
|
2442
|
+
mapParams: (input) => ({
|
|
2443
|
+
body: { company_domain: _adyntelStripDomain(input.domains[0]) },
|
|
2444
|
+
}),
|
|
2445
|
+
hasResult: (data) => isNonEmptyArray(data.ads),
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
id: 'adyntel_meta',
|
|
2449
|
+
endpoint: '/adyntel/facebook',
|
|
2450
|
+
method: 'POST',
|
|
2451
|
+
priority: 3,
|
|
2452
|
+
isApplicable: (input) => _adPlatformAllows(input, 'meta') && _adyntelSingleDomain(input),
|
|
2453
|
+
mapParams: (input) => ({
|
|
2454
|
+
body: {
|
|
2455
|
+
company_domain: _adyntelStripDomain(input.domains[0]),
|
|
2456
|
+
country_code: input.country,
|
|
2457
|
+
},
|
|
2458
|
+
}),
|
|
2459
|
+
hasResult: (data) => isNonEmptyArray(data.ads),
|
|
2460
|
+
},
|
|
2361
2461
|
{
|
|
2362
2462
|
id: 'google_ads',
|
|
2363
2463
|
endpoint: '/google-ads/search',
|
|
2364
2464
|
method: 'POST',
|
|
2365
|
-
priority:
|
|
2465
|
+
priority: 4,
|
|
2366
2466
|
isApplicable: (input) => {
|
|
2367
2467
|
if (!_adPlatformAllows(input, 'google'))
|
|
2368
2468
|
return false;
|
|
@@ -2384,7 +2484,7 @@ const searchAdsProviders = [
|
|
|
2384
2484
|
id: 'linkedin_ad_library',
|
|
2385
2485
|
endpoint: '/linkedin-ad-library/search',
|
|
2386
2486
|
method: 'POST',
|
|
2387
|
-
priority:
|
|
2487
|
+
priority: 5,
|
|
2388
2488
|
isApplicable: (input) => {
|
|
2389
2489
|
if (!_adPlatformAllows(input, 'linkedin'))
|
|
2390
2490
|
return false;
|
|
@@ -2403,7 +2503,7 @@ const searchAdsProviders = [
|
|
|
2403
2503
|
id: 'meta_ads',
|
|
2404
2504
|
endpoint: '/meta-ads/search',
|
|
2405
2505
|
method: 'POST',
|
|
2406
|
-
priority:
|
|
2506
|
+
priority: 6,
|
|
2407
2507
|
isApplicable: (input) => {
|
|
2408
2508
|
if (!_adPlatformAllows(input, 'meta'))
|
|
2409
2509
|
return false;
|
|
@@ -2430,7 +2530,7 @@ const searchAdsProviders = [
|
|
|
2430
2530
|
id: 'twitter_ads',
|
|
2431
2531
|
endpoint: '/twitter-ads-scraper/search',
|
|
2432
2532
|
method: 'POST',
|
|
2433
|
-
priority:
|
|
2533
|
+
priority: 7,
|
|
2434
2534
|
isApplicable: (input) => {
|
|
2435
2535
|
if (!_adPlatformAllows(input, 'twitter'))
|
|
2436
2536
|
return false;
|