@qingflow-tech/qingflow-cli 1.1.57 → 1.1.58

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 (82) hide show
  1. package/README.md +4 -4
  2. package/npm/lib/runtime.mjs +13 -29
  3. package/package.json +1 -1
  4. package/pyproject.toml +1 -2
  5. package/skills/qingflow-cli/SKILL.md +319 -90
  6. package/skills/qingflow-cli/manifest.yaml +1 -1
  7. package/skills/qingflow-cli/reference/00-INDEX.md +4 -4
  8. package/skills/qingflow-cli/reference/QINGFLOW_CLI_ADMIN_CHEATSHEET.md +1 -1
  9. package/skills/qingflow-cli/reference/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md +137 -3
  10. package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +4 -6
  11. package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +14 -14
  12. package/skills/qingflow-cli/reference/QINGFLOW_CLI_MEMBER_CHEATSHEET.md +19 -20
  13. package/skills/qingflow-cli/reference/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md +14 -18
  14. package/skills/qingflow-cli/reference/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md +12 -7
  15. package/skills/qingflow-cli/reference/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md +1 -2
  16. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +2 -2
  17. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +5 -9
  18. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +3 -3
  19. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md +1 -1
  20. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md +95 -76
  21. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +4 -6
  22. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +13 -13
  23. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md +19 -20
  24. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md +14 -18
  25. package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md +1 -2
  26. package/skills/qingflow-cli/reference/record/analysis/README.md +113 -21
  27. package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +10 -10
  28. package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +9 -9
  29. package/skills/qingflow-cli/reference/record/analysis/business-context.md +1 -1
  30. package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +10 -10
  31. package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +80 -52
  32. package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +2 -2
  33. package/skills/qingflow-common/SKILL.md +4 -7
  34. package/src/qingflow_mcp/app_form_compat.py +0 -3
  35. package/src/qingflow_mcp/app_form_validator.py +17 -69
  36. package/src/qingflow_mcp/builder_facade/app_form.py +100 -497
  37. package/src/qingflow_mcp/builder_facade/models.py +2 -2
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +0 -1
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +30 -64
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +8 -4
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +8 -4
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +10 -6
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +10 -6
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +18 -11
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +8 -4
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +8 -4
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +10 -6
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +8 -4
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +8 -4
  50. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +8 -4
  51. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +10 -6
  52. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +8 -4
  53. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +8 -4
  54. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +8 -4
  55. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +10 -6
  56. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +15 -46
  57. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +8 -4
  58. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +8 -4
  59. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +27 -61
  60. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +8 -4
  61. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +0 -43
  62. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +12 -7
  63. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +3 -4
  64. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/data-permission.json +3 -3
  65. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +2 -3
  66. package/src/qingflow_mcp/builder_facade/service.py +6 -43
  67. package/src/qingflow_mcp/builder_facade/views_extract.py +12 -2
  68. package/src/qingflow_mcp/cli/commands/__init__.py +1 -2
  69. package/src/qingflow_mcp/cli/commands/record.py +1 -1
  70. package/src/qingflow_mcp/cli/context.py +0 -3
  71. package/src/qingflow_mcp/cli/formatters.py +1 -97
  72. package/src/qingflow_mcp/public_surface.py +0 -5
  73. package/src/qingflow_mcp/response_trim.py +1 -2
  74. package/src/qingflow_mcp/server.py +0 -2
  75. package/src/qingflow_mcp/server_app_user.py +0 -4
  76. package/src/qingflow_mcp/tools/record_tools.py +46 -11
  77. package/skills/qingflow-cli/reference/data/README.md +0 -32
  78. package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_SPECIALIZED_WORKFLOW.md +0 -50
  79. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/rich_text.json +0 -146
  80. package/src/qingflow_mcp/cli/commands/data.py +0 -134
  81. package/src/qingflow_mcp/tools/csv_export.py +0 -168
  82. package/src/qingflow_mcp/tools/data_tools.py +0 -284
@@ -150,7 +150,7 @@
150
150
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
151
151
  },
152
152
  "name": {
153
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
153
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
154
154
  "minLength": 1,
155
155
  "type": "string"
156
156
  },
@@ -171,9 +171,13 @@
171
171
  "type": "string"
172
172
  },
