@qingflow-tech/qingflow-cli 1.1.50-beta.3 → 1.1.50-beta.5

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.
Files changed (50) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/pyproject.toml +1 -1
  4. package/skills/qingflow-cli/SKILL.md +37 -0
  5. package/skills/qingflow-cli/reference/builder/50-views.md +19 -4
  6. package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +2 -0
  7. package/src/qingflow_mcp/app_form_validator.py +53 -14
  8. package/src/qingflow_mcp/builder_facade/app_form.py +152 -47
  9. package/src/qingflow_mcp/builder_facade/models.py +19 -0
  10. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +3 -3
  11. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +1 -1
  12. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +1 -1
  13. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +1 -1
  14. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +3 -3
  15. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +3 -3
  16. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +1 -1
  17. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +1 -1
  18. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +3 -3
  19. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +1 -1
  20. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +1 -1
  21. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +1 -1
  22. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +3 -3
  23. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +1 -1
  24. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +1 -1
  25. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +1 -1
  26. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +3 -3
  27. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +3 -3
  28. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/rich_text.json +1 -1
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +1 -1
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +1 -1
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +3 -3
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +1 -1
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +35 -0
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +2 -2
  35. package/src/qingflow_mcp/builder_facade/schemas/views/manifest.json +2 -3
  36. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +68 -16
  37. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/button-config.json +6 -6
  38. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/data-permission.json +1 -1
  39. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/display.json +13 -11
  40. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/operation-permission.json +3 -3
  41. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/query-condition.json +1 -1
  42. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +51 -6
  43. package/src/qingflow_mcp/builder_facade/service.py +198 -83
  44. package/src/qingflow_mcp/builder_facade/views_extract.py +21 -1
  45. package/src/qingflow_mcp/cli/commands/builder.py +4 -2
  46. package/src/qingflow_mcp/server_app_builder.py +2 -2
  47. package/src/qingflow_mcp/solution/compiler/view_compiler.py +2 -1
  48. package/src/qingflow_mcp/solution/executor.py +3 -1
  49. package/src/qingflow_mcp/solution/spec_models.py +1 -0
  50. package/src/qingflow_mcp/tools/ai_builder_tools.py +7 -5
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -121,10 +121,10 @@
121
121
  ]
122
122
  }
123
123
  ],
124
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
124
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
125
125
  "properties": {
126
126
  "name": {
127
- "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
127
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
128
128
  "minLength": 1,
129
129
  "type": "string"
130
130
  },
@@ -258,7 +258,7 @@
258
258
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
259
259
  },
260
260
  "name": {
261
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
261
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
262
262
  "minLength": 1,
263
263
  "type": "string"
264
264
  },
@@ -301,10 +301,10 @@
301
301
  ]
302
302
  }
303
303
  ],
304
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
304
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
305
305
  "properties": {
306
306
  "name": {
307
- "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
307
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
308
308
  "minLength": 1,
309
309
  "type": "string"
310
310
  },
@@ -83,7 +83,7 @@
83
83
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
84
84
  },
85
85
  "name": {
86
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
86
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
87
87
  "minLength": 1,
88
88
  "type": "string"
89
89
  },
@@ -146,7 +146,7 @@
146
146
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
147
  },
148
148
  "name": {
149
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
150
150
  "minLength": 1,
151
151
  "type": "string"
152
152
  },
@@ -146,7 +146,7 @@
146
146
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
147
  },
148
148
  "name": {
149
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
150
150
  "minLength": 1,
151
151
  "type": "string"
152
152
  },
@@ -986,7 +986,7 @@
986
986
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
987
987
  },
988
988
  "name": {
989
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
989
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
990
990
  "minLength": 1,
991
991
  "type": "string"
992
992
  },
@@ -1029,10 +1029,10 @@
1029
1029
  ]
1030
1030
  }
1031
1031
  ],
1032
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
1032
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
1033
1033
  "properties": {
1034
1034
  "name": {
1035
- "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
1035
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
1036
1036
  "minLength": 1,
1037
1037
  "type": "string"
1038
1038
  },
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -236,6 +236,28 @@
236
236
  "DATEDELTA(date, number, unit)"
237
237
  ]
238
238
  },
