@qingflow-tech/qingflow-cli 1.1.50-beta.1 → 1.1.50-beta.2

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 (35) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/pyproject.toml +2 -1
  4. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +2 -2
  5. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +9 -5
  6. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +3 -3
  7. package/src/qingflow_mcp/app_form_compat.py +3 -0
  8. package/src/qingflow_mcp/app_form_validator.py +16 -3
  9. package/src/qingflow_mcp/builder_facade/app_form.py +360 -68
  10. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +1 -0
  11. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +61 -27
  12. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +3 -7
  13. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +3 -7
  14. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +5 -9
  15. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +3 -7
  16. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +8 -15
  17. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +3 -7
  18. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +3 -7
  19. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +3 -7
  20. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +3 -7
  21. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +3 -7
  22. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +3 -7
  23. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +3 -7
  24. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +3 -7
  25. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +3 -7
  26. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +3 -7
  27. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +3 -7
  28. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +43 -12
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/rich_text.json +146 -0
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +3 -7
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +3 -7
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +58 -24
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +3 -7
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +8 -0
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +5 -10
@@ -10,6 +10,7 @@
10
10
  "fieldTypes": [
11
11
  "text",
12
12
  "long_text",
13
+ "rich_text",
13
14
  "number",
14
15
  "amount",
15
16
  "link",
@@ -239,7 +239,7 @@
239
239
  ]
240
240
  },
241
241
  "fileSize": {
242
- "minimum": 1,
242
+ "minimum": 0,
243
243
  "type": [
244
244
  "integer",
245
245
  "null"
@@ -259,7 +259,7 @@
259
259
  ]
260
260
  },
261
261
  "maxFileLimit": {
262
- "minimum": 1,
262
+ "minimum": 0,
263
263
  "type": [
264
264
  "integer",
265
265
  "null"
@@ -518,7 +518,7 @@
518
518
  },
519
519
  "DataRelationCondition": {
520
520
  "additionalProperties": false,
521
- "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。",
521
+ "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。sourceField 省略为存量读回形态(历史脏公式的源字段缺失,如 #queId_0$,写回时以 queId=0 透传),新建条件应提供 sourceField。",
522
522
  "properties": {
523
523
  "operand": {
524
524
  "$ref": "#/$defs/DataRelationOperand",
@@ -554,11 +554,10 @@
554
554
  },
555
555
  "sourceField": {
556
556
  "$ref": "#/$defs/FieldSelector",
557
- "description": "被过滤的数据源字段。"
557
+ "description": "被过滤的数据源字段;存量读回形态可能缺失(后端反解析出的条件源字段 queId=0 且无名称)。"
558
558
  }
559
559
  },
560
560
  "required": [
561
- "sourceField",
562
561
  "operator",
563
562
  "operand"
564
563
  ],
@@ -566,7 +565,7 @@
566
565
  },
567
566
  "DataRelationConfig": {
568
567
  "additionalProperties": false,
569
- "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。",
568
+ "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。source 省略表示该字段当前无关联来源配置(存量表单读回形态:后端 GET 对 displayed 目标缺失的 relation 行不回传,FormSvcImpl#getQuestionRelationsBeans continue 分支;新建数据关联字段应提供 source)。",
570
569
  "properties": {
571
570
  "aggregation": {
572
571
  "description": "可选聚合方式;null 表示不聚合。",
@@ -601,12 +600,10 @@
601
600
  },
602
601
  "source": {
603
602
  "$ref": "#/$defs/DataRelationSource",
604
- "description": "数据来源;按 kind 选择一种来源结构。"
603
+ "description": "数据来源;按 kind 选择一种来源结构。存量读回形态可能无 source(后端读面不回传关联配置),此时写回不重建该字段的关联。"
605
604
  }
606
605
  },
607
- "required": [
608
- "source"
609
- ],
606
+ "required": [],
610
607
  "type": "object"
611
608
  },
612
609
  "DataRelationCustomButton": {
@@ -1299,13 +1296,9 @@
1299
1296
  "type": "string"
1300
1297
  },
1301
1298
  "width": {
1302
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
1303
- "enum": [
1304
- 25,
1305
- 50,
1306
- 75,
1307
- 100
1308
- ],
1299
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
1300
+ "maximum": 100,
1301
+ "minimum": 1,
1309
1302
  "type": "integer"
1310
1303
  }
1311
1304
  },
@@ -1975,7 +1968,7 @@
1975
1968
  },
