@qingflow-tech/qingflow-cli 1.1.42 → 1.1.43-beta.2

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.
Files changed (63) hide show
  1. package/README.md +5 -4
  2. package/package.json +2 -1
  3. package/pyproject.toml +3 -2
  4. package/skills/qingflow-app-form/SKILL.md +53 -0
  5. package/skills/qingflow-app-form/agents/openai.yaml +4 -0
  6. package/skills/qingflow-cli/SKILL.md +6 -6
  7. package/skills/qingflow-cli/manifest.yaml +1 -1
  8. package/skills/qingflow-cli/reference/QINGFLOW_CLI_BUILDER_APP_DELIVERY_WORKFLOW.md +4 -4
  9. package/skills/qingflow-cli/reference/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  10. package/skills/qingflow-cli/reference/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  11. package/skills/qingflow-cli/reference/QINGFLOW_CLI_SCHEMA_APPLY_FIELD_TYPES_AND_SCENARIOS.md +4 -4
  12. package/skills/qingflow-cli/reference/builder/10-build-single-app.md +5 -5
  13. package/skills/qingflow-cli/reference/builder/20-build-complete-system.md +14 -14
  14. package/skills/qingflow-cli/reference/builder/30-schema-fields.md +98 -101
  15. package/skills/qingflow-cli/reference/builder/40-layout.md +39 -31
  16. package/skills/qingflow-cli/reference/builder/README.md +9 -9
  17. package/skills/qingflow-cli/reference/builder/code-integrations/README.md +4 -2
  18. package/skills/qingflow-cli/reference/builder/code-integrations/code-block.md +2 -0
  19. package/skills/qingflow-cli/reference/builder/code-integrations/q-linker.md +2 -0
  20. package/skills/qingflow-cli/reference/builder/reference/app-delivery-sop.md +45 -38
  21. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_EXPLORATION_REPORT.md +1 -1
  22. package/skills/qingflow-cli/reference/core/QINGFLOW_CLI_FIELD_DATA_TYPES.md +1 -1
  23. package/skills/qingflow-cli/reference/examples/README.md +3 -3
  24. package/skills/qingflow-mcp-setup/SKILL.md +1 -1
  25. package/src/qingflow_mcp/app_form_compat.py +120 -0
  26. package/src/qingflow_mcp/app_form_validator.py +199 -0
  27. package/src/qingflow_mcp/builder_facade/app_form.py +3365 -0
  28. package/src/qingflow_mcp/builder_facade/app_form_schema.py +269 -0
  29. package/src/qingflow_mcp/builder_facade/schemas/app_form/manifest.json +37 -0
  30. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/complete.json +2909 -0
  31. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/address.json +337 -0
  32. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/amount.json +181 -0
  33. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/attachment.json +373 -0
  34. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/code_block.json +242 -0
  35. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/data_relation.json +557 -0
  36. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/date.json +95 -0
  37. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/datetime.json +95 -0
  38. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/department.json +290 -0
  39. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/email.json +135 -0
  40. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/link.json +135 -0
  41. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/long_text.json +135 -0
  42. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/member.json +429 -0
  43. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/multi_select.json +159 -0
  44. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/number.json +181 -0
  45. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/phone.json +144 -0
  46. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/q_linker.json +357 -0
  47. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/relation.json +382 -0
  48. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_choice.json +159 -0
  49. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/single_select.json +159 -0
  50. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/subtable.json +1831 -0
  51. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/fields/text.json +135 -0
  52. package/src/qingflow_mcp/builder_facade/schemas/app_form/v1alpha1/summary.json +736 -0
  53. package/src/qingflow_mcp/builder_facade/service.py +5 -2
  54. package/src/qingflow_mcp/cli/commands/builder.py +91 -28
  55. package/src/qingflow_mcp/cli/json_io.py +21 -2
  56. package/src/qingflow_mcp/cli/main.py +3 -39
  57. package/src/qingflow_mcp/cloud_oauth_proxy.py +96 -3
  58. package/src/qingflow_mcp/public_surface.py +5 -2
  59. package/src/qingflow_mcp/response_trim.py +48 -0
  60. package/src/qingflow_mcp/server_app_builder.py +38 -86
  61. package/src/qingflow_mcp/server_cloud.py +66 -1
  62. package/src/qingflow_mcp/tools/ai_builder_tools.py +93 -100
  63. package/src/qingflow_mcp/tools/app_tools.py +46 -65
