@geoly-ai/social-hub-cli 0.1.4 → 0.1.6
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 +27 -0
- package/dist/cmd-manifest.json +16 -2
- package/dist/cmd-manifest.test.js +2 -0
- package/dist/cmd-manifest.test.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +179 -13
- package/dist/index.js.map +1 -1
- package/dist/register-extensions.d.ts.map +1 -1
- package/dist/register-extensions.js +2 -2
- package/dist/register-extensions.js.map +1 -1
- package/dist/register-ops.d.ts.map +1 -1
- package/dist/register-ops.js +23 -0
- package/dist/register-ops.js.map +1 -1
- package/dist/update-check.d.ts +5 -0
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +19 -11
- package/dist/update-check.js.map +1 -1
- package/dist/update-check.test.js +43 -1
- package/dist/update-check.test.js.map +1 -1
- package/package.json +1 -1
- package/skills/manifest.json +7 -2
- package/skills/social-hub-admin/SKILL.md +4 -1
- package/skills/social-hub-calendar-jobs/SKILL.md +4 -4
- package/skills/social-hub-cli/SKILL.md +8 -1
- package/skills/social-hub-cli/evals/evals.json +15 -3
- package/skills/social-hub-events-observability/SKILL.md +25 -5
- package/skills/social-hub-intelligence/SKILL.md +4 -5
- package/skills/social-hub-openclaw-context/SKILL.md +20 -10
- package/skills/social-hub-ops-runtime/SKILL.md +10 -0
- package/skills/social-hub-posts/SKILL.md +18 -3
- package/skills/social-hub-posts/evals/evals.json +7 -15
- package/skills/social-hub-publishing/SKILL.md +41 -55
- package/skills/social-hub-publishing/evals/evals.json +16 -0
- package/skills/social-hub-shared/SKILL.md +37 -1
- package/skills/social-hub-shared/evals/evals.json +15 -0
- package/skills/social-hub-subreddit-pools/SKILL.md +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ 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.6] - 2026-06-04
|
|
8
|
+
|
|
9
|
+
Post Performance repost-link fields and CLI skill/help alignment.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `reddit create-snapshot`, `reddit update`, and `reddit batch-upsert` help examples now document `firstRepostLink` / `secondRepostLink`.
|
|
13
|
+
- bundled `social-hub-posts` skill documents repost-link create/update/batch-upsert payloads.
|
|
14
|
+
|
|
15
|
+
## [0.1.5] - 2026-06-03
|
|
16
|
+
|
|
17
|
+
npm registry update check with agent upgrade hints; brand-first and persona-aware bundled skills.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- brand-first publishing scope, persona-aware pools, cli update check
|
|
21
|
+
- persona-aware subreddit candidates and diversity selection
|
|
22
|
+
- extend system library fields and import dataset
|
|
23
|
+
- server-side filters, refresh run logs, CLI/SDK sync
|
|
24
|
+
- sanctions update/delete and blocklist UI on RiskCenter
|
|
25
|
+
- move subreddit blocklists to system level
|
|
26
|
+
- status-snapshot externalRef idempotency and CLI cmd manifest
|
|
27
|
+
- add system persona library and account personaId linking
|
|
28
|
+
- reddit --aggregate/--all 分页,stats --range 365|all;SDK 补聚合与 offset 参数
|
|
29
|
+
- reddit list/list-full/stats 支持 --brand;SDK 增加 brandId;skills 对齐系统级品牌
|
|
30
|
+
- team subreddit blocklists and style-mark CLI set
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- auto-detect managed dirs for skills update/remove
|
|
7
34
|
## [0.1.4] - 2026-06-03
|
|
8
35
|
|
|
9
36
|
Persona-aware pool queries (--persona-aware, --tier, --include-debug), updated openclaw-context CLI skill, and subreddit candidate diversity fields.
|
package/dist/cmd-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-06-
|
|
3
|
-
"cliVersion": "0.1.
|
|
2
|
+
"generatedAt": "2026-06-04T07:26:49.318Z",
|
|
3
|
+
"cliVersion": "0.1.6",
|
|
4
4
|
"commands": [
|
|
5
5
|
"accounts",
|
|
6
6
|
"accounts brand-bindings",
|
|
@@ -208,7 +208,21 @@
|
|
|
208
208
|
"plans cancel",
|
|
209
209
|
"plans create",
|
|
210
210
|
"plans list",
|
|
211
|
+
"pools",
|
|
212
|
+
"pools aliases-create",
|
|
213
|
+
"pools aliases-delete",
|
|
214
|
+
"pools aliases-list",
|
|
215
|
+
"pools aliases-update",
|
|
216
|
+
"pools catalog-create",
|
|
217
|
+
"pools catalog-delete",
|
|
218
|
+
"pools catalog-list",
|
|
219
|
+
"pools catalog-update",
|
|
220
|
+
"pools tier-rules-create",
|
|
221
|
+
"pools tier-rules-delete",
|
|
222
|
+
"pools tier-rules-list",
|
|
223
|
+
"pools tier-rules-update",
|
|
211
224
|
"query",
|
|
225
|
+
"query account-pool-context",
|
|
212
226
|
"query account-pools",
|
|
213
227
|
"query subreddit-candidates",
|
|
214
228
|
"reddit",
|
|
@@ -21,6 +21,8 @@ describe("cmd-manifest", () => {
|
|
|
21
21
|
expect(paths).toContain("compliance sanctions-create");
|
|
22
22
|
expect(paths).toContain("compliance sanctions-update");
|
|
23
23
|
expect(paths).toContain("compliance sanctions-delete");
|
|
24
|
+
expect(paths).toContain("pools catalog-list");
|
|
25
|
+
expect(paths).toContain("query account-pool-context");
|
|
24
26
|
});
|
|
25
27
|
it("buildCmdManifest includes all registered leaf paths", () => {
|
|
26
28
|
const manifest = buildCmdManifest(program);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-manifest.test.js","sourceRoot":"","sources":["../src/cmd-manifest.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAA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C,SAAS,CAAC,aAAa,CAAC,CAAC;IACzC,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;AAyBpC,QAAA,MAAM,OAAO,SAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC,QAAA,MAAM,OAAO,SAAgB,CAAC;AAw5F9B,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -259,13 +259,15 @@ calendar
|
|
|
259
259
|
.command("list")
|
|
260
260
|
.description("GET /calendar-entries")
|
|
261
261
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
262
|
-
.option("--
|
|
262
|
+
.option("--brand <uuid>", "brandId 过滤(推荐)")
|
|
263
|
+
.option("--campaign <uuid>", "campaignId 过滤(legacy)")
|
|
263
264
|
.option("--status <st>", "scheduled | running | succeeded | …")
|
|
264
265
|
.option("--from <iso>", "from 时间 ISO")
|
|
265
266
|
.option("--to <iso>", "to 时间 ISO")
|
|
266
267
|
.option("-n, --limit <n>", "limit", "50")
|
|
267
268
|
.action(async (opts) => {
|
|
268
269
|
const res = await requireClient().listCalendarEntries(opts.team, {
|
|
270
|
+
brandId: opts.brand,
|
|
269
271
|
campaignId: opts.campaign,
|
|
270
272
|
status: opts.status,
|
|
271
273
|
from: opts.from,
|
|
@@ -328,7 +330,7 @@ reddit
|
|
|
328
330
|
.command("create-snapshot")
|
|
329
331
|
.description("POST /reddit-post-snapshots(手工补录)")
|
|
330
332
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
331
|
-
.requiredOption("-j, --json <json>", "
|
|
333
|
+
.requiredOption("-j, --json <json>", '{"permalink":"...","subreddit":"...","score":0,"commentsCount":0,"firstRepostLink":null,"secondRepostLink":null}')
|
|
332
334
|
.action(async (opts) => {
|
|
333
335
|
let body;
|
|
334
336
|
try {
|
|
@@ -423,9 +425,15 @@ drafts
|
|
|
423
425
|
.command("list")
|
|
424
426
|
.description("GET /content-drafts")
|
|
425
427
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
428
|
+
.option("--brand <uuid>", "brandId 过滤(推荐)")
|
|
429
|
+
.option("--campaign <uuid>", "campaignId 过滤(legacy)")
|
|
426
430
|
.option("-n, --limit <n>", "limit", "50")
|
|
427
431
|
.action(async (opts) => {
|
|
428
|
-
const res = await requireClient().listContentDrafts(opts.team,
|
|
432
|
+
const res = await requireClient().listContentDrafts(opts.team, {
|
|
433
|
+
limit: Number(opts.limit),
|
|
434
|
+
brandId: opts.brand,
|
|
435
|
+
campaignId: opts.campaign,
|
|
436
|
+
});
|
|
429
437
|
console.log(JSON.stringify(res, null, 2));
|
|
430
438
|
});
|
|
431
439
|
const reports = program.command("reports").description("报告库");
|
|
@@ -472,7 +480,8 @@ accounts
|
|
|
472
480
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
473
481
|
.option("--status <st>", "warming | active | …")
|
|
474
482
|
.option("--platform <p>", "平台")
|
|
475
|
-
.option("--
|
|
483
|
+
.option("--brand <uuid>", "brandId 过滤(推荐)")
|
|
484
|
+
.option("--campaign <uuid>", "campaignId 过滤(legacy)")
|
|
476
485
|
.option("--persona <uuid>", "personaId")
|
|
477
486
|
.option("--category <cat>", "人设分类")
|
|
478
487
|
.option("-n, --limit <n>", "limit", "50")
|
|
@@ -481,6 +490,7 @@ accounts
|
|
|
481
490
|
limit: Number(opts.limit),
|
|
482
491
|
status: opts.status,
|
|
483
492
|
platform: opts.platform,
|
|
493
|
+
brandId: opts.brand,
|
|
484
494
|
campaignId: opts.campaign,
|
|
485
495
|
personaId: opts.persona,
|
|
486
496
|
category: opts.category,
|
|
@@ -637,9 +647,12 @@ personas
|
|
|
637
647
|
await requireClient().deleteSystemPersona(opts.persona);
|
|
638
648
|
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
639
649
|
});
|
|
640
|
-
const campaigns = program
|
|
650
|
+
const campaigns = program
|
|
651
|
+
.command("campaigns")
|
|
652
|
+
.description("LEGACY 活动 Campaign(新品牌建模用 brands system-*)");
|
|
641
653
|
campaigns
|
|
642
654
|
.command("list")
|
|
655
|
+
.description("LEGACY list campaigns")
|
|
643
656
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
644
657
|
.option("--brand <uuid>", "brandId")
|
|
645
658
|
.action(async (opts) => {
|
|
@@ -650,6 +663,7 @@ campaigns
|
|
|
650
663
|
});
|
|
651
664
|
campaigns
|
|
652
665
|
.command("create")
|
|
666
|
+
.description("LEGACY create campaign(新流程不要作为品牌入口)")
|
|
653
667
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
654
668
|
.requiredOption("-j, --json <json>", "{ brandId, name, startsAt?, endsAt? }")
|
|
655
669
|
.action(async (opts) => {
|
|
@@ -669,9 +683,11 @@ const plans = program.command("plans").description("发布计划");
|
|
|
669
683
|
plans
|
|
670
684
|
.command("list")
|
|
671
685
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
672
|
-
.option("--
|
|
686
|
+
.option("--brand <uuid>", "brandId 过滤(推荐)")
|
|
687
|
+
.option("--campaign <uuid>", "campaignId 过滤(legacy)")
|
|
673
688
|
.action(async (opts) => {
|
|
674
689
|
const res = await requireClient().listPublishingPlans(opts.team, {
|
|
690
|
+
brandId: opts.brand,
|
|
675
691
|
campaignId: opts.campaign,
|
|
676
692
|
});
|
|
677
693
|
console.log(JSON.stringify(res, null, 2));
|
|
@@ -746,7 +762,7 @@ drafts
|
|
|
746
762
|
.command("create")
|
|
747
763
|
.description("POST /content-drafts")
|
|
748
764
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
749
|
-
.requiredOption("-j, --json <json>",
|
|
765
|
+
.requiredOption("-j, --json <json>", '{ brandId, title, body, campaignId? }')
|
|
750
766
|
.action(async (opts) => {
|
|
751
767
|
let body;
|
|
752
768
|
try {
|
|
@@ -1162,6 +1178,152 @@ agentTeams
|
|
|
1162
1178
|
});
|
|
1163
1179
|
});
|
|
1164
1180
|
// --- intelligence (subreddit-intelligence) ---
|
|
1181
|
+
const pools = program.command("pools").description("运营板块池:目录、别名、准入规则");
|
|
1182
|
+
pools
|
|
1183
|
+
.command("catalog-list")
|
|
1184
|
+
.description("GET .../subreddit-pools/catalog")
|
|
1185
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1186
|
+
.option("--status <s>", "active|paused|archived")
|
|
1187
|
+
.option("--industry-key <key>", "industryKey filter")
|
|
1188
|
+
.option("--pool-kind <kind>", "pet|common|industry|brand|other")
|
|
1189
|
+
.option("-n, --limit <n>", "limit", "50")
|
|
1190
|
+
.option("--offset <n>", "offset", "0")
|
|
1191
|
+
.action(async (opts) => {
|
|
1192
|
+
const res = await requireClient().listSubredditPoolsCatalog(opts.team, {
|
|
1193
|
+
status: opts.status,
|
|
1194
|
+
industryKey: opts.industryKey,
|
|
1195
|
+
poolKind: opts.poolKind,
|
|
1196
|
+
limit: Number(opts.limit),
|
|
1197
|
+
offset: Number(opts.offset),
|
|
1198
|
+
});
|
|
1199
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1200
|
+
});
|
|
1201
|
+
pools
|
|
1202
|
+
.command("catalog-create")
|
|
1203
|
+
.description("POST .../subreddit-pools/catalog")
|
|
1204
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1205
|
+
.requiredOption("-j, --json <json>", "pool catalog body")
|
|
1206
|
+
.action(async (opts) => {
|
|
1207
|
+
const body = JSON.parse(opts.json);
|
|
1208
|
+
const res = await requireClient().createSubredditPool(opts.team, body);
|
|
1209
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1210
|
+
});
|
|
1211
|
+
pools
|
|
1212
|
+
.command("catalog-update")
|
|
1213
|
+
.description("PATCH .../subreddit-pools/catalog/:poolId")
|
|
1214
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1215
|
+
.requiredOption("--id <uuid>", "Pool UUID")
|
|
1216
|
+
.requiredOption("-j, --json <json>", "update body")
|
|
1217
|
+
.action(async (opts) => {
|
|
1218
|
+
const body = JSON.parse(opts.json);
|
|
1219
|
+
const res = await requireClient().updateSubredditPool(opts.team, opts.id, body);
|
|
1220
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1221
|
+
});
|
|
1222
|
+
pools
|
|
1223
|
+
.command("catalog-delete")
|
|
1224
|
+
.description("DELETE .../subreddit-pools/catalog/:poolId (archive)")
|
|
1225
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1226
|
+
.requiredOption("--id <uuid>", "Pool UUID")
|
|
1227
|
+
.action(async (opts) => {
|
|
1228
|
+
const res = await requireClient().deleteSubredditPool(opts.team, opts.id);
|
|
1229
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1230
|
+
});
|
|
1231
|
+
pools
|
|
1232
|
+
.command("aliases-list")
|
|
1233
|
+
.description("GET .../subreddit-pools/aliases")
|
|
1234
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1235
|
+
.option("--alias-ref <ref>", "aliasRef filter")
|
|
1236
|
+
.option("--industry-key <key>", "industryKey filter")
|
|
1237
|
+
.option("-n, --limit <n>", "limit", "50")
|
|
1238
|
+
.option("--offset <n>", "offset", "0")
|
|
1239
|
+
.action(async (opts) => {
|
|
1240
|
+
const res = await requireClient().listPoolAliases(opts.team, {
|
|
1241
|
+
aliasRef: opts.aliasRef,
|
|
1242
|
+
industryKey: opts.industryKey,
|
|
1243
|
+
limit: Number(opts.limit),
|
|
1244
|
+
offset: Number(opts.offset),
|
|
1245
|
+
});
|
|
1246
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1247
|
+
});
|
|
1248
|
+
pools
|
|
1249
|
+
.command("aliases-create")
|
|
1250
|
+
.description("POST .../subreddit-pools/aliases")
|
|
1251
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1252
|
+
.requiredOption("-j, --json <json>", "alias body")
|
|
1253
|
+
.action(async (opts) => {
|
|
1254
|
+
const body = JSON.parse(opts.json);
|
|
1255
|
+
const res = await requireClient().createPoolAlias(opts.team, body);
|
|
1256
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1257
|
+
});
|
|
1258
|
+
pools
|
|
1259
|
+
.command("aliases-update")
|
|
1260
|
+
.description("PATCH .../subreddit-pools/aliases/:aliasId")
|
|
1261
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1262
|
+
.requiredOption("--id <uuid>", "Alias UUID")
|
|
1263
|
+
.requiredOption("-j, --json <json>", "update body")
|
|
1264
|
+
.action(async (opts) => {
|
|
1265
|
+
const body = JSON.parse(opts.json);
|
|
1266
|
+
const res = await requireClient().updatePoolAlias(opts.team, opts.id, body);
|
|
1267
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1268
|
+
});
|
|
1269
|
+
pools
|
|
1270
|
+
.command("aliases-delete")
|
|
1271
|
+
.description("DELETE .../subreddit-pools/aliases/:aliasId (archive)")
|
|
1272
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1273
|
+
.requiredOption("--id <uuid>", "Alias UUID")
|
|
1274
|
+
.action(async (opts) => {
|
|
1275
|
+
const res = await requireClient().deletePoolAlias(opts.team, opts.id);
|
|
1276
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1277
|
+
});
|
|
1278
|
+
pools
|
|
1279
|
+
.command("tier-rules-list")
|
|
1280
|
+
.description("GET .../subreddit-pools/tier-rules")
|
|
1281
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1282
|
+
.option("--tier <tier>", "S0|S1|S2|S3")
|
|
1283
|
+
.option("--enabled <bool>", "true|false")
|
|
1284
|
+
.option("-n, --limit <n>", "limit", "50")
|
|
1285
|
+
.option("--offset <n>", "offset", "0")
|
|
1286
|
+
.action(async (opts) => {
|
|
1287
|
+
const res = await requireClient().listSubredditPoolTierRules(opts.team, {
|
|
1288
|
+
tier: opts.tier,
|
|
1289
|
+
enabled: opts.enabled === undefined
|
|
1290
|
+
? undefined
|
|
1291
|
+
: opts.enabled === "true" || opts.enabled === "1",
|
|
1292
|
+
limit: Number(opts.limit),
|
|
1293
|
+
offset: Number(opts.offset),
|
|
1294
|
+
});
|
|
1295
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1296
|
+
});
|
|
1297
|
+
pools
|
|
1298
|
+
.command("tier-rules-create")
|
|
1299
|
+
.description("POST .../subreddit-pools/tier-rules")
|
|
1300
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1301
|
+
.requiredOption("-j, --json <json>", "tier rule body")
|
|
1302
|
+
.action(async (opts) => {
|
|
1303
|
+
const body = JSON.parse(opts.json);
|
|
1304
|
+
const res = await requireClient().createSubredditPoolTierRule(opts.team, body);
|
|
1305
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1306
|
+
});
|
|
1307
|
+
pools
|
|
1308
|
+
.command("tier-rules-update")
|
|
1309
|
+
.description("PATCH .../subreddit-pools/tier-rules/:ruleId")
|
|
1310
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1311
|
+
.requiredOption("--id <uuid>", "Rule UUID")
|
|
1312
|
+
.requiredOption("-j, --json <json>", "update body")
|
|
1313
|
+
.action(async (opts) => {
|
|
1314
|
+
const body = JSON.parse(opts.json);
|
|
1315
|
+
const res = await requireClient().updateSubredditPoolTierRule(opts.team, opts.id, body);
|
|
1316
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1317
|
+
});
|
|
1318
|
+
pools
|
|
1319
|
+
.command("tier-rules-delete")
|
|
1320
|
+
.description("DELETE .../subreddit-pools/tier-rules/:ruleId")
|
|
1321
|
+
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1322
|
+
.requiredOption("--id <uuid>", "Rule UUID")
|
|
1323
|
+
.action(async (opts) => {
|
|
1324
|
+
const res = await requireClient().deleteSubredditPoolTierRule(opts.team, opts.id);
|
|
1325
|
+
console.log(JSON.stringify(res, null, 2));
|
|
1326
|
+
});
|
|
1165
1327
|
const intel = program.command("intelligence").description("板块情报与 KOL 挖掘");
|
|
1166
1328
|
intel
|
|
1167
1329
|
.command("industry-pools-list")
|
|
@@ -1674,9 +1836,11 @@ notifChannels
|
|
|
1674
1836
|
.command("list")
|
|
1675
1837
|
.description("GET /notification-channels")
|
|
1676
1838
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1677
|
-
.option("--
|
|
1839
|
+
.option("--brand <uuid>", "brandId 过滤(推荐)")
|
|
1840
|
+
.option("--campaign <uuid>", "campaignId 过滤(legacy)")
|
|
1678
1841
|
.action(async (opts) => {
|
|
1679
1842
|
const res = await requireClient().listNotificationChannels(opts.team, {
|
|
1843
|
+
brandId: opts.brand,
|
|
1680
1844
|
campaignId: opts.campaign,
|
|
1681
1845
|
});
|
|
1682
1846
|
console.log(JSON.stringify(res, null, 2));
|
|
@@ -1685,7 +1849,7 @@ notifChannels
|
|
|
1685
1849
|
.command("create")
|
|
1686
1850
|
.description("POST /notification-channels")
|
|
1687
1851
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
1688
|
-
.requiredOption("-j, --json <json>", "{ provider, externalId, minRole?, campaignId? }")
|
|
1852
|
+
.requiredOption("-j, --json <json>", "{ provider, externalId, minRole?, brandId?, campaignId? }")
|
|
1689
1853
|
.action(async (opts) => {
|
|
1690
1854
|
const body = JSON.parse(opts.json);
|
|
1691
1855
|
const res = await requireClient().createNotificationChannel(opts.team, body);
|
|
@@ -2290,10 +2454,12 @@ accountPersonas
|
|
|
2290
2454
|
console.log(JSON.stringify(res, null, 2));
|
|
2291
2455
|
});
|
|
2292
2456
|
// --- campaigns accounts ---
|
|
2293
|
-
const campaignAccounts = campaigns
|
|
2457
|
+
const campaignAccounts = campaigns
|
|
2458
|
+
.command("accounts")
|
|
2459
|
+
.description("LEGACY Campaign 账号分配(新流程用 accounts brand-bindings)");
|
|
2294
2460
|
campaignAccounts
|
|
2295
2461
|
.command("list")
|
|
2296
|
-
.description("GET /campaigns/:campaignId/accounts")
|
|
2462
|
+
.description("LEGACY GET /campaigns/:campaignId/accounts")
|
|
2297
2463
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
2298
2464
|
.requiredOption("-c, --campaign <campaignId>", "Campaign UUID")
|
|
2299
2465
|
.action(async (opts) => {
|
|
@@ -2302,7 +2468,7 @@ campaignAccounts
|
|
|
2302
2468
|
});
|
|
2303
2469
|
campaignAccounts
|
|
2304
2470
|
.command("assign")
|
|
2305
|
-
.description("POST /campaigns/:campaignId/accounts")
|
|
2471
|
+
.description("LEGACY POST /campaigns/:campaignId/accounts")
|
|
2306
2472
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
2307
2473
|
.requiredOption("-c, --campaign <campaignId>", "Campaign UUID")
|
|
2308
2474
|
.requiredOption("-a, --account <socialAccountId>", "社交账号 UUID")
|
|
@@ -2316,7 +2482,7 @@ campaignAccounts
|
|
|
2316
2482
|
});
|
|
2317
2483
|
campaignAccounts
|
|
2318
2484
|
.command("remove")
|
|
2319
|
-
.description("DELETE /campaigns/:campaignId/accounts/:socialAccountId")
|
|
2485
|
+
.description("LEGACY DELETE /campaigns/:campaignId/accounts/:socialAccountId")
|
|
2320
2486
|
.requiredOption("-t, --team <teamId>", "Team UUID")
|
|
2321
2487
|
.requiredOption("-c, --campaign <campaignId>", "Campaign UUID")
|
|
2322
2488
|
.requiredOption("-a, --account <socialAccountId>", "社交账号 UUID")
|