gtm-now 0.7.3 → 0.8.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 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 SENIORITY_TO_DISCO, DiscoAdapter, US_STATES, US_STATE_CODES;
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: mapSeniority(query.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,11 +9023,15 @@ var init_disco = __esm({
9038
9023
  });
9039
9024
 
9040
9025
  // src/providers/adapters/prospeo.ts
9041
- function mapSeniority2(values) {
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
9029
  return { include: [...new Set(mapped)] };
9045
9030
  }
9031
+ function mapHeadcount(min, max) {
9032
+ if (min == null && max == null) return void 0;
9033
+ return { ...min != null && { min }, ...max != null && { max } };
9034
+ }
9046
9035
  var SENIORITY_TO_PROSPEO, ProspeoMcpAdapter;
9047
9036
  var init_prospeo2 = __esm({
9048
9037
  "src/providers/adapters/prospeo.ts"() {
@@ -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/headcount filters, email enrichment, company technology detection. 200M+ contacts. Note: search emails are masked until revealed with credits.";
9069
9058
  client;
9070
9059
  constructor(apiKey) {
9071
9060
  this.client = new ProspeoClient({ apiKey });
@@ -9087,7 +9076,10 @@ var init_prospeo2 = __esm({
9087
9076
  const info = await this.client.getAccountInfo();
9088
9077
  return { remaining: info.credits, unit: "credits", provider: this.name };
9089
9078
  } catch (error) {
9090
- logError("prospeo:checkCredits", error instanceof Error ? error : new Error(String(error)));
9079
+ logError(
9080
+ "prospeo:checkCredits",
9081
+ error instanceof Error ? error : new Error(String(error))
9082
+ );
9091
9083
  return null;
9092
9084
  }
9093
9085
  }
@@ -9098,7 +9090,7 @@ var init_prospeo2 = __esm({
9098
9090
  filters.person_job_title = { include: [query.job_title] };
9099
9091
  }
9100
9092
  if (query.seniority) {
9101
- filters.person_seniority = mapSeniority2(query.seniority);
9093
+ filters.person_seniority = mapSeniority(query.seniority);
9102
9094
  }
9103
9095
  if (query.department?.length) {
9104
9096
  filters.person_department = query.department[0];
@@ -9115,10 +9107,10 @@ var init_prospeo2 = __esm({
9115
9107
  filters.company_industry = { include: query.filter_industry };
9116
9108
  }
9117
9109
  if (query.min_employees != null || query.max_employees != null) {
9118
- filters.company_headcount_custom = {
9119
- ...query.min_employees != null && { min: query.min_employees },
9120
- ...query.max_employees != null && { max: query.max_employees }
9121
- };
9110
+ filters.company_headcount_custom = mapHeadcount(
9111
+ query.min_employees,
9112
+ query.max_employees
9113
+ );
9122
9114
  }
9123
9115
  if (query.skills?.length) {
9124
9116
  filters.company_keywords = { include: query.skills };
@@ -9132,13 +9124,16 @@ var init_prospeo2 = __esm({
9132
9124
  job_title: r.person?.current_job_title ?? void 0,
9133
9125
  company: r.company?.name ?? void 0,
9134
9126
  company_domain: r.company?.domain ?? void 0,
9135
- // Email is masked until revealed — show what we have
9136
9127
  email: r.person?.email?.email ?? void 0,
9137
9128
  phone: r.person?.mobile?.mobile ?? void 0,
9138
9129
  linkedin_url: r.person?.linkedin_url ?? void 0,
9139
9130
  seniority: r.person?.job_history?.[0]?.seniority ?? void 0,
9140
9131
  department: r.person?.job_history?.[0]?.departments?.[0] ?? void 0,
9141
- location: r.person?.location ? [r.person.location.city, r.person.location.state, r.person.location.country].filter(Boolean).join(", ") : void 0,
9132
+ location: r.person?.location ? [
9133
+ r.person.location.city,
9134
+ r.person.location.state,
9135
+ r.person.location.country
9136
+ ].filter(Boolean).join(", ") : void 0,
9142
9137
  sources: [this.name]
9143
9138
  }));
9144
9139
  }
@@ -9159,7 +9154,10 @@ var init_prospeo2 = __esm({
9159
9154
  provider: this.name
9160
9155
  };
9161
9156
  } catch (error) {
9162
- logError("prospeo:enrichEmail", error instanceof Error ? error : new Error(String(error)));
9157
+ logError(
9158
+ "prospeo:enrichEmail",
9159
+ error instanceof Error ? error : new Error(String(error))
9160
+ );
9163
9161
  return null;
9164
9162
  }
9165
9163
  }