@qingflow-tech/qingflow-cli 1.1.43-beta.3 → 1.1.43-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-app-form/SKILL.md +12 -9
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +15 -13
- package/src/qingflow_mcp/app_form_compat.py +11 -27
- package/src/qingflow_mcp/app_form_validator.py +298 -35
- package/src/qingflow_mcp/builder_facade/app_form.py +777 -150
- package/src/qingflow_mcp/builder_facade/app_form_schema.py +164 -8
- package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +5 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +299 -239
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +82 -30
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +113 -37
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +87 -64
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +83 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +83 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +95 -40
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +100 -28
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +201 -111
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +82 -27
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/formula.json +1594 -0
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +143 -161
- package/src/qingflow_mcp/builder_facade/service.py +3 -2
- package/src/qingflow_mcp/cli/commands/builder.py +2 -0
- package/src/qingflow_mcp/response_trim.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +9 -4
- package/src/qingflow_mcp/tools/ai_builder_tools.py +13 -3
|
@@ -6,15 +6,71 @@
|
|
|
6
6
|
"type": "object"
|
|
7
7
|
},
|
|
8
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
|
+
],
|
|
9
65
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
10
66
|
"properties": {
|
|
11
|
-
"
|
|
12
|
-
"description": "
|
|
67
|
+
"beingRequired": {
|
|
68
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
13
69
|
"type": "boolean"
|
|
14
70
|
},
|
|
15
71
|
"defaultType": {
|
|
16
72
|
"default": 1,
|
|
17
|
-
"description": "
|
|
73
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
18
74
|
"enum": [
|
|
19
75
|
1,
|
|
20
76
|
2,
|
|
@@ -24,47 +80,46 @@
|
|
|
24
80
|
},
|
|
25
81
|
"defaultValue": {
|
|
26
82
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
27
|
-
"description": "
|
|
28
|
-
},
|
|
29
|
-
"description": {
|
|
30
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
31
|
-
"type": [
|
|
32
|
-
"string",
|
|
33
|
-
"null"
|
|
34
|
-
]
|
|
83
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
35
84
|
},
|
|
36
85
|
"name": {
|
|
37
|
-
"description": "
|
|
86
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
38
87
|
"minLength": 1,
|
|
39
88
|
"type": "string"
|
|
40
89
|
},
|
|
41
90
|
"queId": {
|
|
42
|
-
"description": "已有字段的后端 ID
|
|
91
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
43
92
|
"minimum": 1,
|
|
44
93
|
"type": "integer"
|
|
45
94
|
},
|
|
46
|
-
"
|
|
47
|
-
"description": "
|
|
48
|
-
"type":
|
|
95
|
+
"questionDescription": {
|
|
96
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
97
|
+
"type": [
|
|
98
|
+
"string",
|
|
99
|
+
"null"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"questionType": {
|
|
103
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
104
|
+
"type": "string"
|
|
49
105
|
},
|
|
50
106
|
"width": {
|
|
51
|
-
"description": "
|
|
52
|
-
"
|
|
53
|
-
|
|
107
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
108
|
+
"enum": [
|
|
109
|
+
25,
|
|
110
|
+
50,
|
|
111
|
+
75,
|
|
112
|
+
100
|
|
113
|
+
],
|
|
54
114
|
"type": "integer"
|
|
55
115
|
}
|
|
56
116
|
},
|
|
57
|
-
"required": [
|
|
58
|
-
"name"
|
|
59
|
-
],
|
|
60
117
|
"type": "object"
|
|
61
118
|
},
|
|
62
119
|
"ScalarDefaultValue": {
|
|
63
|
-
"description": "
|
|
120
|
+
"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。",
|
|
64
121
|
"type": [
|
|
65
122
|
"null",
|
|
66
|
-
"boolean",
|
|
67
|
-
"number",
|
|
68
123
|
"string"
|
|
69
124
|
]
|
|
70
125
|
}
|
|
@@ -80,12 +135,12 @@
|
|
|
80
135
|
"config": {
|
|
81
136
|
"$ref": "#/$defs/EmptyConfig"
|
|
82
137
|
},
|
|
83
|
-
"
|
|
138
|
+
"questionType": {
|
|
84
139
|
"const": "datetime"
|
|
85
140
|
}
|
|
86
141
|
},
|
|
87
142
|
"required": [
|
|
88
|
-
"
|
|
143
|
+
"questionType"
|
|
89
144
|
]
|
|
90
145
|
}
|
|
91
146
|
],
|
|
@@ -124,15 +124,71 @@
|
|
|
124
124
|
"type": "object"
|
|
125
125
|
},
|
|
126
126
|
"FieldCommon": {
|
|
127
|
+
"allOf": [
|
|
128
|
+
{
|
|
129
|
+
"if": {
|
|
130
|
+
"properties": {
|
|
131
|
+
"defaultType": {
|
|
132
|
+
"const": 2
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"defaultType"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"then": {
|
|
140
|
+
"properties": {
|
|
141
|
+
"defaultValue": {
|
|
142
|
+
"type": "null"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"if": {
|
|
149
|
+
"properties": {
|
|
150
|
+
"defaultType": {
|
|
151
|
+
"const": 3
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"defaultType"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"then": {
|
|
159
|
+
"properties": {
|
|
160
|
+
"defaultValue": {
|
|
161
|
+
"minLength": 1,
|
|
162
|
+
"type": [
|
|
163
|
+
"string",
|
|
164
|
+
"null"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"anyOf": [
|
|
172
|
+
{
|
|
173
|
+
"required": [
|
|
174
|
+
"queId"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"required": [
|
|
179
|
+
"name"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
],
|
|
127
183
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
128
184
|
"properties": {
|
|
129
|
-
"
|
|
130
|
-
"description": "
|
|
185
|
+
"beingRequired": {
|
|
186
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
131
187
|
"type": "boolean"
|
|
132
188
|
},
|
|
133
189
|
"defaultType": {
|
|
134
190
|
"default": 1,
|
|
135
|
-
"description": "
|
|
191
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
136
192
|
"enum": [
|
|
137
193
|
1,
|
|
138
194
|
2,
|
|
@@ -142,39 +198,40 @@
|
|
|
142
198
|
},
|
|
143
199
|
"defaultValue": {
|
|
144
200
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
145
|
-
"description": "
|
|
146
|
-
},
|
|
147
|
-
"description": {
|
|
148
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
149
|
-
"type": [
|
|
150
|
-
"string",
|
|
151
|
-
"null"
|
|
152
|
-
]
|
|
201
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
153
202
|
},
|
|
154
203
|
"name": {
|
|
155
|
-
"description": "
|
|
204
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
156
205
|
"minLength": 1,
|
|
157
206
|
"type": "string"
|
|
158
207
|
},
|
|
159
208
|
"queId": {
|
|
160
|
-
"description": "已有字段的后端 ID
|
|
209
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
161
210
|
"minimum": 1,
|
|
162
211
|
"type": "integer"
|
|
163
212
|
},
|
|
164
|
-
"
|
|
165
|
-
"description": "
|
|
166
|
-
"type":
|
|
213
|
+
"questionDescription": {
|
|
214
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
215
|
+
"type": [
|
|
216
|
+
"string",
|
|
217
|
+
"null"
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"questionType": {
|
|
221
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
222
|
+
"type": "string"
|
|
167
223
|
},
|
|
168
224
|
"width": {
|
|
169
|
-
"description": "
|
|
170
|
-
"
|
|
171
|
-
|
|
225
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
226
|
+
"enum": [
|
|
227
|
+
25,
|
|
228
|
+
50,
|
|
229
|
+
75,
|
|
230
|
+
100
|
|
231
|
+
],
|
|
172
232
|
"type": "integer"
|
|
173
233
|
}
|
|
174
234
|
},
|
|
175
|
-
"required": [
|
|
176
|
-
"name"
|
|
177
|
-
],
|
|
178
235
|
"type": "object"
|
|
179
236
|
},
|
|
180
237
|
"FieldSelector": {
|
|
@@ -191,7 +248,7 @@
|
|
|
191
248
|
]
|
|
192
249
|
}
|
|
193
250
|
],
|
|
194
|
-
"description": "
|
|
251
|
+
"description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
|
|
195
252
|
"properties": {
|
|
196
253
|
"name": {
|
|
197
254
|
"description": "字段名称;仅在当前作用域内唯一时可用于解析。",
|
|
@@ -207,11 +264,9 @@
|
|
|
207
264
|
"type": "object"
|
|
208
265
|
},
|
|
209
266
|
"ScalarDefaultValue": {
|
|
210
|
-
"description": "
|
|
267
|
+
"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。",
|
|
211
268
|
"type": [
|
|
212
269
|
"null",
|
|
213
|
-
"boolean",
|
|
214
|
-
"number",
|
|
215
270
|
"string"
|
|
216
271
|
]
|
|
217
272
|
},
|
|
@@ -274,12 +329,12 @@
|
|
|
274
329
|
"config": {
|
|
275
330
|
"$ref": "#/$defs/DepartmentConfig"
|
|
276
331
|
},
|
|
277
|
-
"
|
|
332
|
+
"questionType": {
|
|
278
333
|
"const": "department"
|
|
279
334
|
}
|
|
280
335
|
},
|
|
281
336
|
"required": [
|
|
282
|
-
"
|
|
337
|
+
"questionType",
|
|
283
338
|
"config"
|
|
284
339
|
]
|
|
285
340
|
}
|
|
@@ -1,15 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$defs": {
|
|
3
3
|
"FieldCommon": {
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"if": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"defaultType": {
|
|
9
|
+
"const": 2
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"defaultType"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"then": {
|
|
17
|
+
"properties": {
|
|
18
|
+
"defaultValue": {
|
|
19
|
+
"type": "null"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"if": {
|
|
26
|
+
"properties": {
|
|
27
|
+
"defaultType": {
|
|
28
|
+
"const": 3
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": [
|
|
32
|
+
"defaultType"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"then": {
|
|
36
|
+
"properties": {
|
|
37
|
+
"defaultValue": {
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"required": [
|
|
51
|
+
"queId"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"required": [
|
|
56
|
+
"name"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
],
|
|
4
60
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
5
61
|
"properties": {
|
|
6
|
-
"
|
|
7
|
-
"description": "
|
|
62
|
+
"beingRequired": {
|
|
63
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
8
64
|
"type": "boolean"
|
|
9
65
|
},
|
|
10
66
|
"defaultType": {
|
|
11
67
|
"default": 1,
|
|
12
|
-
"description": "
|
|
68
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
13
69
|
"enum": [
|
|
14
70
|
1,
|
|
15
71
|
2,
|
|
@@ -19,47 +75,46 @@
|
|
|
19
75
|
},
|
|
20
76
|
"defaultValue": {
|
|
21
77
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
22
|
-
"description": "
|
|
23
|
-
},
|
|
24
|
-
"description": {
|
|
25
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
26
|
-
"type": [
|
|
27
|
-
"string",
|
|
28
|
-
"null"
|
|
29
|
-
]
|
|
78
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
30
79
|
},
|
|
31
80
|
"name": {
|
|
32
|
-
"description": "
|
|
81
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
33
82
|
"minLength": 1,
|
|
34
83
|
"type": "string"
|
|
35
84
|
},
|
|
36
85
|
"queId": {
|
|
37
|
-
"description": "已有字段的后端 ID
|
|
86
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
38
87
|
"minimum": 1,
|
|
39
88
|
"type": "integer"
|
|
40
89
|
},
|
|
41
|
-
"
|
|
42
|
-
"description": "
|
|
43
|
-
"type":
|
|
90
|
+
"questionDescription": {
|
|
91
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
92
|
+
"type": [
|
|
93
|
+
"string",
|
|
94
|
+
"null"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"questionType": {
|
|
98
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
99
|
+
"type": "string"
|
|
44
100
|
},
|
|
45
101
|
"width": {
|
|
46
|
-
"description": "
|
|
47
|
-
"
|
|
48
|
-
|
|
102
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
103
|
+
"enum": [
|
|
104
|
+
25,
|
|
105
|
+
50,
|
|
106
|
+
75,
|
|
107
|
+
100
|
|
108
|
+
],
|
|
49
109
|
"type": "integer"
|
|
50
110
|
}
|
|
51
111
|
},
|
|
52
|
-
"required": [
|
|
53
|
-
"name"
|
|
54
|
-
],
|
|
55
112
|
"type": "object"
|
|
56
113
|
},
|
|
57
114
|
"ScalarDefaultValue": {
|
|
58
|
-
"description": "
|
|
115
|
+
"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。",
|
|
59
116
|
"type": [
|
|
60
117
|
"null",
|
|
61
|
-
"boolean",
|
|
62
|
-
"number",
|
|
63
118
|
"string"
|
|
64
119
|
]
|
|
65
120
|
},
|
|
@@ -120,12 +175,12 @@
|
|
|
120
175
|
"config": {
|
|
121
176
|
"$ref": "#/$defs/TextConfig"
|
|
122
177
|
},
|
|
123
|
-
"
|
|
178
|
+
"questionType": {
|
|
124
179
|
"const": "email"
|
|
125
180
|
}
|
|
126
181
|
},
|
|
127
182
|
"required": [
|
|
128
|
-
"
|
|
183
|
+
"questionType"
|
|
129
184
|
]
|
|
130
185
|
}
|
|
131
186
|
],
|
|
@@ -1,15 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$defs": {
|
|
3
3
|
"FieldCommon": {
|
|
4
|
+
"allOf": [
|
|
5
|
+
{
|
|
6
|
+
"if": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"defaultType": {
|
|
9
|
+
"const": 2
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": [
|
|
13
|
+
"defaultType"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"then": {
|
|
17
|
+
"properties": {
|
|
18
|
+
"defaultValue": {
|
|
19
|
+
"type": "null"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"if": {
|
|
26
|
+
"properties": {
|
|
27
|
+
"defaultType": {
|
|
28
|
+
"const": 3
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": [
|
|
32
|
+
"defaultType"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"then": {
|
|
36
|
+
"properties": {
|
|
37
|
+
"defaultValue": {
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"required": [
|
|
51
|
+
"queId"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"required": [
|
|
56
|
+
"name"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
],
|
|
4
60
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
5
61
|
"properties": {
|
|
6
|
-
"
|
|
7
|
-
"description": "
|
|
62
|
+
"beingRequired": {
|
|
63
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
8
64
|
"type": "boolean"
|
|
9
65
|
},
|
|
10
66
|
"defaultType": {
|
|
11
67
|
"default": 1,
|
|
12
|
-
"description": "
|
|
68
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
13
69
|
"enum": [
|
|
14
70
|
1,
|
|
15
71
|
2,
|
|
@@ -19,47 +75,46 @@
|
|
|
19
75
|
},
|
|
20
76
|
"defaultValue": {
|
|
21
77
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
22
|
-
"description": "
|
|
23
|
-
},
|
|
24
|
-
"description": {
|
|
25
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
26
|
-
"type": [
|
|
27
|
-
"string",
|
|
28
|
-
"null"
|
|
29
|
-
]
|
|
78
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
30
79
|
},
|
|
31
80
|
"name": {
|
|
32
|
-
"description": "
|
|
81
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
33
82
|
"minLength": 1,
|
|
34
83
|
"type": "string"
|
|
35
84
|
},
|
|
36
85
|
"queId": {
|
|
37
|
-
"description": "已有字段的后端 ID
|
|
86
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
38
87
|
"minimum": 1,
|
|
39
88
|
"type": "integer"
|
|
40
89
|
},
|
|
41
|
-
"
|
|
42
|
-
"description": "
|
|
43
|
-
"type":
|
|
90
|
+
"questionDescription": {
|
|
91
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
92
|
+
"type": [
|
|
93
|
+
"string",
|
|
94
|
+
"null"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"questionType": {
|
|
98
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
99
|
+
"type": "string"
|
|
44
100
|
},
|
|
45
101
|
"width": {
|
|
46
|
-
"description": "
|
|
47
|
-
"
|
|
48
|
-
|
|
102
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
103
|
+
"enum": [
|
|
104
|
+
25,
|
|
105
|
+
50,
|
|
106
|
+
75,
|
|
107
|
+
100
|
|
108
|
+
],
|
|
49
109
|
"type": "integer"
|
|
50
110
|
}
|
|
51
111
|
},
|
|
52
|
-
"required": [
|
|
53
|
-
"name"
|
|
54
|
-
],
|
|
55
112
|
"type": "object"
|
|
56
113
|
},
|
|
57
114
|
"ScalarDefaultValue": {
|
|
58
|
-
"description": "
|
|
115
|
+
"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。",
|
|
59
116
|
"type": [
|
|
60
117
|
"null",
|
|
61
|
-
"boolean",
|
|
62
|
-
"number",
|
|
63
118
|
"string"
|
|
64
119
|
]
|
|
65
120
|
},
|
|
@@ -120,12 +175,12 @@
|
|
|
120
175
|
"config": {
|
|
121
176
|
"$ref": "#/$defs/TextConfig"
|
|
122
177
|
},
|
|
123
|
-
"
|
|
178
|
+
"questionType": {
|
|
124
179
|
"const": "link"
|
|
125
180
|
}
|
|
126
181
|
},
|
|
127
182
|
"required": [
|
|
128
|
-
"
|
|
183
|
+
"questionType"
|
|
129
184
|
]
|
|
130
185
|
}
|
|
131
186
|
],
|