gtm-now 0.3.2 → 0.4.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 -4
- 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,
|
|
@@ -11697,7 +11712,8 @@ var init_validation = __esm({
|
|
|
11697
11712
|
min_digital_footprint: z2.number().min(0).optional(),
|
|
11698
11713
|
max_digital_footprint: z2.number().min(0).optional(),
|
|
11699
11714
|
offset: z2.number().int().min(0).optional(),
|
|
11700
|
-
provider: z2.string().optional()
|
|
11715
|
+
provider: z2.string().optional(),
|
|
11716
|
+
fields: z2.union([z2.literal("all"), z2.array(z2.string())]).optional()
|
|
11701
11717
|
}),
|
|
11702
11718
|
// 2. People/contact search
|
|
11703
11719
|
gtm_find_people: z2.object({
|
|
@@ -11713,7 +11729,16 @@ var init_validation = __esm({
|
|
|
11713
11729
|
has_linkedin: z2.boolean().optional(),
|
|
11714
11730
|
min_connections: z2.number().int().min(0).optional(),
|
|
11715
11731
|
offset: z2.number().int().min(0).optional(),
|
|
11716
|
-
provider: z2.string().optional()
|
|
11732
|
+
provider: z2.string().optional(),
|
|
11733
|
+
// ─── DiscoLike filters ───
|
|
11734
|
+
company_domains: z2.array(z2.string().min(1)).optional(),
|
|
11735
|
+
skills: z2.array(z2.string()).optional(),
|
|
11736
|
+
filter_industry: z2.array(z2.string()).optional(),
|
|
11737
|
+
email_validated: z2.boolean().optional(),
|
|
11738
|
+
min_employees: z2.number().int().min(0).optional(),
|
|
11739
|
+
max_employees: z2.number().int().min(1).optional(),
|
|
11740
|
+
revenue_range: z2.string().optional(),
|
|
11741
|
+
fields: z2.union([z2.literal("all"), z2.array(z2.string())]).optional()
|
|
11717
11742
|
}),
|
|
11718
11743
|
// StorLeads — DTC/e-commerce company search
|
|
11719
11744
|
gtm_storeleads: z2.object({
|