@letterstory/cli 0.177.106 → 0.177.107

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/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.106";
94
+ export const VERSION = "0.177.107";
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;
@@ -1833,8 +1833,12 @@ Mailers (the sending mailboxes):
1833
1833
  mailers message <mailer-id> <uid> --folder inbox|sent
1834
1834
  One message in full (plain-text body)
1835
1835
  mailers forward <mailer-id> (--to <email> | --clear) Forward replies to sequences to an address
1836
- mailers forwards <mailer-id> [--outcome forwarded|held|failed] [--limit <n>]
1836
+ mailers forwards <mailer-id> [--outcome forwarded|held|failed|kept] [--limit <n>]
1837
1837
  What forwarding forwarded or held, and why
1838
+ mailers replies [--state open|replied|all] [--mailer <id>] [--limit <n>]
1839
+ Replies to your sequences, across every mailer
1840
+ mailers reply <reply-id> --text <answer> Answer a reply from the mailer it came to
1841
+ mailers mark-replied <reply-id> [--reopen] Mark a reply replied without answering, or reopen it
1838
1842
  mailers test <mailer-id> --to <email> Send one test email (5 a mailer, 25 an org a day)
1839
1843
  mailers warmup start|pause <mailer-id> Start / pause warming (14+ days; ready at score 85)
1840
1844
  mailers limit <mailer-id> <per-day> Daily send limit, 0..500 (not while warming)
@@ -376,9 +376,22 @@ export const ARGS = {
376
376
  },
377
377
  list_mailer_forwards: {
378
378
  mailer_id: { positional: 0, label: "mailer-id", required: true },
379
- outcome: { flag: "outcome", enum: ["pending", "forwarded", "held", "failed"] },
379
+ outcome: { flag: "outcome", enum: ["pending", "forwarded", "held", "failed", "kept"] },
380
380
  limit: { flag: "limit", type: "num" },
381
381
  },
382
+ list_mailer_replies: {
383
+ state: { flag: "state", enum: ["open", "replied", "all"] },
384
+ mailer_id: { flag: "mailer" },
385
+ limit: { flag: "limit", type: "num" },
386
+ },
387
+ answer_mailer_reply: {
388
+ reply_id: { positional: 0, label: "reply-id", required: true },
389
+ text: { flag: "text", required: true },
390
+ },
391
+ resolve_mailer_reply: {
392
+ reply_id: { positional: 0, label: "reply-id", required: true },
393
+ replied: { value: (flags) => flags.reopen !== true },
394
+ },
382
395
  send_mailer_test: {
383
396
  mailer_id: { positional: 0, label: "mailer-id", required: true },
384
397
  to: { flag: "to", required: true },
@@ -729,7 +742,7 @@ async function prospectsColumns(ctx, sub) {
729
742
  }
730
743
  }
731
744
 
732
- const MAILERS_USAGE = `Usage: mailers <list|domains|domain|retry|quote|launch|move|messages|message|forward|forwards|test|warmup|limit|retire|suppressions>`;
745
+ const MAILERS_USAGE = `Usage: mailers <list|domains|domain|retry|quote|launch|move|messages|message|forward|forwards|replies|reply|mark-replied|test|warmup|limit|retire|suppressions>`;
733
746
 
734
747
  export async function cmdMailers(ctx) {
735
748
  const sub = ctx.positionals[0];
@@ -781,6 +794,14 @@ export async function cmdMailers(ctx) {
781
794
  return run(rest, "set_mailer_forwarding", "Forwarding updated.");
782
795
  case "forwards":
783
796
  return run(rest, "list_mailer_forwards");
797
+ case "replies":
798
+ return run(rest, "list_mailer_replies");
799
+ case "reply":
800
+ return run(rest, "answer_mailer_reply", (r) => `Answer sent to ${r?.to ?? "the sender"}.`);
801
+ case "mark-replied":
802
+ return run(rest, "resolve_mailer_reply", (r) =>
803
+ r?.state === "open" ? "Reply reopened." : "Reply marked replied."
804
+ );
784
805
  case "test":
785
806
  return run(
786
807
  rest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.106",
3
+ "version": "0.177.107",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",