@qingflow-tech/qingflow-cli 1.1.61-beta.4 → 1.1.61-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.
- package/README.md +3 -3
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +13 -0
- package/skills/qingflow-cli/reference/builder/70-portal.md +37 -16
- package/skills/qingflow-cli/reference/examples/portal/portal_apply_v1alpha1.example.json +100 -0
- package/skills/qingflow-cli/reference/examples/portal/portal_sections_all_types.example.json +6 -7
- package/src/qingflow_mcp/app_form_validator.py +20 -3
- package/src/qingflow_mcp/builder_facade/app_form.py +137 -17
- package/src/qingflow_mcp/builder_facade/models.py +164 -13
- package/src/qingflow_mcp/builder_facade/portals_schema.py +397 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +14 -1
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +49 -9
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_classification.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_extraction.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_generation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_document_parsing.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_generation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_recognition.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_machine_translation.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_text_summary.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date_duration.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/embed_field.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/image_select.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/location.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ocr.json +146 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +2 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +27 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +29 -2
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +20 -7
- package/src/qingflow_mcp/builder_facade/schemas/portals/manifest.json +59 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/complete.json +1397 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/carousel.json +193 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/chart.json +643 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/favourite.json +203 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/filter.json +268 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/grid.json +265 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/link.json +131 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/task.json +199 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/text.json +123 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/components/view.json +196 -0
- package/src/qingflow_mcp/builder_facade/schemas/portals/v1alpha1/summary.json +800 -0
- package/src/qingflow_mcp/builder_facade/service.py +1104 -71
- package/src/qingflow_mcp/cli/commands/builder.py +114 -5
- package/src/qingflow_mcp/public_surface.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +32 -1
- package/src/qingflow_mcp/solution/compiler/icon_utils.py +73 -0
- package/src/qingflow_mcp/solution/executor.py +5 -2
- package/src/qingflow_mcp/tools/ai_builder_tools.py +110 -12
- package/src/qingflow_mcp/tools/portal_tools.py +4 -54
- package/src/qingflow_mcp/tools/portal_writer.py +59 -0
- package/src/qingflow_mcp/tools/solution_tools.py +2 -0
|
@@ -29,7 +29,20 @@
|
|
|
29
29
|
"code_block",
|
|
30
30
|
"data_relation",
|
|
31
31
|
"relation",
|
|
32
|
-
"subtable"
|
|
32
|
+
"subtable",
|
|
33
|
+
"date_duration",
|
|
34
|
+
"image_select",
|
|
35
|
+
"location",
|
|
36
|
+
"ocr",
|
|
37
|
+
"embed_field",
|
|
38
|
+
"ai_content_generation",
|
|
39
|
+
"ai_content_extraction",
|
|
40
|
+
"ai_content_classification",
|
|
41
|
+
"ai_machine_translation",
|
|
42
|
+
"ai_image_recognition",
|
|
43
|
+
"ai_image_generation",
|
|
44
|
+
"ai_document_parsing",
|
|
45
|
+
"ai_text_summary"
|
|
33
46
|
],
|
|
34
47
|
"normalizerVersion": "v1alpha1",
|
|
35
48
|
"schemaKinds": [
|
|
@@ -910,6 +910,12 @@
|
|
|
910
910
|
"null"
|
|
911
911
|
]
|
|
912
912
|
},
|
|
913
|
+
"auditValueDescription": {
|
|
914
|
+
"type": [
|
|
915
|
+
"string",
|
|
916
|
+
"null"
|
|
917
|
+
]
|
|
918
|
+
},
|
|
913
919
|
"beingCanDecrypted": {
|
|
914
920
|
"type": [
|
|
915
921
|
"boolean",
|
|
@@ -940,6 +946,12 @@
|
|
|
940
946
|
"null"
|
|
941
947
|
]
|
|
942
948
|
},
|
|
949
|
+
"dataId": {
|
|
950
|
+
"type": [
|
|
951
|
+
"integer",
|
|
952
|
+
"null"
|
|
953
|
+
]
|
|
954
|
+
},
|
|
943
955
|
"dateType": {
|
|
944
956
|
"type": [
|
|
945
957
|
"integer",
|
|
@@ -958,6 +970,15 @@
|
|
|
958
970
|
"null"
|
|
959
971
|
]
|
|
960
972
|
},
|
|
973
|
+
"previousTableRowOrdinalList": {
|
|
974
|
+
"items": {
|
|
975
|
+
"type": "integer"
|
|
976
|
+
},
|
|
977
|
+
"type": [
|
|
978
|
+
"array",
|
|
979
|
+
"null"
|
|
980
|
+
]
|
|
981
|
+
},
|
|
961
982
|
"queId": {
|
|
962
983
|
"type": [
|
|
963
984
|
"integer",
|
|
@@ -976,6 +997,12 @@
|
|
|
976
997
|
"null"
|
|
977
998
|
]
|
|
978
999
|
},
|
|
1000
|
+
"questionOrdinal": {
|
|
1001
|
+
"type": [
|
|
1002
|
+
"integer",
|
|
1003
|
+
"null"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
979
1006
|
"referValues": {
|
|
980
1007
|
"items": {
|
|
981
1008
|
"$ref": "#/$defs/ReferenceDefaultValue"
|
|
@@ -1309,11 +1336,11 @@
|
|
|
1309
1336
|
"description": "段落内部字段行。",
|
|
1310
1337
|
"properties": {
|
|
1311
1338
|
"fields": {
|
|
1312
|
-
"description": "本行的 1 到
|
|
1339
|
+
"description": "本行的 1 到 12 个顶层字段(后端无每行字段数上限,按 queWidth 渲染;上限仅约束声明输入)。",
|
|
1313
1340
|
"items": {
|
|
1314
1341
|
"$ref": "#/$defs/TopField"
|
|
1315
1342
|
},
|
|
1316
|
-
"maxItems":
|
|
1343
|
+
"maxItems": 12,
|
|
1317
1344
|
"minItems": 1,
|
|
1318
1345
|
"type": "array"
|
|
1319
1346
|
}
|
|
@@ -1626,8 +1653,8 @@
|
|
|
1626
1653
|
]
|
|
1627
1654
|
},
|
|
1628
1655
|
"numberFormat": {
|
|
1629
|
-
"description": "数字展示格式 ID。",
|
|
1630
|
-
"minimum":
|
|
1656
|
+
"description": "数字展示格式 ID(1 默认/2 千分位/3 百分比;0 为历史存量值——后端写链无值域校验,原样落库回读)。",
|
|
1657
|
+
"minimum": 0,
|
|
1631
1658
|
"type": [
|
|
1632
1659
|
"integer",
|
|
1633
1660
|
"null"
|
|
@@ -1918,8 +1945,8 @@
|
|
|
1918
1945
|
]
|
|
1919
1946
|
},
|
|
1920
1947
|
"url": {
|
|
1921
|
-
"description": "请求 URL;动态嵌入字段值时使用 {{key}},并在 inputs 中提供同名 source=json_path
|
|
1922
|
-
"minLength":
|
|
1948
|
+
"description": "请求 URL;动态嵌入字段值时使用 {{key}},并在 inputs 中提供同名 source=json_path 映射。自定义模式(configMode=1)后端要求非空;插件模板/连接中心/轻翼智能体模式的 URL 由模板侧提供,存量声明可为空字符串(写回按读面形态透传)。",
|
|
1949
|
+
"minLength": 0,
|
|
1923
1950
|
"type": "string"
|
|
1924
1951
|
},
|
|
1925
1952
|
"urlEncodedValue": {
|
|
@@ -2093,11 +2120,11 @@
|
|
|
2093
2120
|
"description": "根级普通字段行;字段顺序即展示顺序。",
|
|
2094
2121
|
"properties": {
|
|
2095
2122
|
"fields": {
|
|
2096
|
-
"description": "本行的 1 到
|
|
2123
|
+
"description": "本行的 1 到 12 个顶层字段(后端无每行字段数上限,按 queWidth 渲染;上限仅约束声明输入)。",
|
|
2097
2124
|
"items": {
|
|
2098
2125
|
"$ref": "#/$defs/TopField"
|
|
2099
2126
|
},
|
|
2100
|
-
"maxItems":
|
|
2127
|
+
"maxItems": 12,
|
|
2101
2128
|
"minItems": 1,
|
|
2102
2129
|
"type": "array"
|
|
2103
2130
|
},
|
|
@@ -2736,7 +2763,20 @@
|
|
|
2736
2763
|
"enum": [
|
|
2737
2764
|
"date",
|
|
2738
2765
|
"datetime",
|
|
2739
|
-
"rich_text"
|
|
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"
|
|
2740
2780
|
]
|
|
2741
2781
|
}
|
|
2742
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"
|
|
@@ -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
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_extraction.json
ADDED
|
@@ -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_extraction.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_extraction"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_content_extraction field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_content_generation.json
ADDED
|
@@ -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_generation.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_generation"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_content_generation field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|