@audienti/cli 0.1.81 → 0.1.82
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 +6 -0
- package/package.json +1 -1
- package/src/api-client.js +15 -0
- package/src/cli.js +111 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to the Audienti CLI are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.82] - 2026-09-28
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Run LinkedIn strategy reviews from the CLI: `tools linkedin-strategy-review list [--limit]`, `create --url <linkedin_profile_url>`, and `show <rprt_id>` (`--json` includes the report content), next to the existing `delete`.
|
|
12
|
+
|
|
7
13
|
## [0.1.81] - 2026-09-28
|
|
8
14
|
|
|
9
15
|
### Added
|
package/package.json
CHANGED
package/src/api-client.js
CHANGED
|
@@ -1121,6 +1121,21 @@ export class AudientiClient {
|
|
|
1121
1121
|
return this.requestJson(accountPath(accountId, ["tools", "linkedin-review", "reports", reportId]));
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
|
+
linkedinStrategyReviews(accountId, query = {}) {
|
|
1125
|
+
return this.requestJson(accountPath(accountId, ["tools", "linkedin-strategy-review", "reports"], query));
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
createLinkedinStrategyReview(accountId, body) {
|
|
1129
|
+
return this.requestJson(accountPath(accountId, ["tools", "linkedin-strategy-review", "reports"]), {
|
|
1130
|
+
method: "POST",
|
|
1131
|
+
body
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
linkedinStrategyReview(accountId, reportId) {
|
|
1136
|
+
return this.requestJson(accountPath(accountId, ["tools", "linkedin-strategy-review", "reports", reportId]));
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1124
1139
|
deleteLinkedinStrategyReview(accountId, reportId) {
|
|
1125
1140
|
return this.requestJson(accountPath(accountId, ["tools", "linkedin-strategy-review", "reports", reportId]), {
|
|
1126
1141
|
method: "DELETE"
|
package/src/cli.js
CHANGED
|
@@ -213,7 +213,16 @@ const TOOLS_LINKEDIN_REVIEW_USAGE = "Usage: audienti tools linkedin-review --url
|
|
|
213
213
|
const TOOLS_LINKEDIN_REVIEW_REPORTS_USAGE = "Usage: audienti tools linkedin-review reports [--limit <n>] [--json] [--account <acct_id>]";
|
|
214
214
|
const TOOLS_LINKEDIN_REVIEW_SHOW_USAGE = "Usage: audienti tools linkedin-review show <rprt_id> [--json] [--account <acct_id>]";
|
|
215
215
|
const TOOLS_LINKEDIN_REVIEW_STATUS_USAGE = "Usage: audienti tools linkedin-review status <rprt_id> [--json] [--account <acct_id>]";
|
|
216
|
+
const TOOLS_LINKEDIN_STRATEGY_REVIEW_LIST_USAGE = "Usage: audienti tools linkedin-strategy-review list [--limit <n>] [--json] [--account <acct_id>]";
|
|
217
|
+
const TOOLS_LINKEDIN_STRATEGY_REVIEW_CREATE_USAGE = "Usage: audienti tools linkedin-strategy-review create --url <linkedin_profile_url> [--json] [--account <acct_id>]";
|
|
218
|
+
const TOOLS_LINKEDIN_STRATEGY_REVIEW_SHOW_USAGE = "Usage: audienti tools linkedin-strategy-review show <rprt_id> [--json] [--account <acct_id>]";
|
|
216
219
|
const TOOLS_LINKEDIN_STRATEGY_REVIEW_DELETE_USAGE = "Usage: audienti tools linkedin-strategy-review delete <rprt_id> --confirm <yes|true|Y|y> [--json] [--account <acct_id>]";
|
|
220
|
+
const TOOLS_LINKEDIN_STRATEGY_REVIEW_USAGE = [
|
|
221
|
+
TOOLS_LINKEDIN_STRATEGY_REVIEW_LIST_USAGE,
|
|
222
|
+
TOOLS_LINKEDIN_STRATEGY_REVIEW_CREATE_USAGE,
|
|
223
|
+
TOOLS_LINKEDIN_STRATEGY_REVIEW_SHOW_USAGE,
|
|
224
|
+
TOOLS_LINKEDIN_STRATEGY_REVIEW_DELETE_USAGE
|
|
225
|
+
].join("\n");
|
|
217
226
|
const LISTS_BULK_ADD_TAG_USAGE = "Usage: audienti lists bulk-add-tag --tag <tag> <list_id> [list_id...] [--json] [--account <acct_id>]";
|
|
218
227
|
const LISTS_MERGE_USAGE = "Usage: audienti lists merge <list_id> <list_id> [--json] [--account <acct_id>]";
|
|
219
228
|
const LISTS_EXPORT_USAGE = "Usage: audienti lists export <list_id> [--output <file.csv>] [--inactive-reason <reason>] [--json] [--account <acct_id>]";
|
|
@@ -4566,7 +4575,10 @@ async function toolsLinkedinReviewStatus(args, context, { accountOverride } = {}
|
|
|
4566
4575
|
|
|
4567
4576
|
async function toolsLinkedinStrategyReview(args, context, { accountOverride } = {}) {
|
|
4568
4577
|
const [subaction, ...rest] = args;
|
|
4569
|
-
if (subaction
|
|
4578
|
+
if (subaction === "list") return toolsLinkedinStrategyReviewList(rest, context, { accountOverride });
|
|
4579
|
+
if (subaction === "create") return toolsLinkedinStrategyReviewCreate(rest, context, { accountOverride });
|
|
4580
|
+
if (subaction === "show") return toolsLinkedinStrategyReviewShow(rest, context, { accountOverride });
|
|
4581
|
+
if (subaction !== "delete") throw new CommandError(TOOLS_LINKEDIN_STRATEGY_REVIEW_USAGE);
|
|
4570
4582
|
|
|
4571
4583
|
const { values, positionals } = parseCommandArgs(rest, { ...jsonOptions(), confirm: { type: "string" } });
|
|
4572
4584
|
const normalizedConfirm = String(values.confirm || "").trim().toLowerCase();
|
|
@@ -4581,6 +4593,56 @@ async function toolsLinkedinStrategyReview(args, context, { accountOverride } =
|
|
|
4581
4593
|
writeLine(context.stdout, `Deleted LinkedIn strategy review report ${display(payload?.id || positionals[0])}.`);
|
|
4582
4594
|
}
|
|
4583
4595
|
|
|
4596
|
+
async function toolsLinkedinStrategyReviewList(args, context, { accountOverride } = {}) {
|
|
4597
|
+
const { values, positionals } = parseCommandArgs(args, { ...jsonOptions(), limit: { type: "string" } });
|
|
4598
|
+
if (positionals.length > 0) throw new CommandError(TOOLS_LINKEDIN_STRATEGY_REVIEW_LIST_USAGE);
|
|
4599
|
+
|
|
4600
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
4601
|
+
const payload = await client.linkedinStrategyReviews(accountId, compactObject({ limit: values.limit }));
|
|
4602
|
+
if (values.json) return writeJson(context.stdout, payload);
|
|
4603
|
+
|
|
4604
|
+
const rows = Array.isArray(payload?.reports) ? payload.reports : [];
|
|
4605
|
+
if (rows.length === 0) {
|
|
4606
|
+
writeLine(context.stdout, "No LinkedIn strategy review reports found.");
|
|
4607
|
+
return;
|
|
4608
|
+
}
|
|
4609
|
+
writeAlignedTable(context, ["REPORT ID", "STATUS", "STAGE", "PROFILE", "UPDATED"], rows.map(linkedinReviewReportRow));
|
|
4610
|
+
writeLine(context.stdout, "");
|
|
4611
|
+
writeLine(context.stdout, "Inspect one report with `audienti tools linkedin-strategy-review show <rprt_id>`.");
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4614
|
+
async function toolsLinkedinStrategyReviewCreate(args, context, { accountOverride } = {}) {
|
|
4615
|
+
const { values, positionals } = parseCommandArgs(args, { ...jsonOptions(), url: { type: "string" } });
|
|
4616
|
+
if (positionals.length > 0 || !values.url) throw new CommandError(TOOLS_LINKEDIN_STRATEGY_REVIEW_CREATE_USAGE);
|
|
4617
|
+
|
|
4618
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
4619
|
+
const payload = await client.createLinkedinStrategyReview(accountId, { linkedin_url: values.url });
|
|
4620
|
+
if (values.json) return writeJson(context.stdout, payload);
|
|
4621
|
+
|
|
4622
|
+
renderLinkedinReviewStatus(payload, context, { title: "LinkedIn strategy review queued" });
|
|
4623
|
+
const reportId = payload?.report?.prefix_id;
|
|
4624
|
+
if (reportId) writeLine(context.stdout, `Run \`audienti tools linkedin-strategy-review show ${reportId}\` to check progress.`);
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4627
|
+
async function toolsLinkedinStrategyReviewShow(args, context, { accountOverride } = {}) {
|
|
4628
|
+
const { values, positionals } = parseCommandArgs(args, jsonOptions());
|
|
4629
|
+
if (positionals.length !== 1) throw new CommandError(TOOLS_LINKEDIN_STRATEGY_REVIEW_SHOW_USAGE);
|
|
4630
|
+
|
|
4631
|
+
const { client, accountId } = await requireAccountContext(context, { accountOverride });
|
|
4632
|
+
const payload = await client.linkedinStrategyReview(accountId, positionals[0]);
|
|
4633
|
+
if (values.json) return writeJson(context.stdout, payload);
|
|
4634
|
+
|
|
4635
|
+
renderLinkedinReviewStatus(payload, context, { title: "LinkedIn strategy review" });
|
|
4636
|
+
const content = payload?.content?.payload || {};
|
|
4637
|
+
if (Object.keys(content).length === 0) {
|
|
4638
|
+
writeLine(context.stdout, "");
|
|
4639
|
+
writeLine(context.stdout, "No report content is available yet.");
|
|
4640
|
+
return;
|
|
4641
|
+
}
|
|
4642
|
+
writeLine(context.stdout, "");
|
|
4643
|
+
writeLine(context.stdout, "Use --json for the full report content.");
|
|
4644
|
+
}
|
|
4645
|
+
|
|
4584
4646
|
async function operatorQueue(args, context, { accountOverride } = {}) {
|
|
4585
4647
|
const { values, positionals } = parseCommandArgs(args, operatorFilterOptions(operatorPaginationOptions()));
|
|
4586
4648
|
if (positionals.length > 0) throw new CommandError("Usage: audienti operator queue [--json] [filters] [--account <acct_id>]");
|
|
@@ -11659,6 +11721,48 @@ const HELP_TOPICS = new Map([
|
|
|
11659
11721
|
" PATCH /api/v1/accounts/:account_id/tasks/bulk_update.json"
|
|
11660
11722
|
].join("\n")],
|
|
11661
11723
|
|
|
11724
|
+
["tools linkedin-strategy-review list", [
|
|
11725
|
+
"Usage:",
|
|
11726
|
+
` ${TOOLS_LINKEDIN_STRATEGY_REVIEW_LIST_USAGE.slice("Usage: ".length)}`,
|
|
11727
|
+
"",
|
|
11728
|
+
"Status: implemented",
|
|
11729
|
+
"",
|
|
11730
|
+
"Purpose:",
|
|
11731
|
+
" List recent LinkedIn strategy review reports for the active account, newest first.",
|
|
11732
|
+
"",
|
|
11733
|
+
"API:",
|
|
11734
|
+
" GET /api/v1/accounts/:account_id/tools/linkedin-strategy-review/reports.json"
|
|
11735
|
+
].join("\n")],
|
|
11736
|
+
|
|
11737
|
+
["tools linkedin-strategy-review create", [
|
|
11738
|
+
"Usage:",
|
|
11739
|
+
` ${TOOLS_LINKEDIN_STRATEGY_REVIEW_CREATE_USAGE.slice("Usage: ".length)}`,
|
|
11740
|
+
"",
|
|
11741
|
+
"Status: implemented",
|
|
11742
|
+
"",
|
|
11743
|
+
"Purpose:",
|
|
11744
|
+
" Queue a LinkedIn strategy review for a person profile, like the Tools page.",
|
|
11745
|
+
"",
|
|
11746
|
+
"Input shape:",
|
|
11747
|
+
" url: LinkedIn person profile URL (post and company URLs are refused)",
|
|
11748
|
+
"",
|
|
11749
|
+
"API:",
|
|
11750
|
+
" POST /api/v1/accounts/:account_id/tools/linkedin-strategy-review/reports.json"
|
|
11751
|
+
].join("\n")],
|
|
11752
|
+
|
|
11753
|
+
["tools linkedin-strategy-review show", [
|
|
11754
|
+
"Usage:",
|
|
11755
|
+
` ${TOOLS_LINKEDIN_STRATEGY_REVIEW_SHOW_USAGE.slice("Usage: ".length)}`,
|
|
11756
|
+
"",
|
|
11757
|
+
"Status: implemented",
|
|
11758
|
+
"",
|
|
11759
|
+
"Purpose:",
|
|
11760
|
+
" Show one LinkedIn strategy review's status; --json includes the report content.",
|
|
11761
|
+
"",
|
|
11762
|
+
"API:",
|
|
11763
|
+
" GET /api/v1/accounts/:account_id/tools/linkedin-strategy-review/reports/:id.json"
|
|
11764
|
+
].join("\n")],
|
|
11765
|
+
|
|
11662
11766
|
["tools linkedin-strategy-review delete", [
|
|
11663
11767
|
"Usage:",
|
|
11664
11768
|
` ${TOOLS_LINKEDIN_STRATEGY_REVIEW_DELETE_USAGE.slice("Usage: ".length)}`,
|
|
@@ -13137,6 +13241,9 @@ const HELP_TOPICS = new Map([
|
|
|
13137
13241
|
" audienti tools linkedin-review reports [--limit <n>] [--json]",
|
|
13138
13242
|
" audienti tools linkedin-review show <rprt_id> [--json]",
|
|
13139
13243
|
" audienti tools linkedin-review status <rprt_id> [--json]",
|
|
13244
|
+
" audienti tools linkedin-strategy-review list [--limit <n>] [--json]",
|
|
13245
|
+
" audienti tools linkedin-strategy-review create --url <linkedin_profile_url> [--json]",
|
|
13246
|
+
" audienti tools linkedin-strategy-review show <rprt_id> [--json]",
|
|
13140
13247
|
" audienti tools linkedin-strategy-review delete <rprt_id> --confirm <yes|true|Y|y> [--json]",
|
|
13141
13248
|
"",
|
|
13142
13249
|
"Status: implemented",
|
|
@@ -13149,6 +13256,9 @@ const HELP_TOPICS = new Map([
|
|
|
13149
13256
|
" audienti tools linkedin-review reports List recent LinkedIn Review reports for the active account.",
|
|
13150
13257
|
" audienti tools linkedin-review show View the completed report content in the terminal.",
|
|
13151
13258
|
" audienti tools linkedin-review status Show the current report stage and run status.",
|
|
13259
|
+
" audienti tools linkedin-strategy-review list List recent LinkedIn strategy review reports.",
|
|
13260
|
+
" audienti tools linkedin-strategy-review create Queue a LinkedIn strategy review for a person profile.",
|
|
13261
|
+
" audienti tools linkedin-strategy-review show Show one strategy review's status and content.",
|
|
13152
13262
|
" audienti tools linkedin-strategy-review delete Delete one LinkedIn strategy review report."
|
|
13153
13263
|
].join("\n")],
|
|
13154
13264
|
|