@qingflow-tech/qingflow-cli 1.1.61 → 1.1.62-beta.1

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 (95) hide show
  1. package/README.md +3 -3
  2. package/package.json +2 -1
  3. package/pyproject.toml +4 -1
  4. package/skills/qingflow-cli/SKILL.md +112 -3
  5. package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md +1 -1
  6. package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md +6 -258
  7. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +2 -2
  8. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +22 -5
  9. package/skills/qingflow-cli/reference/builder/70-portal.md +111 -36
  10. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +3 -3
  11. package/skills/qingflow-cli/reference/examples/portal/portal_apply_v1alpha1.example.json +100 -0
  12. package/skills/qingflow-cli/reference/examples/portal/portal_sections_all_types.example.json +22 -6
  13. package/src/qingflow_mcp/app_form_compat.py +3 -0
  14. package/src/qingflow_mcp/app_form_validator.py +89 -20
  15. package/src/qingflow_mcp/builder_facade/app_form.py +629 -112
  16. package/src/qingflow_mcp/builder_facade/models.py +213 -15
  17. package/src/qingflow_mcp/builder_facade/portals_schema.py +397 -0
  18. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +15 -1
  19. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +112 -38
  20. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +31 -8
  21. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_classification.json +146 -0
  22. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_extraction.json +146 -0
  23. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_generation.json +146 -0
  24. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_document_parsing.json +146 -0
  25. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_generation.json +146 -0
  26. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_recognition.json +146 -0
  27. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_machine_translation.json +146 -0
  28. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_text_summary.json +146 -0
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +6 -10
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +33 -10
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +6 -10
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +11 -18
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +4 -8
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date_duration.json +146 -0
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +4 -8
  36. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +6 -10
  37. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +4 -8
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/embed_field.json +146 -0
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/image_select.json +146 -0
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +4 -8
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/location.json +146 -0
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +4 -8
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +6 -10
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +4 -8
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +6 -10
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ocr.json +146 -0
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +4 -8
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +8 -12
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +73 -15
  50. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/rich_text.json +146 -0
  51. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +4 -8
  52. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +4 -8
  53. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +90 -29
  54. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +4 -8
  55. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +43 -0
  56. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +27 -19
  57. package/src/qingflow_mcp/builder_facade/schemas/portals/manifest.json +59 -0
  58. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/complete.json +1397 -0
  59. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/carousel.json +193 -0
  60. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/chart.json +643 -0
  61. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/favourite.json +203 -0
  62. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/filter.json +331 -0
  63. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/grid.json +265 -0
  64. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/link.json +131 -0
  65. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/task.json +199 -0
  66. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/text.json +123 -0
  67. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/view.json +196 -0
  68. package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/summary.json +800 -0
  69. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/complete.json +1 -1
  70. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/details/display.json +1 -1
  71. package/src/qingflow_mcp/builder_facade/schemas/views/v1alpha1/summary.json +1 -1
  72. package/src/qingflow_mcp/builder_facade/service.py +1367 -92
  73. package/src/qingflow_mcp/cli/commands/builder.py +120 -5
  74. package/src/qingflow_mcp/cli/formatters.py +11 -0
  75. package/src/qingflow_mcp/cli/main.py +90 -2
  76. package/src/qingflow_mcp/cli/permission_gate.py +59 -0
  77. package/src/qingflow_mcp/cloud_context.py +16 -1
  78. package/src/qingflow_mcp/entity_permissions.py +10 -0
  79. package/src/qingflow_mcp/permission_catalog.json +1210 -0
  80. package/src/qingflow_mcp/public_surface.py +69 -8
  81. package/src/qingflow_mcp/response_trim.py +2 -1
  82. package/src/qingflow_mcp/server.py +12 -6
  83. package/src/qingflow_mcp/server_app_builder.py +43 -10
  84. package/src/qingflow_mcp/server_app_user.py +9 -5
  85. package/src/qingflow_mcp/server_cloud.py +43 -7
  86. package/src/qingflow_mcp/session_store.py +14 -1
  87. package/src/qingflow_mcp/solution/compiler/icon_utils.py +73 -0
  88. package/src/qingflow_mcp/solution/executor.py +5 -2
  89. package/src/qingflow_mcp/tool_catalog.py +388 -0
  90. package/src/qingflow_mcp/tool_catalog_i18n.py +184 -0
  91. package/src/qingflow_mcp/tool_policy.py +191 -0
  92. package/src/qingflow_mcp/tools/ai_builder_tools.py +118 -20
  93. package/src/qingflow_mcp/tools/portal_tools.py +4 -54
  94. package/src/qingflow_mcp/tools/portal_writer.py +59 -0
  95. package/src/qingflow_mcp/tools/solution_tools.py +2 -0
