@letterstory/cli 0.177.182 → 0.177.184
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 +3 -1
- package/lib/commands/visits.mjs +14 -3
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
94
94
|
|
|
95
95
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
96
|
-
export const VERSION = "0.177.
|
|
96
|
+
export const VERSION = "0.177.184";
|
|
97
97
|
|
|
98
98
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
99
99
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -112,6 +112,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
112
112
|
// org overview: only what waits on someone (the More menu's closed read).
|
|
113
113
|
"needs-only",
|
|
114
114
|
"include-tests",
|
|
115
|
+
// visits transact asks --before: page the team's tests instead of agents' asks.
|
|
116
|
+
"tests",
|
|
115
117
|
"as-test",
|
|
116
118
|
"discover",
|
|
117
119
|
// visits transact add folder|page|connection: leave it out of the set (a connection: switch it off).
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// letterstory visits transact prebuild <site-id>... [--dry-run] staff: build customers' agent sites, Letter paying
|
|
33
33
|
// letterstory visits transact asks [--since 7d] [--limit 50]
|
|
34
34
|
// letterstory visits transact learnings [--since 7d]
|
|
35
|
-
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] the Agent Site tab
|
|
35
|
+
// letterstory visits transact site [publish|unpublish] [--domain ask.acme.com | --domain none] [--remove <slug>] [--dismiss "<question>"] [--forget <address>] the Agent Site tab
|
|
36
36
|
|
|
37
37
|
import { CliError } from "../client.mjs";
|
|
38
38
|
import { flagBool, flagStr, printResult, argsFromFlags } from "./shared.mjs";
|
|
@@ -185,7 +185,14 @@ export const ARGS = {
|
|
|
185
185
|
site_id: "site",
|
|
186
186
|
source_id: { positional: 0, label: "source id", required: true },
|
|
187
187
|
},
|
|
188
|
-
visitors_list_transact_asks: {
|
|
188
|
+
visitors_list_transact_asks: {
|
|
189
|
+
site_id: "site",
|
|
190
|
+
host: "host",
|
|
191
|
+
days,
|
|
192
|
+
limit: { flag: "limit", type: "num" },
|
|
193
|
+
before: { flag: "before" },
|
|
194
|
+
tests: { value: (flags) => (flagBool(flags.tests) ? true : undefined) },
|
|
195
|
+
},
|
|
189
196
|
visitors_get_transact_learnings: { site_id: "site", host: "host", days },
|
|
190
197
|
visitors_get_agent_site: { site_id: "site", host: "host" },
|
|
191
198
|
visitors_prebuild_agent_sites: {
|
|
@@ -200,6 +207,8 @@ export const ARGS = {
|
|
|
200
207
|
typeof flags.domain !== "string" ? undefined : flags.domain === "none" ? null : flags.domain,
|
|
201
208
|
},
|
|
202
209
|
remove: { flag: "remove" },
|
|
210
|
+
dismiss: { flag: "dismiss" },
|
|
211
|
+
forget: { flag: "forget" },
|
|
203
212
|
},
|
|
204
213
|
visitors_export: {
|
|
205
214
|
site_id: "site",
|
|
@@ -454,7 +463,9 @@ async function visitsTransact(ctx) {
|
|
|
454
463
|
rest.positionals[0] === "publish" ||
|
|
455
464
|
rest.positionals[0] === "unpublish" ||
|
|
456
465
|
flags.domain !== undefined ||
|
|
457
|
-
flags.remove !== undefined
|
|
466
|
+
flags.remove !== undefined ||
|
|
467
|
+
flags.dismiss !== undefined ||
|
|
468
|
+
flags.forget !== undefined;
|
|
458
469
|
const result = await call(rest, write ? "visitors_set_agent_site" : "visitors_get_agent_site");
|
|
459
470
|
printResult(io, flags, result, (r) => {
|
|
460
471
|
if (!r.available) return "Agent Sites aren't available yet";
|