@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,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
|
"PhoneConfig": {
|
|
@@ -109,11 +166,9 @@
|
|
|
109
166
|
"type": "object"
|
|
110
167
|
},
|
|
111
168
|
"ScalarDefaultValue": {
|
|
112
|
-
"description": "
|
|
169
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
113
170
|
"type": [
|
|
114
171
|
"null",
|
|
115
|
-
"boolean",
|
|
116
|
-
"number",
|
|
117
172
|
"string"
|
|
118
173
|
]
|
|
119
174
|
}
|
|
@@ -129,12 +184,12 @@
|
|
|
129
184
|
"config": {
|
|
130
185
|
"$ref": "#/$defs/PhoneConfig"
|
|
131
186
|
},
|
|
132
|
-
"
|
|
187
|
+
"questionType": {
|
|
133
188
|
"const": "phone"
|
|
134
189
|
}
|
|
135
190
|
},
|
|
136
191
|
"required": [
|
|
137
|
-
"
|
|
192
|
+
"questionType"
|
|
138
193
|
]
|
|
139
194
|
}
|
|
140
195
|
],
|
|
@@ -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
|
"FieldSelector": {
|
|
@@ -68,7 +125,7 @@
|
|
|
68
125
|
]
|
|
69
126
|
}
|
|
70
127
|
],
|
|
71
|
-
"description": "
|
|
128
|
+
"description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
|
|
72
129
|
"properties": {
|
|
73
130
|
"name": {
|
|
74
131
|
"description": "字段名称;仅在当前作用域内唯一时可用于解析。",
|
|
@@ -85,17 +142,17 @@
|
|
|
85
142
|
},
|
|
86
143
|
"QLinkerBinding": {
|
|
87
144
|
"additionalProperties": false,
|
|
88
|
-
"description": "Q-Linker
|
|
145
|
+
"description": "Q-Linker 的输入映射、请求配置和输出映射;每个输出目标还必须满足应用级唯一性规则,不能与任何 Q-Linker 或代码块的其他输出指向同一实际字段。多个生产方需要回写时,请选择不同目标字段或合并为一个生产方。",
|
|
89
146
|
"properties": {
|
|
90
147
|
"inputs": {
|
|
91
|
-
"description": "将当前表单字段映射到请求参数的规则。",
|
|
148
|
+
"description": "将当前表单字段映射到请求参数的规则。query_param、header、url_encoded 会直接生成对应位置的动态参数;json_path 用于替换 request.url、request.jsonValue 或 request.xmlValue 中的 {{key}} 占位符。",
|
|
92
149
|
"items": {
|
|
93
150
|
"$ref": "#/$defs/QLinkerInputBinding"
|
|
94
151
|
},
|
|
95
152
|
"type": "array"
|
|
96
153
|
},
|
|
97
154
|
"outputs": {
|
|
98
|
-
"description": "
|
|
155
|
+
"description": "将响应路径映射到目标字段的规则;至少一个。所有 targetField 在整个应用的 Q-Linker 和代码块输出中必须全局唯一。",
|
|
99
156
|
"items": {
|
|
100
157
|
"$ref": "#/$defs/QLinkerOutputBinding"
|
|
101
158
|
},
|
|
@@ -128,19 +185,19 @@
|
|
|
128
185
|
},
|
|
129
186
|
"QLinkerInputBinding": {
|
|
130
187
|
"additionalProperties": false,
|
|
131
|
-
"description": "
|
|
188
|
+
"description": "一个表单字段到请求参数的映射。需要把字段值嵌入 URL、JSON 或 XML 字符串时,source 必须为 json_path,key 必须等于所选字段名,并在对应请求字符串中写 {{key}};其他 source 不会替换 {{key}}。",
|
|
132
189
|
"properties": {
|
|
133
190
|
"field": {
|
|
134
191
|
"$ref": "#/$defs/FieldSelector",
|
|
135
192
|
"description": "输入来源字段。"
|
|
136
193
|
},
|
|
137
194
|
"key": {
|
|
138
|
-
"description": "
|
|
195
|
+
"description": "请求参数名。source 为 json_path 时必须等于 field 选中的字段名,并与请求字符串中的 {{key}} 完全一致。",
|
|
139
196
|
"minLength": 1,
|
|
140
197
|
"type": "string"
|
|
141
198
|
},
|
|
142
199
|
"source": {
|
|
143
|
-
"description": "
|
|
200
|
+
"description": "字段值的写入位置。query_param、header、url_encoded 分别生成动态查询参数、请求头、表单项;json_path 替换 URL、JSON 或 XML 中的 {{key}}。不要用前三种 source 提供字符串占位符。",
|
|
144
201
|
"enum": [
|
|
145
202
|
"query_param",
|
|
146
203
|
"header",
|
|
@@ -180,7 +237,7 @@
|
|
|
180
237
|
},
|
|
181
238
|
"QLinkerOutputBinding": {
|
|
182
239
|
"additionalProperties": false,
|
|
183
|
-
"description": "
|
|
240
|
+
"description": "一个响应值到表单目标字段的映射;同一实际目标字段在整个应用中只能被一个 Q-Linker 或代码块输出映射写入。",
|
|
184
241
|
"properties": {
|
|
185
242
|
"alias": {
|
|
186
243
|
"description": "输出别名;用于后续数据关联引用。",
|
|
@@ -188,7 +245,7 @@
|
|
|
188
245
|
"type": "string"
|
|
189
246
|
},
|
|
190
247
|
"aliasId": {
|
|
191
|
-
"description": "后端生成的输出别名 ID
|
|
248
|
+
"description": "后端生成的输出别名 ID;新增输出时省略,Builder 在首次写入后按 alias 与 path 自动回填再保存关系。更新已有输出时必须保留 get 返回值,不得自行编造或置空。",
|
|
192
249
|
"minimum": 1,
|
|
193
250
|
"type": "integer"
|
|
194
251
|
},
|
|
@@ -199,7 +256,7 @@
|
|
|
199
256
|
},
|
|
200
257
|
"targetField": {
|
|
201
258
|
"$ref": "#/$defs/FieldSelector",
|
|
202
|
-
"description": "
|
|
259
|
+
"description": "接收结果的当前表单字段;该字段在整个应用的全部 Q-Linker 和代码块 outputs 中只能作为 targetField 出现一次,不得被多个输出关系重复写入。"
|
|
203
260
|
}
|
|
204
261
|
},
|
|
205
262
|
"required": [
|
|
@@ -265,7 +322,7 @@
|
|
|
265
322
|
]
|
|
266
323
|
},
|
|
267
324
|
"jsonValue": {
|
|
268
|
-
"description": "bodyType 为 json 时的 JSON
|
|
325
|
+
"description": "bodyType 为 json 时的 JSON 请求体字符串。动态字段值写成 {{key}},且 inputs 必须存在同名 source=json_path 映射;query_param、header、url_encoded 不会替换这里的占位符。",
|
|
269
326
|
"type": [
|
|
270
327
|
"string",
|
|
271
328
|
"null"
|
|
@@ -296,7 +353,7 @@
|
|
|
296
353
|
]
|
|
297
354
|
},
|
|
298
355
|
"url": {
|
|
299
|
-
"description": "请求 URL
|
|
356
|
+
"description": "请求 URL;动态嵌入字段值时使用 {{key}},并在 inputs 中提供同名 source=json_path 映射。",
|
|
300
357
|
"minLength": 1,
|
|
301
358
|
"type": "string"
|
|
302
359
|
},
|
|
@@ -308,7 +365,7 @@
|
|
|
308
365
|
"type": "array"
|
|
309
366
|
},
|
|
310
367
|
"xmlValue": {
|
|
311
|
-
"description": "bodyType 为 xml 时的 XML
|
|
368
|
+
"description": "bodyType 为 xml 时的 XML 请求体字符串。动态字段值写成 {{key}},且 inputs 必须存在同名 source=json_path 映射。",
|
|
312
369
|
"type": [
|
|
313
370
|
"string",
|
|
314
371
|
"null"
|
|
@@ -321,11 +378,9 @@
|
|
|
321
378
|
"type": "object"
|
|
322
379
|
},
|
|
323
380
|
"ScalarDefaultValue": {
|
|
324
|
-
"description": "
|
|
381
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
325
382
|
"type": [
|
|
326
383
|
"null",
|
|
327
|
-
"boolean",
|
|
328
|
-
"number",
|
|
329
384
|
"string"
|
|
330
385
|
]
|
|
331
386
|
}
|
|
@@ -341,12 +396,12 @@
|
|
|
341
396
|
"config": {
|
|
342
397
|
"$ref": "#/$defs/QLinkerConfig"
|
|
343
398
|
},
|
|
344
|
-
"
|
|
399
|
+
"questionType": {
|
|
345
400
|
"const": "q_linker"
|
|
346
401
|
}
|
|
347
402
|
},
|
|
348
403
|
"required": [
|
|
349
|
-
"
|
|
404
|
+
"questionType",
|
|
350
405
|
"config"
|
|
351
406
|
]
|
|
352
407
|
}
|
|
@@ -181,15 +181,71 @@
|
|
|
181
181
|
"type": "object"
|
|
182
182
|
},
|
|
183
183
|
"FieldCommon": {
|
|
184
|
+
"allOf": [
|
|
185
|
+
{
|
|
186
|
+
"if": {
|
|
187
|
+
"properties": {
|
|
188
|
+
"defaultType": {
|
|
189
|
+
"const": 2
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"required": [
|
|
193
|
+
"defaultType"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"then": {
|
|
197
|
+
"properties": {
|
|
198
|
+
"defaultValue": {
|
|
199
|
+
"type": "null"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"if": {
|
|
206
|
+
"properties": {
|
|
207
|
+
"defaultType": {
|
|
208
|
+
"const": 3
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"required": [
|
|
212
|
+
"defaultType"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"then": {
|
|
216
|
+
"properties": {
|
|
217
|
+
"defaultValue": {
|
|
218
|
+
"minLength": 1,
|
|
219
|
+
"type": [
|
|
220
|
+
"string",
|
|
221
|
+
"null"
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"required": [
|
|
231
|
+
"queId"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"required": [
|
|
236
|
+
"name"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
],
|
|
184
240
|
"description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
|
|
185
241
|
"properties": {
|
|
186
|
-
"
|
|
187
|
-
"description": "
|
|
242
|
+
"beingRequired": {
|
|
243
|
+
"description": "该字段是否必填;缺失时保留已有字段当前值。",
|
|
188
244
|
"type": "boolean"
|
|
189
245
|
},
|
|
190
246
|
"defaultType": {
|
|
191
247
|
"default": 1,
|
|
192
|
-
"description": "
|
|
248
|
+
"description": "默认值类型,与 defaultValue 联动;1 表示静态值,2 表示关联/绑定值且 defaultValue 只能省略或为 null,3 表示公式值且提供 defaultValue 时必须为非空公式文本。省略 defaultType 但提供 defaultValue 时按 1 处理。",
|
|
193
249
|
"enum": [
|
|
194
250
|
1,
|
|
195
251
|
2,
|
|
@@ -199,39 +255,40 @@
|
|
|
199
255
|
},
|
|
200
256
|
"defaultValue": {
|
|
201
257
|
"$ref": "#/$defs/ScalarDefaultValue",
|
|
202
|
-
"description": "
|
|
203
|
-
},
|
|
204
|
-
"description": {
|
|
205
|
-
"description": "字段说明;null 或空字符串表示清空。",
|
|
206
|
-
"type": [
|
|
207
|
-
"string",
|
|
208
|
-
"null"
|
|
209
|
-
]
|
|
258
|
+
"description": "普通字段的默认值;后端 queDefaultValue 为字符串,因此数字等字面量也必须以字符串传入。defaultType 为 1 时表示静态文本,为 3 时表示公式文本,为 2 时不携带字面量默认值。表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
|
|
210
259
|
},
|
|
211
260
|
"name": {
|
|
212
|
-
"description": "
|
|
261
|
+
"description": "字段展示名称;新增字段必填,已有字段可在携带 queId 时省略;同一父级内唯一。",
|
|
213
262
|
"minLength": 1,
|
|
214
263
|
"type": "string"
|
|
215
264
|
},
|
|
216
265
|
"queId": {
|
|
217
|
-
"description": "已有字段的后端 ID
|
|
266
|
+
"description": "已有字段的后端 ID;更新时用于精确定位并复用,新增字段通常省略。",
|
|
218
267
|
"minimum": 1,
|
|
219
268
|
"type": "integer"
|
|
220
269
|
},
|
|
221
|
-
"
|
|
222
|
-
"description": "
|
|
223
|
-
"type":
|
|
270
|
+
"questionDescription": {
|
|
271
|
+
"description": "字段说明;null 或空字符串表示清空。",
|
|
272
|
+
"type": [
|
|
273
|
+
"string",
|
|
274
|
+
"null"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"questionType": {
|
|
278
|
+
"description": "字段类型;具体可用值由当前字段详情 Schema 的判别分支约束。",
|
|
279
|
+
"type": "string"
|
|
224
280
|
},
|
|
225
281
|
"width": {
|
|
226
|
-
"description": "
|
|
227
|
-
"
|
|
228
|
-
|
|
282
|
+
"description": "字段在所在行的宽度百分比;只能选择 25、50、75 或 100。",
|
|
283
|
+
"enum": [
|
|
284
|
+
25,
|
|
285
|
+
50,
|
|
286
|
+
75,
|
|
287
|
+
100
|
|
288
|
+
],
|
|
229
289
|
"type": "integer"
|
|
230
290
|
}
|
|
231
291
|
},
|
|
232
|
-
"required": [
|
|
233
|
-
"name"
|
|
234
|
-
],
|
|
235
292
|
"type": "object"
|
|
236
293
|
},
|
|
237
294
|
"FieldSelector": {
|
|
@@ -248,7 +305,7 @@
|
|
|
248
305
|
]
|
|
249
306
|
}
|
|
250
307
|
],
|
|
251
|
-
"description": "
|
|
308
|
+
"description": "字段选择器;用于定位应用的数据标题、数据封面、自定义编号取值来源或其他配置引用的字段。至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
|
|
252
309
|
"properties": {
|
|
253
310
|
"name": {
|
|
254
311
|
"description": "字段名称;仅在当前作用域内唯一时可用于解析。",
|
|
@@ -263,6 +320,11 @@
|
|
|
263
320
|
},
|
|
264
321
|
"type": "object"
|
|
265
322
|
},
|
|
323
|
+
"FormulaExpression": {
|
|
324
|
+
"description": "轻流公式表达式的解码文本;字段引用形如 #queId_<queId>$,由后端 Formula 引擎解析。",
|
|
325
|
+
"minLength": 1,
|
|
326
|
+
"type": "string"
|
|
327
|
+
},
|
|
266
328
|
"ReferenceDefaultValue": {
|
|
267
329
|
"additionalProperties": false,
|
|
268
330
|
"properties": {
|
|
@@ -292,11 +354,23 @@
|
|
|
292
354
|
"description": "引用字段配置;引用其他应用中的数据。",
|
|
293
355
|
"properties": {
|
|
294
356
|
"beingDefaultFormulaAutoFillEnabled": {
|
|
357
|
+
"description": "是否启用引用字段的默认值公式自动填充。",
|
|
295
358
|
"type": [
|
|
296
359
|
"boolean",
|
|
297
360
|
"null"
|
|
298
361
|
]
|
|
299
362
|
},
|
|
363
|
+
"defaultValueFormula": {
|
|
364
|
+
"description": "引用字段默认值自动填充使用的公式;仅在 beingDefaultFormulaAutoFillEnabled 为 true 时执行,null 表示清除。",
|
|
365
|
+
"oneOf": [
|
|
366
|
+
{
|
|
367
|
+
"type": "null"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"$ref": "#/$defs/FormulaExpression"
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
},
|
|
300
374
|
"defaultValueMatchRules": {
|
|
301
375
|
"type": [
|
|
302
376
|
"array",
|
|
@@ -346,11 +420,9 @@
|
|
|
346
420
|
"type": "object"
|
|
347
421
|
},
|
|
348
422
|
"ScalarDefaultValue": {
|
|
349
|
-
"description": "
|
|
423
|
+
"description": "后端 queDefaultValue 支持的普通字段默认值;非空值必须是字符串,显式 null 表示清除默认值。数字和布尔值应先转换为字符串,对象和数组必须使用字段专用默认值配置。需要配置结构化默认值时,通过 AppForm Schema 查询能力传入当前 schema_version,并将字段的 questionType 作为 field_type 获取该字段类型的详细 Schema,再按其中的字段专用 config 定义填写。",
|
|
350
424
|
"type": [
|
|
351
425
|
"null",
|
|
352
|
-
"boolean",
|
|
353
|
-
"number",
|
|
354
426
|
"string"
|
|
355
427
|
]
|
|
356
428
|
}
|
|
@@ -366,12 +438,12 @@
|
|
|
366
438
|
"config": {
|
|
367
439
|
"$ref": "#/$defs/RelationConfig"
|
|
368
440
|
},
|
|
369
|
-
"
|
|
441
|
+
"questionType": {
|
|
370
442
|
"const": "relation"
|
|
371
443
|
}
|
|
372
444
|
},
|
|
373
445
|
"required": [
|
|
374
|
-
"
|
|
446
|
+
"questionType",
|
|
375
447
|
"config"
|
|
376
448
|
]
|
|
377
449
|
}
|