@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
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_document_parsing.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_document_parsing.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_document_parsing"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_document_parsing field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_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_image_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_image_generation"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_image_generation field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_image_recognition.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_image_recognition.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_image_recognition"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_image_recognition field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|
package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/ai_machine_translation.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_machine_translation.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_machine_translation"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"questionType"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Qingflow AppForm v1alpha1 ai_machine_translation field",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"unevaluatedProperties": false
|
|
146
|
+
}
|