@geoly-ai/social-hub-cli 0.1.33 → 0.1.35
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 +21 -0
- package/dist/cmd-manifest.json +4 -2
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/config.test.js +1 -1
- package/dist/config.test.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -48
- package/dist/index.js.map +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +17 -0
- package/dist/output.js.map +1 -1
- package/package.json +2 -2
- package/skills/manifest.json +1 -1
- package/skills/social-hub-accounts/SKILL.md +4 -0
- package/skills/social-hub-admin/SKILL.md +4 -0
- package/skills/social-hub-cli/SKILL.md +1 -1
- package/skills/social-hub-cli/evals/evals.json +2 -2
- package/skills/social-hub-intelligence/SKILL.md +24 -24
- package/skills/social-hub-shared/SKILL.md +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to `@geoly-ai/social-hub-cli` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Release workflow: `pnpm release:cli` → `pnpm publish:cli`.
|
|
6
6
|
|
|
7
|
+
## [0.1.35] - 2026-06-17
|
|
8
|
+
|
|
9
|
+
personas style-guide-get/set (system-level persona default style guide)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- personas style-guide-get/set + skill docs (P5)
|
|
14
|
+
|
|
15
|
+
## [0.1.34] - 2026-06-17
|
|
16
|
+
|
|
17
|
+
板块情报命令转系统级(去 -t);默认 API 改 redd.eclick-geo.com;连接失败提示改 apiUrl
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- hint to fix apiUrl on connection failure
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- point default API + docs/skills to redd.eclick-geo.com (domain moved)
|
|
26
|
+
- drop -t from system-level intel commands + skills (phase 5)
|
|
27
|
+
|
|
7
28
|
## [0.1.33] - 2026-06-16
|
|
8
29
|
|
|
9
30
|
### Added
|
package/dist/cmd-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-06-
|
|
3
|
-
"cliVersion": "0.1.
|
|
2
|
+
"generatedAt": "2026-06-17T15:41:24.430Z",
|
|
3
|
+
"cliVersion": "0.1.35",
|
|
4
4
|
"commands": [
|
|
5
5
|
"accounts",
|
|
6
6
|
"accounts brand-bindings",
|
|
@@ -219,6 +219,8 @@
|
|
|
219
219
|
"permissions matrix",
|
|
220
220
|
"permissions-update",
|
|
221
221
|
"personas",
|
|
222
|
+
"personas style-guide-get",
|
|
223
|
+
"personas style-guide-set",
|
|
222
224
|
"personas system-create",
|
|
223
225
|
"personas system-delete",
|
|
224
226
|
"personas system-get",
|
package/dist/config.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type SocialHubCliConfig = {
|
|
|
6
6
|
teamId?: string;
|
|
7
7
|
};
|
|
8
8
|
/** Default Hub API when env/config file omit apiUrl. */
|
|
9
|
-
export declare const DEFAULT_API_URL = "https://
|
|
9
|
+
export declare const DEFAULT_API_URL = "https://redd.eclick-geo.com/api";
|
|
10
10
|
export declare function getConfigPath(): string;
|
|
11
11
|
export declare function loadConfigFile(): SocialHubCliConfig;
|
|
12
12
|
export declare function saveConfigFile(config: SocialHubCliConfig): void;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,eAAe,oCAAoC,CAAC;AAOjE,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,cAAc,IAAI,kBAAkB,CAenD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAY/D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,SAAI,GAAG,MAAM,CAIzE;AAED,qCAAqC;AACrC,wBAAgB,gBAAgB,IAAI;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE;QACP,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;QACnC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAChC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KACjC,CAAC;CACH,CAoCA;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACjC,kBAAkB,CAWpB"}
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync, } from "
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
/** Default Hub API when env/config file omit apiUrl. */
|
|
5
|
-
export const DEFAULT_API_URL = "https://
|
|
5
|
+
export const DEFAULT_API_URL = "https://redd.eclick-geo.com/api";
|
|
6
6
|
const CONFIG_DIR = process.env.SOCIAL_HUB_CONFIG_DIR ??
|
|
7
7
|
join(process.env.XDG_CONFIG_HOME ?? join(homedir(), ".config"), "social-hub");
|
|
8
8
|
const CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAEjE,MAAM,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,qBAAqB;IACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,YAAY,CAAC,CAAC;AAChF,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAEpD,MAAM,UAAU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ACpC,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM;oBAC7B,CAAC,CAAC,MAAM;oBACR,CAAC,CAAC,MAAM;YACZ,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB;gBACpC,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,CAAC,MAAM;oBACX,CAAC,CAAC,MAAM;oBACR,CAAC,CAAC,MAAM;SACb;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAAkC;IAElC,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;IACjC,MAAM,IAAI,GAAuB,EAAE,GAAG,OAAO,EAAE,CAAC;IAChD,KAAK,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAU,EAAE,CAAC;QACvE,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;YACjC,IAAI,KAAK;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;;gBACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/config.test.js
CHANGED
|
@@ -2,7 +2,7 @@ import { describe, expect, it } from "vitest";
|
|
|
2
2
|
import { DEFAULT_API_URL, maskSecret, mergeConfigPatch } from "./config.js";
|
|
3
3
|
describe("config", () => {
|
|
4
4
|
it("defaults apiUrl to production hub", () => {
|
|
5
|
-
expect(DEFAULT_API_URL).toBe("https://
|
|
5
|
+
expect(DEFAULT_API_URL).toBe("https://redd.eclick-geo.com/api");
|
|
6
6
|
});
|
|
7
7
|
it("masks api keys", () => {
|
|
8
8
|
expect(maskSecret("sk_live_abcdefghijklmnop")).toMatch(/^sk_l…/);
|
package/dist/config.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.test.js","sourceRoot":"","sources":["../src/config.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE5E,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"config.test.js","sourceRoot":"","sources":["../src/config.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE5E,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACxB,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,IAAI,GAAG,gBAAgB,CAAC;YAC5B,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,qBAAqB;SAC9B,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0BpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AA+nH9B,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -680,6 +680,41 @@ personas
|
|
|
680
680
|
await requireClient().deleteSystemPersona(opts.persona);
|
|
681
681
|
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
682
682
|
});
|
|
683
|
+
personas
|
|
684
|
+
.command("style-guide-get")
|
|
685
|
+
.description("GET /system/personas/:id(打印 defaultStyleGuide)")
|
|
686
|
+
.requiredOption("--id <personaId>", "Persona UUID")
|
|
687
|
+
.action(async (opts) => {
|
|
688
|
+
const res = await requireClient().getSystemPersona(opts.id);
|
|
689
|
+
console.log(JSON.stringify(res, null, 2));
|
|
690
|
+
});
|
|
691
|
+
personas
|
|
692
|
+
.command("style-guide-set")
|
|
693
|
+
.description("PUT /system/personas/:id/style-guide")
|
|
694
|
+
.requiredOption("--id <personaId>", "Persona UUID")
|
|
695
|
+
.option("-j, --json <json>", "defaultStyleGuide 对象 JSON")
|
|
696
|
+
.option("--clear", "清空默认风格指南(写 null)")
|
|
697
|
+
.action(async (opts) => {
|
|
698
|
+
if (opts.clear) {
|
|
699
|
+
const res = await requireClient().setSystemPersonaStyleGuide(opts.id, null);
|
|
700
|
+
console.log(JSON.stringify(res, null, 2));
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
if (!opts.json) {
|
|
704
|
+
console.error("必须提供 -j / --json 或 --clear");
|
|
705
|
+
process.exit(1);
|
|
706
|
+
}
|
|
707
|
+
let guide;
|
|
708
|
+
try {
|
|
709
|
+
guide = JSON.parse(opts.json);
|
|
710
|
+
}
|
|
711
|
+
catch {
|
|
712
|
+
console.error("Invalid -j / --json");
|
|
713
|
+
process.exit(1);
|
|
714
|
+
}
|
|
715
|
+
const res = await requireClient().setSystemPersonaStyleGuide(opts.id, guide);
|
|
716
|
+
console.log(JSON.stringify(res, null, 2));
|
|
717
|
+
});
|
|
683
718
|
const campaigns = program
|
|
684
719
|
.command("campaigns")
|
|
685
720
|
.description("LEGACY 活动 Campaign(新品牌建模用 brands system-*)");
|
|
@@ -1641,12 +1676,11 @@ intel
|
|
|
1641
1676
|
intel
|
|
1642
1677
|
.command("watchlists-list")
|
|
1643
1678
|
.description("GET .../subreddit-intelligence/watchlists")
|
|
1644
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1645
1679
|
.option("--campaign <uuid>", "campaignId")
|
|
1646
1680
|
.option("-n, --limit <n>", "limit", "100")
|
|
1647
1681
|
.option("--offset <n>", "offset", "0")
|
|
1648
1682
|
.action(async (opts) => {
|
|
1649
|
-
const res = await requireClient().listSubredditWatchlists(
|
|
1683
|
+
const res = await requireClient().listSubredditWatchlists({
|
|
1650
1684
|
campaignId: opts.campaign,
|
|
1651
1685
|
limit: Number(opts.limit),
|
|
1652
1686
|
offset: Number(opts.offset),
|
|
@@ -1656,43 +1690,39 @@ intel
|
|
|
1656
1690
|
intel
|
|
1657
1691
|
.command("watchlists-create")
|
|
1658
1692
|
.description("POST .../subreddit-intelligence/watchlists")
|
|
1659
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1660
1693
|
.requiredOption("-j, --json <json>", "{ subreddit, tags? }")
|
|
1661
1694
|
.action(async (opts) => {
|
|
1662
1695
|
const body = JSON.parse(opts.json);
|
|
1663
|
-
const res = await requireClient().createSubredditWatchlist(
|
|
1696
|
+
const res = await requireClient().createSubredditWatchlist(body);
|
|
1664
1697
|
console.log(JSON.stringify(res, null, 2));
|
|
1665
1698
|
});
|
|
1666
1699
|
intel
|
|
1667
1700
|
.command("watchlists-update")
|
|
1668
1701
|
.description("PATCH .../subreddit-intelligence/watchlists/:id")
|
|
1669
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1670
1702
|
.requiredOption("--id <uuid>", "Watchlist UUID")
|
|
1671
1703
|
.requiredOption("-j, --json <json>", "update body")
|
|
1672
1704
|
.action(async (opts) => {
|
|
1673
1705
|
const body = JSON.parse(opts.json);
|
|
1674
|
-
const res = await requireClient().updateSubredditWatchlist(opts.
|
|
1706
|
+
const res = await requireClient().updateSubredditWatchlist(opts.id, body);
|
|
1675
1707
|
console.log(JSON.stringify(res, null, 2));
|
|
1676
1708
|
});
|
|
1677
1709
|
intel
|
|
1678
1710
|
.command("watchlists-delete")
|
|
1679
1711
|
.description("DELETE .../subreddit-intelligence/watchlists/:id")
|
|
1680
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1681
1712
|
.requiredOption("--id <uuid>", "Watchlist UUID")
|
|
1682
1713
|
.action(async (opts) => {
|
|
1683
|
-
await requireClient().deleteSubredditWatchlist(opts.
|
|
1714
|
+
await requireClient().deleteSubredditWatchlist(opts.id);
|
|
1684
1715
|
console.log("OK");
|
|
1685
1716
|
});
|
|
1686
1717
|
intel
|
|
1687
1718
|
.command("hot-posts")
|
|
1688
1719
|
.description("GET .../subreddit-intelligence/hot-posts")
|
|
1689
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1690
1720
|
.option("--subreddit <name>", "板块名称")
|
|
1691
1721
|
.option("--sort <by>", "score|comments|capturedAt|upvoteRatio", "score")
|
|
1692
1722
|
.option("-n, --limit <n>", "limit", "100")
|
|
1693
1723
|
.option("--offset <n>", "offset", "0")
|
|
1694
1724
|
.action(async (opts) => {
|
|
1695
|
-
const res = await requireClient().listHotPosts(
|
|
1725
|
+
const res = await requireClient().listHotPosts({
|
|
1696
1726
|
subreddit: opts.subreddit,
|
|
1697
1727
|
sortBy: opts.sort,
|
|
1698
1728
|
limit: Number(opts.limit),
|
|
@@ -1703,21 +1733,19 @@ intel
|
|
|
1703
1733
|
intel
|
|
1704
1734
|
.command("hot-posts-create")
|
|
1705
1735
|
.description("POST .../subreddit-intelligence/hot-posts")
|
|
1706
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1707
1736
|
.requiredOption("-j, --json <json>", "hot post body")
|
|
1708
1737
|
.action(async (opts) => {
|
|
1709
1738
|
const body = JSON.parse(opts.json);
|
|
1710
|
-
const res = await requireClient().createHotPost(
|
|
1739
|
+
const res = await requireClient().createHotPost(body);
|
|
1711
1740
|
console.log(JSON.stringify(res, null, 2));
|
|
1712
1741
|
});
|
|
1713
1742
|
intel
|
|
1714
1743
|
.command("hot-posts-export")
|
|
1715
1744
|
.description("GET .../subreddit-intelligence/hot-posts/export.csv")
|
|
1716
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1717
1745
|
.option("--subreddit <name>", "板块名称")
|
|
1718
1746
|
.option("-n, --limit <n>", "limit", "500")
|
|
1719
1747
|
.action(async (opts) => {
|
|
1720
|
-
const csv = await requireClient().exportHotPostsCsv(
|
|
1748
|
+
const csv = await requireClient().exportHotPostsCsv({
|
|
1721
1749
|
subreddit: opts.subreddit,
|
|
1722
1750
|
limit: Number(opts.limit),
|
|
1723
1751
|
});
|
|
@@ -1726,7 +1754,6 @@ intel
|
|
|
1726
1754
|
intel
|
|
1727
1755
|
.command("kol-intents")
|
|
1728
1756
|
.description("GET .../subreddit-intelligence/kol-intents")
|
|
1729
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1730
1757
|
.option("--campaign <uuid>", "campaignId")
|
|
1731
1758
|
.option("--status <status>", "interested|contacting|connected|not_interested")
|
|
1732
1759
|
.option("--sort <by>", "createdAt|status|rating|karma|activity|lastActive", "createdAt")
|
|
@@ -1734,7 +1761,7 @@ intel
|
|
|
1734
1761
|
.option("-n, --limit <n>", "limit", "100")
|
|
1735
1762
|
.option("--offset <n>", "offset", "0")
|
|
1736
1763
|
.action(async (opts) => {
|
|
1737
|
-
const res = await requireClient().listKolIntents(
|
|
1764
|
+
const res = await requireClient().listKolIntents({
|
|
1738
1765
|
campaignId: opts.campaign,
|
|
1739
1766
|
status: opts.status,
|
|
1740
1767
|
sortBy: opts.sort,
|
|
@@ -1747,11 +1774,10 @@ intel
|
|
|
1747
1774
|
intel
|
|
1748
1775
|
.command("kol-intents-create")
|
|
1749
1776
|
.description("POST .../subreddit-intelligence/kol-intents")
|
|
1750
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1751
1777
|
.requiredOption("-j, --json <json>", "kol intent body")
|
|
1752
1778
|
.action(async (opts) => {
|
|
1753
1779
|
const body = JSON.parse(opts.json);
|
|
1754
|
-
const res = await requireClient().createKolIntent(
|
|
1780
|
+
const res = await requireClient().createKolIntent(body);
|
|
1755
1781
|
console.log(JSON.stringify(res, null, 2));
|
|
1756
1782
|
});
|
|
1757
1783
|
intel
|
|
@@ -1816,13 +1842,12 @@ intel
|
|
|
1816
1842
|
intel
|
|
1817
1843
|
.command("runs-list")
|
|
1818
1844
|
.description("GET .../subreddit-intelligence/runs")
|
|
1819
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1820
1845
|
.option("--dimension <d>", "industry|keywords|tier")
|
|
1821
1846
|
.option("--status <s>", "queued|running|succeeded|failed")
|
|
1822
1847
|
.option("-n, --limit <n>", "limit", "50")
|
|
1823
1848
|
.option("--offset <n>", "offset", "0")
|
|
1824
1849
|
.action(async (opts) => {
|
|
1825
|
-
const res = await requireClient().listIntelRuns(
|
|
1850
|
+
const res = await requireClient().listIntelRuns({
|
|
1826
1851
|
dimension: opts.dimension,
|
|
1827
1852
|
status: opts.status,
|
|
1828
1853
|
limit: Number(opts.limit),
|
|
@@ -1833,12 +1858,11 @@ intel
|
|
|
1833
1858
|
intel
|
|
1834
1859
|
.command("kol-profiles-list")
|
|
1835
1860
|
.description("GET .../subreddit-intelligence/kol-profiles")
|
|
1836
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1837
1861
|
.option("--platform <p>", "reddit")
|
|
1838
1862
|
.option("-n, --limit <n>", "limit", "50")
|
|
1839
1863
|
.option("--offset <n>", "offset", "0")
|
|
1840
1864
|
.action(async (opts) => {
|
|
1841
|
-
const res = await requireClient().listKolProfiles(
|
|
1865
|
+
const res = await requireClient().listKolProfiles({
|
|
1842
1866
|
platform: opts.platform,
|
|
1843
1867
|
limit: Number(opts.limit),
|
|
1844
1868
|
offset: Number(opts.offset),
|
|
@@ -1848,116 +1872,104 @@ intel
|
|
|
1848
1872
|
intel
|
|
1849
1873
|
.command("kol-profiles-get")
|
|
1850
1874
|
.description("GET .../subreddit-intelligence/kol-profiles/:id")
|
|
1851
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1852
1875
|
.requiredOption("--id <uuid>", "KOL profile UUID")
|
|
1853
1876
|
.action(async (opts) => {
|
|
1854
|
-
const res = await requireClient().getKolProfile(opts.
|
|
1877
|
+
const res = await requireClient().getKolProfile(opts.id);
|
|
1855
1878
|
console.log(JSON.stringify(res, null, 2));
|
|
1856
1879
|
});
|
|
1857
1880
|
intel
|
|
1858
1881
|
.command("fetch-by-industry")
|
|
1859
1882
|
.description("POST .../subreddit-intelligence/hot-posts/fetch-by-industry")
|
|
1860
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1861
1883
|
.requiredOption("-j, --json <json>", "fetch body")
|
|
1862
1884
|
.action(async (opts) => {
|
|
1863
1885
|
const body = JSON.parse(opts.json);
|
|
1864
|
-
const res = await requireClient().fetchHotPostsByIndustry(
|
|
1886
|
+
const res = await requireClient().fetchHotPostsByIndustry(body);
|
|
1865
1887
|
console.log(JSON.stringify(res, null, 2));
|
|
1866
1888
|
});
|
|
1867
1889
|
intel
|
|
1868
1890
|
.command("fetch-by-tier")
|
|
1869
1891
|
.description("POST .../subreddit-intelligence/hot-posts/fetch-by-tier")
|
|
1870
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1871
1892
|
.requiredOption("-j, --json <json>", "fetch body")
|
|
1872
1893
|
.action(async (opts) => {
|
|
1873
1894
|
const body = JSON.parse(opts.json);
|
|
1874
|
-
const res = await requireClient().fetchHotPostsByTier(
|
|
1895
|
+
const res = await requireClient().fetchHotPostsByTier(body);
|
|
1875
1896
|
console.log(JSON.stringify(res, null, 2));
|
|
1876
1897
|
});
|
|
1877
1898
|
intel
|
|
1878
1899
|
.command("fetch-by-keywords")
|
|
1879
1900
|
.description("POST .../subreddit-intelligence/insights/fetch-by-keywords")
|
|
1880
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1881
1901
|
.requiredOption("-j, --json <json>", "fetch body")
|
|
1882
1902
|
.action(async (opts) => {
|
|
1883
1903
|
const body = JSON.parse(opts.json);
|
|
1884
|
-
const res = await requireClient().fetchInsightsByKeywords(
|
|
1904
|
+
const res = await requireClient().fetchInsightsByKeywords(body);
|
|
1885
1905
|
console.log(JSON.stringify(res, null, 2));
|
|
1886
1906
|
});
|
|
1887
1907
|
intel
|
|
1888
1908
|
.command("brand-mention-radar")
|
|
1889
1909
|
.description("POST .../subreddit-intelligence/insights/brand-mention-radar")
|
|
1890
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1891
1910
|
.requiredOption("-j, --json <json>", "{ keywords, minScore?, minComments? }")
|
|
1892
1911
|
.action(async (opts) => {
|
|
1893
1912
|
const body = JSON.parse(opts.json);
|
|
1894
|
-
const res = await requireClient().getBrandMentionRadar(
|
|
1913
|
+
const res = await requireClient().getBrandMentionRadar(body);
|
|
1895
1914
|
console.log(JSON.stringify(res, null, 2));
|
|
1896
1915
|
});
|
|
1897
1916
|
intel
|
|
1898
1917
|
.command("opportunity-map")
|
|
1899
1918
|
.description("POST .../subreddit-intelligence/insights/opportunity-map")
|
|
1900
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1901
1919
|
.requiredOption("-j, --json <json>", "{ keywords, minScore?, minComments? }")
|
|
1902
1920
|
.action(async (opts) => {
|
|
1903
1921
|
const body = JSON.parse(opts.json);
|
|
1904
|
-
const res = await requireClient().getOpportunityMap(
|
|
1922
|
+
const res = await requireClient().getOpportunityMap(body);
|
|
1905
1923
|
console.log(JSON.stringify(res, null, 2));
|
|
1906
1924
|
});
|
|
1907
1925
|
intel
|
|
1908
1926
|
.command("sov")
|
|
1909
1927
|
.description("POST .../subreddit-intelligence/insights/sov")
|
|
1910
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1911
1928
|
.requiredOption("-j, --json <json>", "{ brandKeywords, competitorKeywords, minScore?, minComments? }")
|
|
1912
1929
|
.action(async (opts) => {
|
|
1913
1930
|
const body = JSON.parse(opts.json);
|
|
1914
|
-
const res = await requireClient().getInsightsSov(
|
|
1931
|
+
const res = await requireClient().getInsightsSov(body);
|
|
1915
1932
|
console.log(JSON.stringify(res, null, 2));
|
|
1916
1933
|
});
|
|
1917
1934
|
intel
|
|
1918
1935
|
.command("sentiment-intent")
|
|
1919
1936
|
.description("GET .../subreddit-intelligence/insights/sentiment-intent")
|
|
1920
|
-
.
|
|
1921
|
-
|
|
1922
|
-
const res = await requireClient().getSentimentIntent(opts.team);
|
|
1937
|
+
.action(async () => {
|
|
1938
|
+
const res = await requireClient().getSentimentIntent();
|
|
1923
1939
|
console.log(JSON.stringify(res, null, 2));
|
|
1924
1940
|
});
|
|
1925
1941
|
intel
|
|
1926
1942
|
.command("campaign-lift")
|
|
1927
1943
|
.description("POST .../subreddit-intelligence/insights/campaign-lift")
|
|
1928
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1929
1944
|
.requiredOption("-j, --json <json>", "{ keywords, campaignStartAt, campaignEndAt, windowDays?, minScore?, minComments? }")
|
|
1930
1945
|
.action(async (opts) => {
|
|
1931
1946
|
const body = JSON.parse(opts.json);
|
|
1932
|
-
const res = await requireClient().getCampaignLift(
|
|
1947
|
+
const res = await requireClient().getCampaignLift(body);
|
|
1933
1948
|
console.log(JSON.stringify(res, null, 2));
|
|
1934
1949
|
});
|
|
1935
1950
|
intel
|
|
1936
1951
|
.command("voc-summary")
|
|
1937
1952
|
.description("POST .../subreddit-intelligence/insights/voc-summary")
|
|
1938
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1939
1953
|
.requiredOption("-j, --json <json>", "{ keywords: string[], brandId? }")
|
|
1940
1954
|
.action(async (opts) => {
|
|
1941
1955
|
const body = JSON.parse(opts.json);
|
|
1942
|
-
const res = await requireClient().getSubredditVocSummary(
|
|
1956
|
+
const res = await requireClient().getSubredditVocSummary(body);
|
|
1943
1957
|
console.log(JSON.stringify(res, null, 2));
|
|
1944
1958
|
});
|
|
1945
1959
|
intel
|
|
1946
1960
|
.command("snapshot-latest")
|
|
1947
1961
|
.description("GET .../subreddit-intelligence/insights/snapshot-latest")
|
|
1948
|
-
.
|
|
1949
|
-
|
|
1950
|
-
const res = await requireClient().getLatestInsightSnapshot(opts.team);
|
|
1962
|
+
.action(async () => {
|
|
1963
|
+
const res = await requireClient().getLatestInsightSnapshot();
|
|
1951
1964
|
console.log(JSON.stringify(res, null, 2));
|
|
1952
1965
|
});
|
|
1953
1966
|
intel
|
|
1954
1967
|
.command("snapshot-save")
|
|
1955
1968
|
.description("POST .../subreddit-intelligence/insights/snapshot")
|
|
1956
|
-
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1957
1969
|
.requiredOption("-j, --json <json>", "{ payload: { ... } }")
|
|
1958
1970
|
.action(async (opts) => {
|
|
1959
1971
|
const body = JSON.parse(opts.json);
|
|
1960
|
-
const res = await requireClient().saveInsightSnapshot(
|
|
1972
|
+
const res = await requireClient().saveInsightSnapshot(body);
|
|
1961
1973
|
console.log(JSON.stringify(res, null, 2));
|
|
1962
1974
|
});
|
|
1963
1975
|
// --- users ---
|