173
173
  "width": {
174
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
175
- "maximum": 100,
176
- "minimum": 1,
174
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
175
+ "enum": [
176
+ 25,
177
+ 50,
178
+ 75,
179
+ 100
180
+ ],
177
181
  "type": "integer"
178
182
  }
179
183
  },
@@ -193,10 +197,10 @@
193
197
  ]
194
198
  }
195
199
  ],
196
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
200
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
197
201
  "properties": {
198
202
  "name": {
199
- "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
203
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
200
204
  "minLength": 1,
201
205
  "type": "string"
202
206
  },
@@ -146,7 +146,7 @@
146
146
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
147
  },
148
148
  "name": {
149
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
150
150
  "minLength": 1,
151
151
  "type": "string"
152
152
  },
@@ -167,9 +167,13 @@
167
167
  "type": "string"
168
168
  },
169
169
  "width": {
170
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
171
- "maximum": 100,
172
- "minimum": 1,
170
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
171
+ "enum": [
172
+ 25,
173
+ 50,
174
+ 75,
175
+ 100
176
+ ],
173
177
  "type": "integer"
174
178
  }
175
179
  },
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -99,9 +99,13 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
- "maximum": 100,
104
- "minimum": 1,
102
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
+ "enum": [
104
+ 25,
105
+ 50,
106
+ 75,
107
+ 100
108
+ ],
105
109
  "type": "integer"
106
110
  }
107
111
  },
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -99,9 +99,13 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
- "maximum": 100,
104
- "minimum": 1,
102
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
+ "enum": [
104
+ 25,
105
+ 50,
106
+ 75,
107
+ 100
108
+ ],
105
109
  "type": "integer"
106
110
  }
107
111
  },
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -99,9 +99,13 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
- "maximum": 100,
104
- "minimum": 1,
102
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
+ "enum": [
104
+ 25,
105
+ 50,
106
+ 75,
107
+ 100
108
+ ],
105
109
  "type": "integer"
106
110
  }
107
111
  },
@@ -121,10 +125,10 @@
121
125
  ]
122
126
  }
123
127
  ],
124
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
128
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
125
129
  "properties": {
126
130
  "name": {
127
- "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
131
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
128
132
  "minLength": 1,
129
133
  "type": "string"
130
134
  },
@@ -258,7 +258,7 @@
258
258
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
259
259
  },
260
260
  "name": {
261
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
261
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
262
262
  "minLength": 1,
263
263
  "type": "string"
264
264
  },
@@ -279,9 +279,13 @@
279
279
  "type": "string"
280
280
  },
281
281
  "width": {
282
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
283
- "maximum": 100,
284
- "minimum": 1,
282
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
283
+ "enum": [
284
+ 25,
285
+ 50,
286
+ 75,
287
+ 100
288
+ ],
285
289
  "type": "integer"
286
290
  }
287
291
  },
@@ -301,10 +305,10 @@
301
305
  ]
302
306
  }
303
307
  ],
304
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
308
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
305
309
  "properties": {
306
310
  "name": {
307
- "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
311
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
308
312
  "minLength": 1,
309
313
  "type": "string"
310
314
  },
@@ -347,7 +351,7 @@
347
351
  },
