gtm-now 0.7.0 → 0.7.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 +54 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8067,19 +8067,8 @@ var init_client12 = __esm({
|
|
|
8067
8067
|
return this.request("/search-person", {
|
|
8068
8068
|
method: "POST",
|
|
8069
8069
|
body: JSON.stringify({
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
...query.seniority?.length && { seniority: query.seniority },
|
|
8073
|
-
...query.department?.length && { department: query.department },
|
|
8074
|
-
...query.location?.length && { location: query.location },
|
|
8075
|
-
...query.company_name && { company_name: query.company_name },
|
|
8076
|
-
...query.company_domain && { company_domain: query.company_domain },
|
|
8077
|
-
...query.industry?.length && { industry: query.industry },
|
|
8078
|
-
...query.company_size?.length && { company_size: query.company_size },
|
|
8079
|
-
...query.keywords?.length && { keywords: query.keywords }
|
|
8080
|
-
},
|
|
8081
|
-
limit: query.limit ?? 25,
|
|
8082
|
-
offset: query.offset ?? 0
|
|
8070
|
+
page: query.page ?? 1,
|
|
8071
|
+
filters: query.filters
|
|
8083
8072
|
})
|
|
8084
8073
|
});
|
|
8085
8074
|
}
|
|
@@ -9032,20 +9021,14 @@ var init_disco = __esm({
|
|
|
9032
9021
|
});
|
|
9033
9022
|
|
|
9034
9023
|
// src/providers/adapters/prospeo.ts
|
|
9035
|
-
function
|
|
9036
|
-
if (!values
|
|
9024
|
+
function mapSeniority2(values) {
|
|
9025
|
+
if (!values?.length) return void 0;
|
|
9037
9026
|
const mapped = values.map((v) => SENIORITY_TO_PROSPEO[v] ?? v);
|
|
9038
9027
|
return [...new Set(mapped)];
|
|
9039
9028
|
}
|
|
9040
|
-
function
|
|
9029
|
+
function mapHeadcountCustom(min, max) {
|
|
9041
9030
|
if (min == null && max == null) return void 0;
|
|
9042
|
-
|
|
9043
|
-
return ranges.filter((r) => {
|
|
9044
|
-
const parts = r.replace("+", "").split("-").map(Number);
|
|
9045
|
-
const lo = parts[0] ?? 0;
|
|
9046
|
-
const hi = parts[1] ?? 1e5;
|
|
9047
|
-
return (min == null || hi >= min) && (max == null || lo <= max);
|
|
9048
|
-
});
|
|
9031
|
+
return { ...min != null && { min }, ...max != null && { max } };
|
|
9049
9032
|
}
|
|
9050
9033
|
var SENIORITY_TO_PROSPEO, ProspeoMcpAdapter;
|
|
9051
9034
|
var init_prospeo2 = __esm({
|
|
@@ -9054,19 +9037,22 @@ var init_prospeo2 = __esm({
|
|
|
9054
9037
|
init_dist();
|
|
9055
9038
|
init_dist2();
|
|
9056
9039
|
SENIORITY_TO_PROSPEO = {
|
|
9057
|
-
c_suite: "
|
|
9058
|
-
founder: "
|
|
9059
|
-
owner: "
|
|
9060
|
-
partner: "
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9040
|
+
c_suite: "C-Suite",
|
|
9041
|
+
founder: "C-Suite",
|
|
9042
|
+
owner: "C-Suite",
|
|
9043
|
+
partner: "C-Suite",
|
|
9044
|
+
vp: "VP",
|
|
9045
|
+
head: "Director",
|
|
9046
|
+
director: "Director",
|
|
9047
|
+
manager: "Manager",
|
|
9048
|
+
senior: "Senior",
|
|
9049
|
+
entry: "Entry",
|
|
9050
|
+
intern: "Entry"
|
|
9065
9051
|
};
|
|
9066
9052
|
ProspeoMcpAdapter = class {
|
|
9067
9053
|
name = "prospeo";
|
|
9068
9054
|
capabilities = ["find_people", "enrich_email"];
|
|
9069
|
-
notes = "Best for: city-level people search
|
|
9055
|
+
notes = "Best for: city-level people search with industry/seniority/department/headcount filters, email enrichment, company technology detection, funding data. 200M+ contacts.";
|
|
9070
9056
|
client;
|
|
9071
9057
|
constructor(apiKey) {
|
|
9072
9058
|
this.client = new ProspeoClient({ apiKey });
|
|
@@ -9086,11 +9072,7 @@ var init_prospeo2 = __esm({
|
|
|
9086
9072
|
async checkCredits() {
|
|
9087
9073
|
try {
|
|
9088
9074
|
const info = await this.client.getAccountInfo();
|
|
9089
|
-
return {
|
|
9090
|
-
remaining: info.credits,
|
|
9091
|
-
unit: "credits",
|
|
9092
|
-
provider: this.name
|
|
9093
|
-
};
|
|
9075
|
+
return { remaining: info.credits, unit: "credits", provider: this.name };
|
|
9094
9076
|
} catch (error) {
|
|
9095
9077
|
logError("prospeo:checkCredits", error instanceof Error ? error : new Error(String(error)));
|
|
9096
9078
|
return null;
|
|
@@ -9098,30 +9080,41 @@ var init_prospeo2 = __esm({
|
|
|
9098
9080
|
}
|
|
9099
9081
|
// ─── PeopleFinder ────────────────────────────────────────
|
|
9100
9082
|
async findPeople(query) {
|
|
9101
|
-
const
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9083
|
+
const filters = {};
|
|
9084
|
+
if (query.job_title) filters.person_job_title = query.job_title;
|
|
9085
|
+
if (query.seniority) filters.person_seniority = mapSeniority2(query.seniority);
|
|
9086
|
+
if (query.department?.length) filters.person_department = query.department[0];
|
|
9087
|
+
if (query.location) filters.person_location_search = query.location;
|
|
9088
|
+
if (query.company_domain) filters.company = query.company_domain;
|
|
9089
|
+
if (query.company_domains?.length) filters.company = query.company_domains[0];
|
|
9090
|
+
if (query.company_name) filters.company = query.company_name;
|
|
9091
|
+
if (query.filter_industry?.length) {
|
|
9092
|
+
filters.company_industry = { include: query.filter_industry };
|
|
9093
|
+
}
|
|
9094
|
+
if (query.min_employees != null || query.max_employees != null) {
|
|
9095
|
+
filters.company_headcount_custom = mapHeadcountCustom(
|
|
9096
|
+
query.min_employees,
|
|
9097
|
+
query.max_employees
|
|
9098
|
+
);
|
|
9099
|
+
}
|
|
9100
|
+
if (query.skills?.length) {
|
|
9101
|
+
filters.company_keywords = { include: query.skills };
|
|
9102
|
+
}
|
|
9103
|
+
const page = query.offset ? Math.floor(query.offset / (query.limit ?? 25)) + 1 : 1;
|
|
9104
|
+
const response = await this.client.searchPeople({ page, filters });
|
|
9105
|
+
if (response.error || !response.data?.length) return [];
|
|
9106
|
+
return response.data.map((r) => ({
|
|
9107
|
+
first_name: r.person?.first_name ?? "",
|
|
9108
|
+
last_name: r.person?.last_name ?? "",
|
|
9109
|
+
job_title: r.person?.job_title,
|
|
9110
|
+
company: r.company?.name,
|
|
9111
|
+
company_domain: r.company?.domain,
|
|
9112
|
+
email: r.person?.email,
|
|
9113
|
+
phone: r.person?.phone,
|
|
9114
|
+
linkedin_url: r.person?.linkedin_url,
|
|
9115
|
+
seniority: r.person?.seniority,
|
|
9116
|
+
department: r.person?.department,
|
|
9117
|
+
location: r.person?.location ?? r.company?.location,
|
|
9125
9118
|
sources: [this.name]
|
|
9126
9119
|
}));
|
|
9127
9120
|
}
|