@qingflow-tech/qingflow-cli 1.1.43-beta.3 → 1.1.43-beta.4
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 +7 -5
- package/skills/qingflow-cli/reference/builder/30-schema-fields.md +14 -13
- package/src/qingflow_mcp/app_form_compat.py +11 -27
- package/src/qingflow_mcp/app_form_validator.py +201 -35
- package/src/qingflow_mcp/builder_facade/app_form.py +762 -148
- package/src/qingflow_mcp/builder_facade/app_form_schema.py +114 -3
- package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +310 -245
- 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 +85 -32
- 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 +85 -32
- 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 +212 -117
- 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/summary.json +143 -161
- package/src/qingflow_mcp/builder_facade/service.py +3 -2
- package/src/qingflow_mcp/response_trim.py +2 -0
- package/src/qingflow_mcp/server_app_builder.py +2 -2
|
@@ -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 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
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": "long_text"
|
|
125
180
|
}
|
|
126
181
|
},
|
|
127
182
|
"required": [
|
|
128
|
-
"
|
|
183
|
+
"questionType"
|
|
129
184
|
]
|
|
130
185
|
}
|
|
131
186
|
],
|
|
@@ -73,15 +73,71 @@
|
|
|
73
73
|
"type": "object"
|
|
74
74
|
},
|
|
75
75
|
"FieldCommon": {
|
|
76
|
+
"allOf": [
|
|
77
|
+
{
|
|
78
|
+
"if": {
|
|
79
|
+
"properties": {
|
|
80
|
+
"defaultType": {
|
|
81
|
+
"const": 2
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"defaultType"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"then": {
|
|
89
|
+
"properties": {
|
|
90
|
+
"defaultValue": {
|
|
91
|
+
"type": "null"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"if": {
|
|
98
|
+
"properties": {
|
|
99
|
+
"defaultType": {
|
|
100
|
+
"const": 3
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"defaultType"
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"then": {
|
|
108
|
+
"properties": {
|
|
109
|
+
"defaultValue": {
|
|
110
|
+
"minLength": 1,
|
|
111
|
+
"type": [
|
|
112
|
+
"string",
|
|
113
|
+
"null"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"required": [
|
|
123
|
+
"queId"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"required": [
|
|
128
|
+
"name"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
],
|
|
76
132
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
77
133
|
"properties": {
|
|
78
|
-
"
|
|
79
|
-
"description": "
|
|
134
|
+
"beingRequired": {
|
|
135
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
80
136
|
"type": "boolean"
|
|
81
137
|
},
|
|
82
138
|
"defaultType": {
|
|
83
139
|
"default": 1,
|
|
84
|
-
"description": "
|
|
140
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
85
141
|
"enum": [
|
|
86
142
|
1,
|
|
87
143
|
2,
|
|
@@ -91,39 +147,40 @@
|
|
|
91
147
|
},
|
|
92
148
|
"defaultValue": {
|
|
93
149
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
94
|
-
"description": "
|
|
95
|
-
},
|
|
96
|
-
"description": {
|
|
97
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
98
|
-
"type": [
|
|
99
|
-
"string",
|
|
100
|
-
"null"
|
|
101
|
-
]
|
|
150
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
102
151
|
},
|
|
103
152
|
"name": {
|
|
104
|
-
"description": "
|
|
153
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
105
154
|
"minLength": 1,
|
|
106
155
|
"type": "string"
|
|
107
156
|
},
|
|
108
157
|
"queId": {
|
|
109
|
-
"description": "已有字段的后端 ID
|
|
158
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
110
159
|
"minimum": 1,
|
|
111
160
|
"type": "integer"
|
|
112
161
|
},
|
|
113
|
-
"
|
|
114
|
-
"description": "
|
|
115
|
-
"type":
|
|
162
|
+
"questionDescription": {
|
|
163
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
164
|
+
"type": [
|
|
165
|
+
"string",
|
|
166
|
+
"null"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"questionType": {
|
|
170
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
171
|
+
"type": "string"
|
|
116
172
|
},
|
|
117
173
|
"width": {
|
|
118
|
-
"description": "
|
|
119
|
-
"
|
|
120
|
-
|
|
174
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
175
|
+
"enum": [
|
|
176
|
+
25,
|
|
177
|
+
50,
|
|
178
|
+
75,
|
|
179
|
+
100
|
|
180
|
+
],
|
|
121
181
|
"type": "integer"
|
|
122
182
|
}
|
|
123
183
|
},
|
|
124
|
-
"required": [
|
|
125
|
-
"name"
|
|
126
|
-
],
|
|
127
184
|
"type": "object"
|
|
128
185
|
},
|
|
129
186
|
"FieldSelector": {
|
|
@@ -140,7 +197,7 @@
|
|
|
140
197
|
]
|
|
141
198
|
}
|
|
142
199
|
],
|
|
143
|
-
"description": "
|
|
200
|
+
"description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
|
|
144
201
|
"properties": {
|
|
145
202
|
"name": {
|
|
146
203
|
"description": "字段名称;仅在当前作用域内唯一时可用于解析。",
|
|
@@ -347,11 +404,9 @@
|
|
|
347
404
|
"type": "object"
|
|
348
405
|
},
|
|
349
406
|
"ScalarDefaultValue": {
|
|
350
|
-
"description": "
|
|
407
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
351
408
|
"type": [
|
|
352
409
|
"null",
|
|
353
|
-
"boolean",
|
|
354
|
-
"number",
|
|
355
410
|
"string"
|
|
356
411
|
]
|
|
357
412
|
},
|
|
@@ -414,12 +469,12 @@
|
|
|
414
469
|
"config": {
|
|
415
470
|
"$ref": "#/$defs/MemberConfig"
|
|
416
471
|
},
|
|
417
|
-
"
|
|
472
|
+
"questionType": {
|
|
418
473
|
"const": "member"
|
|
419
474
|
}
|
|
420
475
|
},
|
|
421
476
|
"required": [
|
|
422
|
-
"
|
|
477
|
+
"questionType"
|
|
423
478
|
]
|
|
424
479
|
}
|
|
425
480
|
],
|
|
@@ -69,15 +69,71 @@
|
|
|
69
69
|
"type": "object"
|
|
70
70
|
},
|
|
71
71
|
"FieldCommon": {
|
|
72
|
+
"allOf": [
|
|
73
|
+
{
|
|
74
|
+
"if": {
|
|
75
|
+
"properties": {
|
|
76
|
+
"defaultType": {
|
|
77
|
+
"const": 2
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"defaultType"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"then": {
|
|
85
|
+
"properties": {
|
|
86
|
+
"defaultValue": {
|
|
87
|
+
"type": "null"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"if": {
|
|
94
|
+
"properties": {
|
|
95
|
+
"defaultType": {
|
|
96
|
+
"const": 3
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": [
|
|
100
|
+
"defaultType"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"then": {
|
|
104
|
+
"properties": {
|
|
105
|
+
"defaultValue": {
|
|
106
|
+
"minLength": 1,
|
|
107
|
+
"type": [
|
|
108
|
+
"string",
|
|
109
|
+
"null"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{
|
|
118
|
+
"required": [
|
|
119
|
+
"queId"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"required": [
|
|
124
|
+
"name"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
],
|
|
72
128
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
73
129
|
"properties": {
|
|
74
|
-
"
|
|
75
|
-
"description": "
|
|
130
|
+
"beingRequired": {
|
|
131
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
76
132
|
"type": "boolean"
|
|
77
133
|
},
|
|
78
134
|
"defaultType": {
|
|
79
135
|
"default": 1,
|
|
80
|
-
"description": "
|
|
136
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
81
137
|
"enum": [
|
|
82
138
|
1,
|
|
83
139
|
2,
|
|
@@ -87,47 +143,46 @@
|
|
|
87
143
|
},
|
|
88
144
|
"defaultValue": {
|
|
89
145
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
90
|
-
"description": "
|
|
91
|
-
},
|
|
92
|
-
"description": {
|
|
93
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
94
|
-
"type": [
|
|
95
|
-
"string",
|
|
96
|
-
"null"
|
|
97
|
-
]
|
|
146
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
98
147
|
},
|
|
99
148
|
"name": {
|
|
100
|
-
"description": "
|
|
149
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
101
150
|
"minLength": 1,
|
|
102
151
|
"type": "string"
|
|
103
152
|
},
|
|
104
153
|
"queId": {
|
|
105
|
-
"description": "已有字段的后端 ID
|
|
154
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
106
155
|
"minimum": 1,
|
|
107
156
|
"type": "integer"
|
|
108
157
|
},
|
|
109
|
-
"
|
|
110
|
-
"description": "
|
|
111
|
-
"type":
|
|
158
|
+
"questionDescription": {
|
|
159
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
160
|
+
"type": [
|
|
161
|
+
"string",
|
|
162
|
+
"null"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"questionType": {
|
|
166
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
167
|
+
"type": "string"
|
|
112
168
|
},
|
|
113
169
|
"width": {
|
|
114
|
-
"description": "
|
|
115
|
-
"
|
|
116
|
-
|
|
170
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
171
|
+
"enum": [
|
|
172
|
+
25,
|
|
173
|
+
50,
|
|
174
|
+
75,
|
|
175
|
+
100
|
|
176
|
+
],
|
|
117
177
|
"type": "integer"
|
|
118
178
|
}
|
|
119
179
|
},
|
|
120
|
-
"required": [
|
|
121
|
-
"name"
|
|
122
|
-
],
|
|
123
180
|
"type": "object"
|
|
124
181
|
},
|
|
125
182
|
"ScalarDefaultValue": {
|
|
126
|
-
"description": "
|
|
183
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
127
184
|
"type": [
|
|
128
185
|
"null",
|
|
129
|
-
"boolean",
|
|
130
|
-
"number",
|
|
131
186
|
"string"
|
|
132
187
|
]
|
|
133
188
|
}
|
|
@@ -143,12 +198,12 @@
|
|
|
143
198
|
"config": {
|
|
144
199
|
"$ref": "#/$defs/ChoiceConfig"
|
|
145
200
|
},
|
|
146
|
-
"
|
|
201
|
+
"questionType": {
|
|
147
202
|
"const": "multi_select"
|
|
148
203
|
}
|
|
149
204
|
},
|
|
150
205
|
"required": [
|
|
151
|
-
"
|
|
206
|
+
"questionType",
|
|
152
207
|
"config"
|
|
153
208
|
]
|
|
154
209
|
}
|
|
@@ -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,39 +75,40 @@
|
|
|
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
|
"NumberConfig": {
|
|
@@ -80,12 +137,10 @@
|
|
|
80
137
|
]
|
|
81
138
|
},
|
|
82
139
|
"currencyType": {
|
|
83
|
-
"
|
|
140
|
+
"default": 1,
|
|
141
|
+
"description": "货币类型 ID;后端发布要求为非空正整数,即使 currencyStatus 为 false 也不得传 null。无需指定时省略并使用默认值 1。",
|
|
84
142
|
"minimum": 1,
|
|
85
|
-
"type":
|
|
86
|
-
"integer",
|
|
87
|
-
"null"
|
|
88
|
-
]
|
|
143
|
+
"type": "integer"
|
|
89
144
|
},
|
|
90
145
|
"decimalDigit": {
|
|
91
146
|
"description": "小数位数。",
|
|
@@ -146,11 +201,9 @@
|
|
|
146
201
|
"type": "object"
|
|
147
202
|
},
|
|
148
203
|
"ScalarDefaultValue": {
|
|
149
|
-
"description": "
|
|
204
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
150
205
|
"type": [
|
|
151
206
|
"null",
|
|
152
|
-
"boolean",
|
|
153
|
-
"number",
|
|
154
207
|
"string"
|
|
155
208
|
]
|
|
156
209
|
}
|
|
@@ -166,12 +219,12 @@
|
|
|
166
219
|
"config": {
|
|
167
220
|
"$ref": "#/$defs/NumberConfig"
|
|
168
221
|
},
|
|
169
|
-
"
|
|
222
|
+
"questionType": {
|
|
170
223
|
"const": "number"
|
|
171
224
|
}
|
|
172
225
|
},
|
|
173
226
|
"required": [
|
|
174
|
-
"
|
|
227
|
+
"questionType"
|
|
175
228
|
]
|
|
176
229
|
}
|
|
177
230
|
],
|