@reachv2/sdk 0.3.2 → 0.3.3
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/README.md
CHANGED
|
@@ -164,7 +164,7 @@ const client = new ReachClient({
|
|
|
164
164
|
| `client.tts` | 文本转语音(synthesize/voices/history) | Server |
|
|
165
165
|
| `client.accounts` | 社媒账号矩阵(list/connect) | Server |
|
|
166
166
|
| `client.contentPlans` | **内容计划(ContentPlansResource)**:计划名 + 主题时间轴(list/create) | Server |
|
|
167
|
-
| `client.publishPlans` | **发布计划(PublishPlansResource)**:多站点分步编排,get
|
|
167
|
+
| `client.publishPlans` | **发布计划(PublishPlansResource)**:多站点分步编排,get 返回每步待审草稿,approve/reject 完成审批(list/get/approve/reject) | Server |
|
|
168
168
|
| `client.browserTemplates` | **浏览器操作模板(BrowserTemplatesResource)**:流程编排模板(list/update) | Server |
|
|
169
169
|
| `client.aiMedia` | **AI 媒体(AiMediaResource)**:视频脚本生成(script) | Server |
|
|
170
170
|
|
|
@@ -3,7 +3,8 @@ type RequestFn = <T>(method: RequestMethod, path: string, body?: unknown) => Pro
|
|
|
3
3
|
/**
|
|
4
4
|
* PublishPlans 资源 — 发布计划(多站点分步编排 + 每步待审草稿)。
|
|
5
5
|
* 端点走 Server API(/api/publish-plans/*)。
|
|
6
|
-
* 与社媒域 MCP 工具 publish_plans_list / publish_plans_get
|
|
6
|
+
* 与社媒域 MCP 工具 publish_plans_list / publish_plans_get / publish_plan_step_approve /
|
|
7
|
+
* publish_plan_step_reject 同源。
|
|
7
8
|
*/
|
|
8
9
|
export declare class PublishPlansResource {
|
|
9
10
|
private request;
|
|
@@ -12,5 +13,13 @@ export declare class PublishPlansResource {
|
|
|
12
13
|
list(): Promise<any>;
|
|
13
14
|
/** 发布计划详情:每步的生成文案(draftText)与状态 — 用于审批前展示内容 */
|
|
14
15
|
get(planId: string): Promise<any>;
|
|
16
|
+
/** 审批通过待审草稿(可选携带修改后的文案 { text }) */
|
|
17
|
+
approve(planId: string, stepId: string, opts?: {
|
|
18
|
+
text?: string;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
/** 打回待审草稿(可选 { reason }) */
|
|
21
|
+
reject(planId: string, stepId: string, opts?: {
|
|
22
|
+
reason?: string;
|
|
23
|
+
}): Promise<any>;
|
|
15
24
|
}
|
|
16
25
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* PublishPlans 资源 — 发布计划(多站点分步编排 + 每步待审草稿)。
|
|
3
3
|
* 端点走 Server API(/api/publish-plans/*)。
|
|
4
|
-
* 与社媒域 MCP 工具 publish_plans_list / publish_plans_get
|
|
4
|
+
* 与社媒域 MCP 工具 publish_plans_list / publish_plans_get / publish_plan_step_approve /
|
|
5
|
+
* publish_plan_step_reject 同源。
|
|
5
6
|
*/
|
|
6
7
|
export class PublishPlansResource {
|
|
7
8
|
constructor(request) {
|
|
@@ -15,4 +16,16 @@ export class PublishPlansResource {
|
|
|
15
16
|
get(planId) {
|
|
16
17
|
return this.request("GET", `/api/publish-plans/${planId}`);
|
|
17
18
|
}
|
|
19
|
+
/** 审批通过待审草稿(可选携带修改后的文案 { text }) */
|
|
20
|
+
approve(planId, stepId, opts = {}) {
|
|
21
|
+
return this.request("POST", `/api/publish-plans/${planId}/steps/${stepId}/approve`, {
|
|
22
|
+
text: opts.text,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/** 打回待审草稿(可选 { reason }) */
|
|
26
|
+
reject(planId, stepId, opts = {}) {
|
|
27
|
+
return this.request("POST", `/api/publish-plans/${planId}/steps/${stepId}/reject`, {
|
|
28
|
+
reason: opts.reason,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
18
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachv2/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Reach unified REST API client library for TypeScript — crm 域(AgentApi/Project/Bot/Knowledge/Channel/Conversation/Transaction/Auth/Chat/ApiKey/LightRAG/Orchestration/ScheduledTasks/Internal/Abis/Admin)+ social 域(Content/Tts/Accounts/ContentPlans 内容计划/PublishPlans 发布计划/BrowserTemplates 流程模板/AiMedia 视频脚本/Effect 效果追踪/SeoGeo SEO-GEO 矩阵/ContentRules 内容规则引擎/DataSources 数据源)+ 统一 DashboardApi(crm/social 看板)+ 统一租户成员模型(Tenants/Team/Health,G-1~G-3)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|