salesprompter-cli 0.1.44 → 0.1.45

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.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +32 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -86,6 +86,7 @@ salesprompter affiliate:run \
86
86
 
87
87
  # Review the persisted sequence and enrichment summary, then activate explicitly
88
88
  salesprompter affiliate:status "$AFFILIATE_RUN_ID"
89
+ salesprompter affiliate:regenerate-sequence "$AFFILIATE_RUN_ID"
89
90
  salesprompter affiliate:enrich "$AFFILIATE_RUN_ID"
90
91
  salesprompter affiliate:activate "$AFFILIATE_RUN_ID"
91
92
 
@@ -106,6 +107,7 @@ salesprompter --help
106
107
  - Use your own authorized data access and workspace credentials.
107
108
  - Respect provider terms and customer data boundaries.
108
109
  - `affiliate:run` uses direct email enrichment first, then Phantombuster Email Finder for unresolved people before creating a draft Instantly campaign.
110
+ - Affiliate preparation automatically creates three variants per step with spintax; `affiliate:regenerate-sequence` rebuilds and syncs them through the Salesprompter app.
109
111
  - `affiliate:enrich` reruns email recovery and adds only newly found addresses to an existing campaign.
110
112
  - A draft campaign does not send until `affiliate:activate` is run.
111
113
  - The CLI is designed for interactive users and agent-assisted workflows.
package/dist/cli.js CHANGED
@@ -169,7 +169,15 @@ const AffiliateOutreachRunSchema = z.object({
169
169
  subject: z.string(),
170
170
  body: z.string(),
171
171
  rationale: z.string(),
172
- delayDays: z.number().int().nonnegative()
172
+ delayDays: z.number().int().nonnegative(),
173
+ variants: z
174
+ .array(z.object({
175
+ subject: z.string(),
176
+ body: z.string()
177
+ }))
178
+ .min(1)
179
+ .max(3)
180
+ .optional()
173
181
  })),
174
182
  enriched_leads: z.array(z.object({
175
183
  rowIndex: z.number().int().nonnegative(),
@@ -6567,6 +6575,17 @@ async function activateAffiliateOutreachViaApp(session, audienceRunId) {
6567
6575
  }), AffiliateOutreachResponseSchema);
6568
6576
  return value.outreach;
6569
6577
  }
6578
+ async function regenerateAffiliateOutreachSequenceViaApp(session, audienceRunId) {
6579
+ const { value } = await fetchCliJson(session, (currentSession) => fetch(`${currentSession.apiBaseUrl}/api/cli/affiliate-outreach/${encodeURIComponent(audienceRunId)}/sequence`, {
6580
+ method: "POST",
6581
+ headers: {
6582
+ "Content-Type": "application/json",
6583
+ Authorization: `Bearer ${currentSession.accessToken}`
6584
+ },
6585
+ body: JSON.stringify({})
6586
+ }), AffiliateOutreachResponseSchema);
6587
+ return value.outreach;
6588
+ }
6570
6589
  async function enrichAffiliateOutreachViaApp(session, audienceRunId) {
6571
6590
  const before = await getAffiliateOutreachViaApp(session, audienceRunId);
6572
6591
  const previousAttemptedAt = typeof before.stats.latestTopUp === "object" && before.stats.latestTopUp !== null
@@ -13323,6 +13342,18 @@ program
13323
13342
  const outreach = await getAffiliateOutreachViaApp(session, z.string().uuid().parse(runId));
13324
13343
  printOutput({ status: "ok", outreach });
13325
13344
  });
13345
+ program
13346
+ .command("affiliate:regenerate-sequence <run-id>")
13347
+ .description("Regenerate sequence variants and spintax, then sync them to Instantly.")
13348
+ .action(async (runId) => {
13349
+ const session = await requireAuthSession();
13350
+ const outreach = await regenerateAffiliateOutreachSequenceViaApp(session, z.string().uuid().parse(runId));
13351
+ printOutput({
13352
+ status: "ok",
13353
+ outreach,
13354
+ message: "Sequence variants and spintax were regenerated and synced to Instantly."
13355
+ });
13356
+ });
13326
13357
  program
13327
13358
  .command("affiliate:enrich <run-id>")
13328
13359
  .description("Find additional verified emails and add only new leads to the campaign.")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "salesprompter-cli",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Sales workflow CLI for guided lead generation, enrichment, scoring, and sync.",
5
5
  "author": "Daniel Sinewe <hello@danielsinewe.com>",
6
6
  "type": "module",