1976
1969
  "RelationConfig": {
1977
1970
  "additionalProperties": false,
1978
- "description": "引用字段配置;引用其他应用中的数据。",
1971
+ "description": "引用字段配置;引用其他应用中的数据。展示字段与权限以 displayFields 为准(后端 referQuestions 全量有序回写,queAuth 1=可编辑/2=隐藏/3=仅可见);displayField/visibleFields 为已废弃旧形态,apply 兼容接收一个版本窗口(displayField 同时视为双向绑定目标)。",
1979
1972
  "properties": {
1980
1973
  "beingDefaultFormulaAutoFillEnabled": {
1981
1974
  "description": "是否启用引用字段的默认值公式自动填充。",
@@ -2013,7 +2006,32 @@
2013
2006
  },
2014
2007
  "displayField": {
2015
2008
  "$ref": "#/$defs/FieldSelector",
2016
- "description": "引用值的主展示字段。"
2009
+ "description": "已废弃:主展示字段;apply 兼容翻译为 twoWayBoundField + displayFields 首项,后续版本移除。"
2010
+ },
2011
+ "displayFields": {
2012
+ "description": "有序展示字段全量列表(含隐藏字段),按 ordinal 保序回写为后端 referQuestions。可为空列表:空 = 双向绑定未配展示字段的合法存量形态(后端写链路对空 referQuestions 跳过插入、读面容忍空),round-trip 空↔空稳定;与已废弃 displayField/visibleFields 不可混用,条目 queId 不可重复。",
2013
+ "items": {
2014
+ "additionalProperties": false,
2015
+ "properties": {
2016
+ "auth": {
2017
+ "default": "visible",
2018
+ "description": "展示字段权限;editable=可编辑(1), hidden=隐藏(2), visible=仅可见(3);缺失按 visible。",
2019
+ "enum": [
2020
+ "editable",
2021
+ "hidden",
2022
+ "visible"
2023
+ ]
2024
+ },
2025
+ "field": {
2026
+ "$ref": "#/$defs/FieldSelector"
2027
+ }
2028
+ },
2029
+ "required": [
2030
+ "field"
2031
+ ],
2032
+ "type": "object"
2033
+ },
2034
+ "type": "array"
2017
2035
  },
2018
2036
  "relationMode": {
2019
2037
  "default": "single",
@@ -2028,8 +2046,19 @@
2028
2046
  "minLength": 1,
2029
2047
  "type": "string"
2030
2048
  },
2049
+ "twoWayBoundField": {
2050
+ "description": "双向引用绑定的目标字段(后端 referQueId);null/省略 = 单向引用。get 读面在 referQueId 非空时必产出。",
2051
+ "oneOf": [
2052
+ {
2053
+ "type": "null"
2054
+ },
2055
+ {
2056
+ "$ref": "#/$defs/FieldSelector"
2057
+ }
2058
+ ]
2059
+ },
2031
2060
  "visibleFields": {
2032
- "description": "引用选择界面额外展示的字段。",
2061
+ "description": "已废弃:额外展示字段;apply 兼容翻译为 displayFields 后续项,后续版本移除。",
2033
2062
  "items": {
2034
2063
  "$ref": "#/$defs/FieldSelector"
2035
2064
  },
@@ -2038,8 +2067,7 @@
2038
2067
  }
2039
2068
  },
2040
2069
  "required": [
2041
- "targetAppKey",
2042
- "displayField"
2070
+ "targetAppKey"
2043
2071
  ],
2044
2072
  "type": "object"
2045
2073
  },
@@ -2100,11 +2128,10 @@
2100
2128
  "description": "段落判别值。"
2101
2129
  },
2102
2130
  "rows": {
2103
- "description": "段落内的非空有序字段行。",
2131
+ "description": "段落内的有序字段行;可为空数组(空 = 存量空段落形态,后端容忍,round-trip 空↔空稳定)。",
2104
2132
  "items": {
2105
2133
  "$ref": "#/$defs/FieldRow"
2106
2134
  },
2107
- "minItems": 1,
2108
2135
  "type": "array"
2109
2136
  },
2110
2137
  "sectionId": {
@@ -2385,7 +2412,10 @@
2385
2412
  "$ref": "#/$defs/NumberConfig"
2386
2413
  },
2387
2414
  "questionType": {
2388
- "const": "number"
2415
+ "enum": [
2416
+ "number",
2417
+ "amount"
2418
+ ]
2389
2419
  }
2390
2420
  },
2391
2421
  "required": [
@@ -2398,7 +2428,10 @@
2398
2428
  "$ref": "#/$defs/EmptyConfig"
2399
2429
  },
2400
2430
  "questionType": {
2401
- "const": "date"
2431
+ "enum": [
2432
+ "date",
2433
+ "datetime"
2434
+ ]
2402
2435
  }
