@dench.com/cli 3.2.1-staging.295 → 3.2.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/README.md +9 -4
- package/leads.ts +1 -3
- package/lib/enrichment-gateway.ts +51 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -204,8 +204,12 @@ dench signin --host https://staging.dench.com
|
|
|
204
204
|
## Saved prospect lists
|
|
205
205
|
|
|
206
206
|
People found with `dench leads find` stay in saved lists, not the CRM.
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
For new prospect discovery, the lead-finding skill establishes a general
|
|
208
|
+
`/workspace/ICP.md` on first use and reads it before later prospect searches.
|
|
209
|
+
Campaign filters, dates, and counts stay with the search; the current request
|
|
210
|
+
overrides general preferences. Existing-list actions do not restart ICP setup.
|
|
211
|
+
Ordinary web, company, or hiring research does not require lead-finding or ICP
|
|
212
|
+
questions, reads, or scoring. There is no mandatory per-profile ICP decision.
|
|
209
213
|
In Find, click **Find** in a Work email, Phone, or Personal email cell to
|
|
210
214
|
request that field. The control discloses credit use; the lookup starts directly.
|
|
211
215
|
Different people run concurrently; wait for a person's current lookup before
|
|
@@ -230,8 +234,9 @@ unchanged. Optional `--filters-json` stores criteria/source evidence metadata.
|
|
|
230
234
|
In chat, explicitly present the final list; research batches stay in activity
|
|
231
235
|
details instead of becoming competing result sets.
|
|
232
236
|
|
|
233
|
-
Before presenting a shortlist, the skill saves an ICP relevance score
|
|
234
|
-
and short reason for each profile
|
|
237
|
+
Before presenting a prospect shortlist, the skill saves an ICP relevance score
|
|
238
|
+
(0–100) and short reason for each profile against that search's resolved criteria,
|
|
239
|
+
using the general brief as relevant guidance. These appear as
|
|
235
240
|
**ICP fit** and **Why this lead** in Find and in CSV exports. Scores are not
|
|
236
241
|
conversion probabilities or CRM statuses. To save assessments for canonical
|
|
237
242
|
rows returned by `lists rows`, create a JSON array of
|
package/leads.ts
CHANGED
|
@@ -910,9 +910,7 @@ export async function runLeadsCommand(opts: {
|
|
|
910
910
|
jobFunctions: flags.functions,
|
|
911
911
|
subFunctions: flags.subFunctions,
|
|
912
912
|
industries: flags.industries,
|
|
913
|
-
|
|
914
|
-
? [flags.companyDomain]
|
|
915
|
-
: undefined,
|
|
913
|
+
companyDomain: flags.companyDomain,
|
|
916
914
|
companyDomains: mergeUnique(flags.companyDomains, companyList?.domains),
|
|
917
915
|
companyNames: mergeUnique(flags.companyNames, companyList?.names),
|
|
918
916
|
pastCompanyNames: flags.pastCompanyNames,
|
|
@@ -54,6 +54,15 @@ export type SearchFilterItem =
|
|
|
54
54
|
export type SearchRangeFilter = { min?: number; max?: number };
|
|
55
55
|
|
|
56
56
|
export type SearchPeopleBody = {
|
|
57
|
+
/** Canonical gateway fields. locations is the PERSON; companyHeadquarters is the employer. */
|
|
58
|
+
linkedinUrl?: string;
|
|
59
|
+
fullName?: string;
|
|
60
|
+
firstName?: string;
|
|
61
|
+
lastName?: string;
|
|
62
|
+
companyDomain?: string;
|
|
63
|
+
companyName?: string;
|
|
64
|
+
exactMatch?: boolean;
|
|
65
|
+
preferCache?: boolean;
|
|
57
66
|
personTitles?: string[];
|
|
58
67
|
personLocations?: string[];
|
|
59
68
|
personSeniorities?: string[];
|
|
@@ -97,6 +106,8 @@ export type SearchPeopleBody = {
|
|
|
97
106
|
};
|
|
98
107
|
|
|
99
108
|
export type SearchCompaniesBody = {
|
|
109
|
+
exactMatch?: boolean;
|
|
110
|
+
preferCache?: boolean;
|
|
100
111
|
domain?: string;
|
|
101
112
|
name?: string;
|
|
102
113
|
linkedinUrl?: string;
|
|
@@ -1270,13 +1281,25 @@ export async function aviatoEnrichCompany(
|
|
|
1270
1281
|
// searchPeople — calls POST /v1/enrichment/people/search (synchronous)
|
|
1271
1282
|
// ---------------------------------------------------------------------------
|
|
1272
1283
|
|
|
1273
|
-
export
|
|
1284
|
+
export function buildPeopleSearchRequest(
|
|
1274
1285
|
body: SearchPeopleBody,
|
|
1275
|
-
|
|
1276
|
-
): Promise<Record<string, unknown>> {
|
|
1286
|
+
): Record<string, unknown> {
|
|
1277
1287
|
// Request body matches gateway `peopleSearchRequestSchema`:
|
|
1278
1288
|
// `locations`, `headcountRanges`, `titles`, `companyDomain`, etc.
|
|
1279
|
-
const payload: Record<string, unknown> = {
|
|
1289
|
+
const payload: Record<string, unknown> = {
|
|
1290
|
+
preferCache: body.preferCache ?? true,
|
|
1291
|
+
};
|
|
1292
|
+
for (const key of [
|
|
1293
|
+
"linkedinUrl",
|
|
1294
|
+
"fullName",
|
|
1295
|
+
"firstName",
|
|
1296
|
+
"lastName",
|
|
1297
|
+
"companyDomain",
|
|
1298
|
+
"companyName",
|
|
1299
|
+
"exactMatch",
|
|
1300
|
+
] as const) {
|
|
1301
|
+
if (body[key] !== undefined) payload[key] = body[key];
|
|
1302
|
+
}
|
|
1280
1303
|
|
|
1281
1304
|
const mergeItems = (
|
|
1282
1305
|
legacy: string[] | undefined,
|
|
@@ -1291,14 +1314,17 @@ export async function searchPeople(
|
|
|
1291
1314
|
const titles = mergeItems(body.personTitles, body.titles);
|
|
1292
1315
|
if (titles.length > 0) payload.titles = titles;
|
|
1293
1316
|
|
|
1294
|
-
const locations = mergeItems(
|
|
1295
|
-
[...(body.personLocations ?? []), ...(body.organizationLocations ?? [])],
|
|
1296
|
-
body.locations,
|
|
1297
|
-
);
|
|
1317
|
+
const locations = mergeItems(body.personLocations, body.locations);
|
|
1298
1318
|
if (locations.length > 0) payload.locations = locations;
|
|
1299
1319
|
|
|
1300
|
-
|
|
1301
|
-
|
|
1320
|
+
const headquarters = mergeItems(
|
|
1321
|
+
body.organizationLocations,
|
|
1322
|
+
body.companyHeadquarters,
|
|
1323
|
+
);
|
|
1324
|
+
if (headquarters.length) payload.companyHeadquarters = headquarters;
|
|
1325
|
+
const domains = mergeItems(body.organizationDomains, body.companyDomains);
|
|
1326
|
+
if (domains.length) {
|
|
1327
|
+
payload.companyDomains = domains;
|
|
1302
1328
|
}
|
|
1303
1329
|
|
|
1304
1330
|
const headcountRanges = mergeItems(
|
|
@@ -1321,8 +1347,6 @@ export async function searchPeople(
|
|
|
1321
1347
|
"subFunctions",
|
|
1322
1348
|
"companyNames",
|
|
1323
1349
|
"pastCompanyNames",
|
|
1324
|
-
"companyDomains",
|
|
1325
|
-
"companyHeadquarters",
|
|
1326
1350
|
"companyTypes",
|
|
1327
1351
|
"universities",
|
|
1328
1352
|
"skills",
|
|
@@ -1350,12 +1374,22 @@ export async function searchPeople(
|
|
|
1350
1374
|
if (body.limit !== undefined) payload.limit = body.limit;
|
|
1351
1375
|
else if (body.perPage !== undefined) payload.limit = body.perPage;
|
|
1352
1376
|
if (body.offset !== undefined) payload.offset = body.offset;
|
|
1377
|
+
else if (body.page !== undefined && body.page > 1) {
|
|
1378
|
+
payload.offset = (body.page - 1) * (body.limit ?? body.perPage ?? 10);
|
|
1379
|
+
}
|
|
1353
1380
|
if (body.searchAfter !== undefined) payload.searchAfter = body.searchAfter;
|
|
1354
1381
|
if (body.pageToken) payload.pageToken = body.pageToken;
|
|
1355
1382
|
|
|
1383
|
+
return payload;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
export async function searchPeople(
|
|
1387
|
+
body: SearchPeopleBody,
|
|
1388
|
+
options: EnrichmentGatewayOptions = {},
|
|
1389
|
+
): Promise<Record<string, unknown>> {
|
|
1356
1390
|
return callGatewayJson("/v1/enrichment/people/search", {
|
|
1357
1391
|
method: "POST",
|
|
1358
|
-
body:
|
|
1392
|
+
body: buildPeopleSearchRequest(body),
|
|
1359
1393
|
options,
|
|
1360
1394
|
});
|
|
1361
1395
|
}
|
|
@@ -1364,7 +1398,10 @@ export async function searchCompanies(
|
|
|
1364
1398
|
body: SearchCompaniesBody,
|
|
1365
1399
|
options: EnrichmentGatewayOptions = {},
|
|
1366
1400
|
): Promise<Record<string, unknown>> {
|
|
1367
|
-
const payload: Record<string, unknown> = {
|
|
1401
|
+
const payload: Record<string, unknown> = {
|
|
1402
|
+
preferCache: body.preferCache ?? true,
|
|
1403
|
+
};
|
|
1404
|
+
if (body.exactMatch !== undefined) payload.exactMatch = body.exactMatch;
|
|
1368
1405
|
if (body.domain) payload.domain = body.domain;
|
|
1369
1406
|
if (body.name) payload.name = body.name;
|
|
1370
1407
|
if (body.linkedinUrl) payload.linkedinUrl = body.linkedinUrl;
|