@@ -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": {
@@ -913,6 +910,12 @@
913
910
  "null"
914
911
  ]
915
912
  },
913
+ "auditValueDescription": {
914
+ "type": [
915
+ "string",
916
+ "null"
917
+ ]
918
+ },
916
919
  "beingCanDecrypted": {
917
920
  "type": [
918
921
  "boolean",
@@ -943,6 +946,12 @@
943
946
  "null"
944
947
  ]
945
948
  },
949
+ "dataId": {
950
+ "type": [
951
+ "integer",
952
+ "null"
953
+ ]
954
+ },
946
955
  "dateType": {
947
956
  "type": [
948
957
  "integer",
@@ -961,6 +970,15 @@
961
970
  "null"
962
971
  ]
963
972
  },
973
+ "previousTableRowOrdinalList": {
974
+ "items": {
975
+ "type": "integer"
976
+ },
977
+ "type": [
978
+ "array",
979
+ "null"
980
+ ]
981
+ },
964
982
  "queId": {
965
983
  "type": [
966
984
  "integer",
@@ -979,6 +997,12 @@
979
997
  "null"
980
998
  ]
981
999
  },
1000
+ "questionOrdinal": {
1001
+ "type": [
1002
+ "integer",
1003
+ "null"
1004
+ ]
1005
+ },
982
1006
  "referValues": {
983
1007
  "items": {
984
1008
  "$ref": "#/$defs/ReferenceDefaultValue"
@@ -1278,7 +1302,7 @@
1278
1302
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
1279
1303
  },
1280
1304
  "name": {
1281
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
1305
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
1282
1306
  "minLength": 1,
1283
1307
  "type": "string"
1284
1308
  },
@@ -1299,13 +1323,9 @@
1299
1323
  "type": "string"
1300
1324
  },
1301
1325
  "width": {
1302
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
1303
- "enum": [
1304
- 25,
1305
- 50,
1306
- 75,
1307
- 100
1308
- ],
1326
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
1327
+ "maximum": 100,
1328
+ "minimum": 1,
1309
1329
  "type": "integer"
1310
1330
  }
1311
1331
  },
@@ -1316,11 +1336,11 @@
1316
1336
  "description": "段落内部字段行。",
1317
1337
  "properties": {
1318
1338
  "fields": {
1319
- "description": "本行的 1 到 4 个顶层字段。",
1339
+ "description": "本行的 1 到 12 个顶层字段(后端无每行字段数上限,按 queWidth 渲染;上限仅约束声明输入)。",
1320
1340
  "items": {
1321
1341
  "$ref": "#/$defs/TopField"
1322
1342
  },
1323
- "maxItems": 4,
1343
+ "maxItems": 12,
1324
1344
  "minItems": 1,
1325
1345
  "type": "array"
1326
1346
  }
@@ -1344,10 +1364,10 @@
1344
1364
  ]
1345
1365
  }
1346
1366
  ],
1347
- "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
1367
+ "description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。后端允许同父级同名字段,queId 是稳定身份;name 仅在唯一时可解析,命中多个同名时报 AMBIGUOUS_FIELD_SELECTOR,此时必须改用 queId。",
1348
1368
  "properties": {
1349
1369
  "name": {
1350
- "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
1370
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析,同名命中多个字段时报 AMBIGUOUS_FIELD_SELECTOR,应改用 queId。",
1351
1371
  "minLength": 1,
1352
1372
  "type": "string"
1353
1373
  },
@@ -1633,8 +1653,8 @@
1633
1653
  ]
1634
1654
  },
1635
1655
  "numberFormat": {
1636
- "description": "数字展示格式 ID。",
1637
- "minimum": 1,
1656
+ "description": "数字展示格式 ID(1 默认/2 千分位/3 百分比;0 为历史存量值——后端写链无值域校验,原样落库回读)。",
1657
+ "minimum": 0,
1638
1658
  "type": [
1639
1659
  "integer",
1640
1660
  "null"
@@ -1925,8 +1945,8 @@
1925
1945
  ]
1926
1946
  },