239
+ "DATEDIF": {
240
+ "category": "date",
241
+ "example": "DATEDIF(#queId_102$, #queId_101$)",
242
+ "meaning": "历史日期差函数名,仅存在于存量公式中(当前公式引擎未注册,日期差请使用 DAYS(end, start))。为使存量声明的 validate/round-trip 通过而保留声明,不建议新公式使用。",
243
+ "parameters": [
244
+ {
245
+ "description": "结束日期或列表",
246
+ "name": "end"
247
+ },
248
+ {
249
+ "description": "开始日期或列表",
250
+ "name": "start"
251
+ }
252
+ ],
253
+ "returns": {
254
+ "description": "天数差文本列表",
255
+ "type": "list"
256
+ },
257
+ "signatures": [
258
+ "DATEDIF(end, start)"
259
+ ]
260
+ },
239
261
  "DATETOTIMESTAMP": {
240
262
  "category": "date",
241
263
  "example": "DATETOTIMESTAMP(#queId_101$)",
@@ -363,6 +385,19 @@
363
385
  "GETUSEREMAIL()"
364
386
  ]
365
387
  },
388
+ "GETUSERENAME": {
389
+ "category": "context",
390
+ "example": "GETUSERENAME()",
391
+ "meaning": "历史拼写(GETUSERNAME 的讹写),仅存在于存量公式中(当前公式引擎未注册,请使用 GETUSERNAME())。为使存量声明的 validate/round-trip 通过而保留声明,不建议新公式使用。",
392
+ "parameters": [],
393
+ "returns": {
394
+ "description": "当前用户显示名称;无法取得时为空字符串",
395
+ "type": "string"
396
+ },
397
+ "signatures": [
398
+ "GETUSERENAME()"
399
+ ]
400
+ },
366
401
  "GETUSERNAME": {
367
402
  "category": "context",
368
403
  "example": "GETUSERNAME()",
@@ -136,10 +136,10 @@
136
136
  ]
137
137
  }
138
138
  ],
139
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
139
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
140
140
  "properties": {
141
141
  "name": {
142
- "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
142
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
143
143
  "minLength": 1,
144
144
  "type": "string"
145
145
  },
@@ -32,11 +32,10 @@
32
32
  "card",
33
33
  "board",
34
34
  "gantt",
35
- "hierarchy"
36
- ],
37
- "backendKnownUnsupportedViewTypes": [
35
+ "hierarchy",
38
36
  "calendar"
39
37
  ],
38
+ "backendKnownUnsupportedViewTypes": [],
40
39
  "status": "active"
41
40
  }
42
41
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://qingflow.com/schemas/builder/views/v1alpha1/complete.json",
4
4
  "title": "Qingflow Builder Views Declaration · complete (v1alpha1)",
5
- "viewCompleteDescription": "视图完整声明(完整版 spec):summary 的严格超集,覆盖 app_views_apply 当前支持的公开语义——数据权限/可见性授权/筛选/排序/查询条件/按钮配置/关联资源/类型特有配置(card/gantt/hierarchy)/展示与记录开关/分享安全。展示、排序、筛选和类型专属字段使用整数 queId;查询条件 rows 兼容字段名或 ID。打印模板明细、附件权限、列级权限、高级筛选公式和 calendar 尚未进入公开写入契约。schema 校验在别名归一之后执行,只约束规范名。各配置域的专项 Schema(含清空/替换语义)通过 app_views_schema 换 schema_kind 获取(见 x-qingflow-related-schemas)。",
5
+ "viewCompleteDescription": "视图完整声明(完整版 spec):summary 的严格超集,覆盖 app_views_apply 当前支持的公开语义——数据权限/可见性授权/筛选/排序/查询条件/按钮配置/关联资源/类型特有配置(card/gantt/hierarchy/calendar)/展示与记录开关/分享安全。展示、排序、筛选和类型专属字段使用整数 queId;查询条件 rows 兼容字段名或 ID。打印模板明细、附件权限、列级权限和高级筛选公式尚未进入公开写入契约。schema 校验在别名归一之后执行,只约束规范名。各配置域的专项 Schema(含清空/替换语义)通过 app_views_schema 换 schema_kind 获取(见 x-qingflow-related-schemas)。",
6
6
  "$defs": {
7
7
  "ViewDeclaration": {
8
8
  "type": "object",
@@ -26,6 +26,7 @@
26
26
  "type": "string",
27
27
  "minLength": 1,
28
28
  "maxLength": 200,
29
+ "viewNameDescription": "视图名称;未提供 view_key 时按 name 唯一匹配决定更新或创建,重名报 AMBIGUOUS_VIEW。",
29
30
  "x-backend": "viewgraphName"
30
31
  },
31
32
  "type": {
@@ -35,10 +36,11 @@
35
36
  "card",
36
37
  "board",
37
38
  "gantt",
38
- "hierarchy"
39
+ "hierarchy",
40
+ "calendar"
39
41
  ],
40
- "viewTypeDescription": "完整版在四公开类型之上增加 hierarchy(层级视图;summary 档不含,dataset-v0 有 2 例)。",
41
- "x-backend": "viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView)"
42
+ "viewTypeDescription": "支持表格、卡片、看板、甘特、层级和日历视图。",
43
+ "x-backend": "viewgraphType(tableView/cardView/boardView/ganttView/hierarchyView/calendarView)"
42
44
  },
