@sokeai/cli 1.0.113 → 1.0.114
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/package.json
CHANGED
|
@@ -66,7 +66,7 @@ soke-cli auth status --format json
|
|
|
66
66
|
```bash
|
|
67
67
|
soke-cli portal +list --page 1 --page-size 20 --format json
|
|
68
68
|
soke-cli portal +get --id PORTAL_ID --format json
|
|
69
|
-
soke-cli portal +create --title "门户标题" --dry-run --format json
|
|
69
|
+
soke-cli portal +create --title "门户标题" [--visible-all | --visible-scope-file scope.json] [--manage-scope-file manage.json] --dry-run --format json
|
|
70
70
|
soke-cli portal +nav-export --id PORTAL_ID --client mobile --lang zh --output nav.json
|
|
71
71
|
soke-cli portal +nav-validate --file nav.json --format json
|
|
72
72
|
soke-cli portal +nav-apply --id PORTAL_ID --client mobile --lang zh --file nav.json --expected-sha256 SHA256 --dry-run --format json
|
|
@@ -88,6 +88,9 @@ soke-cli portal +banner-list --id PORTAL_ID --lang zh --format json
|
|
|
88
88
|
8. Banner 更新和排序要求 `complete=true` 的完整列表;排序必须提交全部 Banner ID。
|
|
89
89
|
9. `TrainRequiredList` 开启时,摘要说明可能创建或开启培训需求看板。
|
|
90
90
|
10. 图片外链必须是无凭证 HTTPS URL;上传不显示签名或凭证。
|
|
91
|
+
11. 可见范围文件是全量替换快照,必须同时包含 `dept_list/user_list/group_list/position_list`;管理范围必须同时包含 `users/roles`。空数组表示显式清空,缺少任一数组时不得写入。
|
|
92
|
+
12. 用户权限 ID 必须使用当前组织成员 `uuid/dept_user_id`,不能用账号 `user_id` 代替。创建并设置范围按“创建 → 新 ID 更新范围 → 详情读回”执行;已创建但范围未验证时使用返回 ID 修复,不得重复创建。
|
|
93
|
+
13. 门户详情的管理范围只返回普通 `manage` 权限;默认创建者和主管理员可能持有不在列表中的 `all` 权限。除详情可证明的创建者外,缺项不得静默判定成功。
|
|
91
94
|
|
|
92
95
|
## 业务产出
|
|
93
96
|
|
|
@@ -10,7 +10,7 @@ soke-cli portal +enable --confirm ENABLE-PORTAL --dry-run --format json
|
|
|
10
10
|
soke-cli portal +list-templates --format json
|
|
11
11
|
soke-cli portal +list --page 1 --page-size 20 --keyword "关键词" --status -1 --self --format json
|
|
12
12
|
soke-cli portal +get --id PORTAL_ID --format json
|
|
13
|
-
soke-cli portal +create --title "门户标题" [--template-id TEMPLATE_ID] --dry-run --format json
|
|
13
|
+
soke-cli portal +create --title "门户标题" [--template-id TEMPLATE_ID] [--visible-all | --visible-scope-file scope.json] [--manage-scope-file manage.json] --dry-run --format json
|
|
14
14
|
soke-cli portal +update --id PORTAL_ID [--title "新标题"] [--visible-all] [--visible-scope-file scope.json] [--manage-scope-file manage.json] --dry-run --format json
|
|
15
15
|
soke-cli portal +set-appearance --id PORTAL_ID --color '#1677ff' [--logo-url HTTPS_URL | --logo-file logo.png] --dry-run --format json
|
|
16
16
|
soke-cli portal +publish --id PORTAL_ID --dry-run --format json
|
|
@@ -21,7 +21,18 @@ soke-cli portal +delete --id PORTAL_ID --confirm PORTAL_ID --dry-run --format js
|
|
|
21
21
|
|
|
22
22
|
`+status` 只查询当前认证企业,不接受 company ID。列表分页统一使用 `--page-size`(CLI 向服务端发送 `page_size`);`+list --status` 支持 `-1` 全部、`0` 已下架、`1` 已发布;`--self` 只在用户明确要求“我管理的门户”时使用。`+enable` 不可回退,确认值必须精确为 `ENABLE-PORTAL`。已发布门户必须先单独下架并验收,才能单独确认删除。
|
|
23
23
|
|
|
24
|
-
`+update` 的 `--visible-all` 与 `--visible-scope-file` 互斥;关闭全员可见不能只传 false
|
|
24
|
+
`+create` 和 `+update` 的 `--visible-all` 与 `--visible-scope-file` 互斥;关闭全员可见不能只传 false,必须提供明确范围文件。范围文件是全量替换快照:可见范围必须同时包含 `dept_list/user_list/group_list/position_list` 四个数组,管理范围必须同时包含 `users/roles` 两个数组,空数组表示显式清空。只传其中部分数组会在写请求前被拒绝。
|
|
25
|
+
|
|
26
|
+
用户范围中的 `uuid` 必须是当前组织成员 ID(与 `dept_user_id` 一致),不能使用账号 `user_id` 代替;`user_id` 可以作为透传元数据保留。可见范围会规范化为 `uuid/show_name/assign_type/assign_key`。创建并设置范围是“创建 → 用新 Portal ID 更新范围 → 详情读回”的非原子流程;如果已返回 Portal ID 但范围未验证,使用该 ID 执行 `+update` 修复,禁止重复创建。详情只返回普通 `manage` 权限,默认创建者或主管理员的 `all` 权限可能无法由管理范围列表完整读回,此时必须报告未验证并人工核查。
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"dept_list": [],
|
|
31
|
+
"user_list": [{"uuid":"dept-user-uuid","show_name":"组织成员"}],
|
|
32
|
+
"group_list": [],
|
|
33
|
+
"position_list": []
|
|
34
|
+
}
|
|
35
|
+
```
|
|
25
36
|
|
|
26
37
|
## 导航和首页
|
|
27
38
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
1. `+status`、`+list-templates`、`+list` 或 `+get` 查询真实状态和 ID。
|
|
8
8
|
2. 名称匹配多条时使用宿主原生选择工具消歧,不默认第一条。
|
|
9
|
-
3. 创建前核对模板 ID
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
9
|
+
3. 创建前核对模板 ID;若同时设置范围,生成完整范围快照并确认用户 `uuid/dept_user_id` 来自当前组织,执行 dry-run,展示当前组织、标题、模板和范围,确认后只创建一次。
|
|
10
|
+
4. 创建带范围时,CLI 先创建、再用返回的 Portal ID 更新范围,最后读取详情验证。两步不具备事务性;已创建但范围未验证时保留该 ID,用 `+update` 修复,禁止重复创建。
|
|
11
|
+
5. 更新标题、范围或形象前先读取详情;范围文件必须包含对应类型的全部数组,空数组表示清空,未显式提供的范围类型保持不变。本地 Logo 可使用 `--logo-file`,图片上传后回读实际 URL。
|
|
12
12
|
|
|
13
13
|
## 启用、发布、下架、复制和删除
|
|
14
14
|
|