1927
1947
  "url": {
1928
- "description": "请求 URL;动态嵌入字段值时使用 {{key}},并在 inputs 中提供同名 source=json_path 映射。",
1929
- "minLength": 1,
1948
+ "description": "请求 URL;动态嵌入字段值时使用 {{key}},并在 inputs 中提供同名 source=json_path 映射。自定义模式(configMode=1)后端要求非空;插件模板/连接中心/轻翼智能体模式的 URL 由模板侧提供,存量声明可为空字符串(写回按读面形态透传)。",
1949
+ "minLength": 0,
1930
1950
  "type": "string"
1931
1951
  },
1932
1952
  "urlEncodedValue": {
@@ -1975,7 +1995,7 @@
1975
1995
  },
1976
1996
  "RelationConfig": {
1977
1997
  "additionalProperties": false,
1978
- "description": "引用字段配置;引用其他应用中的数据。",
1998
+ "description": "引用字段配置;引用其他应用中的数据。展示字段与权限以 displayFields 为准(后端 referQuestions 全量有序回写,queAuth 1=可编辑/2=隐藏/3=仅可见);displayField/visibleFields 为已废弃旧形态,apply 兼容接收一个版本窗口(displayField 同时视为双向绑定目标)。",
1979
1999
  "properties": {
1980
2000
  "beingDefaultFormulaAutoFillEnabled": {
1981
2001
  "description": "是否启用引用字段的默认值公式自动填充。",
@@ -2013,7 +2033,32 @@
2013
2033
  },
2014
2034
  "displayField": {
2015
2035
  "$ref": "#/$defs/FieldSelector",
2016
- "description": "引用值的主展示字段。"
2036
+ "description": "已废弃:主展示字段;apply 兼容翻译为 twoWayBoundField + displayFields 首项,后续版本移除。"
2037
+ },
2038
+ "displayFields": {
2039
+ "description": "有序展示字段全量列表(含隐藏字段),按 ordinal 保序回写为后端 referQuestions。可为空列表:空 = 双向绑定未配展示字段的合法存量形态(后端写链路对空 referQuestions 跳过插入、读面容忍空),round-trip 空↔空稳定;与已废弃 displayField/visibleFields 不可混用,条目 queId 不可重复。",
2040
+ "items": {
2041
+ "additionalProperties": false,
2042
+ "properties": {
2043
+ "auth": {
2044
+ "default": "visible",
2045
+ "description": "展示字段权限;editable=可编辑(1), hidden=隐藏(2), visible=仅可见(3);缺失按 visible。",
2046
+ "enum": [
2047
+ "editable",
2048
+ "hidden",
2049
+ "visible"
2050
+ ]
2051
+ },
2052
+ "field": {
2053
+ "$ref": "#/$defs/FieldSelector"
2054
+ }
2055
+ },
2056
+ "required": [
2057
+ "field"
2058
+ ],
2059
+ "type": "object"
2060
+ },
2061
+ "type": "array"
2017
2062
  },
2018
2063
  "relationMode": {
2019
2064
  "default": "single",
@@ -2028,8 +2073,19 @@
2028
2073
  "minLength": 1,
2029
2074
  "type": "string"
2030
2075
  },
2076
+ "twoWayBoundField": {
2077
+ "description": "双向引用绑定的目标字段(后端 referQueId);null/省略 = 单向引用。get 读面在 referQueId 非空时必产出。",
2078
+ "oneOf": [
2079
+ {
2080
+ "type": "null"
2081
+ },
2082
+ {
2083
+ "$ref": "#/$defs/FieldSelector"
2084
+ }
2085
+ ]
2086
+ },
2031
2087
  "visibleFields": {
2032
- "description": "引用选择界面额外展示的字段。",
2088
+ "description": "已废弃:额外展示字段;apply 兼容翻译为 displayFields 后续项,后续版本移除。",
2033
2089
  "items": {
2034
2090
  "$ref": "#/$defs/FieldSelector"
2035
2091
  },
@@ -2038,8 +2094,7 @@
2038
2094
  }
2039
2095
  },
2040
2096
  "required": [
2041
- "targetAppKey",
2042
- "displayField"
2097
+ "targetAppKey"
2043
2098
  ],
2044
2099
  "type": "object"
2045
2100
  },
@@ -2065,11 +2120,11 @@
2065
2120
  "description": "根级普通字段行;字段顺序即展示顺序。",
