@audienti/cli 0.1.92 → 0.1.94
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/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/api-client.js +4 -0
- package/src/cli.js +61 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to the Audienti CLI are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.94] - 2026-10-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `motions quick-start` takes `--city`, `--state` and `--country`. Setup needs them once, before the first draft; the place also sets your time zone. Without them a person with no saved place gets "Pick your country." (#2551).
|
|
12
|
+
- `motions setup-state` shows which setup step you are on, what is needed next, and how many people your setup experiment has found (#2551).
|
|
13
|
+
|
|
14
|
+
## [0.1.93] - 2026-10-03
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `social-cookies show <scok_id> --json` includes `computer_usage`: separate measured Computer and browser-container bandwidth, running time, measurement coverage and timestamps. Missing usage stays unknown; the earlier browser estimate remains separate (#2578).
|
|
19
|
+
|
|
7
20
|
## [0.1.92] - 2026-10-03
|
|
8
21
|
|
|
9
22
|
### Added
|
package/package.json
CHANGED
package/src/api-client.js
CHANGED
|
@@ -836,6 +836,10 @@ export class AudientiClient {
|
|
|
836
836
|
return this.requestJson(accountPath(accountId, ["quick_start", draftId]));
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
+
setupState(accountId, query = {}) {
|
|
840
|
+
return this.requestJson(accountPath(accountId, ["quick_start", "setup_state"], query));
|
|
841
|
+
}
|
|
842
|
+
|
|
839
843
|
confirmQuickStart(accountId, draftId, body = {}) {
|
|
840
844
|
return this.requestJson(accountPath(accountId, ["quick_start", draftId, "confirm"]), {
|
|
841
845
|
method: "POST",
|
package/src/cli.js
CHANGED
|
@@ -181,7 +181,8 @@ const MOTIONS_DELETE_USAGE = "Usage: audienti motions delete <motn_id> --confirm
|
|
|
181
181
|
const MOTIONS_CLONE_USAGE = "Usage: audienti motions clone <motn_id> --name <text> [--json] [--account <acct_id>]";
|
|
182
182
|
const MOTIONS_MOVE_PROSPECTS_USAGE = "Usage: audienti motions move-prospects <source_motn_id> --target <target_motn_id> <prsp_id> [prsp_id...] [--json] [--account <acct_id>]";
|
|
183
183
|
const MOTIONS_RUN_DISCOVERY_USAGE = "Usage: audienti motions run-discovery <motn_id> [--target-count <n>] [--json] [--account <acct_id>]";
|
|
184
|
-
const
|
|
184
|
+
const MOTIONS_SETUP_STATE_USAGE = "Usage: audienti motions setup-state [--principal <account_user_id|me>] [--json] [--account <acct_id>]";
|
|
185
|
+
const MOTIONS_QUICK_START_USAGE = "Usage: audienti motions quick-start --url <company_url> [--city <city> --state <code> --country <code>] [--principal <account_user_id|me>] [--feedback <text>] [--offer-type <type>] [--force] [--confirm] [--wait] [--timeout-seconds <n>] [--poll-interval-seconds <n>] [--json] [--account <acct_id>]";
|
|
185
186
|
const MOTIONS_ABM_COMPANIES_LIST_USAGE = "Usage: audienti motions abm-companies <motn_id> list [--json] [--account <acct_id>]";
|
|
186
187
|
const MOTIONS_ABM_COMPANIES_ADD_USAGE = "Usage: audienti motions abm-companies <motn_id> add (<domain_or_linkedin_url>... | --file <txt|json>) [--json] [--account <acct_id>]";
|
|
187
188
|
const MOTIONS_ABM_COMPANIES_REMOVE_USAGE = "Usage: audienti motions abm-companies <motn_id> remove <row_id> [--json] [--account <acct_id>]";
|
|
@@ -438,6 +439,7 @@ async function dispatch(argv, context) {
|
|
|
438
439
|
if (normalizedResource === "motions" && action === "move-prospects") return motionsMoveProspects(rest, context, { accountOverride });
|
|
439
440
|
if (normalizedResource === "motions" && action === "run-discovery") return motionsRunDiscovery(rest, context, { accountOverride });
|
|
440
441
|
if (normalizedResource === "motions" && action === "quick-start") return motionsQuickStart(rest, context, { accountOverride });
|
|
442
|
+
if (normalizedResource === "motions" && action === "setup-state") return motionsSetupState(rest, context, { accountOverride });
|
|
441
443
|
if (normalizedResource === "content" && action === "programs") return contentPrograms(rest, context, { accountOverride });
|
|
442
444
|
if (normalizedResource === "content" && action === "plan") return contentPlan(rest, context, { accountOverride });
|
|
443
445
|
if (normalizedResource === "content" && action === "show") return contentShow(rest, context, { accountOverride });
|
|
@@ -1165,6 +1167,13 @@ function renderSetupDraft(draft, { ask }, say) {
|
|
|
1165
1167
|
say(` Your offer: ${[offer.title, offer.description].filter(Boolean).join(" - ") || "drafted from your website"}`);
|
|
1166
1168
|
say(` The ask: ${ask || "not set; the writer will suggest one"}`);
|
|
1167
1169
|
if (preview.premise) say(` Why now: ${preview.premise}`);
|
|
1170
|
+
const examples = Array.isArray(preview.example_people) ? preview.example_people : [];
|
|
1171
|
+
if (examples.length) {
|
|
1172
|
+
say(" Example people with these job titles (a sample to check the audience, not your prospects):");
|
|
1173
|
+
for (const person of examples) {
|
|
1174
|
+
say(` - ${[person.name, [person.job_title, person.company].filter(Boolean).join(" at "), person.location].filter(Boolean).join(", ")}`);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1168
1177
|
say();
|
|
1169
1178
|
}
|
|
1170
1179
|
|
|
@@ -3298,6 +3307,9 @@ async function motionsQuickStart(args, context, { accountOverride } = {}) {
|
|
|
3298
3307
|
const { values, positionals } = parseCommandArgs(args, {
|
|
3299
3308
|
...jsonOptions(),
|
|
3300
3309
|
url: { type: "string" },
|
|
3310
|
+
city: { type: "string" },
|
|
3311
|
+
state: { type: "string" },
|
|
3312
|
+
country: { type: "string" },
|
|
3301
3313
|
principal: { type: "string" },
|
|
3302
3314
|
feedback: { type: "string" },
|
|
3303
3315
|
"offer-type": { type: "string" },
|
|
@@ -3315,6 +3327,9 @@ async function motionsQuickStart(args, context, { accountOverride } = {}) {
|
|
|
3315
3327
|
const requestBody = {
|
|
3316
3328
|
quick_start: compactObject({
|
|
3317
3329
|
company_url: values.url,
|
|
3330
|
+
city: values.city,
|
|
3331
|
+
state_code: values.state,
|
|
3332
|
+
country_code: values.country,
|
|
3318
3333
|
principal_account_user_id: values.principal,
|
|
3319
3334
|
feedback: values.feedback,
|
|
3320
3335
|
offer_type: values["offer-type"],
|
|
@@ -3343,6 +3358,31 @@ async function motionsQuickStart(args, context, { accountOverride } = {}) {
|
|
|
3343
3358
|
renderQuickStartDraft(draft, context);
|
|
3344
3359
|
}
|
|
3345
3360
|
|
|
3361
|
+
async function motionsSetupState(args, context, { accountOverride } = {}) {
|
|
3362
|
+
const { values, positionals } = parseCommandArgs(args, {
|
|
3363
|
+
...jsonOptions(),
|
|
3364
|
+
principal: { type: "string" }
|
|
3365
|
+
});
|
|
3366
|
+
if (positionals.length > 0) throw new CommandError(MOTIONS_SETUP_STATE_USAGE);
|
|
3367
|
+
|
|
3368
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
3369
|
+
const query = values.principal ? { "quick_start[principal_account_user_id]": values.principal } : {};
|
|
3370
|
+
const state = await client.setupState(accountId, query);
|
|
3371
|
+
if (values.json) return writeJson(context.stdout, state);
|
|
3372
|
+
|
|
3373
|
+
const stepNames = { company: "Your company", targeting: "Verify your targeting", go_live: "Go live" };
|
|
3374
|
+
if (state.step === "live") {
|
|
3375
|
+
writeLine(context.stdout, "Setup: done. LinkedIn is connected and you are live.");
|
|
3376
|
+
} else {
|
|
3377
|
+
writeLine(context.stdout, `Setup: step ${state.step_number} of 3, ${stepNames[state.step] || state.step}`);
|
|
3378
|
+
}
|
|
3379
|
+
if (state.blocker) writeLine(context.stdout, `Next: ${state.blocker}`);
|
|
3380
|
+
if (state.motion) {
|
|
3381
|
+
writeLine(context.stdout, `Experiment: ${state.motion.name} (${state.motion.prefix_id})`);
|
|
3382
|
+
writeLine(context.stdout, `Prospects: ${state.people_found}${state.finding_people ? " (looking for your signals; the first ones can take a day)" : ""}`);
|
|
3383
|
+
}
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3346
3386
|
async function motionsAnalytics(args, context, { accountOverride } = {}) {
|
|
3347
3387
|
const { values, positionals } = parseCommandArgs(args, {
|
|
3348
3388
|
...jsonOptions(),
|
|
@@ -12430,6 +12470,7 @@ const HELP_TOPICS = new Map([
|
|
|
12430
12470
|
" audienti motions status <motn_id> [--json]",
|
|
12431
12471
|
" audienti motions run-discovery <motn_id> [--target-count <n>] [--json]",
|
|
12432
12472
|
" audienti motions quick-start --url <company_url> [--confirm] [--wait] [--json]",
|
|
12473
|
+
" audienti motions setup-state [--json]",
|
|
12433
12474
|
" audienti motions analytics <motn_id> [--window 30d] [--json]",
|
|
12434
12475
|
" audienti motions prospects <motn_id> [--json]",
|
|
12435
12476
|
" audienti motions add-prospects <motn_id> <prsp_id> [prsp_id...] [--json]",
|
|
@@ -12680,6 +12721,9 @@ const HELP_TOPICS = new Map([
|
|
|
12680
12721
|
"",
|
|
12681
12722
|
"Options:",
|
|
12682
12723
|
" --url <company_url> Public HTTP(S) URL used by the quick-start drafter.",
|
|
12724
|
+
" --city <city> Your city. Needed once, before your first draft; it also sets your time zone.",
|
|
12725
|
+
" --state <code> Your state or province code, such as TX or ON. Leave out where the country has none.",
|
|
12726
|
+
" --country <code> Your two-letter country code, such as US or CA.",
|
|
12683
12727
|
" --principal <user> Account user id or me. Defaults to the authenticated token user.",
|
|
12684
12728
|
" --feedback <text> Optional operator guidance for the draft.",
|
|
12685
12729
|
" --offer-type <type> Optional supported offer type hint.",
|
|
@@ -12699,6 +12743,22 @@ const HELP_TOPICS = new Map([
|
|
|
12699
12743
|
" POST /api/v1/accounts/:account_id/quick_start/:draft_id/confirm.json"
|
|
12700
12744
|
].join("\n")],
|
|
12701
12745
|
|
|
12746
|
+
["motions setup-state", [
|
|
12747
|
+
"Usage:",
|
|
12748
|
+
` ${MOTIONS_SETUP_STATE_USAGE.slice("Usage: ".length)}`,
|
|
12749
|
+
"",
|
|
12750
|
+
"Status: implemented",
|
|
12751
|
+
"",
|
|
12752
|
+
"Purpose:",
|
|
12753
|
+
" Show which setup step you are on, what is needed next, and how many people your setup experiment has found.",
|
|
12754
|
+
"",
|
|
12755
|
+
"Options:",
|
|
12756
|
+
" --principal <user> Account user id or me. Defaults to the authenticated token user.",
|
|
12757
|
+
"",
|
|
12758
|
+
"API:",
|
|
12759
|
+
" GET /api/v1/accounts/:account_id/quick_start/setup_state.json"
|
|
12760
|
+
].join("\n")],
|
|
12761
|
+
|
|
12702
12762
|
["motions prospects", [
|
|
12703
12763
|
"Usage:",
|
|
12704
12764
|
" audienti motions prospects <motn_id> [--json] [--account <acct_id>]",
|