lumnisai 0.5.44 → 0.5.46
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.cjs +356 -22
- package/dist/index.d.cts +798 -23
- package/dist/index.d.mts +798 -23
- package/dist/index.d.ts +798 -23
- package/dist/index.mjs +356 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3225,6 +3225,34 @@ class PeopleResource {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
}
|
|
3227
3227
|
|
|
3228
|
+
const DATE_RANGES = [
|
|
3229
|
+
"past-24h",
|
|
3230
|
+
"past-week",
|
|
3231
|
+
"past-2-weeks",
|
|
3232
|
+
"past-3-weeks",
|
|
3233
|
+
"past-month",
|
|
3234
|
+
"past-quarter",
|
|
3235
|
+
"past-6-months",
|
|
3236
|
+
"past-year",
|
|
3237
|
+
"past-2-years",
|
|
3238
|
+
"past-3-years"
|
|
3239
|
+
];
|
|
3240
|
+
const SIGNAL_TYPES = [
|
|
3241
|
+
"hiring",
|
|
3242
|
+
"engagement",
|
|
3243
|
+
"recently_joined",
|
|
3244
|
+
"funding",
|
|
3245
|
+
"events"
|
|
3246
|
+
];
|
|
3247
|
+
const DISABLED_SIGNAL_TYPES = ["competitor_tools", "web_traffic"];
|
|
3248
|
+
const ENGAGEMENT_ACTIVITIES = [
|
|
3249
|
+
"reactions",
|
|
3250
|
+
"comments",
|
|
3251
|
+
"authored_posts"
|
|
3252
|
+
];
|
|
3253
|
+
const MAX_SIGNAL_CONTEXT_CHARS = 4e3;
|
|
3254
|
+
const MAX_CONTENT_INTELLIGENCE_COMPETITORS = 5;
|
|
3255
|
+
const MAX_CONTENT_INTELLIGENCE_COMPETITOR_CHARS = 200;
|
|
3228
3256
|
class ResponsesResource {
|
|
3229
3257
|
constructor(http) {
|
|
3230
3258
|
this.http = http;
|
|
@@ -3372,6 +3400,166 @@ class ResponsesResource {
|
|
|
3372
3400
|
throw new ValidationError("maxCommentsPerPost must be between 1 and 100");
|
|
3373
3401
|
}
|
|
3374
3402
|
}
|
|
3403
|
+
_validateDateRange(value, field) {
|
|
3404
|
+
if (value === void 0 || value === null)
|
|
3405
|
+
return;
|
|
3406
|
+
if (typeof value !== "string" || !DATE_RANGES.includes(value)) {
|
|
3407
|
+
throw new ValidationError(
|
|
3408
|
+
`Invalid ${field} value: ${String(value)}. Choose from: ${DATE_RANGES.join(", ")}.`
|
|
3409
|
+
);
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
/** Company targets are compared the way the backend compares them: trimmed, case-folded, no trailing slash. */
|
|
3413
|
+
_targetCompanyKey(value) {
|
|
3414
|
+
return value.trim().toLowerCase().replace(/\/+$/, "");
|
|
3415
|
+
}
|
|
3416
|
+
_validateEngagementSettings(settings) {
|
|
3417
|
+
const activities = this._getParamValue(settings, "activities", "activities");
|
|
3418
|
+
if (activities !== void 0 && activities !== null) {
|
|
3419
|
+
if (!Array.isArray(activities) || activities.length === 0)
|
|
3420
|
+
throw new ValidationError("engagement settings.activities cannot be empty");
|
|
3421
|
+
for (const activity of activities) {
|
|
3422
|
+
if (typeof activity !== "string" || !ENGAGEMENT_ACTIVITIES.includes(activity)) {
|
|
3423
|
+
throw new ValidationError(
|
|
3424
|
+
`Invalid engagement activity: ${String(activity)}. Choose from: ${ENGAGEMENT_ACTIVITIES.join(", ")}.`
|
|
3425
|
+
);
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
if (new Set(activities).size !== activities.length)
|
|
3429
|
+
throw new ValidationError("engagement settings.activities must not contain duplicates");
|
|
3430
|
+
}
|
|
3431
|
+
const targetCompanies = this._getParamValue(
|
|
3432
|
+
settings,
|
|
3433
|
+
"targetCompanies",
|
|
3434
|
+
"target_companies"
|
|
3435
|
+
);
|
|
3436
|
+
if (targetCompanies !== void 0 && targetCompanies !== null) {
|
|
3437
|
+
if (!Array.isArray(targetCompanies) || targetCompanies.length === 0 || targetCompanies.some((company) => typeof company !== "string" || !company.trim())) {
|
|
3438
|
+
throw new ValidationError(
|
|
3439
|
+
"engagement settings.targetCompanies must contain at least one non-empty company name, domain, or LinkedIn company URL"
|
|
3440
|
+
);
|
|
3441
|
+
}
|
|
3442
|
+
const keys = targetCompanies.map((company) => this._targetCompanyKey(company));
|
|
3443
|
+
if (new Set(keys).size !== keys.length)
|
|
3444
|
+
throw new ValidationError("engagement settings.targetCompanies must not contain duplicates");
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
_validateSignalSettings(name, settings) {
|
|
3448
|
+
if (settings === void 0 || settings === null)
|
|
3449
|
+
return;
|
|
3450
|
+
if (!this._isPlainObject(settings))
|
|
3451
|
+
throw new ValidationError(`signalDefinitions '${name}' settings must be an object`);
|
|
3452
|
+
const allowed = name === "engagement" ? ["dateRange", "date_range", "activities", "targetCompanies", "target_companies"] : ["dateRange", "date_range"];
|
|
3453
|
+
for (const key of Object.keys(settings)) {
|
|
3454
|
+
if (!allowed.includes(key)) {
|
|
3455
|
+
throw new ValidationError(
|
|
3456
|
+
`Unknown setting '${key}' for the '${name}' signal. Supported settings: ${allowed.filter((setting) => !setting.includes("_")).join(", ")}.`
|
|
3457
|
+
);
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
this._validateDateRange(
|
|
3461
|
+
this._getParamValue(settings, "dateRange", "date_range"),
|
|
3462
|
+
`signalDefinitions '${name}' settings.dateRange`
|
|
3463
|
+
);
|
|
3464
|
+
if (name === "engagement")
|
|
3465
|
+
this._validateEngagementSettings(settings);
|
|
3466
|
+
}
|
|
3467
|
+
/**
|
|
3468
|
+
* Validate the one manual signal-enrichment input before anything paid runs.
|
|
3469
|
+
* Mirrors the backend registry: object entries only, known enabled names, no
|
|
3470
|
+
* duplicates, no unknown settings.
|
|
3471
|
+
*/
|
|
3472
|
+
_validateSignalDefinitions(value) {
|
|
3473
|
+
if (value === void 0 || value === null)
|
|
3474
|
+
return;
|
|
3475
|
+
if (!Array.isArray(value))
|
|
3476
|
+
throw new ValidationError("signalDefinitions must be an array");
|
|
3477
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3478
|
+
for (const entry of value) {
|
|
3479
|
+
if (!this._isPlainObject(entry)) {
|
|
3480
|
+
throw new ValidationError(
|
|
3481
|
+
`Each signalDefinitions entry must be an object like { name: 'hiring', settings: { dateRange: 'past-month' } }`
|
|
3482
|
+
);
|
|
3483
|
+
}
|
|
3484
|
+
const rawName = this._getParamValue(entry, "name", "name");
|
|
3485
|
+
const name = typeof rawName === "string" ? rawName.trim().toLowerCase() : rawName;
|
|
3486
|
+
if (typeof name !== "string" || !name)
|
|
3487
|
+
throw new ValidationError("Each signalDefinitions entry requires a signal name");
|
|
3488
|
+
if (DISABLED_SIGNAL_TYPES.includes(name)) {
|
|
3489
|
+
throw new ValidationError(
|
|
3490
|
+
`The '${name}' signal is temporarily disabled because of company-record cost. Choose from the enabled signals: ${SIGNAL_TYPES.join(", ")}.`
|
|
3491
|
+
);
|
|
3492
|
+
}
|
|
3493
|
+
if (!SIGNAL_TYPES.includes(name)) {
|
|
3494
|
+
throw new ValidationError(
|
|
3495
|
+
`'${name}' is not a signal we know. Choose from: ${SIGNAL_TYPES.join(", ")}.`
|
|
3496
|
+
);
|
|
3497
|
+
}
|
|
3498
|
+
if (seen.has(name)) {
|
|
3499
|
+
throw new ValidationError(
|
|
3500
|
+
`The '${name}' signal appears more than once in signalDefinitions \u2014 send each signal once.`
|
|
3501
|
+
);
|
|
3502
|
+
}
|
|
3503
|
+
seen.add(name);
|
|
3504
|
+
for (const key of Object.keys(entry)) {
|
|
3505
|
+
if (key !== "name" && key !== "settings" && key !== "context") {
|
|
3506
|
+
throw new ValidationError(
|
|
3507
|
+
`Unknown signalDefinitions field '${key}'. Each entry accepts only name, settings, and context.`
|
|
3508
|
+
);
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
this._validateContextBrief(
|
|
3512
|
+
this._getParamValue(entry, "context", "context"),
|
|
3513
|
+
`signalDefinitions '${name}' context`
|
|
3514
|
+
);
|
|
3515
|
+
this._validateSignalSettings(
|
|
3516
|
+
name,
|
|
3517
|
+
this._getParamValue(entry, "settings", "settings")
|
|
3518
|
+
);
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3521
|
+
/**
|
|
3522
|
+
* Validate the signal-enrichment, automatic-selection and intent-scoring
|
|
3523
|
+
* params. These apply to every people agent, so they are checked on the
|
|
3524
|
+
* request rather than per agent.
|
|
3525
|
+
*/
|
|
3526
|
+
_validateSignalParams(params) {
|
|
3527
|
+
this._validateSignalDefinitions(
|
|
3528
|
+
this._getParamValue(params, "signalDefinitions", "signal_definitions")
|
|
3529
|
+
);
|
|
3530
|
+
for (const [camel, snake] of [
|
|
3531
|
+
["autoSelectLane", "auto_select_lane"],
|
|
3532
|
+
["autoSelectSignals", "auto_select_signals"]
|
|
3533
|
+
]) {
|
|
3534
|
+
const value = this._getParamValue(params, camel, snake);
|
|
3535
|
+
if (value !== void 0 && value !== null && typeof value !== "boolean")
|
|
3536
|
+
throw new ValidationError(`${camel} must be true or false`);
|
|
3537
|
+
}
|
|
3538
|
+
const intentScoringInstructions = this._getParamValue(
|
|
3539
|
+
params,
|
|
3540
|
+
"intentScoringInstructions",
|
|
3541
|
+
"intent_scoring_instructions"
|
|
3542
|
+
);
|
|
3543
|
+
if (intentScoringInstructions !== void 0 && intentScoringInstructions !== null && typeof intentScoringInstructions !== "string") {
|
|
3544
|
+
throw new ValidationError("intentScoringInstructions must be a string");
|
|
3545
|
+
}
|
|
3546
|
+
this._validateDateRange(
|
|
3547
|
+
this._getParamValue(params, "jobSignalDateRange", "job_signal_date_range"),
|
|
3548
|
+
"jobSignalDateRange"
|
|
3549
|
+
);
|
|
3550
|
+
this._validateDateRange(
|
|
3551
|
+
this._getParamValue(params, "postsDateRange", "posts_date_range"),
|
|
3552
|
+
"postsDateRange"
|
|
3553
|
+
);
|
|
3554
|
+
}
|
|
3555
|
+
_validateContextBrief(value, field) {
|
|
3556
|
+
if (value === void 0 || value === null)
|
|
3557
|
+
return;
|
|
3558
|
+
if (typeof value !== "string")
|
|
3559
|
+
throw new ValidationError(`${field} must be plain text`);
|
|
3560
|
+
if ([...value.trim()].length > MAX_SIGNAL_CONTEXT_CHARS)
|
|
3561
|
+
throw new ValidationError(`${field} must be at most ${MAX_SIGNAL_CONTEXT_CHARS} characters`);
|
|
3562
|
+
}
|
|
3375
3563
|
_validateCompetitorRepEngagementParams(params) {
|
|
3376
3564
|
const company = this._getParamValue(params, "company", "company");
|
|
3377
3565
|
const competitors = this._getParamValue(params, "competitors", "competitors");
|
|
@@ -3454,6 +3642,91 @@ class ResponsesResource {
|
|
|
3454
3642
|
}
|
|
3455
3643
|
}
|
|
3456
3644
|
}
|
|
3645
|
+
const rawCompetitors = this._getParamValue(params, "competitors", "competitors");
|
|
3646
|
+
const competitors = this._normalizedContentIntelligenceCompetitors(rawCompetitors);
|
|
3647
|
+
if (competitors.length > MAX_CONTENT_INTELLIGENCE_COMPETITORS) {
|
|
3648
|
+
throw new ValidationError(
|
|
3649
|
+
`competitors must contain at most ${MAX_CONTENT_INTELLIGENCE_COMPETITORS} distinct values`
|
|
3650
|
+
);
|
|
3651
|
+
}
|
|
3652
|
+
const rawCompany = this._getParamValue(params, "company", "company");
|
|
3653
|
+
let company;
|
|
3654
|
+
if (rawCompany !== void 0 && rawCompany !== null) {
|
|
3655
|
+
if (typeof rawCompany !== "string")
|
|
3656
|
+
throw new ValidationError("company must be a string for content_intelligence");
|
|
3657
|
+
company = rawCompany.trim() || void 0;
|
|
3658
|
+
if (company && [...company].length > MAX_CONTENT_INTELLIGENCE_COMPETITOR_CHARS) {
|
|
3659
|
+
throw new ValidationError(
|
|
3660
|
+
`company must be at most ${MAX_CONTENT_INTELLIGENCE_COMPETITOR_CHARS} characters`
|
|
3661
|
+
);
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
const normalizedCompany = company?.toLowerCase();
|
|
3665
|
+
if (normalizedCompany && competitors.some((competitor) => competitor.toLowerCase() === normalizedCompany)) {
|
|
3666
|
+
throw new ValidationError(
|
|
3667
|
+
`company '${company}' is also listed in competitors; name it on one side only`
|
|
3668
|
+
);
|
|
3669
|
+
}
|
|
3670
|
+
for (const [camel, snake] of [
|
|
3671
|
+
["includeCompanyPosts", "include_company_posts"],
|
|
3672
|
+
["includeExecPosts", "include_exec_posts"]
|
|
3673
|
+
]) {
|
|
3674
|
+
const value = this._getParamValue(params, camel, snake);
|
|
3675
|
+
if (value !== void 0 && typeof value !== "boolean")
|
|
3676
|
+
throw new ValidationError(`${camel} must be true or false`);
|
|
3677
|
+
}
|
|
3678
|
+
const includeCompanyPosts = this._getParamValue(
|
|
3679
|
+
params,
|
|
3680
|
+
"includeCompanyPosts",
|
|
3681
|
+
"include_company_posts"
|
|
3682
|
+
);
|
|
3683
|
+
const includeExecPosts = this._getParamValue(
|
|
3684
|
+
params,
|
|
3685
|
+
"includeExecPosts",
|
|
3686
|
+
"include_exec_posts"
|
|
3687
|
+
);
|
|
3688
|
+
if (competitors.length > 0 && includeCompanyPosts === false && includeExecPosts === false) {
|
|
3689
|
+
throw new ValidationError(
|
|
3690
|
+
"competitors were provided but includeCompanyPosts and includeExecPosts are both false"
|
|
3691
|
+
);
|
|
3692
|
+
}
|
|
3693
|
+
const execTitles = this._getParamValue(params, "execTitles", "exec_titles");
|
|
3694
|
+
if (execTitles !== void 0 && (!Array.isArray(execTitles) || execTitles.some((title) => typeof title !== "string"))) {
|
|
3695
|
+
throw new ValidationError("execTitles must be an array of strings");
|
|
3696
|
+
}
|
|
3697
|
+
const maxExecsPerTarget = this._getParamValue(
|
|
3698
|
+
params,
|
|
3699
|
+
"maxExecsPerTarget",
|
|
3700
|
+
"max_execs_per_target"
|
|
3701
|
+
);
|
|
3702
|
+
if (maxExecsPerTarget !== void 0 && (!Number.isInteger(maxExecsPerTarget) || maxExecsPerTarget < 1 || maxExecsPerTarget > 20)) {
|
|
3703
|
+
throw new ValidationError("maxExecsPerTarget must be an integer between 1 and 20");
|
|
3704
|
+
}
|
|
3705
|
+
}
|
|
3706
|
+
_normalizedContentIntelligenceCompetitors(value) {
|
|
3707
|
+
if (value === void 0 || value === null)
|
|
3708
|
+
return [];
|
|
3709
|
+
const values = typeof value === "string" ? [value] : value;
|
|
3710
|
+
if (!Array.isArray(values) || values.some((entry) => typeof entry !== "string"))
|
|
3711
|
+
throw new ValidationError("competitors must be an array of strings");
|
|
3712
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3713
|
+
const normalized = [];
|
|
3714
|
+
for (const entry of values) {
|
|
3715
|
+
const competitor = entry.trim();
|
|
3716
|
+
if (!competitor)
|
|
3717
|
+
continue;
|
|
3718
|
+
if ([...competitor].length > MAX_CONTENT_INTELLIGENCE_COMPETITOR_CHARS) {
|
|
3719
|
+
throw new ValidationError(
|
|
3720
|
+
`each competitor must be at most ${MAX_CONTENT_INTELLIGENCE_COMPETITOR_CHARS} characters`
|
|
3721
|
+
);
|
|
3722
|
+
}
|
|
3723
|
+
const key = competitor.toLowerCase();
|
|
3724
|
+
if (!seen.has(key)) {
|
|
3725
|
+
seen.add(key);
|
|
3726
|
+
normalized.push(competitor);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
return normalized;
|
|
3457
3730
|
}
|
|
3458
3731
|
_validateEngagementExpansionParams(params) {
|
|
3459
3732
|
const expandFromResponse = this._getParamValue(
|
|
@@ -3505,25 +3778,10 @@ class ResponsesResource {
|
|
|
3505
3778
|
}
|
|
3506
3779
|
}
|
|
3507
3780
|
}
|
|
3508
|
-
|
|
3509
|
-
params,
|
|
3510
|
-
"postsDateRange"
|
|
3511
|
-
|
|
3512
|
-
);
|
|
3513
|
-
if (postsDateRange !== void 0) {
|
|
3514
|
-
const validRanges = [
|
|
3515
|
-
"past-24h",
|
|
3516
|
-
"past-week",
|
|
3517
|
-
"past-month",
|
|
3518
|
-
"past-quarter",
|
|
3519
|
-
"past-6-months",
|
|
3520
|
-
"past-year",
|
|
3521
|
-
"past-2-years",
|
|
3522
|
-
"past-3-years"
|
|
3523
|
-
];
|
|
3524
|
-
if (!validRanges.includes(postsDateRange))
|
|
3525
|
-
throw new ValidationError(`Invalid postsDateRange value: ${String(postsDateRange)}`);
|
|
3526
|
-
}
|
|
3781
|
+
this._validateDateRange(
|
|
3782
|
+
this._getParamValue(params, "postsDateRange", "posts_date_range"),
|
|
3783
|
+
"postsDateRange"
|
|
3784
|
+
);
|
|
3527
3785
|
for (const [camel, snake, maximum] of [
|
|
3528
3786
|
["limit", "limit", 1e3],
|
|
3529
3787
|
["maxReactorsPerPost", "max_reactors_per_post", 5e3],
|
|
@@ -3596,6 +3854,25 @@ class ResponsesResource {
|
|
|
3596
3854
|
);
|
|
3597
3855
|
}
|
|
3598
3856
|
}
|
|
3857
|
+
/**
|
|
3858
|
+
* Every place a caller may put specialized-agent params: the dedicated field
|
|
3859
|
+
* and the legacy nested copy inside `options`. Both are validated so a nested
|
|
3860
|
+
* request cannot smuggle an unknown signal past the SDK.
|
|
3861
|
+
*/
|
|
3862
|
+
_specializedParamSources(request) {
|
|
3863
|
+
const sources = [];
|
|
3864
|
+
if (this._isPlainObject(request.specializedAgentParams))
|
|
3865
|
+
sources.push(request.specializedAgentParams);
|
|
3866
|
+
const requestOptions = request.options;
|
|
3867
|
+
const nested = requestOptions ? this._getParamValue(
|
|
3868
|
+
requestOptions,
|
|
3869
|
+
"specializedAgentParams",
|
|
3870
|
+
"specialized_agent_params"
|
|
3871
|
+
) : void 0;
|
|
3872
|
+
if (this._isPlainObject(nested))
|
|
3873
|
+
sources.push(nested);
|
|
3874
|
+
return sources;
|
|
3875
|
+
}
|
|
3599
3876
|
_validateSalesNavigatorRequest(request) {
|
|
3600
3877
|
const directParams = request.specializedAgentParams;
|
|
3601
3878
|
const directUrl = directParams ? this._getParamValue(directParams, "salesNavigatorUrl", "sales_navigator_url") : void 0;
|
|
@@ -3647,6 +3924,11 @@ class ResponsesResource {
|
|
|
3647
3924
|
"salesNavigatorUrl must be a Sales Navigator people-search or people-list URL"
|
|
3648
3925
|
);
|
|
3649
3926
|
}
|
|
3927
|
+
const autoSelectLane = this._specializedParamSources(request).some(
|
|
3928
|
+
(params) => this._getParamValue(params, "autoSelectLane", "auto_select_lane") === true
|
|
3929
|
+
);
|
|
3930
|
+
if (autoSelectLane)
|
|
3931
|
+
return;
|
|
3650
3932
|
if (typeof request.userId !== "string" || !request.userId.trim())
|
|
3651
3933
|
throw new ValidationError("userId is required when salesNavigatorUrl is provided");
|
|
3652
3934
|
}
|
|
@@ -3813,6 +4095,8 @@ class ResponsesResource {
|
|
|
3813
4095
|
this._validateFileReference(file.uri);
|
|
3814
4096
|
}
|
|
3815
4097
|
this._validateSalesNavigatorRequest(request);
|
|
4098
|
+
for (const params of this._specializedParamSources(request))
|
|
4099
|
+
this._validateSignalParams(params);
|
|
3816
4100
|
if (request.specializedAgentParams)
|
|
3817
4101
|
this._validateCriteriaParams(request.specializedAgentParams, request.specializedAgent);
|
|
3818
4102
|
return this.http.post("/responses", request);
|
|
@@ -3956,10 +4240,16 @@ class ResponsesResource {
|
|
|
3956
4240
|
* @param options.deepValidationBackfillBelowCriteria - Pad with criteria-failed candidates when under count; @default true
|
|
3957
4241
|
* @param options.enrichEngagementHistory - Add recent LinkedIn engagement evidence before validation; forced off for Sales Navigator V1
|
|
3958
4242
|
* @param options.deepSearchCriteriaModel - Override criteria decomposition model (e.g. 'openai:gpt-5.4')
|
|
4243
|
+
* @param options.jobSignalDateRange - Posting window for the standalone job-signal lane; omit for the planner's 90-365 days
|
|
4244
|
+
* @param options.signalDefinitions - Signal enrichments to run on fast-filter survivors before validation; omit or `[]` for none
|
|
4245
|
+
* @param options.autoSelectLane - Let the backend choose the discovery lane; ignores the manual lane controls; @default false
|
|
4246
|
+
* @param options.autoSelectSignals - Let the backend choose the signals; ignores `signalDefinitions`; @default false
|
|
4247
|
+
* @param options.intentScoringInstructions - Plain-English direction for every intent-scoring stage (never changes fit or filtering)
|
|
3959
4248
|
* @returns Response with structured_response containing:
|
|
3960
|
-
* - candidates: Validated and scored candidates
|
|
4249
|
+
* - candidates: Validated and scored candidates, each with `signalEvidence` for the selected signals
|
|
3961
4250
|
* - criteria: Generated/reused criteria definitions and classification
|
|
3962
|
-
* - searchStats: Search execution statistics
|
|
4251
|
+
* - searchStats: Search execution statistics, including `enrichment` and `signalFunnel`
|
|
4252
|
+
* - autoSearchSelection: What automatic selection applied, when either auto flag ran
|
|
3963
4253
|
*/
|
|
3964
4254
|
async deepPeopleSearch(query, options) {
|
|
3965
4255
|
const request = {
|
|
@@ -4041,7 +4331,17 @@ class ResponsesResource {
|
|
|
4041
4331
|
params.enrichEngagementHistory = options.enrichEngagementHistory;
|
|
4042
4332
|
if (options.deepSearchCriteriaModel)
|
|
4043
4333
|
params.deepSearchCriteriaModel = options.deepSearchCriteriaModel;
|
|
4044
|
-
if (options.
|
|
4334
|
+
if (options.jobSignalDateRange !== void 0)
|
|
4335
|
+
params.jobSignalDateRange = options.jobSignalDateRange;
|
|
4336
|
+
if (options.signalDefinitions !== void 0)
|
|
4337
|
+
params.signalDefinitions = options.signalDefinitions;
|
|
4338
|
+
if (options.autoSelectLane !== void 0)
|
|
4339
|
+
params.autoSelectLane = options.autoSelectLane;
|
|
4340
|
+
if (options.autoSelectSignals !== void 0)
|
|
4341
|
+
params.autoSelectSignals = options.autoSelectSignals;
|
|
4342
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4343
|
+
params.intentScoringInstructions = options.intentScoringInstructions;
|
|
4344
|
+
if (options.salesNavigatorUrl !== void 0 && options.autoSelectLane !== true) {
|
|
4045
4345
|
params.searchProfiles = false;
|
|
4046
4346
|
params.searchPosts = false;
|
|
4047
4347
|
params.searchConnections = false;
|
|
@@ -4104,6 +4404,8 @@ class ResponsesResource {
|
|
|
4104
4404
|
request.specializedAgentParams.addAndRunCriterion = options.addAndRunCriterion;
|
|
4105
4405
|
if (options.deepSearchCriteriaModel)
|
|
4106
4406
|
request.specializedAgentParams.deepSearchCriteriaModel = options.deepSearchCriteriaModel;
|
|
4407
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4408
|
+
request.specializedAgentParams.intentScoringInstructions = options.intentScoringInstructions;
|
|
4107
4409
|
}
|
|
4108
4410
|
return this.create(request);
|
|
4109
4411
|
}
|
|
@@ -4115,6 +4417,10 @@ class ResponsesResource {
|
|
|
4115
4417
|
* `reusePackageFrom` to re-cook a saved package without collecting again.
|
|
4116
4418
|
* `companyContext` and `contentDirection` steer post ideas only; collection,
|
|
4117
4419
|
* curation, and engagement analysis remain an unbiased read of the audience.
|
|
4420
|
+
* Add `competitors` to receive a separate publication report over the same
|
|
4421
|
+
* window; competitor posts never enter the audience package or metrics. Add
|
|
4422
|
+
* `company` to put the caller's own publication activity beside those
|
|
4423
|
+
* competitors in the report.
|
|
4118
4424
|
*
|
|
4119
4425
|
* @param query - Natural-language description of the audience. A nonblank
|
|
4120
4426
|
* message is required even when reusing a package.
|
|
@@ -4141,6 +4447,18 @@ class ResponsesResource {
|
|
|
4141
4447
|
params.reusePackageFrom = options.reusePackageFrom;
|
|
4142
4448
|
if (options.outputs !== void 0)
|
|
4143
4449
|
params.outputs = options.outputs;
|
|
4450
|
+
if (options.competitors !== void 0)
|
|
4451
|
+
params.competitors = options.competitors;
|
|
4452
|
+
if (options.company !== void 0)
|
|
4453
|
+
params.company = options.company;
|
|
4454
|
+
if (options.includeCompanyPosts !== void 0)
|
|
4455
|
+
params.includeCompanyPosts = options.includeCompanyPosts;
|
|
4456
|
+
if (options.includeExecPosts !== void 0)
|
|
4457
|
+
params.includeExecPosts = options.includeExecPosts;
|
|
4458
|
+
if (options.execTitles !== void 0)
|
|
4459
|
+
params.execTitles = options.execTitles;
|
|
4460
|
+
if (options.maxExecsPerTarget !== void 0)
|
|
4461
|
+
params.maxExecsPerTarget = options.maxExecsPerTarget;
|
|
4144
4462
|
return this.create({
|
|
4145
4463
|
messages: [{ role: "user", content: query }],
|
|
4146
4464
|
specializedAgent: "content_intelligence",
|
|
@@ -4183,6 +4501,10 @@ class ResponsesResource {
|
|
|
4183
4501
|
if (options?.deepValidationUseRelevanceReranker !== void 0) {
|
|
4184
4502
|
params.deepValidationUseRelevanceReranker = options.deepValidationUseRelevanceReranker;
|
|
4185
4503
|
}
|
|
4504
|
+
if (options.signalDefinitions !== void 0)
|
|
4505
|
+
params.signalDefinitions = options.signalDefinitions;
|
|
4506
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4507
|
+
params.intentScoringInstructions = options.intentScoringInstructions;
|
|
4186
4508
|
return this.create({
|
|
4187
4509
|
messages: [{ role: "user", content: query }],
|
|
4188
4510
|
specializedAgent: "engagement_expansion",
|
|
@@ -4229,6 +4551,10 @@ class ResponsesResource {
|
|
|
4229
4551
|
params.excludeUrls = options.excludeUrls;
|
|
4230
4552
|
if (options.limit !== void 0)
|
|
4231
4553
|
params.limit = options.limit;
|
|
4554
|
+
if (options.signalDefinitions !== void 0)
|
|
4555
|
+
params.signalDefinitions = options.signalDefinitions;
|
|
4556
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4557
|
+
params.intentScoringInstructions = options.intentScoringInstructions;
|
|
4232
4558
|
return this.create({
|
|
4233
4559
|
messages: [{ role: "user", content: query }],
|
|
4234
4560
|
specializedAgent: "influencer_engagement",
|
|
@@ -4300,6 +4626,10 @@ class ResponsesResource {
|
|
|
4300
4626
|
params.maxReactorsPerPost = options.maxReactorsPerPost;
|
|
4301
4627
|
if (options.maxCommentsPerPost !== void 0)
|
|
4302
4628
|
params.maxCommentsPerPost = options.maxCommentsPerPost;
|
|
4629
|
+
if (options.signalDefinitions !== void 0)
|
|
4630
|
+
params.signalDefinitions = options.signalDefinitions;
|
|
4631
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4632
|
+
params.intentScoringInstructions = options.intentScoringInstructions;
|
|
4303
4633
|
request.specializedAgentParams = params;
|
|
4304
4634
|
return this.create(request);
|
|
4305
4635
|
}
|
|
@@ -4366,6 +4696,10 @@ class ResponsesResource {
|
|
|
4366
4696
|
params.maxCompetitors = options.maxCompetitors;
|
|
4367
4697
|
if (options.thoroughEnrichment !== void 0)
|
|
4368
4698
|
params.thoroughEnrichment = options.thoroughEnrichment;
|
|
4699
|
+
if (options.signalDefinitions !== void 0)
|
|
4700
|
+
params.signalDefinitions = options.signalDefinitions;
|
|
4701
|
+
if (options.intentScoringInstructions !== void 0)
|
|
4702
|
+
params.intentScoringInstructions = options.intentScoringInstructions;
|
|
4369
4703
|
request.specializedAgentParams = params;
|
|
4370
4704
|
return this.create(request);
|
|
4371
4705
|
}
|