43
45
  "columns": {
44
46
  "type": "array",
@@ -134,6 +136,11 @@
134
136
  "hierarchyDescription": "层级视图特有配置(hierarchy 类型适用,必填)。",
135
137
  "x-backend": "viewgraphHierarchyConfigVO(titleQueId/childrenQueId/rootNodeFilter)"
136
138
  },
139
+ "calendar": {
140
+ "$ref": "#/$defs/CalendarConfig",
141
+ "calendarDescription": "日历视图特有配置(calendar 类型适用,必填)。",
142
+ "x-backend": "viewgraphCalendarConfigVO(titleQueId/dateQueId/colorQueId)"
143
+ },
137
144
  "display": {
138
145
  "$ref": "#/$defs/DisplayConfig",
139
146
  "displayDescription": "展示杂项:行高/固定导航/备注。",
@@ -291,6 +298,13 @@
291
298
  "hierarchy"
292
299
  ]
293
300
  }
301
+ },
302
+ {
303
+ "if": {
304
+ "properties": { "type": { "const": "calendar" } },
305
+ "required": ["type"]
306
+ },
307
+ "then": { "required": ["calendar"] }
294
308
  }
295
309
  ]
296
310
  },
@@ -497,10 +511,12 @@
497
511
  "ascending": {
498
512
  "type": "boolean",
499
513
  "default": true,
514
+ "ascendingDescription": "是否升序;默认 true。",
500
515
  "x-backend": "beingSortAscend"
501
516
  },
502
517
  "que_id": {
503
518
  "type": "integer",
519
+ "queIdDescription": "排序字段 queId。别名 fieldName/field/name。",
504
520
  "x-backend": "ViewgraphSortQuestion.queId"
505
521
  }
506
522
  }
@@ -512,11 +528,13 @@
512
528
  "enabled": {
513
529
  "type": "boolean",
514
530
  "default": true,
531
+ "enabledDescription": "是否开启查询面板。",
515
532
  "x-backend": "queryConditionStatus"
516
533
  },
517
534
  "exact": {
518
535
  "type": "boolean",
519
536
  "default": false,
537
+ "exactDescription": "是否精确匹配;true=多条件同时满足,false=任一满足。",
520
538
  "x-backend": "queryConditionExact"
521
539
  },
522
540
  "hide_before_query": {
@@ -709,7 +727,7 @@
709
727
  },
710
728
  "button_id": {
711
729
  "type": "integer",
712
- "buttonIdDescription": "按钮 id。别名 buttonId/id。",
730
+ "buttonIdDescription": "按钮 id(创建前先 app_get_buttons 传 button_text 查重,唯一命中直接复用本 id;未命中才用 app_custom_buttons_apply 创建)。别名 buttonId/id。",
713
731
  "x-backend": "button_config.id / custom_button_id"
714
732
  },
715
733
  "button_text": {
@@ -813,31 +831,37 @@
813
831
  "default",
814
832
  "fill"
815
833
  ],
834
+ "clippingModeDescription": "封面裁剪模式:default=默认,fill=填充。",
816
835
  "x-backend": "clippingMode(default 实测)"
817
836
  },
818
837
  "image_adaption": {
819
838
  "type": "boolean",
820
839
  "default": false,
840
+ "imageAdaptionDescription": "封面图是否自适应尺寸。",
821
841
  "x-backend": "beingImageAdaption"
822
842
  },
823
843
  "show_field_title": {
824
844
  "type": "boolean",
825
845
  "default": true,
846
+ "showFieldTitleDescription": "是否显示字段标题。",
826
847
  "x-backend": "beingShowQueTitle"
827
848
  },