@@ -0,0 +1,2909 @@
1
+ {
2
+ "$defs": {
3
+ "AddressConfig": {
4
+ "additionalProperties": false,
5
+ "description": "地址精度、定位和扫码配置;defaultValues 使用 AnswerDetail 结构。",
6
+ "properties": {
7
+ "addressPrecision": {
8
+ "minimum": 0,
9
+ "type": [
10
+ "integer",
11
+ "null"
12
+ ]
13
+ },
14
+ "canScan": {
15
+ "type": [
16
+ "boolean",
17
+ "null"
18
+ ]
19
+ },
20
+ "defaultValues": {
21
+ "oneOf": [
22
+ {
23
+ "type": "null"
24
+ },
25
+ {
26
+ "$ref": "#/$defs/DefaultValues"
27
+ }
28
+ ]
29
+ },
30
+ "pickPosition": {
31
+ "type": [
32
+ "boolean",
33
+ "null"
34
+ ]
35
+ },
36
+ "scanType": {
37
+ "minimum": 0,
38
+ "type": [
39
+ "integer",
40
+ "null"
41
+ ]
42
+ }
43
+ },
44
+ "type": "object"
45
+ },
46
+ "AliasSelector": {
47
+ "additionalProperties": false,
48
+ "description": "Q-Linker 或代码块输出别名;已有输出优先携带 aliasId。",
49
+ "properties": {
50
+ "aliasId": {
51
+ "description": "后端生成的别名 ID;新增输出时可省略。",
52
+ "minimum": 1,
53
+ "type": "integer"
54
+ },
55
+ "name": {
56
+ "description": "输出别名名称。",
57
+ "minLength": 1,
58
+ "type": "string"
59
+ }
60
+ },
61
+ "required": [
62
+ "name"
63
+ ],
64
+ "type": "object"
65
+ },
66
+ "AnswerValue": {
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "dataValue": {
70
+ "type": [
71
+ "string",
72
+ "null"
73
+ ]
74
+ },
75
+ "email": {
76
+ "type": [
77
+ "string",
78
+ "null"
79
+ ]
80
+ },
81
+ "id": {
82
+ "type": [
83
+ "integer",
84
+ "null"
85
+ ]
86
+ },
87
+ "optionId": {
88
+ "type": [
89
+ "string",
90
+ "null"
91
+ ]
92
+ },
93
+ "ordinal": {
94
+ "type": [
95
+ "integer",
96
+ "null"
97
+ ]
98
+ },
99
+ "otherInfo": {
100
+ "type": [
101
+ "string",
102
+ "null"
103
+ ]
104
+ },
105
+ "pluginValue": {
106
+ "type": [
107
+ "string",
108
+ "null"
109
+ ]
110
+ },
111
+ "queId": {
112
+ "type": [
113
+ "integer",
114
+ "null"
115
+ ]
116
+ },
117
+ "value": {
118
+ "type": [
119
+ "string",
120
+ "null"
121
+ ]
122
+ },
123
+ "valueStr": {
124
+ "type": [
125
+ "string",
126
+ "null"
127
+ ]
128
+ }
129
+ },
130
+ "type": "object"
131
+ },
132
+ "AppFormSpec": {
133
+ "additionalProperties": false,
134
+ "description": "表单基础配置与字段布局目标态;除 body 外,缺失属性表示保留当前值。",
135
+ "properties": {
136
+ "appName": {
137
+ "description": "应用名称;缺失时保留当前名称。",
138
+ "minLength": 1,
139
+ "type": "string"
140
+ },
141
+ "attachments": {
142
+ "description": "应用附件完整目标态;空数组表示删除全部应用附件。",
143
+ "items": {
144
+ "$ref": "#/$defs/Attachment"
145
+ },
146
+ "type": "array"
147
+ },
148
+ "body": {
149
+ "$ref": "#/$defs/Body",
150
+ "description": "业务字段与布局的完整目标态;缺失字段或段落表示删除。"
151
+ },
152
+ "color": {
153
+ "description": "新应用图标颜色;仅创建分支允许,必须来自 workspace icon color catalog。",
154
+ "minLength": 1,
155
+ "type": "string"
156
+ },
157
+ "description": {
158
+ "description": "应用描述;null 或空字符串表示清空。",
159
+ "type": [
160
+ "string",
161
+ "null"
162
+ ]
163
+ },
164
+ "icon": {
165
+ "description": "新应用图标;仅创建分支允许,必须来自 workspace icon catalog 且不得为 template。",
166
+ "minLength": 1,
167
+ "type": "string"
168
+ },
169
+ "serialNumber": {
170
+ "$ref": "#/$defs/SerialNumber",
171
+ "description": "应用编号规则;支持默认编号或自定义组件编号。"
172
+ },
173
+ "style": {
174
+ "description": "应用样式;对象内缺失属性保留当前值,null 表示清除全部自定义样式。",
175
+ "oneOf": [
176
+ {
177
+ "$ref": "#/$defs/Style"
178
+ },
179
+ {
180
+ "type": "null"
181
+ }
182
+ ]
183
+ },
184
+ "theme": {
185
+ "description": "应用主题 ID;null 表示清除自定义主题。",
186
+ "type": [
187
+ "integer",
188
+ "null"
189
+ ]
190
+ }
191
+ },
192
+ "required": [
193
+ "body"
194
+ ],
195
+ "type": "object"
196
+ },
197
+ "Attachment": {
198
+ "additionalProperties": false,
199
+ "description": "应用级附件;已有附件由 attachId 复用,新增附件省略 attachId。",
200
+ "properties": {
201
+ "attachId": {
202
+ "description": "后端生成的附件 ID;get 返回,新增时省略。",
203
+ "minimum": 1,
204
+ "type": "integer"
205
+ },
206
+ "fileName": {
207
+ "description": "附件展示名称。",
208
+ "minLength": 1,
209
+ "type": "string"
210
+ },
211
+ "fileUrl": {
212
+ "description": "已上传文件的可访问 URL。",
213
+ "minLength": 1,
214
+ "type": "string"
215
+ }
216
+ },
217
+ "required": [
218
+ "fileName",
219
+ "fileUrl"
220
+ ],
221
+ "type": "object"
222
+ },
223
+ "AttachmentConfig": {
224
+ "additionalProperties": false,
225
+ "description": "附件字段上传限制。",
226
+ "properties": {
227
+ "canScan": {
228
+ "type": [
229
+ "boolean",
230
+ "null"
231
+ ]
232
+ },
233
+ "defaultValues": {
234
+ "oneOf": [
235
+ {
236
+ "type": "null"
237
+ },
238
+ {
239
+ "$ref": "#/$defs/DefaultValues"
240
+ }
241
+ ]
242
+ },
243
+ "fileBeingCaptureOnly": {
244
+ "minimum": 0,
245
+ "type": [
246
+ "integer",
247
+ "null"
248
+ ]
249
+ },
250
+ "fileSize": {
251
+ "minimum": 1,
252
+ "type": [
253
+ "integer",
254
+ "null"
255
+ ]
256
+ },
257
+ "fileType": {
258
+ "items": {
259
+ "minLength": 1,
260
+ "type": "string"
261
+ },
262
+ "type": "array"
263
+ },
264
+ "imageCompress": {
265
+ "type": [
266
+ "boolean",
267
+ "null"
268
+ ]
269
+ },
270
+ "maxFileLimit": {
271
+ "minimum": 1,
272
+ "type": [
273
+ "integer",
274
+ "null"
275
+ ]
276
+ },
277
+ "maxFileLimitStatus": {
278
+ "type": [
279
+ "boolean",
280
+ "null"
281
+ ]
282
+ },
283
+ "pluginStatus": {
284
+ "type": [
285
+ "boolean",
286
+ "null"
287
+ ]
288
+ },
289
+ "scanType": {
290
+ "minimum": 0,
291
+ "type": [
292
+ "integer",
293
+ "null"
294
+ ]
295
+ }
296
+ },
297
+ "type": "object"
298
+ },
299
+ "Body": {
300
+ "description": "有序表单内容块;空数组表示删除全部业务字段和段落。",
301
+ "items": {
302
+ "$ref": "#/$defs/BodyBlock"
303
+ },
304
+ "type": "array"
305
+ },
306
+ "BodyBlock": {
307
+ "description": "根级普通行或独占外层位置的段落。",
308
+ "oneOf": [
309
+ {
310
+ "$ref": "#/$defs/RowBlock"
311
+ },
312
+ {
313
+ "$ref": "#/$defs/SectionBlock"
314
+ }
315
+ ]
316
+ },
317
+ "ChoiceConfig": {
318
+ "additionalProperties": false,
319
+ "description": "选择类字段配置。",
320
+ "properties": {
321
+ "beingShowColor": {
322
+ "description": "是否展示选项颜色。",
323
+ "type": [
324
+ "boolean",
325
+ "null"
326
+ ]
327
+ },
328
+ "defaultOptions": {
329
+ "description": "选项默认选中状态;值必须来自 options,省略表示保留现有状态。",
330
+ "items": {
331
+ "minLength": 1,
332
+ "type": "string"
333
+ },
334
+ "type": "array",
335
+ "uniqueItems": true
336
+ },
337
+ "maxOpts": {
338
+ "description": "最多选择项数;null 表示不限制。",
339
+ "minimum": 0,
340
+ "type": [
341
+ "integer",
342
+ "null"
343
+ ]
344
+ },
345
+ "minOpts": {
346
+ "description": "最少选择项数;null 表示不限制。",
347
+ "minimum": 0,
348
+ "type": [
349
+ "integer",
350
+ "null"
351
+ ]
352
+ },
353
+ "optDirection": {
354
+ "description": "选项排列方向 ID。",
355
+ "minimum": 0,
356
+ "type": [
357
+ "integer",
358
+ "null"
359
+ ]
360
+ },
361
+ "optSelectMode": {
362
+ "description": "多项选择模式 ID。",
363
+ "minimum": 0,
364
+ "type": [
365
+ "integer",
366
+ "null"
367
+ ]
368
+ },
369
+ "options": {
370
+ "description": "非空有序选项文案;缺失选项表示从该字段配置中删除。",
371
+ "items": {
372
+ "minLength": 1,
373
+ "type": "string"
374
+ },
375
+ "minItems": 1,
376
+ "type": "array",
377
+ "uniqueItems": true
378
+ }
379
+ },
380
+ "required": [
381
+ "options"
382
+ ],
383
+ "type": "object"
384
+ },
385
+ "CodeBlockBinding": {
386
+ "additionalProperties": false,
387
+ "description": "代码块的输入、代码和输出映射。",
388
+ "properties": {
389
+ "autoTrigger": {
390
+ "description": "是否在输入变化时自动执行代码块。",
391
+ "type": [
392
+ "boolean",
393
+ "null"
394
+ ]
395
+ },
396
+ "code": {
397
+ "description": "代码块源码;MCP/CLI 仅保存,不执行。",
398
+ "minLength": 1,
399
+ "type": "string"
400
+ },
401
+ "customButtonText": {
402
+ "description": "自定义触发按钮文案。",
403
+ "type": [
404
+ "string",
405
+ "null"
406
+ ]
407
+ },
408
+ "customButtonTextEnabled": {
409
+ "description": "是否启用自定义触发按钮文案。",
410
+ "type": [
411
+ "boolean",
412
+ "null"
413
+ ]
414
+ },
415
+ "hideOnForm": {
416
+ "description": "是否在表单填写界面隐藏该代码块字段。",
417
+ "type": [
418
+ "boolean",
419
+ "null"
420
+ ]
421
+ },
422
+ "inputs": {
423
+ "description": "当前表单字段到代码变量的映射。",
424
+ "items": {
425
+ "$ref": "#/$defs/CodeBlockInputBinding"
426
+ },
427
+ "type": "array"
428
+ },
429
+ "outputs": {
430
+ "description": "代码输出路径到目标字段的映射。",
431
+ "items": {
432
+ "$ref": "#/$defs/CodeBlockOutputBinding"
433
+ },
434
+ "type": "array"
435
+ }
436
+ },
437
+ "required": [
438
+ "code"
439
+ ],
440
+ "type": "object"
441
+ },
442
+ "CodeBlockConfig": {
443
+ "additionalProperties": false,
444
+ "description": "代码块的高层声明;无法无损还原为该结构时阻断处理。",
445
+ "properties": {
446
+ "codeBlockBinding": {
447
+ "$ref": "#/$defs/CodeBlockBinding"
448
+ }
449
+ },
450
+ "required": [
451
+ "codeBlockBinding"
452
+ ],
453
+ "type": "object"
454
+ },
455
+ "CodeBlockInputBinding": {
456
+ "additionalProperties": false,
457
+ "description": "一个表单字段到代码变量的映射。",
458
+ "properties": {
459
+ "field": {
460
+ "$ref": "#/$defs/FieldSelector",
461
+ "description": "输入来源字段。"
462
+ },
463
+ "var": {
464
+ "description": "代码中的变量名;null 表示沿用后端默认变量名。",
465
+ "type": [
466
+ "string",
467
+ "null"
468
+ ]
469
+ }
470
+ },
471
+ "required": [
472
+ "field"
473
+ ],
474
+ "type": "object"
475
+ },
476
+ "CodeBlockOutputBinding": {
477
+ "additionalProperties": false,
478
+ "description": "一个代码输出值到表单字段的映射。",
479
+ "properties": {
480
+ "alias": {
481
+ "description": "输出别名;用于后续数据关联引用。",
482
+ "minLength": 1,
483
+ "type": "string"
484
+ },
485
+ "aliasId": {
486
+ "description": "后端生成的输出别名 ID;新增输出时可省略,get 返回后必须保留。",
487
+ "minimum": 1,
488
+ "type": "integer"
489
+ },
490
+ "path": {
491
+ "description": "从 qf_output 中取值的 JSONPath。",
492
+ "minLength": 1,
493
+ "type": "string"
494
+ },
495
+ "targetField": {
496
+ "$ref": "#/$defs/FieldSelector",
497
+ "description": "接收结果的当前表单字段。"
498
+ }
499
+ },
500
+ "required": [
501
+ "alias",
502
+ "path",
503
+ "targetField"
504
+ ],
505
+ "type": "object"
506
+ },
507
+ "DataRelationCondition": {
508
+ "additionalProperties": false,
509
+ "description": "一条数据关联过滤条件。",
510
+ "properties": {
511
+ "operand": {
512
+ "$ref": "#/$defs/DataRelationOperand",
513
+ "description": "比较值来源;可为字面量、当前表单字段或输出别名。"
514
+ },
515
+ "operator": {
516
+ "description": "比较运算符;Reconciler 会结合字段类型校验可用性。",
517
+ "enum": [
518
+ "equal",
519
+ "not_equal",
520
+ "contains",
521
+ "not_contains",
522
+ "greater_than",
523
+ "greater_or_equal",
524
+ "less_than",
525
+ "less_or_equal",
526
+ "dynamic_range",
527
+ "equal_any",
528
+ "not_equal_any",
529
+ "is_empty",
530
+ "is_not_empty",
531
+ "belongs_to",
532
+ "not_belongs_to",
533
+ "subordinate_to",
534
+ "not_subordinate_to",
535
+ "subordinate_included",
536
+ "subordinate_not_included",
537
+ "fuzzy_match",
538
+ "contains_any",
539
+ "contains_all",
540
+ "decimal_range"
541
+ ]
542
+ },
543
+ "sourceField": {
544
+ "$ref": "#/$defs/FieldSelector",
545
+ "description": "被过滤的数据源字段。"
546
+ }
547
+ },
548
+ "required": [
549
+ "sourceField",
550
+ "operator",
551
+ "operand"
552
+ ],
553
+ "type": "object"
554
+ },
555
+ "DataRelationConfig": {
556
+ "additionalProperties": false,
557
+ "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。",
558
+ "properties": {
559
+ "aggregation": {
560
+ "description": "可选聚合方式;null 表示不聚合。",
561
+ "enum": [
562
+ "sum",
563
+ "average",
564
+ "max",
565
+ "min",
566
+ "first",
567
+ "last",
568
+ "filled_count",
569
+ "empty_count",
570
+ "count",
571
+ null
572
+ ],
573
+ "type": [
574
+ "string",
575
+ "null"
576
+ ]
577
+ },
578
+ "customButton": {
579
+ "$ref": "#/$defs/DataRelationCustomButton",
580
+ "description": "可选自定义按钮配置。"
581
+ },
582
+ "filters": {
583
+ "$ref": "#/$defs/DataRelationFilters",
584
+ "description": "可选过滤条件;支持简单条件组或高级公式。"
585
+ },
586
+ "sort": {
587
+ "$ref": "#/$defs/DataRelationSort",
588
+ "description": "可选排序配置。"
589
+ },
590
+ "source": {
591
+ "$ref": "#/$defs/DataRelationSource",
592
+ "description": "数据来源;按 kind 选择一种来源结构。"
593
+ }
594
+ },
595
+ "required": [
596
+ "source"
597
+ ],
598
+ "type": "object"
599
+ },
600
+ "DataRelationCustomButton": {
601
+ "description": "数据关联自定义按钮;启用时必须引用已有 buttonId。",
602
+ "oneOf": [
603
+ {
604
+ "additionalProperties": false,
605
+ "properties": {
606
+ "enabled": {
607
+ "const": false
608
+ }
609
+ },
610
+ "required": [
611
+ "enabled"
612
+ ],
613
+ "type": "object"
614
+ },
615
+ {
616
+ "additionalProperties": false,
617
+ "properties": {
618
+ "buttonId": {
619
+ "minimum": 1,
620
+ "type": "integer"
621
+ },
622
+ "enabled": {
623
+ "const": true
624
+ }
625
+ },
626
+ "required": [
627
+ "enabled",
628
+ "buttonId"
629
+ ],
630
+ "type": "object"
631
+ }
632
+ ]
633
+ },
634
+ "DataRelationFilters": {
635
+ "description": "simple 模式的外层组为 OR、组内条件为 AND;advanced 模式使用完整公式。",
636
+ "oneOf": [
637
+ {
638
+ "additionalProperties": false,
639
+ "properties": {
640
+ "groups": {
641
+ "description": "OR 条件组数组;每个内层数组是一组 AND 条件。",
642
+ "items": {
643
+ "items": {
644
+ "$ref": "#/$defs/DataRelationCondition"
645
+ },
646
+ "minItems": 1,
647
+ "type": "array"
648
+ },
649
+ "type": "array"
650
+ },
651
+ "mode": {
652
+ "const": "simple"
653
+ }
654
+ },
655
+ "required": [
656
+ "mode",
657
+ "groups"
658
+ ],
659
+ "type": "object"
660
+ },
661
+ {
662
+ "additionalProperties": false,
663
+ "properties": {
664
+ "formula": {
665
+ "description": "解码后的高级筛选公式。",
666
+ "minLength": 1,
667
+ "type": "string"
668
+ },
669
+ "mode": {
670
+ "const": "advanced"
671
+ }
672
+ },
673
+ "required": [
674
+ "mode",
675
+ "formula"
676
+ ],
677
+ "type": "object"
678
+ }
679
+ ]
680
+ },
681
+ "DataRelationOperand": {
682
+ "description": "数据关联条件右值的判别联合。",
683
+ "oneOf": [
684
+ {
685
+ "additionalProperties": false,
686
+ "properties": {
687
+ "kind": {
688
+ "const": "literal"
689
+ },
690
+ "values": {
691
+ "description": "字面量值列表。",
692
+ "items": {
693
+ "$ref": "#/$defs/JsonValue"
694
+ },
695
+ "type": "array"
696
+ }
697
+ },
698
+ "required": [
699
+ "kind",
700
+ "values"
701
+ ],
702
+ "type": "object"
703
+ },
704
+ {
705
+ "additionalProperties": false,
706
+ "properties": {
707
+ "field": {
708
+ "$ref": "#/$defs/FieldSelector"
709
+ },
710
+ "kind": {
711
+ "const": "current_field"
712
+ }
713
+ },
714
+ "required": [
715
+ "kind",
716
+ "field"
717
+ ],
718
+ "type": "object"
719
+ },
720
+ {
721
+ "additionalProperties": false,
722
+ "properties": {
723
+ "alias": {
724
+ "$ref": "#/$defs/AliasSelector"
725
+ },
726
+ "kind": {
727
+ "const": "alias"
728
+ },
729
+ "producer": {
730
+ "$ref": "#/$defs/FieldSelector"
731
+ }
732
+ },
733
+ "required": [
734
+ "kind",
735
+ "producer",
736
+ "alias"
737
+ ],
738
+ "type": "object"
739
+ }
740
+ ]
741
+ },
742
+ "DataRelationSort": {
743
+ "description": "数据关联排序开关;启用时必须指定排序来源和方向。",
744
+ "oneOf": [
745
+ {
746
+ "additionalProperties": false,
747
+ "properties": {
748
+ "enabled": {
749
+ "const": false
750
+ }
751
+ },
752
+ "required": [
753
+ "enabled"
754
+ ],
755
+ "type": "object"
756
+ },
757
+ {
758
+ "additionalProperties": false,
759
+ "properties": {
760
+ "by": {
761
+ "$ref": "#/$defs/DataRelationSortBy"
762
+ },
763
+ "direction": {
764
+ "enum": [
765
+ "asc",
766
+ "desc"
767
+ ]
768
+ },
769
+ "enabled": {
770
+ "const": true
771
+ }
772
+ },
773
+ "required": [
774
+ "enabled",
775
+ "by",
776
+ "direction"
777
+ ],
778
+ "type": "object"
779
+ }
780
+ ]
781
+ },
782
+ "DataRelationSortBy": {
783
+ "description": "排序值来源;可为来源字段或输出别名。",
784
+ "oneOf": [
785
+ {
786
+ "additionalProperties": false,
787
+ "properties": {
788
+ "field": {
789
+ "$ref": "#/$defs/FieldSelector"
790
+ },
791
+ "kind": {
792
+ "const": "field"
793
+ }
794
+ },
795
+ "required": [
796
+ "kind",
797
+ "field"
798
+ ],
799
+ "type": "object"
800
+ },
801
+ {
802
+ "additionalProperties": false,
803
+ "properties": {
804
+ "alias": {
805
+ "$ref": "#/$defs/AliasSelector"
806
+ },
807
+ "kind": {
808
+ "const": "alias"
809
+ },
810
+ "producer": {
811
+ "$ref": "#/$defs/FieldSelector"
812
+ }
813
+ },
814
+ "required": [
815
+ "kind",
816
+ "producer",
817
+ "alias"
818
+ ],
819
+ "type": "object"
820
+ }
821
+ ]
822
+ },
823
+ "DataRelationSource": {
824
+ "description": "数据关联来源判别联合;kind 决定其余必填字段。",
825
+ "oneOf": [
826
+ {
827
+ "additionalProperties": false,
828
+ "properties": {
829
+ "appKey": {
830
+ "description": "来源应用的 appKey。",
831
+ "minLength": 1,
832
+ "type": "string"
833
+ },
834
+ "field": {
835
+ "$ref": "#/$defs/FieldSelector",
836
+ "description": "来源应用中的结果字段。"
837
+ },
838
+ "kind": {
839
+ "const": "app"
840
+ }
841
+ },
842
+ "required": [
843
+ "kind",
844
+ "appKey",
845
+ "field"
846
+ ],
847
+ "type": "object"
848
+ },
849
+ {
850
+ "additionalProperties": false,
851
+ "properties": {
852
+ "alias": {
853
+ "$ref": "#/$defs/AliasSelector",
854
+ "description": "Q-Linker 输出别名。"
855
+ },
856
+ "kind": {
857
+ "const": "q_linker"
858
+ },
859
+ "producer": {
860
+ "$ref": "#/$defs/FieldSelector",
861
+ "description": "当前应用中的 Q-Linker 字段。"
862
+ }
863
+ },
864
+ "required": [
865
+ "kind",
866
+ "producer",
867
+ "alias"
868
+ ],
869
+ "type": "object"
870
+ },
871
+ {
872
+ "additionalProperties": false,
873
+ "properties": {
874
+ "alias": {
875
+ "$ref": "#/$defs/AliasSelector",
876
+ "description": "代码块输出别名。"
877
+ },
878
+ "kind": {
879
+ "const": "code_block"
880
+ },
881
+ "producer": {
882
+ "$ref": "#/$defs/FieldSelector",
883
+ "description": "当前应用中的代码块字段。"
884
+ }
885
+ },
886
+ "required": [
887
+ "kind",
888
+ "producer",
889
+ "alias"
890
+ ],
891
+ "type": "object"
892
+ }
893
+ ]
894
+ },
895
+ "DefaultValues": {
896
+ "additionalProperties": false,
897
+ "properties": {
898
+ "associatedQueType": {
899
+ "type": [
900
+ "integer",
901
+ "null"
902
+ ]
903
+ },
904
+ "beingCanDecrypted": {
905
+ "type": [
906
+ "boolean",
907
+ "null"
908
+ ]
909
+ },
910
+ "beingDesensitized": {
911
+ "type": [
912
+ "boolean",
913
+ "null"
914
+ ]
915
+ },
916
+ "canDecimal": {
917
+ "type": [
918
+ "boolean",
919
+ "null"
920
+ ]
921
+ },
922
+ "currencyStatus": {
923
+ "type": [
924
+ "boolean",
925
+ "null"
926
+ ]
927
+ },
928
+ "currencyType": {
929
+ "type": [
930
+ "integer",
931
+ "null"
932
+ ]
933
+ },
934
+ "dateType": {
935
+ "type": [
936
+ "integer",
937
+ "null"
938
+ ]
939
+ },
940
+ "decimalDigit": {
941
+ "type": [
942
+ "integer",
943
+ "null"
944
+ ]
945
+ },
946
+ "numberFormat": {
947
+ "type": [
948
+ "integer",
949
+ "null"
950
+ ]
951
+ },
952
+ "queId": {
953
+ "type": [
954
+ "integer",
955
+ "null"
956
+ ]
957
+ },
958
+ "queTitle": {
959
+ "type": [
960
+ "string",
961
+ "null"
962
+ ]
963
+ },
964
+ "queType": {
965
+ "type": [
966
+ "integer",
967
+ "null"
968
+ ]
969
+ },
970
+ "referValues": {
971
+ "items": {
972
+ "$ref": "#/$defs/ReferenceDefaultValue"
973
+ },
974
+ "type": "array"
975
+ },
976
+ "rowId": {
977
+ "type": [
978
+ "integer",
979
+ "null"
980
+ ]
981
+ },
982
+ "sourceValue": {
983
+ "type": [
984
+ "string",
985
+ "null"
986
+ ]
987
+ },
988
+ "tableValues": {
989
+ "items": {
990
+ "items": {
991
+ "$ref": "#/$defs/DefaultValues"
992
+ },
993
+ "type": "array"
994
+ },
995
+ "type": "array"
996
+ },
997
+ "values": {
998
+ "items": {
999
+ "$ref": "#/$defs/AnswerValue"
1000
+ },
1001
+ "type": "array"
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "values"
1006
+ ],
1007
+ "type": "object"
1008
+ },
1009
+ "DepartmentConfig": {
1010
+ "additionalProperties": false,
1011
+ "description": "部门字段的可选范围配置。",
1012
+ "properties": {
1013
+ "beingShowParentPath": {
1014
+ "type": [
1015
+ "boolean",
1016
+ "null"
1017
+ ]
1018
+ },
1019
+ "canScan": {
1020
+ "type": [
1021
+ "boolean",
1022
+ "null"
1023
+ ]
1024
+ },
1025
+ "defaultDepartments": {
1026
+ "$ref": "#/$defs/DepartmentScope"
1027
+ },
1028
+ "departmentScope": {
1029
+ "$ref": "#/$defs/DepartmentScope"
1030
+ },
1031
+ "departmentScopeRelation": {
1032
+ "$ref": "#/$defs/SelectScopeRelation"
1033
+ },
1034
+ "noRepeat": {
1035
+ "type": [
1036
+ "boolean",
1037
+ "null"
1038
+ ]
1039
+ },
1040
+ "scanType": {
1041
+ "minimum": 0,
1042
+ "type": [
1043
+ "integer",
1044
+ "null"
1045
+ ]
1046
+ }
1047
+ },
1048
+ "required": [
1049
+ "departmentScope"
1050
+ ],
1051
+ "type": "object"
1052
+ },
1053
+ "DepartmentScope": {
1054
+ "description": "all 表示全部部门;custom 表示仅允许指定部门。",
1055
+ "oneOf": [
1056
+ {
1057
+ "additionalProperties": false,
1058
+ "properties": {
1059
+ "includeSubDeparts": {
1060
+ "description": "是否包含所选部门的下级部门。",
1061
+ "type": "boolean"
1062
+ },
1063
+ "mode": {
1064
+ "const": "all"
1065
+ }
1066
+ },
1067
+ "required": [
1068
+ "mode"
1069
+ ],
1070
+ "type": "object"
1071
+ },
1072
+ {
1073
+ "additionalProperties": false,
1074
+ "properties": {
1075
+ "departments": {
1076
+ "description": "custom 模式允许选择的部门列表。",
1077
+ "items": {
1078
+ "$ref": "#/$defs/DepartmentSelector"
1079
+ },
1080
+ "minItems": 1,
1081
+ "type": "array"
1082
+ },
1083
+ "includeSubDeparts": {
1084
+ "description": "是否包含指定部门的下级部门。",
1085
+ "type": "boolean"
1086
+ },
1087
+ "mode": {
1088
+ "const": "custom"
1089
+ }
1090
+ },
1091
+ "required": [
1092
+ "mode",
1093
+ "departments"
1094
+ ],
1095
+ "type": "object"
1096
+ },
1097
+ {
1098
+ "additionalProperties": false,
1099
+ "properties": {
1100
+ "includeSubDeparts": {
1101
+ "type": "boolean"
1102
+ },
1103
+ "mode": {
1104
+ "const": "relation"
1105
+ }
1106
+ },
1107
+ "required": [
1108
+ "mode"
1109
+ ],
1110
+ "type": "object"
1111
+ }
1112
+ ]
1113
+ },
1114
+ "DepartmentSelector": {
1115
+ "additionalProperties": false,
1116
+ "description": "部门身份;deptId 必填,deptName 仅用于展示。",
1117
+ "properties": {
1118
+ "deptId": {
1119
+ "minimum": 1,
1120
+ "type": "integer"
1121
+ },
1122
+ "deptName": {
1123
+ "minLength": 1,
1124
+ "type": "string"
1125
+ }
1126
+ },
1127
+ "required": [
1128
+ "deptId"
1129
+ ],
1130
+ "type": "object"
1131
+ },
1132
+ "DynamicMemberSelector": {
1133
+ "additionalProperties": false,
1134
+ "properties": {
1135
+ "queId": {
1136
+ "type": "integer"
1137
+ },
1138
+ "queTitle": {
1139
+ "type": "string"
1140
+ },
1141
+ "type": {
1142
+ "minimum": 1,
1143
+ "type": "integer"
1144
+ }
1145
+ },
1146
+ "required": [
1147
+ "type"
1148
+ ],
1149
+ "type": "object"
1150
+ },
1151
+ "EmptyConfig": {
1152
+ "additionalProperties": false,
1153
+ "description": "该字段类型没有特殊配置。",
1154
+ "type": "object"
1155
+ },
1156
+ "ExternalDepartmentSelector": {
1157
+ "additionalProperties": false,
1158
+ "properties": {
1159
+ "deptId": {
1160
+ "minimum": 1,
1161
+ "type": "integer"
1162
+ },
1163
+ "deptName": {
1164
+ "type": "string"
1165
+ }
1166
+ },
1167
+ "required": [
1168
+ "deptId"
1169
+ ],
1170
+ "type": "object"
1171
+ },
1172
+ "ExternalMemberSelector": {
1173
+ "additionalProperties": false,
1174
+ "properties": {
1175
+ "email": {
1176
+ "type": "string"
1177
+ },
1178
+ "nickName": {
1179
+ "type": "string"
1180
+ },
1181
+ "uid": {
1182
+ "minimum": 1,
1183
+ "type": "integer"
1184
+ }
1185
+ },
1186
+ "required": [
1187
+ "uid"
1188
+ ],
1189
+ "type": "object"
1190
+ },
1191
+ "FieldCommon": {
1192
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
1193
+ "properties": {
1194
+ "dataTitle": {
1195
+ "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
1196
+ "type": "boolean"
1197
+ },
1198
+ "defaultType": {
1199
+ "default": 1,
1200
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
1201
+ "enum": [
1202
+ 1,
1203
+ 2,
1204
+ 3
1205
+ ],
1206
+ "type": "integer"
1207
+ },
1208
+ "defaultValue": {
1209
+ "$ref": "#/$defs/ScalarDefaultValue",
1210
+ "description": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
1211
+ },
1212
+ "description": {
1213
+ "description": "字段说明;null 或空字符串表示清空。",
1214
+ "type": [
1215
+ "string",
1216
+ "null"
1217
+ ]
1218
+ },
1219
+ "name": {
1220
+ "description": "字段展示名称;同一父级内唯一,不单独作为字段身份。",
1221
+ "minLength": 1,
1222
+ "type": "string"
1223
+ },
1224
+ "queId": {
1225
+ "description": "已有字段的后端 ID;get 返回,新增字段省略。",
1226
+ "minimum": 1,
1227
+ "type": "integer"
1228
+ },
1229
+ "required": {
1230
+ "description": "是否必填;缺失时保留已有字段当前值。",
1231
+ "type": "boolean"
1232
+ },
1233
+ "width": {
1234
+ "description": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
1235
+ "maximum": 100,
1236
+ "minimum": 1,
1237
+ "type": "integer"
1238
+ }
1239
+ },
1240
+ "required": [
1241
+ "name"
1242
+ ],
1243
+ "type": "object"
1244
+ },
1245
+ "FieldRow": {
1246
+ "additionalProperties": false,
1247
+ "description": "段落内部字段行。",
1248
+ "properties": {
1249
+ "fields": {
1250
+ "description": "本行的 1 到 4 个顶层字段。",
1251
+ "items": {
1252
+ "$ref": "#/$defs/TopField"
1253
+ },
1254
+ "maxItems": 4,
1255
+ "minItems": 1,
1256
+ "type": "array"
1257
+ }
1258
+ },
1259
+ "required": [
1260
+ "fields"
1261
+ ],
1262
+ "type": "object"
1263
+ },
1264
+ "FieldSelector": {
1265
+ "additionalProperties": false,
1266
+ "anyOf": [
1267
+ {
1268
+ "required": [
1269
+ "queId"
1270
+ ]
1271
+ },
1272
+ {
1273
+ "required": [
1274
+ "name"
1275
+ ]
1276
+ }
1277
+ ],
1278
+ "description": "跨字段引用选择器;至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
1279
+ "properties": {
1280
+ "name": {
1281
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
1282
+ "minLength": 1,
1283
+ "type": "string"
1284
+ },
1285
+ "queId": {
1286
+ "description": "已有字段的后端 ID;优先用于精确解析。",
1287
+ "minimum": 1,
1288
+ "type": "integer"
1289
+ }
1290
+ },
1291
+ "type": "object"
1292
+ },
1293
+ "JsonValue": {
1294
+ "description": "数据关联字面量支持的任意 JSON 值。",
1295
+ "oneOf": [
1296
+ {
1297
+ "type": "null"
1298
+ },
1299
+ {
1300
+ "type": "boolean"
1301
+ },
1302
+ {
1303
+ "type": "number"
1304
+ },
1305
+ {
1306
+ "type": "string"
1307
+ },
1308
+ {
1309
+ "items": {
1310
+ "$ref": "#/$defs/JsonValue"
1311
+ },
1312
+ "type": "array"
1313
+ },
1314
+ {
1315
+ "additionalProperties": {
1316
+ "$ref": "#/$defs/JsonValue"
1317
+ },
1318
+ "type": "object"
1319
+ }
1320
+ ]
1321
+ },
1322
+ "MemberConfig": {
1323
+ "additionalProperties": false,
1324
+ "description": "成员字段的选择范围和默认成员。",
1325
+ "properties": {
1326
+ "canScan": {
1327
+ "type": [
1328
+ "boolean",
1329
+ "null"
1330
+ ]
1331
+ },
1332
+ "defaultMembers": {
1333
+ "$ref": "#/$defs/MemberScope"
1334
+ },
1335
+ "memberScope": {
1336
+ "$ref": "#/$defs/MemberScope"
1337
+ },
1338
+ "memberScopeRelation": {
1339
+ "$ref": "#/$defs/SelectScopeRelation"
1340
+ },
1341
+ "noRepeat": {
1342
+ "type": [
1343
+ "boolean",
1344
+ "null"
1345
+ ]
1346
+ },
1347
+ "scanType": {
1348
+ "minimum": 0,
1349
+ "type": [
1350
+ "integer",
1351
+ "null"
1352
+ ]
1353
+ }
1354
+ },
1355
+ "type": "object"
1356
+ },
1357
+ "MemberScope": {
1358
+ "description": "成员字段可选范围;all 为工作区全部成员,custom 为显式成员/部门/角色或动态成员,relation 为按字段关联。",
1359
+ "oneOf": [
1360
+ {
1361
+ "additionalProperties": false,
1362
+ "properties": {
1363
+ "includeSubDeparts": {
1364
+ "type": "boolean"
1365
+ },
1366
+ "mode": {
1367
+ "const": "all"
1368
+ }
1369
+ },
1370
+ "required": [
1371
+ "mode"
1372
+ ],
1373
+ "type": "object"
1374
+ },
1375
+ {
1376
+ "additionalProperties": false,
1377
+ "properties": {
1378
+ "departments": {
1379
+ "items": {
1380
+ "$ref": "#/$defs/DepartmentSelector"
1381
+ },
1382
+ "type": "array"
1383
+ },
1384
+ "dynamic": {
1385
+ "items": {
1386
+ "$ref": "#/$defs/DynamicMemberSelector"
1387
+ },
1388
+ "type": "array"
1389
+ },
1390
+ "externalDepartments": {
1391
+ "items": {
1392
+ "$ref": "#/$defs/ExternalDepartmentSelector"
1393
+ },
1394
+ "type": "array"
1395
+ },
1396
+ "externalMembers": {
1397
+ "items": {
1398
+ "$ref": "#/$defs/ExternalMemberSelector"
1399
+ },
1400
+ "type": "array"
1401
+ },
1402
+ "includeSubDeparts": {
1403
+ "type": "boolean"
1404
+ },
1405
+ "members": {
1406
+ "items": {
1407
+ "$ref": "#/$defs/MemberSelector"
1408
+ },
1409
+ "type": "array"
1410
+ },
1411
+ "mode": {
1412
+ "const": "custom"
1413
+ },
1414
+ "roles": {
1415
+ "items": {
1416
+ "$ref": "#/$defs/RoleSelector"
1417
+ },
1418
+ "type": "array"
1419
+ }
1420
+ },
1421
+ "required": [
1422
+ "mode"
1423
+ ],
1424
+ "type": "object"
1425
+ },
1426
+ {
1427
+ "additionalProperties": false,
1428
+ "properties": {
1429
+ "departments": {
1430
+ "items": {
1431
+ "$ref": "#/$defs/DepartmentSelector"
1432
+ },
1433
+ "type": "array"
1434
+ },
1435
+ "dynamic": {
1436
+ "items": {
1437
+ "$ref": "#/$defs/DynamicMemberSelector"
1438
+ },
1439
+ "type": "array"
1440
+ },
1441
+ "externalDepartments": {
1442
+ "items": {
1443
+ "$ref": "#/$defs/ExternalDepartmentSelector"
1444
+ },
1445
+ "type": "array"
1446
+ },
1447
+ "externalMembers": {
1448
+ "items": {
1449
+ "$ref": "#/$defs/ExternalMemberSelector"
1450
+ },
1451
+ "type": "array"
1452
+ },
1453
+ "includeSubDeparts": {
1454
+ "type": "boolean"
1455
+ },
1456
+ "members": {
1457
+ "items": {
1458
+ "$ref": "#/$defs/MemberSelector"
1459
+ },
1460
+ "type": "array"
1461
+ },
1462
+ "mode": {
1463
+ "const": "relation"
1464
+ },
1465
+ "roles": {
1466
+ "items": {
1467
+ "$ref": "#/$defs/RoleSelector"
1468
+ },
1469
+ "type": "array"
1470
+ }
1471
+ },
1472
+ "required": [
1473
+ "mode"
1474
+ ],
1475
+ "type": "object"
1476
+ }
1477
+ ]
1478
+ },
1479
+ "MemberSelector": {
1480
+ "additionalProperties": false,
1481
+ "properties": {
1482
+ "nickName": {
1483
+ "minLength": 1,
1484
+ "type": "string"
1485
+ },
1486
+ "uid": {
1487
+ "minimum": 1,
1488
+ "type": "integer"
1489
+ }
1490
+ },
1491
+ "required": [
1492
+ "uid"
1493
+ ],
1494
+ "type": "object"
1495
+ },
1496
+ "NumberConfig": {
1497
+ "additionalProperties": false,
1498
+ "description": "数字和金额字段的数值、精度及显示格式。",
1499
+ "properties": {
1500
+ "canDecimal": {
1501
+ "description": "是否允许小数;普通数字字段可显式设置。",
1502
+ "type": [
1503
+ "boolean",
1504
+ "null"
1505
+ ]
1506
+ },
1507
+ "canScan": {
1508
+ "description": "是否允许扫码输入。",
1509
+ "type": [
1510
+ "boolean",
1511
+ "null"
1512
+ ]
1513
+ },
1514
+ "currencyStatus": {
1515
+ "description": "金额字段是否显示货币符号。",
1516
+ "type": [
1517
+ "boolean",
1518
+ "null"
1519
+ ]
1520
+ },
1521
+ "currencyType": {
1522
+ "description": "货币类型 ID。",
1523
+ "minimum": 1,
1524
+ "type": [
1525
+ "integer",
1526
+ "null"
1527
+ ]
1528
+ },
1529
+ "decimalDigit": {
1530
+ "description": "小数位数。",
1531
+ "maximum": 10,
1532
+ "minimum": 0,
1533
+ "type": [
1534
+ "integer",
1535
+ "null"
1536
+ ]
1537
+ },
1538
+ "maxValue": {
1539
+ "description": "允许的最大值;后端按字符串保存。",
1540
+ "type": [
1541
+ "string",
1542
+ "number",
1543
+ "null"
1544
+ ]
1545
+ },
1546
+ "minValue": {
1547
+ "description": "允许的最小值;后端按字符串保存。",
1548
+ "type": [
1549
+ "string",
1550
+ "number",
1551
+ "null"
1552
+ ]
1553
+ },
1554
+ "noRepeat": {
1555
+ "description": "是否禁止重复值。",
1556
+ "type": [
1557
+ "boolean",
1558
+ "null"
1559
+ ]
1560
+ },
1561
+ "numberFormat": {
1562
+ "description": "数字展示格式 ID。",
1563
+ "minimum": 1,
1564
+ "type": [
1565
+ "integer",
1566
+ "null"
1567
+ ]
1568
+ },
1569
+ "numberLimitStatus": {
1570
+ "description": "是否启用最小值和最大值限制。",
1571
+ "type": [
1572
+ "boolean",
1573
+ "null"
1574
+ ]
1575
+ },
1576
+ "scanType": {
1577
+ "description": "扫码类型 ID。",
1578
+ "minimum": 0,
1579
+ "type": [
1580
+ "integer",
1581
+ "null"
1582
+ ]
1583
+ }
1584
+ },
1585
+ "type": "object"
1586
+ },
1587
+ "PhoneConfig": {
1588
+ "additionalProperties": false,
1589
+ "description": "电话字段的长度、重复和校验配置。",
1590
+ "properties": {
1591
+ "canScan": {
1592
+ "type": [
1593
+ "boolean",
1594
+ "null"
1595
+ ]
1596
+ },
1597
+ "fixedPhone": {
1598
+ "description": "是否按固定电话格式校验。",
1599
+ "type": [
1600
+ "boolean",
1601
+ "null"
1602
+ ]
1603
+ },
1604
+ "maxWordCount": {
1605
+ "minimum": 0,
1606
+ "type": [
1607
+ "integer",
1608
+ "null"
1609
+ ]
1610
+ },
1611
+ "minWordCount": {
1612
+ "minimum": 0,
1613
+ "type": [
1614
+ "integer",
1615
+ "null"
1616
+ ]
1617
+ },
1618
+ "msgValidateStatus": {
1619
+ "description": "是否启用短信校验。",
1620
+ "type": [
1621
+ "boolean",
1622
+ "null"
1623
+ ]
1624
+ },
1625
+ "noRepeat": {
1626
+ "type": [
1627
+ "boolean",
1628
+ "null"
1629
+ ]
1630
+ },
1631
+ "scanType": {
1632
+ "minimum": 0,
1633
+ "type": [
1634
+ "integer",
1635
+ "null"
1636
+ ]
1637
+ }
1638
+ },
1639
+ "type": "object"
1640
+ },
1641
+ "QLinkerBinding": {
1642
+ "additionalProperties": false,
1643
+ "description": "Q-Linker 的输入映射、请求配置和输出映射。",
1644
+ "properties": {
1645
+ "inputs": {
1646
+ "description": "将当前表单字段映射到请求参数的规则。",
1647
+ "items": {
1648
+ "$ref": "#/$defs/QLinkerInputBinding"
1649
+ },
1650
+ "type": "array"
1651
+ },
1652
+ "outputs": {
1653
+ "description": "将响应路径映射到目标字段的规则;至少一个。",
1654
+ "items": {
1655
+ "$ref": "#/$defs/QLinkerOutputBinding"
1656
+ },
1657
+ "minItems": 1,
1658
+ "type": "array"
1659
+ },
1660
+ "request": {
1661
+ "$ref": "#/$defs/QLinkerRequest",
1662
+ "description": "远程请求配置。"
1663
+ }
1664
+ },
1665
+ "required": [
1666
+ "request",
1667
+ "outputs"
1668
+ ],
1669
+ "type": "object"
1670
+ },
1671
+ "QLinkerConfig": {
1672
+ "additionalProperties": false,
1673
+ "description": "Q-Linker 的高层声明;无法无损还原为该结构时阻断处理。",
1674
+ "properties": {
1675
+ "qLinkerBinding": {
1676
+ "$ref": "#/$defs/QLinkerBinding"
1677
+ }
1678
+ },
1679
+ "required": [
1680
+ "qLinkerBinding"
1681
+ ],
1682
+ "type": "object"
1683
+ },
1684
+ "QLinkerInputBinding": {
1685
+ "additionalProperties": false,
1686
+ "description": "一个表单字段到请求参数的映射。",
1687
+ "properties": {
1688
+ "field": {
1689
+ "$ref": "#/$defs/FieldSelector",
1690
+ "description": "输入来源字段。"
1691
+ },
1692
+ "key": {
1693
+ "description": "请求中的参数名。",
1694
+ "minLength": 1,
1695
+ "type": "string"
1696
+ },
1697
+ "source": {
1698
+ "description": "参数写入请求的位置。",
1699
+ "enum": [
1700
+ "query_param",
1701
+ "header",
1702
+ "url_encoded",
1703
+ "json_path"
1704
+ ]
1705
+ }
1706
+ },
1707
+ "required": [
1708
+ "field",
1709
+ "key",
1710
+ "source"
1711
+ ],
1712
+ "type": "object"
1713
+ },
1714
+ "QLinkerKeyValue": {
1715
+ "additionalProperties": false,
1716
+ "description": "HTTP 请求中的键值对。",
1717
+ "properties": {
1718
+ "key": {
1719
+ "description": "参数名。",
1720
+ "minLength": 1,
1721
+ "type": "string"
1722
+ },
1723
+ "value": {
1724
+ "description": "参数值;null 表示空值。",
1725
+ "type": [
1726
+ "string",
1727
+ "null"
1728
+ ]
1729
+ }
1730
+ },
1731
+ "required": [
1732
+ "key"
1733
+ ],
1734
+ "type": "object"
1735
+ },
1736
+ "QLinkerOutputBinding": {
1737
+ "additionalProperties": false,
1738
+ "description": "一个响应值到表单目标字段的映射。",
1739
+ "properties": {
1740
+ "alias": {
1741
+ "description": "输出别名;用于后续数据关联引用。",
1742
+ "minLength": 1,
1743
+ "type": "string"
1744
+ },
1745
+ "aliasId": {
1746
+ "description": "后端生成的输出别名 ID;新增输出时可省略,get 返回后必须保留。",
1747
+ "minimum": 1,
1748
+ "type": "integer"
1749
+ },
1750
+ "path": {
1751
+ "description": "从响应中取值的 JSONPath。",
1752
+ "minLength": 1,
1753
+ "type": "string"
1754
+ },
1755
+ "targetField": {
1756
+ "$ref": "#/$defs/FieldSelector",
1757
+ "description": "接收结果的当前表单字段。"
1758
+ }
1759
+ },
1760
+ "required": [
1761
+ "alias",
1762
+ "path",
1763
+ "targetField"
1764
+ ],
1765
+ "type": "object"
1766
+ },
1767
+ "QLinkerRequest": {
1768
+ "additionalProperties": false,
1769
+ "description": "Q-Linker 远程 HTTP 请求配置。",
1770
+ "properties": {
1771
+ "autoTrigger": {
1772
+ "description": "是否在输入变化时自动触发请求。",
1773
+ "type": [
1774
+ "boolean",
1775
+ "null"
1776
+ ]
1777
+ },
1778
+ "bodyType": {
1779
+ "default": "url_encoded",
1780
+ "description": "请求体格式;分别映射后端 bodyType 1、2、3。",
1781
+ "enum": [
1782
+ "url_encoded",
1783
+ "json",
1784
+ "xml"
1785
+ ]
1786
+ },
1787
+ "customButtonText": {
1788
+ "description": "自定义触发按钮文案。",
1789
+ "type": [
1790
+ "string",
1791
+ "null"
1792
+ ]
1793
+ },
1794
+ "customButtonTextEnabled": {
1795
+ "description": "是否启用自定义触发按钮文案。",
1796
+ "type": [
1797
+ "boolean",
1798
+ "null"
1799
+ ]
1800
+ },
1801
+ "headers": {
1802
+ "description": "请求头键值对。",
1803
+ "items": {
1804
+ "$ref": "#/$defs/QLinkerKeyValue"
1805
+ },
1806
+ "type": "array"
1807
+ },
1808
+ "hideOnForm": {
1809
+ "description": "是否在表单填写界面隐藏该 Q-Linker 字段。",
1810
+ "type": [
1811
+ "boolean",
1812
+ "null"
1813
+ ]
1814
+ },
1815
+ "insertValueDirectly": {
1816
+ "description": "是否把请求结果直接写入目标字段。",
1817
+ "type": [
1818
+ "boolean",
1819
+ "null"
1820
+ ]
1821
+ },
1822
+ "jsonValue": {
1823
+ "description": "bodyType 为 json 时的 JSON 请求体字符串。",
1824
+ "type": [
1825
+ "string",
1826
+ "null"
1827
+ ]
1828
+ },
1829
+ "method": {
1830
+ "default": "GET",
1831
+ "description": "HTTP 方法;当前 Q-Linker 仅支持 GET 和 POST,缺失时按 GET 处理。",
1832
+ "enum": [
1833
+ "GET",
1834
+ "POST"
1835
+ ]
1836
+ },
1837
+ "queryParams": {
1838
+ "description": "URL 查询参数键值对。",
1839
+ "items": {
1840
+ "$ref": "#/$defs/QLinkerKeyValue"
1841
+ },
1842
+ "type": "array"
1843
+ },
1844
+ "resultType": {
1845
+ "default": "json",
1846
+ "description": "响应解析格式;分别映射后端 resultType 1、2、3。",
1847
+ "enum": [
1848
+ "json",
1849
+ "xml",
1850
+ "text"
1851
+ ]
1852
+ },
1853
+ "url": {
1854
+ "description": "请求 URL。",
1855
+ "minLength": 1,
1856
+ "type": "string"
1857
+ },
1858
+ "urlEncodedValue": {
1859
+ "description": "bodyType 为 url_encoded 时的表单键值对。",
1860
+ "items": {
1861
+ "$ref": "#/$defs/QLinkerKeyValue"
1862
+ },
1863
+ "type": "array"
1864
+ },
1865
+ "xmlValue": {
1866
+ "description": "bodyType 为 xml 时的 XML 请求体字符串。",
1867
+ "type": [
1868
+ "string",
1869
+ "null"
1870
+ ]
1871
+ }
1872
+ },
1873
+ "required": [
1874
+ "url"
1875
+ ],
1876
+ "type": "object"
1877
+ },
1878
+ "ReferenceDefaultValue": {
1879
+ "additionalProperties": false,
1880
+ "properties": {
1881
+ "applyId": {
1882
+ "type": [
1883
+ "integer",
1884
+ "null"
1885
+ ]
1886
+ },
1887
+ "dataTitle": {
1888
+ "type": [
1889
+ "string",
1890
+ "null"
1891
+ ]
1892
+ },
1893
+ "values": {
1894
+ "items": {
1895
+ "$ref": "#/$defs/DefaultValues"
1896
+ },
1897
+ "type": "array"
1898
+ }
1899
+ },
1900
+ "type": "object"
1901
+ },
1902
+ "RelationConfig": {
1903
+ "additionalProperties": false,
1904
+ "description": "引用字段配置;引用其他应用中的数据。",
1905
+ "properties": {
1906
+ "beingDefaultFormulaAutoFillEnabled": {
1907
+ "type": [
1908
+ "boolean",
1909
+ "null"
1910
+ ]
1911
+ },
1912
+ "defaultValueMatchRules": {
1913
+ "type": [
1914
+ "array",
1915
+ "null"
1916
+ ]
1917
+ },
1918
+ "defaultValues": {
1919
+ "oneOf": [
1920
+ {
1921
+ "type": "null"
1922
+ },
1923
+ {
1924
+ "$ref": "#/$defs/DefaultValues"
1925
+ }
1926
+ ]
1927
+ },
1928
+ "displayField": {
1929
+ "$ref": "#/$defs/FieldSelector",
1930
+ "description": "引用值的主展示字段。"
1931
+ },
1932
+ "relationMode": {
1933
+ "default": "single",
1934
+ "description": "单条引用或多条引用;缺失时按 single 处理。",
1935
+ "enum": [
1936
+ "single",
1937
+ "multiple"
1938
+ ]
1939
+ },
1940
+ "targetAppKey": {
1941
+ "description": "被引用应用的 appKey。",
1942
+ "minLength": 1,
1943
+ "type": "string"
1944
+ },
1945
+ "visibleFields": {
1946
+ "description": "引用选择界面额外展示的字段。",
1947
+ "items": {
1948
+ "$ref": "#/$defs/FieldSelector"
1949
+ },
1950
+ "type": "array",
1951
+ "uniqueItems": true
1952
+ }
1953
+ },
1954
+ "required": [
1955
+ "targetAppKey",
1956
+ "displayField"
1957
+ ],
1958
+ "type": "object"
1959
+ },
1960
+ "RoleSelector": {
1961
+ "additionalProperties": false,
1962
+ "properties": {
1963
+ "roleId": {
1964
+ "minimum": 1,
1965
+ "type": "integer"
1966
+ },
1967
+ "roleName": {
1968
+ "minLength": 1,
1969
+ "type": "string"
1970
+ }
1971
+ },
1972
+ "required": [
1973
+ "roleId"
1974
+ ],
1975
+ "type": "object"
1976
+ },
1977
+ "RowBlock": {
1978
+ "additionalProperties": false,
1979
+ "description": "根级普通字段行;字段顺序即展示顺序。",
1980
+ "properties": {
1981
+ "fields": {
1982
+ "description": "本行的 1 到 4 个顶层字段。",
1983
+ "items": {
1984
+ "$ref": "#/$defs/TopField"
1985
+ },
1986
+ "maxItems": 4,
1987
+ "minItems": 1,
1988
+ "type": "array"
1989
+ },
1990
+ "kind": {
1991
+ "const": "row",
1992
+ "description": "普通行判别值。"
1993
+ }
1994
+ },
1995
+ "required": [
1996
+ "kind",
1997
+ "fields"
1998
+ ],
1999
+ "type": "object"
2000
+ },
2001
+ "ScalarDefaultValue": {
2002
+ "description": "不包含对象或数组的普通字段默认值。",
2003
+ "type": [
2004
+ "null",
2005
+ "boolean",
2006
+ "number",
2007
+ "string"
2008
+ ]
2009
+ },
2010
+ "SectionBlock": {
2011
+ "additionalProperties": false,
2012
+ "description": "段落布局容器;不是业务字段,必须独占一个根级块。",
2013
+ "properties": {
2014
+ "kind": {
2015
+ "const": "section",
2016
+ "description": "段落判别值。"
2017
+ },
2018
+ "rows": {
2019
+ "description": "段落内的非空有序字段行。",
2020
+ "items": {
2021
+ "$ref": "#/$defs/FieldRow"
2022
+ },
2023
+ "minItems": 1,
2024
+ "type": "array"
2025
+ },
2026
+ "sectionId": {
2027
+ "description": "已有段落的真实身份;get 把后端数值 queId 输出为无前导零的正十进制字符串,apply 仅在构造后端 payload 时转回数值 queId,新增段落省略。",
2028
+ "pattern": "^[1-9][0-9]*$",
2029
+ "type": "string"
2030
+ },
2031
+ "title": {
2032
+ "description": "段落标题。",
2033
+ "minLength": 1,
2034
+ "type": "string"
2035
+ }
2036
+ },
2037
+ "required": [
2038
+ "kind",
2039
+ "title",
2040
+ "rows"
2041
+ ],
2042
+ "type": "object"
2043
+ },
2044
+ "SelectScopeRelation": {
2045
+ "additionalProperties": false,
2046
+ "properties": {
2047
+ "displayedField": {
2048
+ "$ref": "#/$defs/FieldSelector"
2049
+ },
2050
+ "displayedFieldType": {
2051
+ "type": [
2052
+ "integer",
2053
+ "null"
2054
+ ]
2055
+ },
2056
+ "matchRuleFormula": {
2057
+ "type": [
2058
+ "string",
2059
+ "null"
2060
+ ]
2061
+ },
2062
+ "matchRuleType": {
2063
+ "type": [
2064
+ "integer",
2065
+ "null"
2066
+ ]
2067
+ },
2068
+ "matchRules": {
2069
+ "type": [
2070
+ "array",
2071
+ "null"
2072
+ ]
2073
+ },
2074
+ "targetAppKey": {
2075
+ "minLength": 1,
2076
+ "type": "string"
2077
+ },
2078
+ "targetAppTitle": {
2079
+ "type": [
2080
+ "string",
2081
+ "null"
2082
+ ]
2083
+ }
2084
+ },
2085
+ "required": [
2086
+ "displayedField",
2087
+ "targetAppKey"
2088
+ ],
2089
+ "type": "object"
2090
+ },
2091
+ "SerialComponent": {
2092
+ "description": "自定义编号的组成部分;id 仅用于复用已有组件。",
2093
+ "oneOf": [
2094
+ {
2095
+ "additionalProperties": false,
2096
+ "properties": {
2097
+ "id": {
2098
+ "description": "后端生成的组件 ID;get 返回,新增时省略。",
2099
+ "minimum": 1,
2100
+ "type": "integer"
2101
+ },
2102
+ "length": {
2103
+ "description": "自动计数部分的位数。",
2104
+ "maximum": 9,
2105
+ "minimum": 3,
2106
+ "type": "integer"
2107
+ },
2108
+ "repeatPeriod": {
2109
+ "description": "自动计数器的重置周期。",
2110
+ "enum": [
2111
+ "none",
2112
+ "day",
2113
+ "week",
2114
+ "month",
2115
+ "year"
2116
+ ]
2117
+ },
2118
+ "type": {
2119
+ "const": "auto_count"
2120
+ }
2121
+ },
2122
+ "required": [
2123
+ "type",
2124
+ "length",
2125
+ "repeatPeriod"
2126
+ ],
2127
+ "type": "object"
2128
+ },
2129
+ {
2130
+ "additionalProperties": false,
2131
+ "properties": {
2132
+ "dateFormat": {
2133
+ "description": "提交时间在编号中的格式。",
2134
+ "enum": [
2135
+ "year",
2136
+ "year_month",
2137
+ "year_month_day"
2138
+ ]
2139
+ },
2140
+ "id": {
2141
+ "minimum": 1,
2142
+ "type": "integer"
2143
+ },
2144
+ "type": {
2145
+ "const": "submit_datetime"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "type",
2150
+ "dateFormat"
2151
+ ],
2152
+ "type": "object"
2153
+ },
2154
+ {
2155
+ "additionalProperties": false,
2156
+ "properties": {
2157
+ "id": {
2158
+ "minimum": 1,
2159
+ "type": "integer"
2160
+ },
2161
+ "type": {
2162
+ "const": "fixed_text"
2163
+ },
2164
+ "value": {
2165
+ "description": "固定拼接文本。",
2166
+ "minLength": 1,
2167
+ "type": "string"
2168
+ }
2169
+ },
2170
+ "required": [
2171
+ "type",
2172
+ "value"
2173
+ ],
2174
+ "type": "object"
2175
+ },
2176
+ {
2177
+ "additionalProperties": false,
2178
+ "properties": {
2179
+ "dateFormat": {
2180
+ "description": "来源为日期字段时的格式。",
2181
+ "enum": [
2182
+ "year",
2183
+ "year_month",
2184
+ "year_month_day"
2185
+ ]
2186
+ },
2187
+ "field": {
2188
+ "$ref": "#/$defs/FieldSelector",
2189
+ "description": "取值来源字段。"
2190
+ },
2191
+ "id": {
2192
+ "minimum": 1,
2193
+ "type": "integer"
2194
+ },
2195
+ "type": {
2196
+ "const": "field"
2197
+ }
2198
+ },
2199
+ "required": [
2200
+ "type",
2201
+ "field"
2202
+ ],
2203
+ "type": "object"
2204
+ }
2205
+ ]
2206
+ },
2207
+ "SerialNumber": {
2208
+ "description": "应用数据编号配置;自定义模式必须且只能包含一个自动计数组件。",
2209
+ "oneOf": [
2210
+ {
2211
+ "additionalProperties": false,
2212
+ "properties": {
2213
+ "mode": {
2214
+ "const": "default",
2215
+ "description": "使用系统默认编号规则。"
2216
+ }
2217
+ },
2218
+ "required": [
2219
+ "mode"
2220
+ ],
2221
+ "type": "object"
2222
+ },
2223
+ {
2224
+ "additionalProperties": false,
2225
+ "properties": {
2226
+ "components": {
2227
+ "contains": {
2228
+ "properties": {
2229
+ "type": {
2230
+ "const": "auto_count"
2231
+ }
2232
+ },
2233
+ "required": [
2234
+ "type"
2235
+ ],
2236
+ "type": "object"
2237
+ },
2238
+ "description": "自定义编号组件的完整有序目标态。",
2239
+ "items": {
2240
+ "$ref": "#/$defs/SerialComponent"
2241
+ },
2242
+ "maxContains": 1,
2243
+ "minContains": 1,
2244
+ "minItems": 1,
2245
+ "type": "array"
2246
+ },
2247
+ "mode": {
2248
+ "const": "custom",
2249
+ "description": "使用按数组顺序拼接的自定义编号组件。"
2250
+ }
2251
+ },
2252
+ "required": [
2253
+ "mode",
2254
+ "components"
2255
+ ],
2256
+ "type": "object"
2257
+ }
2258
+ ]
2259
+ },
2260
+ "Style": {
2261
+ "additionalProperties": false,
2262
+ "description": "表单背景和头部视觉样式;颜色使用 CSS 颜色字符串。",
2263
+ "properties": {
2264
+ "bgColor": {
2265
+ "description": "表单背景色;null 表示清除。",
2266
+ "type": [
2267
+ "string",
2268
+ "null"
2269
+ ]
2270
+ },
2271
+ "bgImage": {
2272
+ "description": "表单背景图片 URL;null 表示清除。",
2273
+ "type": [
2274
+ "string",
2275
+ "null"
2276
+ ]
2277
+ },
2278
+ "fontColor": {
2279
+ "description": "表单头部字体颜色;null 表示清除。",
2280
+ "type": [
2281
+ "string",
2282
+ "null"
2283
+ ]
2284
+ },
2285
+ "headerColor": {
2286
+ "description": "表单头部背景色;null 表示清除。",
2287
+ "type": [
2288
+ "string",
2289
+ "null"
2290
+ ]
2291
+ },
2292
+ "headerImage": {
2293
+ "description": "表单头图 URL;null 表示清除。",
2294
+ "type": [
2295
+ "string",
2296
+ "null"
2297
+ ]
2298
+ },
2299
+ "opacity": {
2300
+ "description": "背景透明度,取值 0 到 1;null 表示清除。",
2301
+ "maximum": 1,
2302
+ "minimum": 0,
2303
+ "type": [
2304
+ "number",
2305
+ "null"
2306
+ ]
2307
+ }
2308
+ },
2309
+ "type": "object"
2310
+ },
2311
+ "SubField": {
2312
+ "allOf": [
2313
+ {
2314
+ "$ref": "#/$defs/SubFieldCommon"
2315
+ },
2316
+ {
2317
+ "oneOf": [
2318
+ {
2319
+ "properties": {
2320
+ "config": {
2321
+ "$ref": "#/$defs/TextConfig"
2322
+ },
2323
+ "type": {
2324
+ "enum": [
2325
+ "text",
2326
+ "long_text",
2327
+ "link",
2328
+ "email"
2329
+ ]
2330
+ }
2331
+ },
2332
+ "required": [
2333
+ "type"
2334
+ ]
2335
+ },
2336
+ {
2337
+ "properties": {
2338
+ "config": {
2339
+ "$ref": "#/$defs/PhoneConfig"
2340
+ },
2341
+ "type": {
2342
+ "const": "phone"
2343
+ }
2344
+ },
2345
+ "required": [
2346
+ "type"
2347
+ ]
2348
+ },
2349
+ {
2350
+ "properties": {
2351
+ "config": {
2352
+ "$ref": "#/$defs/NumberConfig"
2353
+ },
2354
+ "type": {
2355
+ "const": "number"
2356
+ }
2357
+ },
2358
+ "required": [
2359
+ "type"
2360
+ ]
2361
+ },
2362
+ {
2363
+ "properties": {
2364
+ "config": {
2365
+ "$ref": "#/$defs/EmptyConfig"
2366
+ },
2367
+ "type": {
2368
+ "const": "date"
2369
+ }
2370
+ },
2371
+ "required": [
2372
+ "type"
2373
+ ]
2374
+ },
2375
+ {
2376
+ "properties": {
2377
+ "config": {
2378
+ "$ref": "#/$defs/AttachmentConfig"
2379
+ },
2380
+ "type": {
2381
+ "const": "attachment"
2382
+ }
2383
+ },
2384
+ "required": [
2385
+ "type"
2386
+ ]
2387
+ },
2388
+ {
2389
+ "properties": {
2390
+ "config": {
2391
+ "$ref": "#/$defs/MemberConfig"
2392
+ },
2393
+ "type": {
2394
+ "const": "member"
2395
+ }
2396
+ },
2397
+ "required": [
2398
+ "type"
2399
+ ]
2400
+ },
2401
+ {
2402
+ "properties": {
2403
+ "config": {
2404
+ "$ref": "#/$defs/ChoiceConfig"
2405
+ },
2406
+ "type": {
2407
+ "enum": [
2408
+ "single_choice",
2409
+ "single_select",
2410
+ "multi_select"
2411
+ ]
2412
+ }
2413
+ },
2414
+ "required": [
2415
+ "type",
2416
+ "config"
2417
+ ]
2418
+ },
2419
+ {
2420
+ "properties": {
2421
+ "config": {
2422
+ "$ref": "#/$defs/DepartmentConfig"
2423
+ },
2424
+ "type": {
2425
+ "const": "department"
2426
+ }
2427
+ },
2428
+ "required": [
2429
+ "type",
2430
+ "config"
2431
+ ]
2432
+ },
2433
+ {
2434
+ "properties": {
2435
+ "config": {
2436
+ "$ref": "#/$defs/RelationConfig"
2437
+ },
2438
+ "type": {
2439
+ "const": "relation"
2440
+ }
2441
+ },
2442
+ "required": [
2443
+ "type",
2444
+ "config"
2445
+ ]
2446
+ },
2447
+ {
2448
+ "properties": {
2449
+ "config": {
2450
+ "$ref": "#/$defs/DataRelationConfig"
2451
+ },
2452
+ "type": {
2453
+ "const": "data_relation"
2454
+ }
2455
+ },
2456
+ "required": [
2457
+ "type",
2458
+ "config"
2459
+ ]
2460
+ }
2461
+ ]
2462
+ }
2463
+ ],
2464
+ "description": "表格子字段;仅允许一期白名单类型,不包含布局宽度。",
2465
+ "type": "object",
2466
+ "unevaluatedProperties": false
2467
+ },
2468
+ "SubFieldCommon": {
2469
+ "description": "表格子字段的公共属性;不允许 dataTitle、dataCover 或 width。",
2470
+ "properties": {
2471
+ "defaultType": {
2472
+ "default": 1,
2473
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
2474
+ "enum": [
2475
+ 1,
2476
+ 2,
2477
+ 3
2478
+ ],
2479
+ "type": "integer"
2480
+ },
2481
+ "defaultValue": {
2482
+ "description": "表单填写时的默认值;显式 null 表示清除默认值。",
2483
+ "type": [
2484
+ "null",
2485
+ "boolean",
2486
+ "number",
2487
+ "string",
2488
+ "array",
2489
+ "object"
2490
+ ]
2491
+ },
2492
+ "description": {
2493
+ "description": "子字段说明;null 或空字符串表示清空。",
2494
+ "type": [
2495
+ "string",
2496
+ "null"
2497
+ ]
2498
+ },
2499
+ "name": {
2500
+ "description": "子字段展示名称;在所属表格内唯一。",
2501
+ "minLength": 1,
2502
+ "type": "string"
2503
+ },
2504
+ "queId": {
2505
+ "description": "已有子字段的后端 ID;新增时省略。",
2506
+ "minimum": 1,
2507
+ "type": "integer"
2508
+ },
2509
+ "required": {
2510
+ "description": "是否必填;缺失时保留当前值。",
2511
+ "type": "boolean"
2512
+ }
2513
+ },
2514
+ "required": [
2515
+ "name"
2516
+ ],
2517
+ "type": "object"
2518
+ },
2519
+ "SubtableConfig": {
2520
+ "additionalProperties": false,
2521
+ "description": "表格行数和重复值限制。",
2522
+ "properties": {
2523
+ "defaultValues": {
2524
+ "oneOf": [
2525
+ {
2526
+ "type": "null"
2527
+ },
2528
+ {
2529
+ "$ref": "#/$defs/DefaultValues"
2530
+ }
2531
+ ]
2532
+ },
2533
+ "tableNoRepeatQuestion": {
2534
+ "items": {
2535
+ "$ref": "#/$defs/FieldSelector"
2536
+ },
2537
+ "type": "array"
2538
+ },
2539
+ "tableNoRepeatStatus": {
2540
+ "type": [
2541
+ "boolean",
2542
+ "null"
2543
+ ]
2544
+ },
2545
+ "tableRowHeight": {
2546
+ "minLength": 1,
2547
+ "type": [
2548
+ "string",
2549
+ "null"
2550
+ ]
2551
+ },
2552
+ "tableRowsLimit": {
2553
+ "minimum": 1,
2554
+ "type": [
2555
+ "integer",
2556
+ "null"
2557
+ ]
2558
+ }
2559
+ },
2560
+ "type": "object"
2561
+ },
2562
+ "TextConfig": {
2563
+ "additionalProperties": false,
2564
+ "description": "文字类字段的长度限制;省略表示保留当前值。",
2565
+ "properties": {
2566
+ "canScan": {
2567
+ "description": "是否允许扫码输入。",
2568
+ "type": [
2569
+ "boolean",
2570
+ "null"
2571
+ ]
2572
+ },
2573
+ "maxWordCount": {
2574
+ "description": "最多字数;null 表示清除限制。",
2575
+ "minimum": 0,
2576
+ "type": [
2577
+ "integer",
2578
+ "null"
2579
+ ]
2580
+ },
2581
+ "minWordCount": {
2582
+ "description": "最少字数;null 表示清除限制。",
2583
+ "minimum": 0,
2584
+ "type": [
2585
+ "integer",
2586
+ "null"
2587
+ ]
2588
+ },
2589
+ "noRepeat": {
2590
+ "description": "是否禁止重复值。",
2591
+ "type": [
2592
+ "boolean",
2593
+ "null"
2594
+ ]
2595
+ },
2596
+ "scanType": {
2597
+ "description": "扫码类型 ID。",
2598
+ "minimum": 0,
2599
+ "type": [
2600
+ "integer",
2601
+ "null"
2602
+ ]
2603
+ }
2604
+ },
2605
+ "type": "object"
2606
+ },
2607
+ "TopField": {
2608
+ "allOf": [
2609
+ {
2610
+ "$ref": "#/$defs/FieldCommon"
2611
+ },
2612
+ {
2613
+ "oneOf": [
2614
+ {
2615
+ "properties": {
2616
+ "config": {
2617
+ "$ref": "#/$defs/EmptyConfig"
2618
+ },
2619
+ "type": {
2620
+ "enum": [
2621
+ "date",
2622
+ "datetime"
2623
+ ]
2624
+ }
2625
+ },
2626
+ "required": [
2627
+ "type"
2628
+ ]
2629
+ },
2630
+ {
2631
+ "properties": {
2632
+ "config": {
2633
+ "$ref": "#/$defs/TextConfig"
2634
+ },
2635
+ "type": {
2636
+ "enum": [
2637
+ "text",
2638
+ "long_text",
2639
+ "link",
2640
+ "email"
2641
+ ]
2642
+ }
2643
+ },
2644
+ "required": [
2645
+ "type"
2646
+ ]
2647
+ },
2648
+ {
2649
+ "properties": {
2650
+ "config": {
2651
+ "$ref": "#/$defs/PhoneConfig"
2652
+ },
2653
+ "type": {
2654
+ "const": "phone"
2655
+ }
2656
+ },
2657
+ "required": [
2658
+ "type"
2659
+ ]
2660
+ },
2661
+ {
2662
+ "properties": {
2663
+ "config": {
2664
+ "$ref": "#/$defs/NumberConfig"
2665
+ },
2666
+ "type": {
2667
+ "enum": [
2668
+ "number",
2669
+ "amount"
2670
+ ]
2671
+ }
2672
+ },
2673
+ "required": [
2674
+ "type"
2675
+ ]
2676
+ },
2677
+ {
2678
+ "properties": {
2679
+ "config": {
2680
+ "$ref": "#/$defs/MemberConfig"
2681
+ },
2682
+ "type": {
2683
+ "const": "member"
2684
+ }
2685
+ },
2686
+ "required": [
2687
+ "type"
2688
+ ]
2689
+ },
2690
+ {
2691
+ "properties": {
2692
+ "config": {
2693
+ "$ref": "#/$defs/AddressConfig"
2694
+ },
2695
+ "type": {
2696
+ "const": "address"
2697
+ }
2698
+ },
2699
+ "required": [
2700
+ "type"
2701
+ ]
2702
+ },
2703
+ {
2704
+ "properties": {
2705
+ "config": {
2706
+ "$ref": "#/$defs/AttachmentConfig"
2707
+ },
2708
+ "dataCover": {
2709
+ "type": "boolean"
2710
+ },
2711
+ "type": {
2712
+ "const": "attachment"
2713
+ }
2714
+ },
2715
+ "required": [
2716
+ "type"
2717
+ ]
2718
+ },
2719
+ {
2720
+ "properties": {
2721
+ "config": {
2722
+ "$ref": "#/$defs/ChoiceConfig"
2723
+ },
2724
+ "type": {
2725
+ "enum": [
2726
+ "single_choice",
2727
+ "single_select",
2728
+ "multi_select"
2729
+ ]
2730
+ }
2731
+ },
2732
+ "required": [
2733
+ "type",
2734
+ "config"
2735
+ ]
2736
+ },
2737
+ {
2738
+ "properties": {
2739
+ "config": {
2740
+ "$ref": "#/$defs/DepartmentConfig"
2741
+ },
2742
+ "type": {
2743
+ "const": "department"
2744
+ }
2745
+ },
2746
+ "required": [
2747
+ "type",
2748
+ "config"
2749
+ ]
2750
+ },
2751
+ {
2752
+ "properties": {
2753
+ "config": {
2754
+ "$ref": "#/$defs/RelationConfig"
2755
+ },
2756
+ "type": {
2757
+ "const": "relation"
2758
+ }
2759
+ },
2760
+ "required": [
2761
+ "type",
2762
+ "config"
2763
+ ]
2764
+ },
2765
+ {
2766
+ "properties": {
2767
+ "config": {
2768
+ "$ref": "#/$defs/QLinkerConfig"
2769
+ },
2770
+ "type": {
2771
+ "const": "q_linker"
2772
+ }
2773
+ },
2774
+ "required": [
2775
+ "type",
2776
+ "config"
2777
+ ]
2778
+ },
2779
+ {
2780
+ "properties": {
2781
+ "config": {
2782
+ "$ref": "#/$defs/CodeBlockConfig"
2783
+ },
2784
+ "type": {
2785
+ "const": "code_block"
2786
+ }
2787
+ },
2788
+ "required": [
2789
+ "type",
2790
+ "config"
2791
+ ]
2792
+ },
2793
+ {
2794
+ "properties": {
2795
+ "config": {
2796
+ "$ref": "#/$defs/DataRelationConfig"
2797
+ },
2798
+ "type": {
2799
+ "const": "data_relation"
2800
+ }
2801
+ },
2802
+ "required": [
2803
+ "type",
2804
+ "config"
2805
+ ]
2806
+ },
2807
+ {
2808
+ "properties": {
2809
+ "config": {
2810
+ "$ref": "#/$defs/SubtableConfig"
2811
+ },
2812
+ "subfields": {
2813
+ "items": {
2814
+ "$ref": "#/$defs/SubField"
2815
+ },
2816
+ "minItems": 1,
2817
+ "type": "array"
2818
+ },
2819
+ "type": {
2820
+ "const": "subtable"
2821
+ }
2822
+ },
2823
+ "required": [
2824
+ "type",
2825
+ "subfields"
2826
+ ]
2827
+ }
2828
+ ]
2829
+ }
2830
+ ],
2831
+ "description": "顶层业务字段;type 决定 config 或 subfields 的结构。",
2832
+ "type": "object",
2833
+ "unevaluatedProperties": false
2834
+ }
2835
+ },
2836
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1.json",
2837
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2838
+ "oneOf": [
2839
+ {
2840
+ "properties": {
2841
+ "spec": {
2842
+ "not": {
2843
+ "anyOf": [
2844
+ {
2845
+ "required": [
2846
+ "icon"
2847
+ ]
2848
+ },
2849
+ {
2850
+ "required": [
2851
+ "color"
2852
+ ]
2853
+ }
2854
+ ]
2855
+ }
2856
+ }
2857
+ },
2858
+ "required": [
2859
+ "appKey"
2860
+ ]
2861
+ },
2862
+ {
2863
+ "not": {
2864
+ "required": [
2865
+ "appKey"
2866
+ ]
2867
+ },
2868
+ "properties": {
2869
+ "spec": {
2870
+ "required": [
2871
+ "appName",
2872
+ "icon",
2873
+ "color"
2874
+ ]
2875
+ }
2876
+ },
2877
+ "required": [
2878
+ "packageId"
2879
+ ]
2880
+ }
2881
+ ],
2882
+ "properties": {
2883
+ "apiVersion": {
2884
+ "const": "builder.qingflow.com/v1alpha1",
2885
+ "description": "AppForm 契约版本;一期固定为 v1alpha1。"
2886
+ },
2887
+ "appKey": {
2888
+ "description": "更新已有应用的唯一标识;存在非空值即进入更新模式。",
2889
+ "minLength": 1,
2890
+ "type": "string"
2891
+ },
2892
+ "packageId": {
2893
+ "description": "创建时指定新应用所属包;更新时确保该包引用应用,不移除其他包引用。",
2894
+ "minimum": 1,
2895
+ "type": "integer"
2896
+ },
2897
+ "spec": {
2898
+ "$ref": "#/$defs/AppFormSpec",
2899
+ "description": "应用表单的最终声明状态。"
2900
+ }
2901
+ },
2902
+ "required": [
2903
+ "apiVersion",
2904
+ "spec"
2905
+ ],
2906
+ "title": "Qingflow AppFormApply v1alpha1",
2907
+ "type": "object",
2908
+ "unevaluatedProperties": false
2909
+ }