@geoly-ai/social-hub-sdk 0.0.51 → 0.0.53
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/dist/index.d.ts +299 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +112 -1
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +120 -1
- package/dist/index.test.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -190,9 +190,99 @@ export type UpdateContentDraftBody = {
|
|
|
190
190
|
title?: string;
|
|
191
191
|
body?: string;
|
|
192
192
|
status?: string;
|
|
193
|
+
/**
|
|
194
|
+
* 目标板块(迁移 0136)。省略 = 不改;`null` = 清空;字符串 = 设置(服务端规范化)。
|
|
195
|
+
* 属内容身份 → **会** bump 草稿版本(旧内部审核 / 客户批准因此失效)。
|
|
196
|
+
*/
|
|
197
|
+
subreddit?: string | null;
|
|
198
|
+
/**
|
|
199
|
+
* 写作参考 / 归因备注 URL(迁移 0136,原前端字段名 `targetUrl`)。
|
|
200
|
+
* ⚠️ **不参与发布执行** —— 系统没有 Reddit link post 概念,执行只冻结 title+body。
|
|
201
|
+
* 不属内容身份 → 单独改它**不** bump 版本、不使既有审核/批准失效。
|
|
202
|
+
*/
|
|
203
|
+
referenceUrl?: string | null;
|
|
193
204
|
/** Optimistic concurrency: last-loaded version; a mismatch is rejected 409. */
|
|
194
205
|
expectedVersion?: number;
|
|
195
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* 本次审核实际采用的**作者关系**(说话人是谁),与 `commentType`(结构位置)正交。
|
|
209
|
+
*
|
|
210
|
+
* ⚠️ 一律**服务端派生**。调用方给不了这个值,只能给 {@link ContentReviewAuthorRelationHint};
|
|
211
|
+
* Hub 按「实际发布账号 handle × 原帖 permalink × Hub 侧帖子快照作者」比对得出。
|
|
212
|
+
*/
|
|
213
|
+
export type ContentReviewAuthorRelation = "post_author" | "other" | "unknown";
|
|
214
|
+
/**
|
|
215
|
+
* 调用方可给的**非权威提示**。它不是身份声明,也不会被回显为审核结论:
|
|
216
|
+
* 证据永远覆盖 hint(声称 `other` 但证据显示是作者 → 仍派生 `post_author`);
|
|
217
|
+
* 声称 `post_author` 而证据证伪 → 422 `AUTHOR_RELATION_MISMATCH`(见
|
|
218
|
+
* {@link isAuthorRelationMismatchError})。
|
|
219
|
+
*/
|
|
220
|
+
export type ContentReviewAuthorRelationHint = "post_author" | "other";
|
|
221
|
+
/**
|
|
222
|
+
* 派生依据。`verified_snapshot`=比对了 Hub 侧帖子快照;`verified_live`=预留(未实现);
|
|
223
|
+
* `mismatch`=显式声称 post_author 但证据证伪(同步 API 走 422,成功响应通常见不到);
|
|
224
|
+
* `unavailable`=无账号/无 permalink/无快照/作者已删/快照与本次 thread 绑定校验不过 →
|
|
225
|
+
* `authorRelation=unknown`,按普通基线审核(既不 block 也不给任何 post_author 校准)。
|
|
226
|
+
*/
|
|
227
|
+
export type ContentReviewAuthorRelationEvidence = "verified_snapshot" | "verified_live" | "mismatch" | "unavailable";
|
|
228
|
+
export type ContentReviewThreadInput = {
|
|
229
|
+
subreddit: string;
|
|
230
|
+
postTitle: string;
|
|
231
|
+
postBody?: string;
|
|
232
|
+
/** `commentType: "reply"` 时必填。 */
|
|
233
|
+
parentComment?: string;
|
|
234
|
+
topComments?: string[];
|
|
235
|
+
subredditToneHint?: string;
|
|
236
|
+
/**
|
|
237
|
+
* 所审原帖 permalink —— 作者关系轴的**唯一校验入口**(不给 → `authorRelation=unknown`)。
|
|
238
|
+
* 服务端 canonicalize 后查帖子快照取作者,并校验快照 subreddit/title 与本次 thread 一致。
|
|
239
|
+
* SDK 不做 URL 校验,原样透传。
|
|
240
|
+
*/
|
|
241
|
+
threadPermalink?: string;
|
|
242
|
+
};
|
|
243
|
+
export type ContentReviewRequestInput = {
|
|
244
|
+
/** 账号 UUID 或 handle;省略=persona-less(ContentOnly)审核。 */
|
|
245
|
+
accountId?: string;
|
|
246
|
+
/** 仅一致性校验;无 accountId 时禁止携带。 */
|
|
247
|
+
personaId?: string;
|
|
248
|
+
brandContext?: Record<string, unknown>;
|
|
249
|
+
draft: string;
|
|
250
|
+
/** 结构位置(调用方声明);与作者关系是两根正交的轴。 */
|
|
251
|
+
commentType: "top_level" | "reply";
|
|
252
|
+
/** 非权威提示;服务端证据永远覆盖它。见 {@link ContentReviewAuthorRelationHint}。 */
|
|
253
|
+
authorRelationHint?: ContentReviewAuthorRelationHint;
|
|
254
|
+
/** 账号阶段(影响长度/克制度与阈值收紧);不确定就省略,不要传任意字符串。 */
|
|
255
|
+
stage?: "静默期" | "互动期" | "活跃期";
|
|
256
|
+
thread: ContentReviewThreadInput;
|
|
257
|
+
rewrite?: boolean;
|
|
258
|
+
/** 第几次送审;服务端强制上限 2(防重写循环)。 */
|
|
259
|
+
attempt?: 1 | 2;
|
|
260
|
+
traceId?: string;
|
|
261
|
+
};
|
|
262
|
+
export type ContentReviewResponse = {
|
|
263
|
+
reviewId: string;
|
|
264
|
+
executionStatus: "completed" | "degraded";
|
|
265
|
+
verdict: "pass" | "revise" | "block";
|
|
266
|
+
/**
|
|
267
|
+
* 服务端派生的权威作者关系。**绝不是**调用方 `authorRelationHint` 的回显 ——
|
|
268
|
+
* 回显会让「自称 OP」看起来像被系统承认。
|
|
269
|
+
*/
|
|
270
|
+
authorRelation: ContentReviewAuthorRelation;
|
|
271
|
+
authorRelationEvidence: ContentReviewAuthorRelationEvidence;
|
|
272
|
+
score: number;
|
|
273
|
+
modelScore: number | null;
|
|
274
|
+
dimensions: Record<string, {
|
|
275
|
+
score: number;
|
|
276
|
+
issues: string[];
|
|
277
|
+
}> | null;
|
|
278
|
+
optimized: string | null;
|
|
279
|
+
rationale: string | null;
|
|
280
|
+
reviewModel: string;
|
|
281
|
+
rubricVersion: string;
|
|
282
|
+
thresholdSnapshot: Record<string, unknown>;
|
|
283
|
+
latencyMs: number;
|
|
284
|
+
degradedReason: string | null;
|
|
285
|
+
};
|
|
196
286
|
/** 审核目标状态(mirrors contracts REVIEW_TARGET_STATUSES;SDK 不 hard-dep contracts)。 */
|
|
197
287
|
export type ReviewTargetStatusLike = "pending" | "running" | "passed" | "needs_revision" | "blocked" | "degraded" | "superseded";
|
|
198
288
|
export type ListReviewTargetsParams = {
|
|
@@ -285,12 +375,28 @@ export type ScheduleCommentDraftBody = {
|
|
|
285
375
|
};
|
|
286
376
|
export type DeliveryBundleStatusLike = "open" | "closed" | "cancelled";
|
|
287
377
|
/** 客户面列 bundle:brandId 服务端**必填**(客户按 brand 收窄);SDK 类型强制。 */
|
|
378
|
+
/**
|
|
379
|
+
* `cursor` 与 `offset` **互斥**,用可辨识联合在**编译期**就拒掉错误组合 —— 服务端也会
|
|
380
|
+
* 400,但把它留到运行时等于让调用方先发一次注定失败的请求。
|
|
381
|
+
*/
|
|
288
382
|
export type ListClientDeliveryBundlesParams = {
|
|
289
383
|
brandId: string;
|
|
290
384
|
status?: DeliveryBundleStatusLike;
|
|
291
385
|
limit?: number;
|
|
386
|
+
} & ({
|
|
387
|
+
/**
|
|
388
|
+
* keyset 游标 —— 上一次响应的 `nextCursor` 原样回传。对调用方是**不透明字符串**:
|
|
389
|
+
* 不要解析或构造,也不要换了 brandId/status 之后复用(游标绑定过滤条件指纹,会 400)。
|
|
390
|
+
*/
|
|
391
|
+
cursor: string;
|
|
392
|
+
offset?: never;
|
|
393
|
+
} | {
|
|
394
|
+
cursor?: undefined;
|
|
395
|
+
/**
|
|
396
|
+
* @deprecated 用 `cursor`。offset 分页在并发写入下会重复/跳条(服务端已改 keyset)。
|
|
397
|
+
*/
|
|
292
398
|
offset?: number;
|
|
293
|
-
};
|
|
399
|
+
});
|
|
294
400
|
/** staff 建 bundle。 */
|
|
295
401
|
export type CreateClientDeliveryBundleBody = {
|
|
296
402
|
brandId: string;
|
|
@@ -393,6 +499,77 @@ export type ListSubredditWatchlistsParams = {
|
|
|
393
499
|
/** 按板块名精确查归属(r/ 前缀可省,大小写不敏感)。 */
|
|
394
500
|
subreddit?: string;
|
|
395
501
|
};
|
|
502
|
+
export type ListSubredditMonitorsParams = {
|
|
503
|
+
limit?: number;
|
|
504
|
+
offset?: number;
|
|
505
|
+
/** 缺省 = 全部(含已停止的);服务端只认 "true"/"false" 字符串,方法内负责转换。 */
|
|
506
|
+
enabled?: boolean;
|
|
507
|
+
watchlistId?: string;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* 监听配置行(POST 启用的返回)。时间字段一律 `string`(HTTP JSON 里是 ISO 串,
|
|
511
|
+
* SDK 不代为 `new Date()`,免得调用方拿到「有时 Date 有时 string」的混合类型)。
|
|
512
|
+
*/
|
|
513
|
+
export type SubredditMonitorConfig = {
|
|
514
|
+
id: string;
|
|
515
|
+
watchlistId: string;
|
|
516
|
+
subreddit: string;
|
|
517
|
+
enabled: boolean;
|
|
518
|
+
sort: string;
|
|
519
|
+
fetchLimit: number;
|
|
520
|
+
createdAt: string;
|
|
521
|
+
updatedAt: string;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* 监听列表的一行 = 配置行 + 三个派生水位字段。
|
|
525
|
+
* ⚠️ 这三个字段**只在列表读口有**,POST 启用返回的是裸配置行(见 SubredditMonitorConfig)。
|
|
526
|
+
*/
|
|
527
|
+
export type SubredditMonitorItem = SubredditMonitorConfig & {
|
|
528
|
+
/** 该监听最近一次观察到帖子的时间;从未观察到 → null。 */
|
|
529
|
+
lastObservedAt: string | null;
|
|
530
|
+
/** 最近一轮 run 中该监听**首次观察**到的帖子数。 */
|
|
531
|
+
newPostsInLatestRun: number;
|
|
532
|
+
/** 已观察但尚未进入任何送达报告的积压数(报告水位落后的信号)。 */
|
|
533
|
+
unreportedCount: number;
|
|
534
|
+
};
|
|
535
|
+
export type SubredditMonitorRunStatus = "pending" | "claimed" | "collecting" | "reporting" | "completed" | "degraded" | "failed";
|
|
536
|
+
/** run 列表/摘要读口的形状:**不含** fetchDiagnostics / reportPayload 两个大字段。 */
|
|
537
|
+
export type SubredditMonitorRunSummary = {
|
|
538
|
+
id: string;
|
|
539
|
+
scheduleKey: "cron" | "manual";
|
|
540
|
+
windowStart: string;
|
|
541
|
+
windowEnd: string;
|
|
542
|
+
status: SubredditMonitorRunStatus;
|
|
543
|
+
attempts: number;
|
|
544
|
+
monitorCount: number;
|
|
545
|
+
succeededMonitorCount: number;
|
|
546
|
+
failedMonitorCount: number;
|
|
547
|
+
observedPostCount: number;
|
|
548
|
+
newPostCount: number;
|
|
549
|
+
errorCode: string | null;
|
|
550
|
+
createdAt: string;
|
|
551
|
+
completedAt: string | null;
|
|
552
|
+
};
|
|
553
|
+
/** run 详情:摘要 + 只有单条读口才投影的 jsonb 大字段与各阶段时间戳。 */
|
|
554
|
+
export type SubredditMonitorRunDetail = SubredditMonitorRunSummary & {
|
|
555
|
+
fetchDiagnostics: Record<string, unknown> | null;
|
|
556
|
+
reportPayload: Record<string, unknown> | null;
|
|
557
|
+
error: string | null;
|
|
558
|
+
fetchStartedAt: string | null;
|
|
559
|
+
fetchCompletedAt: string | null;
|
|
560
|
+
reportCompletedAt: string | null;
|
|
561
|
+
};
|
|
562
|
+
/** run 列表是 **keyset 分页**(无 offset):游标 = 上一页最后一行的 windowStart + id。 */
|
|
563
|
+
export type ListSubredditMonitorRunsParams = {
|
|
564
|
+
limit?: number;
|
|
565
|
+
status?: SubredditMonitorRunStatus;
|
|
566
|
+
beforeWindowStart?: string;
|
|
567
|
+
beforeId?: string;
|
|
568
|
+
};
|
|
569
|
+
export type EnableSubredditMonitorBody = {
|
|
570
|
+
watchlistId: string;
|
|
571
|
+
fetchLimit?: number;
|
|
572
|
+
};
|
|
396
573
|
export type ListHotPostsParams = {
|
|
397
574
|
limit?: number;
|
|
398
575
|
offset?: number;
|
|
@@ -617,6 +794,16 @@ export declare class SocialHubHttpError extends Error {
|
|
|
617
794
|
body?: string;
|
|
618
795
|
});
|
|
619
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* POST /content-review 的 422 稳定错误码:调用方显式声称 `authorRelationHint:"post_author"`,
|
|
799
|
+
* 但 Hub 侧帖子快照证明发布账号不是该帖作者。
|
|
800
|
+
*
|
|
801
|
+
* 这是**硬失败**,不是降级:LLM 一次都不会调用,服务端另落一条安全审计。
|
|
802
|
+
* 换一个「能验证的」permalink 重试属于 anchor shopping,不要这么做。
|
|
803
|
+
*/
|
|
804
|
+
export declare const CONTENT_REVIEW_AUTHOR_RELATION_MISMATCH: "AUTHOR_RELATION_MISMATCH";
|
|
805
|
+
/** 该错误是否为 {@link CONTENT_REVIEW_AUTHOR_RELATION_MISMATCH}(422 + 稳定 code)。 */
|
|
806
|
+
export declare function isAuthorRelationMismatchError(error: unknown): error is SocialHubHttpError;
|
|
620
807
|
export declare class SocialHubClient {
|
|
621
808
|
private readonly opts;
|
|
622
809
|
constructor(opts: SocialHubClientOptions);
|
|
@@ -796,16 +983,31 @@ export declare class SocialHubClient {
|
|
|
796
983
|
cancelScheduledJob(teamId: string, jobId: string): Promise<unknown>;
|
|
797
984
|
listContentDrafts(teamId: string, params?: {
|
|
798
985
|
limit?: number;
|
|
986
|
+
offset?: number;
|
|
799
987
|
brandId?: string;
|
|
800
988
|
campaignId?: string;
|
|
989
|
+
status?: string | string[];
|
|
990
|
+
/** 目标板块过滤(单值或数组;数组按逗号拼,同字段内 OR)。 */
|
|
991
|
+
subreddit?: string | string[];
|
|
992
|
+
search?: string;
|
|
801
993
|
} | number): Promise<{
|
|
802
994
|
items: unknown[];
|
|
995
|
+
total: number;
|
|
996
|
+
limit: number;
|
|
997
|
+
offset: number;
|
|
803
998
|
}>;
|
|
804
999
|
createContentDraft(teamId: string, body: {
|
|
805
1000
|
brandId: string;
|
|
806
1001
|
campaignId?: string;
|
|
807
1002
|
title: string;
|
|
808
1003
|
body: string;
|
|
1004
|
+
/** 目标板块(内容语义真源);服务端规范化后落库。省略/null → NULL。 */
|
|
1005
|
+
subreddit?: string | null;
|
|
1006
|
+
/**
|
|
1007
|
+
* 写作参考 / 归因备注 URL:「这篇内容围绕哪个落地页写的」。
|
|
1008
|
+
* ⚠️ **不参与发布执行** —— 系统没有 Reddit link post 概念,执行只冻结 title+body。
|
|
1009
|
+
*/
|
|
1010
|
+
referenceUrl?: string | null;
|
|
809
1011
|
}): Promise<{
|
|
810
1012
|
id: string;
|
|
811
1013
|
}>;
|
|
@@ -866,9 +1068,13 @@ export declare class SocialHubClient {
|
|
|
866
1068
|
warning?: string;
|
|
867
1069
|
}>;
|
|
868
1070
|
private clientDeliveryBase;
|
|
869
|
-
/**
|
|
1071
|
+
/**
|
|
1072
|
+
* GET client-delivery/bundles?brandId=(必填)&status=&limit=&cursor= — 客户面 bundle 列表。
|
|
1073
|
+
* `nextCursor === null` 表示已到末页;非 null 时原样回传到下次调用的 `cursor`。
|
|
1074
|
+
*/
|
|
870
1075
|
clientDeliveryListBundles(teamId: string, params: ListClientDeliveryBundlesParams): Promise<{
|
|
871
1076
|
items: unknown[];
|
|
1077
|
+
nextCursor?: string | null;
|
|
872
1078
|
}>;
|
|
873
1079
|
/** GET client-delivery/bundles/:id — 单个 bundle(client 视图脱敏 / staff 完整)。 */
|
|
874
1080
|
clientDeliveryGetBundle(teamId: string, bundleId: string): Promise<unknown>;
|
|
@@ -1489,7 +1695,36 @@ export declare class SocialHubClient {
|
|
|
1489
1695
|
offset?: number;
|
|
1490
1696
|
}): Promise<{
|
|
1491
1697
|
items: unknown[];
|
|
1492
|
-
|
|
1698
|
+
/**
|
|
1699
|
+
* ⚠️ 0140 起**不再恒为精确值**,必须连着 `totalRelation` 一起读。
|
|
1700
|
+
* `null` = 未计算(keyword 路径)。想判断"还有没有下一页"请用 `hasMore`,
|
|
1701
|
+
* 不要写 `offset + limit >= total` —— 封顶/未知时它会误判成没有下一页。
|
|
1702
|
+
*/
|
|
1703
|
+
total: number | null;
|
|
1704
|
+
/** "eq"=精确;"gte"=实际 ≥ total(封顶 10000);"unavailable"=未计算(total 为 null)。 */
|
|
1705
|
+
totalRelation: "eq" | "gte" | "unavailable";
|
|
1706
|
+
/** 权威分页信号:由服务端多取一行得出,与 total 精度无关。 */
|
|
1707
|
+
hasMore: boolean;
|
|
1708
|
+
}>;
|
|
1709
|
+
/**
|
|
1710
|
+
* 评论样本行的**精确 count**(与 list 同一组过滤谓词,无分页、不封顶)。
|
|
1711
|
+
* ⚠️ 故意**不接受 keyword**:keyword 走全文 ILIKE,精确 count 要全表扫
|
|
1712
|
+
* (服务端契约 strict,传了直接 400);keyword 口径请用 listRedditCommentSamples
|
|
1713
|
+
* (totalRelation=unavailable)。
|
|
1714
|
+
* ⚠️ 无过滤时是全表精确 count,属昂贵读——基线用途,**禁止轮询**。
|
|
1715
|
+
* 口径是库内 reddit_comment_samples 行数,不是 Reddit 线程真实评论总数。
|
|
1716
|
+
*/
|
|
1717
|
+
countRedditCommentSamples(params?: {
|
|
1718
|
+
postId?: string;
|
|
1719
|
+
subreddit?: string;
|
|
1720
|
+
intent?: string;
|
|
1721
|
+
sentiment?: string;
|
|
1722
|
+
origin?: "hub_collector" | "import";
|
|
1723
|
+
}): Promise<{
|
|
1724
|
+
/** 精确匹配数(不封顶;恒精确,故无 relation 字段)。 */
|
|
1725
|
+
count: number;
|
|
1726
|
+
/** 采样口径恒为部分样本。 */
|
|
1727
|
+
sampleMode: "partial_sample";
|
|
1493
1728
|
}>;
|
|
1494
1729
|
dispatchRedditCommentCapture(body: {
|
|
1495
1730
|
permalinks: string[];
|
|
@@ -1625,6 +1860,52 @@ export declare class SocialHubClient {
|
|
|
1625
1860
|
ok: boolean;
|
|
1626
1861
|
}>;
|
|
1627
1862
|
deleteSubredditWatchlist(watchlistId: string): Promise<void>;
|
|
1863
|
+
listSubredditMonitors(params?: ListSubredditMonitorsParams): Promise<{
|
|
1864
|
+
items: SubredditMonitorItem[];
|
|
1865
|
+
total: number;
|
|
1866
|
+
/** 最近一轮 run(全局,一轮覆盖所有监听);从未跑过 → null。 */
|
|
1867
|
+
latestRun: SubredditMonitorRunSummary | null;
|
|
1868
|
+
limit: number;
|
|
1869
|
+
offset: number;
|
|
1870
|
+
}>;
|
|
1871
|
+
/**
|
|
1872
|
+
* 加入监听(**幂等**):同一 watchlist 已停止的会被重新启用,不新建行 ——
|
|
1873
|
+
* observation ledger 因此保留,重启后已报告过的帖子不会重复报告。
|
|
1874
|
+
*/
|
|
1875
|
+
enableSubredditMonitor(body: EnableSubredditMonitorBody): Promise<SubredditMonitorConfig>;
|
|
1876
|
+
/**
|
|
1877
|
+
* 停止监听:DELETE 语义但服务端做**软停**(enabled=false),不删 observation ledger。
|
|
1878
|
+
* 幂等 —— 本来就没在监听时返回 `{ ok: true, updated: false }`,不是 404。
|
|
1879
|
+
*/
|
|
1880
|
+
/**
|
|
1881
|
+
* 停止监听。默认是**软停**(`enabled=false`):保留观察 ledger,重新启用后已经报告过的
|
|
1882
|
+
* 帖子不会被再报一遍。
|
|
1883
|
+
*
|
|
1884
|
+
* `purge: true` 是另一个动作 —— **连历史观察一起硬删**。只有在要删掉整个 watchlist 时
|
|
1885
|
+
* 才需要:monitor 配置对 watchlist 的外键是 `ON DELETE RESTRICT`,不先 purge 就删不掉
|
|
1886
|
+
* watchlist(服务端会返回 409 并提示走这条路)。
|
|
1887
|
+
*/
|
|
1888
|
+
disableSubredditMonitor(watchlistId: string, options?: {
|
|
1889
|
+
purge?: boolean;
|
|
1890
|
+
}): Promise<{
|
|
1891
|
+
ok: boolean;
|
|
1892
|
+
updated: boolean;
|
|
1893
|
+
purged?: boolean;
|
|
1894
|
+
}>;
|
|
1895
|
+
/** run 列表:keyset 分页,翻页用上一页最后一行的 windowStart + id 当游标。 */
|
|
1896
|
+
listSubredditMonitorRuns(params?: ListSubredditMonitorRunsParams): Promise<{
|
|
1897
|
+
items: SubredditMonitorRunSummary[];
|
|
1898
|
+
hasMore: boolean;
|
|
1899
|
+
}>;
|
|
1900
|
+
/** run 详情:唯一会带回 fetchDiagnostics / reportPayload 两个大字段的读口。 */
|
|
1901
|
+
getSubredditMonitorRun(runId: string): Promise<SubredditMonitorRunDetail>;
|
|
1902
|
+
/** 手工触发一轮(202 入队)。没有任何启用中的监听时服务端返回 400,不制造空跑 run。 */
|
|
1903
|
+
runSubredditMonitors(): Promise<{
|
|
1904
|
+
status: string;
|
|
1905
|
+
monitors: number;
|
|
1906
|
+
jobId?: string;
|
|
1907
|
+
warning?: string;
|
|
1908
|
+
}>;
|
|
1628
1909
|
listHotPosts(params?: ListHotPostsParams): Promise<{
|
|
1629
1910
|
items: HotPostListItem[];
|
|
1630
1911
|
total: number;
|
|
@@ -1762,9 +2043,16 @@ export declare class SocialHubClient {
|
|
|
1762
2043
|
sessionActiveTeam(body: {
|
|
1763
2044
|
teamId: string;
|
|
1764
2045
|
}): Promise<unknown>;
|
|
2046
|
+
/**
|
|
2047
|
+
* 管理员替他人重置密码。需要**不受限的交互式 admin 会话**(role=admin 的 api_key
|
|
2048
|
+
* 不行),且不能重置自己(自助改密走 `PUT /v1/auth/password`,它校验旧密码)。
|
|
2049
|
+
*
|
|
2050
|
+
* `userId` / `email` **恰好给一个**。原来的 `teamId` 参数已删除:密码是用户级全局
|
|
2051
|
+
* 凭证,团队参数从来没有限制过影响范围,只是误导。
|
|
2052
|
+
*/
|
|
1765
2053
|
sessionSetPassword(body: {
|
|
1766
|
-
|
|
1767
|
-
|
|
2054
|
+
userId?: string;
|
|
2055
|
+
email?: string;
|
|
1768
2056
|
password: string;
|
|
1769
2057
|
}): Promise<unknown>;
|
|
1770
2058
|
sessionUpdateProfile(body: {
|
|
@@ -1912,25 +2200,13 @@ export declare class SocialHubClient {
|
|
|
1912
2200
|
/**
|
|
1913
2201
|
* 评论内容复审:独立 LLM 六维评审+服务端权威计分。
|
|
1914
2202
|
* executionStatus=degraded 时 verdict 不可作为权威判定,调用方应降级本地自审。
|
|
2203
|
+
*
|
|
2204
|
+
* 作者关系轴:响应里的 `authorRelation` / `authorRelationEvidence` 是**服务端派生**的
|
|
2205
|
+
* (见 {@link ContentReviewAuthorRelation}),请求里的 `authorRelationHint` 只是提示。
|
|
2206
|
+
* 声称 `post_author` 而证据证伪 → 422 `AUTHOR_RELATION_MISMATCH`
|
|
2207
|
+
* ({@link isAuthorRelationMismatchError})。
|
|
1915
2208
|
*/
|
|
1916
|
-
contentReview(teamId: string, body: Record<string, unknown>): Promise<
|
|
1917
|
-
reviewId: string;
|
|
1918
|
-
executionStatus: "completed" | "degraded";
|
|
1919
|
-
verdict: "pass" | "revise" | "block";
|
|
1920
|
-
score: number;
|
|
1921
|
-
modelScore: number | null;
|
|
1922
|
-
dimensions: Record<string, {
|
|
1923
|
-
score: number;
|
|
1924
|
-
issues: string[];
|
|
1925
|
-
}> | null;
|
|
1926
|
-
optimized: string | null;
|
|
1927
|
-
rationale: string | null;
|
|
1928
|
-
reviewModel: string;
|
|
1929
|
-
rubricVersion: string;
|
|
1930
|
-
thresholdSnapshot: Record<string, unknown>;
|
|
1931
|
-
latencyMs: number;
|
|
1932
|
-
degradedReason: string | null;
|
|
1933
|
-
}>;
|
|
2209
|
+
contentReview(teamId: string, body: ContentReviewRequestInput | Record<string, unknown>): Promise<ContentReviewResponse>;
|
|
1934
2210
|
/** 帖子审核(发帖前质量闸;与评论审核独立 rubric/七维/模型 key)。 */
|
|
1935
2211
|
postReview(teamId: string, body: Record<string, unknown>): Promise<{
|
|
1936
2212
|
reviewId: string;
|