gtm-now 0.3.3 → 0.4.1
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/index.js +75 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8741,6 +8741,11 @@ var init_bettercontact = __esm({
|
|
|
8741
8741
|
});
|
|
8742
8742
|
|
|
8743
8743
|
// src/providers/adapters/disco.ts
|
|
8744
|
+
function mapSeniority(values) {
|
|
8745
|
+
if (!values || values.length === 0) return void 0;
|
|
8746
|
+
const mapped = values.map((v) => SENIORITY_TO_DISCO[v] ?? v);
|
|
8747
|
+
return [...new Set(mapped)];
|
|
8748
|
+
}
|
|
8744
8749
|
function parseName(fullName) {
|
|
8745
8750
|
const parts = fullName.trim().split(/\s+/);
|
|
8746
8751
|
if (parts.length === 0) return { first: "", last: "" };
|
|
@@ -8751,12 +8756,22 @@ function domainToCompanyName(domain) {
|
|
|
8751
8756
|
const name = domain.split(".")[0] ?? domain;
|
|
8752
8757
|
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
8753
8758
|
}
|
|
8754
|
-
var DiscoAdapter;
|
|
8759
|
+
var SENIORITY_TO_DISCO, DiscoAdapter;
|
|
8755
8760
|
var init_disco = __esm({
|
|
8756
8761
|
"src/providers/adapters/disco.ts"() {
|
|
8757
8762
|
"use strict";
|
|
8758
8763
|
init_dist();
|
|
8759
8764
|
init_dist2();
|
|
8765
|
+
SENIORITY_TO_DISCO = {
|
|
8766
|
+
c_suite: "executive",
|
|
8767
|
+
founder: "executive",
|
|
8768
|
+
owner: "executive",
|
|
8769
|
+
partner: "executive",
|
|
8770
|
+
head: "director",
|
|
8771
|
+
senior: "senior_ic",
|
|
8772
|
+
entry: "entry_level",
|
|
8773
|
+
intern: "entry_level"
|
|
8774
|
+
};
|
|
8760
8775
|
DiscoAdapter = class {
|
|
8761
8776
|
name = "disco";
|
|
8762
8777
|
capabilities = ["find_companies", "find_people"];
|
|
@@ -8868,7 +8883,7 @@ var init_disco = __esm({
|
|
|
8868
8883
|
has_email: query.has_email ?? true,
|
|
8869
8884
|
max_records: query.limit ?? 25,
|
|
8870
8885
|
// Cast to DiscoSeniority — PeopleQuery uses string[] for cross-provider compat
|
|
8871
|
-
seniority: query.seniority,
|
|
8886
|
+
seniority: mapSeniority(query.seniority),
|
|
8872
8887
|
department: query.department,
|
|
8873
8888
|
has_phone: query.has_phone,
|
|
8874
8889
|
has_linkedin: query.has_linkedin,
|
|
@@ -10807,6 +10822,13 @@ var init_prospect2 = __esm({
|
|
|
10807
10822
|
provider: {
|
|
10808
10823
|
type: "string",
|
|
10809
10824
|
description: "Provider override: disco, apollo, storeleads (uses first available if omitted)"
|
|
10825
|
+
},
|
|
10826
|
+
fields: {
|
|
10827
|
+
description: 'Response fields. Defaults to slim (domain, name, industry, employees, country). Pass "all" for full payload including description, tech_stack, score, linkedin_url.',
|
|
10828
|
+
oneOf: [
|
|
10829
|
+
{ type: "string", enum: ["all"] },
|
|
10830
|
+
{ type: "array", items: { type: "string" } }
|
|
10831
|
+
]
|
|
10810
10832
|
}
|
|
10811
10833
|
},
|
|
10812
10834
|
required: []
|
|
@@ -10814,7 +10836,7 @@ var init_prospect2 = __esm({
|
|
|
10814
10836
|
},
|
|
10815
10837
|
{
|
|
10816
10838
|
name: "gtm_find_people",
|
|
10817
|
-
description:
|
|
10839
|
+
description: 'Find contacts at companies by job title, company, or domain. Returns name, title, email (when available), phone, and LinkedIn URL.\n\nPowered by DiscoLike Contacts, Apollo, or BetterContact depending on configuration.\n\nDiscoLike strengths:\n- Domain-based search: pass company_domain or company_domains[] for multi-domain batch\n- Seniority filtering (owner, founder, c_suite, partner, vp, head, director, manager, senior, entry, intern)\n- Industry + skills filtering to narrow results without post-processing\n- email_validated flag for pre-verified emails only\n- Employee/revenue range filters for company-level targeting\n- Returns validated emails when available\n\nResponse is slim by default (name, title, email, company, company_domain, linkedin). Pass fields: "all" for full payload.\n\nAfter finding people, use:\n- gtm_enrich to get verified email/phone if not returned (company_domain field is pipeline-compatible)\n- gtm_linkedin to check LinkedIn activity and engagement signals\n\nKnown limitations:\n- department + seniority filters combined may return 0 results (Disco API uses strict AND). Use one or the other.',
|
|
10818
10840
|
inputSchema: {
|
|
10819
10841
|
type: "object",
|
|
10820
10842
|
properties: {
|
|
@@ -10871,6 +10893,44 @@ var init_prospect2 = __esm({
|
|
|
10871
10893
|
provider: {
|
|
10872
10894
|
type: "string",
|
|
10873
10895
|
description: "Provider override: disco, apollo (uses first available if omitted)"
|
|
10896
|
+
},
|
|
10897
|
+
company_domains: {
|
|
10898
|
+
type: "array",
|
|
10899
|
+
items: { type: "string" },
|
|
10900
|
+
description: 'Search across multiple company domains in one call (e.g., ["stripe.com", "plaid.com"]). DiscoLike native.'
|
|
10901
|
+
},
|
|
10902
|
+
skills: {
|
|
10903
|
+
type: "array",
|
|
10904
|
+
items: { type: "string" },
|
|
10905
|
+
description: 'Filter by skills (e.g., ["artificial intelligence", "machine learning"])'
|
|
10906
|
+
},
|
|
10907
|
+
filter_industry: {
|
|
10908
|
+
type: "array",
|
|
10909
|
+
items: { type: "string" },
|
|
10910
|
+
description: 'Filter by company industry (e.g., ["SOFTWARE", "SAAS", "IT_SERVICES"])'
|
|
10911
|
+
},
|
|
10912
|
+
email_validated: {
|
|
10913
|
+
type: "boolean",
|
|
10914
|
+
description: "Only return contacts with validated email addresses"
|
|
10915
|
+
},
|
|
10916
|
+
min_employees: {
|
|
10917
|
+
type: "number",
|
|
10918
|
+
description: "Minimum company employee count"
|
|
10919
|
+
},
|
|
10920
|
+
max_employees: {
|
|
10921
|
+
type: "number",
|
|
10922
|
+
description: "Maximum company employee count"
|
|
10923
|
+
},
|
|
10924
|
+
revenue_range: {
|
|
10925
|
+
type: "string",
|
|
10926
|
+
description: 'Company revenue range as "min,max" (e.g., "1000000,10000000")'
|
|
10927
|
+
},
|
|
10928
|
+
fields: {
|
|
10929
|
+
description: 'Response fields. Defaults to slim (name, title, email, company, company_domain, linkedin). Pass "all" for full payload including skills, phone, seniority, department, connections. Or pass an array of specific field names.',
|
|
10930
|
+
oneOf: [
|
|
10931
|
+
{ type: "string", enum: ["all"] },
|
|
10932
|
+
{ type: "array", items: { type: "string" } }
|
|
10933
|
+
]
|
|
10874
10934
|
}
|
|
10875
10935
|
},
|
|
10876
10936
|
required: []
|
|
@@ -11697,7 +11757,8 @@ var init_validation = __esm({
|
|
|
11697
11757
|
min_digital_footprint: z2.number().min(0).optional(),
|
|
11698
11758
|
max_digital_footprint: z2.number().min(0).optional(),
|
|
11699
11759
|
offset: z2.number().int().min(0).optional(),
|
|
11700
|
-
provider: z2.string().optional()
|
|
11760
|
+
provider: z2.string().optional(),
|
|
11761
|
+
fields: z2.union([z2.literal("all"), z2.array(z2.string())]).optional()
|
|
11701
11762
|
}),
|
|
11702
11763
|
// 2. People/contact search
|
|
11703
11764
|
gtm_find_people: z2.object({
|
|
@@ -11713,7 +11774,16 @@ var init_validation = __esm({
|
|
|
11713
11774
|
has_linkedin: z2.boolean().optional(),
|
|
11714
11775
|
min_connections: z2.number().int().min(0).optional(),
|
|
11715
11776
|
offset: z2.number().int().min(0).optional(),
|
|
11716
|
-
provider: z2.string().optional()
|
|
11777
|
+
provider: z2.string().optional(),
|
|
11778
|
+
// ─── DiscoLike filters ───
|
|
11779
|
+
company_domains: z2.array(z2.string().min(1)).optional(),
|
|
11780
|
+
skills: z2.array(z2.string()).optional(),
|
|
11781
|
+
filter_industry: z2.array(z2.string()).optional(),
|
|
11782
|
+
email_validated: z2.boolean().optional(),
|
|
11783
|
+
min_employees: z2.number().int().min(0).optional(),
|
|
11784
|
+
max_employees: z2.number().int().min(1).optional(),
|
|
11785
|
+
revenue_range: z2.string().optional(),
|
|
11786
|
+
fields: z2.union([z2.literal("all"), z2.array(z2.string())]).optional()
|
|
11717
11787
|
}),
|
|
11718
11788
|
// StorLeads — DTC/e-commerce company search
|
|
11719
11789
|
gtm_storeleads: z2.object({
|