348
352
  "RelationConfig": {
349
353
  "additionalProperties": false,
350
- "description": "引用字段配置;引用其他应用中的数据。展示字段与权限以 displayFields 为准(后端 referQuestions 全量有序回写,queAuth 1=可编辑/2=隐藏/3=仅可见);displayField/visibleFields 为已废弃旧形态,apply 兼容接收一个版本窗口(displayField 同时视为双向绑定目标)。",
354
+ "description": "引用字段配置;引用其他应用中的数据。",
351
355
  "properties": {
352
356
  "beingDefaultFormulaAutoFillEnabled": {
353
357
  "description": "是否启用引用字段的默认值公式自动填充。",
@@ -385,32 +389,7 @@
385
389
  },
386
390
  "displayField": {
387
391
  "$ref": "#/$defs/FieldSelector",
388
- "description": "已废弃:主展示字段;apply 兼容翻译为 twoWayBoundField + displayFields 首项,后续版本移除。"
389
- },
390
- "displayFields": {
391
- "description": "有序展示字段全量列表(含隐藏字段),按 ordinal 保序回写为后端 referQuestions。可为空列表:空 = 双向绑定未配展示字段的合法存量形态(后端写链路对空 referQuestions 跳过插入、读面容忍空),round-trip 空↔空稳定;与已废弃 displayField/visibleFields 不可混用,条目 queId 不可重复。",
392
- "items": {
393
- "additionalProperties": false,
394
- "properties": {
395
- "auth": {
396
- "default": "visible",
397
- "description": "展示字段权限;editable=可编辑(1), hidden=隐藏(2), visible=仅可见(3);缺失按 visible。",
398
- "enum": [
399
- "editable",
400
- "hidden",
401
- "visible"
402
- ]
403
- },
404
- "field": {
405
- "$ref": "#/$defs/FieldSelector"
406
- }
407
- },
408
- "required": [
409
- "field"
410
- ],
411
- "type": "object"
412
- },
413
- "type": "array"
392
+ "description": "引用值的主展示字段。"
414
393
  },
415
394
  "relationMode": {
416
395
  "default": "single",
@@ -425,19 +404,8 @@
425
404
  "minLength": 1,
426
405
  "type": "string"
427
406
  },
428
- "twoWayBoundField": {
429
- "description": "双向引用绑定的目标字段(后端 referQueId);null/省略 = 单向引用。get 读面在 referQueId 非空时必产出。",
430
- "oneOf": [
431
- {
432
- "type": "null"
433
- },
434
- {
435
- "$ref": "#/$defs/FieldSelector"
436
- }
437
- ]
438
- },
439
407
  "visibleFields": {
440
- "description": "已废弃:额外展示字段;apply 兼容翻译为 displayFields 后续项,后续版本移除。",
408
+ "description": "引用选择界面额外展示的字段。",
441
409
  "items": {
442
410
  "$ref": "#/$defs/FieldSelector"
443
411
  },
@@ -446,7 +414,8 @@
446
414
  }
447
415
  },
448
416
  "required": [
449
- "targetAppKey"
417
+ "targetAppKey",
418
+ "displayField"
450
419
  ],
451
420
  "type": "object"
452
421
  },
@@ -146,7 +146,7 @@
146
146
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
147
  },
148
148
  "name": {
149
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
150
150
  "minLength": 1,
151
151
  "type": "string"
152
152
  },
@@ -167,9 +167,13 @@
167
167
  "type": "string"
168
168
  },
169
169
  "width": {
170
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
171
- "maximum": 100,
172
- "minimum": 1,
170
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
171
+ "enum": [
172
+ 25,
173
+ 50,
174
+ 75,
175
+ 100
176
+ ],
173
177
  "type": "integer"
174
178
  }
175
179
  },
@@ -146,7 +146,7 @@
146
146
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
147
147
  },
148
148
  "name": {
149
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
149
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
150
150
  "minLength": 1,
151
151
  "type": "string"
152
152
  },
@@ -167,9 +167,13 @@
167
167
  "type": "string"
168
168
  },
169
169
  "width": {
170
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
171
- "maximum": 100,
172
- "minimum": 1,
170
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
171
+ "enum": [
172
+ 25,
173
+ 50,
174
+ 75,
175
+ 100
176
+ ],
173
177
  "type": "integer"
174
178
  }
175
179
  },
@@ -111,7 +111,7 @@
111
111
  ]
112
112
  },
113
113
  "fileSize": {
114
- "minimum": 0,
114
+ "minimum": 1,
115
115
  "type": [
116
116
  "integer",
117
117
  "null"
@@ -131,7 +131,7 @@
131
131
  ]
132
132
  },
