@letterstory/cli 0.177.115 → 0.177.117
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 +2 -1
- package/lib/cli.mjs +6 -3
- package/lib/commands/outbound.mjs +16 -4
- package/lib/commands/targets.mjs +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -903,6 +903,7 @@ letterstory mail postal-address "123 Main St, Portland, OR 97201" # CAN-SPAM f
|
|
|
903
903
|
# Sequences (approving or enrolling SENDS)
|
|
904
904
|
letterstory sequences list | get <id> | create | update <id> | pause <id> | resume <id>
|
|
905
905
|
letterstory sequences enroll <id> --list <list-id> # or --email a@x.com ...
|
|
906
|
+
letterstory sequences stop <id> --list <list-id> # or <enrollment-id>... or --all
|
|
906
907
|
letterstory sequences review list | approve <item-id> | skip <item-id> | edit <item-id> --subject "…"
|
|
907
908
|
letterstory sequences links create --days 2 # no-login phone review link, shown once
|
|
908
909
|
letterstory sequences update <id> --test-mode # internal accounts only: walks as live, sends nothing
|
|
@@ -915,7 +916,7 @@ letterstory prospects lists | ls --list <list-id> | get <id> | import --csv-file
|
|
|
915
916
|
letterstory prospects source --description "heads of growth at seed-stage fintech" --list-name "Fintech"
|
|
916
917
|
letterstory prospects openers <list-id> --new-group "Fintech openers" # print an opening line per row
|
|
917
918
|
letterstory prospects columns add "Cake image" | columns delete <column-id> --yes
|
|
918
|
-
letterstory prospects delete <prospect-id>... --yes
|
|
919
|
+
letterstory prospects delete <prospect-id>... --yes # or --list <list-id> for the whole list; active enrollments stop
|
|
919
920
|
```
|
|
920
921
|
|
|
921
922
|
Connecting a bring-your-own Gmail mailbox needs a browser (Google consent), so it is done in the
|
package/lib/cli.mjs
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
92
92
|
|
|
93
93
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
94
|
-
export const VERSION = "0.177.
|
|
94
|
+
export const VERSION = "0.177.117";
|
|
95
95
|
|
|
96
96
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
97
97
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -159,6 +159,7 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
159
159
|
"failing",
|
|
160
160
|
// replicate forms: read the site's forms key (admins) instead of its submissions.
|
|
161
161
|
"show-key",
|
|
162
|
+
"searched",
|
|
162
163
|
// sim create / resample / sample-key: keep the customer's sample key, or delete it now.
|
|
163
164
|
"keep-key",
|
|
164
165
|
"delete-key",
|
|
@@ -1772,7 +1773,8 @@ Sequences (multi-step cold email sent from your mailers; approving or enrolling
|
|
|
1772
1773
|
--enroll-on-cake-list: only for prospects in that list (none = any)
|
|
1773
1774
|
sequences pause|resume <sequence-id> Stop / restart sending
|
|
1774
1775
|
sequences enroll <sequence-id> (--list <list-id> | --email <addr>... | --recipients '<json>'|--recipients-file <path>)
|
|
1775
|
-
sequences stop <sequence-id> <enrollment-id>
|
|
1776
|
+
sequences stop <sequence-id> (<enrollment-id>... | --list <list-id> | --all)
|
|
1777
|
+
Stop recipients: these, a list's, or everyone
|
|
1776
1778
|
sequences review list Emails waiting for a decision
|
|
1777
1779
|
sequences review edit <item-id> [--subject <s>] [--body <text>|--file <path>]
|
|
1778
1780
|
[--personalize <line> [--personalize-mode replace|insert]] Mark the edit a personalization (proposed to the opener library)
|
|
@@ -1813,7 +1815,8 @@ Prospects (who you write to):
|
|
|
1813
1815
|
Funding + competitors for un-enriched rows
|
|
1814
1816
|
prospects openers <list-id> [--group <ledes-group-id>|--new-group <name>]
|
|
1815
1817
|
Print an opening line for every row without one (background)
|
|
1816
|
-
prospects delete <prospect-id>... --
|
|
1818
|
+
prospects delete (<prospect-id>... | --list <list-id> [--status <s>] [--q <text>]) --yes
|
|
1819
|
+
Permanently delete prospects (a whole list in one go); their active enrollments stop
|
|
1817
1820
|
prospects columns add <label> Add a custom column (key returned)
|
|
1818
1821
|
prospects columns delete <column-id> --yes
|
|
1819
1822
|
prospects update <prospect-id> [--status new|contacted|replied|unsubscribed|archived] [--name <n>]
|
|
@@ -216,9 +216,13 @@ export const ARGS = {
|
|
|
216
216
|
recipients: { value: readRecipients },
|
|
217
217
|
list_id: "list",
|
|
218
218
|
},
|
|
219
|
+
// `stop <sequence-id> <enrollment-id>...` | `--list <list-id>` | `--all`.
|
|
219
220
|
stop_sequence_enrollment: {
|
|
220
221
|
sequence_id: { positional: 0, label: "sequence-id", required: true },
|
|
221
|
-
enrollment_id: {
|
|
222
|
+
enrollment_id: { value: (_flags, positionals) => (positionals.length === 2 ? positionals[1] : undefined) },
|
|
223
|
+
enrollment_ids: { value: (_flags, positionals) => (positionals.length > 2 ? positionals.slice(1) : undefined) },
|
|
224
|
+
list_id: "list",
|
|
225
|
+
all: { flag: "all", type: "bool" },
|
|
222
226
|
},
|
|
223
227
|
list_review_items: {
|
|
224
228
|
dispatch_id: "dispatch",
|
|
@@ -317,14 +321,22 @@ export const ARGS = {
|
|
|
317
321
|
status: { flag: "status", enum: PROSPECT_STATUSES },
|
|
318
322
|
q: "q",
|
|
319
323
|
},
|
|
324
|
+
// `delete <prospect-id>...`, or a whole view: `--list <list-id>` / `--status` / `--q`.
|
|
320
325
|
delete_prospects: {
|
|
321
326
|
prospect_ids: {
|
|
322
327
|
value: (flags, positionals) => {
|
|
323
328
|
const ids = [...positionals, ...flagList(flags.id)];
|
|
324
|
-
if (
|
|
325
|
-
|
|
329
|
+
if (ids.length) return ids;
|
|
330
|
+
if (flags.list === undefined && flags.status === undefined && flags.q === undefined)
|
|
331
|
+
throw new CliError(
|
|
332
|
+
"Missing <prospect-id>... (or --list <list-id> / --status / --q for a whole view)"
|
|
333
|
+
);
|
|
334
|
+
return undefined;
|
|
326
335
|
},
|
|
327
336
|
},
|
|
337
|
+
list_id: "list",
|
|
338
|
+
status: { flag: "status", enum: PROSPECT_STATUSES },
|
|
339
|
+
q: "q",
|
|
328
340
|
},
|
|
329
341
|
create_prospect_column: {
|
|
330
342
|
label: { positional: 0, label: "label", required: true },
|
|
@@ -587,7 +599,7 @@ export async function cmdSequences(ctx) {
|
|
|
587
599
|
case "enroll":
|
|
588
600
|
return run(rest, "enroll_in_sequence", "Enrolled.");
|
|
589
601
|
case "stop":
|
|
590
|
-
return run(rest, "stop_sequence_enrollment", "
|
|
602
|
+
return run(rest, "stop_sequence_enrollment", "Stopped.");
|
|
591
603
|
case "review":
|
|
592
604
|
return sequencesReview({ ...rest, positionals: rest.positionals.slice(1) }, rest.positionals[0]);
|
|
593
605
|
case "links":
|
package/lib/commands/targets.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// routes and staff Fleet do.
|
|
9
9
|
|
|
10
10
|
import { CliError } from "../client.mjs";
|
|
11
|
-
import { flagStr, flagNum, flagList, printResult, argsFromFlags, refuseUnknownFlags, ok } from "./shared.mjs";
|
|
11
|
+
import { flagStr, flagNum, flagBool, flagList, printResult, argsFromFlags, refuseUnknownFlags, ok } from "./shared.mjs";
|
|
12
12
|
|
|
13
13
|
const STATUSES = ["active", "inactive", "achieved", "retired"];
|
|
14
14
|
const PRIORITIES = ["high", "normal", "low"];
|
|
@@ -97,7 +97,10 @@ export const ARGS = {
|
|
|
97
97
|
},
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
|
-
suggest_ranking_targets: {
|
|
100
|
+
suggest_ranking_targets: {
|
|
101
|
+
offering_id: offering,
|
|
102
|
+
searched: { value: (flags) => (flags.searched === undefined ? undefined : flagBool(flags.searched)) },
|
|
103
|
+
},
|
|
101
104
|
list_question_candidates: { limit: { flag: "limit", type: "num" } },
|
|
102
105
|
list_ranking_subqueries: {
|
|
103
106
|
target_id: { positional: 0, label: "target-id" },
|
|
@@ -137,7 +140,7 @@ const USAGE = `Usage: targets <list|add|update|activate|deactivate|cap|suggest|c
|
|
|
137
140
|
targets activate <target-id>
|
|
138
141
|
targets deactivate <target-id>
|
|
139
142
|
targets cap <offering-id|company> <n|default>
|
|
140
|
-
targets suggest [--offering <offering-id|company>]
|
|
143
|
+
targets suggest [--offering <offering-id|company>] [--searched]
|
|
141
144
|
targets candidates [--limit <n>] new questions the market asks, checked and deduped
|
|
142
145
|
targets subqueries [<target-id>] [--retired] the phrasings asked under each target
|
|
143
146
|
targets subquery add <target-id> <phrasing>
|
|
@@ -332,7 +335,7 @@ async function targetsSuggest(ctx) {
|
|
|
332
335
|
const scope = r.offering_id ? ` --offering ${r.offering_id}` : "";
|
|
333
336
|
const lines = all.map(
|
|
334
337
|
(s) =>
|
|
335
|
-
` ${s.phrase} [${s.basis}]${s.suggestedFraming ? ` — as ${s.suggestedFraming}` : ""}\n ${s.rationale}`
|
|
338
|
+
` ${s.phrase} [${s.basis}]${s.monthlySearches != null ? ` ${s.monthlySearches}/mo` : ""}${s.suggestedFraming ? ` — as ${s.suggestedFraming}` : ""}\n ${s.rationale}`
|
|
336
339
|
);
|
|
337
340
|
lines.push(`Nothing saved. Keep one with: ${ctx.bin} targets add <phrase>${scope}`);
|
|
338
341
|
return lines.join("\n");
|