@letterstory/cli 0.134.0 → 0.134.1
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 +2 -1
- package/lib/commands/admin.mjs +12 -2
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./commands.mjs";
|
|
63
63
|
|
|
64
64
|
// Keep in sync with cli/package.json.
|
|
65
|
-
export const VERSION = "0.134.
|
|
65
|
+
export const VERSION = "0.134.1";
|
|
66
66
|
|
|
67
67
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
68
68
|
// can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
|
|
@@ -927,6 +927,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
|
|
|
927
927
|
[--save-result …] [--draft]
|
|
928
928
|
| renewals [--days 90]
|
|
929
929
|
| reach-outs [--day YYYY-MM-DD] [--fresh] the day's reach-outs, N of 5 (#crm-reminders' count)
|
|
930
|
+
| replies [--days 14] replies nobody has answered yet, newest first
|
|
930
931
|
| track-record [--since YYYY-MM-DD] | at-risk | expansion-signals
|
|
931
932
|
| weekly-note the Monday retention note for the last full week
|
|
932
933
|
| collections [--org-ids a,b | --account-stages won,active]
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// The old names — evals, eval-add, eval-set, proposals, propose-eval, capture-eval, reject-eval — still work.)
|
|
15
15
|
// admin evals scoreboard|cases|runs|run|triage|guard|retire … (fleet:read / tuning:experiment)
|
|
16
16
|
// admin fleet-experiments list|articles|clients|mark|unmark|new|assign|assign-eligible|assign-orgs|spin-up|apply|start|stop|decide … (fleet:read / fleet:experiment)
|
|
17
|
-
// admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (crm:read / crm:write)
|
|
17
|
+
// admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|replies|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (crm:read / crm:write)
|
|
18
18
|
// admin spend summary|reconcile|pnl|margin|pricing|entries|add|import|usage|remove|reference|stripe-sync|services|service … (spend:read / spend:write)
|
|
19
19
|
// admin brand-detection <org-id> (fleet:read)
|
|
20
20
|
// admin brand-detection <org-id> [--term t]... [--exact t]... [--exclude p]... [--note "…"] | --clear [--note "…"] (fleet:instrument)
|
|
@@ -3399,6 +3399,16 @@ async function cmdAdminCrm(ctx) {
|
|
|
3399
3399
|
].join("\n")
|
|
3400
3400
|
);
|
|
3401
3401
|
}
|
|
3402
|
+
case "replies": {
|
|
3403
|
+
// admin crm replies [--days 14] — companies that answered us and that nobody has
|
|
3404
|
+
// reached since, newest first (src/lib/crm/replies-waiting.ts).
|
|
3405
|
+
const params = new URLSearchParams(compact({ days: flagStr(flags.days) }));
|
|
3406
|
+
return out(await staffRequest(ctx, "GET", `${CRM}/replies?${params}`), (r) =>
|
|
3407
|
+
r.replies.length === 0
|
|
3408
|
+
? "No replies waiting."
|
|
3409
|
+
: r.replies.map((x) => `${x.at.slice(0, 10)} ${x.name} ${x.title ?? ""}`.trimEnd()).join("\n")
|
|
3410
|
+
);
|
|
3411
|
+
}
|
|
3402
3412
|
case "reach-outs": {
|
|
3403
3413
|
// admin crm reach-outs [--day YYYY-MM-DD] [--fresh] — the day's reach-out count toward
|
|
3404
3414
|
// the target, the same number #crm-reminders posts (src/lib/crm/reach-out-day.ts).
|
|
@@ -3732,7 +3742,7 @@ async function cmdAdminCrm(ctx) {
|
|
|
3732
3742
|
}
|
|
3733
3743
|
default:
|
|
3734
3744
|
throw new CliError(
|
|
3735
|
-
"Usage: admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (see --help)"
|
|
3745
|
+
"Usage: admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|replies|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (see --help)"
|
|
3736
3746
|
);
|
|
3737
3747
|
}
|
|
3738
3748
|
}
|