salesprompter-cli 0.1.46 → 0.1.47
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 +1 -1
- package/dist/cli.js +25 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ salesprompter --help
|
|
|
110
110
|
- Respect provider terms and customer data boundaries.
|
|
111
111
|
- `affiliate:run` uses direct email enrichment first, then Phantombuster Email Finder for unresolved people before creating a draft Instantly campaign.
|
|
112
112
|
- Affiliate preparation automatically creates three variants per step with spintax; `affiliate:regenerate-sequence` rebuilds and syncs them through the Salesprompter app.
|
|
113
|
-
- `affiliate:enrich`
|
|
113
|
+
- `affiliate:enrich` starts durable email recovery and adds only newly found addresses to an existing campaign. It returns a background-processing status for large audiences instead of blocking the terminal. Pass `--source-audience-run-id` to merge a newer compatible audience into that campaign without creating a duplicate campaign.
|
|
114
114
|
- A draft campaign does not send until `affiliate:activate` is run.
|
|
115
115
|
- The CLI is designed for interactive users and agent-assisted workflows.
|
|
116
116
|
- A repo-local Chrome extension compatibility copy is available in `chrome-extension/` for local LinkedIn session sync and popup copy/debug flows.
|
package/dist/cli.js
CHANGED
|
@@ -6591,7 +6591,7 @@ async function enrichAffiliateOutreachViaApp(session, audienceRunId, sourceAudie
|
|
|
6591
6591
|
const previousAttemptedAt = typeof before.stats.latestTopUp === "object" && before.stats.latestTopUp !== null
|
|
6592
6592
|
? String(before.stats.latestTopUp.attemptedAt ?? "")
|
|
6593
6593
|
: "";
|
|
6594
|
-
await fetchCliJson(session, (currentSession) => fetch(`${currentSession.apiBaseUrl}/api/cli/affiliate-outreach/${encodeURIComponent(audienceRunId)}/enrich`, {
|
|
6594
|
+
const { value: started } = await fetchCliJson(session, (currentSession) => fetch(`${currentSession.apiBaseUrl}/api/cli/affiliate-outreach/${encodeURIComponent(audienceRunId)}/enrich`, {
|
|
6595
6595
|
method: "POST",
|
|
6596
6596
|
headers: {
|
|
6597
6597
|
"Content-Type": "application/json",
|
|
@@ -6599,7 +6599,11 @@ async function enrichAffiliateOutreachViaApp(session, audienceRunId, sourceAudie
|
|
|
6599
6599
|
},
|
|
6600
6600
|
body: JSON.stringify({ sourceAudienceRunId })
|
|
6601
6601
|
}), AffiliateOutreachEnrichStartResponseSchema);
|
|
6602
|
-
const
|
|
6602
|
+
const configuredWaitMs = Number(process.env.SALESPROMPTER_AFFILIATE_ENRICH_WAIT_MS);
|
|
6603
|
+
const waitMs = Number.isFinite(configuredWaitMs) && configuredWaitMs >= 0
|
|
6604
|
+
? Math.min(10 * 60 * 1000, Math.trunc(configuredWaitMs))
|
|
6605
|
+
: 15_000;
|
|
6606
|
+
const deadline = Date.now() + waitMs;
|
|
6603
6607
|
const configuredPollMs = Number(process.env.SALESPROMPTER_AFFILIATE_ENRICH_POLL_MS);
|
|
6604
6608
|
const pollMs = Number.isFinite(configuredPollMs) && configuredPollMs > 0
|
|
6605
6609
|
? Math.max(10, Math.trunc(configuredPollMs))
|
|
@@ -6612,11 +6616,20 @@ async function enrichAffiliateOutreachViaApp(session, audienceRunId, sourceAudie
|
|
|
6612
6616
|
? current.stats.latestTopUp
|
|
6613
6617
|
: null;
|
|
6614
6618
|
const attemptedAt = String(latestTopUp?.attemptedAt ?? "");
|
|
6615
|
-
|
|
6616
|
-
|
|
6619
|
+
const complete = latestTopUp?.complete !== false;
|
|
6620
|
+
if (attemptedAt && attemptedAt !== previousAttemptedAt && complete) {
|
|
6621
|
+
return {
|
|
6622
|
+
outreach: current,
|
|
6623
|
+
processing: false,
|
|
6624
|
+
workflowRunId: started.workflowRunId
|
|
6625
|
+
};
|
|
6617
6626
|
}
|
|
6618
6627
|
}
|
|
6619
|
-
|
|
6628
|
+
return {
|
|
6629
|
+
outreach: before,
|
|
6630
|
+
processing: true,
|
|
6631
|
+
workflowRunId: started.workflowRunId
|
|
6632
|
+
};
|
|
6620
6633
|
}
|
|
6621
6634
|
async function uploadLinkedInProductsCatalog(session, payload, batchSize = 100, traceId) {
|
|
6622
6635
|
let imported = 0;
|
|
@@ -13360,13 +13373,17 @@ program
|
|
|
13360
13373
|
.option("--source-audience-run-id <run-id>", "Use a newer compatible audience to top up this campaign")
|
|
13361
13374
|
.action(async (runId, options) => {
|
|
13362
13375
|
const session = await requireAuthSession();
|
|
13363
|
-
const
|
|
13376
|
+
const result = await enrichAffiliateOutreachViaApp(session, z.string().uuid().parse(runId), options.sourceAudienceRunId
|
|
13364
13377
|
? z.string().uuid().parse(options.sourceAudienceRunId)
|
|
13365
13378
|
: undefined);
|
|
13366
13379
|
printOutput({
|
|
13367
13380
|
status: "ok",
|
|
13368
|
-
|
|
13369
|
-
|
|
13381
|
+
processing: result.processing,
|
|
13382
|
+
workflowRunId: result.workflowRunId,
|
|
13383
|
+
outreach: result.outreach,
|
|
13384
|
+
message: result.processing
|
|
13385
|
+
? `Email recovery is running in the background. Check: salesprompter affiliate:status ${runId}`
|
|
13386
|
+
: "Email recovery finished and new verified leads were added."
|
|
13370
13387
|
});
|
|
13371
13388
|
});
|
|
13372
13389
|
program
|
package/package.json
CHANGED