828
849
  "show_title": {
829
850
  "type": "boolean",
830
851
  "default": true,
852
+ "showTitleDescription": "是否显示卡片标题。",
831
853
  "x-backend": "beingShowTitleQue"
832
854
  },
833
855
  "show_cover": {
834
856
  "type": "boolean",
835
857
  "default": false,
858
+ "showCoverDescription": "是否显示封面图。",
836
859
  "x-backend": "beingShowCover"
837
860
  },
838
861
  "group_color": {
839
862
  "type": "boolean",
840
863
  "default": false,
864
+ "groupColorDescription": "分组是否显示颜色标识。",
841
865
  "x-backend": "beingGroupColor"
842
866
  },
843
867
  "group_que_id": {
@@ -870,6 +894,7 @@
870
894
  "year"
871
895
  ],
872
896
  "default": "month",
897
+ "defaultTimeDimensionDescription": "默认时间维度:day/week/month/year。",
873
898
  "x-backend": "defaultTimeDimension(month×8/week×4 实测)"
874
899
  },
875
900
  "auto_calibration": {
@@ -880,16 +905,18 @@
880
905
  },
881
906
  "groups": {
882
907
  "type": "array",
908
+ "groupsDescription": "甘特分组字段列表,按 ordinal 排序。",
883
909
  "items": {
884
910
  "type": "object",
885
911
  "additionalProperties": false,
886
912
  "properties": {
887
913
  "ordinal": {
888
- "type": "integer"
914
+ "type": "integer",
915
+ "ordinalDescription": "分组展示顺序。"
889
916
  },
890
917
  "que_id": {
891
918
  "type": "integer",
892
- "minLength": 1
919
+ "queIdDescription": "分组字段 queId。"
893
920
  }
894
921
  }
895
922
  },
@@ -898,6 +925,7 @@
898
925
  "dependencies": {
899
926
  "type": "array",
900
927
  "maxItems": 1,
928
+ "dependenciesDescription": "任务依赖关系;后端为单对象,v1alpha1 限 1 条。",
901
929
  "items": {
902
930
  "$ref": "#/$defs/GanttDependency"
903
931
  },
@@ -905,14 +933,17 @@
905
933
  },
906
934
  "start_que_id": {
907
935
  "type": "integer",
936
+ "startQueIdDescription": "甘特开始时间字段 queId;与顶层 start_que_id 等价,取其一。",
908
937
  "x-backend": "startTimeQueId"
909
938
  },
910
939
  "end_que_id": {
911
940
  "type": "integer",
941
+ "endQueIdDescription": "甘特结束时间字段 queId;与顶层 end_que_id 等价,取其一。",
912
942
  "x-backend": "endTimeQueId"
913
943
  },
914
944
  "title_que_id": {
915
945
  "type": "integer",
946
+ "titleQueIdDescription": "甘特标题字段 queId;与顶层 title_que_id 等价。",
916
947
  "x-backend": "titleQueId"
917
948
  }
918
949
  }
@@ -927,28 +958,32 @@
927
958
  "properties": {
928
959
  "start_start_option_id": {
929
960
  "type": "integer",
961
+ "startStartOptionIdDescription": "开始→开始依赖的偏移选项 id(可选)。",
930
962
  "x-backend": "startStartOptionId"
931
963
  },
932
964
  "start_end_option_id": {
933
965
  "type": "integer",
966
+ "startEndOptionIdDescription": "开始→结束依赖的偏移选项 id(可选)。",
934
967
  "x-backend": "startEndOptionId"
935
968
  },
936
969
  "end_start_option_id": {
937
970
  "type": "integer",
971
+ "endStartOptionIdDescription": "结束→开始依赖的偏移选项 id(可选)。",
938
972
  "x-backend": "endStartOptionId"
939
973
  },
940
974
  "end_end_option_id": {
941
975
  "type": "integer",
976
+ "endEndOptionIdDescription": "结束→结束依赖的偏移选项 id(可选)。",
942
977
  "x-backend": "endEndOptionId"
943
978
  },
944
979
  "dependency_que_id": {
945
980
  "type": "integer",
946
- "minLength": 1,
981
+ "dependencyQueIdDescription": "被依赖(后续)任务的关联字段 queId。",
947
982
  "x-backend": "dependencyQueId"
948
983
  },
949
984
  "predecessor_que_id": {
950
985
  "type": "integer",
951
- "minLength": 1,
986
+ "predecessorQueIdDescription": "前置任务的关联字段 queId。",
952
987
  "x-backend": "predecessorTaskQueId"
953
988
  }
954
989
  }