2403
2436
  },
2404
2437
  "required": [
@@ -2702,7 +2735,8 @@
2702
2735
  "questionType": {
2703
2736
  "enum": [
2704
2737
  "date",
2705
- "datetime"
2738
+ "datetime",
2739
+ "rich_text"
2706
2740
  ]
2707
2741
  }
2708
2742
  },
@@ -322,13 +322,9 @@
322
322
  "type": "string"
323
323
  },
324
324
  "width": {
325
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
326
- "enum": [
327
- 25,
328
- 50,
329
- 75,
330
- 100
331
- ],
325
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
326
+ "maximum": 100,
327
+ "minimum": 1,
332
328
  "type": "integer"
333
329
  }
334
330
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -94,7 +94,7 @@
94
94
  ]
95
95
  },
96
96
  "fileSize": {
97
- "minimum": 1,
97
+ "minimum": 0,
98
98
  "type": [
99
99
  "integer",
100
100
  "null"
@@ -114,7 +114,7 @@
114
114
  ]
115
115
  },
116
116
  "maxFileLimit": {
117
- "minimum": 1,
117
+ "minimum": 0,
118
118
  "type": [
119
119
  "integer",
120
120
  "null"
@@ -355,13 +355,9 @@
355
355
  "type": "string"
356
356
  },
357
357
  "width": {
358
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
359
- "enum": [
360
- 25,
361
- 50,
362
- 75,
363
- 100
364
- ],
358
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
359
+ "maximum": 100,
360
+ "minimum": 1,
365
361
  "type": "integer"
366
362
  }
367
363
  },
@@ -242,13 +242,9 @@
242
242
  "type": "string"
243
243
  },
244
244
  "width": {
245
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
246
- "enum": [
247
- 25,
248
- 50,
249
- 75,
250
- 100
251
- ],
245
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
246
+ "maximum": 100,
247
+ "minimum": 1,
252
248
  "type": "integer"
253
249
  }
254
250
  },
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "DataRelationCondition": {
21
21
  "additionalProperties": false,
22
- "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。",
22
+ "description": "一条数据关联过滤条件;sourceField 必须属于数据来源,operator 必须适用于该字段类型。固定值请使用 literal operand,不要直接声明后端 matchRules。sourceField 省略为存量读回形态(历史脏公式的源字段缺失,如 #queId_0$,写回时以 queId=0 透传),新建条件应提供 sourceField。",
23
23
  "properties": {
24
24
  "operand": {
25
25
  "$ref": "#/$defs/DataRelationOperand",
@@ -55,11 +55,10 @@
55
55
  },
56
56
  "sourceField": {
57
57
  "$ref": "#/$defs/FieldSelector",
58
- "description": "被过滤的数据源字段。"
58
+ "description": "被过滤的数据源字段;存量读回形态可能缺失(后端反解析出的条件源字段 queId=0 且无名称)。"
59
59
  }
60
60
  },
61
61
  "required": [
62
- "sourceField",
63
62
  "operator",
64
63
  "operand"
65
64
  ],
@@ -67,7 +66,7 @@
67
66
  },
68
67
  "DataRelationConfig": {
69
68
  "additionalProperties": false,
70
- "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。",
69
+ "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。source 省略表示该字段当前无关联来源配置(存量表单读回形态:后端 GET 对 displayed 目标缺失的 relation 行不回传,FormSvcImpl#getQuestionRelationsBeans continue 分支;新建数据关联字段应提供 source)。",
71
70
  "properties": {
72
71
  "aggregation": {
73
72
  "description": "可选聚合方式;null 表示不聚合。",
@@ -102,12 +101,10 @@
102
101
  },
103
102
  "source": {
104
103
  "$ref": "#/$defs/DataRelationSource",
105
- "description": "数据来源;按 kind 选择一种来源结构。"
104
+ "description": "数据来源;按 kind 选择一种来源结构。存量读回形态可能无 source(后端读面不回传关联配置),此时写回不重建该字段的关联。"
106
105
  }
107
106
  },
108
- "required": [
109
- "source"
110
- ],
107
+ "required": [],
111
108
  "type": "object"
112
109
  },
113
110
  "DataRelationCustomButton": {
@@ -504,13 +501,9 @@
504
501
  "type": "string"
505
502
  },
506
503
  "width": {
507
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
508
- "enum": [
509
- 25,
510
- 50,
511
- 75,
512
- 100
513
- ],
504
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
505
+ "maximum": 100,
506
+ "minimum": 1,
514
507
  "type": "integer"
515
508
  }
516
509
  },
@@ -104,13 +104,9 @@
104
104
  "type": "string"