2066
2121
  "properties": {
2067
2122
  "fields": {
2068
- "description": "本行的 1 到 4 个顶层字段。",
2123
+ "description": "本行的 1 到 12 个顶层字段(后端无每行字段数上限,按 queWidth 渲染;上限仅约束声明输入)。",
2069
2124
  "items": {
2070
2125
  "$ref": "#/$defs/TopField"
2071
2126
  },
2072
- "maxItems": 4,
2127
+ "maxItems": 12,
2073
2128
  "minItems": 1,
2074
2129
  "type": "array"
2075
2130
  },
@@ -2100,11 +2155,10 @@
2100
2155
  "description": "段落判别值。"
2101
2156
  },
2102
2157
  "rows": {
2103
- "description": "段落内的非空有序字段行。",
2158
+ "description": "段落内的有序字段行;可为空数组(空 = 存量空段落形态,后端容忍,round-trip 空↔空稳定)。",
2104
2159
  "items": {
2105
2160
  "$ref": "#/$defs/FieldRow"
2106
2161
  },
2107
- "minItems": 1,
2108
2162
  "type": "array"
2109
2163
  },
2110
2164
  "sectionId": {
@@ -2385,7 +2439,10 @@
2385
2439
  "$ref": "#/$defs/NumberConfig"
2386
2440
  },
2387
2441
  "questionType": {
2388
- "const": "number"
2442
+ "enum": [
2443
+ "number",
2444
+ "amount"
2445
+ ]
2389
2446
  }
2390
2447
  },
2391
2448
  "required": [
@@ -2398,7 +2455,10 @@
2398
2455
  "$ref": "#/$defs/EmptyConfig"
2399
2456
  },
2400
2457
  "questionType": {
2401
- "const": "date"
2458
+ "enum": [
2459
+ "date",
2460
+ "datetime"
2461
+ ]
2402
2462
  }
2403
2463
  },
2404
2464
  "required": [
@@ -2702,7 +2762,21 @@
2702
2762
  "questionType": {
2703
2763
  "enum": [
2704
2764
  "date",
2705
- "datetime"
2765
+ "datetime",
2766
+ "rich_text",
2767
+ "date_duration",
2768
+ "image_select",
2769
+ "location",
2770
+ "ocr",
2771
+ "embed_field",
2772
+ "ai_content_generation",
2773
+ "ai_content_extraction",
2774
+ "ai_content_classification",
2775
+ "ai_machine_translation",
2776
+ "ai_image_recognition",
2777
+ "ai_image_generation",
2778
+ "ai_document_parsing",
2779
+ "ai_text_summary"
2706
2780
  ]
2707
2781
  }
2708
2782
  },
@@ -118,6 +118,12 @@
118
118
  "null"
119
119
  ]
120
120
  },
121
+ "auditValueDescription": {
122
+ "type": [
123
+ "string",
124
+ "null"
125
+ ]
126
+ },
121
127
  "beingCanDecrypted": {
122
128
  "type": [
123
129
  "boolean",
@@ -148,6 +154,12 @@
148
154
  "null"
149
155
  ]
150
156
  },
157
+ "dataId": {
158
+ "type": [
159
+ "integer",
160
+ "null"
161
+ ]
162
+ },
151
163
  "dateType": {
152
164
  "type": [
153
165
  "integer",
@@ -166,6 +178,15 @@
166
178
  "null"
167
179
  ]
168
180
  },
181
+ "previousTableRowOrdinalList": {
182
+ "items": {
183
+ "type": "integer"
184
+ },
185
+ "type": [
186
+ "array",
187
+ "null"
188
+ ]
189
+ },
169
190
  "queId": {
170
191
  "type": [
171
192
  "integer",
@@ -184,6 +205,12 @@
184
205
  "null"
185
206
  ]
186
207
  },
208
+ "questionOrdinal": {
209
+ "type": [
210
+ "integer",
211
+ "null"
212
+ ]
213
+ },
187
214
  "referValues": {
188
215
  "items": {
189
216
  "$ref": "#/$defs/ReferenceDefaultValue"
@@ -301,7 +328,7 @@
301
328
  "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
302
329
  },
303
330
  "name": {
304
- "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
331
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
305
332
  "minLength": 1,
306
333
  "type": "string"
307
334
  },
@@ -322,13 +349,9 @@
322
349
  "type": "string"
323
350
  },