@@ -974,14 +1009,26 @@
974
1009
  },
975
1010
  "title_que_id": {
976
1011
  "type": "integer",
1012
+ "titleQueIdDescription": "层级标题字段 queId。",
977
1013
  "x-backend": "viewgraph_hierarchy_config.titleQueId"
978
1014
  },
979
1015
  "children_que_id": {
980
1016
  "type": "integer",
1017
+ "childrenQueIdDescription": "子节点关联字段 queId(引用/关联字段)。",
981
1018
  "x-backend": "childrenQueId"
982
1019
  }
983
1020
  }
984
1021
  },
1022
+ "CalendarConfig": {
1023
+ "type": "object",
1024
+ "additionalProperties": false,
1025
+ "required": ["title_que_id", "date_que_id"],
1026
+ "properties": {
1027
+ "title_que_id": { "type": "integer", "calendarTitleQueIdDescription": "日历事项标题字段 queId。", "x-backend": "titleQueId" },
1028
+ "date_que_id": { "type": "integer", "calendarDateQueIdDescription": "日历日期字段 queId;可使用表单日期字段或系统字段申请时间(2)/更新时间(3)。", "x-backend": "dateQueId" },
1029
+ "color_que_id": { "type": "integer", "calendarColorQueIdDescription": "可选的日历颜色字段 queId。", "x-backend": "colorQueId" }
1030
+ }
1031
+ },
985
1032
  "DisplayConfig": {
986
1033
  "type": "object",
987
1034
  "additionalProperties": false,
@@ -994,15 +1041,18 @@
994
1041
  "highest",
995
1042
  "high"
996
1043
  ],
1044
+ "rowHeightDescription": "表格行高:compact=紧凑,moderate=适中,high=高,highest=最高。",
997
1045
  "x-backend": "defaultRowHigh(compact×705 实测)"
998
1046
  },
999
1047
  "pin_navigate": {
1000
1048
  "type": "boolean",
1001
1049
  "default": false,
1050
+ "pinNavigateDescription": "是否固定视图内导航;与顶层 pinned(视图列表固定)无关。",
1002
1051
  "x-backend": "beingPinNavigate"
1003
1052
  },
1004
1053
  "remark": {
1005
1054
  "type": "string",
1055
+ "remarkDescription": "视图备注。",
1006
1056
  "x-backend": "remark"
1007
1057
  }
1008
1058
  }
@@ -1014,26 +1064,31 @@
1014
1064
  "audit_visible": {
1015
1065
  "type": "boolean",
1016
1066
  "default": true,
1067
+ "auditVisibleDescription": "是否显示操作记录。",
1017
1068
  "x-backend": "beingAuditRecordVisible"
1018
1069
  },
1019
1070
  "data_log_visible": {
1020
1071
  "type": "boolean",
1021
1072
  "default": true,
1073
+ "dataLogVisibleDescription": "是否显示数据日志(字段变更历史)。",
1022
1074
  "x-backend": "beingDataLogVisible"
1023
1075
  },
1024
1076
  "qrobot_record_visible": {
1025
1077
  "type": "boolean",
1026
1078
  "default": false,
1079
+ "qrobotRecordVisibleDescription": "是否显示机器人记录。",
1027
1080
  "x-backend": "beingQrobotRecordVisible"
1028
1081
  },
1029
1082
  "workflow_future_visible": {
1030
1083
  "type": "boolean",
1031
1084
  "default": true,
1085
+ "workflowFutureVisibleDescription": "是否显示流程未来节点。",
1032
1086
  "x-backend": "beingWorkflowNodeFutureListVisible"
1033
1087
  },
1034
1088
  "comment": {
1035
1089
  "type": "boolean",
1036
1090
  "default": false,
1091
+ "commentDescription": "是否开启留言。",
1037
1092
  "x-backend": "beingCommentStatus"
1038
1093
  }
1039
1094
  }
