@qingflow-tech/qingflow-cli 1.1.43 → 1.1.44

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