gtm-now 0.7.3 → 0.8.0
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 +29 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8741,11 +8741,6 @@ var init_bettercontact = __esm({
|
|
|
8741
8741
|
});
|
|
8742
8742
|
|
|
8743
8743
|
// src/providers/adapters/disco.ts
|
|
8744
|
-
function mapSeniority(values) {
|
|
8745
|
-
if (!values?.length) return void 0;
|
|
8746
|
-
const mapped = values.map((v) => SENIORITY_TO_DISCO[v] ?? v);
|
|
8747
|
-
return [...new Set(mapped)];
|
|
8748
|
-
}
|
|
8749
8744
|
function buildGrowthSignals(data) {
|
|
8750
8745
|
if (!data) return void 0;
|
|
8751
8746
|
const signals = {
|
|
@@ -8822,22 +8817,12 @@ function domainToCompanyName(domain) {
|
|
|
8822
8817
|
const words = slug.replace(/[-_]/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean);
|
|
8823
8818
|
return words.map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
|
|
8824
8819
|
}
|
|
8825
|
-
var
|
|
8820
|
+
var DiscoAdapter, US_STATES, US_STATE_CODES;
|
|
8826
8821
|
var init_disco = __esm({
|
|
8827
8822
|
"src/providers/adapters/disco.ts"() {
|
|
8828
8823
|
"use strict";
|
|
8829
8824
|
init_dist();
|
|
8830
8825
|
init_dist2();
|
|
8831
|
-
SENIORITY_TO_DISCO = {
|
|
8832
|
-
c_suite: "executive",
|
|
8833
|
-
founder: "executive",
|
|
8834
|
-
owner: "executive",
|
|
8835
|
-
partner: "executive",
|
|
8836
|
-
head: "director",
|
|
8837
|
-
senior: "senior_ic",
|
|
8838
|
-
entry: "entry_level",
|
|
8839
|
-
intern: "entry_level"
|
|
8840
|
-
};
|
|
8841
8826
|
DiscoAdapter = class {
|
|
8842
8827
|
name = "disco";
|
|
8843
8828
|
capabilities = ["find_companies", "find_people"];
|
|
@@ -8944,7 +8929,7 @@ var init_disco = __esm({
|
|
|
8944
8929
|
...parseLocation(query.location),
|
|
8945
8930
|
has_email: query.has_email ?? true,
|
|
8946
8931
|
max_records: query.limit ?? 25,
|
|
8947
|
-
seniority:
|
|
8932
|
+
seniority: query.seniority,
|
|
8948
8933
|
department: query.department,
|
|
8949
8934
|
has_phone: query.has_phone,
|
|
8950
8935
|
has_linkedin: query.has_linkedin,
|
|
@@ -9038,10 +9023,14 @@ var init_disco = __esm({
|
|
|
9038
9023
|
});
|
|
9039
9024
|
|
|
9040
9025
|
// src/providers/adapters/prospeo.ts
|
|
9041
|
-
function
|
|
9026
|
+
function mapSeniority(values) {
|
|
9042
9027
|
if (!values?.length) return void 0;
|
|
9043
9028
|
const mapped = values.map((v) => SENIORITY_TO_PROSPEO[v] ?? v);
|
|
9044
|
-
return
|
|
9029
|
+
return [...new Set(mapped)];
|
|
9030
|
+
}
|
|
9031
|
+
function mapHeadcountCustom(min, max) {
|
|
9032
|
+
if (min == null && max == null) return void 0;
|
|
9033
|
+
return { ...min != null && { min }, ...max != null && { max } };
|
|
9045
9034
|
}
|
|
9046
9035
|
var SENIORITY_TO_PROSPEO, ProspeoMcpAdapter;
|
|
9047
9036
|
var init_prospeo2 = __esm({
|
|
@@ -9065,7 +9054,7 @@ var init_prospeo2 = __esm({
|
|
|
9065
9054
|
ProspeoMcpAdapter = class {
|
|
9066
9055
|
name = "prospeo";
|
|
9067
9056
|
capabilities = ["find_people", "enrich_email"];
|
|
9068
|
-
notes = "Best for: city-level people search with industry/seniority/headcount filters, email enrichment, company technology detection, funding data. 200M+ contacts.";
|
|
9057
|
+
notes = "Best for: city-level people search with industry/seniority/department/headcount filters, email enrichment, company technology detection, funding data. 200M+ contacts.";
|
|
9069
9058
|
client;
|
|
9070
9059
|
constructor(apiKey) {
|
|
9071
9060
|
this.client = new ProspeoClient({ apiKey });
|
|
@@ -9094,51 +9083,40 @@ var init_prospeo2 = __esm({
|
|
|
9094
9083
|
// ─── PeopleFinder ────────────────────────────────────────
|
|
9095
9084
|
async findPeople(query) {
|
|
9096
9085
|
const filters = {};
|
|
9097
|
-
if (query.job_title)
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
if (query.
|
|
9101
|
-
filters.person_seniority = mapSeniority2(query.seniority);
|
|
9102
|
-
}
|
|
9103
|
-
if (query.department?.length) {
|
|
9104
|
-
filters.person_department = query.department[0];
|
|
9105
|
-
}
|
|
9106
|
-
if (query.location) {
|
|
9107
|
-
filters.person_location_search = { include: [query.location] };
|
|
9108
|
-
}
|
|
9086
|
+
if (query.job_title) filters.person_job_title = query.job_title;
|
|
9087
|
+
if (query.seniority) filters.person_seniority = mapSeniority(query.seniority);
|
|
9088
|
+
if (query.department?.length) filters.person_department = query.department[0];
|
|
9089
|
+
if (query.location) filters.person_location_search = query.location;
|
|
9109
9090
|
if (query.company_domain) filters.company = query.company_domain;
|
|
9110
9091
|
if (query.company_domains?.length) filters.company = query.company_domains[0];
|
|
9111
|
-
if (query.company_name
|
|
9112
|
-
filters.company = query.company_name;
|
|
9113
|
-
}
|
|
9092
|
+
if (query.company_name) filters.company = query.company_name;
|
|
9114
9093
|
if (query.filter_industry?.length) {
|
|
9115
9094
|
filters.company_industry = { include: query.filter_industry };
|
|
9116
9095
|
}
|
|
9117
9096
|
if (query.min_employees != null || query.max_employees != null) {
|
|
9118
|
-
filters.company_headcount_custom =
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9097
|
+
filters.company_headcount_custom = mapHeadcountCustom(
|
|
9098
|
+
query.min_employees,
|
|
9099
|
+
query.max_employees
|
|
9100
|
+
);
|
|
9122
9101
|
}
|
|
9123
9102
|
if (query.skills?.length) {
|
|
9124
9103
|
filters.company_keywords = { include: query.skills };
|
|
9125
9104
|
}
|
|
9126
9105
|
const page = query.offset ? Math.floor(query.offset / (query.limit ?? 25)) + 1 : 1;
|
|
9127
9106
|
const response = await this.client.searchPeople({ page, filters });
|
|
9128
|
-
if (response.error || !response.
|
|
9129
|
-
return response.
|
|
9107
|
+
if (response.error || !response.data?.length) return [];
|
|
9108
|
+
return response.data.map((r) => ({
|
|
9130
9109
|
first_name: r.person?.first_name ?? "",
|
|
9131
9110
|
last_name: r.person?.last_name ?? "",
|
|
9132
|
-
job_title: r.person?.
|
|
9133
|
-
company: r.company?.name
|
|
9134
|
-
company_domain: r.company?.domain
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
location: r.person?.location ? [r.person.location.city, r.person.location.state, r.person.location.country].filter(Boolean).join(", ") : void 0,
|
|
9111
|
+
job_title: r.person?.job_title,
|
|
9112
|
+
company: r.company?.name,
|
|
9113
|
+
company_domain: r.company?.domain,
|
|
9114
|
+
email: r.person?.email,
|
|
9115
|
+
phone: r.person?.phone,
|
|
9116
|
+
linkedin_url: r.person?.linkedin_url,
|
|
9117
|
+
seniority: r.person?.seniority,
|
|
9118
|
+
department: r.person?.department,
|
|
9119
|
+
location: r.person?.location ?? r.company?.location,
|
|
9142
9120
|
sources: [this.name]
|
|
9143
9121
|
}));
|
|
9144
9122
|
}
|