133
133
  "maxFileLimit": {
134
- "minimum": 0,
134
+ "minimum": 1,
135
135
  "type": [
136
136
  "integer",
137
137
  "null"
@@ -229,7 +229,7 @@
229
229
  },
230
230
  "DataRelationCondition": {
231
231
  "additionalProperties": false,
232
- "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。sourceField 省略为存量读回形态(历史脏公式的源字段缺失,如 #queId_0$,写回时以 queId=0 透传),新建条件应提供 sourceField。",
232
+ "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。",
233
233
  "properties": {
234
234
  "operand": {
235
235
  "$ref": "#/$defs/DataRelationOperand",
@@ -265,10 +265,11 @@
265
265
  },
266
266
  "sourceField": {
267
267
  "$ref": "#/$defs/FieldSelector",
268
- "description": "被过滤的数据源字段;存量读回形态可能缺失(后端反解析出的条件源字段 queId=0 且无名称)。"
268
+ "description": "被过滤的数据源字段。"
269
269
  }
270
270
  },
271
271
  "required": [
272
+ "sourceField",
272
273
  "operator",
273
274
  "operand"
274
275
  ],
@@ -276,7 +277,7 @@
276
277
  },
277
278
  "DataRelationConfig": {
278
279
  "additionalProperties": false,
279
- "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。source 省略表示该字段当前无关联来源配置(存量表单读回形态:后端 GET 对 displayed 目标缺失的 relation 行不回传,FormSvcImpl#getQuestionRelationsBeans continue 分支;新建数据关联字段应提供 source)。",
280
+ "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。",
280
281
  "properties": {
281
282
  "aggregation": {
282
283
  "description": "可选聚合方式;null 表示不聚合。",
@@ -311,10 +312,12 @@
311
312
  },
312
313
  "source": {
313
314
  "$ref": "#/$defs/DataRelationSource",
314
- "description": "数据来源;按 kind 选择一种来源结构。存量读回形态可能无 source(后端读面不回传关联配置),此时写回不重建该字段的关联。"
315
+ "description": "数据来源;按 kind 选择一种来源结构。"
315
316
  }
316
317
  },
317
- "required": [],
318
+ "required": [
319
+ "source"
320
+ ],
318
321
  "type": "object"
319
322
  },
320
323
  "DataRelationCustomButton": {
@@ -986,7 +989,7 @@
986
989
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
987
990
  },
988
991
  "name": {
989
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
992
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
990
993
  "minLength": 1,
991
994
  "type": "string"
992
995
  },
@@ -1007,9 +1010,13 @@
1007
1010
  "type": "string"
1008
1011
  },
1009
1012
  "width": {
1010
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
1011
- "maximum": 100,
1012
- "minimum": 1,
1013
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
1014
+ "enum": [
1015
+ 25,
1016
+ 50,
1017
+ 75,
1018
+ 100
1019
+ ],
1013
1020
  "type": "integer"
1014
1021
  }
1015
1022
  },
@@ -1029,10 +1036,10 @@
1029
1036
  ]
1030
1037
  }
1031
1038
  ],
1032
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
1039
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
1033
1040
  "properties": {
1034
1041
  "name": {
1035
- "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
1042
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
1036
1043
  "minLength": 1,
1037
1044
  "type": "string"
1038
1045
  },
@@ -1394,7 +1401,7 @@
1394
1401
  },
1395
1402
  "RelationConfig": {
1396
1403
  "additionalProperties": false,
1397
- "description": "引用字段配置;引用其他应用中的数据。展示字段与权限以 displayFields 为准(后端 referQuestions 全量有序回写,queAuth 1=可编辑/2=隐藏/3=仅可见);displayField/visibleFields 为已废弃旧形态,apply 兼容接收一个版本窗口(displayField 同时视为双向绑定目标)。",
1404
+ "description": "引用字段配置;引用其他应用中的数据。",
1398
1405
  "properties": {
1399
1406
  "beingDefaultFormulaAutoFillEnabled": {
1400
1407
  "description": "是否启用引用字段的默认值公式自动填充。",
@@ -1432,32 +1439,7 @@
1432
1439
  },
1433
1440
  "displayField": {
1434
1441
  "$ref": "#/$defs/FieldSelector",
1435
- "description": "已废弃:主展示字段;apply 兼容翻译为 twoWayBoundField + displayFields 首项,后续版本移除。"
1436
- },
1437
- "displayFields": {
1438
- "description": "有序展示字段全量列表(含隐藏字段),按 ordinal 保序回写为后端 referQuestions。可为空列表:空 = 双向绑定未配展示字段的合法存量形态(后端写链路对空 referQuestions 跳过插入、读面容忍空),round-trip 空↔空稳定;与已废弃 displayField/visibleFields 不可混用,条目 queId 不可重复。",
1439
- "items": {
1440
- "additionalProperties": false,
1441
- "properties": {
1442
- "auth": {
1443
- "default": "visible",
1444
- "description": "展示字段权限;editable=可编辑(1), hidden=隐藏(2), visible=仅可见(3);缺失按 visible。",
1445
- "enum": [
1446
- "editable",
1447
- "hidden",
1448
- "visible"
1449
- ]
1450
- },
1451
- "field": {
1452
- "$ref": "#/$defs/FieldSelector"
1453
- }
1454
- },
1455
- "required": [
1456
- "field"
1457
- ],
1458
- "type": "object"
1459
- },
1460
- "type": "array"
1442
+ "description": "引用值的主展示字段。"
1461
1443
  },
1462
1444
  "relationMode": {
1463
1445
  "default": "single",
@@ -1472,19 +1454,8 @@
1472
1454
  "minLength": 1,
1473
1455
  "type": "string"
1474
1456
  },
1475
- "twoWayBoundField": {
1476
- "description": "双向引用绑定的目标字段(后端 referQueId);null/省略 = 单向引用。get 读面在 referQueId 非空时必产出。",
1477
- "oneOf": [
1478
- {
1479
- "type": "null"
1480
- },
1481
- {
1482
- "$ref": "#/$defs/FieldSelector"
1483
- }
1484
- ]
1485
- },
1486
1457
  "visibleFields": {
1487
- "description": "已废弃:额外展示字段;apply 兼容翻译为 displayFields 后续项,后续版本移除。",
1458
+ "description": "引用选择界面额外展示的字段。",
1488
1459
  "items": {
1489
1460
  "$ref": "#/$defs/FieldSelector"
1490
1461
  },
@@ -1493,7 +1464,8 @@
1493
1464
  }
1494
1465
  },
1495
1466
  "required": [
1496
- "targetAppKey"
1467
+ "targetAppKey",
1468
+ "displayField"
1497
1469
  ],
1498
1470
  "type": "object"
1499
1471
  },