@@ -1045,6 +1100,7 @@
1045
1100
  "need_pass": {
1046
1101
  "type": "boolean",
1047
1102
  "default": false,
1103
+ "needPassDescription": "分享是否需要访问密码;true 时用 password 提供密码。",
1048
1104
  "x-backend": "beingNeedPass"
1049
1105
  },
1050
1106
  "password": {
@@ -1055,6 +1111,7 @@
1055
1111
  "force_login": {
1056
1112
  "type": "boolean",
1057
1113
  "default": false,
1114
+ "forceLoginDescription": "分享是否强制登录后查看。",
1058
1115
  "x-backend": "beingForceLogin"
1059
1116
  },
1060
1117
  "print_enabled": {
@@ -1071,7 +1128,7 @@
1071
1128
  {
1072
1129
  "kind": "display",
1073
1130
  "displayDescription": "展示字段、排序、关联资源和各公开视图类型的专属配置。",
1074
- "fields": ["columns", "sort", "card", "gantt", "hierarchy", "associated_resources", "display", "group_que_id", "title_que_id", "start_que_id", "end_que_id"]
1131
+ "fields": ["columns", "sort", "card", "gantt", "hierarchy", "calendar", "associated_resources", "display", "group_que_id", "title_que_id", "start_que_id", "end_que_id"]
1075
1132
  },
1076
1133
  {
1077
1134
  "kind": "data-permission",
@@ -1102,7 +1159,7 @@
1102
1159
  "kinds": {
1103
1160
  "summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
1104
1161
  "complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
1105
- "display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
1162
+ "display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
1106
1163
  "data-permission": "数据权限模式、数据范围和固定筛选条件。",
1107
1164
  "operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
1108
1165
  "query-condition": "用户查询面板的开关、匹配模式和字段布局。",
@@ -1121,11 +1178,6 @@
1121
1178
  "backend_warning": "底层 ViewgraphInfo 更新接口对部分省略字段会执行 false、true、空数组或空字符串初始化,因此不得把直接后端请求中的省略统一理解为保留。"
1122
1179
  },
1123
1180
  "x-qingflow-backend-known-unsupported": {
1124
- "calendar": {
1125
- "backend": "viewgraphType=calendarView + viewgraphCalendarConfigVO",
1126
- "status": "not-writable",
1127
- "reason": "当前 app_views_apply 编译器没有 calendar 分支。"
1128
- },
1129
1181
  "column_permissions": {
1130
1182
  "backend": "viewgraphQuestions/ViewgraphQuestion",
1131
1183
  "status": "not-writable",
@@ -6,9 +6,9 @@
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
- "action_buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ActionButton" }, "maxItems": 60 },
10
- "action_buttons_mode": { "type": "string", "enum": ["merge", "replace"], "default": "merge" },
11
- "buttons": { "type": "array", "items": { "$ref": "../complete.json#/$defs/ButtonBinding" }, "maxItems": 60 },
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
12
  "query_conditions": { "$ref": "../complete.json#/$defs/QueryConditions", "queryConditionsDescription": "搜索按钮配置依赖的查询面板。" }
13
13
  },
14
14
  "x-qingflow-related-schemas": {
@@ -42,9 +42,9 @@
42
42
  "buttons": "引用应用中已存在的自定义按钮,只维护视图绑定、位置、主次和显隐条件。"
43
43
  },
44
44
  "x-qingflow-custom-button-workflow": {
45
- "query": "先使用 app_get 获取应用中已有自定义按钮及 button_id。",
46
- "createOrUpdate": "需要维护按钮主体、样式、跨视图复用或 qRobot/wings 细节时使用 app_custom_buttons_apply。",
47
- "viewBinding": "普通业务动作优先声明 action_buttons;已有自定义按钮使用 buttons 绑定。"
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
48
  },
49
49
  "examples": [
50
50
  { "action_buttons": [{ "text": "新增", "action": "add_data", "placement": "header", "primary": true }], "action_buttons_mode": "merge" },
@@ -6,7 +6,7 @@
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
- "data_permission": { "$ref": "../complete.json#/$defs/DataPermission" },
9
+ "data_permission": { "$ref": "../complete.json#/$defs/DataPermission", "dataPermissionDescription": "数据权限生效类型(config/custom)与数据范围(scope)。" },
10
10
  "filters": {
11
11
  "type": "array",
12
12
  "items": { "anyOf": [
@@ -2,20 +2,21 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://qingflow.com/schemas/builder/views/v1alpha1/details/display.json",
4
4
  "title": "Qingflow Views display configuration",
5
- "displayDescription": "视图展示配置片段(schema_kind=display),字段直接并入完整视图声明。所有字段引用均为实际整数 queId;calendar 等当前 apply 不支持的类型不在公开 schema 中。",
5
+ "displayDescription": "视图展示配置片段(schema_kind=display),字段直接并入完整视图声明。所有字段引用均为实际整数 queId。",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "pinned": { "type": "boolean", "pinnedDescription": "是否固定在应用的视图列表顶部。true=固定,false=取消固定;省略时保持当前状态。它与 display.pin_navigate 无关。", "x-backend": "POST /app/{appKey}/view/ordinal (FIXED_VIEW_LIST|VIEW_LIST)" },
10
10
  "columns": { "type": "array", "items": { "type": "integer" }, "minItems": 1, "columnsDescription": "表格或卡片展示字段,按数组顺序显示。" },
11
11
  "sort": { "type": "array", "items": { "$ref": "../complete.json#/$defs/SortRule" }, "sortDescription": "多级排序。空数组恢复默认排序。" },
12
- "card": { "$ref": "../complete.json#/$defs/CardConfig" },
13
- "gantt": { "$ref": "../complete.json#/$defs/GanttConfig" },
14
- "hierarchy": { "$ref": "../complete.json#/$defs/HierarchyConfig" },
15
- "associated_resources": { "$ref": "../complete.json#/$defs/AssociatedResources" },
16
- "display": { "$ref": "../complete.json#/$defs/DisplayConfig" },
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": "展示杂项(行高/视图内导航固定/备注)。" },
17
18
  "group_que_id": { "type": "integer", "groupQueIdDescription": "看板分组字段 queId。" },
18
- "title_que_id": { "type": "integer", "titleQueIdDescription": "卡片、甘特或层级标题字段 queId。" },
19
+ "title_que_id": { "type": "integer", "titleQueIdDescription": "卡片、甘特、层级或日历标题字段 queId。" },
19
20
  "start_que_id": { "type": "integer", "startQueIdDescription": "甘特开始时间字段 queId。" },
20
21
  "end_que_id": { "type": "integer", "endQueIdDescription": "甘特结束时间字段 queId。" }
21
22
  },
@@ -27,7 +28,7 @@
27
28
  "kinds": {
28
29
  "summary": "最小创建声明:类型/名称/展示字段 + 数据权限形状。",
29
30
  "complete": "完整声明:全部公开可写字段,含各配置域与类型专属配置。",
30
- "display": "展示字段、排序、卡片/甘特/层级配置、分组字段和关联资源。",
31
+ "display": "展示字段、排序、卡片/甘特/层级/日历配置、分组字段和关联资源。",
31
32
  "data-permission": "数据权限模式、数据范围和固定筛选条件。",
32
33
  "operation-permission": "成员可见范围、记录日志、留言、打印和分享策略。",
33
34
  "query-condition": "用户查询面板的开关、匹配模式和字段布局。",
@@ -56,16 +57,17 @@
56
57
  "card": "columns 至少包含一个业务字段;标题和封面等使用 card。",
57
58
  "board": "必须提供 group_que_id。",
58
59
  "gantt": "必须提供 start_que_id 和 end_que_id,或在 gantt 中提供等价字段。",
59
- "hierarchy": "必须提供 hierarchy.title_que_id 和 hierarchy.children_que_id。"
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(更新时间)。"
60
62
  },
61
63
  "x-qingflow-unsupported": {
62
- "calendar": "app_views_apply 当前不支持 calendar;后端对应 calendarView + viewgraphCalendarConfigVO。",
63
64
  "column_permissions": "列级可编辑、隐藏、下载等 ViewgraphQuestion 配置尚未进入公开 DSL。"
64
65
  },
65
66
  "examples": [
66
67
  { "columns": [101, 102], "sort": [{ "que_id": 101, "ascending": true }] },
67
68
  { "group_que_id": 103, "title_que_id": 101, "card": { "show_title": true, "group_color": true } },
68
69
  { "gantt": { "title_que_id": 101, "start_que_id": 104, "end_que_id": 105, "default_time_dimension": "month", "auto_calibration": false } },
69
- { "hierarchy": { "title_que_id": 101, "children_que_id": 106, "root_filter": [] } }
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 } }
70
72
  ]
71
73
  }