@qingflow-tech/qingflow-cli 1.1.51 → 1.1.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/README.md +4 -4
- package/npm/lib/runtime.mjs +29 -13
- package/package.json +1 -1
- package/pyproject.toml +8 -2
- package/skills/qingflow-cli/SKILL.md +93 -322
- package/skills/qingflow-cli/manifest.yaml +1 -1
- package/skills/qingflow-cli/reference/00-INDEX.md +4 -4
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_ADMIN_CHEATSHEET.md +1 -1
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_VIEWS_WORKFLOW.md +3 -9
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md +3 -137
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +6 -4
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +14 -14
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_MEMBER_CHEATSHEET.md +20 -19
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md +18 -14
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md +7 -12
- package/skills/qingflow-cli/reference/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md +2 -1
- package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +3 -2
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +9 -5
- package/skills/qingflow-cli/reference/builder/50-views.md +192 -191
- package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +2 -0
- package/skills/qingflow-cli/reference/builder/README.md +1 -1
- package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +6 -6
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md +1 -1
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md +76 -95
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +6 -4
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +13 -13
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md +20 -19
- package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md +18 -14
- package/skills/qingflow-cli/reference/data/README.md +32 -0
- package/skills/qingflow-cli/reference/examples/README.md +1 -1
- package/skills/qingflow-cli/reference/examples/views/views_apply_v1alpha1.example.json +14 -0
- package/skills/qingflow-cli/reference/examples/views/views_upsert_table_minimal.example.json +30 -36
- package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_SPECIALIZED_WORKFLOW.md +50 -0
- package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md +2 -1
- package/skills/qingflow-cli/reference/record/analysis/README.md +21 -113
- package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +10 -10
- package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +9 -9
- package/skills/qingflow-cli/reference/record/analysis/business-context.md +1 -1
- package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +10 -10
- package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +52 -80
- package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +2 -2
- package/skills/qingflow-common/SKILL.md +7 -4
- package/src/qingflow_mcp/app_form_compat.py +3 -0
- package/src/qingflow_mcp/app_form_validator.py +69 -17
- package/src/qingflow_mcp/builder_facade/app_form.py +497 -100
- package/src/qingflow_mcp/builder_facade/models.py +227 -17
- package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +1 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +64 -30
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +6 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +6 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +11 -18
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +6 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +6 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +6 -10
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +46 -15
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/rich_text.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +61 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +4 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +43 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +7 -12
- package/src/qingflow_mcp/builder_facade/schemas/views/manifest.json +42 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +1245 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/button-config.json +53 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/data-permission.json +60 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/display.json +73 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/operation-permission.json +48 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/query-condition.json +47 -0
- package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +319 -0
- package/src/qingflow_mcp/builder_facade/service.py +1666 -509
- package/src/qingflow_mcp/builder_facade/views_extract.py +592 -0
- package/src/qingflow_mcp/builder_facade/views_schema.py +400 -0
- package/src/qingflow_mcp/cli/commands/__init__.py +2 -1
- package/src/qingflow_mcp/cli/commands/builder.py +76 -55
- package/src/qingflow_mcp/cli/commands/data.py +134 -0
- package/src/qingflow_mcp/cli/commands/record.py +1 -1
- package/src/qingflow_mcp/cli/context.py +3 -0
- package/src/qingflow_mcp/cli/formatters.py +97 -1
- package/src/qingflow_mcp/public_surface.py +8 -0
- package/src/qingflow_mcp/response_trim.py +11 -2
- package/src/qingflow_mcp/server.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +34 -10
- package/src/qingflow_mcp/server_app_user.py +4 -0
- package/src/qingflow_mcp/solution/compiler/view_compiler.py +2 -1
- package/src/qingflow_mcp/solution/executor.py +96 -8
- package/src/qingflow_mcp/solution/spec_models.py +1 -0
- package/src/qingflow_mcp/tools/ai_builder_tools.py +218 -398
- package/src/qingflow_mcp/tools/csv_export.py +168 -0
- package/src/qingflow_mcp/tools/data_tools.py +284 -0
- package/src/qingflow_mcp/tools/record_tools.py +11 -46
- package/src/qingflow_mcp/tools/solution_tools.py +2 -0
- package/src/qingflow_mcp/tools/view_tools.py +0 -6
- package/src/qingflow_mcp/tools/view_writer.py +44 -0
- package/skills/qingflow-cli/reference/examples/views/views_batch_full.example.json +0 -159
- package/skills/qingflow-cli/reference/views_upsert_table_minimal.example.json +0 -42
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/button-config.json",
|
|
4
|
+
"title": "Qingflow Views button configuration",
|
|
5
|
+
"buttonConfigDescription": "视图系统按钮和自定义按钮绑定片段(schema_kind=button-config),字段直接并入完整视图声明。action_buttons 是公开 DSL 的动作按钮;buttons 用于维护已有按钮绑定。空数组表示清空对应列表。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"action_buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ActionButton" }, "maxItems": 60, "actionButtonsDescription": "系统动作按钮(add_data/link/qRobot/wings);省略保留现有,空数组清空。" },
|
|
10
|
+
"action_buttons_mode": { "type": "string", "enum": ["merge", "replace"], "default": "merge", "actionButtonsModeDescription": "merge=与现有按钮合并(默认),replace=按声明全量替换。" },
|
|
11
|
+
"buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ButtonBinding" }, "maxItems": 60, "buttonsDescription": "已有自定义按钮的视图绑定(按 button_id 引用,维护位置/主次/显隐)。" },
|
|
12
|
+
"query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions", "queryConditionsDescription": "搜索按钮配置依赖的查询面板。" }
|
|
13
|
+
},
|
|
14
|
+
"x-qingflow-related-schemas": {
|
|
15
|
+
"currentKind": "button-config",
|
|
16
|
+
"fetchTool": "app_views_schema",
|
|
17
|
+
"fetchArgument": "schema_kind",
|
|
18
|
+
"fetchCli": "builder views schema --schema-kind KIND",
|
|
19
|
+
"kinds": {
|
|
20
|
+
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
21
|
+
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
22
|
+
"display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
|
|
23
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
24
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
25
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
26
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。"
|
|
27
|
+
},
|
|
28
|
+
"navigationDescription": "本片段是完整声明(schema_kind=complete)的按钮配置域,字段并入视图声明后交给 app_views_apply/patch_views(CLI: builder views apply --app-key APP --view-file PATH 或 --patch-views-file);其他配置域用 app_views_schema 换 schema_kind 获取。",
|
|
29
|
+
"readSources": {
|
|
30
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
31
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"x-qingflow-apply-semantics": "action_buttons/buttons 省略表示保留现有配置,空数组表示清空。action_buttons_mode=merge 合并动作按钮,replace 按声明替换。自定义按钮主体通过 app_custom_buttons_apply 创建或更新,本 schema 只维护视图绑定。",
|
|
35
|
+
"x-qingflow-count-limits": {
|
|
36
|
+
"header": "最多 20 个。",
|
|
37
|
+
"detail": "总计最多 20 个,主按钮和次按钮各最多 10 个。",
|
|
38
|
+
"list": "主按钮和次按钮各最多 10 个。"
|
|
39
|
+
},
|
|
40
|
+
"x-qingflow-button-types": {
|
|
41
|
+
"action_buttons": "公开系统动作按钮;app_views_apply 负责创建配置并绑定到目标视图。",
|
|
42
|
+
"buttons": "引用应用中已存在的自定义按钮,只维护视图绑定、位置、主次和显隐条件。"
|
|
43
|
+
},
|
|
44
|
+
"x-qingflow-custom-button-workflow": {
|
|
45
|
+
"query": "创建前先用 app_get_buttons 传 button_text 按文案精确查重(CLI: builder button get --app-key APP --button-text 文案);唯一命中直接复用其 button_id,同名多条用 button_id 精确指定。",
|
|
46
|
+
"createOrUpdate": "未命中再用 app_custom_buttons_apply 创建;它自身也按 button_text 去重(无 button_id 时唯一同名匹配转为更新),不要重复创建同名按钮。需要维护按钮主体、样式、跨视图复用或 qRobot/wings 细节时同样使用 app_custom_buttons_apply。",
|
|
47
|
+
"viewBinding": "普通业务动作优先声明 action_buttons;已有自定义按钮使用 buttons 绑定(button_id 来自查询结果)。"
|
|
48
|
+
},
|
|
49
|
+
"examples": [
|
|
50
|
+
{ "action_buttons": [{ "text": "新增", "action": "add_data", "placement": "header", "primary": true }], "action_buttons_mode": "merge" },
|
|
51
|
+
{ "buttons": [{ "button_type": "CUSTOM", "config_type": "DETAIL", "button_id": 123, "button_text": "提交审批", "being_main": true }] }
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/data-permission.json",
|
|
4
|
+
"title": "Qingflow Views data permission configuration",
|
|
5
|
+
"dataPermissionDescription": "视图数据范围和固定筛选片段(schema_kind=data-permission),字段直接并入完整视图声明。data_permission 使用公开 DSL;filters 为空表示清空自定义筛选。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"data_permission": { "$ref": "../complete.json#/$defs/DataPermission", "dataPermissionDescription": "数据权限生效类型(config/custom)与数据范围(scope)。" },
|
|
10
|
+
"filters": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": { "anyOf": [
|
|
13
|
+
{ "$ref": "../complete.json#/$defs/FilterRule" },
|
|
14
|
+
{ "type": "array", "items": { "$ref": "../complete.json#/$defs/FilterRule" } }
|
|
15
|
+
] },
|
|
16
|
+
"filtersDescription": "筛选规则;扁平数组为 AND,嵌套数组为 OR 组。规则中的 que_id 必须是整数。"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"x-qingflow-related-schemas": {
|
|
20
|
+
"currentKind": "data-permission",
|
|
21
|
+
"fetchTool": "app_views_schema",
|
|
22
|
+
"fetchArgument": "schema_kind",
|
|
23
|
+
"fetchCli": "builder views schema --schema-kind KIND",
|
|
24
|
+
"kinds": {
|
|
25
|
+
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
26
|
+
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
27
|
+
"display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
|
|
28
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
29
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
30
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
31
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。"
|
|
32
|
+
},
|
|
33
|
+
"navigationDescription": "本片段是完整声明(schema_kind=complete)的数据权限配置域,字段并入视图声明后交给 app_views_apply/patch_views(CLI: builder views apply --app-key APP --view-file PATH 或 --patch-views-file);其他配置域用 app_views_schema 换 schema_kind 获取。",
|
|
34
|
+
"readSources": {
|
|
35
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
36
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"x-qingflow-apply-semantics": "data_permission 缺省使用 custom + all。filters 省略表示保留现有筛选,空数组表示清空筛选。",
|
|
40
|
+
"x-qingflow-mode-requirements": {
|
|
41
|
+
"config": "跟随应用后台数据权限;scope 和 filters 不作为主要权限来源。",
|
|
42
|
+
"custom": "使用视图自定义范围;scope=custom 时应同时提供 filters。",
|
|
43
|
+
"filters": "扁平数组表示一组 AND;嵌套数组表示组间 OR、组内 AND。"
|
|
44
|
+
},
|
|
45
|
+
"x-qingflow-backend-semantics": {
|
|
46
|
+
"data_permission.type": "dataPermissionType(CONFIG/CUSTOM)",
|
|
47
|
+
"data_permission.scope": "dataScope(ALL/ONESELF/DEPT/SUBORDINATE/CUSTOM)",
|
|
48
|
+
"filters": "viewgraphLimitType=1 + viewgraphLimit;空数组清除简易条件。"
|
|
49
|
+
},
|
|
50
|
+
"x-qingflow-unsupported": {
|
|
51
|
+
"advanced_formula": "viewgraphLimitFormula 高级筛选公式尚未进入公开 DSL;filters 仅表示简易条件。"
|
|
52
|
+
},
|
|
53
|
+
"examples": [
|
|
54
|
+
{ "data_permission": { "type": "custom", "scope": "all" }, "filters": [] },
|
|
55
|
+
{
|
|
56
|
+
"data_permission": { "type": "custom", "scope": "custom" },
|
|
57
|
+
"filters": [[{ "que_id": 101, "operator": "eq", "values": ["待处理"] }]]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/display.json",
|
|
4
|
+
"title": "Qingflow Views display configuration",
|
|
5
|
+
"displayDescription": "视图展示配置片段(schema_kind=display),字段直接并入完整视图声明。所有字段引用均为实际整数 queId。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"pinned": { "type": "boolean", "pinnedDescription": "是否固定在应用的视图列表顶部。true=固定,false=取消固定;省略时保持当前状态。它与 display.pin_navigate 无关。", "x-backend": "POST /app/{appKey}/view/ordinal (FIXED_VIEW_LIST|VIEW_LIST)" },
|
|
10
|
+
"columns": { "type": "array", "items": { "type": "integer" }, "minItems": 1, "columnsDescription": "表格或卡片展示字段,按数组顺序显示。" },
|
|
11
|
+
"sort": { "type": "array", "items": { "$ref": "../complete.json#/$defs/SortRule" }, "sortDescription": "多级排序。空数组恢复默认排序。" },
|
|
12
|
+
"card": { "$ref": "../complete.json#/$defs/CardConfig", "cardDescription": "卡片视图配置(封面/标题/字段标题/分组)。" },
|
|
13
|
+
"gantt": { "$ref": "../complete.json#/$defs/GanttConfig", "ganttDescription": "甘特视图配置(时间维度/分组/依赖)。" },
|
|
14
|
+
"hierarchy": { "$ref": "../complete.json#/$defs/HierarchyConfig", "hierarchyDescription": "层级视图配置(必填 title_que_id/children_que_id,可选 root_filter)。" },
|
|
15
|
+
"calendar": { "$ref": "../complete.json#/$defs/CalendarConfig", "calendarDescription": "日历视图配置(必填 title_que_id/date_que_id)。" },
|
|
16
|
+
"associated_resources": { "$ref": "../complete.json#/$defs/AssociatedResources", "associatedResourcesDescription": "关联报表/图表资源展示配置;应用级资源池用 app_associated_resources_apply 维护。" },
|
|
17
|
+
"display": { "$ref": "../complete.json#/$defs/DisplayConfig", "displayMiscDescription": "展示杂项(行高/视图内导航固定/备注)。" },
|
|
18
|
+
"group_que_id": { "type": "integer", "groupQueIdDescription": "看板分组字段 queId。" },
|
|
19
|
+
"title_que_id": { "type": "integer", "titleQueIdDescription": "卡片、甘特、层级或日历标题字段 queId。" },
|
|
20
|
+
"start_que_id": { "type": "integer", "startQueIdDescription": "甘特开始时间字段 queId。" },
|
|
21
|
+
"end_que_id": { "type": "integer", "endQueIdDescription": "甘特结束时间字段 queId。" }
|
|
22
|
+
},
|
|
23
|
+
"x-qingflow-related-schemas": {
|
|
24
|
+
"currentKind": "display",
|
|
25
|
+
"fetchTool": "app_views_schema",
|
|
26
|
+
"fetchArgument": "schema_kind",
|
|
27
|
+
"fetchCli": "builder views schema --schema-kind KIND",
|
|
28
|
+
"kinds": {
|
|
29
|
+
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
30
|
+
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
31
|
+
"display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
|
|
32
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
33
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
34
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
35
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。"
|
|
36
|
+
},
|
|
37
|
+
"navigationDescription": "本片段是完整声明(schema_kind=complete)的展示配置域,字段并入视图声明后交给 app_views_apply/patch_views(CLI: builder views apply --app-key APP --view-file PATH 或 --patch-views-file);其他配置域用 app_views_schema 换 schema_kind 获取。",
|
|
38
|
+
"readSources": {
|
|
39
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
40
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"x-qingflow-apply-semantics": {
|
|
44
|
+
"pinned": "true 将视图移动到固定列表,false 将其移回普通列表;省略时不改变当前列表状态。",
|
|
45
|
+
"columns": "数组顺序就是展示顺序;table/card 至少需要一个有效业务字段。",
|
|
46
|
+
"sort": "省略表示保留现有排序,空数组恢复默认排序。",
|
|
47
|
+
"associated_resources": "省略表示保留;显式提交按目标态更新。"
|
|
48
|
+
},
|
|
49
|
+
"x-qingflow-create-defaults": {
|
|
50
|
+
"display": { "pin_navigate": true, "row_height": "compact" },
|
|
51
|
+
"sort": "首个展示字段升序;没有展示字段时使用后端兼容默认字段。",
|
|
52
|
+
"card": { "show_cover": false, "show_field_title": true, "image_adaption": false },
|
|
53
|
+
"associated_resources": { "visible": true, "limit_type": "all", "associated_item_ids": [] }
|
|
54
|
+
},
|
|
55
|
+
"x-qingflow-type-requirements": {
|
|
56
|
+
"table": "columns 至少包含一个业务字段。",
|
|
57
|
+
"card": "columns 至少包含一个业务字段;标题和封面等使用 card。",
|
|
58
|
+
"board": "必须提供 group_que_id。",
|
|
59
|
+
"gantt": "必须提供 start_que_id 和 end_que_id,或在 gantt 中提供等价字段。",
|
|
60
|
+
"hierarchy": "必须提供 hierarchy.title_que_id 和 hierarchy.children_que_id。",
|
|
61
|
+
"calendar": "必须提供 calendar.title_que_id 和 calendar.date_que_id。date_que_id 可为表单日期字段或系统字段 2(申请时间)/3(更新时间)。"
|
|
62
|
+
},
|
|
63
|
+
"x-qingflow-unsupported": {
|
|
64
|
+
"column_permissions": "列级可编辑、隐藏、下载等 ViewgraphQuestion 配置尚未进入公开 DSL。"
|
|
65
|
+
},
|
|
66
|
+
"examples": [
|
|
67
|
+
{ "columns": [101, 102], "sort": [{ "que_id": 101, "ascending": true }] },
|
|
68
|
+
{ "group_que_id": 103, "title_que_id": 101, "card": { "show_title": true, "group_color": true } },
|
|
69
|
+
{ "gantt": { "title_que_id": 101, "start_que_id": 104, "end_que_id": 105, "default_time_dimension": "month", "auto_calibration": false } },
|
|
70
|
+
{ "hierarchy": { "title_que_id": 101, "children_que_id": 106, "root_filter": [] } },
|
|
71
|
+
{ "calendar": { "title_que_id": 101, "date_que_id": 104, "color_que_id": 103 } }
|
|
72
|
+
]
|
|
73
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/operation-permission.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/operation-permission.json",
|
|
4
|
+
"title": "Qingflow Views operation permission configuration",
|
|
5
|
+
"operationPermissionDescription": "视图操作和记录权限片段(schema_kind=operation-permission),字段直接并入完整视图声明。包括成员可见范围、记录日志、数据日志、留言、打印和分享策略。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"visibility": { "$ref": "../complete.json#/$defs/Visibility", "visibilityDescription": "对内可见范围 + 外部成员授权。" },
|
|
10
|
+
"record": { "$ref": "../complete.json#/$defs/RecordConfig", "recordDescription": "记录可见性开关:操作记录/数据日志/机器人记录/流程未来节点/留言。" },
|
|
11
|
+
"share": { "$ref": "../complete.json#/$defs/ShareConfig", "shareDescription": "分享与安全:密码/强制登录/打印。" }
|
|
12
|
+
},
|
|
13
|
+
"x-qingflow-related-schemas": {
|
|
14
|
+
"currentKind": "operation-permission",
|
|
15
|
+
"fetchTool": "app_views_schema",
|
|
16
|
+
"fetchArgument": "schema_kind",
|
|
17
|
+
"fetchCli": "builder views schema --schema-kind KIND",
|
|
18
|
+
"kinds": {
|
|
19
|
+
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
20
|
+
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
21
|
+
"display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
|
|
22
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
23
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
24
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
25
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。"
|
|
26
|
+
},
|
|
27
|
+
"navigationDescription": "本片段是完整声明(schema_kind=complete)的操作权限配置域,字段并入视图声明后交给 app_views_apply/patch_views(CLI: builder views apply --app-key APP --view-file PATH 或 --patch-views-file);其他配置域用 app_views_schema 换 schema_kind 获取。",
|
|
28
|
+
"readSources": {
|
|
29
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
30
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"x-qingflow-apply-semantics": "省略片段表示不修改对应现有配置;显式布尔值按目标态写入。",
|
|
34
|
+
"x-qingflow-create-defaults": {
|
|
35
|
+
"record": { "audit_visible": true, "data_log_visible": true, "qrobot_record_visible": false, "workflow_future_visible": true, "comment": false },
|
|
36
|
+
"share": { "need_pass": false, "force_login": false, "print_enabled": false }
|
|
37
|
+
},
|
|
38
|
+
"x-qingflow-backend-semantics": "底层完整更新会重建字段权限和打印模板绑定;当前公开 DSL 不接受这两类目标态。使用 patch_views 更新本 schema 已公开的片段,builder 会读取并保留其他后端配置。",
|
|
39
|
+
"x-qingflow-unsupported": {
|
|
40
|
+
"field_permissions": "viewgraphQuestions 字段级编辑、隐藏、下载权限尚未进入公开 DSL。",
|
|
41
|
+
"print_templates": "默认打印模板和 printTpls 绑定尚未进入公开 DSL;share.print_enabled 只控制打印开关。",
|
|
42
|
+
"attachment_policy": "attachVisibleOnlyConfig 是工作区只读快照,不属于视图写入契约。"
|
|
43
|
+
},
|
|
44
|
+
"examples": [
|
|
45
|
+
{ "visibility": { "mode": "workspace", "external_mode": "not" }, "record": { "audit_visible": true, "comment": false } },
|
|
46
|
+
{ "record": { "audit_visible": true, "data_log_visible": true, "workflow_future_visible": false, "comment": true }, "share": { "print_enabled": true } }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/query-condition.json",
|
|
4
|
+
"title": "Qingflow Views query condition configuration",
|
|
5
|
+
"queryConditionDescription": "视图查询面板配置片段(schema_kind=query-condition),字段直接并入完整视图声明。query_conditions 是用户输入条件布局,固定数据筛选属于数据权限配置域,用 app_views_schema 传 schema_kind=data-permission 获取专项 Schema(CLI: builder views schema --schema-kind data-permission)。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions", "queryConditionsDescription": "查询面板开关/匹配模式/查询前隐藏/行列布局。" }
|
|
10
|
+
},
|
|
11
|
+
"x-qingflow-related-schemas": {
|
|
12
|
+
"currentKind": "query-condition",
|
|
13
|
+
"fetchTool": "app_views_schema",
|
|
14
|
+
"fetchArgument": "schema_kind",
|
|
15
|
+
"fetchCli": "builder views schema --schema-kind KIND",
|
|
16
|
+
"kinds": {
|
|
17
|
+
"summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
|
|
18
|
+
"complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
|
|
19
|
+
"display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
|
|
20
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
21
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
22
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
23
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。"
|
|
24
|
+
},
|
|
25
|
+
"navigationDescription": "本片段是完整声明(schema_kind=complete)的查询面板配置域,字段并入视图声明后交给 app_views_apply/patch_views(CLI: builder views apply --app-key APP --view-file PATH 或 --patch-views-file);其他配置域用 app_views_schema 换 schema_kind 获取。",
|
|
26
|
+
"readSources": {
|
|
27
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
28
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"x-qingflow-apply-semantics": "query_conditions 省略表示保留;enabled=false 且 rows=[] 会关闭并清空查询布局。enabled=true 时 apply 要求至少一个字段。",
|
|
32
|
+
"x-qingflow-create-defaults": {
|
|
33
|
+
"enabled": false,
|
|
34
|
+
"exact": false,
|
|
35
|
+
"hide_before_query": false,
|
|
36
|
+
"rows": []
|
|
37
|
+
},
|
|
38
|
+
"x-qingflow-backend-semantics": "rows 会编译为 queryCondition 的行列布局。底层直接更新若省略 queryConditionExact 或 hideBeforeQueryCondition,默认行为可能与 builder 创建默认不同;app_views_apply 会显式组装公开语义。",
|
|
39
|
+
"x-qingflow-unsupported": {
|
|
40
|
+
"search_button": "querySearchStatus 由按钮配置间接管理,尚未作为 query_conditions 字段公开。",
|
|
41
|
+
"row_titles": "showConditionTitle 和查询行 title 尚未进入公开 DSL。"
|
|
42
|
+
},
|
|
43
|
+
"examples": [
|
|
44
|
+
{ "query_conditions": { "enabled": false, "exact": false, "hide_before_query": false, "rows": [] } },
|
|
45
|
+
{ "query_conditions": { "enabled": true, "exact": true, "hide_before_query": true, "rows": [[101, 102]] } }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qingflow.com/schemas/builder/views/v1alpha1/summary.json",
|
|
4
|
+
"title": "Qingflow Builder Views Declaration · summary (v1alpha1)",
|
|
5
|
+
"viewSummaryDescription": "视图最小声明(最简版 spec):视图基本属性 + 数据权限信息。创建一个可用视图的最小字段集;其余配置项通过 app_views_schema 传 schema_kind=complete 获取完整声明(CLI: builder views schema --schema-kind complete),或按配置域传 display/data-permission/operation-permission/query-condition/button-config 读取专项 Schema。除必填项外全部可选,缺省走后端默认。字段引用使用实际整数 queId。schema 校验在别名归一之后执行,JSON Schema 只约束规范名(别名见各字段说明)。",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"ViewDeclaration": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"required": [
|
|
11
|
+
"name",
|
|
12
|
+
"type"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"view_key": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"viewKeyDescription": "视图唯一键;upsert 锁定已有视图(存在即更新)。缺省按 name 匹配,重名报 AMBIGUOUS_VIEW。别名 viewKey。",
|
|
18
|
+
"x-backend": "viewgraph.viewgraphKey"
|
|
19
|
+
},
|
|
20
|
+
"pinned": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"pinnedDescription": "是否固定在应用的视图列表顶部。true=固定,false=取消固定;省略时保持当前状态。别名 fixed/is_pinned/isPinned。它与 display.pin_navigate(视图内导航固定)无关。",
|
|
23
|
+
"x-backend": "POST /app/{appKey}/view/ordinal (FIXED_VIEW_LIST|VIEW_LIST)"
|
|
24
|
+
},
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 200,
|
|
29
|
+
"viewNameDescription": "视图名称",
|
|
30
|
+
"x-backend": "viewgraph.viewgraphName"
|
|
31
|
+
},
|
|
32
|
+
"type": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"table",
|
|
36
|
+
"card",
|
|
37
|
+
"board",
|
|
38
|
+
"gantt",
|
|
39
|
+
"hierarchy",
|
|
40
|
+
"calendar"
|
|
41
|
+
],
|
|
42
|
+
"viewTypeDescription": "视图类型。别名归一:tableView→table、cardView→card、kanban→board、ganttView→gantt、hierarchyView→hierarchy、calendarView→calendar。",
|
|
43
|
+
"x-backend": "viewgraph.viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView/calendarView)"
|
|
44
|
+
},
|
|
45
|
+
"columns": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "integer"
|
|
49
|
+
},
|
|
50
|
+
"columnsDescription": "数据展示内容:业务字段或已存在系统字段的 queId 列表(table/card 必填,数组顺序即展示顺序)。别名 fields/column_names/columnNames。",
|
|
51
|
+
"x-backend": "viewgraphQuestion + viewgraphQueIds;已知系统字段允许原样透传"
|
|
52
|
+
},
|
|
53
|
+
"data_permission": {
|
|
54
|
+
"$ref": "#/$defs/DataPermission",
|
|
55
|
+
"dataPermissionDescription": "数据权限(权限形状层):数据权限生效类型与数据范围。scope=custom 时规则明细在完整声明的 filters 字段中承载(app_views_schema schema_kind=complete,或专项 schema_kind=data-permission);summary 级重放比对仅校验形状。"
|
|
56
|
+
},
|
|
57
|
+
"group_que_id": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"groupQueIdDescription": "分组字段 queId"
|
|
60
|
+
},
|
|
61
|
+
"title_que_id": {
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"titleQueIdDescription": "卡片/看板/甘特/层级标题字段 queId(可选)。"
|
|
64
|
+
},
|
|
65
|
+
"start_que_id": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"startQueIdDescription": "甘特开始时间字段 queId(gantt 必填)。别名 startField。",
|
|
68
|
+
"x-backend": "viewgraphGanttConfigVO.startTimeQueId"
|
|
69
|
+
},
|
|
70
|
+
"end_que_id": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"endQueIdDescription": "甘特结束时间字段 queId(gantt 必填)。别名 endField。",
|
|
73
|
+
"x-backend": "viewgraphGanttConfigVO.endTimeQueId"
|
|
74
|
+
},
|
|
75
|
+
"hierarchy": {
|
|
76
|
+
"$ref": "#/$defs/HierarchyConfig",
|
|
77
|
+
"hierarchyDescription": "层级视图特有配置(hierarchy 类型适用,必填)。"
|
|
78
|
+
},
|
|
79
|
+
"calendar": {
|
|
80
|
+
"$ref": "#/$defs/CalendarConfig",
|
|
81
|
+
"calendarDescription": "日历视图特有配置(calendar 类型适用,必填)。"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"allOf": [
|
|
85
|
+
{
|
|
86
|
+
"if": {
|
|
87
|
+
"properties": {
|
|
88
|
+
"type": {
|
|
89
|
+
"const": "table"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"type"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"then": {
|
|
97
|
+
"required": [
|
|
98
|
+
"columns"
|
|
99
|
+
],
|
|
100
|
+
"properties": {
|
|
101
|
+
"columns": {
|
|
102
|
+
"minItems": 1
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"if": {
|
|
109
|
+
"properties": {
|
|
110
|
+
"type": {
|
|
111
|
+
"const": "card"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": [
|
|
115
|
+
"type"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"then": {
|
|
119
|
+
"required": [
|
|
120
|
+
"columns"
|
|
121
|
+
],
|
|
122
|
+
"properties": {
|
|
123
|
+
"columns": {
|
|
124
|
+
"minItems": 1
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"if": {
|
|
131
|
+
"properties": {
|
|
132
|
+
"type": {
|
|
133
|
+
"const": "board"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"type"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"then": {
|
|
141
|
+
"required": [
|
|
142
|
+
"group_que_id"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"if": {
|
|
148
|
+
"properties": {
|
|
149
|
+
"type": {
|
|
150
|
+
"const": "gantt"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": [
|
|
154
|
+
"type"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"then": {
|
|
158
|
+
"required": [
|
|
159
|
+
"start_que_id",
|
|
160
|
+
"end_que_id"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"if": {
|
|
166
|
+
"properties": { "type": { "const": "hierarchy" } },
|
|
167
|
+
"required": ["type"]
|
|
168
|
+
},
|
|
169
|
+
"then": { "required": ["hierarchy"] }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"if": {
|
|
173
|
+
"properties": { "type": { "const": "calendar" } },
|
|
174
|
+
"required": ["type"]
|
|
175
|
+
},
|
|
176
|
+
"then": { "required": ["calendar"] }
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"HierarchyConfig": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": ["title_que_id", "children_que_id"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"title_que_id": { "type": "integer", "hierarchyTitleQueIdDescription": "层级节点标题字段 queId。" },
|
|
186
|
+
"children_que_id": { "type": "integer", "hierarchyChildrenQueIdDescription": "层级父子关系字段 queId。" }
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"CalendarConfig": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": ["title_que_id", "date_que_id"],
|
|
193
|
+
"properties": {
|
|
194
|
+
"title_que_id": { "type": "integer", "calendarTitleQueIdDescription": "日历事项标题字段 queId。" },
|
|
195
|
+
"date_que_id": { "type": "integer", "calendarDateQueIdDescription": "日历日期字段 queId;可使用表单日期字段或系统字段申请时间(2)/更新时间(3)。" },
|
|
196
|
+
"color_que_id": { "type": "integer", "calendarColorQueIdDescription": "可选的日历颜色字段 queId。" }
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"DataPermission": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"properties": {
|
|
203
|
+
"type": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"enum": [
|
|
206
|
+
"config",
|
|
207
|
+
"custom"
|
|
208
|
+
],
|
|
209
|
+
"default": "custom",
|
|
210
|
+
"dataPermissionDescription": "数据权限生效类型:config=跟随应用配置,custom=视图自定义。别名 dataPermissionType(CONFIG/CUSTOM)。",
|
|
211
|
+
"x-backend": "viewgraph.dataPermissionType(CONFIG|CUSTOM)"
|
|
212
|
+
},
|
|
213
|
+
"scope": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"enum": [
|
|
216
|
+
"all",
|
|
217
|
+
"oneself",
|
|
218
|
+
"dept",
|
|
219
|
+
"subordinate",
|
|
220
|
+
"custom"
|
|
221
|
+
],
|
|
222
|
+
"default": "all",
|
|
223
|
+
"dataScopeDescription": "数据范围:all=全部数据,oneself=自己发起的,dept=所在部门的,subordinate=下属的,custom=自定义(规则明细在完整声明的 filters 字段,通过 app_views_schema schema_kind=complete 或 data-permission 获取)。dataset-v0 实测分布:all×560 / custom×74 / oneself×71。",
|
|
224
|
+
"x-backend": "viewgraph.dataScope(ALL|ONESELF|DEPT|SUBORDINATE|CUSTOM)"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"$ref": "#/$defs/ViewDeclaration",
|
|
230
|
+
"x-qingflow-detail-query": {
|
|
231
|
+
"currentKind": "summary",
|
|
232
|
+
"tool": "app_views_schema",
|
|
233
|
+
"cli": "builder views schema --schema-kind KIND",
|
|
234
|
+
"argument": "schema_kind",
|
|
235
|
+
"kinds": [
|
|
236
|
+
"display",
|
|
237
|
+
"data-permission",
|
|
238
|
+
"operation-permission",
|
|
239
|
+
"query-condition",
|
|
240
|
+
"button-config",
|
|
241
|
+
"complete"
|
|
242
|
+
],
|
|
243
|
+
"kindDescriptions": {
|
|
244
|
+
"display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
|
|
245
|
+
"data-permission": "数据权限模式、数据范围和固定筛选条件。",
|
|
246
|
+
"operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
|
|
247
|
+
"query-condition": "用户查询面板的开关、匹配模式和字段布局。",
|
|
248
|
+
"button-config": "系统动作按钮、自定义按钮绑定及按钮清空/合并方式。",
|
|
249
|
+
"complete": "完整视图声明,汇总当前公开可写配置;summary 是它的最小子集。"
|
|
250
|
+
},
|
|
251
|
+
"detailQueryDescription": "复杂配置按需调用 app_views_schema 并传对应 schema_kind(CLI: builder views schema --schema-kind KIND);专项返回已内联其引用的定义,可独立交给 JSON Schema 校验器。",
|
|
252
|
+
"readSources": {
|
|
253
|
+
"queIds": "字段 queId 用 app_get 读 fields(CLI: builder app get --app-key APP fields);现有视图声明用 app_views_get 回读(CLI: builder views get --app-key APP --schema-kind summary|complete)。",
|
|
254
|
+
"fieldSchema": "字段类型、默认值等表单侧细节用 app_form_schema 传 schema_kind=field 和 field_type 获取(CLI: builder app-form schema --schema-kind field --field-type TYPE)。"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"x-qingflow-create-defaults": {
|
|
258
|
+
"createDefaultsDescription": "以下是 app_views_apply 当前创建路径在相应片段完全省略时组装的后端值。default 和 x-qingflow-* 是契约注解,通用 JSON Schema 校验器不会自动填值。更新已有视图时应优先使用 patch_views,避免把创建默认值当作现有值。",
|
|
259
|
+
"visibility": {
|
|
260
|
+
"mode": "workspace",
|
|
261
|
+
"external_mode": "not"
|
|
262
|
+
},
|
|
263
|
+
"display": {
|
|
264
|
+
"pin_navigate": true,
|
|
265
|
+
"row_height": "compact"
|
|
266
|
+
},
|
|
267
|
+
"data_permission": {
|
|
268
|
+
"type": "custom",
|
|
269
|
+
"scope": "all"
|
|
270
|
+
},
|
|
271
|
+
"query_conditions": {
|
|
272
|
+
"enabled": false,
|
|
273
|
+
"exact": false,
|
|
274
|
+
"hide_before_query": false,
|
|
275
|
+
"rows": []
|
|
276
|
+
},
|
|
277
|
+
"record": {
|
|
278
|
+
"audit_visible": true,
|
|
279
|
+
"qrobot_record_visible": false,
|
|
280
|
+
"workflow_future_visible": true,
|
|
281
|
+
"comment": false
|
|
282
|
+
},
|
|
283
|
+
"share": {
|
|
284
|
+
"need_pass": false,
|
|
285
|
+
"force_login": false,
|
|
286
|
+
"print_enabled": false
|
|
287
|
+
},
|
|
288
|
+
"action_buttons": [],
|
|
289
|
+
"buttons": []
|
|
290
|
+
},
|
|
291
|
+
"x-qingflow-capability-boundary": {
|
|
292
|
+
"contract": "仅列出 app_views_apply 当前可写字段。",
|
|
293
|
+
"backendKnownUnsupported": {
|
|
294
|
+
"column_permissions": "后端 ViewgraphQuestion 支持列级查看、编辑和下载权限,当前公开 DSL 尚未开放。",
|
|
295
|
+
"advanced_filter_formula": "后端支持 viewgraphLimitFormula,当前 filters 只公开简易条件。",
|
|
296
|
+
"print_templates": "后端支持默认打印模板和 printTpls 绑定,当前只公开打印开关。",
|
|
297
|
+
"attachment_policy": "attachVisibleOnlyConfig 是工作区继承的只读快照,不属于视图写入契约。"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"examples": [
|
|
301
|
+
{ "name": "任务层级", "type": "hierarchy", "hierarchy": { "title_que_id": 101, "children_que_id": 106 } },
|
|
302
|
+
{ "name": "事项日历", "type": "calendar", "calendar": { "title_que_id": 101, "date_que_id": 104, "color_que_id": 103 } },
|
|
303
|
+
{
|
|
304
|
+
"name": "业务记录",
|
|
305
|
+
"type": "table",
|
|
306
|
+
"columns": [101, 102],
|
|
307
|
+
"data_permission": {
|
|
308
|
+
"type": "custom",
|
|
309
|
+
"scope": "all"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "待办看板",
|
|
314
|
+
"type": "board",
|
|
315
|
+
"group_que_id": 103,
|
|
316
|
+
"title_que_id": 101
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
}
|