324
351
  "width": {
325
- "description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
326
- "enum": [
327
- 25,
328
- 50,
329
- 75,
330
- 100
331
- ],
352
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
353
+ "maximum": 100,
354
+ "minimum": 1,
332
355
  "type": "integer"
333
356
  }
334
357
  },
@@ -0,0 +1,146 @@
1
+ {
2
+ "$defs": {
3
+ "EmptyConfig": {
4
+ "additionalProperties": false,
5
+ "description": "该字段类型没有特殊配置。",
6
+ "type": "object"
7
+ },
8
+ "FieldCommon": {
9
+ "allOf": [
10
+ {
11
+ "if": {
12
+ "properties": {
13
+ "defaultType": {
14
+ "const": 2
15
+ }
16
+ },
17
+ "required": [
18
+ "defaultType"
19
+ ]
20
+ },
21
+ "then": {
22
+ "properties": {
23
+ "defaultValue": {
24
+ "type": "null"
25
+ }
26
+ }
27
+ }
28
+ },
29
+ {
30
+ "if": {
31
+ "properties": {
32
+ "defaultType": {
33
+ "const": 3
34
+ }
35
+ },
36
+ "required": [
37
+ "defaultType"
38
+ ]
39
+ },
40
+ "then": {
41
+ "properties": {
42
+ "defaultValue": {
43
+ "minLength": 1,
44
+ "type": [
45
+ "string",
46
+ "null"
47
+ ]
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ],
53
+ "anyOf": [
54
+ {
55
+ "required": [
56
+ "queId"
57
+ ]
58
+ },
59
+ {
60
+ "required": [
61
+ "name"
62
+ ]
63
+ }
64
+ ],
65
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
66
+ "properties": {
67
+ "beingRequired": {
68
+ "description": "该字段是否必填;缺失时保留已有字段当前值。",
69
+ "type": "boolean"
70
+ },
71
+ "defaultType": {
72
+ "default": 1,
73
+ "description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
74
+ "enum": [
75
+ 1,
76
+ 2,
77
+ 3
78
+ ],
79
+ "type": "integer"
80
+ },
81
+ "defaultValue": {
82
+ "$ref": "#/$defs/ScalarDefaultValue",
83
+ "description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
84
+ },
85
+ "name": {
86
+ "description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同父级允许同名(后端以 queId 为字段身份),配置引用建议携带 queId。",
87
+ "minLength": 1,
88
+ "type": "string"
89
+ },
90
+ "queId": {
91
+ "description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
92
+ "minimum": 1,
93
+ "type": "integer"
94
+ },
95
+ "questionDescription": {
96
+ "description": "字段说明;null 或空字符串表示清空。",
97
+ "type": [
98
+ "string",
99
+ "null"
100
+ ]
101
+ },
102
+ "questionType": {
103
+ "description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
104
+ "type": "string"
105
+ },
106
+ "width": {
107
+ "description": "字段在所在行的宽度百分比(1-100 整数);后端不校验总和与取值,存量数据存在 33/34 等三等分布值。",
108
+ "maximum": 100,
109
+ "minimum": 1,
110
+ "type": "integer"
111
+ }
112
+ },
113
+ "type": "object"
114
+ },
115
+ "ScalarDefaultValue": {
116
+ "description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。defaultType 为 3 时,通过 AppForm Schema 查询能力传入当前 schema_version 并设置 schema_kind=formula 获取公式语法、字段引用、运算符和全部函数说明;CLI 使用 builder app-form schema --schema-kind formula。需要配置结构化默认值时,传入当前 schema_version,并将字段的 questionType 作为 field_type 获取字段详细 Schema。",
117
+ "type": [
118
+ "null",
119
+ "string"
120
+ ]
121
+ }
122
+ },
123
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/ai_content_classification.json",
124
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
125
+ "allOf": [
126
+ {
127
+ "$ref": "#/$defs/FieldCommon"
128
+ },
129
+ {
130
+ "properties": {
131
+ "config": {
132
+ "$ref": "#/$defs/EmptyConfig"
133
+ },
134
+ "questionType": {
135
+ "const": "ai_content_classification"
136
+ }
137
+ },
138
+ "required": [
139
+ "questionType"
140
+ ]
141
+ }
142
+ ],
143
+ "title": "Qingflow AppForm v1alpha1 ai_content_classification field",
144
+ "type": "object",
145
+ "unevaluatedProperties": false
146
+ }