@@ -1612,10 +1584,7 @@
1612
1584
  "$ref": "#/$defs/NumberConfig"
1613
1585
  },
1614
1586
  "questionType": {
1615
- "enum": [
1616
- "number",
1617
- "amount"
1618
- ]
1587
+ "const": "number"
1619
1588
  }
1620
1589
  },
1621
1590
  "required": [
@@ -1628,10 +1597,7 @@
1628
1597
  "$ref": "#/$defs/EmptyConfig"
1629
1598
  },
1630
1599
  "questionType": {
1631
- "enum": [
1632
- "date",
1633
- "datetime"
1634
- ]
1600
+ "const": "date"
1635
1601
  }
1636
1602
  },
1637
1603
  "required": [
@@ -78,7 +78,7 @@
78
78
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
79
79
  },
80
80
  "name": {
81
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
81
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
82
82
  "minLength": 1,
83
83
  "type": "string"
84
84
  },
@@ -99,9 +99,13 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
- "maximum": 100,
104
- "minimum": 1,
102
+ "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
+ "enum": [
104
+ 25,
105
+ 50,
106
+ 75,
107
+ 100
108
+ ],
105
109
  "type": "integer"
106
110
  }
107
111
  },
@@ -236,28 +236,6 @@
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
- },
261
239
  "DATETOTIMESTAMP": {
262
240
  "category": "date",
263
241
  "example": "DATETOTIMESTAMP(#queId_101$)",
@@ -385,19 +363,6 @@
385
363
  "GETUSEREMAIL()"
386
364
  ]
387
365
  },
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
- },
401
366
  "GETUSERNAME": {
402
367
  "category": "context",
403
368
  "example": "GETUSERNAME()",
@@ -1625,13 +1590,5 @@
1625
1590
  "需要拼接字段当前值时,将该字段的实际 queId 写成未加引号的 #queId_<字段ID>$;字段 name、字段标题和字段默认值都不能替代字段引用。",
1626
1591
  "新建应用的同一次 create 声明中尚未获得 queId 时,不得虚构 queId 或以字段 name 代替:先创建字段,app_form_get 回读实际 queId 后,再提交公式默认值更新。"
1627
1592
  ]
1628
- },
1629
- "x-qingflow-validation": {
1630
- "functionCallPolicy": "validate 会识别公式文本中引号外的 函数名( 调用;函数名必须在 x-qingflow-functions 中声明。未知函数会被拒绝,字符串字面量中的 NAME() 不视为函数调用。",
1631
- "scope": [
1632
- "defaultType=3 的 defaultValue",
1633
- "config.defaultValueFormula",
1634
- "data_relation config.filters.mode=advanced 的 config.filters.formula"
1635
- ]
1636
1593
  }
1637
1594
  }