@josephyan/qingflow-cli 1.1.4 → 1.1.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 +7 -3
- package/docs/local-agent-install.md +57 -6
- package/entry_point.py +1 -1
- package/npm/bin/qingflow-skills.mjs +5 -0
- package/npm/bin/qingflow.mjs +1 -34
- package/npm/lib/runtime.mjs +21 -101
- package/npm/scripts/postinstall.mjs +1 -10
- package/package.json +3 -2
- package/pyproject.toml +1 -1
- package/skills/qingflow-cli/SKILL.md +58 -44
- package/skills/qingflow-cli/manifest.yaml +1 -1
- package/skills/qingflow-cli/reference/00-INDEX.md +35 -0
- package/skills/qingflow-cli/reference/builder/10-build-single-app.md +38 -0
- package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +39 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md → builder/30-schema-fields.md} +52 -10
- package/skills/qingflow-cli/reference/builder/40-layout.md +52 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_VIEWS_WORKFLOW.md → builder/50-views.md} +39 -15
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_CHARTS_WORKFLOW.md → builder/60-charts.md} +36 -13
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_PORTAL_WORKFLOW.md → builder/70-portal.md} +36 -13
- package/skills/qingflow-cli/reference/builder/80-buttons-associated-resources.md +41 -0
- package/skills/qingflow-cli/reference/builder/90-workflow.md +34 -0
- package/skills/qingflow-cli/reference/builder/99-publish-verify.md +46 -0
- package/skills/qingflow-cli/reference/builder/README.md +41 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/README.md +130 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +66 -0
- package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +77 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md → builder/reference/app-delivery-sop.md} +26 -16
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/README.md +293 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-complete-system.md +809 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/build-single-app.md +830 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/complete-system-development-guide.md +123 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/create-app.md +182 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/environments.md +63 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/flow-actors-and-permissions.md +142 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/gotchas.md +108 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/match-rules.md +114 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/public-surface-sync.md +75 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/single-app-development-guide.md +58 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/solution-playbooks.md +52 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/tool-selection.md +107 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-flow.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-layout.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-schema.md +7 -0
- package/skills/qingflow-cli/reference/builder/reference/legacy-playbooks/update-views.md +7 -0
- package/skills/qingflow-cli/reference/builder/workflow/01-overview.md +45 -0
- package/skills/qingflow-cli/reference/builder/workflow/02-update-mode.md +53 -0
- package/skills/qingflow-cli/reference/builder/workflow/03-flow-patterns.md +57 -0
- package/skills/qingflow-cli/reference/builder/workflow/04-stage1-business-modeling.md +131 -0
- package/skills/qingflow-cli/reference/builder/workflow/05-stage2-members-roles.md +29 -0
- package/skills/qingflow-cli/reference/builder/workflow/06-stage3-build-spec.md +165 -0
- package/skills/qingflow-cli/reference/builder/workflow/07-stage4-validate-spec.md +33 -0
- package/skills/qingflow-cli/reference/builder/workflow/08-stage5-apply-verify.md +51 -0
- package/skills/qingflow-cli/reference/builder/workflow/09-stage6-summary.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/10-node-config-reference.md +93 -0
- package/skills/qingflow-cli/reference/builder/workflow/11-troubleshooting.md +15 -0
- package/skills/qingflow-cli/reference/builder/workflow/README.md +88 -0
- package/skills/qingflow-cli/reference/builder/workflow/workflow-schema.json +1754 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ADMIN_CHEATSHEET.md → core/QINGFLOW_CLI_ADMIN_CHEATSHEET.md} +3 -3
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md → core/QINGFLOW_CLI_DATA_RETRIEVAL_WORKFLOW.md} +6 -6
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_EXPLORATION_REPORT.md → core/QINGFLOW_CLI_EXPLORATION_REPORT.md} +2 -2
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_FIELD_DATA_TYPES.md → core/QINGFLOW_CLI_FIELD_DATA_TYPES.md} +11 -11
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_MEMBER_CHEATSHEET.md → core/QINGFLOW_CLI_MEMBER_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md → core/QINGFLOW_CLI_ONE_SHOT_CHEATSHEET.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_CREATE_WORKFLOW.md} +3 -3
- package/skills/qingflow-cli/reference/record/QINGFLOW_CLI_RECORD_DELETE_WORKFLOW.md +31 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_IMPORT_WORKFLOW.md} +4 -4
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md → record/QINGFLOW_CLI_RECORD_UPDATE_WORKFLOW.md} +7 -7
- package/skills/qingflow-cli/reference/record/analysis/README.md +130 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-gotchas.md +91 -0
- package/skills/qingflow-cli/reference/record/analysis/analysis-patterns.md +112 -0
- package/skills/qingflow-cli/reference/record/analysis/business-context.md +74 -0
- package/skills/qingflow-cli/reference/record/analysis/confidence-reporting.md +69 -0
- package/skills/qingflow-cli/reference/record/analysis/data-access-playbook.md +106 -0
- package/skills/qingflow-cli/reference/record/analysis/pandas-recipes.md +172 -0
- package/skills/qingflow-cli/reference/record/analysis/report-format.md +76 -0
- package/skills/qingflow-cli/reference/record/insert/README.md +75 -0
- package/skills/qingflow-cli/reference/{QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md → task/QINGFLOW_CLI_TASK_CONTEXT_WORKFLOW.md} +5 -5
- package/skills/qingflow-cli/reference/task/ops/README.md +131 -0
- package/skills/qingflow-cli/reference/task/ops/environments.md +43 -0
- package/skills/qingflow-cli/reference/task/ops/workflow-usage.md +26 -0
- package/skills/qingflow-cli/scripts/validate_system_build_summary.py +124 -0
- package/skills/qingflow-cli/scripts/workflow/diff_flow_spec.py +275 -0
- package/skills/qingflow-cli/scripts/workflow/validate_flow_spec.py +605 -0
- package/skills/qingflow-mcp-setup/SKILL.md +115 -0
- package/skills/qingflow-mcp-setup/agents/openai.yaml +4 -0
- package/skills/qingflow-mcp-setup/references/claude-desktop.md +34 -0
- package/skills/qingflow-mcp-setup/references/environments.md +62 -0
- package/skills/qingflow-mcp-setup/references/generic-stdio.md +32 -0
- package/skills/qingflow-mcp-setup/scripts/check_local_server.sh +38 -0
- package/src/qingflow_mcp/__init__.py +1 -1
- package/src/qingflow_mcp/__main__.py +6 -2
- package/src/qingflow_mcp/builder_facade/models.py +282 -102
- package/src/qingflow_mcp/builder_facade/service.py +4166 -929
- package/src/qingflow_mcp/cli/commands/builder.py +316 -298
- package/src/qingflow_mcp/cli/commands/chart.py +1 -1
- package/src/qingflow_mcp/cli/commands/common.py +12 -3
- package/src/qingflow_mcp/cli/commands/exports.py +2 -2
- package/src/qingflow_mcp/cli/commands/imports.py +3 -3
- package/src/qingflow_mcp/cli/commands/portal.py +2 -2
- package/src/qingflow_mcp/cli/commands/record.py +101 -27
- package/src/qingflow_mcp/cli/commands/task.py +28 -47
- package/src/qingflow_mcp/cli/commands/view.py +1 -1
- package/src/qingflow_mcp/cli/context.py +0 -3
- package/src/qingflow_mcp/cli/formatters.py +784 -16
- package/src/qingflow_mcp/cli/main.py +117 -33
- package/src/qingflow_mcp/errors.py +43 -2
- package/src/qingflow_mcp/public_surface.py +26 -17
- package/src/qingflow_mcp/response_trim.py +81 -17
- package/src/qingflow_mcp/server.py +14 -12
- package/src/qingflow_mcp/server_app_builder.py +65 -21
- package/src/qingflow_mcp/server_app_user.py +22 -16
- package/src/qingflow_mcp/session_store.py +11 -7
- package/src/qingflow_mcp/solution/compiler/__init__.py +3 -1
- package/src/qingflow_mcp/solution/compiler/workflow_compiler.py +173 -0
- package/src/qingflow_mcp/solution/executor.py +245 -18
- package/src/qingflow_mcp/tools/ai_builder_tools.py +1780 -406
- package/src/qingflow_mcp/tools/app_tools.py +184 -43
- package/src/qingflow_mcp/tools/approval_tools.py +197 -35
- package/src/qingflow_mcp/tools/auth_tools.py +92 -16
- package/src/qingflow_mcp/tools/code_block_tools.py +298 -40
- package/src/qingflow_mcp/tools/custom_button_tools.py +64 -10
- package/src/qingflow_mcp/tools/directory_tools.py +236 -72
- package/src/qingflow_mcp/tools/export_tools.py +244 -34
- package/src/qingflow_mcp/tools/feedback_tools.py +9 -0
- package/src/qingflow_mcp/tools/file_tools.py +9 -3
- package/src/qingflow_mcp/tools/import_tools.py +336 -49
- package/src/qingflow_mcp/tools/navigation_tools.py +91 -12
- package/src/qingflow_mcp/tools/package_tools.py +118 -6
- package/src/qingflow_mcp/tools/portal_tools.py +39 -3
- package/src/qingflow_mcp/tools/qingbi_report_tools.py +116 -7
- package/src/qingflow_mcp/tools/record_tools.py +1141 -356
- package/src/qingflow_mcp/tools/resource_read_tools.py +188 -39
- package/src/qingflow_mcp/tools/role_tools.py +80 -9
- package/src/qingflow_mcp/tools/solution_tools.py +59 -45
- package/src/qingflow_mcp/tools/task_context_tools.py +662 -158
- package/src/qingflow_mcp/tools/task_tools.py +113 -29
- package/src/qingflow_mcp/tools/view_tools.py +106 -3
- package/src/qingflow_mcp/tools/workflow_tools.py +48 -4
- package/src/qingflow_mcp/tools/workspace_tools.py +71 -3
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_MATCH_RULES.md → builder/reference/match-rules.md} +0 -0
- /package/skills/qingflow-cli/reference/{QINGFLOW_CLI_BUILDER_WORKSPACE_ICONS.md → builder/reference/workspace-icons.md} +0 -0
- /package/skills/qingflow-cli/reference/{charts_remove.example.json → examples/charts/charts_remove.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_reorder.example.json → examples/charts/charts_reorder.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_bar.example.json → examples/charts/charts_upsert_bar.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_dashboard_starter.example.json → examples/charts/charts_upsert_dashboard_starter.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{charts_upsert_minimal.example.json → examples/charts/charts_upsert_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_all_types.example.json → examples/portal/portal_sections_all_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_five_types.example.json → examples/portal/portal_sections_five_types.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{portal_sections_standard_workbench.example.json → examples/portal/portal_sections_standard_workbench.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_complex.json → examples/schema/_batch_schema_complex.json} +0 -0
- /package/skills/qingflow-cli/reference/{_batch_schema_scalar.json → examples/schema/_batch_schema_scalar.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_add_fields_minimal.example.json → examples/schema/schema_add_fields_minimal.example.json} +0 -0
- /package/skills/qingflow-cli/reference/{schema_apply_add_fields_all_types.json → examples/schema/schema_apply_add_fields_all_types.json} +0 -0
- /package/skills/qingflow-cli/reference/{views_upsert_table_minimal.example.json → examples/views/views_upsert_table_minimal.example.json} +0 -0
|
@@ -0,0 +1,1754 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"title": "WorkflowSpecDTO",
|
|
4
|
+
"description": null,
|
|
5
|
+
"properties": {
|
|
6
|
+
"nodes": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"minItems": 1,
|
|
9
|
+
"items": {
|
|
10
|
+
"$ref": "#/$defs/WorkflowNodeDTO"
|
|
11
|
+
},
|
|
12
|
+
"description": "工作流节点列表(nodes)。须有且仅有一个 type=applicant;分支用 type=gateway(mode=parallel);汇合用 gateway(mode=join)。patterns.md#P03"
|
|
13
|
+
},
|
|
14
|
+
"edges": {
|
|
15
|
+
"$ref": "#/$defs/WorkflowEdgesDTO",
|
|
16
|
+
"description": "边容器(edges.edges[]):显式 from/to 列表;fork 出边≥2 且 from=gateway.id;须保持 DAG"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": [
|
|
20
|
+
"nodes",
|
|
21
|
+
"edges"
|
|
22
|
+
],
|
|
23
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
24
|
+
"x-schema-levels": {
|
|
25
|
+
"levels": [
|
|
26
|
+
{
|
|
27
|
+
"name": "workflow-level",
|
|
28
|
+
"scope": "root schema",
|
|
29
|
+
"handles": "top-level orchestration fields such as nodes/edges"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "node-type-level",
|
|
33
|
+
"scope": "$defs node entries",
|
|
34
|
+
"handles": "node-specific fields, polymorphism, and node constraints"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "shared-definitions-level",
|
|
38
|
+
"scope": "$defs reusable types",
|
|
39
|
+
"handles": "shared structures, reusable constraints, and common resource metadata"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"description": "Schema is organized into three levels for readability and stable evolution"
|
|
43
|
+
},
|
|
44
|
+
"$defs": {
|
|
45
|
+
"NodeAttrsDTO": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"description": "节点属性基类(attrs),按 type 多态为各节点 *AttrsDTO",
|
|
48
|
+
"properties": {},
|
|
49
|
+
"oneOf": [
|
|
50
|
+
{
|
|
51
|
+
"$ref": "#/$defs/CCAttrsDTO"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"$ref": "#/$defs/FillingAttrsDTO"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"$ref": "#/$defs/ApplicantAttrsDTO"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"$ref": "#/$defs/AutomationAttrsDTO"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"$ref": "#/$defs/ApprovalAttrsDTO"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"$ref": "#/$defs/GatewayAttrsDTO"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"discriminator": {
|
|
70
|
+
"propertyName": "type",
|
|
71
|
+
"mapping": {
|
|
72
|
+
"cc": "#/$defs/CCAttrsDTO",
|
|
73
|
+
"filling": "#/$defs/FillingAttrsDTO",
|
|
74
|
+
"applicant": "#/$defs/ApplicantAttrsDTO",
|
|
75
|
+
"approval": "#/$defs/ApprovalAttrsDTO",
|
|
76
|
+
"gateway": "#/$defs/GatewayAttrsDTO"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"x-polymorphic-base": "com.qflow.backend.workflow.spec.dto.common.WorkflowSpecNodes$NodeAttrsDTO"
|
|
80
|
+
},
|
|
81
|
+
"WorkflowNodeDTO": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "工作流节点。type 决定业务类型与 attrs 结构:applicant、filling、approval、gateway、cc、automation(按 subType 细分)",
|
|
84
|
+
"properties": {
|
|
85
|
+
"id": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "节点唯一 id,在 nodes 中唯一",
|
|
88
|
+
"minLength": 1
|
|
89
|
+
},
|
|
90
|
+
"type": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "节点类型(type)。gateway=并行 fork/join;automation 见 *AttrsDTO",
|
|
93
|
+
"comment": "applicant | filling | approval | gateway | automation | cc",
|
|
94
|
+
"enum": [
|
|
95
|
+
"applicant",
|
|
96
|
+
"filling",
|
|
97
|
+
"approval",
|
|
98
|
+
"gateway",
|
|
99
|
+
"cc",
|
|
100
|
+
"automation"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"name": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "节点显示名称,流程图中展示",
|
|
106
|
+
"minLength": 1
|
|
107
|
+
},
|
|
108
|
+
"sync": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"description": "是否同步执行(sync)。true 时下游须等本节点完成"
|
|
111
|
+
},
|
|
112
|
+
"enabled": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"description": "是否启用(enabled)。false 时节点跳过"
|
|
115
|
+
},
|
|
116
|
+
"role": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "语义角色标记(role),可选,用于扩展标识"
|
|
119
|
+
},
|
|
120
|
+
"attrs": {
|
|
121
|
+
"oneOf": [
|
|
122
|
+
{
|
|
123
|
+
"$ref": "#/$defs/CCAttrsDTO"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"$ref": "#/$defs/FillingAttrsDTO"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"$ref": "#/$defs/ApplicantAttrsDTO"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"$ref": "#/$defs/AutomationAttrsDTO"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"$ref": "#/$defs/ApprovalAttrsDTO"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"$ref": "#/$defs/GatewayAttrsDTO"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"discriminator": {
|
|
142
|
+
"propertyName": "type",
|
|
143
|
+
"mapping": {
|
|
144
|
+
"cc": "#/$defs/CCAttrsDTO",
|
|
145
|
+
"filling": "#/$defs/FillingAttrsDTO",
|
|
146
|
+
"applicant": "#/$defs/ApplicantAttrsDTO",
|
|
147
|
+
"approval": "#/$defs/ApprovalAttrsDTO",
|
|
148
|
+
"gateway": "#/$defs/GatewayAttrsDTO"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"x-polymorphic-base": "com.qflow.backend.workflow.spec.dto.common.WorkflowSpecNodes$NodeAttrsDTO",
|
|
152
|
+
"description": "节点专属属性(attrs),随 type 多态为各 *AttrsDTO"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [
|
|
156
|
+
"id",
|
|
157
|
+
"type",
|
|
158
|
+
"name",
|
|
159
|
+
"attrs"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"FilterRuleDTO": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "单条筛选规则(FilterRule)。FilterRule 上下文:condition.autoJudges→fieldId 源应用、仅 literal;targetFilterRules→fieldId 目标应用、literal|field_ref;tableFilterRules.filterRules→fieldId 源子表子字段、仅 literal。 条件节点 autoJudges 仅 literal;Q-Robot targetFilterRules 可用 field_ref。",
|
|
165
|
+
"properties": {
|
|
166
|
+
"fieldId": {
|
|
167
|
+
"type": "integer",
|
|
168
|
+
"description": "被比较字段 id(fieldId)"
|
|
169
|
+
},
|
|
170
|
+
"fieldType": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"description": "字段类型(fieldType),决定可用 judgeType 与 values 形态。完整枚举见 single_line_text 等;草案常用简称 text/single_select/amount 与引擎字段类型对应",
|
|
173
|
+
"enum": [
|
|
174
|
+
"single_line_text",
|
|
175
|
+
"multi_line_text",
|
|
176
|
+
"date",
|
|
177
|
+
"member",
|
|
178
|
+
"email",
|
|
179
|
+
"mobile",
|
|
180
|
+
"number",
|
|
181
|
+
"link",
|
|
182
|
+
"single_option",
|
|
183
|
+
"dropdown",
|
|
184
|
+
"multi_option",
|
|
185
|
+
"date_range",
|
|
186
|
+
"image_select",
|
|
187
|
+
"relation",
|
|
188
|
+
"address",
|
|
189
|
+
"dept",
|
|
190
|
+
"encrypted_text",
|
|
191
|
+
"text",
|
|
192
|
+
"single_select",
|
|
193
|
+
"amount"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"matchType": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"description": "比较侧来源(matchType):literal=与 values 字面量比较;field_ref=values[0] 为源 fieldId 字符串,用于 Q-Robot 定位目标记录",
|
|
199
|
+
"enum": [
|
|
200
|
+
"literal",
|
|
201
|
+
"field_ref"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"judgeType": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "判断符(judgeType)。单值比较(equals/includes/greater_than 等)通常 values 仅 1 项;equals_any/include_any 允许多项;dynamic_range 用于日期;range 用于数字区间 values[0]='min,max'",
|
|
207
|
+
"enum": [
|
|
208
|
+
"equals",
|
|
209
|
+
"not_equals",
|
|
210
|
+
"includes",
|
|
211
|
+
"not_includes",
|
|
212
|
+
"greater_than",
|
|
213
|
+
"greater_than_or_equals",
|
|
214
|
+
"less_than",
|
|
215
|
+
"less_than_or_equals",
|
|
216
|
+
"dynamic_range",
|
|
217
|
+
"equals_any",
|
|
218
|
+
"not_equals_any",
|
|
219
|
+
"belong_to",
|
|
220
|
+
"not_belong_to",
|
|
221
|
+
"subordinate_to",
|
|
222
|
+
"not_subordinate_to",
|
|
223
|
+
"subordinate_included",
|
|
224
|
+
"subordinate_not_included",
|
|
225
|
+
"fuzzy_match",
|
|
226
|
+
"include_any",
|
|
227
|
+
"include_all",
|
|
228
|
+
"range"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"values": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"minItems": 1,
|
|
234
|
+
"items": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"description": "比较值(values),string 数组。个数与格式依 fieldType+judgeType:单值 judge 填 1 项;选项类可填展示文案或 optId;field_ref 时填源 fieldId 如 [\"343283769\"]",
|
|
238
|
+
"comment": "条件示例:{\"fieldId\":343283771,\"fieldType\":\"single_select\",\"matchType\":\"literal\",\"judgeType\":\"equals\",\"values\":[\"A级\"]}; 更新定位示例:{\"matchType\":\"field_ref\",\"judgeType\":\"equals\",\"values\":[\"343283769\"]}"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": [
|
|
242
|
+
"fieldId",
|
|
243
|
+
"fieldType",
|
|
244
|
+
"matchType",
|
|
245
|
+
"judgeType"
|
|
246
|
+
],
|
|
247
|
+
"x-constraints": [
|
|
248
|
+
{
|
|
249
|
+
"description": "按使用场景区分 fieldId 归属:targetFilterRules→目标应用(appKey);tableFilterRules.filterRules→源应用子表子字段;field_ref 仅用于 targetFilterRules。"
|
|
250
|
+
}
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
"FilterRuleGroupDTO": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"minItems": 1,
|
|
256
|
+
"x-json-value": "rules",
|
|
257
|
+
"items": {
|
|
258
|
+
"$ref": "#/$defs/FilterRuleDTO"
|
|
259
|
+
},
|
|
260
|
+
"description": "筛选规则组(FilterRuleGroup)。JSON 线格式为 @JsonValue 数组(非 {rules:[]} 对象):组内 FilterRuleDTO 为 AND;多个 FilterRuleGroup 之间为 OR(用于条件节点、Q-Robot 更新定位等)"
|
|
261
|
+
},
|
|
262
|
+
"EdgeConditionDTO": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"description": "边条件(condition)。kind=rules:autoJudges 命中时激活本边,同一 fork 点多条 rules 边构成互斥选路(P03a)。kind=default:兜底边(P03a)或并行激活边(P03b);parallel fork 允许多条 default。省略 condition=无条件线性边。autoJudges 选项值须与表单 label 一致(patterns.md#P05)。",
|
|
265
|
+
"properties": {
|
|
266
|
+
"kind": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "条件类型(kind)。rules=按 autoJudges 互斥选路(P03a);default=兜底或并行激活(P03b)",
|
|
269
|
+
"enum": [
|
|
270
|
+
"default",
|
|
271
|
+
"rules"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"autoJudges": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"minItems": 1,
|
|
277
|
+
"items": {
|
|
278
|
+
"$ref": "#/$defs/FilterRuleGroupDTO"
|
|
279
|
+
},
|
|
280
|
+
"description": "规则组(autoJudges),kind=rules 时必填;OR 组间、组内 AND。 values 须与表单选项 label 完全一致(patterns.md#P05)"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"required": [
|
|
284
|
+
"kind"
|
|
285
|
+
],
|
|
286
|
+
"x-constraints": [
|
|
287
|
+
{
|
|
288
|
+
"if": "properties.kind.const='rules'",
|
|
289
|
+
"then": "required=['autoJudges']",
|
|
290
|
+
"description": "rules kind requires non-empty autoJudges"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"x-condition-constraints": [
|
|
294
|
+
"autoJudges follows OR-of-AND grouping",
|
|
295
|
+
"judgeType and fieldType must be semantically compatible"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"WorkflowEdgeDTO": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"description": "工作流边(edge):from/to 引用 nodes[].id。 分支出边见 分支出边:from 须为 type=gateway 且 attrs.mode=parallel 的节点 id;to 为该分支首节点。条件选路(P03a)用 condition.kind=rules;兜底或并行(P03b)用 default 或省略 condition。 省略 condition=无条件线性边。",
|
|
301
|
+
"properties": {
|
|
302
|
+
"from": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"description": "源节点 id(from)。parallel fork 时为本 gateway.id;线性边为上游业务节点 id",
|
|
305
|
+
"minLength": 1
|
|
306
|
+
},
|
|
307
|
+
"to": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"description": "目标节点 id(to)。须存在于 nodes[].id,且不得形成环(DAG)",
|
|
310
|
+
"minLength": 1
|
|
311
|
+
},
|
|
312
|
+
"label": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"description": "边展示标签(label)"
|
|
315
|
+
},
|
|
316
|
+
"priority": {
|
|
317
|
+
"type": "integer",
|
|
318
|
+
"description": "优先级(priority),多条规则边同时命中时数值小者优先"
|
|
319
|
+
},
|
|
320
|
+
"condition": {
|
|
321
|
+
"$ref": "#/$defs/EdgeConditionDTO",
|
|
322
|
+
"description": "边条件(condition);省略=无条件边。kind/rules/default 语义见 EdgeConditionDTO"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"required": [
|
|
326
|
+
"from",
|
|
327
|
+
"to"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
"WorkflowEdgesDTO": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"description": "边容器(edges):主字段 edges 为 WorkflowEdgeDTO 列表",
|
|
333
|
+
"properties": {
|
|
334
|
+
"edges": {
|
|
335
|
+
"type": "array",
|
|
336
|
+
"minItems": 1,
|
|
337
|
+
"items": {
|
|
338
|
+
"$ref": "#/$defs/WorkflowEdgeDTO"
|
|
339
|
+
},
|
|
340
|
+
"description": "显式边列表(edges):每项 from/to 引用 nodes[].id"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"required": [
|
|
344
|
+
"edges"
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"TimeoutDurationDTO": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"description": "超时时长(duration):数值 + 单位,对应 legacy timeoutValue + timeoutType(单位)",
|
|
350
|
+
"properties": {
|
|
351
|
+
"value": {
|
|
352
|
+
"type": "integer",
|
|
353
|
+
"description": "时长数值(value),对应 legacy compareValue / timeoutValue 整数部分"
|
|
354
|
+
},
|
|
355
|
+
"unit": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "时间单位(unit):day|hour|minute|workday|national_workday",
|
|
358
|
+
"enum": [
|
|
359
|
+
"day",
|
|
360
|
+
"hour",
|
|
361
|
+
"minute",
|
|
362
|
+
"workday",
|
|
363
|
+
"national_workday"
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"required": [
|
|
368
|
+
"value",
|
|
369
|
+
"unit"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
"TableRowOperationsDTO": {
|
|
373
|
+
"type": "object",
|
|
374
|
+
"description": "子表行操作策略(tableRowOperations):仅当 fieldMappings.fieldId 为目标子表时使用。add_rows=追加行;replace_table=整表覆盖;update_rows=更新已有行(前置:targetFilterRules 须含该目标子表子字段筛选)。",
|
|
375
|
+
"properties": {
|
|
376
|
+
"strategy": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"description": "策略(strategy):add_rows=向目标子表追加行;update_rows=更新目标子表已有行(须 targetFilterRules 含该目标子表子字段筛选);replace_table=整表覆盖",
|
|
379
|
+
"enum": [
|
|
380
|
+
"add_rows",
|
|
381
|
+
"update_rows",
|
|
382
|
+
"replace_table"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"fieldMappings": {
|
|
386
|
+
"type": "array",
|
|
387
|
+
"minItems": 1,
|
|
388
|
+
"items": {
|
|
389
|
+
"$ref": "#/$defs/QRobotRelationRuleDTO"
|
|
390
|
+
},
|
|
391
|
+
"description": "子表内子字段映射(fieldMappings),结构与 QRobotRelationRuleDTO 相同"
|
|
392
|
+
},
|
|
393
|
+
"addWhenNoMatch": {
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"description": "update_rows 专用:目标子表按 targetFilterRules 无匹配行时是否新增行(addWhenNoMatch)"
|
|
396
|
+
},
|
|
397
|
+
"addRule": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"description": "addWhenNoMatch=true 时的新增行规则(addRule),如 copy_row/new_default_row"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"required": [
|
|
403
|
+
"strategy"
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"QRobotRelationRuleDTO": {
|
|
407
|
+
"type": "object",
|
|
408
|
+
"description": "Q-Robot 字段映射(fieldMappings):将源表单或字面量写入目标应用 fieldId",
|
|
409
|
+
"properties": {
|
|
410
|
+
"fieldId": {
|
|
411
|
+
"type": "integer",
|
|
412
|
+
"description": "目标应用中的字段 id(fieldId)"
|
|
413
|
+
},
|
|
414
|
+
"matchType": {
|
|
415
|
+
"type": "string",
|
|
416
|
+
"description": "赋值来源(matchType):literal=常量/结构化字面量;field_ref=引用当前流程表单字段 id",
|
|
417
|
+
"enum": [
|
|
418
|
+
"literal",
|
|
419
|
+
"field_ref"
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"values": {
|
|
423
|
+
"type": "array",
|
|
424
|
+
"minItems": 1,
|
|
425
|
+
"items": {
|
|
426
|
+
"oneOf": [
|
|
427
|
+
{
|
|
428
|
+
"type": "string",
|
|
429
|
+
"description": "简单字面量或 matchType=field_ref 时的源 fieldId 字符串"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"type": "number"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"type": "boolean"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"$ref": "#/$defs/LiteralAssignmentValueDTO"
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"description": "赋值载荷(values)。literal:string/number/boolean、{\"value\":\"已审核\"} 或 LiteralAssignmentValueDTO;field_ref:源 fieldId 字符串数组",
|
|
443
|
+
"comment": "literal简写:[{\"value\":\"已审核\"}]; field_ref:[\"343283769\"]; 复杂字面量:[{\"valueType\":\"option\",\"value\":\"123\"}]"
|
|
444
|
+
},
|
|
445
|
+
"tableRowOperations": {
|
|
446
|
+
"$ref": "#/$defs/TableRowOperationsDTO",
|
|
447
|
+
"description": "目标子表行操作策略(tableRowOperations):fieldId 为目标子表(QUE_TYPE_TABLE)时使用。 子表行操作策略(tableRowOperations):仅当 fieldMappings.fieldId 为目标子表时使用。add_rows=追加行;replace_table=整表覆盖;update_rows=更新已有行(前置:targetFilterRules 须含该目标子表子字段筛选)。"
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"required": [
|
|
451
|
+
"fieldId",
|
|
452
|
+
"matchType",
|
|
453
|
+
"values"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"MissAddConfigDTO": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {}
|
|
459
|
+
},
|
|
460
|
+
"AutomationTableFilterRuleDTO": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"description": "源应用单个子表的行筛选:对应编辑器「表格筛选条件」中的一条子表配置",
|
|
463
|
+
"properties": {
|
|
464
|
+
"tableFieldId": {
|
|
465
|
+
"type": "integer",
|
|
466
|
+
"description": "源应用(当前流程)子表 fieldId(tableFieldId)。不是 attrs.appKey 目标应用的子表",
|
|
467
|
+
"comment": "示例:源流程订单明细子表 queId;勿填目标应用子表 id"
|
|
468
|
+
},
|
|
469
|
+
"filterRules": {
|
|
470
|
+
"type": "array",
|
|
471
|
+
"minItems": 1,
|
|
472
|
+
"items": {
|
|
473
|
+
"$ref": "#/$defs/FilterRuleGroupDTO"
|
|
474
|
+
},
|
|
475
|
+
"description": "对该源子表行的筛选组(filterRules):OR 组内 AND。 FilterRuleDTO.fieldId 必须是 tableFieldId 下子字段(源应用),仅 matchType=literal。 FilterRule 上下文:condition.autoJudges→fieldId 源应用、仅 literal;targetFilterRules→fieldId 目标应用、literal|field_ref;tableFilterRules.filterRules→fieldId 源子表子字段、仅 literal。"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"required": [
|
|
479
|
+
"tableFieldId",
|
|
480
|
+
"filterRules"
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
"AutomationUpdateAttrsDTO": {
|
|
484
|
+
"type": "object",
|
|
485
|
+
"description": "Q-Robot 更新(subType=update):targetFilterRules 定位目标行,fieldMappings 写字段。【Q-Robot 三层筛选】① tableFilterRules=编辑器「表格筛选条件」,筛源应用(当前流程)子表行,legacy tableFilterCondition;② targetFilterRules=编辑器「更新哪些数据」,筛目标应用(appKey)主记录/目标子表行,legacy qrobotQueFilterFormula/filterCondition;③ fieldMappings[].tableRowOperations=「表格更新规则」,写目标子表行内容。目标子表行定位写在 targetFilterRules,不要写在 tableFilterRules。",
|
|
486
|
+
"properties": {
|
|
487
|
+
"appKey": {
|
|
488
|
+
"type": "string",
|
|
489
|
+
"description": "目标应用 appKey",
|
|
490
|
+
"minLength": 1,
|
|
491
|
+
"x-resource-ref": {
|
|
492
|
+
"resourceType": "application",
|
|
493
|
+
"guidance": "Select an application to update"
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"targetFilterRules": {
|
|
497
|
+
"type": "array",
|
|
498
|
+
"minItems": 1,
|
|
499
|
+
"items": {
|
|
500
|
+
"$ref": "#/$defs/FilterRuleGroupDTO"
|
|
501
|
+
},
|
|
502
|
+
"description": "更新哪些数据(targetFilterRules):编辑器「更新哪些数据/+筛选数据」。fieldId 属于目标应用(appKey);matchType=field_ref 时 values[0] 为源应用 fieldId 字符串。若按目标子表某行定位主记录,在此对目标子表的子字段写筛选(非 tableFilterRules)。Legacy qrobotQueFilterFormula / filterCondition。"
|
|
503
|
+
},
|
|
504
|
+
"fieldMappings": {
|
|
505
|
+
"type": "array",
|
|
506
|
+
"minItems": 1,
|
|
507
|
+
"items": {
|
|
508
|
+
"$ref": "#/$defs/QRobotRelationRuleDTO"
|
|
509
|
+
},
|
|
510
|
+
"description": "字段映射(fieldMappings):更新哪些字段及取值"
|
|
511
|
+
},
|
|
512
|
+
"missAdd": {
|
|
513
|
+
"$ref": "#/$defs/MissAddConfigDTO",
|
|
514
|
+
"description": "未匹配到记录时是否新增(missAdd)"
|
|
515
|
+
},
|
|
516
|
+
"tableFilterRules": {
|
|
517
|
+
"type": "array",
|
|
518
|
+
"items": {
|
|
519
|
+
"$ref": "#/$defs/AutomationTableFilterRuleDTO"
|
|
520
|
+
},
|
|
521
|
+
"description": "源应用表格筛选(tableFilterRules):编辑器「表格筛选条件」。在映射写入目标应用前,限定当前流程(源应用)子表参与操作的行。tableFieldId 为源子表 fieldId;filterRules 内 fieldId 须为该源子表下的子字段,仅 matchType=literal。Legacy tableFilterCondition。与 targetFilterRules 无关。"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"required": [
|
|
525
|
+
"appKey",
|
|
526
|
+
"targetFilterRules",
|
|
527
|
+
"fieldMappings"
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
"MemberRefDTO": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"description": "成员引用(MemberRef):对应设计器节点负责人(成员/部门/角色/动态 Tab)",
|
|
533
|
+
"properties": {
|
|
534
|
+
"type": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"description": "负责人来源(type)。静态:user(uid)、dept(deptId)、role(roleId)。动态:applicant;leader(queId=5 申请人部门主管,否则 queId 须为 fieldType=dept 的字段);nodeLeader(当前节点负责人,无需 id);formEmail(queId 须 fieldType=email);formMember(queId 须 fieldType=member,含表格子字段);formDept(queId 须 fieldType=dept)。",
|
|
537
|
+
"comment": "{\"type\":\"user\",\"uid\":1001} | {\"type\":\"leader\",\"queId\":5} | {\"type\":\"formEmail\",\"queId\":343283769} | {\"type\":\"formMember\",\"queId\":343283769}",
|
|
538
|
+
"enum": [
|
|
539
|
+
"user",
|
|
540
|
+
"dept",
|
|
541
|
+
"role",
|
|
542
|
+
"applicant",
|
|
543
|
+
"leader",
|
|
544
|
+
"formEmail",
|
|
545
|
+
"formMember",
|
|
546
|
+
"formDept",
|
|
547
|
+
"nodeLeader"
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
"uid": {
|
|
551
|
+
"type": "integer",
|
|
552
|
+
"description": "用户 id(uid),type=user 时必填",
|
|
553
|
+
"x-resource-ref": {
|
|
554
|
+
"resourceType": "member",
|
|
555
|
+
"guidance": "Search workspace users when type=user"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"deptId": {
|
|
559
|
+
"type": "integer",
|
|
560
|
+
"description": "部门 id(deptId),type=dept 时必填",
|
|
561
|
+
"x-resource-ref": {
|
|
562
|
+
"resourceType": "member",
|
|
563
|
+
"guidance": "Search workspace departments when type=dept"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"roleId": {
|
|
567
|
+
"type": "integer",
|
|
568
|
+
"description": "角色 id(roleId),type=role 时必填",
|
|
569
|
+
"x-resource-ref": {
|
|
570
|
+
"resourceType": "member",
|
|
571
|
+
"guidance": "Search workspace roles when type=role"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
"queId": {
|
|
575
|
+
"type": "integer",
|
|
576
|
+
"description": "表单字段 id(queId)。leader/formEmail/formMember/formDept 时必填。选字段时按 fieldType 过滤:formEmail→email,formMember→member,formDept→dept,leader(非5)→dept;与 qingflow CLI 应用字段类型、FilterRuleDTO.fieldType 同名。",
|
|
577
|
+
"x-resource-ref": {
|
|
578
|
+
"resourceType": "formField",
|
|
579
|
+
"guidance": "Resolve field by title/id from current app; filter by fieldType: formEmail=email, formMember=member, formDept=dept, leader(dept field)=dept, leader(applicant)=queId 5"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"havingSubDept": {
|
|
583
|
+
"type": "boolean",
|
|
584
|
+
"description": "是否包含子部门(havingSubDept),type=dept 时可选"
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
"required": [
|
|
588
|
+
"type"
|
|
589
|
+
],
|
|
590
|
+
"x-constraints": [
|
|
591
|
+
{
|
|
592
|
+
"description": "type 决定必填字段与 queId 字段类型(filter):user→uid;dept→deptId;role→roleId;applicant 无 id;leader→queId(5 或 fieldType=dept);formEmail→fieldType=email;formMember→fieldType=member;formDept→fieldType=dept。fieldType 与 CLI/FilterRuleDTO 一致(email/member/dept 等)"
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
"PreTimeoutConfigDTO": {
|
|
597
|
+
"type": "object",
|
|
598
|
+
"description": "超时预警(preTimeout):超时到达前的提醒配置",
|
|
599
|
+
"properties": {
|
|
600
|
+
"enabled": {
|
|
601
|
+
"type": "boolean",
|
|
602
|
+
"description": "是否开启预警(enabled)"
|
|
603
|
+
},
|
|
604
|
+
"duration": {
|
|
605
|
+
"$ref": "#/$defs/TimeoutDurationDTO",
|
|
606
|
+
"description": "预警提前量(duration)"
|
|
607
|
+
},
|
|
608
|
+
"notifiers": {
|
|
609
|
+
"type": "array",
|
|
610
|
+
"items": {
|
|
611
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
612
|
+
},
|
|
613
|
+
"description": "预警通知人(notifiers)"
|
|
614
|
+
},
|
|
615
|
+
"notifyCurrentAuditor": {
|
|
616
|
+
"type": "boolean",
|
|
617
|
+
"description": "是否通知当前节点负责人(notifyCurrentAuditor),默认 true"
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
"required": [
|
|
621
|
+
"enabled",
|
|
622
|
+
"duration"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"TimeoutConfigDTO": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"description": "超时与预警(timeoutConfig):用于审批/填写节点,控制超时提醒、通知人与自动处理",
|
|
628
|
+
"properties": {
|
|
629
|
+
"type": {
|
|
630
|
+
"type": "string",
|
|
631
|
+
"description": "超时来源(type/mode):custom=固定时长;form=取自表单日期字段",
|
|
632
|
+
"enum": [
|
|
633
|
+
"custom",
|
|
634
|
+
"form"
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
"duration": {
|
|
638
|
+
"$ref": "#/$defs/TimeoutDurationDTO",
|
|
639
|
+
"description": "自定义超时时长(duration),type=custom 时必填"
|
|
640
|
+
},
|
|
641
|
+
"timeoutQueId": {
|
|
642
|
+
"type": "integer",
|
|
643
|
+
"description": "表单字段 id(timeoutQueId),type=form 时必填"
|
|
644
|
+
},
|
|
645
|
+
"timeoutCompareType": {
|
|
646
|
+
"type": "string",
|
|
647
|
+
"description": "与字段日期的比较方式(timeoutCompareType),type=form 时使用",
|
|
648
|
+
"enum": [
|
|
649
|
+
"current",
|
|
650
|
+
"before",
|
|
651
|
+
"after"
|
|
652
|
+
]
|
|
653
|
+
},
|
|
654
|
+
"offset": {
|
|
655
|
+
"$ref": "#/$defs/TimeoutDurationDTO",
|
|
656
|
+
"description": "相对字段日期的偏移量(offset),type=form 且 before/after 时必填"
|
|
657
|
+
},
|
|
658
|
+
"timeOfDay": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"description": "表单日期当天的具体时刻(timeOfDay),格式 HH:mm,type=form 且 compare=current 时可选"
|
|
661
|
+
},
|
|
662
|
+
"autoDeal": {
|
|
663
|
+
"type": "boolean",
|
|
664
|
+
"description": "超时后自动处理(autoDeal)"
|
|
665
|
+
},
|
|
666
|
+
"notifyCurrentAuditor": {
|
|
667
|
+
"type": "boolean",
|
|
668
|
+
"description": "是否通知当前节点负责人(notifyCurrentAuditor),默认 true"
|
|
669
|
+
},
|
|
670
|
+
"notifiers": {
|
|
671
|
+
"type": "array",
|
|
672
|
+
"items": {
|
|
673
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
674
|
+
},
|
|
675
|
+
"description": "超时通知人(notifiers),可含 nodeLeader/user/role 等"
|
|
676
|
+
},
|
|
677
|
+
"remindType": {
|
|
678
|
+
"type": "string",
|
|
679
|
+
"description": "提醒类型(remindType):immediate=立即;fixed_time=指定时间",
|
|
680
|
+
"enum": [
|
|
681
|
+
"immediate",
|
|
682
|
+
"fixed_time"
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
"preTimeout": {
|
|
686
|
+
"$ref": "#/$defs/PreTimeoutConfigDTO",
|
|
687
|
+
"description": "超时预警(preTimeout)"
|
|
688
|
+
},
|
|
689
|
+
"timeoutValue": {
|
|
690
|
+
"type": "string",
|
|
691
|
+
"description": "已废弃:请使用 duration;兼容旧草案如 2d/3h"
|
|
692
|
+
},
|
|
693
|
+
"timeoutWarning": {
|
|
694
|
+
"type": "boolean",
|
|
695
|
+
"description": "已废弃:请使用 preTimeout.enabled"
|
|
696
|
+
},
|
|
697
|
+
"timeoutWarningType": {
|
|
698
|
+
"type": "integer",
|
|
699
|
+
"description": "已废弃:请使用 preTimeout.duration"
|
|
700
|
+
},
|
|
701
|
+
"timeoutWarningValue": {
|
|
702
|
+
"type": "string",
|
|
703
|
+
"description": "已废弃:请使用 preTimeout.duration"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"required": [
|
|
707
|
+
"type"
|
|
708
|
+
],
|
|
709
|
+
"x-constraints": [
|
|
710
|
+
{
|
|
711
|
+
"if": "properties.type.const='custom'",
|
|
712
|
+
"then": "required=['duration']",
|
|
713
|
+
"else": "required=['timeoutQueId']",
|
|
714
|
+
"description": "Custom timeout requires duration; form timeout requires timeoutQueId"
|
|
715
|
+
}
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
"MailFileDTO": {
|
|
719
|
+
"type": "object",
|
|
720
|
+
"description": "邮件附件来源(mailFiles 项)",
|
|
721
|
+
"properties": {
|
|
722
|
+
"type": {
|
|
723
|
+
"type": "integer",
|
|
724
|
+
"description": "附件来源类型(type):决定使用 fieldId(表单附件字段) 或 printKey(打印模板)"
|
|
725
|
+
},
|
|
726
|
+
"printKey": {
|
|
727
|
+
"type": "string",
|
|
728
|
+
"description": "打印模板 key(printKey),type 为打印模板时使用"
|
|
729
|
+
},
|
|
730
|
+
"fieldId": {
|
|
731
|
+
"type": "integer",
|
|
732
|
+
"description": "表单附件字段 id(fieldId),type 为字段附件时使用"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
"QRobotMailConfigDTO": {
|
|
737
|
+
"type": "object",
|
|
738
|
+
"description": "Q-Robot 发邮件配置(mailConfig):发件人、主题、正文与附件;收件人见 AutomationSendEmailAttrsDTO.mailReceivers",
|
|
739
|
+
"properties": {
|
|
740
|
+
"mailSender": {
|
|
741
|
+
"$ref": "#/$defs/MemberRefDTO",
|
|
742
|
+
"description": "发件人(mailSender),MemberRef 指定用户/部门/角色/申请人"
|
|
743
|
+
},
|
|
744
|
+
"title": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"description": "邮件主题(title):纯文本或 HTML;可含字段占位符(通常由 UI 生成 {$$...$$} 编码),CLI 可先填静态文案",
|
|
747
|
+
"comment": "示例:\"【CRM】新客户审核通过\""
|
|
748
|
+
},
|
|
749
|
+
"content": {
|
|
750
|
+
"type": "string",
|
|
751
|
+
"description": "邮件正文(content):纯文本或 HTML;可插入当前流程表单字段值(占位符由 CustomPushContentConverter 解析)",
|
|
752
|
+
"comment": "示例:\"客户已通过审核,请安排首次跟进。\""
|
|
753
|
+
},
|
|
754
|
+
"mailFiles": {
|
|
755
|
+
"type": "array",
|
|
756
|
+
"items": {
|
|
757
|
+
"$ref": "#/$defs/MailFileDTO"
|
|
758
|
+
},
|
|
759
|
+
"description": "附件列表(mailFiles)"
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
"AutomationSendEmailAttrsDTO": {
|
|
764
|
+
"type": "object",
|
|
765
|
+
"description": "Q-Robot 发邮件(subType=send_email):按 mailConfig 与 mailReceivers 发送邮件通知",
|
|
766
|
+
"properties": {
|
|
767
|
+
"mailConfig": {
|
|
768
|
+
"$ref": "#/$defs/QRobotMailConfigDTO",
|
|
769
|
+
"description": "邮件配置(mailConfig):发件人、主题、正文与附件"
|
|
770
|
+
},
|
|
771
|
+
"mailReceivers": {
|
|
772
|
+
"type": "array",
|
|
773
|
+
"minItems": 1,
|
|
774
|
+
"items": {
|
|
775
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
776
|
+
},
|
|
777
|
+
"description": "邮件收件人(mailReceivers):用户/部门/角色/字段,至少一人"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
"required": [
|
|
781
|
+
"mailConfig",
|
|
782
|
+
"mailReceivers"
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
"WebhookExtractorDTO": {
|
|
786
|
+
"type": "object",
|
|
787
|
+
"description": "Webhook 入站解析提取器:按 type 填写 path/pattern/value 等",
|
|
788
|
+
"properties": {
|
|
789
|
+
"type": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"description": "提取类型(type):literal=固定 value;jsonpath/xpath=用 path 从 body 提取;regex=用 pattern+group 从文本提取",
|
|
792
|
+
"enum": [
|
|
793
|
+
"literal",
|
|
794
|
+
"jsonpath",
|
|
795
|
+
"xpath",
|
|
796
|
+
"regex"
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
"path": {
|
|
800
|
+
"type": "string",
|
|
801
|
+
"description": "JSONPath/XPath 路径(path),type=jsonpath 或 xpath 时必填"
|
|
802
|
+
},
|
|
803
|
+
"pattern": {
|
|
804
|
+
"type": "string",
|
|
805
|
+
"description": "正则表达式(pattern),type=regex 时必填"
|
|
806
|
+
},
|
|
807
|
+
"group": {
|
|
808
|
+
"type": "integer",
|
|
809
|
+
"description": "正则捕获组索引(group),type=regex 时使用,默认 0"
|
|
810
|
+
},
|
|
811
|
+
"value": {
|
|
812
|
+
"type": "string",
|
|
813
|
+
"description": "字面量(value),type=literal 时必填"
|
|
814
|
+
},
|
|
815
|
+
"allowWholeBody": {
|
|
816
|
+
"type": "boolean",
|
|
817
|
+
"description": "是否允许整包 body 提取(allowWholeBody)"
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"required": [
|
|
821
|
+
"type"
|
|
822
|
+
]
|
|
823
|
+
},
|
|
824
|
+
"WebhookParseRuleDTO": {
|
|
825
|
+
"type": "object",
|
|
826
|
+
"description": "Webhook 响应解析规则:将 HTTP 响应映射到当前应用字段",
|
|
827
|
+
"properties": {
|
|
828
|
+
"targetFieldId": {
|
|
829
|
+
"type": "integer",
|
|
830
|
+
"description": "目标字段 id(targetFieldId):当前应用字段 queId"
|
|
831
|
+
},
|
|
832
|
+
"valueShape": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"description": "值形态(valueShape):scalar 或 table 子行"
|
|
835
|
+
},
|
|
836
|
+
"extractor": {
|
|
837
|
+
"$ref": "#/$defs/WebhookExtractorDTO",
|
|
838
|
+
"description": "提取器(extractor):jsonpath/xpath/regex/literal"
|
|
839
|
+
},
|
|
840
|
+
"tableRules": {
|
|
841
|
+
"type": "array",
|
|
842
|
+
"items": {
|
|
843
|
+
"$ref": "#/$defs/WebhookParseRuleDTO"
|
|
844
|
+
},
|
|
845
|
+
"description": "子表字段解析规则(tableRules)"
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
"required": [
|
|
849
|
+
"targetFieldId",
|
|
850
|
+
"extractor"
|
|
851
|
+
]
|
|
852
|
+
},
|
|
853
|
+
"RemoteHttpRequestConfigDTO": {
|
|
854
|
+
"type": "object",
|
|
855
|
+
"description": "远程 HTTP 请求配置(remoteRequestConfig):Q-Robot http_request 子类型使用",
|
|
856
|
+
"properties": {
|
|
857
|
+
"url": {
|
|
858
|
+
"type": "string",
|
|
859
|
+
"description": "请求 URL(url)"
|
|
860
|
+
},
|
|
861
|
+
"method": {
|
|
862
|
+
"type": "string",
|
|
863
|
+
"description": "HTTP 方法(method),如 GET/POST"
|
|
864
|
+
},
|
|
865
|
+
"triggerType": {
|
|
866
|
+
"type": "integer",
|
|
867
|
+
"description": "触发模式(triggerType):1=默认(发送整单 ApplyDetailInfo);2=自定义(使用 jsonValue/xmlValue 模板)。有 jsonValue/xmlValue 且未显式传值时 Apply 推断为 2",
|
|
868
|
+
"enum": [
|
|
869
|
+
"1",
|
|
870
|
+
"2"
|
|
871
|
+
]
|
|
872
|
+
},
|
|
873
|
+
"bodyType": {
|
|
874
|
+
"type": "integer",
|
|
875
|
+
"description": "请求体格式(bodyType):决定使用 jsonValue 还是 xmlValue"
|
|
876
|
+
},
|
|
877
|
+
"jsonValue": {
|
|
878
|
+
"type": "string",
|
|
879
|
+
"description": "JSON 请求体模板(jsonValue):合法 JSON 字符串;bodyType 为 JSON 时使用。可静态如 {\"event\":\"customer.approved\"},也可含字段占位符",
|
|
880
|
+
"comment": "示例:\"{\\\"event\\\":\\\"customer.approved\\\"}\""
|
|
881
|
+
},
|
|
882
|
+
"xmlValue": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"description": "XML 请求体模板(xmlValue):bodyType 为 XML 时使用"
|
|
885
|
+
},
|
|
886
|
+
"resultType": {
|
|
887
|
+
"type": "integer",
|
|
888
|
+
"description": "期望响应类型(resultType)"
|
|
889
|
+
},
|
|
890
|
+
"updateStatus": {
|
|
891
|
+
"type": "boolean",
|
|
892
|
+
"description": "是否用响应更新表单字段(updateStatus)"
|
|
893
|
+
},
|
|
894
|
+
"globalWebhookConfigId": {
|
|
895
|
+
"type": "integer",
|
|
896
|
+
"description": "引用的全局 Webhook 配置 id(globalWebhookConfigId)"
|
|
897
|
+
},
|
|
898
|
+
"globalAuthId": {
|
|
899
|
+
"type": "integer",
|
|
900
|
+
"description": "引用的全局鉴权 id(globalAuthId)"
|
|
901
|
+
},
|
|
902
|
+
"configMode": {
|
|
903
|
+
"type": "integer",
|
|
904
|
+
"description": "配置模式(configMode)"
|
|
905
|
+
},
|
|
906
|
+
"wingsAgentId": {
|
|
907
|
+
"type": "integer",
|
|
908
|
+
"description": "Wings Agent id(wingsAgentId)"
|
|
909
|
+
},
|
|
910
|
+
"wingsSkillId": {
|
|
911
|
+
"type": "integer",
|
|
912
|
+
"description": "Wings Skill id(wingsSkillId)"
|
|
913
|
+
},
|
|
914
|
+
"beingInsertValueDirectly": {
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"description": "是否直接将原始响应写入字段(beingInsertValueDirectly)"
|
|
917
|
+
},
|
|
918
|
+
"parseRules": {
|
|
919
|
+
"type": "array",
|
|
920
|
+
"items": {
|
|
921
|
+
"$ref": "#/$defs/WebhookParseRuleDTO"
|
|
922
|
+
},
|
|
923
|
+
"description": "响应解析规则(parseRules):updateStatus=true 时写入 draft_webhook_parse"
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"required": [
|
|
927
|
+
"url"
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
"AutomationHttpRequestAttrsDTO": {
|
|
931
|
+
"type": "object",
|
|
932
|
+
"description": "Q-Robot 远程请求(subType=http_request):调用外部 HTTP 接口",
|
|
933
|
+
"properties": {
|
|
934
|
+
"remoteRequestConfig": {
|
|
935
|
+
"$ref": "#/$defs/RemoteHttpRequestConfigDTO",
|
|
936
|
+
"description": "远程请求配置(remoteRequestConfig):URL、方法、参数与响应解析"
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
"required": [
|
|
940
|
+
"remoteRequestConfig"
|
|
941
|
+
]
|
|
942
|
+
},
|
|
943
|
+
"FieldPermissionDTO": {
|
|
944
|
+
"type": "object",
|
|
945
|
+
"description": "字段权限项(FieldPermissionDTO):绑定 fieldId(queId) 与 fieldAuth。设计器三种状态:可编辑(edit)、隐藏(hide)、仅可见(readonly)。",
|
|
946
|
+
"properties": {
|
|
947
|
+
"fieldId": {
|
|
948
|
+
"type": "integer",
|
|
949
|
+
"description": "表单字段 id(fieldId/queId),须为当前应用 questionIndex 中存在的字段;与 qingflow CLI fields 的 que_id 一致。"
|
|
950
|
+
},
|
|
951
|
+
"fieldAuth": {
|
|
952
|
+
"type": "string",
|
|
953
|
+
"description": "字段权限级别(fieldAuth)。edit=可编辑(设计器可编辑,queAuth=1);hide=隐藏(queAuth=2);readonly=仅可见(queAuth=3,填写/审批节点缺省值)。",
|
|
954
|
+
"comment": "edit | hide | readonly",
|
|
955
|
+
"enum": [
|
|
956
|
+
"edit",
|
|
957
|
+
"hide",
|
|
958
|
+
"readonly"
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
"addRow": {
|
|
962
|
+
"type": "boolean",
|
|
963
|
+
"description": "表格字段:是否允许新增行(addRow),非表格字段忽略"
|
|
964
|
+
},
|
|
965
|
+
"deleteRow": {
|
|
966
|
+
"type": "boolean",
|
|
967
|
+
"description": "表格字段:是否允许删除行(deleteRow),非表格字段忽略"
|
|
968
|
+
},
|
|
969
|
+
"editRow": {
|
|
970
|
+
"type": "boolean",
|
|
971
|
+
"description": "表格字段:是否允许编辑行(editRow),非表格字段忽略"
|
|
972
|
+
},
|
|
973
|
+
"beingFold": {
|
|
974
|
+
"type": "boolean",
|
|
975
|
+
"description": "是否在节点表单中折叠显示该字段(beingFold)"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
"required": [
|
|
979
|
+
"fieldId",
|
|
980
|
+
"fieldAuth"
|
|
981
|
+
],
|
|
982
|
+
"x-constraints": [
|
|
983
|
+
{
|
|
984
|
+
"description": "缺省补齐(Spec→Legacy):可只写需特殊处理的字段;Apply 时按应用字段全集(questionIndex)展开。applicant 未列出→edit;filling/approval/cc 未列出→readonly(仅可见)。已显式列出的 fieldId(含 hide)不被覆盖。表格字段可配 addRow/deleteRow/editRow。"
|
|
985
|
+
}
|
|
986
|
+
]
|
|
987
|
+
},
|
|
988
|
+
"CCAttrsDTO": {
|
|
989
|
+
"type": "object",
|
|
990
|
+
"description": "【WHAT】抄送节点(cc):通知成员查看流程与数据,通常不阻塞主路径、不产生必须处理的审批待办。【WHY】让相关人知情(财务抄送、管理层知会);可限制可见字段与是否查看审批记录。【HOW】配置 receivers、auditRecordVisible、fieldPermissions;未列出字段默认 readonly。",
|
|
991
|
+
"properties": {
|
|
992
|
+
"receivers": {
|
|
993
|
+
"type": "array",
|
|
994
|
+
"minItems": 1,
|
|
995
|
+
"items": {
|
|
996
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
997
|
+
},
|
|
998
|
+
"description": "抄送对象(receivers):用户/部门/角色,至少一人"
|
|
999
|
+
},
|
|
1000
|
+
"auditRecordVisible": {
|
|
1001
|
+
"type": "boolean",
|
|
1002
|
+
"description": "抄送人是否可查看审批记录(auditRecordVisible)"
|
|
1003
|
+
},
|
|
1004
|
+
"fieldPermissions": {
|
|
1005
|
+
"type": "array",
|
|
1006
|
+
"items": {
|
|
1007
|
+
"$ref": "#/$defs/FieldPermissionDTO"
|
|
1008
|
+
},
|
|
1009
|
+
"description": "字段权限(fieldPermissions)【抄送节点】 WHAT:抄送人查看流程数据时可见哪些字段。 WHY:知会场景通常只读,避免泄露或误改敏感字段。 HOW:未列出字段默认 readonly;隐藏用 hide。 缺省补齐(Spec→Legacy):可只写需特殊处理的字段;Apply 时按应用字段全集(questionIndex)展开。applicant 未列出→edit;filling/approval/cc 未列出→readonly(仅可见)。已显式列出的 fieldId(含 hide)不被覆盖。表格字段可配 addRow/deleteRow/editRow。"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"required": [
|
|
1013
|
+
"receivers"
|
|
1014
|
+
]
|
|
1015
|
+
},
|
|
1016
|
+
"AutomationAIOutputFieldDTO": {
|
|
1017
|
+
"type": "object",
|
|
1018
|
+
"description": "AI output field mapping",
|
|
1019
|
+
"properties": {
|
|
1020
|
+
"fieldId": {
|
|
1021
|
+
"type": "integer",
|
|
1022
|
+
"description": "Output field id"
|
|
1023
|
+
},
|
|
1024
|
+
"fieldDesc": {
|
|
1025
|
+
"type": "string",
|
|
1026
|
+
"description": "Output field description"
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
"required": [
|
|
1030
|
+
"fieldId"
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
"AutomationAIConfigDTO": {
|
|
1034
|
+
"type": "object",
|
|
1035
|
+
"description": "AI 配置(aiConfig) 按 subType 必填字段(Legacy aiNodeSettingCheck 对齐):A) ai_text_summary|ai_content_extraction|ai_content_classification|ai_image_recognition|ai_document_parsing → inputFieldIds + outputFields;B) ai_content_generation|ai_image_generation → promptWords + outputFields;C) ai_machine_translation → inputFieldIds + outputFields + language。 inputFieldIds/outputFields.fieldId 须为当前流程(源应用) questionIndex 中的 queId。",
|
|
1036
|
+
"properties": {
|
|
1037
|
+
"example": {
|
|
1038
|
+
"type": "string",
|
|
1039
|
+
"description": "参考示例(example),可选,辅助模型理解场景"
|
|
1040
|
+
},
|
|
1041
|
+
"promptWords": {
|
|
1042
|
+
"type": "string",
|
|
1043
|
+
"description": "提示词(promptWords)。B 组 subType(ai_content_generation|ai_image_generation)必填;描述 AI 要完成的任务"
|
|
1044
|
+
},
|
|
1045
|
+
"language": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"description": "目标语言(language)。C 组 subType(ai_machine_translation)必填;如 en、ja、zh-CN"
|
|
1048
|
+
},
|
|
1049
|
+
"inputFieldIds": {
|
|
1050
|
+
"type": "array",
|
|
1051
|
+
"minItems": 1,
|
|
1052
|
+
"items": {
|
|
1053
|
+
"type": "integer"
|
|
1054
|
+
},
|
|
1055
|
+
"description": "输入字段 id 列表(inputFieldIds)。A/C 组 subType 必填;须为当前流程(源应用)表单字段 queId",
|
|
1056
|
+
"comment": "示例:[343283769,343283777]"
|
|
1057
|
+
},
|
|
1058
|
+
"outputFields": {
|
|
1059
|
+
"type": "array",
|
|
1060
|
+
"minItems": 1,
|
|
1061
|
+
"items": {
|
|
1062
|
+
"$ref": "#/$defs/AutomationAIOutputFieldDTO"
|
|
1063
|
+
},
|
|
1064
|
+
"description": "输出字段映射(outputFields):AI 结果写入哪些字段;所有 AI subType 必填",
|
|
1065
|
+
"comment": "示例:[{\"fieldId\":343283775,\"fieldDesc\":\"摘要\"}]"
|
|
1066
|
+
},
|
|
1067
|
+
"customButtonText": {
|
|
1068
|
+
"type": "string",
|
|
1069
|
+
"description": "自定义按钮文案(customButtonText),仅 spec 快照,不落 legacy 表"
|
|
1070
|
+
},
|
|
1071
|
+
"customButtonEnabled": {
|
|
1072
|
+
"type": "boolean",
|
|
1073
|
+
"description": "是否启用自定义按钮(customButtonEnabled),仅 spec 快照,不落 legacy 表"
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
"required": [
|
|
1077
|
+
"inputFieldIds",
|
|
1078
|
+
"outputFields"
|
|
1079
|
+
]
|
|
1080
|
+
},
|
|
1081
|
+
"AutomationAIAttrsDTO": {
|
|
1082
|
+
"type": "object",
|
|
1083
|
+
"description": "【WHAT】Q-Robot AI 节点(automation + ai_* subType):流程到达后调用 AI 能力处理表单字段并写回结果,无人工待办。【WHY】文本总结、内容生成/提取/分类、图像识别/生成、文档解析、机器翻译等自动化智能处理。【HOW】type=automation,attrs.subType 选具体 AI 能力(见 AUTOMATION_AI_CONFIG);attrs.aiConfig 配置 inputFieldIds/outputFields/promptWords/language;subType 与 legacy dealType 11~18 一一对应;`ai` 等价于 `ai_text_summary`。【NOT】禁止 fieldPermissions;customButtonText 仅 preservedAttrsJson 快照,不落 legacy 表。",
|
|
1084
|
+
"properties": {
|
|
1085
|
+
"aiConfig": {
|
|
1086
|
+
"$ref": "#/$defs/AutomationAIConfigDTO",
|
|
1087
|
+
"description": "AI 配置(aiConfig) 按 subType 必填字段(Legacy aiNodeSettingCheck 对齐):A) ai_text_summary|ai_content_extraction|ai_content_classification|ai_image_recognition|ai_document_parsing → inputFieldIds + outputFields;B) ai_content_generation|ai_image_generation → promptWords + outputFields;C) ai_machine_translation → inputFieldIds + outputFields + language。 inputFieldIds/outputFields.fieldId 须为当前流程(源应用) questionIndex 中的 queId。"
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
"required": [
|
|
1091
|
+
"aiConfig"
|
|
1092
|
+
],
|
|
1093
|
+
"x-constraints": [
|
|
1094
|
+
{
|
|
1095
|
+
"if": "properties.subType.const='ai_machine_translation'",
|
|
1096
|
+
"then": "properties.aiConfig.required=['inputFieldIds','outputFields','language']",
|
|
1097
|
+
"description": "机器翻译须配置源字段、输出字段与目标 language"
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1101
|
+
"FillingAttrsDTO": {
|
|
1102
|
+
"type": "object",
|
|
1103
|
+
"description": "【WHAT】填写节点(filling):指派处理人补充或修改表单中的少量字段,完成后流转下游;会产生待办(任务中心)。【WHY】当信息需由非申请人(销售助理、主管、财务等)补录时使用;区别于审批节点不做通过/驳回决策。【HOW】配置 responsible(至少一人)、auditFeedback、timeoutConfig、fieldPermissions;典型场景:补全客户资料、上传附件、核对金额;fieldPermissions 须显式列出需 edit 的 fieldId,否则未列出字段在 Apply 后均为 readonly(设计器「仅可见」)。",
|
|
1104
|
+
"properties": {
|
|
1105
|
+
"responsible": {
|
|
1106
|
+
"type": "array",
|
|
1107
|
+
"minItems": 1,
|
|
1108
|
+
"items": {
|
|
1109
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
1110
|
+
},
|
|
1111
|
+
"description": "填写处理人(responsible):用户/部门/角色引用,至少一人"
|
|
1112
|
+
},
|
|
1113
|
+
"auditFeedback": {
|
|
1114
|
+
"type": "boolean",
|
|
1115
|
+
"description": "是否开启处理反馈(auditFeedback)"
|
|
1116
|
+
},
|
|
1117
|
+
"timeoutConfig": {
|
|
1118
|
+
"$ref": "#/$defs/TimeoutConfigDTO",
|
|
1119
|
+
"description": "超时策略(timeoutConfig):超时提醒、自动处理等"
|
|
1120
|
+
},
|
|
1121
|
+
"fieldPermissions": {
|
|
1122
|
+
"type": "array",
|
|
1123
|
+
"items": {
|
|
1124
|
+
"$ref": "#/$defs/FieldPermissionDTO"
|
|
1125
|
+
},
|
|
1126
|
+
"description": "字段权限(fieldPermissions)【填写节点】 WHAT:控制填写人打开待办时能改哪些字段;其余字段仅可见或隐藏。 WHY:填写节点通常只补少量字段,默认其余只读以防误改。 HOW:须为每个需要可编辑的 fieldId 写 fieldAuth=edit;只写 1~2 项会导致其余全部仅可见。 缺省补齐(Spec→Legacy):可只写需特殊处理的字段;Apply 时按应用字段全集(questionIndex)展开。applicant 未列出→edit;filling/approval/cc 未列出→readonly(仅可见)。已显式列出的 fieldId(含 hide)不被覆盖。表格字段可配 addRow/deleteRow/editRow。 示例:[{fieldId:343283775,fieldAuth:\"edit\"},{fieldId:343283769,fieldAuth:\"edit\"}]",
|
|
1127
|
+
"comment": "[{\"fieldId\":343283775,\"fieldAuth\":\"edit\"},{\"fieldId\":343283769,\"fieldAuth\":\"edit\"}]"
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
"required": [
|
|
1131
|
+
"responsible"
|
|
1132
|
+
],
|
|
1133
|
+
"x-capability-boundaries": [
|
|
1134
|
+
{
|
|
1135
|
+
"capability": "human_task_filling",
|
|
1136
|
+
"description": "Assignee supplements few form fields; creates task-center todo",
|
|
1137
|
+
"level": "core",
|
|
1138
|
+
"constraints": [
|
|
1139
|
+
"requires responsible (>=1)",
|
|
1140
|
+
"fieldPermissions: omitted fields default readonly (visible only)",
|
|
1141
|
+
"explicit edit required per fieldId that must be editable"
|
|
1142
|
+
]
|
|
1143
|
+
}
|
|
1144
|
+
]
|
|
1145
|
+
},
|
|
1146
|
+
"WebhookParamDTO": {
|
|
1147
|
+
"type": "object",
|
|
1148
|
+
"properties": {}
|
|
1149
|
+
},
|
|
1150
|
+
"WebhookEndpointDTO": {
|
|
1151
|
+
"type": "object",
|
|
1152
|
+
"properties": {}
|
|
1153
|
+
},
|
|
1154
|
+
"WebhookRequestDTO": {
|
|
1155
|
+
"type": "object",
|
|
1156
|
+
"properties": {}
|
|
1157
|
+
},
|
|
1158
|
+
"WebhookUpdatePolicyDTO": {
|
|
1159
|
+
"type": "object",
|
|
1160
|
+
"description": "Webhook update policy",
|
|
1161
|
+
"properties": {
|
|
1162
|
+
"enabled": {
|
|
1163
|
+
"type": "boolean",
|
|
1164
|
+
"description": "Enable update policy"
|
|
1165
|
+
},
|
|
1166
|
+
"strategy": {
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"description": "Update strategy",
|
|
1169
|
+
"enum": [
|
|
1170
|
+
"insertOnly",
|
|
1171
|
+
"updateOnly",
|
|
1172
|
+
"upsert"
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
"maxUpdateRows": {
|
|
1176
|
+
"type": "integer",
|
|
1177
|
+
"description": "Maximum rows to update"
|
|
1178
|
+
},
|
|
1179
|
+
"matchGroups": {
|
|
1180
|
+
"type": "array",
|
|
1181
|
+
"items": {
|
|
1182
|
+
"type": "array",
|
|
1183
|
+
"items": {
|
|
1184
|
+
"type": "object"
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"description": "OR-of-AND matcher groups"
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
"required": [
|
|
1191
|
+
"enabled"
|
|
1192
|
+
]
|
|
1193
|
+
},
|
|
1194
|
+
"WebhookResponseDTO": {
|
|
1195
|
+
"type": "object",
|
|
1196
|
+
"properties": {}
|
|
1197
|
+
},
|
|
1198
|
+
"ApplicantWebhookConfigDTO": {
|
|
1199
|
+
"type": "object",
|
|
1200
|
+
"description": "Applicant webhook config",
|
|
1201
|
+
"properties": {
|
|
1202
|
+
"id": {
|
|
1203
|
+
"type": "integer",
|
|
1204
|
+
"description": "Webhook config id"
|
|
1205
|
+
},
|
|
1206
|
+
"name": {
|
|
1207
|
+
"type": "string",
|
|
1208
|
+
"description": "Webhook config name",
|
|
1209
|
+
"minLength": 1
|
|
1210
|
+
},
|
|
1211
|
+
"enabled": {
|
|
1212
|
+
"type": "boolean",
|
|
1213
|
+
"description": "Whether webhook is enabled"
|
|
1214
|
+
},
|
|
1215
|
+
"authToken": {
|
|
1216
|
+
"type": "string",
|
|
1217
|
+
"description": "Auth token"
|
|
1218
|
+
},
|
|
1219
|
+
"endpoint": {
|
|
1220
|
+
"$ref": "#/$defs/WebhookEndpointDTO",
|
|
1221
|
+
"description": "Webhook endpoint"
|
|
1222
|
+
},
|
|
1223
|
+
"request": {
|
|
1224
|
+
"$ref": "#/$defs/WebhookRequestDTO",
|
|
1225
|
+
"description": "Request payload metadata"
|
|
1226
|
+
},
|
|
1227
|
+
"parseRules": {
|
|
1228
|
+
"type": "array",
|
|
1229
|
+
"minItems": 1,
|
|
1230
|
+
"items": {
|
|
1231
|
+
"$ref": "#/$defs/WebhookParseRuleDTO"
|
|
1232
|
+
},
|
|
1233
|
+
"description": "Parse rules"
|
|
1234
|
+
},
|
|
1235
|
+
"updatePolicy": {
|
|
1236
|
+
"$ref": "#/$defs/WebhookUpdatePolicyDTO",
|
|
1237
|
+
"description": "Update policy"
|
|
1238
|
+
},
|
|
1239
|
+
"response": {
|
|
1240
|
+
"$ref": "#/$defs/WebhookResponseDTO",
|
|
1241
|
+
"description": "Custom response config"
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"required": [
|
|
1245
|
+
"name",
|
|
1246
|
+
"endpoint",
|
|
1247
|
+
"parseRules",
|
|
1248
|
+
"updatePolicy"
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
"ApplicantAttrsDTO": {
|
|
1252
|
+
"type": "object",
|
|
1253
|
+
"description": "【WHAT】申请人节点(applicant):工作流唯一入口,流程图起点;申请人填写表单并提交后进入下游。【WHY】承载「谁发起、填哪些字段、如何提交」;对应 legacy dealType=申请、产生首条流程实例。【HOW】每个工作流必须有且仅有一个 applicant;配置 submitText/commentStatus/fieldPermissions/webhook;fieldPermissions 控制发起人可见/可编辑字段;未列出字段 Apply 时默认 edit。",
|
|
1254
|
+
"properties": {
|
|
1255
|
+
"commentStatus": {
|
|
1256
|
+
"type": "boolean",
|
|
1257
|
+
"description": "是否允许发起人填写备注(commentStatus)"
|
|
1258
|
+
},
|
|
1259
|
+
"submitText": {
|
|
1260
|
+
"type": "string",
|
|
1261
|
+
"description": "自定义提交按钮文案(submitText)"
|
|
1262
|
+
},
|
|
1263
|
+
"fieldPermissions": {
|
|
1264
|
+
"type": "array",
|
|
1265
|
+
"items": {
|
|
1266
|
+
"$ref": "#/$defs/FieldPermissionDTO"
|
|
1267
|
+
},
|
|
1268
|
+
"description": "字段权限(fieldPermissions)【申请人节点】 WHAT:控制发起人在提交前对各字段的可编辑/仅可见/隐藏。 WHY:限制申请人只能改业务字段、系统字段只读或隐藏。 HOW:列出例外项;未列出的应用字段 Apply 时自动补齐为 edit。 缺省补齐(Spec→Legacy):可只写需特殊处理的字段;Apply 时按应用字段全集(questionIndex)展开。applicant 未列出→edit;filling/approval/cc 未列出→readonly(仅可见)。已显式列出的 fieldId(含 hide)不被覆盖。表格字段可配 addRow/deleteRow/editRow。",
|
|
1269
|
+
"comment": "[{\"fieldId\":343283769,\"fieldAuth\":\"edit\"},{\"fieldId\":343283777,\"fieldAuth\":\"readonly\"}]"
|
|
1270
|
+
},
|
|
1271
|
+
"webhook": {
|
|
1272
|
+
"$ref": "#/$defs/ApplicantWebhookConfigDTO",
|
|
1273
|
+
"description": "入站 Webhook(webhook):外部系统触发发起时的解析与更新策略"
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
"x-capability-boundaries": [
|
|
1277
|
+
{
|
|
1278
|
+
"capability": "human_task_applicant",
|
|
1279
|
+
"description": "Workflow start node; exactly one per spec",
|
|
1280
|
+
"level": "core",
|
|
1281
|
+
"constraints": [
|
|
1282
|
+
"required in every workflow",
|
|
1283
|
+
"supports fieldPermissions with default-expand edit",
|
|
1284
|
+
"produces apply/submit, not approval todo"
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
]
|
|
1288
|
+
},
|
|
1289
|
+
"AutomationAddAttrsDTO": {
|
|
1290
|
+
"type": "object",
|
|
1291
|
+
"description": "Q-Robot 新增(subType=add):向目标 appKey 插入数据。【Q-Robot 三层筛选】① tableFilterRules=编辑器「表格筛选条件」,筛源应用(当前流程)子表行,legacy tableFilterCondition;② targetFilterRules=编辑器「更新哪些数据」,筛目标应用(appKey)主记录/目标子表行,legacy qrobotQueFilterFormula/filterCondition;③ fieldMappings[].tableRowOperations=「表格更新规则」,写目标子表行内容。目标子表行定位写在 targetFilterRules,不要写在 tableFilterRules。",
|
|
1292
|
+
"properties": {
|
|
1293
|
+
"appKey": {
|
|
1294
|
+
"type": "string",
|
|
1295
|
+
"description": "目标应用 appKey,数据写入该应用",
|
|
1296
|
+
"minLength": 1,
|
|
1297
|
+
"x-resource-ref": {
|
|
1298
|
+
"resourceType": "application",
|
|
1299
|
+
"guidance": "Select an application to operate on"
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
"fieldMappings": {
|
|
1303
|
+
"type": "array",
|
|
1304
|
+
"minItems": 1,
|
|
1305
|
+
"items": {
|
|
1306
|
+
"$ref": "#/$defs/QRobotRelationRuleDTO"
|
|
1307
|
+
},
|
|
1308
|
+
"description": "字段映射(fieldMappings):目标字段与来源值/字段引用的对应关系"
|
|
1309
|
+
},
|
|
1310
|
+
"tableFilterRules": {
|
|
1311
|
+
"type": "array",
|
|
1312
|
+
"items": {
|
|
1313
|
+
"$ref": "#/$defs/AutomationTableFilterRuleDTO"
|
|
1314
|
+
},
|
|
1315
|
+
"description": "源应用表格筛选(tableFilterRules):编辑器「表格筛选条件」。在映射写入目标应用前,限定当前流程(源应用)子表参与操作的行。tableFieldId 为源子表 fieldId;filterRules 内 fieldId 须为该源子表下的子字段,仅 matchType=literal。Legacy tableFilterCondition。与 targetFilterRules 无关。"
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
"required": [
|
|
1319
|
+
"appKey",
|
|
1320
|
+
"fieldMappings"
|
|
1321
|
+
]
|
|
1322
|
+
},
|
|
1323
|
+
"AutomationSendSmsAttrsDTO": {
|
|
1324
|
+
"type": "object",
|
|
1325
|
+
"description": "Q-Robot 发短信(subType=send_sms):Legacy 占位节点,模板与收件人由设计器管理,Spec Apply 不可变更配置",
|
|
1326
|
+
"properties": {
|
|
1327
|
+
"managedByLegacy": {
|
|
1328
|
+
"type": "boolean",
|
|
1329
|
+
"description": "占位标记(managedByLegacy):true 表示短信配置由 legacy/设计器管理"
|
|
1330
|
+
},
|
|
1331
|
+
"smsTemplateKey": {
|
|
1332
|
+
"type": "string",
|
|
1333
|
+
"description": "短信模板 key(smsTemplateKey),Legacy→Spec GET 只读展示,Apply 不可变更",
|
|
1334
|
+
"minLength": 1,
|
|
1335
|
+
"x-resource-ref": {
|
|
1336
|
+
"resourceType": "smsTemplate",
|
|
1337
|
+
"guidance": "Select an SMS template"
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
"smsTemplateName": {
|
|
1341
|
+
"type": "string",
|
|
1342
|
+
"description": "短信模板显示名(smsTemplateName),Legacy→Spec GET 只读展示"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"required": [
|
|
1346
|
+
"managedByLegacy"
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
"GradedAuditConfigDTO": {
|
|
1350
|
+
"type": "object",
|
|
1351
|
+
"description": "逐级审批配置(gradedAuditConfig):auditUserType=graded 时必填,含审批起点与终点规则",
|
|
1352
|
+
"properties": {
|
|
1353
|
+
"gradedType": {
|
|
1354
|
+
"type": "string",
|
|
1355
|
+
"description": "逐级类型(gradedType):dept=部门层级;report=汇报层级",
|
|
1356
|
+
"enum": [
|
|
1357
|
+
"dept",
|
|
1358
|
+
"report"
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
"endType": {
|
|
1362
|
+
"type": "string",
|
|
1363
|
+
"description": "终点类型(endType):dynamicUp=连续多级主管向上;specifiedLevel=指定层级主管",
|
|
1364
|
+
"enum": [
|
|
1365
|
+
"dynamicUp",
|
|
1366
|
+
"specifiedLevel"
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
"dynamicEndLevelNum": {
|
|
1370
|
+
"type": "integer",
|
|
1371
|
+
"description": "动态向上层级数(dynamicEndLevelNum),endType=dynamicUp 时使用"
|
|
1372
|
+
},
|
|
1373
|
+
"specifiedEndLevelNum": {
|
|
1374
|
+
"type": "integer",
|
|
1375
|
+
"description": "指定层级数(specifiedEndLevelNum),endType=specifiedLevel 时使用"
|
|
1376
|
+
},
|
|
1377
|
+
"gradedApproveType": {
|
|
1378
|
+
"type": "string",
|
|
1379
|
+
"description": "同层级多人时通过模式(gradedApproveType):and=须全部通过;or=一人通过即可",
|
|
1380
|
+
"enum": [
|
|
1381
|
+
"and",
|
|
1382
|
+
"or"
|
|
1383
|
+
]
|
|
1384
|
+
},
|
|
1385
|
+
"removeDup": {
|
|
1386
|
+
"type": "boolean",
|
|
1387
|
+
"description": "层级负责人去重(removeDup)"
|
|
1388
|
+
},
|
|
1389
|
+
"startResponsible": {
|
|
1390
|
+
"type": "array",
|
|
1391
|
+
"minItems": 1,
|
|
1392
|
+
"items": {
|
|
1393
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
1394
|
+
},
|
|
1395
|
+
"description": "审批起点(startResponsible):逐级审批从何处开始向上,语义同 MemberRef"
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
"required": [
|
|
1399
|
+
"startResponsible"
|
|
1400
|
+
]
|
|
1401
|
+
},
|
|
1402
|
+
"AutomationAttrsDTO": {
|
|
1403
|
+
"type": "object",
|
|
1404
|
+
"description": "【WHAT】自动化节点(automation/Q-Robot):无人工待办,流程到达后后台自动执行动作(增删改他表、发邮件/短信、HTTP、AI 等)。【WHY】扩展审批流能力:同步 CRM、通知外部系统、按规则更新关联应用,减少人工重复操作。【HOW】type=automation,attrs.subType 决定 payload:add|update|ai|http_request|send_email|send_sms;禁止 fieldPermissions;配置目标 appKey、fieldMappings、filterRules 等子类型字段。",
|
|
1405
|
+
"properties": {
|
|
1406
|
+
"subType": {
|
|
1407
|
+
"type": "string",
|
|
1408
|
+
"description": "自动化子类型(subType):add|update|send_email|send_sms|http_request|ai|ai_text_summary|ai_content_generation|ai_machine_translation|ai_content_extraction|ai_content_classification|ai_image_recognition|ai_image_generation|ai_document_parsing;决定 payload 结构"
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
"required": [
|
|
1412
|
+
"subType"
|
|
1413
|
+
],
|
|
1414
|
+
"oneOf": [
|
|
1415
|
+
{
|
|
1416
|
+
"$ref": "#/$defs/AutomationUpdateAttrsDTO"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"$ref": "#/$defs/AutomationSendEmailAttrsDTO"
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
"$ref": "#/$defs/AutomationHttpRequestAttrsDTO"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"$ref": "#/$defs/AutomationAIAttrsDTO"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
"$ref": "#/$defs/AutomationAddAttrsDTO"
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"$ref": "#/$defs/AutomationSendSmsAttrsDTO"
|
|
1432
|
+
}
|
|
1433
|
+
],
|
|
1434
|
+
"discriminator": {
|
|
1435
|
+
"propertyName": "subType",
|
|
1436
|
+
"mapping": {
|
|
1437
|
+
"update": "#/$defs/AutomationUpdateAttrsDTO",
|
|
1438
|
+
"send_email": "#/$defs/AutomationSendEmailAttrsDTO",
|
|
1439
|
+
"http_request": "#/$defs/AutomationHttpRequestAttrsDTO",
|
|
1440
|
+
"ai": "#/$defs/AutomationAIAttrsDTO",
|
|
1441
|
+
"add": "#/$defs/AutomationAddAttrsDTO",
|
|
1442
|
+
"send_sms": "#/$defs/AutomationSendSmsAttrsDTO"
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
"x-polymorphic-base": "com.qflow.backend.workflow.spec.dto.attrs.AutomationAttrsDTO",
|
|
1446
|
+
"x-capability-boundaries": [
|
|
1447
|
+
{
|
|
1448
|
+
"capability": "automation_qrobot",
|
|
1449
|
+
"description": "Background Q-Robot; no human todo",
|
|
1450
|
+
"level": "core",
|
|
1451
|
+
"constraints": [
|
|
1452
|
+
"no fieldPermissions",
|
|
1453
|
+
"subType selects payload: add|update|ai|http_request|send_email|send_sms"
|
|
1454
|
+
]
|
|
1455
|
+
}
|
|
1456
|
+
]
|
|
1457
|
+
},
|
|
1458
|
+
"CountersignConfigDTO": {
|
|
1459
|
+
"type": "object",
|
|
1460
|
+
"properties": {
|
|
1461
|
+
"enabled": {
|
|
1462
|
+
"type": "boolean",
|
|
1463
|
+
"description": "是否开启加签(enabled):节点负责人可加签其他成员共同审批"
|
|
1464
|
+
},
|
|
1465
|
+
"scope": {
|
|
1466
|
+
"type": "string",
|
|
1467
|
+
"description": "加签人员范围(scope):workspaceMember=工作区可见成员;assignMember=指定成员(成员列表暂未纳入 Spec)",
|
|
1468
|
+
"enum": [
|
|
1469
|
+
"workspaceMember",
|
|
1470
|
+
"assignMember"
|
|
1471
|
+
]
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
"EndWorkflowConfigDTO": {
|
|
1476
|
+
"type": "object",
|
|
1477
|
+
"properties": {
|
|
1478
|
+
"enabled": {
|
|
1479
|
+
"type": "boolean",
|
|
1480
|
+
"description": "是否允许结束流程(enabled):负责人可手动结束流程,状态变为已结束"
|
|
1481
|
+
},
|
|
1482
|
+
"buttonText": {
|
|
1483
|
+
"type": "string",
|
|
1484
|
+
"description": "结束流程按钮文案(buttonText)"
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
"SignConfigDTO": {
|
|
1489
|
+
"type": "object",
|
|
1490
|
+
"properties": {
|
|
1491
|
+
"eSign": {
|
|
1492
|
+
"type": "boolean",
|
|
1493
|
+
"description": "是否启用电子签章(eSign)"
|
|
1494
|
+
},
|
|
1495
|
+
"handSign": {
|
|
1496
|
+
"type": "boolean",
|
|
1497
|
+
"description": "是否启用手写签名(handSign)"
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
"ButtonTextConfigDTO": {
|
|
1502
|
+
"type": "object",
|
|
1503
|
+
"properties": {
|
|
1504
|
+
"approve": {
|
|
1505
|
+
"type": "string",
|
|
1506
|
+
"description": "通过按钮文案(approve)"
|
|
1507
|
+
},
|
|
1508
|
+
"reject": {
|
|
1509
|
+
"type": "string",
|
|
1510
|
+
"description": "驳回按钮文案(reject)"
|
|
1511
|
+
},
|
|
1512
|
+
"revert": {
|
|
1513
|
+
"type": "string",
|
|
1514
|
+
"description": "退回按钮文案(revert)"
|
|
1515
|
+
},
|
|
1516
|
+
"submit": {
|
|
1517
|
+
"type": "string",
|
|
1518
|
+
"description": "提交按钮文案(submit)"
|
|
1519
|
+
},
|
|
1520
|
+
"transfer": {
|
|
1521
|
+
"type": "string",
|
|
1522
|
+
"description": "转交按钮文案(transfer)"
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
"SwitchConfigDTO": {
|
|
1527
|
+
"type": "object",
|
|
1528
|
+
"properties": {
|
|
1529
|
+
"rejectBtnStatus": {
|
|
1530
|
+
"type": "boolean",
|
|
1531
|
+
"description": "是否显示/启用驳回按钮(rejectBtnStatus),对应设计器「流程拒绝」"
|
|
1532
|
+
},
|
|
1533
|
+
"revokeStatus": {
|
|
1534
|
+
"type": "boolean",
|
|
1535
|
+
"description": "是否允许流程撤回(revokeStatus),对应设计器「流程撤回」"
|
|
1536
|
+
},
|
|
1537
|
+
"dataImportStatus": {
|
|
1538
|
+
"type": "boolean",
|
|
1539
|
+
"description": "是否允许数据导入(dataImportStatus)"
|
|
1540
|
+
},
|
|
1541
|
+
"submitRecalcStatus": {
|
|
1542
|
+
"type": "boolean",
|
|
1543
|
+
"description": "提交时是否重算(submitRecalcStatus)"
|
|
1544
|
+
},
|
|
1545
|
+
"batchOperateStatus": {
|
|
1546
|
+
"type": "boolean",
|
|
1547
|
+
"description": "是否允许批量操作(batchOperateStatus)"
|
|
1548
|
+
},
|
|
1549
|
+
"beingSubmitCheck": {
|
|
1550
|
+
"type": "boolean",
|
|
1551
|
+
"description": "提交时是否校验(beingSubmitCheck)"
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1555
|
+
"FeedbackConfigDTO": {
|
|
1556
|
+
"type": "object",
|
|
1557
|
+
"properties": {}
|
|
1558
|
+
},
|
|
1559
|
+
"ApprovalAttrsDTO": {
|
|
1560
|
+
"type": "object",
|
|
1561
|
+
"description": "【WHAT】审批节点(approval):指派审批人对当前数据做通过/驳回/转交/退回;产生待办,是审批流最常见的人工节点。【WHY】用于权责确认、合规把关;支持或签/会签、逐级审批(graded)、超时自动处理、加签与字段只读查看。【HOW】配置 responsible、approveType(or|and)、auditUserType(normal|graded)、auditFeedback、commentStatus、revert、revertScope/transferScope、timeoutConfig、buttonText、switches、signConfig、countersignConfig、endWorkflowConfig、fieldPermissions;graded 时填 gradedAuditConfig.startResponsible;fieldPermissions 未列出字段默认 readonly(仅可见)。",
|
|
1562
|
+
"properties": {
|
|
1563
|
+
"responsible": {
|
|
1564
|
+
"type": "array",
|
|
1565
|
+
"minItems": 1,
|
|
1566
|
+
"items": {
|
|
1567
|
+
"$ref": "#/$defs/MemberRefDTO"
|
|
1568
|
+
},
|
|
1569
|
+
"description": "审批人(responsible):用户/部门/角色,至少一人"
|
|
1570
|
+
},
|
|
1571
|
+
"approveType": {
|
|
1572
|
+
"type": "string",
|
|
1573
|
+
"description": "审批方式(approveType):or=或签(一人通过即可);and=会签(须全部通过)",
|
|
1574
|
+
"enum": [
|
|
1575
|
+
"or",
|
|
1576
|
+
"and"
|
|
1577
|
+
]
|
|
1578
|
+
},
|
|
1579
|
+
"auditUserType": {
|
|
1580
|
+
"type": "string",
|
|
1581
|
+
"description": "审批人类型(auditUserType):normal=普通;graded=逐级审批",
|
|
1582
|
+
"enum": [
|
|
1583
|
+
"normal",
|
|
1584
|
+
"graded"
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
"revertScope": {
|
|
1588
|
+
"type": "string",
|
|
1589
|
+
"description": "退回范围(revertScope):可退回到哪些历史节点"
|
|
1590
|
+
},
|
|
1591
|
+
"transferScope": {
|
|
1592
|
+
"type": "string",
|
|
1593
|
+
"description": "转交范围(transferScope):允许转交给谁"
|
|
1594
|
+
},
|
|
1595
|
+
"auditFeedback": {
|
|
1596
|
+
"type": "boolean",
|
|
1597
|
+
"description": "是否开启审批意见(auditFeedback)"
|
|
1598
|
+
},
|
|
1599
|
+
"commentStatus": {
|
|
1600
|
+
"type": "boolean",
|
|
1601
|
+
"description": "是否开启留言(commentStatus):负责人可留言并查看历史留言"
|
|
1602
|
+
},
|
|
1603
|
+
"revert": {
|
|
1604
|
+
"type": "boolean",
|
|
1605
|
+
"description": "是否允许流程回退(revert):true 时配合 revertScope 启用退回上一节点等能力"
|
|
1606
|
+
},
|
|
1607
|
+
"countersignConfig": {
|
|
1608
|
+
"$ref": "#/$defs/CountersignConfigDTO",
|
|
1609
|
+
"description": "加签配置(countersignConfig):负责人加签其他成员共同审批"
|
|
1610
|
+
},
|
|
1611
|
+
"endWorkflowConfig": {
|
|
1612
|
+
"$ref": "#/$defs/EndWorkflowConfigDTO",
|
|
1613
|
+
"description": "结束流程配置(endWorkflowConfig):负责人手动结束流程"
|
|
1614
|
+
},
|
|
1615
|
+
"timeoutConfig": {
|
|
1616
|
+
"$ref": "#/$defs/TimeoutConfigDTO",
|
|
1617
|
+
"description": "超时配置(timeoutConfig):超时提醒、自动通过/驳回等"
|
|
1618
|
+
},
|
|
1619
|
+
"gradedAuditConfig": {
|
|
1620
|
+
"$ref": "#/$defs/GradedAuditConfigDTO",
|
|
1621
|
+
"description": "逐级审批配置(gradedAuditConfig),auditUserType=graded 时必填;startResponsible 为审批起点"
|
|
1622
|
+
},
|
|
1623
|
+
"signConfig": {
|
|
1624
|
+
"$ref": "#/$defs/SignConfigDTO",
|
|
1625
|
+
"description": "加签配置(signConfig)"
|
|
1626
|
+
},
|
|
1627
|
+
"buttonText": {
|
|
1628
|
+
"$ref": "#/$defs/ButtonTextConfigDTO",
|
|
1629
|
+
"description": "按钮文案(buttonText):通过/驳回等按钮显示文字"
|
|
1630
|
+
},
|
|
1631
|
+
"switches": {
|
|
1632
|
+
"$ref": "#/$defs/SwitchConfigDTO",
|
|
1633
|
+
"description": "功能开关(switches):如允许暂存、批量审批等"
|
|
1634
|
+
},
|
|
1635
|
+
"fieldPermissions": {
|
|
1636
|
+
"type": "array",
|
|
1637
|
+
"items": {
|
|
1638
|
+
"$ref": "#/$defs/FieldPermissionDTO"
|
|
1639
|
+
},
|
|
1640
|
+
"description": "字段权限(fieldPermissions)【审批节点】 WHAT:审批人处理待办时对字段的可见/可编辑/隐藏。 WHY:审批人多数场景只读查看,少数场景允许改指定字段。 HOW:未列出字段默认 readonly;需可编辑时显式 edit。 缺省补齐(Spec→Legacy):可只写需特殊处理的字段;Apply 时按应用字段全集(questionIndex)展开。applicant 未列出→edit;filling/approval/cc 未列出→readonly(仅可见)。已显式列出的 fieldId(含 hide)不被覆盖。表格字段可配 addRow/deleteRow/editRow。",
|
|
1641
|
+
"comment": "[{\"fieldId\":343283769,\"fieldAuth\":\"readonly\"}]"
|
|
1642
|
+
},
|
|
1643
|
+
"feedbackConfigs": {
|
|
1644
|
+
"type": "array",
|
|
1645
|
+
"items": {
|
|
1646
|
+
"$ref": "#/$defs/FeedbackConfigDTO"
|
|
1647
|
+
},
|
|
1648
|
+
"description": "反馈配置(feedbackConfigs)"
|
|
1649
|
+
}
|
|
1650
|
+
},
|
|
1651
|
+
"required": [
|
|
1652
|
+
"responsible",
|
|
1653
|
+
"approveType",
|
|
1654
|
+
"auditUserType"
|
|
1655
|
+
],
|
|
1656
|
+
"x-capability-boundaries": [
|
|
1657
|
+
{
|
|
1658
|
+
"capability": "human_task_approval",
|
|
1659
|
+
"description": "Approver pass/reject/transfer/revert; creates task-center todo",
|
|
1660
|
+
"level": "core",
|
|
1661
|
+
"constraints": [
|
|
1662
|
+
"requires responsible unless auditUserType=graded (use gradedAuditConfig)",
|
|
1663
|
+
"approveType or|and; auditUserType normal|graded",
|
|
1664
|
+
"fieldPermissions: omitted fields default readonly"
|
|
1665
|
+
]
|
|
1666
|
+
}
|
|
1667
|
+
]
|
|
1668
|
+
},
|
|
1669
|
+
"GatewayAttrsDTO": {
|
|
1670
|
+
"type": "object",
|
|
1671
|
+
"description": "【WHAT】网关节点(gateway):在 edges.edges[] 中作为多条边的共同端点,表达分叉或汇合。【WHY】分支逻辑挂在出边 condition 上,不再使用 branch/condition 节点。【HOW】mode=parallel 作 fork(出边≥2);mode=join 作汇合(入边≥2、出边≤1)。详见 patterns.md#P03、#P02。",
|
|
1672
|
+
"properties": {
|
|
1673
|
+
"mode": {
|
|
1674
|
+
"type": "string",
|
|
1675
|
+
"description": "网关模式(mode)。parallel:fork,edges 中 ≥2 条出边 from=本节点 id(P03a 条件选路 / P03b 多路同时)。join:汇合,≥2 入边 to=本节点 id、出边≤1(P02)。省略→parallel。",
|
|
1676
|
+
"enum": [
|
|
1677
|
+
"parallel",
|
|
1678
|
+
"join"
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
},
|
|
1682
|
+
"x-gateway-constraints": [
|
|
1683
|
+
"mode omitted or parallel: node must have >= 2 outgoing edges in spec.edges.edges",
|
|
1684
|
+
"mode=join: node must have >= 2 incoming and <= 1 outgoing edges",
|
|
1685
|
+
"parallel fork allows multiple default condition edges (no single-default limit)"
|
|
1686
|
+
]
|
|
1687
|
+
},
|
|
1688
|
+
"WorkflowSpecNodes": {
|
|
1689
|
+
"type": "object",
|
|
1690
|
+
"description": "轻流工作流核心结构:nodes 为节点列表,edges.edges 为显式 from/to 边列表",
|
|
1691
|
+
"properties": {
|
|
1692
|
+
"nodes": {
|
|
1693
|
+
"type": "array",
|
|
1694
|
+
"minItems": 1,
|
|
1695
|
+
"items": {
|
|
1696
|
+
"$ref": "#/$defs/WorkflowNodeDTO"
|
|
1697
|
+
},
|
|
1698
|
+
"description": "工作流节点列表。type 决定业务角色:applicant(发起)、filling(填写)、approval(审批)、gateway(并行 fork/join)、cc(抄送)、automation(Q-Robot)"
|
|
1699
|
+
},
|
|
1700
|
+
"edges": {
|
|
1701
|
+
"$ref": "#/$defs/WorkflowEdgesDTO",
|
|
1702
|
+
"description": "工作流边容器(edges):edges 为显式边列表"
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
"required": [
|
|
1706
|
+
"nodes",
|
|
1707
|
+
"edges"
|
|
1708
|
+
]
|
|
1709
|
+
},
|
|
1710
|
+
"LiteralAssignmentValueDTO": {
|
|
1711
|
+
"type": "object",
|
|
1712
|
+
"description": "Q-Robot 结构化字面量赋值:matchType=literal 且目标字段为日期/选项/成员等复杂类型时使用;简单字段可直接用 string/number 或 {\"value\":\"...\"}",
|
|
1713
|
+
"properties": {
|
|
1714
|
+
"valueType": {
|
|
1715
|
+
"type": "string",
|
|
1716
|
+
"description": "字面量类型(valueType):date/option/member 等用 value;options/members 用 values 数组;date_range 用 start+end",
|
|
1717
|
+
"enum": [
|
|
1718
|
+
"date",
|
|
1719
|
+
"date_range",
|
|
1720
|
+
"option",
|
|
1721
|
+
"options",
|
|
1722
|
+
"member",
|
|
1723
|
+
"members",
|
|
1724
|
+
"reference",
|
|
1725
|
+
"json"
|
|
1726
|
+
]
|
|
1727
|
+
},
|
|
1728
|
+
"value": {
|
|
1729
|
+
"type": "string",
|
|
1730
|
+
"description": "单值 payload(value):日期、选项 id、成员 id、JSON 字符串等"
|
|
1731
|
+
},
|
|
1732
|
+
"values": {
|
|
1733
|
+
"type": "array",
|
|
1734
|
+
"minItems": 1,
|
|
1735
|
+
"items": {
|
|
1736
|
+
"type": "string"
|
|
1737
|
+
},
|
|
1738
|
+
"description": "多值 payload(values):多选选项、多成员等"
|
|
1739
|
+
},
|
|
1740
|
+
"start": {
|
|
1741
|
+
"type": "string",
|
|
1742
|
+
"description": "日期区间起始(start),valueType=date_range 时必填"
|
|
1743
|
+
},
|
|
1744
|
+
"end": {
|
|
1745
|
+
"type": "string",
|
|
1746
|
+
"description": "日期区间结束(end),valueType=date_range 时必填"
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
"required": [
|
|
1750
|
+
"valueType"
|
|
1751
|
+
]
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|