@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,1831 @@
1
+ {
2
+ "$defs": {
3
+ "AliasSelector": {
4
+ "additionalProperties": false,
5
+ "description": "Q-Linker 或代码块输出别名;已有输出优先携带 aliasId。",
6
+ "properties": {
7
+ "aliasId": {
8
+ "description": "后端生成的别名 ID;新增输出时可省略。",
9
+ "minimum": 1,
10
+ "type": "integer"
11
+ },
12
+ "name": {
13
+ "description": "输出别名名称。",
14
+ "minLength": 1,
15
+ "type": "string"
16
+ }
17
+ },
18
+ "required": [
19
+ "name"
20
+ ],
21
+ "type": "object"
22
+ },
23
+ "AnswerValue": {
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "dataValue": {
27
+ "type": [
28
+ "string",
29
+ "null"
30
+ ]
31
+ },
32
+ "email": {
33
+ "type": [
34
+ "string",
35
+ "null"
36
+ ]
37
+ },
38
+ "id": {
39
+ "type": [
40
+ "integer",
41
+ "null"
42
+ ]
43
+ },
44
+ "optionId": {
45
+ "type": [
46
+ "string",
47
+ "null"
48
+ ]
49
+ },
50
+ "ordinal": {
51
+ "type": [
52
+ "integer",
53
+ "null"
54
+ ]
55
+ },
56
+ "otherInfo": {
57
+ "type": [
58
+ "string",
59
+ "null"
60
+ ]
61
+ },
62
+ "pluginValue": {
63
+ "type": [
64
+ "string",
65
+ "null"
66
+ ]
67
+ },
68
+ "queId": {
69
+ "type": [
70
+ "integer",
71
+ "null"
72
+ ]
73
+ },
74
+ "value": {
75
+ "type": [
76
+ "string",
77
+ "null"
78
+ ]
79
+ },
80
+ "valueStr": {
81
+ "type": [
82
+ "string",
83
+ "null"
84
+ ]
85
+ }
86
+ },
87
+ "type": "object"
88
+ },
89
+ "AttachmentConfig": {
90
+ "additionalProperties": false,
91
+ "description": "附件字段上传限制。",
92
+ "properties": {
93
+ "canScan": {
94
+ "type": [
95
+ "boolean",
96
+ "null"
97
+ ]
98
+ },
99
+ "defaultValues": {
100
+ "oneOf": [
101
+ {
102
+ "type": "null"
103
+ },
104
+ {
105
+ "$ref": "#/$defs/DefaultValues"
106
+ }
107
+ ]
108
+ },
109
+ "fileBeingCaptureOnly": {
110
+ "minimum": 0,
111
+ "type": [
112
+ "integer",
113
+ "null"
114
+ ]
115
+ },
116
+ "fileSize": {
117
+ "minimum": 1,
118
+ "type": [
119
+ "integer",
120
+ "null"
121
+ ]
122
+ },
123
+ "fileType": {
124
+ "items": {
125
+ "minLength": 1,
126
+ "type": "string"
127
+ },
128
+ "type": "array"
129
+ },
130
+ "imageCompress": {
131
+ "type": [
132
+ "boolean",
133
+ "null"
134
+ ]
135
+ },
136
+ "maxFileLimit": {
137
+ "minimum": 1,
138
+ "type": [
139
+ "integer",
140
+ "null"
141
+ ]
142
+ },
143
+ "maxFileLimitStatus": {
144
+ "type": [
145
+ "boolean",
146
+ "null"
147
+ ]
148
+ },
149
+ "pluginStatus": {
150
+ "type": [
151
+ "boolean",
152
+ "null"
153
+ ]
154
+ },
155
+ "scanType": {
156
+ "minimum": 0,
157
+ "type": [
158
+ "integer",
159
+ "null"
160
+ ]
161
+ }
162
+ },
163
+ "type": "object"
164
+ },
165
+ "ChoiceConfig": {
166
+ "additionalProperties": false,
167
+ "description": "选择类字段配置。",
168
+ "properties": {
169
+ "beingShowColor": {
170
+ "description": "是否展示选项颜色。",
171
+ "type": [
172
+ "boolean",
173
+ "null"
174
+ ]
175
+ },
176
+ "defaultOptions": {
177
+ "description": "选项默认选中状态;值必须来自 options,省略表示保留现有状态。",
178
+ "items": {
179
+ "minLength": 1,
180
+ "type": "string"
181
+ },
182
+ "type": "array",
183
+ "uniqueItems": true
184
+ },
185
+ "maxOpts": {
186
+ "description": "最多选择项数;null 表示不限制。",
187
+ "minimum": 0,
188
+ "type": [
189
+ "integer",
190
+ "null"
191
+ ]
192
+ },
193
+ "minOpts": {
194
+ "description": "最少选择项数;null 表示不限制。",
195
+ "minimum": 0,
196
+ "type": [
197
+ "integer",
198
+ "null"
199
+ ]
200
+ },
201
+ "optDirection": {
202
+ "description": "选项排列方向 ID。",
203
+ "minimum": 0,
204
+ "type": [
205
+ "integer",
206
+ "null"
207
+ ]
208
+ },
209
+ "optSelectMode": {
210
+ "description": "多项选择模式 ID。",
211
+ "minimum": 0,
212
+ "type": [
213
+ "integer",
214
+ "null"
215
+ ]
216
+ },
217
+ "options": {
218
+ "description": "非空有序选项文案;缺失选项表示从该字段配置中删除。",
219
+ "items": {
220
+ "minLength": 1,
221
+ "type": "string"
222
+ },
223
+ "minItems": 1,
224
+ "type": "array",
225
+ "uniqueItems": true
226
+ }
227
+ },
228
+ "required": [
229
+ "options"
230
+ ],
231
+ "type": "object"
232
+ },
233
+ "DataRelationCondition": {
234
+ "additionalProperties": false,
235
+ "description": "一条数据关联过滤条件。",
236
+ "properties": {
237
+ "operand": {
238
+ "$ref": "#/$defs/DataRelationOperand",
239
+ "description": "比较值来源;可为字面量、当前表单字段或输出别名。"
240
+ },
241
+ "operator": {
242
+ "description": "比较运算符;Reconciler 会结合字段类型校验可用性。",
243
+ "enum": [
244
+ "equal",
245
+ "not_equal",
246
+ "contains",
247
+ "not_contains",
248
+ "greater_than",
249
+ "greater_or_equal",
250
+ "less_than",
251
+ "less_or_equal",
252
+ "dynamic_range",
253
+ "equal_any",
254
+ "not_equal_any",
255
+ "is_empty",
256
+ "is_not_empty",
257
+ "belongs_to",
258
+ "not_belongs_to",
259
+ "subordinate_to",
260
+ "not_subordinate_to",
261
+ "subordinate_included",
262
+ "subordinate_not_included",
263
+ "fuzzy_match",
264
+ "contains_any",
265
+ "contains_all",
266
+ "decimal_range"
267
+ ]
268
+ },
269
+ "sourceField": {
270
+ "$ref": "#/$defs/FieldSelector",
271
+ "description": "被过滤的数据源字段。"
272
+ }
273
+ },
274
+ "required": [
275
+ "sourceField",
276
+ "operator",
277
+ "operand"
278
+ ],
279
+ "type": "object"
280
+ },
281
+ "DataRelationConfig": {
282
+ "additionalProperties": false,
283
+ "description": "数据关联字段配置;从应用、Q-Linker 或代码块输出中读取数据。",
284
+ "properties": {
285
+ "aggregation": {
286
+ "description": "可选聚合方式;null 表示不聚合。",
287
+ "enum": [
288
+ "sum",
289
+ "average",
290
+ "max",
291
+ "min",
292
+ "first",
293
+ "last",
294
+ "filled_count",
295
+ "empty_count",
296
+ "count",
297
+ null
298
+ ],
299
+ "type": [
300
+ "string",
301
+ "null"
302
+ ]
303
+ },
304
+ "customButton": {
305
+ "$ref": "#/$defs/DataRelationCustomButton",
306
+ "description": "可选自定义按钮配置。"
307
+ },
308
+ "filters": {
309
+ "$ref": "#/$defs/DataRelationFilters",
310
+ "description": "可选过滤条件;支持简单条件组或高级公式。"
311
+ },
312
+ "sort": {
313
+ "$ref": "#/$defs/DataRelationSort",
314
+ "description": "可选排序配置。"
315
+ },
316
+ "source": {
317
+ "$ref": "#/$defs/DataRelationSource",
318
+ "description": "数据来源;按 kind 选择一种来源结构。"
319
+ }
320
+ },
321
+ "required": [
322
+ "source"
323
+ ],
324
+ "type": "object"
325
+ },
326
+ "DataRelationCustomButton": {
327
+ "description": "数据关联自定义按钮;启用时必须引用已有 buttonId。",
328
+ "oneOf": [
329
+ {
330
+ "additionalProperties": false,
331
+ "properties": {
332
+ "enabled": {
333
+ "const": false
334
+ }
335
+ },
336
+ "required": [
337
+ "enabled"
338
+ ],
339
+ "type": "object"
340
+ },
341
+ {
342
+ "additionalProperties": false,
343
+ "properties": {
344
+ "buttonId": {
345
+ "minimum": 1,
346
+ "type": "integer"
347
+ },
348
+ "enabled": {
349
+ "const": true
350
+ }
351
+ },
352
+ "required": [
353
+ "enabled",
354
+ "buttonId"
355
+ ],
356
+ "type": "object"
357
+ }
358
+ ]
359
+ },
360
+ "DataRelationFilters": {
361
+ "description": "simple 模式的外层组为 OR、组内条件为 AND;advanced 模式使用完整公式。",
362
+ "oneOf": [
363
+ {
364
+ "additionalProperties": false,
365
+ "properties": {
366
+ "groups": {
367
+ "description": "OR 条件组数组;每个内层数组是一组 AND 条件。",
368
+ "items": {
369
+ "items": {
370
+ "$ref": "#/$defs/DataRelationCondition"
371
+ },
372
+ "minItems": 1,
373
+ "type": "array"
374
+ },
375
+ "type": "array"
376
+ },
377
+ "mode": {
378
+ "const": "simple"
379
+ }
380
+ },
381
+ "required": [
382
+ "mode",
383
+ "groups"
384
+ ],
385
+ "type": "object"
386
+ },
387
+ {
388
+ "additionalProperties": false,
389
+ "properties": {
390
+ "formula": {
391
+ "description": "解码后的高级筛选公式。",
392
+ "minLength": 1,
393
+ "type": "string"
394
+ },
395
+ "mode": {
396
+ "const": "advanced"
397
+ }
398
+ },
399
+ "required": [
400
+ "mode",
401
+ "formula"
402
+ ],
403
+ "type": "object"
404
+ }
405
+ ]
406
+ },
407
+ "DataRelationOperand": {
408
+ "description": "数据关联条件右值的判别联合。",
409
+ "oneOf": [
410
+ {
411
+ "additionalProperties": false,
412
+ "properties": {
413
+ "kind": {
414
+ "const": "literal"
415
+ },
416
+ "values": {
417
+ "description": "字面量值列表。",
418
+ "items": {
419
+ "$ref": "#/$defs/JsonValue"
420
+ },
421
+ "type": "array"
422
+ }
423
+ },
424
+ "required": [
425
+ "kind",
426
+ "values"
427
+ ],
428
+ "type": "object"
429
+ },
430
+ {
431
+ "additionalProperties": false,
432
+ "properties": {
433
+ "field": {
434
+ "$ref": "#/$defs/FieldSelector"
435
+ },
436
+ "kind": {
437
+ "const": "current_field"
438
+ }
439
+ },
440
+ "required": [
441
+ "kind",
442
+ "field"
443
+ ],
444
+ "type": "object"
445
+ },
446
+ {
447
+ "additionalProperties": false,
448
+ "properties": {
449
+ "alias": {
450
+ "$ref": "#/$defs/AliasSelector"
451
+ },
452
+ "kind": {
453
+ "const": "alias"
454
+ },
455
+ "producer": {
456
+ "$ref": "#/$defs/FieldSelector"
457
+ }
458
+ },
459
+ "required": [
460
+ "kind",
461
+ "producer",
462
+ "alias"
463
+ ],
464
+ "type": "object"
465
+ }
466
+ ]
467
+ },
468
+ "DataRelationSort": {
469
+ "description": "数据关联排序开关;启用时必须指定排序来源和方向。",
470
+ "oneOf": [
471
+ {
472
+ "additionalProperties": false,
473
+ "properties": {
474
+ "enabled": {
475
+ "const": false
476
+ }
477
+ },
478
+ "required": [
479
+ "enabled"
480
+ ],
481
+ "type": "object"
482
+ },
483
+ {
484
+ "additionalProperties": false,
485
+ "properties": {
486
+ "by": {
487
+ "$ref": "#/$defs/DataRelationSortBy"
488
+ },
489
+ "direction": {
490
+ "enum": [
491
+ "asc",
492
+ "desc"
493
+ ]
494
+ },
495
+ "enabled": {
496
+ "const": true
497
+ }
498
+ },
499
+ "required": [
500
+ "enabled",
501
+ "by",
502
+ "direction"
503
+ ],
504
+ "type": "object"
505
+ }
506
+ ]
507
+ },
508
+ "DataRelationSortBy": {
509
+ "description": "排序值来源;可为来源字段或输出别名。",
510
+ "oneOf": [
511
+ {
512
+ "additionalProperties": false,
513
+ "properties": {
514
+ "field": {
515
+ "$ref": "#/$defs/FieldSelector"
516
+ },
517
+ "kind": {
518
+ "const": "field"
519
+ }
520
+ },
521
+ "required": [
522
+ "kind",
523
+ "field"
524
+ ],
525
+ "type": "object"
526
+ },
527
+ {
528
+ "additionalProperties": false,
529
+ "properties": {
530
+ "alias": {
531
+ "$ref": "#/$defs/AliasSelector"
532
+ },
533
+ "kind": {
534
+ "const": "alias"
535
+ },
536
+ "producer": {
537
+ "$ref": "#/$defs/FieldSelector"
538
+ }
539
+ },
540
+ "required": [
541
+ "kind",
542
+ "producer",
543
+ "alias"
544
+ ],
545
+ "type": "object"
546
+ }
547
+ ]
548
+ },
549
+ "DataRelationSource": {
550
+ "description": "数据关联来源判别联合;kind 决定其余必填字段。",
551
+ "oneOf": [
552
+ {
553
+ "additionalProperties": false,
554
+ "properties": {
555
+ "appKey": {
556
+ "description": "来源应用的 appKey。",
557
+ "minLength": 1,
558
+ "type": "string"
559
+ },
560
+ "field": {
561
+ "$ref": "#/$defs/FieldSelector",
562
+ "description": "来源应用中的结果字段。"
563
+ },
564
+ "kind": {
565
+ "const": "app"
566
+ }
567
+ },
568
+ "required": [
569
+ "kind",
570
+ "appKey",
571
+ "field"
572
+ ],
573
+ "type": "object"
574
+ },
575
+ {
576
+ "additionalProperties": false,
577
+ "properties": {
578
+ "alias": {
579
+ "$ref": "#/$defs/AliasSelector",
580
+ "description": "Q-Linker 输出别名。"
581
+ },
582
+ "kind": {
583
+ "const": "q_linker"
584
+ },
585
+ "producer": {
586
+ "$ref": "#/$defs/FieldSelector",
587
+ "description": "当前应用中的 Q-Linker 字段。"
588
+ }
589
+ },
590
+ "required": [
591
+ "kind",
592
+ "producer",
593
+ "alias"
594
+ ],
595
+ "type": "object"
596
+ },
597
+ {
598
+ "additionalProperties": false,
599
+ "properties": {
600
+ "alias": {
601
+ "$ref": "#/$defs/AliasSelector",
602
+ "description": "代码块输出别名。"
603
+ },
604
+ "kind": {
605
+ "const": "code_block"
606
+ },
607
+ "producer": {
608
+ "$ref": "#/$defs/FieldSelector",
609
+ "description": "当前应用中的代码块字段。"
610
+ }
611
+ },
612
+ "required": [
613
+ "kind",
614
+ "producer",
615
+ "alias"
616
+ ],
617
+ "type": "object"
618
+ }
619
+ ]
620
+ },
621
+ "DefaultValues": {
622
+ "additionalProperties": false,
623
+ "properties": {
624
+ "associatedQueType": {
625
+ "type": [
626
+ "integer",
627
+ "null"
628
+ ]
629
+ },
630
+ "beingCanDecrypted": {
631
+ "type": [
632
+ "boolean",
633
+ "null"
634
+ ]
635
+ },
636
+ "beingDesensitized": {
637
+ "type": [
638
+ "boolean",
639
+ "null"
640
+ ]
641
+ },
642
+ "canDecimal": {
643
+ "type": [
644
+ "boolean",
645
+ "null"
646
+ ]
647
+ },
648
+ "currencyStatus": {
649
+ "type": [
650
+ "boolean",
651
+ "null"
652
+ ]
653
+ },
654
+ "currencyType": {
655
+ "type": [
656
+ "integer",
657
+ "null"
658
+ ]
659
+ },
660
+ "dateType": {
661
+ "type": [
662
+ "integer",
663
+ "null"
664
+ ]
665
+ },
666
+ "decimalDigit": {
667
+ "type": [
668
+ "integer",
669
+ "null"
670
+ ]
671
+ },
672
+ "numberFormat": {
673
+ "type": [
674
+ "integer",
675
+ "null"
676
+ ]
677
+ },
678
+ "queId": {
679
+ "type": [
680
+ "integer",
681
+ "null"
682
+ ]
683
+ },
684
+ "queTitle": {
685
+ "type": [
686
+ "string",
687
+ "null"
688
+ ]
689
+ },
690
+ "queType": {
691
+ "type": [
692
+ "integer",
693
+ "null"
694
+ ]
695
+ },
696
+ "referValues": {
697
+ "items": {
698
+ "$ref": "#/$defs/ReferenceDefaultValue"
699
+ },
700
+ "type": "array"
701
+ },
702
+ "rowId": {
703
+ "type": [
704
+ "integer",
705
+ "null"
706
+ ]
707
+ },
708
+ "sourceValue": {
709
+ "type": [
710
+ "string",
711
+ "null"
712
+ ]
713
+ },
714
+ "tableValues": {
715
+ "items": {
716
+ "items": {
717
+ "$ref": "#/$defs/DefaultValues"
718
+ },
719
+ "type": "array"
720
+ },
721
+ "type": "array"
722
+ },
723
+ "values": {
724
+ "items": {
725
+ "$ref": "#/$defs/AnswerValue"
726
+ },
727
+ "type": "array"
728
+ }
729
+ },
730
+ "required": [
731
+ "values"
732
+ ],
733
+ "type": "object"
734
+ },
735
+ "DepartmentConfig": {
736
+ "additionalProperties": false,
737
+ "description": "部门字段的可选范围配置。",
738
+ "properties": {
739
+ "beingShowParentPath": {
740
+ "type": [
741
+ "boolean",
742
+ "null"
743
+ ]
744
+ },
745
+ "canScan": {
746
+ "type": [
747
+ "boolean",
748
+ "null"
749
+ ]
750
+ },
751
+ "defaultDepartments": {
752
+ "$ref": "#/$defs/DepartmentScope"
753
+ },
754
+ "departmentScope": {
755
+ "$ref": "#/$defs/DepartmentScope"
756
+ },
757
+ "departmentScopeRelation": {
758
+ "$ref": "#/$defs/SelectScopeRelation"
759
+ },
760
+ "noRepeat": {
761
+ "type": [
762
+ "boolean",
763
+ "null"
764
+ ]
765
+ },
766
+ "scanType": {
767
+ "minimum": 0,
768
+ "type": [
769
+ "integer",
770
+ "null"
771
+ ]
772
+ }
773
+ },
774
+ "required": [
775
+ "departmentScope"
776
+ ],
777
+ "type": "object"
778
+ },
779
+ "DepartmentScope": {
780
+ "description": "all 表示全部部门;custom 表示仅允许指定部门。",
781
+ "oneOf": [
782
+ {
783
+ "additionalProperties": false,
784
+ "properties": {
785
+ "includeSubDeparts": {
786
+ "description": "是否包含所选部门的下级部门。",
787
+ "type": "boolean"
788
+ },
789
+ "mode": {
790
+ "const": "all"
791
+ }
792
+ },
793
+ "required": [
794
+ "mode"
795
+ ],
796
+ "type": "object"
797
+ },
798
+ {
799
+ "additionalProperties": false,
800
+ "properties": {
801
+ "departments": {
802
+ "description": "custom 模式允许选择的部门列表。",
803
+ "items": {
804
+ "$ref": "#/$defs/DepartmentSelector"
805
+ },
806
+ "minItems": 1,
807
+ "type": "array"
808
+ },
809
+ "includeSubDeparts": {
810
+ "description": "是否包含指定部门的下级部门。",
811
+ "type": "boolean"
812
+ },
813
+ "mode": {
814
+ "const": "custom"
815
+ }
816
+ },
817
+ "required": [
818
+ "mode",
819
+ "departments"
820
+ ],
821
+ "type": "object"
822
+ },
823
+ {
824
+ "additionalProperties": false,
825
+ "properties": {
826
+ "includeSubDeparts": {
827
+ "type": "boolean"
828
+ },
829
+ "mode": {
830
+ "const": "relation"
831
+ }
832
+ },
833
+ "required": [
834
+ "mode"
835
+ ],
836
+ "type": "object"
837
+ }
838
+ ]
839
+ },
840
+ "DepartmentSelector": {
841
+ "additionalProperties": false,
842
+ "description": "部门身份;deptId 必填,deptName 仅用于展示。",
843
+ "properties": {
844
+ "deptId": {
845
+ "minimum": 1,
846
+ "type": "integer"
847
+ },
848
+ "deptName": {
849
+ "minLength": 1,
850
+ "type": "string"
851
+ }
852
+ },
853
+ "required": [
854
+ "deptId"
855
+ ],
856
+ "type": "object"
857
+ },
858
+ "DynamicMemberSelector": {
859
+ "additionalProperties": false,
860
+ "properties": {
861
+ "queId": {
862
+ "type": "integer"
863
+ },
864
+ "queTitle": {
865
+ "type": "string"
866
+ },
867
+ "type": {
868
+ "minimum": 1,
869
+ "type": "integer"
870
+ }
871
+ },
872
+ "required": [
873
+ "type"
874
+ ],
875
+ "type": "object"
876
+ },
877
+ "EmptyConfig": {
878
+ "additionalProperties": false,
879
+ "description": "该字段类型没有特殊配置。",
880
+ "type": "object"
881
+ },
882
+ "ExternalDepartmentSelector": {
883
+ "additionalProperties": false,
884
+ "properties": {
885
+ "deptId": {
886
+ "minimum": 1,
887
+ "type": "integer"
888
+ },
889
+ "deptName": {
890
+ "type": "string"
891
+ }
892
+ },
893
+ "required": [
894
+ "deptId"
895
+ ],
896
+ "type": "object"
897
+ },
898
+ "ExternalMemberSelector": {
899
+ "additionalProperties": false,
900
+ "properties": {
901
+ "email": {
902
+ "type": "string"
903
+ },
904
+ "nickName": {
905
+ "type": "string"
906
+ },
907
+ "uid": {
908
+ "minimum": 1,
909
+ "type": "integer"
910
+ }
911
+ },
912
+ "required": [
913
+ "uid"
914
+ ],
915
+ "type": "object"
916
+ },
917
+ "FieldCommon": {
918
+ "description": "顶层业务字段的公共属性;字段类型由 TopField 的判别分支定义。",
919
+ "properties": {
920
+ "dataTitle": {
921
+ "description": "是否作为数据标题;整个 body 最多且必须按规则存在一个。",
922
+ "type": "boolean"
923
+ },
924
+ "defaultType": {
925
+ "default": 1,
926
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
927
+ "enum": [
928
+ 1,
929
+ 2,
930
+ 3
931
+ ],
932
+ "type": "integer"
933
+ },
934
+ "defaultValue": {
935
+ "$ref": "#/$defs/ScalarDefaultValue",
936
+ "description": "普通字段的标量默认值;表格、地址、附件、引用等结构化默认值必须放在具体字段 config.defaultValues。显式 null 表示清除默认值。"
937
+ },
938
+ "description": {
939
+ "description": "字段说明;null 或空字符串表示清空。",
940
+ "type": [
941
+ "string",
942
+ "null"
943
+ ]
944
+ },
945
+ "name": {
946
+ "description": "字段展示名称;同一父级内唯一,不单独作为字段身份。",
947
+ "minLength": 1,
948
+ "type": "string"
949
+ },
950
+ "queId": {
951
+ "description": "已有字段的后端 ID;get 返回,新增字段省略。",
952
+ "minimum": 1,
953
+ "type": "integer"
954
+ },
955
+ "required": {
956
+ "description": "是否必填;缺失时保留已有字段当前值。",
957
+ "type": "boolean"
958
+ },
959
+ "width": {
960
+ "description": "字段在所在行的宽度百分比;同一行要么全部提供且合计 100,要么全部省略。",
961
+ "maximum": 100,
962
+ "minimum": 1,
963
+ "type": "integer"
964
+ }
965
+ },
966
+ "required": [
967
+ "name"
968
+ ],
969
+ "type": "object"
970
+ },
971
+ "FieldSelector": {
972
+ "additionalProperties": false,
973
+ "anyOf": [
974
+ {
975
+ "required": [
976
+ "queId"
977
+ ]
978
+ },
979
+ {
980
+ "required": [
981
+ "name"
982
+ ]
983
+ }
984
+ ],
985
+ "description": "跨字段引用选择器;至少提供 queId 或 name,两者同时提供时必须指向同一字段。",
986
+ "properties": {
987
+ "name": {
988
+ "description": "字段名称;仅在当前作用域内唯一时可用于解析。",
989
+ "minLength": 1,
990
+ "type": "string"
991
+ },
992
+ "queId": {
993
+ "description": "已有字段的后端 ID;优先用于精确解析。",
994
+ "minimum": 1,
995
+ "type": "integer"
996
+ }
997
+ },
998
+ "type": "object"
999
+ },
1000
+ "JsonValue": {
1001
+ "description": "数据关联字面量支持的任意 JSON 值。",
1002
+ "oneOf": [
1003
+ {
1004
+ "type": "null"
1005
+ },
1006
+ {
1007
+ "type": "boolean"
1008
+ },
1009
+ {
1010
+ "type": "number"
1011
+ },
1012
+ {
1013
+ "type": "string"
1014
+ },
1015
+ {
1016
+ "items": {
1017
+ "$ref": "#/$defs/JsonValue"
1018
+ },
1019
+ "type": "array"
1020
+ },
1021
+ {
1022
+ "additionalProperties": {
1023
+ "$ref": "#/$defs/JsonValue"
1024
+ },
1025
+ "type": "object"
1026
+ }
1027
+ ]
1028
+ },
1029
+ "MemberConfig": {
1030
+ "additionalProperties": false,
1031
+ "description": "成员字段的选择范围和默认成员。",
1032
+ "properties": {
1033
+ "canScan": {
1034
+ "type": [
1035
+ "boolean",
1036
+ "null"
1037
+ ]
1038
+ },
1039
+ "defaultMembers": {
1040
+ "$ref": "#/$defs/MemberScope"
1041
+ },
1042
+ "memberScope": {
1043
+ "$ref": "#/$defs/MemberScope"
1044
+ },
1045
+ "memberScopeRelation": {
1046
+ "$ref": "#/$defs/SelectScopeRelation"
1047
+ },
1048
+ "noRepeat": {
1049
+ "type": [
1050
+ "boolean",
1051
+ "null"
1052
+ ]
1053
+ },
1054
+ "scanType": {
1055
+ "minimum": 0,
1056
+ "type": [
1057
+ "integer",
1058
+ "null"
1059
+ ]
1060
+ }
1061
+ },
1062
+ "type": "object"
1063
+ },
1064
+ "MemberScope": {
1065
+ "description": "成员字段可选范围;all 为工作区全部成员,custom 为显式成员/部门/角色或动态成员,relation 为按字段关联。",
1066
+ "oneOf": [
1067
+ {
1068
+ "additionalProperties": false,
1069
+ "properties": {
1070
+ "includeSubDeparts": {
1071
+ "type": "boolean"
1072
+ },
1073
+ "mode": {
1074
+ "const": "all"
1075
+ }
1076
+ },
1077
+ "required": [
1078
+ "mode"
1079
+ ],
1080
+ "type": "object"
1081
+ },
1082
+ {
1083
+ "additionalProperties": false,
1084
+ "properties": {
1085
+ "departments": {
1086
+ "items": {
1087
+ "$ref": "#/$defs/DepartmentSelector"
1088
+ },
1089
+ "type": "array"
1090
+ },
1091
+ "dynamic": {
1092
+ "items": {
1093
+ "$ref": "#/$defs/DynamicMemberSelector"
1094
+ },
1095
+ "type": "array"
1096
+ },
1097
+ "externalDepartments": {
1098
+ "items": {
1099
+ "$ref": "#/$defs/ExternalDepartmentSelector"
1100
+ },
1101
+ "type": "array"
1102
+ },
1103
+ "externalMembers": {
1104
+ "items": {
1105
+ "$ref": "#/$defs/ExternalMemberSelector"
1106
+ },
1107
+ "type": "array"
1108
+ },
1109
+ "includeSubDeparts": {
1110
+ "type": "boolean"
1111
+ },
1112
+ "members": {
1113
+ "items": {
1114
+ "$ref": "#/$defs/MemberSelector"
1115
+ },
1116
+ "type": "array"
1117
+ },
1118
+ "mode": {
1119
+ "const": "custom"
1120
+ },
1121
+ "roles": {
1122
+ "items": {
1123
+ "$ref": "#/$defs/RoleSelector"
1124
+ },
1125
+ "type": "array"
1126
+ }
1127
+ },
1128
+ "required": [
1129
+ "mode"
1130
+ ],
1131
+ "type": "object"
1132
+ },
1133
+ {
1134
+ "additionalProperties": false,
1135
+ "properties": {
1136
+ "departments": {
1137
+ "items": {
1138
+ "$ref": "#/$defs/DepartmentSelector"
1139
+ },
1140
+ "type": "array"
1141
+ },
1142
+ "dynamic": {
1143
+ "items": {
1144
+ "$ref": "#/$defs/DynamicMemberSelector"
1145
+ },
1146
+ "type": "array"
1147
+ },
1148
+ "externalDepartments": {
1149
+ "items": {
1150
+ "$ref": "#/$defs/ExternalDepartmentSelector"
1151
+ },
1152
+ "type": "array"
1153
+ },
1154
+ "externalMembers": {
1155
+ "items": {
1156
+ "$ref": "#/$defs/ExternalMemberSelector"
1157
+ },
1158
+ "type": "array"
1159
+ },
1160
+ "includeSubDeparts": {
1161
+ "type": "boolean"
1162
+ },
1163
+ "members": {
1164
+ "items": {
1165
+ "$ref": "#/$defs/MemberSelector"
1166
+ },
1167
+ "type": "array"
1168
+ },
1169
+ "mode": {
1170
+ "const": "relation"
1171
+ },
1172
+ "roles": {
1173
+ "items": {
1174
+ "$ref": "#/$defs/RoleSelector"
1175
+ },
1176
+ "type": "array"
1177
+ }
1178
+ },
1179
+ "required": [
1180
+ "mode"
1181
+ ],
1182
+ "type": "object"
1183
+ }
1184
+ ]
1185
+ },
1186
+ "MemberSelector": {
1187
+ "additionalProperties": false,
1188
+ "properties": {
1189
+ "nickName": {
1190
+ "minLength": 1,
1191
+ "type": "string"
1192
+ },
1193
+ "uid": {
1194
+ "minimum": 1,
1195
+ "type": "integer"
1196
+ }
1197
+ },
1198
+ "required": [
1199
+ "uid"
1200
+ ],
1201
+ "type": "object"
1202
+ },
1203
+ "NumberConfig": {
1204
+ "additionalProperties": false,
1205
+ "description": "数字和金额字段的数值、精度及显示格式。",
1206
+ "properties": {
1207
+ "canDecimal": {
1208
+ "description": "是否允许小数;普通数字字段可显式设置。",
1209
+ "type": [
1210
+ "boolean",
1211
+ "null"
1212
+ ]
1213
+ },
1214
+ "canScan": {
1215
+ "description": "是否允许扫码输入。",
1216
+ "type": [
1217
+ "boolean",
1218
+ "null"
1219
+ ]
1220
+ },
1221
+ "currencyStatus": {
1222
+ "description": "金额字段是否显示货币符号。",
1223
+ "type": [
1224
+ "boolean",
1225
+ "null"
1226
+ ]
1227
+ },
1228
+ "currencyType": {
1229
+ "description": "货币类型 ID。",
1230
+ "minimum": 1,
1231
+ "type": [
1232
+ "integer",
1233
+ "null"
1234
+ ]
1235
+ },
1236
+ "decimalDigit": {
1237
+ "description": "小数位数。",
1238
+ "maximum": 10,
1239
+ "minimum": 0,
1240
+ "type": [
1241
+ "integer",
1242
+ "null"
1243
+ ]
1244
+ },
1245
+ "maxValue": {
1246
+ "description": "允许的最大值;后端按字符串保存。",
1247
+ "type": [
1248
+ "string",
1249
+ "number",
1250
+ "null"
1251
+ ]
1252
+ },
1253
+ "minValue": {
1254
+ "description": "允许的最小值;后端按字符串保存。",
1255
+ "type": [
1256
+ "string",
1257
+ "number",
1258
+ "null"
1259
+ ]
1260
+ },
1261
+ "noRepeat": {
1262
+ "description": "是否禁止重复值。",
1263
+ "type": [
1264
+ "boolean",
1265
+ "null"
1266
+ ]
1267
+ },
1268
+ "numberFormat": {
1269
+ "description": "数字展示格式 ID。",
1270
+ "minimum": 1,
1271
+ "type": [
1272
+ "integer",
1273
+ "null"
1274
+ ]
1275
+ },
1276
+ "numberLimitStatus": {
1277
+ "description": "是否启用最小值和最大值限制。",
1278
+ "type": [
1279
+ "boolean",
1280
+ "null"
1281
+ ]
1282
+ },
1283
+ "scanType": {
1284
+ "description": "扫码类型 ID。",
1285
+ "minimum": 0,
1286
+ "type": [
1287
+ "integer",
1288
+ "null"
1289
+ ]
1290
+ }
1291
+ },
1292
+ "type": "object"
1293
+ },
1294
+ "PhoneConfig": {
1295
+ "additionalProperties": false,
1296
+ "description": "电话字段的长度、重复和校验配置。",
1297
+ "properties": {
1298
+ "canScan": {
1299
+ "type": [
1300
+ "boolean",
1301
+ "null"
1302
+ ]
1303
+ },
1304
+ "fixedPhone": {
1305
+ "description": "是否按固定电话格式校验。",
1306
+ "type": [
1307
+ "boolean",
1308
+ "null"
1309
+ ]
1310
+ },
1311
+ "maxWordCount": {
1312
+ "minimum": 0,
1313
+ "type": [
1314
+ "integer",
1315
+ "null"
1316
+ ]
1317
+ },
1318
+ "minWordCount": {
1319
+ "minimum": 0,
1320
+ "type": [
1321
+ "integer",
1322
+ "null"
1323
+ ]
1324
+ },
1325
+ "msgValidateStatus": {
1326
+ "description": "是否启用短信校验。",
1327
+ "type": [
1328
+ "boolean",
1329
+ "null"
1330
+ ]
1331
+ },
1332
+ "noRepeat": {
1333
+ "type": [
1334
+ "boolean",
1335
+ "null"
1336
+ ]
1337
+ },
1338
+ "scanType": {
1339
+ "minimum": 0,
1340
+ "type": [
1341
+ "integer",
1342
+ "null"
1343
+ ]
1344
+ }
1345
+ },
1346
+ "type": "object"
1347
+ },
1348
+ "ReferenceDefaultValue": {
1349
+ "additionalProperties": false,
1350
+ "properties": {
1351
+ "applyId": {
1352
+ "type": [
1353
+ "integer",
1354
+ "null"
1355
+ ]
1356
+ },
1357
+ "dataTitle": {
1358
+ "type": [
1359
+ "string",
1360
+ "null"
1361
+ ]
1362
+ },
1363
+ "values": {
1364
+ "items": {
1365
+ "$ref": "#/$defs/DefaultValues"
1366
+ },
1367
+ "type": "array"
1368
+ }
1369
+ },
1370
+ "type": "object"
1371
+ },
1372
+ "RelationConfig": {
1373
+ "additionalProperties": false,
1374
+ "description": "引用字段配置;引用其他应用中的数据。",
1375
+ "properties": {
1376
+ "beingDefaultFormulaAutoFillEnabled": {
1377
+ "type": [
1378
+ "boolean",
1379
+ "null"
1380
+ ]
1381
+ },
1382
+ "defaultValueMatchRules": {
1383
+ "type": [
1384
+ "array",
1385
+ "null"
1386
+ ]
1387
+ },
1388
+ "defaultValues": {
1389
+ "oneOf": [
1390
+ {
1391
+ "type": "null"
1392
+ },
1393
+ {
1394
+ "$ref": "#/$defs/DefaultValues"
1395
+ }
1396
+ ]
1397
+ },
1398
+ "displayField": {
1399
+ "$ref": "#/$defs/FieldSelector",
1400
+ "description": "引用值的主展示字段。"
1401
+ },
1402
+ "relationMode": {
1403
+ "default": "single",
1404
+ "description": "单条引用或多条引用;缺失时按 single 处理。",
1405
+ "enum": [
1406
+ "single",
1407
+ "multiple"
1408
+ ]
1409
+ },
1410
+ "targetAppKey": {
1411
+ "description": "被引用应用的 appKey。",
1412
+ "minLength": 1,
1413
+ "type": "string"
1414
+ },
1415
+ "visibleFields": {
1416
+ "description": "引用选择界面额外展示的字段。",
1417
+ "items": {
1418
+ "$ref": "#/$defs/FieldSelector"
1419
+ },
1420
+ "type": "array",
1421
+ "uniqueItems": true
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "targetAppKey",
1426
+ "displayField"
1427
+ ],
1428
+ "type": "object"
1429
+ },
1430
+ "RoleSelector": {
1431
+ "additionalProperties": false,
1432
+ "properties": {
1433
+ "roleId": {
1434
+ "minimum": 1,
1435
+ "type": "integer"
1436
+ },
1437
+ "roleName": {
1438
+ "minLength": 1,
1439
+ "type": "string"
1440
+ }
1441
+ },
1442
+ "required": [
1443
+ "roleId"
1444
+ ],
1445
+ "type": "object"
1446
+ },
1447
+ "ScalarDefaultValue": {
1448
+ "description": "不包含对象或数组的普通字段默认值。",
1449
+ "type": [
1450
+ "null",
1451
+ "boolean",
1452
+ "number",
1453
+ "string"
1454
+ ]
1455
+ },
1456
+ "SelectScopeRelation": {
1457
+ "additionalProperties": false,
1458
+ "properties": {
1459
+ "displayedField": {
1460
+ "$ref": "#/$defs/FieldSelector"
1461
+ },
1462
+ "displayedFieldType": {
1463
+ "type": [
1464
+ "integer",
1465
+ "null"
1466
+ ]
1467
+ },
1468
+ "matchRuleFormula": {
1469
+ "type": [
1470
+ "string",
1471
+ "null"
1472
+ ]
1473
+ },
1474
+ "matchRuleType": {
1475
+ "type": [
1476
+ "integer",
1477
+ "null"
1478
+ ]
1479
+ },
1480
+ "matchRules": {
1481
+ "type": [
1482
+ "array",
1483
+ "null"
1484
+ ]
1485
+ },
1486
+ "targetAppKey": {
1487
+ "minLength": 1,
1488
+ "type": "string"
1489
+ },
1490
+ "targetAppTitle": {
1491
+ "type": [
1492
+ "string",
1493
+ "null"
1494
+ ]
1495
+ }
1496
+ },
1497
+ "required": [
1498
+ "displayedField",
1499
+ "targetAppKey"
1500
+ ],
1501
+ "type": "object"
1502
+ },
1503
+ "SubField": {
1504
+ "allOf": [
1505
+ {
1506
+ "$ref": "#/$defs/SubFieldCommon"
1507
+ },
1508
+ {
1509
+ "oneOf": [
1510
+ {
1511
+ "properties": {
1512
+ "config": {
1513
+ "$ref": "#/$defs/TextConfig"
1514
+ },
1515
+ "type": {
1516
+ "enum": [
1517
+ "text",
1518
+ "long_text",
1519
+ "link",
1520
+ "email"
1521
+ ]
1522
+ }
1523
+ },
1524
+ "required": [
1525
+ "type"
1526
+ ]
1527
+ },
1528
+ {
1529
+ "properties": {
1530
+ "config": {
1531
+ "$ref": "#/$defs/PhoneConfig"
1532
+ },
1533
+ "type": {
1534
+ "const": "phone"
1535
+ }
1536
+ },
1537
+ "required": [
1538
+ "type"
1539
+ ]
1540
+ },
1541
+ {
1542
+ "properties": {
1543
+ "config": {
1544
+ "$ref": "#/$defs/NumberConfig"
1545
+ },
1546
+ "type": {
1547
+ "const": "number"
1548
+ }
1549
+ },
1550
+ "required": [
1551
+ "type"
1552
+ ]
1553
+ },
1554
+ {
1555
+ "properties": {
1556
+ "config": {
1557
+ "$ref": "#/$defs/EmptyConfig"
1558
+ },
1559
+ "type": {
1560
+ "const": "date"
1561
+ }
1562
+ },
1563
+ "required": [
1564
+ "type"
1565
+ ]
1566
+ },
1567
+ {
1568
+ "properties": {
1569
+ "config": {
1570
+ "$ref": "#/$defs/AttachmentConfig"
1571
+ },
1572
+ "type": {
1573
+ "const": "attachment"
1574
+ }
1575
+ },
1576
+ "required": [
1577
+ "type"
1578
+ ]
1579
+ },
1580
+ {
1581
+ "properties": {
1582
+ "config": {
1583
+ "$ref": "#/$defs/MemberConfig"
1584
+ },
1585
+ "type": {
1586
+ "const": "member"
1587
+ }
1588
+ },
1589
+ "required": [
1590
+ "type"
1591
+ ]
1592
+ },
1593
+ {
1594
+ "properties": {
1595
+ "config": {
1596
+ "$ref": "#/$defs/ChoiceConfig"
1597
+ },
1598
+ "type": {
1599
+ "enum": [
1600
+ "single_choice",
1601
+ "single_select",
1602
+ "multi_select"
1603
+ ]
1604
+ }
1605
+ },
1606
+ "required": [
1607
+ "type",
1608
+ "config"
1609
+ ]
1610
+ },
1611
+ {
1612
+ "properties": {
1613
+ "config": {
1614
+ "$ref": "#/$defs/DepartmentConfig"
1615
+ },
1616
+ "type": {
1617
+ "const": "department"
1618
+ }
1619
+ },
1620
+ "required": [
1621
+ "type",
1622
+ "config"
1623
+ ]
1624
+ },
1625
+ {
1626
+ "properties": {
1627
+ "config": {
1628
+ "$ref": "#/$defs/RelationConfig"
1629
+ },
1630
+ "type": {
1631
+ "const": "relation"
1632
+ }
1633
+ },
1634
+ "required": [
1635
+ "type",
1636
+ "config"
1637
+ ]
1638
+ },
1639
+ {
1640
+ "properties": {
1641
+ "config": {
1642
+ "$ref": "#/$defs/DataRelationConfig"
1643
+ },
1644
+ "type": {
1645
+ "const": "data_relation"
1646
+ }
1647
+ },
1648
+ "required": [
1649
+ "type",
1650
+ "config"
1651
+ ]
1652
+ }
1653
+ ]
1654
+ }
1655
+ ],
1656
+ "description": "表格子字段;仅允许一期白名单类型,不包含布局宽度。",
1657
+ "type": "object",
1658
+ "unevaluatedProperties": false
1659
+ },
1660
+ "SubFieldCommon": {
1661
+ "description": "表格子字段的公共属性;不允许 dataTitle、dataCover 或 width。",
1662
+ "properties": {
1663
+ "defaultType": {
1664
+ "default": 1,
1665
+ "description": "默认值类型;1 表示静态值,2 表示关联/绑定值,3 表示公式值。",
1666
+ "enum": [
1667
+ 1,
1668
+ 2,
1669
+ 3
1670
+ ],
1671
+ "type": "integer"
1672
+ },
1673
+ "defaultValue": {
1674
+ "description": "表单填写时的默认值;显式 null 表示清除默认值。",
1675
+ "type": [
1676
+ "null",
1677
+ "boolean",
1678
+ "number",
1679
+ "string",
1680
+ "array",
1681
+ "object"
1682
+ ]
1683
+ },
1684
+ "description": {
1685
+ "description": "子字段说明;null 或空字符串表示清空。",
1686
+ "type": [
1687
+ "string",
1688
+ "null"
1689
+ ]
1690
+ },
1691
+ "name": {
1692
+ "description": "子字段展示名称;在所属表格内唯一。",
1693
+ "minLength": 1,
1694
+ "type": "string"
1695
+ },
1696
+ "queId": {
1697
+ "description": "已有子字段的后端 ID;新增时省略。",
1698
+ "minimum": 1,
1699
+ "type": "integer"
1700
+ },
1701
+ "required": {
1702
+ "description": "是否必填;缺失时保留当前值。",
1703
+ "type": "boolean"
1704
+ }
1705
+ },
1706
+ "required": [
1707
+ "name"
1708
+ ],
1709
+ "type": "object"
1710
+ },
1711
+ "SubtableConfig": {
1712
+ "additionalProperties": false,
1713
+ "description": "表格行数和重复值限制。",
1714
+ "properties": {
1715
+ "defaultValues": {
1716
+ "oneOf": [
1717
+ {
1718
+ "type": "null"
1719
+ },
1720
+ {
1721
+ "$ref": "#/$defs/DefaultValues"
1722
+ }
1723
+ ]
1724
+ },
1725
+ "tableNoRepeatQuestion": {
1726
+ "items": {
1727
+ "$ref": "#/$defs/FieldSelector"
1728
+ },
1729
+ "type": "array"
1730
+ },
1731
+ "tableNoRepeatStatus": {
1732
+ "type": [
1733
+ "boolean",
1734
+ "null"
1735
+ ]
1736
+ },
1737
+ "tableRowHeight": {
1738
+ "minLength": 1,
1739
+ "type": [
1740
+ "string",
1741
+ "null"
1742
+ ]
1743
+ },
1744
+ "tableRowsLimit": {
1745
+ "minimum": 1,
1746
+ "type": [
1747
+ "integer",
1748
+ "null"
1749
+ ]
1750
+ }
1751
+ },
1752
+ "type": "object"
1753
+ },
1754
+ "TextConfig": {
1755
+ "additionalProperties": false,
1756
+ "description": "文字类字段的长度限制;省略表示保留当前值。",
1757
+ "properties": {
1758
+ "canScan": {
1759
+ "description": "是否允许扫码输入。",
1760
+ "type": [
1761
+ "boolean",
1762
+ "null"
1763
+ ]
1764
+ },
1765
+ "maxWordCount": {
1766
+ "description": "最多字数;null 表示清除限制。",
1767
+ "minimum": 0,
1768
+ "type": [
1769
+ "integer",
1770
+ "null"
1771
+ ]
1772
+ },
1773
+ "minWordCount": {
1774
+ "description": "最少字数;null 表示清除限制。",
1775
+ "minimum": 0,
1776
+ "type": [
1777
+ "integer",
1778
+ "null"
1779
+ ]
1780
+ },
1781
+ "noRepeat": {
1782
+ "description": "是否禁止重复值。",
1783
+ "type": [
1784
+ "boolean",
1785
+ "null"
1786
+ ]
1787
+ },
1788
+ "scanType": {
1789
+ "description": "扫码类型 ID。",
1790
+ "minimum": 0,
1791
+ "type": [
1792
+ "integer",
1793
+ "null"
1794
+ ]
1795
+ }
1796
+ },
1797
+ "type": "object"
1798
+ }
1799
+ },
1800
+ "$id": "https://builder.qingflow.com/schemas/app-form-apply/v1alpha1/fields/subtable.json",
1801
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1802
+ "allOf": [
1803
+ {
1804
+ "$ref": "#/$defs/FieldCommon"
1805
+ },
1806
+ {
1807
+ "properties": {
1808
+ "config": {
1809
+ "$ref": "#/$defs/SubtableConfig"
1810
+ },
1811
+ "subfields": {
1812
+ "items": {
1813
+ "$ref": "#/$defs/SubField"
1814
+ },
1815
+ "minItems": 1,
1816
+ "type": "array"
1817
+ },
1818
+ "type": {
1819
+ "const": "subtable"
1820
+ }
1821
+ },
1822
+ "required": [
1823
+ "type",
1824
+ "subfields"
1825
+ ]
1826
+ }
1827
+ ],
1828
+ "title": "Qingflow AppForm v1alpha1 subtable field",
1829
+ "type": "object",
1830
+ "unevaluatedProperties": false
1831
+ }