105
105
  },
106
106
  "width": {
107
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
108
- "enum": [
109
- 25,
110
- 50,
111
- 75,
112
- 100
113
- ],
107
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
108
+ "maximum": 100,
109
+ "minimum": 1,
114
110
  "type": "integer"
115
111
  }
116
112
  },
@@ -104,13 +104,9 @@
104
104
  "type": "string"
105
105
  },
106
106
  "width": {
107
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
108
- "enum": [
109
- 25,
110
- 50,
111
- 75,
112
- 100
113
- ],
107
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
108
+ "maximum": 100,
109
+ "minimum": 1,
114
110
  "type": "integer"
115
111
  }
116
112
  },
@@ -222,13 +222,9 @@
222
222
  "type": "string"
223
223
  },
224
224
  "width": {
225
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
226
- "enum": [
227
- 25,
228
- 50,
229
- 75,
230
- 100
231
- ],
225
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
226
+ "maximum": 100,
227
+ "minimum": 1,
232
228
  "type": "integer"
233
229
  }
234
230
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -171,13 +171,9 @@
171
171
  "type": "string"
172
172
  },
173
173
  "width": {
174
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
175
- "enum": [
176
- 25,
177
- 50,
178
- 75,
179
- 100
180
- ],
174
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
175
+ "maximum": 100,
176
+ "minimum": 1,
181
177
  "type": "integer"
182
178
  }
183
179
  },
@@ -167,13 +167,9 @@
167
167
  "type": "string"
168
168
  },
169
169
  "width": {
170
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
171
- "enum": [
172
- 25,
173
- 50,
174
- 75,
175
- 100
176
- ],
170
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
171
+ "maximum": 100,
172
+ "minimum": 1,
177
173
  "type": "integer"
178
174
  }
179
175
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -99,13 +99,9 @@
99
99
  "type": "string"
100
100
  },
101
101
  "width": {
102
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
103
- "enum": [
104
- 25,
105
- 50,
106
- 75,
107
- 100
108
- ],
102
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
103
+ "maximum": 100,
104
+ "minimum": 1,
109
105
  "type": "integer"
110
106
  }
111
107
  },
@@ -279,13 +279,9 @@
279
279
  "type": "string"
280
280
  },
281
281
  "width": {
282
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
283
- "enum": [
284
- 25,
285
- 50,
286
- 75,
287
- 100
288
- ],
282
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
283
+ "maximum": 100,
284
+ "minimum": 1,
289
285
  "type": "integer"
290
286
  }
291
287
  },
@@ -351,7 +347,7 @@
351
347
  },
352
348
  "RelationConfig": {
353
349
  "additionalProperties": false,
354
- "description": "引用字段配置;引用其他应用中的数据。",
350
+ "description": "引用字段配置;引用其他应用中的数据。展示字段与权限以 displayFields 为准(后端 referQuestions 全量有序回写,queAuth 1=可编辑/2=隐藏/3=仅可见);displayField/visibleFields 为已废弃旧形态,apply 兼容接收一个版本窗口(displayField 同时视为双向绑定目标)。",
355
351
  "properties": {
356
352
  "beingDefaultFormulaAutoFillEnabled": {
357
353
  "description": "是否启用引用字段的默认值公式自动填充。",
@@ -389,7 +385,32 @@
389
385
  },
390
386
  "displayField": {
391
387
  "$ref": "#/$defs/FieldSelector",
392
- "description": "引用值的主展示字段。"
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"
393
414
  },
394
415
  "relationMode": {
395
416
  "default": "single",
@@ -404,8 +425,19 @@
404
425
  "minLength": 1,
405
426
  "type": "string"
406
427
  },
428
+ "twoWayBoundField": {
429
+ "description": "双向引用绑定的目标字段(后端 referQueId);null/省略 = 单向引用。get 读面在 referQueId 非空时必产出。",
430
+ "oneOf": [
431
+ {
432
+ "type": "null"
433
+ },
434
+ {
435
+ "$ref": "#/$defs/FieldSelector"
436
+ }
437
+ ]
438
+ },
407
439
  "visibleFields": {
408
- "description": "引用选择界面额外展示的字段。",
440
+ "description": "已废弃:额外展示字段;apply 兼容翻译为 displayFields 后续项,后续版本移除。",
409
441
  "items": {
410
442
  "$ref": "#/$defs/FieldSelector"
411
443
  },
@@ -414,8 +446,7 @@
414
446
  }
415
447
  },
416
448
  "required": [
417
- "targetAppKey",
418
- "displayField"
449
+ "targetAppKey"
419
450
  ],
420
451
  "type": "object"
421
452
  },