@nocobase/plugin-flow-engine 2.1.0-alpha.15 → 2.1.0-alpha.17

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 (116) hide show
  1. package/dist/externalVersion.js +10 -10
  2. package/dist/node_modules/ses/package.json +1 -1
  3. package/dist/node_modules/zod/package.json +1 -1
  4. package/dist/server/flow-surfaces/{compiler.d.ts → apply/compiler.d.ts} +1 -10
  5. package/dist/server/flow-surfaces/{compiler.js → apply/compiler.js} +41 -280
  6. package/dist/server/flow-surfaces/apply/layout.d.ts +34 -0
  7. package/dist/server/flow-surfaces/apply/layout.js +175 -0
  8. package/dist/server/flow-surfaces/apply/matching.d.ts +16 -0
  9. package/dist/server/flow-surfaces/apply/matching.js +181 -0
  10. package/dist/server/flow-surfaces/association-title-field.d.ts +20 -0
  11. package/dist/server/flow-surfaces/association-title-field.js +158 -0
  12. package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
  13. package/dist/server/flow-surfaces/blueprint/compile-blocks.js +717 -0
  14. package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +13 -0
  15. package/dist/server/flow-surfaces/blueprint/compile-plan.js +308 -0
  16. package/dist/server/flow-surfaces/blueprint/compile-reaction.d.ts +11 -0
  17. package/dist/server/flow-surfaces/blueprint/compile-reaction.js +72 -0
  18. package/dist/server/flow-surfaces/blueprint/index.d.ts +12 -0
  19. package/dist/server/flow-surfaces/blueprint/index.js +44 -0
  20. package/dist/server/flow-surfaces/blueprint/normalize-document.d.ts +10 -0
  21. package/dist/server/flow-surfaces/blueprint/normalize-document.js +296 -0
  22. package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +26 -0
  23. package/dist/server/flow-surfaces/blueprint/private-utils.js +182 -0
  24. package/dist/server/flow-surfaces/blueprint/public-types.d.ts +153 -0
  25. package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
  26. package/dist/server/flow-surfaces/catalog-smart.d.ts +18 -0
  27. package/dist/server/flow-surfaces/catalog-smart.js +239 -0
  28. package/dist/server/flow-surfaces/catalog-smart.projector.d.ts +15 -0
  29. package/dist/server/flow-surfaces/catalog-smart.projector.js +157 -0
  30. package/dist/server/flow-surfaces/catalog-smart.types.d.ts +99 -0
  31. package/dist/server/flow-surfaces/catalog-smart.types.js +24 -0
  32. package/dist/server/flow-surfaces/catalog.d.ts +3 -0
  33. package/dist/server/flow-surfaces/catalog.js +163 -34
  34. package/dist/server/flow-surfaces/compose-compiler.d.ts +104 -0
  35. package/dist/server/flow-surfaces/compose-compiler.js +162 -0
  36. package/dist/server/flow-surfaces/compose-runtime.d.ts +89 -0
  37. package/dist/server/flow-surfaces/compose-runtime.js +338 -0
  38. package/dist/server/flow-surfaces/configure-options.js +12 -3
  39. package/dist/server/flow-surfaces/constants.d.ts +3 -2
  40. package/dist/server/flow-surfaces/constants.js +36 -3
  41. package/dist/server/flow-surfaces/default-action-popup.d.ts +52 -0
  42. package/dist/server/flow-surfaces/default-action-popup.js +258 -0
  43. package/dist/server/flow-surfaces/executor.d.ts +10 -0
  44. package/dist/server/flow-surfaces/executor.js +59 -24
  45. package/dist/server/flow-surfaces/field-binding-registry.d.ts +23 -0
  46. package/dist/server/flow-surfaces/field-binding-registry.js +391 -0
  47. package/dist/server/flow-surfaces/field-semantics.d.ts +1 -1
  48. package/dist/server/flow-surfaces/index.js +75 -0
  49. package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
  50. package/dist/server/flow-surfaces/node-use-sets.js +114 -0
  51. package/dist/server/flow-surfaces/payload-shape.d.ts +9 -0
  52. package/dist/server/flow-surfaces/payload-shape.js +61 -0
  53. package/dist/server/flow-surfaces/placement.js +2 -6
  54. package/dist/server/flow-surfaces/planning/action-specs.d.ts +179 -0
  55. package/dist/server/flow-surfaces/planning/action-specs.js +190 -0
  56. package/dist/server/flow-surfaces/planning/compiler.d.ts +37 -0
  57. package/dist/server/flow-surfaces/planning/compiler.js +376 -0
  58. package/dist/server/flow-surfaces/planning/context.d.ts +30 -0
  59. package/dist/server/flow-surfaces/planning/context.js +139 -0
  60. package/dist/server/flow-surfaces/planning/created-keys.d.ts +34 -0
  61. package/dist/server/flow-surfaces/planning/created-keys.js +375 -0
  62. package/dist/server/flow-surfaces/planning/key-kind.d.ts +11 -0
  63. package/dist/server/flow-surfaces/planning/key-kind.js +86 -0
  64. package/dist/server/flow-surfaces/planning/key-persistence.d.ts +34 -0
  65. package/dist/server/flow-surfaces/planning/key-persistence.js +148 -0
  66. package/dist/server/flow-surfaces/planning/key-registry.d.ts +40 -0
  67. package/dist/server/flow-surfaces/planning/key-registry.js +206 -0
  68. package/dist/server/flow-surfaces/planning/runtime.d.ts +37 -0
  69. package/dist/server/flow-surfaces/planning/runtime.js +259 -0
  70. package/dist/server/flow-surfaces/planning/step-link.d.ts +14 -0
  71. package/dist/server/flow-surfaces/planning/step-link.js +104 -0
  72. package/dist/server/flow-surfaces/planning/types.d.ts +55 -0
  73. package/dist/server/flow-surfaces/planning/types.js +24 -0
  74. package/dist/server/flow-surfaces/reaction/errors.d.ts +20 -0
  75. package/dist/server/flow-surfaces/reaction/errors.js +69 -0
  76. package/dist/server/flow-surfaces/reaction/field-value.d.ts +34 -0
  77. package/dist/server/flow-surfaces/reaction/field-value.js +181 -0
  78. package/dist/server/flow-surfaces/reaction/fingerprint.d.ts +16 -0
  79. package/dist/server/flow-surfaces/reaction/fingerprint.js +71 -0
  80. package/dist/server/flow-surfaces/reaction/linkage.d.ts +136 -0
  81. package/dist/server/flow-surfaces/reaction/linkage.js +882 -0
  82. package/dist/server/flow-surfaces/reaction/meta.d.ts +11 -0
  83. package/dist/server/flow-surfaces/reaction/meta.js +451 -0
  84. package/dist/server/flow-surfaces/reaction/registry.d.ts +136 -0
  85. package/dist/server/flow-surfaces/reaction/registry.js +186 -0
  86. package/dist/server/flow-surfaces/reaction/resolver.d.ts +22 -0
  87. package/dist/server/flow-surfaces/reaction/resolver.js +202 -0
  88. package/dist/server/flow-surfaces/reaction/types.d.ts +241 -0
  89. package/dist/server/flow-surfaces/reaction/types.js +24 -0
  90. package/dist/server/flow-surfaces/reaction/utils.d.ts +17 -0
  91. package/dist/server/flow-surfaces/reaction/utils.js +67 -0
  92. package/dist/server/flow-surfaces/reaction/value-expr.d.ts +15 -0
  93. package/dist/server/flow-surfaces/reaction/value-expr.js +209 -0
  94. package/dist/server/flow-surfaces/reference-guards.d.ts +19 -0
  95. package/dist/server/flow-surfaces/reference-guards.js +103 -0
  96. package/dist/server/flow-surfaces/service-helpers.d.ts +42 -0
  97. package/dist/server/flow-surfaces/service-helpers.js +377 -0
  98. package/dist/server/flow-surfaces/service-utils.d.ts +105 -0
  99. package/dist/server/flow-surfaces/service-utils.js +760 -0
  100. package/dist/server/flow-surfaces/service.d.ts +199 -104
  101. package/dist/server/flow-surfaces/service.js +4158 -1890
  102. package/dist/server/flow-surfaces/template-compatibility.d.ts +42 -0
  103. package/dist/server/flow-surfaces/template-compatibility.js +189 -0
  104. package/dist/server/flow-surfaces/template-service-utils.d.ts +62 -0
  105. package/dist/server/flow-surfaces/template-service-utils.js +281 -0
  106. package/dist/server/flow-surfaces/types.d.ts +129 -37
  107. package/dist/swagger/flow-surfaces.d.ts +3777 -1581
  108. package/dist/swagger/flow-surfaces.examples.d.ts +1246 -0
  109. package/dist/swagger/flow-surfaces.examples.js +1396 -0
  110. package/dist/swagger/flow-surfaces.js +2020 -1469
  111. package/dist/swagger/flow-surfaces.template-action-docs.d.ts +62 -0
  112. package/dist/swagger/flow-surfaces.template-action-docs.js +121 -0
  113. package/dist/swagger/flow-surfaces.template-schemas.d.ts +239 -0
  114. package/dist/swagger/flow-surfaces.template-schemas.js +255 -0
  115. package/dist/swagger/index.d.ts +3777 -1581
  116. package/package.json +2 -2
@@ -30,6 +30,9 @@ __export(flow_surfaces_exports, {
30
30
  });
31
31
  module.exports = __toCommonJS(flow_surfaces_exports);
32
32
  var import_constants = require("../server/flow-surfaces/constants");
33
+ var import_flow_surfaces = require("./flow-surfaces.examples");
34
+ var import_flow_surfaces2 = require("./flow-surfaces.template-action-docs");
35
+ var import_flow_surfaces3 = require("./flow-surfaces.template-schemas");
33
36
  const FLOW_SURFACES_TAG = "flowSurfaces";
34
37
  const ANY_OBJECT_SCHEMA = {
35
38
  type: "object",
@@ -71,6 +74,7 @@ const ACTION_TYPE_ENUM = [
71
74
  "reset",
72
75
  "collapse"
73
76
  ];
77
+ const APPLY_BLUEPRINT_ACTION_TYPE_ENUM = ACTION_TYPE_ENUM.filter((item) => item !== "addChild");
74
78
  const NON_RECORD_ACTION_TYPE_ENUM = [
75
79
  "filter",
76
80
  "addNew",
@@ -107,6 +111,26 @@ const RECORD_ACTION_TYPE_ENUM = [
107
111
  "delete",
108
112
  "updateRecord"
109
113
  ];
114
+ const APPLY_BLUEPRINT_BLOCK_TYPE_ENUM = [
115
+ "table",
116
+ "createForm",
117
+ "editForm",
118
+ "details",
119
+ "filterForm",
120
+ "list",
121
+ "gridCard",
122
+ "markdown",
123
+ "iframe",
124
+ "chart",
125
+ "actionPanel",
126
+ "jsBlock"
127
+ ];
128
+ const ADD_CHILD_TREE_TABLE_NOTE = "`addChild` is only valid when the live target `catalog.recordActions` exposes it, which normally means a table bound to a tree collection with `treeTable` enabled.";
129
+ const APPLY_BLUEPRINT_ADD_CHILD_NOTE = "`addChild` is not auto-promoted from `actions`; author it only under `recordActions`, and only when the live target `catalog.recordActions` exposes it for a tree table.";
130
+ const REACTION_FINGERPRINT_DESCRIPTION = "Optional optimistic-concurrency fingerprint from `getReactionMeta.capabilities[].fingerprint`. When provided, the write fails with HTTP 409 if the current slot fingerprint no longer matches.";
131
+ const REACTION_RULES_REPLACE_DESCRIPTION = "Full replacement payload for the resolved reaction slot. Pass `[]` to clear all rules from that slot.";
132
+ const REACTION_LOCALIZED_FORM_TARGET_DESCRIPTION = "Reaction write target. Use the live block/action uid for localized edits. For form field-value and form field-linkage writes, keep passing the outer form block uid; the backend resolves the inner form-grid slot automatically.";
133
+ const REACTION_OUTER_FORM_TARGET_NOTE = "Pass the outer form block uid, not the inner form-grid uid.";
110
134
  function ref(name) {
111
135
  return {
112
136
  $ref: `#/components/schemas/${name}`
@@ -175,1075 +199,244 @@ function valuesCompatibilityNote(description) {
175
199
  "The request schema in this Swagger document describes the final business payload, not the outer SDK `values` wrapper."
176
200
  ].join("\n");
177
201
  }
178
- const examples = {
179
- catalog: {
180
- target: {
181
- uid: "table-block-uid"
182
- }
183
- },
184
- context: {
185
- target: {
186
- uid: "details-block-uid"
187
- },
188
- path: "record",
189
- maxDepth: 3
190
- },
191
- compose: {
192
- target: {
193
- uid: "page-grid-uid"
194
- },
195
- mode: "append",
196
- blocks: [
197
- {
198
- key: "filter",
199
- type: "filterForm",
200
- resource: {
201
- dataSourceKey: "main",
202
- collectionName: "users"
203
- },
204
- fields: [
205
- {
206
- fieldPath: "username",
207
- target: "table"
208
- },
209
- {
210
- fieldPath: "nickname",
211
- target: "table"
212
- }
213
- ],
214
- actions: ["submit", "reset", "collapse"]
202
+ function buildReactionWriteRequestSchema(ruleSchemaName) {
203
+ return {
204
+ type: "object",
205
+ required: ["target", "rules"],
206
+ properties: {
207
+ target: {
208
+ allOf: [ref("FlowSurfaceWriteTarget")],
209
+ description: REACTION_LOCALIZED_FORM_TARGET_DESCRIPTION
215
210
  },
216
- {
217
- key: "table",
218
- type: "table",
219
- resource: {
220
- dataSourceKey: "main",
221
- collectionName: "users"
222
- },
223
- fields: ["username", "nickname", { fieldPath: "roles.title" }],
224
- actions: ["filter", "addNew", "refresh", "bulkDelete", "link"],
225
- recordActions: [
226
- "view",
227
- "edit",
228
- {
229
- type: "popup",
230
- popup: {
231
- mode: "replace",
232
- blocks: [
233
- {
234
- key: "details",
235
- type: "details",
236
- resource: {
237
- dataSourceKey: "main",
238
- collectionName: "users"
239
- },
240
- fields: ["username", "nickname"]
241
- }
242
- ]
243
- }
244
- },
245
- "updateRecord",
246
- "delete"
247
- ]
248
- }
249
- ],
250
- layout: {
251
- rows: [
252
- [
253
- {
254
- key: "filter",
255
- span: 3
256
- },
257
- {
258
- key: "table",
259
- span: 7
260
- }
261
- ]
262
- ]
263
- }
264
- },
265
- composeStatic: {
266
- target: {
267
- uid: "page-grid-uid"
268
- },
269
- blocks: [
270
- {
271
- key: "markdown",
272
- type: "markdown",
273
- settings: {
274
- content: "# Team handbook"
275
- }
211
+ rules: {
212
+ type: "array",
213
+ items: ref(ruleSchemaName),
214
+ description: REACTION_RULES_REPLACE_DESCRIPTION
276
215
  },
277
- {
278
- key: "iframe",
279
- type: "iframe",
280
- settings: {
281
- mode: "url",
282
- url: "https://example.com/embed",
283
- height: 360
284
- }
216
+ expectedFingerprint: {
217
+ type: "string",
218
+ description: REACTION_FINGERPRINT_DESCRIPTION
285
219
  },
286
- {
287
- key: "panel",
288
- type: "actionPanel",
289
- settings: {
290
- layout: "list",
291
- ellipsis: false
292
- }
293
- }
294
- ],
295
- layout: {
296
- rows: [["markdown", "iframe"], ["panel"]]
297
- }
298
- },
299
- composeListRich: {
300
- target: {
301
- uid: "page-grid-uid"
302
- },
303
- blocks: [
304
- {
305
- key: "employeesList",
306
- type: "list",
307
- resource: {
308
- dataSourceKey: "main",
309
- collectionName: "employees"
310
- },
311
- fields: [
312
- "nickname",
313
- {
314
- fieldPath: "department.name"
315
- }
316
- ],
317
- actions: ["addNew", "refresh"],
318
- recordActions: [
319
- "view",
320
- "edit",
321
- {
322
- type: "popup",
323
- popup: {
324
- mode: "replace",
325
- blocks: [
326
- {
327
- key: "details",
328
- type: "details",
329
- resource: {
330
- dataSourceKey: "main",
331
- collectionName: "employees"
332
- },
333
- fields: ["nickname"]
334
- }
335
- ]
336
- }
337
- },
338
- "delete"
339
- ],
340
- settings: {
341
- pageSize: 20,
342
- layout: "vertical"
343
- }
344
- }
345
- ]
346
- },
347
- composeGridCardRich: {
348
- target: {
349
- uid: "page-grid-uid"
350
- },
351
- blocks: [
352
- {
353
- key: "employeeCards",
354
- type: "gridCard",
355
- resource: {
356
- dataSourceKey: "main",
357
- collectionName: "employees"
358
- },
359
- fields: [
360
- "nickname",
361
- {
362
- fieldPath: "department.name"
363
- }
364
- ],
365
- actions: ["addNew", "refresh"],
366
- recordActions: ["view", "edit", "updateRecord", "delete"],
367
- settings: {
368
- columns: 3,
369
- rowCount: 2,
370
- layout: "vertical"
371
- }
372
- }
373
- ]
374
- },
375
- composeJsBlock: {
376
- target: {
377
- uid: "page-grid-uid"
378
- },
379
- blocks: [
380
- {
381
- key: "customHero",
382
- type: "jsBlock",
383
- settings: {
384
- title: "Custom hero",
385
- description: "Rendered by JS block runtime",
386
- className: "hero-shell",
387
- version: "1.0.0",
388
- code: "ctx.render('<div>Hello from JS block</div>');"
389
- }
390
- }
391
- ]
392
- },
393
- configure: {
394
- target: {
395
- uid: "details-field-uid"
396
- },
397
- changes: {
398
- clickToOpen: true,
399
- openView: {
400
- dataSourceKey: "main",
401
- collectionName: "departments",
402
- associationName: "users.department",
403
- mode: "drawer"
404
- }
405
- }
406
- },
407
- configureAssociationPopup: {
408
- target: {
409
- uid: "roles-field-wrapper-uid"
410
- },
411
- changes: {
412
- clickToOpen: true,
413
- openView: {
414
- dataSourceKey: "main",
415
- collectionName: "roles",
416
- associationName: "users.roles",
417
- mode: "drawer"
220
+ verify: {
221
+ type: "boolean",
222
+ description: "Reserved compatibility flag. Current v1 writes are full replace and return normalized output directly."
418
223
  }
419
- }
420
- },
421
- configureBlock: {
422
- target: {
423
- uid: "list-block-uid"
424
224
  },
425
- changes: {
426
- pageSize: 50,
427
- dataScope: {
428
- logic: "$and",
429
- items: [
430
- {
431
- path: "nickname",
432
- operator: "$eq",
433
- value: "beta"
434
- }
435
- ]
225
+ additionalProperties: false
226
+ };
227
+ }
228
+ function buildReactionWriteResultSchema(ruleSchemaName) {
229
+ return {
230
+ type: "object",
231
+ required: ["target", "resolvedScene", "resolvedSlot", "fingerprint", "normalizedRules", "canonicalRules"],
232
+ properties: {
233
+ target: {
234
+ allOf: [ref("FlowSurfaceReactionTargetSummary")],
235
+ description: "Resolved public reaction target after target normalization."
436
236
  },
437
- sorting: [
438
- {
439
- field: "username",
440
- direction: "asc"
237
+ resolvedScene: {
238
+ allOf: [ref("FlowSurfaceReactionScene")],
239
+ description: "Concrete reaction scene that the backend resolved for this write, such as `form`, `details`, `subForm`, `block`, or `action`."
240
+ },
241
+ resolvedSlot: {
242
+ allOf: [ref("FlowSurfaceReactionSlot")],
243
+ description: "Concrete persisted slot selected by the backend for this write."
244
+ },
245
+ fingerprint: {
246
+ type: "string",
247
+ description: "Fresh slot fingerprint after the write completes."
248
+ },
249
+ normalizedRules: {
250
+ type: "array",
251
+ items: ref(ruleSchemaName),
252
+ description: "Normalized public rules persisted by the write."
253
+ },
254
+ canonicalRules: {
255
+ type: "array",
256
+ items: ANY_OBJECT_SCHEMA,
257
+ description: "Canonical internal rules compiled from the normalized public rules."
258
+ },
259
+ updateAssociationValues: {
260
+ type: "array",
261
+ items: {
262
+ type: "string"
441
263
  }
442
- ],
443
- layout: "vertical"
444
- }
445
- },
446
- createMenu: {
447
- title: "Employees",
448
- type: "item",
449
- parentMenuRouteId: 1001
450
- },
451
- updateMenu: {
452
- menuRouteId: 1002,
453
- title: "Employees Center",
454
- parentMenuRouteId: null
455
- },
456
- configureAction: {
457
- target: {
458
- uid: "update-record-action-uid"
459
- },
460
- changes: {
461
- title: "Quick update",
462
- type: "primary",
463
- color: "gold",
464
- htmlType: "button",
465
- position: "end",
466
- confirm: {
467
- enable: true,
468
- title: "Confirm update",
469
- content: "Apply assigned values?"
470
- },
471
- assignValues: {
472
- status: "active"
473
264
  }
474
- }
475
- },
476
- configureJsBlock: {
477
- target: {
478
- uid: "js-block-uid"
479
- },
480
- changes: {
481
- title: "Users hero",
482
- description: "Rendered from FlowSurfaces configure",
483
- className: "users-hero",
484
- version: "1.0.1",
485
- code: "ctx.render('<div>Users hero</div>');"
486
- }
487
- },
488
- configureJsAction: {
489
- target: {
490
- uid: "js-action-uid"
491
265
  },
492
- changes: {
493
- title: "Run diagnostics",
494
- type: "primary",
495
- version: "1.0.1",
496
- code: `await ctx.runjs('console.log("diagnostics")');`
497
- }
498
- },
499
- configureJsItemAction: {
500
- target: {
501
- uid: "js-item-action-uid"
502
- },
503
- changes: {
504
- title: "Run item diagnostics",
505
- type: "default",
506
- version: "1.0.1",
507
- code: `await ctx.runjs('console.log("item diagnostics")');`
508
- }
509
- },
510
- configureJsField: {
511
- target: {
512
- uid: "js-field-wrapper-uid"
266
+ additionalProperties: false
267
+ };
268
+ }
269
+ function buildReactionCapabilitySchema(kind, ruleSchemaName, extraProperties = {}) {
270
+ return {
271
+ type: "object",
272
+ required: ["kind", "resolvedScene", "resolvedSlot", "fingerprint", "normalizedRules", "canonicalRules", "context"],
273
+ properties: {
274
+ kind: {
275
+ type: "string",
276
+ enum: [kind]
277
+ },
278
+ resolvedScene: ref("FlowSurfaceReactionScene"),
279
+ resolvedSlot: ref("FlowSurfaceReactionSlot"),
280
+ fingerprint: {
281
+ type: "string"
282
+ },
283
+ normalizedRules: {
284
+ type: "array",
285
+ items: ref(ruleSchemaName)
286
+ },
287
+ canonicalRules: {
288
+ type: "array",
289
+ items: ANY_OBJECT_SCHEMA
290
+ },
291
+ context: ref("FlowSurfaceContextResponse"),
292
+ ...extraProperties
513
293
  },
514
- changes: {
515
- label: "Custom renderer",
516
- version: "1.0.1",
517
- code: "ctx.render(String(ctx.record?.nickname?.toUpperCase?.() || ''));"
518
- }
294
+ additionalProperties: false
295
+ };
296
+ }
297
+ const FLOW_SURFACES_READ_ACL_NOTE = "Read actions (`get` / `describeSurface` / `catalog` / `context` / `getReactionMeta` / `listTemplates` / `getTemplate`) are open to `loggedIn` by default. Write actions still require the `ui.flowSurfaces` snippet.";
298
+ const templateActionDocs = (0, import_flow_surfaces2.createFlowSurfaceTemplateActionDocs)({
299
+ tag: FLOW_SURFACES_TAG,
300
+ readAclNote: FLOW_SURFACES_READ_ACL_NOTE,
301
+ requestBody,
302
+ responses,
303
+ valuesCompatibilityNote
304
+ });
305
+ const templateSchemas = (0, import_flow_surfaces3.createFlowSurfaceTemplateSchemas)({
306
+ ref,
307
+ stringOrIntegerSchema: STRING_OR_INTEGER_SCHEMA,
308
+ actionTypeEnum: ACTION_TYPE_ENUM
309
+ });
310
+ const actionDocs = {
311
+ catalog: {
312
+ tags: [FLOW_SURFACES_TAG],
313
+ summary: "List capabilities available in the current surface context",
314
+ description: valuesCompatibilityNote(
315
+ `Returns the block / field / action capabilities that can be created under the current target context, together with the recommended \`configureOptions\`, the underlying settings contract, event capabilities, and layout capabilities for the current node. The returned \`blocks[] / actions[] / recordActions[]\` only represent the truly available public capabilities under plugins enabled in the current instance. When \`sections\` is omitted, the server smart-selects the sections for the current target scenario, and clients should treat \`selectedSections\` in the response as the final authoritative result. For advanced field-value or linkage authoring, prefer \`getReactionMeta\` + \`set*Rules\` instead of guessing raw \`configureOptions\` keys. ${FLOW_SURFACES_READ_ACL_NOTE}`
316
+ ),
317
+ requestBody: requestBody("FlowSurfaceCatalogRequest", import_flow_surfaces.flowSurfaceExamples.catalog),
318
+ responses: responses("FlowSurfaceCatalogResponse")
519
319
  },
520
- configureJsColumn: {
521
- target: {
522
- uid: "js-column-uid"
523
- },
524
- changes: {
525
- title: "JS column",
526
- width: 240,
527
- fixed: "left",
528
- version: "1.0.1",
529
- code: "ctx.render(String(ctx.record?.username || ''));"
530
- }
320
+ context: {
321
+ tags: [FLOW_SURFACES_TAG],
322
+ summary: "Read ctx variable tree available under the current target",
323
+ description: valuesCompatibilityNote(
324
+ `Returns the low-level \`ctx\` variable tree available under the current target. \`path\` only accepts bare paths such as \`record\`, \`popup.record\`, and \`item.parentItem.value\`. Do not pass \`ctx.record\` or \`{{ ctx.record }}\`. For reaction authoring, use \`getReactionMeta\` as the main discovery endpoint first and use \`context\` only as a lower-level supplement when you need to inspect raw variable paths. ${FLOW_SURFACES_READ_ACL_NOTE}`
325
+ ),
326
+ requestBody: requestBody("FlowSurfaceContextRequest", import_flow_surfaces.flowSurfaceExamples.context),
327
+ responses: responses("FlowSurfaceContextResponse")
531
328
  },
532
- configureJsItem: {
533
- target: {
534
- uid: "js-item-uid"
535
- },
536
- changes: {
537
- label: "JS item",
538
- showLabel: true,
539
- labelWidth: 120,
540
- version: "1.0.1",
541
- code: "ctx.render(String(ctx.record?.nickname || ''));"
542
- }
329
+ getReactionMeta: {
330
+ tags: [FLOW_SURFACES_TAG],
331
+ summary: "Read reaction capabilities, current rules, and contextual authoring metadata",
332
+ description: valuesCompatibilityNote(
333
+ `Returns the current advanced reaction capabilities for the target, including resolved scene/slot, normalized rules, canonical rules, available \`targetFields\`, \`supportedActions\`, and \`conditionMeta\` / \`valueExprMeta\` authoring metadata. This is the main discovery endpoint for CLI or AI callers before configuring field values or linkage rules. For form \`fieldValue\` / \`fieldLinkage\` authoring, callers still pass the outer form block uid; the backend resolves the concrete form-grid slot automatically. Use \`context\` only as a supplement when you need to inspect the raw variable tree behind the returned metadata. ${FLOW_SURFACES_READ_ACL_NOTE}`
334
+ ),
335
+ requestBody: requestBody("FlowSurfaceGetReactionMetaRequest", import_flow_surfaces.flowSurfaceExamples.getReactionMeta),
336
+ responses: responses("FlowSurfaceGetReactionMetaResult")
543
337
  },
544
- configurePage: {
545
- target: {
546
- uid: "employees-page-uid"
547
- },
548
- changes: {
549
- icon: "UserOutlined",
550
- enableHeader: false
551
- }
338
+ setFieldValueRules: {
339
+ tags: [FLOW_SURFACES_TAG],
340
+ summary: "Replace field value rules on a create/edit form block",
341
+ description: valuesCompatibilityNote(
342
+ `Fully replaces the field-value slot on the target form block. ${REACTION_OUTER_FORM_TARGET_NOTE} \`rules: []\` clears the slot. \`expectedFingerprint\` should usually come from \`getReactionMeta.capabilities[].fingerprint\` and enables optimistic concurrency against the current slot state.`
343
+ ),
344
+ requestBody: requestBody("FlowSurfaceSetFieldValueRulesRequest", import_flow_surfaces.flowSurfaceExamples.setFieldValueRules),
345
+ responses: responses("FlowSurfaceSetFieldValueRulesResult")
552
346
  },
553
- configureTableAdvanced: {
554
- target: {
555
- uid: "tree-table-block-uid"
556
- },
557
- changes: {
558
- quickEdit: true,
559
- treeTable: true,
560
- defaultExpandAllRows: true,
561
- dragSort: true,
562
- dragSortBy: "sort"
563
- }
347
+ setBlockLinkageRules: {
348
+ tags: [FLOW_SURFACES_TAG],
349
+ summary: "Replace block-level linkage rules on a supported block",
350
+ description: valuesCompatibilityNote(
351
+ "Fully replaces the block-linkage slot on the target block. `rules: []` clears the slot. `expectedFingerprint` should usually come from `getReactionMeta.capabilities[].fingerprint` and enables optimistic concurrency against the current slot state."
352
+ ),
353
+ requestBody: requestBody("FlowSurfaceSetBlockLinkageRulesRequest", import_flow_surfaces.flowSurfaceExamples.setBlockLinkageRules),
354
+ responses: responses("FlowSurfaceSetBlockLinkageRulesResult")
564
355
  },
565
- configureEditForm: {
566
- target: {
567
- uid: "edit-form-block-uid"
568
- },
569
- changes: {
570
- colon: false,
571
- dataScope: {
572
- logic: "$and",
573
- items: [
574
- {
575
- path: "status",
576
- operator: "$eq",
577
- value: "draft"
578
- }
579
- ]
580
- }
581
- }
356
+ setFieldLinkageRules: {
357
+ tags: [FLOW_SURFACES_TAG],
358
+ summary: "Replace field-level linkage rules on a supported form/details/sub-form target",
359
+ description: valuesCompatibilityNote(
360
+ "Fully replaces the field-linkage slot on the target. The backend resolves the concrete scene automatically (`form`, `details`, or `subForm`) and returns it in `resolvedScene` / `resolvedSlot`. Supported actions are surfaced by `getReactionMeta`, commonly including `setFieldState`, `assignField`, and scene-specific defaults. For form scenes, keep passing the outer form block uid and let the backend resolve the inner grid slot. `expectedFingerprint` should usually come from `getReactionMeta.capabilities[].fingerprint`."
361
+ ),
362
+ requestBody: requestBody("FlowSurfaceSetFieldLinkageRulesRequest", import_flow_surfaces.flowSurfaceExamples.setFieldLinkageRules),
363
+ responses: responses("FlowSurfaceSetFieldLinkageRulesResult")
582
364
  },
583
- configureDetails: {
584
- target: {
585
- uid: "details-block-uid"
586
- },
587
- changes: {
588
- colon: true,
589
- linkageRules: [
590
- {
591
- when: {
592
- path: "status",
593
- operator: "$eq",
594
- value: "archived"
595
- },
596
- set: {
597
- hidden: true
598
- }
599
- }
600
- ]
601
- }
365
+ setActionLinkageRules: {
366
+ tags: [FLOW_SURFACES_TAG],
367
+ summary: "Replace action-level linkage rules on a supported action",
368
+ description: valuesCompatibilityNote(
369
+ "Fully replaces the action-linkage slot on the target action. `rules: []` clears the slot. `expectedFingerprint` should usually come from `getReactionMeta.capabilities[].fingerprint` and enables optimistic concurrency against the current slot state."
370
+ ),
371
+ requestBody: requestBody("FlowSurfaceSetActionLinkageRulesRequest", import_flow_surfaces.flowSurfaceExamples.setActionLinkageRules),
372
+ responses: responses("FlowSurfaceSetActionLinkageRulesResult")
602
373
  },
603
- composePopupCurrentRecord: {
604
- target: {
605
- uid: "view-action-uid"
606
- },
607
- mode: "replace",
608
- blocks: [
609
- {
610
- key: "details",
611
- type: "details",
612
- resource: {
613
- binding: "currentRecord"
614
- },
615
- fields: ["nickname", "department.title"]
616
- }
617
- ]
374
+ get: {
375
+ tags: [FLOW_SURFACES_TAG],
376
+ summary: "Read normalized surface tree and route metadata",
377
+ description: [
378
+ "Reads the normalized Flow surface readback result as the stable read endpoint for CLI and orchestration tools.",
379
+ "",
380
+ "Only root-level locator fields are accepted. Exactly one of the following four fields must be used as the locator.",
381
+ "Do not wrap the payload with `{ target: { ... } }`.",
382
+ "Do not wrap the payload with `{ values: { ... } }`.",
383
+ FLOW_SURFACES_READ_ACL_NOTE,
384
+ "The `target` in the response only keeps lightweight locator information. Read the full node tree from `tree`.",
385
+ "Tabs for route-backed pages are always read from `tree.subModels.tabs`. Top-level `tabs` / `tabTrees` are no longer returned separately.",
386
+ "",
387
+ `Example: GET /api/flowSurfaces:get?uid=${import_flow_surfaces.flowSurfaceExamples.getPopupQuery.uid}`,
388
+ `Example: GET /api/flowSurfaces:get?pageSchemaUid=${import_flow_surfaces.flowSurfaceExamples.getPageQuery.pageSchemaUid}`
389
+ ].join("\n"),
390
+ parameters: [
391
+ parameterRef("flowSurfaceTargetUid"),
392
+ parameterRef("flowSurfaceTargetPageSchemaUid"),
393
+ parameterRef("flowSurfaceTargetTabSchemaUid"),
394
+ parameterRef("flowSurfaceTargetRouteId")
395
+ ],
396
+ responses: responses("FlowSurfaceGetResponse")
618
397
  },
619
- composePopupAssociatedRecords: {
620
- target: {
621
- uid: "association-popup-action-uid"
622
- },
623
- mode: "replace",
624
- blocks: [
625
- {
626
- key: "employees",
627
- type: "table",
628
- resource: {
629
- binding: "associatedRecords",
630
- associationField: "employee"
631
- },
632
- fields: ["nickname", "status"],
633
- actions: ["refresh"],
634
- recordActions: ["view", "edit"]
635
- }
636
- ]
398
+ describeSurface: {
399
+ tags: [FLOW_SURFACES_TAG],
400
+ summary: "Read surface tree with stable keys and fingerprint",
401
+ description: valuesCompatibilityNote(
402
+ `Reads the current surface together with request-scoped bind keys, persisted declared keys, and an optimistic-concurrency fingerprint. The fingerprint is computed from the public surface tree together with the resolved key bindings and ignores key source differences such as \`request\` vs \`declared\`. The public readback strips the internal declared-key metadata path from node.stepParams. ${FLOW_SURFACES_READ_ACL_NOTE}`
403
+ ),
404
+ requestBody: requestBody("FlowSurfaceDescribeSurfaceRequest", import_flow_surfaces.flowSurfaceExamples.describeSurface),
405
+ responses: responses("FlowSurfaceDescribeSurfaceResponse")
637
406
  },
638
- configureActionModes: {
639
- target: {
640
- uid: "compose-email-action-uid"
641
- },
642
- changes: {
643
- linkageRules: [
644
- {
645
- when: {
646
- path: "status",
647
- operator: "$eq",
648
- value: "draft"
649
- },
650
- set: {
651
- disabled: true
407
+ applyBlueprint: {
408
+ tags: [FLOW_SURFACES_TAG],
409
+ summary: "Apply a page blueprint to create or replace one Modern page",
410
+ description: valuesCompatibilityNote(
411
+ 'Accepts one simplified JSON page blueprint and compiles it to internal flow-surface operations. The public blueprint describes page structure (`create` or `replace`, page metadata, ordered tabs, blocks, fields, actions, inline popups, optional reusable assets) and optional top-level `reaction.items[]` for whole-page interaction authoring. Each reaction item targets an explicit local key / bind key produced by the same blueprint run. Only explicitly listed reaction items are written. `rules: []` clears the targeted slot. Repeating the same `(type, target)` reaction slot in one blueprint is invalid. In `replace`, reaction targets always bind to the newly produced blueprint result, not historical nodes from the previous page version; if a slot must exist in the resulting surface, include it explicitly instead of relying on omission. Localized reaction edits on an existing surface should use `getReactionMeta` + `set*Rules` instead of applying a whole page blueprint again. The request body is that page-document JSON object itself and must not be JSON-stringified. Wrong: `{ "requestBody": "{\\"version\\":\\"1\\"}" }`. Internal planning details stay hidden. In `create`, `navigation.group.routeId` is the preferred way to target an existing menu group. It is exact-targeting only and cannot be mixed with existing-group metadata such as `icon`, `tooltip`, or `hideInMenu`; applyBlueprint create mode does not mutate existing group metadata, so callers should use `updateMenu` separately when that is required. When only `navigation.group.title` is provided, applyBlueprint reuses one existing same-title group when it is unique, creates a new group when none exists, and rejects ambiguous multi-match cases. Same-title reuse is title-only; if an existing group\'s metadata must change, use low-level `updateMenu` instead of applyBlueprint create. `replace` uses `target.pageSchemaUid`, updates only the explicit page-level fields provided in `page`, maps blueprint tabs to existing route-backed tab slots by index, rewrites each slot in order, removes trailing old tabs, and appends extra new tabs when needed. Tab and block keys are optional in the public blueprint; omit them unless custom layout or cross-block targeting needs a stable in-document identifier. `layout` is only allowed on tabs and inline popup documents; blocks themselves do not accept a `layout` property. Public applyBlueprint blocks do not support generic `form`; use `editForm` or `createForm`. Custom `edit` popups that provide `popup.blocks` must include exactly one `editForm` block; that `editForm` may omit `resource` and then inherits the opener\'s current-record context. When layout is omitted, applyBlueprint auto-generates a simple top-to-bottom layout. When a `replace` run expands a page to multiple tabs while the current page still has `enableTabs=false`, callers must set `page.enableTabs=true` explicitly. The response hides execution internals and returns only the resolved page target and final surface readback.'
412
+ ),
413
+ requestBody: {
414
+ required: true,
415
+ description: "The JSON request body. Send the page document object itself under requestBody as an object; do not JSON.stringify it and do not wrap it in { values: ... }.",
416
+ content: {
417
+ "application/json": {
418
+ schema: ref("FlowSurfaceApplyBlueprintRequest"),
419
+ examples: {
420
+ createPage: {
421
+ summary: "Create one Modern page from a page blueprint",
422
+ value: import_flow_surfaces.flowSurfaceExamples.applyBlueprint
423
+ },
424
+ replacePage: {
425
+ summary: "Replace one existing Modern page by pageSchemaUid",
426
+ value: import_flow_surfaces.flowSurfaceExamples.applyBlueprintReplace
427
+ }
652
428
  }
653
429
  }
654
- ],
655
- editMode: "drawer",
656
- updateMode: "overwrite",
657
- duplicateMode: "popup",
658
- collapsedRows: 2,
659
- defaultCollapsed: true,
660
- emailFieldNames: ["email", "backupEmail"],
661
- defaultSelectAllRecords: true
662
- }
663
- },
664
- createPage: {
665
- menuRouteId: 1002,
666
- title: "Employees",
667
- tabTitle: "Overview",
668
- enableTabs: true,
669
- displayTitle: true,
670
- documentTitle: "Employees workspace",
671
- tabDocumentTitle: "Employees overview"
672
- },
673
- addTab: {
674
- target: {
675
- uid: "employees-page-uid"
676
- },
677
- title: "Details",
678
- icon: "TableOutlined",
679
- documentTitle: "Employee details tab"
680
- },
681
- updateTab: {
682
- target: {
683
- uid: "details-tab-schema"
684
- },
685
- title: "Details",
686
- icon: "TableOutlined",
687
- documentTitle: "Employee details tab",
688
- flowRegistry: {
689
- beforeRenderApply: {
690
- key: "beforeRenderApply",
691
- on: "beforeRender",
692
- steps: {}
693
430
  }
694
- }
695
- },
696
- addPopupTab: {
697
- target: {
698
- uid: "view-action-popup-page-uid"
699
431
  },
700
- title: "Popup details",
701
- icon: "TableOutlined",
702
- documentTitle: "Popup details tab"
703
- },
704
- updatePopupTab: {
705
- target: {
706
- uid: "popup-secondary-tab-uid"
707
- },
708
- title: "Popup details updated",
709
- icon: "AppstoreOutlined",
710
- documentTitle: "Popup details updated tab",
711
- flowRegistry: {
712
- beforeRenderApply: {
713
- key: "beforeRenderApply",
714
- on: "beforeRender",
715
- steps: {}
716
- }
717
- }
718
- },
719
- movePopupTab: {
720
- sourceUid: "popup-secondary-tab-uid",
721
- targetUid: "popup-primary-tab-uid",
722
- position: "before"
723
- },
724
- removePopupTab: {
725
- target: {
726
- uid: "popup-secondary-tab-uid"
727
- }
728
- },
729
- addBlock: {
730
- target: {
731
- uid: "view-action-uid"
732
- },
733
- type: "details",
734
- resource: {
735
- binding: "currentRecord"
736
- }
737
- },
738
- addPopupAssociatedBlock: {
739
- target: {
740
- uid: "association-popup-action-uid"
741
- },
742
- type: "table",
743
- resource: {
744
- binding: "associatedRecords",
745
- associationField: "employee"
746
- }
747
- },
748
- addPopupOtherRecordsBlock: {
749
- target: {
750
- uid: "popup-action-uid"
751
- },
752
- type: "table",
753
- resource: {
754
- binding: "otherRecords",
755
- dataSourceKey: "main",
756
- collectionName: "departments"
757
- }
758
- },
759
- addJsBlock: {
760
- target: {
761
- uid: "page-grid-uid"
762
- },
763
- type: "jsBlock",
764
- settings: {
765
- title: "Users banner",
766
- description: "Custom JS rendered banner",
767
- version: "1.0.0",
768
- code: "ctx.render('<div>Users banner</div>');"
769
- }
770
- },
771
- addField: {
772
- target: {
773
- uid: "create-form-block-uid"
774
- },
775
- fieldPath: "nickname",
776
- renderer: "js",
777
- settings: {
778
- label: "Nickname (JS)",
779
- code: "ctx.render(String(ctx.value?.toUpperCase?.() || ctx.value || ''));",
780
- version: "1.0.0"
781
- }
782
- },
783
- addAssociationField: {
784
- target: {
785
- uid: "table-block-uid"
786
- },
787
- fieldPath: "title",
788
- associationPathName: "department",
789
- settings: {
790
- title: "Department title",
791
- width: 240
792
- },
793
- popup: {
794
- mode: "replace",
795
- blocks: [
796
- {
797
- key: "departmentDetails",
798
- type: "details",
799
- resource: {
800
- binding: "currentRecord"
801
- },
802
- fields: ["title", "manager.nickname"]
803
- }
804
- ]
805
- }
806
- },
807
- addJsColumn: {
808
- target: {
809
- uid: "table-block-uid"
810
- },
811
- type: "jsColumn",
812
- settings: {
813
- title: "Runtime column",
814
- width: 240,
815
- version: "1.0.0",
816
- code: "ctx.render(String(ctx.record?.nickname || ''));"
817
- }
818
- },
819
- addJsItem: {
820
- target: {
821
- uid: "create-form-grid-uid"
822
- },
823
- type: "jsItem",
824
- settings: {
825
- label: "Runtime item",
826
- showLabel: true,
827
- version: "1.0.0",
828
- code: "ctx.render(String(ctx.record?.nickname || ''));"
829
- }
830
- },
831
- addAction: {
832
- target: {
833
- uid: "filter-form-block-uid"
834
- },
835
- type: "submit",
836
- settings: {
837
- title: "Apply filters",
838
- confirm: false
839
- }
840
- },
841
- addLinkAction: {
842
- target: {
843
- uid: "table-block-uid"
844
- },
845
- type: "link",
846
- settings: {
847
- title: "Open docs"
848
- }
849
- },
850
- addJsAction: {
851
- target: {
852
- uid: "action-panel-uid"
853
- },
854
- type: "js",
855
- settings: {
856
- title: "Run JS",
857
- type: "primary",
858
- version: "1.0.0",
859
- code: `await ctx.runjs('console.log("hello")');`
860
- }
861
- },
862
- addJsItemAction: {
863
- target: {
864
- uid: "create-form-uid"
865
- },
866
- type: "jsItem",
867
- settings: {
868
- title: "Run item JS",
869
- type: "default",
870
- version: "1.0.0",
871
- code: `await ctx.runjs('console.log("item")');`
872
- }
873
- },
874
- addRecordAction: {
875
- target: {
876
- uid: "table-block-uid"
877
- },
878
- type: "view",
879
- settings: {
880
- title: "View user",
881
- openView: {
882
- dataSourceKey: "main",
883
- collectionName: "users",
884
- mode: "drawer"
885
- }
886
- },
887
- popup: {
888
- mode: "replace",
889
- blocks: [
890
- {
891
- key: "details",
892
- type: "details",
893
- resource: {
894
- dataSourceKey: "main",
895
- collectionName: "users"
896
- },
897
- fields: ["username", "nickname"]
898
- }
899
- ]
900
- }
901
- },
902
- addRecordJsAction: {
903
- target: {
904
- uid: "details-block-uid"
905
- },
906
- type: "js",
907
- settings: {
908
- title: "Inspect record",
909
- type: "default",
910
- version: "1.0.0",
911
- code: "return currentRecord?.id;"
912
- }
913
- },
914
- addBlocks: {
915
- target: {
916
- uid: "page-grid-uid"
917
- },
918
- blocks: [
919
- {
920
- key: "usersTable",
921
- type: "table",
922
- resourceInit: {
923
- dataSourceKey: "main",
924
- collectionName: "users"
925
- },
926
- settings: {
927
- title: "Users table",
928
- pageSize: 50
929
- }
930
- },
931
- {
932
- key: "teamNotes",
933
- type: "markdown",
934
- settings: {
935
- content: "# Team notes"
936
- }
937
- }
938
- ]
939
- },
940
- addFields: {
941
- target: {
942
- uid: "table-block-uid"
943
- },
944
- fields: [
945
- {
946
- key: "username",
947
- fieldPath: "username",
948
- settings: {
949
- title: "User name",
950
- width: 220
951
- },
952
- popup: {
953
- mode: "replace",
954
- blocks: [
955
- {
956
- key: "details",
957
- type: "details",
958
- resource: {
959
- binding: "currentRecord"
960
- },
961
- fields: ["username", "nickname"]
962
- }
963
- ]
964
- }
965
- },
966
- {
967
- key: "nickname",
968
- fieldPath: "nickname",
969
- renderer: "js",
970
- settings: {
971
- label: "Nickname (JS)",
972
- code: "return value;",
973
- version: "1.0.0"
974
- }
975
- }
976
- ]
977
- },
978
- addActions: {
979
- target: {
980
- uid: "filter-form-block-uid"
981
- },
982
- actions: [
983
- {
984
- key: "submit",
985
- type: "submit",
986
- settings: {
987
- title: "Search",
988
- confirm: false
989
- }
990
- },
991
- {
992
- key: "reset",
993
- type: "reset",
994
- settings: {
995
- title: "Reset filters"
996
- }
997
- }
998
- ]
999
- },
1000
- addRecordActions: {
1001
- target: {
1002
- uid: "table-block-uid"
1003
- },
1004
- recordActions: [
1005
- {
1006
- key: "view",
1007
- type: "view",
1008
- settings: {
1009
- title: "View user",
1010
- openView: {
1011
- dataSourceKey: "main",
1012
- collectionName: "users",
1013
- mode: "drawer"
1014
- }
1015
- },
1016
- popup: {
1017
- mode: "replace",
1018
- blocks: [
1019
- {
1020
- key: "details",
1021
- type: "details",
1022
- resource: {
1023
- dataSourceKey: "main",
1024
- collectionName: "users"
1025
- },
1026
- fields: ["username"]
1027
- }
1028
- ]
1029
- }
1030
- },
1031
- {
1032
- key: "edit",
1033
- type: "edit",
1034
- settings: {
1035
- title: "Edit user"
1036
- }
1037
- },
1038
- {
1039
- key: "delete",
1040
- type: "delete",
1041
- settings: {
1042
- title: "Delete user"
1043
- }
1044
- }
1045
- ]
1046
- },
1047
- updateSettings: {
1048
- target: {
1049
- uid: "table-block-uid"
1050
- },
1051
- stepParams: {
1052
- tableSettings: {
1053
- pageSize: {
1054
- pageSize: 50
1055
- },
1056
- tableDensity: {
1057
- size: "middle"
1058
- }
1059
- }
1060
- },
1061
- flowRegistry: {
1062
- beforeRenderApply: {
1063
- key: "beforeRenderApply",
1064
- on: "beforeRender",
1065
- steps: {}
1066
- }
1067
- }
1068
- },
1069
- setEventFlows: {
1070
- target: {
1071
- uid: "view-action-uid"
1072
- },
1073
- flowRegistry: {
1074
- popupSettings: {
1075
- key: "popupSettings",
1076
- on: "click",
1077
- steps: {
1078
- openView: {
1079
- params: {
1080
- title: "Employee details",
1081
- size: "large"
1082
- }
1083
- }
1084
- }
1085
- }
1086
- }
1087
- },
1088
- setLayout: {
1089
- target: {
1090
- uid: "page-grid-uid"
1091
- },
1092
- rows: {
1093
- row1: [["block-a"], ["block-b"]]
1094
- },
1095
- sizes: {
1096
- row1: [12, 12]
1097
- },
1098
- rowOrder: ["row1"]
1099
- },
1100
- moveNode: {
1101
- sourceUid: "block-b",
1102
- targetUid: "block-a",
1103
- position: "before"
1104
- },
1105
- removeNode: {
1106
- target: {
1107
- uid: "obsolete-block-uid"
1108
- }
1109
- },
1110
- mutate: {
1111
- atomic: true,
1112
- ops: [
1113
- {
1114
- opId: "menu",
1115
- type: "createMenu",
1116
- values: {
1117
- title: "Employees",
1118
- type: "item"
1119
- }
1120
- },
1121
- {
1122
- opId: "page",
1123
- type: "createPage",
1124
- values: {
1125
- menuRouteId: {
1126
- ref: "menu.routeId"
1127
- },
1128
- tabTitle: "Overview"
1129
- }
1130
- },
1131
- {
1132
- opId: "table",
1133
- type: "addBlock",
1134
- values: {
1135
- target: {
1136
- uid: {
1137
- ref: "page.tabSchemaUid"
1138
- }
1139
- },
1140
- type: "table",
1141
- resourceInit: {
1142
- dataSourceKey: "main",
1143
- collectionName: "employees"
1144
- }
1145
- }
1146
- },
1147
- {
1148
- type: "addField",
1149
- values: {
1150
- target: {
1151
- uid: {
1152
- ref: "table.uid"
1153
- }
1154
- },
1155
- fieldPath: "nickname"
1156
- }
1157
- }
1158
- ]
1159
- },
1160
- apply: {
1161
- target: {
1162
- uid: "page-grid-uid"
1163
- },
1164
- mode: "replace",
1165
- spec: {
1166
- subModels: {
1167
- items: [
1168
- {
1169
- clientKey: "table-a",
1170
- use: "TableBlockModel",
1171
- stepParams: {
1172
- resourceSettings: {
1173
- init: {
1174
- dataSourceKey: "main",
1175
- collectionName: "employees"
1176
- }
1177
- }
1178
- }
1179
- },
1180
- {
1181
- clientKey: "markdown-a",
1182
- use: "MarkdownBlockModel",
1183
- props: {
1184
- content: "Employee handbook"
1185
- }
1186
- }
1187
- ]
1188
- }
1189
- }
1190
- },
1191
- getPopupQuery: {
1192
- uid: "view-action-uid"
1193
- },
1194
- getPageQuery: {
1195
- pageSchemaUid: "employees-page-schema"
1196
- }
1197
- };
1198
- const FLOW_SURFACES_READ_ACL_NOTE = "Read actions (`get` / `catalog` / `context`) are open to `loggedIn` by default. Write actions still require the `ui.flowSurfaces` snippet.";
1199
- const actionDocs = {
1200
- catalog: {
1201
- tags: [FLOW_SURFACES_TAG],
1202
- summary: "List capabilities available in the current surface context",
1203
- description: valuesCompatibilityNote(
1204
- `Returns the block / field / action capabilities that can be created under the current target context, together with the recommended \`configureOptions\`, the underlying settings contract, event capabilities, and layout capabilities for the current node. The returned \`blocks[] / actions[] / recordActions[]\` only represent the truly available public capabilities under plugins enabled in the current instance. ${FLOW_SURFACES_READ_ACL_NOTE}`
1205
- ),
1206
- requestBody: requestBody("FlowSurfaceCatalogRequest", examples.catalog),
1207
- responses: responses("FlowSurfaceCatalogResponse")
1208
- },
1209
- context: {
1210
- tags: [FLOW_SURFACES_TAG],
1211
- summary: "Read ctx variable tree available under the current target",
1212
- description: valuesCompatibilityNote(
1213
- `Returns the \`ctx\` variable tree available under the current target. \`path\` only accepts bare paths such as \`record\`, \`popup.record\`, and \`item.parentItem.value\`. Do not pass \`ctx.record\` or \`{{ ctx.record }}\`. ${FLOW_SURFACES_READ_ACL_NOTE}`
1214
- ),
1215
- requestBody: requestBody("FlowSurfaceContextRequest", examples.context),
1216
- responses: responses("FlowSurfaceContextResponse")
1217
- },
1218
- get: {
1219
- tags: [FLOW_SURFACES_TAG],
1220
- summary: "Read normalized surface tree and route metadata",
1221
- description: [
1222
- "Reads the normalized Flow surface readback result as the stable read endpoint for CLI and orchestration tools.",
1223
- "",
1224
- "Only root-level locator fields are accepted. Exactly one of the following four fields must be used as the locator.",
1225
- "Do not wrap the payload with `{ target: { ... } }`.",
1226
- "Do not wrap the payload with `{ values: { ... } }`.",
1227
- FLOW_SURFACES_READ_ACL_NOTE,
1228
- "The `target` in the response only keeps lightweight locator information. Read the full node tree from `tree`.",
1229
- "Tabs for route-backed pages are always read from `tree.subModels.tabs`. Top-level `tabs` / `tabTrees` are no longer returned separately.",
1230
- "",
1231
- `Example: GET /api/flowSurfaces:get?uid=${examples.getPopupQuery.uid}`,
1232
- `Example: GET /api/flowSurfaces:get?pageSchemaUid=${examples.getPageQuery.pageSchemaUid}`
1233
- ].join("\n"),
1234
- parameters: [
1235
- parameterRef("flowSurfaceTargetUid"),
1236
- parameterRef("flowSurfaceTargetPageSchemaUid"),
1237
- parameterRef("flowSurfaceTargetTabSchemaUid"),
1238
- parameterRef("flowSurfaceTargetRouteId")
1239
- ],
1240
- responses: responses("FlowSurfaceGetResponse")
432
+ responses: responses("FlowSurfaceApplyBlueprintResponse")
1241
433
  },
434
+ ...templateActionDocs,
1242
435
  compose: {
1243
436
  tags: [FLOW_SURFACES_TAG],
1244
437
  summary: "Compose blocks, fields, actions and simple layout under an existing surface",
1245
438
  description: valuesCompatibilityNote(
1246
- "Organizes content under an existing page/tab/grid/popup using the public block/action/field semantics. This is the preferred creation entry for AI callers. The caller does not need to pass raw `use`, `fieldUse`, or `stepParams`. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene."
439
+ 'Organizes content under an existing page/tab/grid/popup using the public block/action/field semantics as a low-level building primitive. The caller does not need to pass raw `use`, `fieldUse`, or `stepParams`. Blocks, fields, and actions can declare stable `key` values, and the compose result returns the same keys so later orchestration can reference nested popup or form nodes deterministically. Blocks may be created from `template`, and form templates can set `template.usage="fields"` to import only their grid fields. Popup-capable actions and fields may reuse `popup.template`. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene.'
1247
440
  ),
1248
441
  requestBody: {
1249
442
  required: true,
@@ -1253,31 +446,31 @@ const actionDocs = {
1253
446
  examples: {
1254
447
  filterTable: {
1255
448
  summary: "Compose a filter-form and table with block actions, record actions and a simple 3:7 row layout",
1256
- value: examples.compose
449
+ value: import_flow_surfaces.flowSurfaceExamples.compose
1257
450
  },
1258
451
  popupCurrentRecord: {
1259
452
  summary: "Compose a current-record details block under a record popup surface",
1260
- value: examples.composePopupCurrentRecord
453
+ value: import_flow_surfaces.flowSurfaceExamples.composePopupCurrentRecord
1261
454
  },
1262
455
  popupAssociatedRecords: {
1263
456
  summary: "Compose an associated-records table under an association-field popup surface",
1264
- value: examples.composePopupAssociatedRecords
457
+ value: import_flow_surfaces.flowSurfaceExamples.composePopupAssociatedRecords
1265
458
  },
1266
459
  staticBlocks: {
1267
460
  summary: "Compose markdown, iframe and action-panel blocks with simple settings",
1268
- value: examples.composeStatic
461
+ value: import_flow_surfaces.flowSurfaceExamples.composeStatic
1269
462
  },
1270
463
  listRich: {
1271
464
  summary: "Compose a list block with item fields, block actions and record actions",
1272
- value: examples.composeListRich
465
+ value: import_flow_surfaces.flowSurfaceExamples.composeListRich
1273
466
  },
1274
467
  gridCardRich: {
1275
468
  summary: "Compose a grid-card block with item fields, block actions and record actions",
1276
- value: examples.composeGridCardRich
469
+ value: import_flow_surfaces.flowSurfaceExamples.composeGridCardRich
1277
470
  },
1278
471
  jsBlock: {
1279
472
  summary: "Compose a JS block with simple code/version/title settings",
1280
- value: examples.composeJsBlock
473
+ value: import_flow_surfaces.flowSurfaceExamples.composeJsBlock
1281
474
  }
1282
475
  }
1283
476
  }
@@ -1289,7 +482,7 @@ const actionDocs = {
1289
482
  tags: [FLOW_SURFACES_TAG],
1290
483
  summary: "Apply simple semantic changes to a page, tab, block, field or action",
1291
484
  description: valuesCompatibilityNote(
1292
- "Uses simple `changes` to update high-frequency settings such as page/tab titles, table pageSize, field clickToOpen, and action openView/confirm without requiring the caller to know internal paths. Check `catalog(target).configureOptions` before calling this action."
485
+ "Uses simple `changes` to update high-frequency settings such as page/tab titles, table pageSize, field clickToOpen, and action openView/confirm without requiring the caller to know internal paths. For advanced reaction authoring, prefer `getReactionMeta` + `set*Rules`; the raw `assignRules` / `linkageRules` examples here are compatibility-only. Check `catalog.node.configureOptions` together with the relevant catalog item `configureOptions` before calling this action."
1293
486
  ),
1294
487
  requestBody: {
1295
488
  required: true,
@@ -1299,63 +492,63 @@ const actionDocs = {
1299
492
  examples: {
1300
493
  fieldOpenView: {
1301
494
  summary: "Configure a field to click and open a popup view",
1302
- value: examples.configure
495
+ value: import_flow_surfaces.flowSurfaceExamples.configure
1303
496
  },
1304
497
  associationFieldPopup: {
1305
498
  summary: "Configure a to-many association display field to open the clicked associated record in a popup",
1306
- value: examples.configureAssociationPopup
499
+ value: import_flow_surfaces.flowSurfaceExamples.configureAssociationPopup
1307
500
  },
1308
501
  blockSettings: {
1309
502
  summary: "Configure a list block with simple pageSize/dataScope/sorting/layout changes",
1310
- value: examples.configureBlock
503
+ value: import_flow_surfaces.flowSurfaceExamples.configureBlock
1311
504
  },
1312
505
  actionSettings: {
1313
506
  summary: "Configure an action with button appearance, confirm dialog and assign values",
1314
- value: examples.configureAction
507
+ value: import_flow_surfaces.flowSurfaceExamples.configureAction
1315
508
  },
1316
509
  jsBlockSettings: {
1317
510
  summary: "Configure a JS block with decorator props and runJs code/version",
1318
- value: examples.configureJsBlock
511
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsBlock
1319
512
  },
1320
513
  jsActionSettings: {
1321
514
  summary: "Configure a JS action with button text and runJs code/version",
1322
- value: examples.configureJsAction
515
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsAction
1323
516
  },
1324
517
  jsItemActionSettings: {
1325
518
  summary: "Configure a form JS item action with button text and runJs code/version",
1326
- value: examples.configureJsItemAction
519
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsItemAction
1327
520
  },
1328
521
  jsFieldSettings: {
1329
522
  summary: "Configure a JS field wrapper and inner JS field with code/version",
1330
- value: examples.configureJsField
523
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsField
1331
524
  },
1332
525
  jsColumnSettings: {
1333
526
  summary: "Configure a JS column with width/fixed/code/version",
1334
- value: examples.configureJsColumn
527
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsColumn
1335
528
  },
1336
529
  jsItemSettings: {
1337
530
  summary: "Configure a JS item with label and runJs code/version",
1338
- value: examples.configureJsItem
531
+ value: import_flow_surfaces.flowSurfaceExamples.configureJsItem
1339
532
  },
1340
533
  pageHeaderSettings: {
1341
534
  summary: "Configure page icon and enableHeader using configureOptions",
1342
- value: examples.configurePage
535
+ value: import_flow_surfaces.flowSurfaceExamples.configurePage
1343
536
  },
1344
537
  tableAdvancedSettings: {
1345
538
  summary: "Configure advanced table simple keys such as quickEdit/treeTable/dragSort",
1346
- value: examples.configureTableAdvanced
539
+ value: import_flow_surfaces.flowSurfaceExamples.configureTableAdvanced
1347
540
  },
1348
541
  editFormSettings: {
1349
542
  summary: "Configure edit form colon and dataScope with a FilterGroup",
1350
- value: examples.configureEditForm
543
+ value: import_flow_surfaces.flowSurfaceExamples.configureEditForm
1351
544
  },
1352
- detailsSettings: {
1353
- summary: "Configure details colon and linkageRules",
1354
- value: examples.configureDetails
545
+ detailsCompatibilitySettings: {
546
+ summary: "Configure details colon and raw low-level linkageRules compatibility payload",
547
+ value: import_flow_surfaces.flowSurfaceExamples.configureDetailsCompatibility
1355
548
  },
1356
- actionBehaviorSettings: {
1357
- summary: "Configure action linkageRules, edit/update/duplicate modes, collapsed rows and email selection defaults",
1358
- value: examples.configureActionModes
549
+ actionBehaviorCompatibilitySettings: {
550
+ summary: "Configure action edit/update/duplicate modes plus raw low-level linkageRules compatibility payload",
551
+ value: import_flow_surfaces.flowSurfaceExamples.configureActionModesCompatibility
1359
552
  }
1360
553
  }
1361
554
  }
@@ -1369,7 +562,7 @@ const actionDocs = {
1369
562
  description: valuesCompatibilityNote(
1370
563
  'Creates a FlowSurfaces menu node. `type="group"` creates a menu group. `type="item"` creates a menu item that can be bound to a modern page (v2), and automatically fills in the flowPage route, the default hidden tab route, and the RootPageModel anchor.'
1371
564
  ),
1372
- requestBody: requestBody("FlowSurfaceCreateMenuRequest", examples.createMenu),
565
+ requestBody: requestBody("FlowSurfaceCreateMenuRequest", import_flow_surfaces.flowSurfaceExamples.createMenu),
1373
566
  responses: responses("FlowSurfaceCreateMenuResult")
1374
567
  },
1375
568
  updateMenu: {
@@ -1378,7 +571,7 @@ const actionDocs = {
1378
571
  description: valuesCompatibilityNote(
1379
572
  "Updates menu display information, or moves a group / item to the top level or under another group. Only `group` and `flowPage` menu nodes are supported."
1380
573
  ),
1381
- requestBody: requestBody("FlowSurfaceUpdateMenuRequest", examples.updateMenu),
574
+ requestBody: requestBody("FlowSurfaceUpdateMenuRequest", import_flow_surfaces.flowSurfaceExamples.updateMenu),
1382
575
  responses: responses("FlowSurfaceUpdateMenuResult")
1383
576
  },
1384
577
  createPage: {
@@ -1387,7 +580,7 @@ const actionDocs = {
1387
580
  description: valuesCompatibilityNote(
1388
581
  "Initializes a modern page (v2) for an existing bindable menu item through `menuRouteId` first, and fills in the default BlockGridModel. In compatibility mode, if `menuRouteId` is omitted, the old behavior still applies and a top-level menu plus page will be created automatically. Before initialization, do not call page/tab lifecycle actions such as `addTab`, `updateTab`, `moveTab`, `removeTab`, or `destroyPage`."
1389
582
  ),
1390
- requestBody: requestBody("FlowSurfaceCreatePageRequest", examples.createPage),
583
+ requestBody: requestBody("FlowSurfaceCreatePageRequest", import_flow_surfaces.flowSurfaceExamples.createPage),
1391
584
  responses: responses("FlowSurfaceCreatePageResult")
1392
585
  },
1393
586
  destroyPage: {
@@ -1407,7 +600,7 @@ const actionDocs = {
1407
600
  description: valuesCompatibilityNote(
1408
601
  "Adds a route-backed tab under a page and fills in the corresponding grid anchor. Only `target.uid` is accepted, and it must be the canonical uid of the page. For menu-first pages, `createPage(menuRouteId=...)` must finish initialization first."
1409
602
  ),
1410
- requestBody: requestBody("FlowSurfaceAddTabRequest", examples.addTab),
603
+ requestBody: requestBody("FlowSurfaceAddTabRequest", import_flow_surfaces.flowSurfaceExamples.addTab),
1411
604
  responses: responses("FlowSurfaceAddTabResult")
1412
605
  },
1413
606
  updateTab: {
@@ -1416,7 +609,7 @@ const actionDocs = {
1416
609
  description: valuesCompatibilityNote(
1417
610
  "Updates the route-backed fields on the tab route and its matching synthetic RootPageTabModel. Only `target.uid` is accepted, and it must be a tab uid. Pre-created tabs under uninitialized pages are not supported by this action."
1418
611
  ),
1419
- requestBody: requestBody("FlowSurfaceUpdateTabRequest", examples.updateTab),
612
+ requestBody: requestBody("FlowSurfaceUpdateTabRequest", import_flow_surfaces.flowSurfaceExamples.updateTab),
1420
613
  responses: responses("FlowSurfaceUpdateTabResult")
1421
614
  },
1422
615
  moveTab: {
@@ -1449,7 +642,7 @@ const actionDocs = {
1449
642
  description: valuesCompatibilityNote(
1450
643
  "Adds a persisted child-tab subtree under an existing popup page (`ChildPageModel`). It only works on `ChildPageModel / ChildPageTabModel`, does not read or write `desktopRoutes`, and does not auto-create a popup page."
1451
644
  ),
1452
- requestBody: requestBody("FlowSurfaceAddPopupTabRequest", examples.addPopupTab),
645
+ requestBody: requestBody("FlowSurfaceAddPopupTabRequest", import_flow_surfaces.flowSurfaceExamples.addPopupTab),
1453
646
  responses: responses("FlowSurfaceAddPopupTabResult")
1454
647
  },
1455
648
  updatePopupTab: {
@@ -1458,7 +651,7 @@ const actionDocs = {
1458
651
  description: valuesCompatibilityNote(
1459
652
  "Updates the props / stepParams / flowRegistry of a popup child tab (`ChildPageTabModel`) itself. Route-backed tab semantics are not involved."
1460
653
  ),
1461
- requestBody: requestBody("FlowSurfaceUpdatePopupTabRequest", examples.updatePopupTab),
654
+ requestBody: requestBody("FlowSurfaceUpdatePopupTabRequest", import_flow_surfaces.flowSurfaceExamples.updatePopupTab),
1462
655
  responses: responses("FlowSurfaceUpdatePopupTabResult")
1463
656
  },
1464
657
  movePopupTab: {
@@ -1467,7 +660,7 @@ const actionDocs = {
1467
660
  description: valuesCompatibilityNote(
1468
661
  "Reorders `subModels.tabs` under the same popup page. Only root-level `sourceUid` / `targetUid` are accepted, and both must be sibling popup-tab uids."
1469
662
  ),
1470
- requestBody: requestBody("FlowSurfaceMovePopupTabRequest", examples.movePopupTab),
663
+ requestBody: requestBody("FlowSurfaceMovePopupTabRequest", import_flow_surfaces.flowSurfaceExamples.movePopupTab),
1471
664
  responses: responses("FlowSurfaceMovePopupTabResult")
1472
665
  },
1473
666
  removePopupTab: {
@@ -1476,14 +669,14 @@ const actionDocs = {
1476
669
  description: valuesCompatibilityNote(
1477
670
  "Removes the specified popup child-tab subtree. It is valid for the popup to end with 0 tabs. `removePopup` is not provided in this iteration, and the popup page is not required to keep at least one tab."
1478
671
  ),
1479
- requestBody: requestBody("FlowSurfaceRemovePopupTabRequest", examples.removePopupTab),
672
+ requestBody: requestBody("FlowSurfaceRemovePopupTabRequest", import_flow_surfaces.flowSurfaceExamples.removePopupTab),
1480
673
  responses: responses("FlowSurfaceRemovePopupTabResult")
1481
674
  },
1482
675
  addBlock: {
1483
676
  tags: [FLOW_SURFACES_TAG],
1484
677
  summary: "Add a block under a surface or grid container",
1485
678
  description: valuesCompatibilityNote(
1486
- "Creates a block by catalog key or an explicitly supported block use. Popup-capable host nodes automatically receive the popup shell. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first, then pass the semantic `resource.binding`. The lower-level `resourceInit` is still accepted for compatibility, but the server validates it against popup semantics. `resource` and `resourceInit` are mutually exclusive. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` / `catalog.configureOptions`."
679
+ 'Creates a block by catalog key or an explicitly supported block use. It can also create from `template`, using `mode="reference"` or `mode="copy"`. Form templates may set `template.usage="fields"` to create a fresh host block and import only its grid fields. Popup-capable host nodes automatically receive the popup shell. For collection blocks under a popup, check `catalog.blocks[].resourceBindings` first, then pass the semantic `resource.binding`. The lower-level `resourceInit` is still accepted for compatibility, but the server validates it against popup semantics. `resource` and `resourceInit` are mutually exclusive. The `select / subForm / bulkEditForm` scene is currently recognized only, and popup collection block creation is not supported in that scene. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`.'
1487
680
  ),
1488
681
  requestBody: {
1489
682
  required: true,
@@ -1493,19 +686,19 @@ const actionDocs = {
1493
686
  examples: {
1494
687
  popupCurrentRecord: {
1495
688
  summary: "Create a current-record details block under a popup-capable host node",
1496
- value: examples.addBlock
689
+ value: import_flow_surfaces.flowSurfaceExamples.addBlock
1497
690
  },
1498
691
  popupAssociatedRecords: {
1499
692
  summary: "Create an associated-records table block under an association-field popup host node",
1500
- value: examples.addPopupAssociatedBlock
693
+ value: import_flow_surfaces.flowSurfaceExamples.addPopupAssociatedBlock
1501
694
  },
1502
695
  popupOtherRecords: {
1503
696
  summary: "Create a table bound to another collection explicitly under a popup host node",
1504
- value: examples.addPopupOtherRecordsBlock
697
+ value: import_flow_surfaces.flowSurfaceExamples.addPopupOtherRecordsBlock
1505
698
  },
1506
699
  jsBlock: {
1507
700
  summary: "Create a JS block directly under a page/tab/grid container",
1508
- value: examples.addJsBlock
701
+ value: import_flow_surfaces.flowSurfaceExamples.addJsBlock
1509
702
  }
1510
703
  }
1511
704
  }
@@ -1517,7 +710,7 @@ const actionDocs = {
1517
710
  tags: [FLOW_SURFACES_TAG],
1518
711
  summary: "Add a field wrapper and inner field under a field container",
1519
712
  description: valuesCompatibilityNote(
1520
- "Automatically derives the wrapper/inner-field combination from the container use and the field interface. `fieldUse` is only kept as a compatibility check and is no longer an arbitrary creation entry. Direct add does not accept raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` / `catalog.configureOptions`. Popup-capable fields can also pass `popup` directly to append a popup subtree. If local openView is enabled but no popup content is provided, the server fills in the popup page/tab/grid shell automatically."
713
+ "Automatically derives the wrapper/inner-field combination from the container use and the field interface. It can also import a form template through `template`, using `reference` or `copy` mode for the target form grid. `fieldUse` is only kept as a compatibility check and is no longer an arbitrary creation entry. Direct add does not accept raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse the public configuration semantics from `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable fields can also pass `popup` directly to append a local popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. If local openView is enabled but no popup content is provided, the server fills in the popup page/tab/grid shell automatically."
1521
714
  ),
1522
715
  requestBody: {
1523
716
  required: true,
@@ -1527,19 +720,23 @@ const actionDocs = {
1527
720
  examples: {
1528
721
  directField: {
1529
722
  summary: "Create a JS renderer bound field under a create form",
1530
- value: examples.addField
723
+ value: import_flow_surfaces.flowSurfaceExamples.addField
1531
724
  },
1532
725
  associationField: {
1533
726
  summary: "Create an association-path field under a table block",
1534
- value: examples.addAssociationField
727
+ value: import_flow_surfaces.flowSurfaceExamples.addAssociationField
1535
728
  },
1536
729
  jsColumn: {
1537
730
  summary: "Create a standalone JS column under a table field container",
1538
- value: examples.addJsColumn
731
+ value: import_flow_surfaces.flowSurfaceExamples.addJsColumn
1539
732
  },
1540
733
  jsItem: {
1541
734
  summary: "Create a standalone JS item under a form field container",
1542
- value: examples.addJsItem
735
+ value: import_flow_surfaces.flowSurfaceExamples.addJsItem
736
+ },
737
+ popupTemplate: {
738
+ summary: "Create a bound field that reuses a saved popup template",
739
+ value: import_flow_surfaces.flowSurfaceExamples.addFieldPopupTemplate
1543
740
  }
1544
741
  }
1545
742
  }
@@ -1551,7 +748,7 @@ const actionDocs = {
1551
748
  tags: [FLOW_SURFACES_TAG],
1552
749
  summary: "Add a non-record action under an allowed block/form/filter-form/action-panel container",
1553
750
  description: valuesCompatibilityNote(
1554
- "Only non-record actions that are public in the catalog and visible in the current container may be created. Typical cases include table block actions, form submit, filter-form reset, and action-panel actions. Use `addRecordAction` for record actions. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse `configure.changes` / `catalog.configureOptions`. Popup-capable actions may also include `popup` directly to append a popup subtree."
751
+ "Only non-record actions that are public in the catalog and visible in the current container may be created. Typical cases include table block actions, form submit, filter-form reset, and action-panel actions. Use `addRecordAction` for record actions. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse `configure.changes` plus the catalog item/node `configureOptions`. Popup-capable actions may also include `popup` directly to append a popup subtree or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored."
1555
752
  ),
1556
753
  requestBody: {
1557
754
  required: true,
@@ -1561,19 +758,19 @@ const actionDocs = {
1561
758
  examples: {
1562
759
  submit: {
1563
760
  summary: "Create a submit action under a filter-form action container",
1564
- value: examples.addAction
761
+ value: import_flow_surfaces.flowSurfaceExamples.addAction
1565
762
  },
1566
763
  link: {
1567
764
  summary: "Create a link action under a table block action container",
1568
- value: examples.addLinkAction
765
+ value: import_flow_surfaces.flowSurfaceExamples.addLinkAction
1569
766
  },
1570
767
  js: {
1571
768
  summary: "Create a JS action under an action-panel container",
1572
- value: examples.addJsAction
769
+ value: import_flow_surfaces.flowSurfaceExamples.addJsAction
1573
770
  },
1574
771
  jsItem: {
1575
772
  summary: "Create a form JS item action under a create/edit/form action container",
1576
- value: examples.addJsItemAction
773
+ value: import_flow_surfaces.flowSurfaceExamples.addJsItemAction
1577
774
  }
1578
775
  }
1579
776
  }
@@ -1585,7 +782,7 @@ const actionDocs = {
1585
782
  tags: [FLOW_SURFACES_TAG],
1586
783
  summary: "Add a record action under a record-capable owner target",
1587
784
  description: valuesCompatibilityNote(
1588
- "Only record actions that are public in the catalog and visible in the current container may be created. The public target must be a record-capable owner target such as table/details/list/gridCard. Do not pass internal container uids such as a table actions column or a list/gridCard item. Direct add does not accept raw `props` / `decoratorProps` / `stepParams` / `flowRegistry`. Use `settings` and reuse `configure.changes` / `catalog.configureOptions`. Popup-capable actions may also include `popup` directly to append a popup subtree."
785
+ `Only record actions that are public in the catalog and visible in the current container may be created. The public target must be a record-capable owner target such as table/details/list/gridCard. Do not pass internal container uids such as a table actions column or a list/gridCard item. ${ADD_CHILD_TREE_TABLE_NOTE} Direct add does not accept raw \`props\` / \`decoratorProps\` / \`stepParams\` / \`flowRegistry\`. Use \`settings\` and reuse \`configure.changes\` plus the catalog item/node \`configureOptions\`. Popup-capable actions may also include \`popup\` directly to append a popup subtree or \`popup.template\` to reuse a saved popup template in \`reference\` / \`copy\` mode. When \`popup.template\` is present, \`popup.title\` still applies, while local \`popup.mode\` / \`popup.blocks\` / \`popup.layout\` are accepted but ignored.`
1589
786
  ),
1590
787
  requestBody: {
1591
788
  required: true,
@@ -1595,11 +792,15 @@ const actionDocs = {
1595
792
  examples: {
1596
793
  view: {
1597
794
  summary: "Create a view action under a table record-action owner target",
1598
- value: examples.addRecordAction
795
+ value: import_flow_surfaces.flowSurfaceExamples.addRecordAction
796
+ },
797
+ addChild: {
798
+ summary: "Create an addChild record action on a tree table target",
799
+ value: import_flow_surfaces.flowSurfaceExamples.addRecordAddChildAction
1599
800
  },
1600
801
  js: {
1601
802
  summary: "Create a JS record action under a details block owner target",
1602
- value: examples.addRecordJsAction
803
+ value: import_flow_surfaces.flowSurfaceExamples.addRecordJsAction
1603
804
  }
1604
805
  }
1605
806
  }
@@ -1611,36 +812,53 @@ const actionDocs = {
1611
812
  tags: [FLOW_SURFACES_TAG],
1612
813
  summary: "Add multiple blocks sequentially under the same target",
1613
814
  description: valuesCompatibilityNote(
1614
- "Creates multiple blocks sequentially under the same target. Each item may include `settings`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
815
+ "Creates multiple blocks sequentially under the same target. Each item may include `settings` or `template`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
1615
816
  ),
1616
- requestBody: requestBody("FlowSurfaceAddBlocksRequest", examples.addBlocks),
817
+ requestBody: requestBody("FlowSurfaceAddBlocksRequest", import_flow_surfaces.flowSurfaceExamples.addBlocks),
1617
818
  responses: responses("FlowSurfaceAddBlocksResult")
1618
819
  },
1619
820
  addFields: {
1620
821
  tags: [FLOW_SURFACES_TAG],
1621
822
  summary: "Add multiple fields sequentially under the same target",
1622
823
  description: valuesCompatibilityNote(
1623
- "Creates multiple fields sequentially under the same target. Each item may include `settings`, and popup-capable fields may also include `popup`, but raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
824
+ "Creates multiple fields sequentially under the same target. The request may either import one shared `template` or create explicit `fields[]`. Each item may include `settings`, and popup-capable fields may also include `popup` directly for local popup content or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. Raw `wrapperProps` / `fieldProps` / `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Results are returned in input order as `index/key/ok/result/error`, and each `error` always includes `message/type/code/status`."
1624
825
  ),
1625
- requestBody: requestBody("FlowSurfaceAddFieldsRequest", examples.addFields),
826
+ requestBody: requestBody("FlowSurfaceAddFieldsRequest", import_flow_surfaces.flowSurfaceExamples.addFields),
1626
827
  responses: responses("FlowSurfaceAddFieldsResult")
1627
828
  },
1628
829
  addActions: {
1629
830
  tags: [FLOW_SURFACES_TAG],
1630
831
  summary: "Add multiple non-record actions sequentially under the same target",
1631
832
  description: valuesCompatibilityNote(
1632
- "Creates multiple non-record actions sequentially under the same target. Each item may include `settings`, and popup-capable actions may also include `popup`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply. Record actions do not belong to this entry and should use `addRecordActions` instead. Each failed item always returns an `error` with `message/type/code/status`."
833
+ "Creates multiple non-record actions sequentially under the same target. Each item may include `settings`, and popup-capable actions may also include `popup` directly for local popup content or `popup.template` to reuse a saved popup template in `reference` / `copy` mode. When `popup.template` is present, `popup.title` still applies, while local `popup.mode` / `popup.blocks` / `popup.layout` are accepted but ignored. Raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply. Record actions do not belong to this entry and should use `addRecordActions` instead. Each failed item always returns an `error` with `message/type/code/status`."
1633
834
  ),
1634
- requestBody: requestBody("FlowSurfaceAddActionsRequest", examples.addActions),
835
+ requestBody: requestBody("FlowSurfaceAddActionsRequest", import_flow_surfaces.flowSurfaceExamples.addActions),
1635
836
  responses: responses("FlowSurfaceAddActionsResult")
1636
837
  },
1637
838
  addRecordActions: {
1638
839
  tags: [FLOW_SURFACES_TAG],
1639
840
  summary: "Add multiple record actions sequentially under the same record-capable owner target",
1640
841
  description: valuesCompatibilityNote(
1641
- "Creates multiple record actions sequentially under the same target. The target must be a record-capable owner target, and the server resolves the canonical record-action container automatically. Do not pass internal container uids such as a table actions column or a list/gridCard item. Each item may include `settings`, and popup-capable actions may also include `popup`, but raw `props` / `decoratorProps` / `stepParams` / `flowRegistry` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Each failed item always returns an `error` with `message/type/code/status`."
842
+ `Creates multiple record actions sequentially under the same target. The target must be a record-capable owner target, and the server resolves the canonical record-action container automatically. Do not pass internal container uids such as a table actions column or a list/gridCard item. ${ADD_CHILD_TREE_TABLE_NOTE} Each item may include \`settings\`, and popup-capable actions may also include \`popup\` directly for local popup content or \`popup.template\` to reuse a saved popup template in \`reference\` / \`copy\` mode. When \`popup.template\` is present, \`popup.title\` still applies, while local \`popup.mode\` / \`popup.blocks\` / \`popup.layout\` are accepted but ignored. Raw \`props\` / \`decoratorProps\` / \`stepParams\` / \`flowRegistry\` are not accepted. Partial-success semantics apply: a failure in one item does not roll back the others. Each failed item always returns an \`error\` with \`message/type/code/status\`.`
1642
843
  ),
1643
- requestBody: requestBody("FlowSurfaceAddRecordActionsRequest", examples.addRecordActions),
844
+ requestBody: {
845
+ required: true,
846
+ content: {
847
+ "application/json": {
848
+ schema: ref("FlowSurfaceAddRecordActionsRequest"),
849
+ examples: {
850
+ basic: {
851
+ summary: "Create multiple standard record actions under a table owner target",
852
+ value: import_flow_surfaces.flowSurfaceExamples.addRecordActions
853
+ },
854
+ addChild: {
855
+ summary: "Create addChild under a tree table owner target",
856
+ value: import_flow_surfaces.flowSurfaceExamples.addRecordAddChildActions
857
+ }
858
+ }
859
+ }
860
+ }
861
+ },
1644
862
  responses: responses("FlowSurfaceAddRecordActionsResult")
1645
863
  },
1646
864
  updateSettings: {
@@ -1649,7 +867,7 @@ const actionDocs = {
1649
867
  description: valuesCompatibilityNote(
1650
868
  "Updates the specified domain according to the path-level contract exposed by the catalog. Arbitrary raw tree-field patches are not accepted."
1651
869
  ),
1652
- requestBody: requestBody("FlowSurfaceUpdateSettingsRequest", examples.updateSettings),
870
+ requestBody: requestBody("FlowSurfaceUpdateSettingsRequest", import_flow_surfaces.flowSurfaceExamples.updateSettings),
1653
871
  responses: responses("FlowSurfaceUpdateSettingsResult")
1654
872
  },
1655
873
  setEventFlows: {
@@ -1658,7 +876,7 @@ const actionDocs = {
1658
876
  description: valuesCompatibilityNote(
1659
877
  "Fully replaces the instance-level event flows on the current node. The server validates whether eventName, flowKey, stepKey, and the node context are all valid."
1660
878
  ),
1661
- requestBody: requestBody("FlowSurfaceSetEventFlowsRequest", examples.setEventFlows),
879
+ requestBody: requestBody("FlowSurfaceSetEventFlowsRequest", import_flow_surfaces.flowSurfaceExamples.setEventFlows),
1662
880
  responses: responses("FlowSurfaceSetEventFlowsResult")
1663
881
  },
1664
882
  setLayout: {
@@ -1667,14 +885,14 @@ const actionDocs = {
1667
885
  description: valuesCompatibilityNote(
1668
886
  "Fully writes the grid layout. The server strictly validates that every child is covered completely and exactly once."
1669
887
  ),
1670
- requestBody: requestBody("FlowSurfaceSetLayoutRequest", examples.setLayout),
888
+ requestBody: requestBody("FlowSurfaceSetLayoutRequest", import_flow_surfaces.flowSurfaceExamples.setLayout),
1671
889
  responses: responses("FlowSurfaceSetLayoutResult")
1672
890
  },
1673
891
  moveNode: {
1674
892
  tags: [FLOW_SURFACES_TAG],
1675
893
  summary: "Move a node before or after a sibling under the same parent",
1676
894
  description: valuesCompatibilityNote("Only sibling-node reordering under the same parent/subKey is supported."),
1677
- requestBody: requestBody("FlowSurfaceMoveNodeRequest", examples.moveNode),
895
+ requestBody: requestBody("FlowSurfaceMoveNodeRequest", import_flow_surfaces.flowSurfaceExamples.moveNode),
1678
896
  responses: responses("FlowSurfaceMoveNodeResult")
1679
897
  },
1680
898
  removeNode: {
@@ -1683,16 +901,16 @@ const actionDocs = {
1683
901
  description: valuesCompatibilityNote(
1684
902
  "Removes the specified normal node and its subtree. Only `target.uid` is accepted. If you only have `pageSchemaUid / tabSchemaUid / routeId`, call `flowSurfaces:get` first. `removeNode` is not used for page/tab deletion. Use `destroyPage` for pages and `removeTab` for tabs."
1685
903
  ),
1686
- requestBody: requestBody("FlowSurfaceRemoveNodeRequest", examples.removeNode),
904
+ requestBody: requestBody("FlowSurfaceRemoveNodeRequest", import_flow_surfaces.flowSurfaceExamples.removeNode),
1687
905
  responses: responses("FlowSurfaceRemoveNodeResult")
1688
906
  },
1689
907
  mutate: {
1690
908
  tags: [FLOW_SURFACES_TAG],
1691
909
  summary: "Execute multiple operations atomically",
1692
910
  description: valuesCompatibilityNote(
1693
- 'Executes `ops[]` in order and supports `opId` plus `{ref:"<opId>.<field>"}` references to earlier results. V1 only supports `atomic=true`.'
911
+ 'Executes `ops[]` in order and supports `opId` plus `{ step: "<opId>", path: "<field>" }` references to earlier results. `{ key: "<opId>" }` reads the whole previous result object. V1 only supports `atomic=true`.'
1694
912
  ),
1695
- requestBody: requestBody("FlowSurfaceMutateRequest", examples.mutate),
913
+ requestBody: requestBody("FlowSurfaceMutateRequest", import_flow_surfaces.flowSurfaceExamples.mutate),
1696
914
  responses: responses("FlowSurfaceMutationResponse")
1697
915
  },
1698
916
  apply: {
@@ -1701,7 +919,7 @@ const actionDocs = {
1701
919
  description: valuesCompatibilityNote(
1702
920
  'Accepts a complete subtree spec and compiles it into an operation sequence isomorphic to `mutate`. V1 only supports `mode="replace"`.'
1703
921
  ),
1704
- requestBody: requestBody("FlowSurfaceApplyRequest", examples.apply),
922
+ requestBody: requestBody("FlowSurfaceApplyRequest", import_flow_surfaces.flowSurfaceExamples.apply),
1705
923
  responses: responses("FlowSurfaceMutationResponse")
1706
924
  }
1707
925
  };
@@ -1714,7 +932,7 @@ const parameters = {
1714
932
  schema: {
1715
933
  type: "string"
1716
934
  },
1717
- example: examples.getPopupQuery.uid
935
+ example: import_flow_surfaces.flowSurfaceExamples.getPopupQuery.uid
1718
936
  },
1719
937
  flowSurfaceTargetPageSchemaUid: {
1720
938
  name: "pageSchemaUid",
@@ -1748,22 +966,22 @@ const parameters = {
1748
966
  }
1749
967
  };
1750
968
  const schemas = {
1751
- FlowSurfaceMutateRef: {
969
+ FlowSurfaceMutateKey: {
1752
970
  type: "object",
1753
- required: ["ref"],
971
+ required: ["key"],
1754
972
  properties: {
1755
- ref: {
973
+ key: {
1756
974
  type: "string",
1757
- description: "Reference to a previous mutate op result field, for example `page.tabSchemaUid`."
975
+ description: "Reference to a previously created runtime key, for example a prior mutate `opId`."
1758
976
  }
1759
977
  },
1760
978
  additionalProperties: false
1761
979
  },
1762
980
  FlowSurfaceResolvableString: {
1763
- oneOf: [{ type: "string" }, ref("FlowSurfaceMutateRef")]
981
+ oneOf: [{ type: "string" }, ref("FlowSurfaceMutateKey"), ref("FlowSurfacePlanSelectorByStep")]
1764
982
  },
1765
983
  FlowSurfaceResolvableIdentifier: {
1766
- oneOf: [{ type: "string" }, { type: "integer" }, ref("FlowSurfaceMutateRef")]
984
+ oneOf: [{ type: "string" }, { type: "integer" }, ref("FlowSurfaceMutateKey"), ref("FlowSurfacePlanSelectorByStep")]
1767
985
  },
1768
986
  FlowSurfaceWriteTarget: {
1769
987
  type: "object",
@@ -1841,33 +1059,110 @@ const schemas = {
1841
1059
  },
1842
1060
  additionalProperties: false
1843
1061
  },
1844
- FlowSurfaceConfigureOption: {
1062
+ FlowSurfacePlanSelectorByStep: {
1845
1063
  type: "object",
1064
+ required: ["step"],
1846
1065
  properties: {
1847
- type: {
1848
- type: "string",
1849
- enum: ["string", "number", "boolean", "object", "array"]
1066
+ step: {
1067
+ type: "string"
1850
1068
  },
1851
- description: {
1069
+ path: {
1070
+ type: "string"
1071
+ }
1072
+ },
1073
+ additionalProperties: false
1074
+ },
1075
+ FlowSurfaceBindKey: {
1076
+ type: "object",
1077
+ required: ["key", "locator"],
1078
+ properties: {
1079
+ key: {
1852
1080
  type: "string"
1853
1081
  },
1854
- enum: {
1855
- type: "array",
1856
- items: {
1857
- oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }]
1858
- }
1082
+ locator: ref("FlowSurfaceReadLocator"),
1083
+ expectedKind: {
1084
+ type: "string",
1085
+ enum: ["page", "tab", "grid", "block", "fieldHost", "action", "popupHost", "popupPage", "popupTab", "node"]
1859
1086
  },
1860
- example: {},
1861
- supportsFlowContext: {
1087
+ rebind: {
1862
1088
  type: "boolean"
1863
1089
  }
1864
1090
  },
1865
- required: ["type"],
1866
1091
  additionalProperties: false
1867
1092
  },
1868
- FlowSurfaceConfigureOptions: {
1093
+ FlowSurfaceKeyInfo: {
1869
1094
  type: "object",
1870
- additionalProperties: ref("FlowSurfaceConfigureOption")
1095
+ properties: {
1096
+ uid: {
1097
+ type: "string"
1098
+ },
1099
+ kind: {
1100
+ type: "string"
1101
+ },
1102
+ source: {
1103
+ type: "string",
1104
+ enum: ["declared", "request", "system"]
1105
+ },
1106
+ locator: ref("FlowSurfaceReadLocator")
1107
+ },
1108
+ additionalProperties: false
1109
+ },
1110
+ FlowSurfaceKeysMap: {
1111
+ type: "object",
1112
+ additionalProperties: ref("FlowSurfaceKeyInfo")
1113
+ },
1114
+ FlowSurfaceResolvedSelectorSummary: {
1115
+ type: "object",
1116
+ properties: {
1117
+ uid: {
1118
+ type: "string"
1119
+ },
1120
+ kind: {
1121
+ type: "string"
1122
+ },
1123
+ key: {
1124
+ type: "string"
1125
+ },
1126
+ source: {
1127
+ type: "string",
1128
+ enum: ["declared", "request", "system", "step"]
1129
+ },
1130
+ step: {
1131
+ type: "string"
1132
+ },
1133
+ path: {
1134
+ type: "string"
1135
+ }
1136
+ },
1137
+ additionalProperties: false
1138
+ },
1139
+ FlowSurfaceConfigureOption: {
1140
+ type: "object",
1141
+ properties: {
1142
+ type: {
1143
+ type: "string",
1144
+ enum: ["string", "number", "boolean", "object", "array"]
1145
+ },
1146
+ description: {
1147
+ type: "string"
1148
+ },
1149
+ enum: {
1150
+ type: "array",
1151
+ items: {
1152
+ oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }]
1153
+ }
1154
+ },
1155
+ example: {},
1156
+ supportsFlowContext: {
1157
+ type: "boolean"
1158
+ }
1159
+ },
1160
+ required: ["type"],
1161
+ additionalProperties: false
1162
+ },
1163
+ FlowSurfaceConfigureOptions: {
1164
+ type: "object",
1165
+ additionalProperties: ref("FlowSurfaceConfigureOption")
1871
1166
  },
1872
1167
  FlowSurfaceNodeDomain: {
1873
1168
  type: "string",
@@ -2028,6 +1323,10 @@ const schemas = {
2028
1323
  type: "string",
2029
1324
  enum: ["page", "tab", "block", "field", "action"]
2030
1325
  },
1326
+ scope: {
1327
+ type: "string",
1328
+ enum: ["block", "record", "form", "filterForm", "actionPanel"]
1329
+ },
2031
1330
  scene: {
2032
1331
  type: "string"
2033
1332
  },
@@ -2087,6 +1386,106 @@ const schemas = {
2087
1386
  },
2088
1387
  additionalProperties: true
2089
1388
  },
1389
+ FlowSurfaceCatalogSection: {
1390
+ type: "string",
1391
+ enum: ["blocks", "fields", "actions", "recordActions", "node"]
1392
+ },
1393
+ FlowSurfaceCatalogExpand: {
1394
+ type: "string",
1395
+ enum: ["item.configureOptions", "item.contracts", "item.allowedContainerUses", "node.contracts"]
1396
+ },
1397
+ FlowSurfaceCatalogPopupScenario: {
1398
+ type: "object",
1399
+ required: ["kind", "scene", "hasCurrentRecord", "hasAssociationContext"],
1400
+ properties: {
1401
+ kind: {
1402
+ type: "string",
1403
+ enum: ["plainPopup", "recordPopup", "associationPopup"]
1404
+ },
1405
+ scene: {
1406
+ type: "string",
1407
+ enum: ["new", "one", "many", "select", "subForm", "bulkEditForm", "generic"]
1408
+ },
1409
+ hasCurrentRecord: {
1410
+ type: "boolean"
1411
+ },
1412
+ hasAssociationContext: {
1413
+ type: "boolean"
1414
+ }
1415
+ },
1416
+ additionalProperties: false
1417
+ },
1418
+ FlowSurfaceCatalogFieldContainerScenario: {
1419
+ type: "object",
1420
+ required: ["kind"],
1421
+ properties: {
1422
+ kind: {
1423
+ type: "string",
1424
+ enum: ["form", "details", "table", "filter-form"]
1425
+ },
1426
+ targetMode: {
1427
+ type: "string",
1428
+ enum: ["single", "multiple"]
1429
+ }
1430
+ },
1431
+ additionalProperties: false
1432
+ },
1433
+ FlowSurfaceCatalogActionContainerScenario: {
1434
+ type: "object",
1435
+ required: ["scope"],
1436
+ properties: {
1437
+ scope: {
1438
+ type: "string",
1439
+ enum: ["block", "record", "form", "filterForm", "actionPanel"]
1440
+ },
1441
+ ownerUse: {
1442
+ type: "string"
1443
+ },
1444
+ recordActionContainerUse: {
1445
+ type: "string"
1446
+ }
1447
+ },
1448
+ additionalProperties: false
1449
+ },
1450
+ FlowSurfaceCatalogScenario: {
1451
+ type: "object",
1452
+ required: ["surfaceKind"],
1453
+ properties: {
1454
+ surfaceKind: {
1455
+ type: "string",
1456
+ enum: ["global", "page", "tab", "grid", "block", "node"]
1457
+ },
1458
+ popup: ref("FlowSurfaceCatalogPopupScenario"),
1459
+ fieldContainer: ref("FlowSurfaceCatalogFieldContainerScenario"),
1460
+ actionContainer: ref("FlowSurfaceCatalogActionContainerScenario")
1461
+ },
1462
+ additionalProperties: false
1463
+ },
1464
+ FlowSurfaceCatalogNodeInfo: {
1465
+ type: "object",
1466
+ required: ["editableDomains", "configureOptions"],
1467
+ properties: {
1468
+ editableDomains: {
1469
+ type: "array",
1470
+ items: ref("FlowSurfaceNodeDomain")
1471
+ },
1472
+ configureOptions: ref("FlowSurfaceConfigureOptions"),
1473
+ settingsSchema: ANY_OBJECT_SCHEMA,
1474
+ settingsContract: {
1475
+ type: "object",
1476
+ properties: {
1477
+ props: ref("FlowSurfaceDomainContract"),
1478
+ decoratorProps: ref("FlowSurfaceDomainContract"),
1479
+ stepParams: ref("FlowSurfaceDomainContract"),
1480
+ flowRegistry: ref("FlowSurfaceDomainContract")
1481
+ },
1482
+ additionalProperties: false
1483
+ },
1484
+ eventCapabilities: ref("FlowSurfaceEventCapabilities"),
1485
+ layoutCapabilities: ref("FlowSurfaceLayoutCapabilities")
1486
+ },
1487
+ additionalProperties: false
1488
+ },
2090
1489
  FlowSurfaceGetTreeNode: {
2091
1490
  type: "object",
2092
1491
  properties: {
@@ -2112,6 +1511,9 @@ const schemas = {
2112
1511
  decoratorProps: ANY_OBJECT_SCHEMA,
2113
1512
  stepParams: ANY_OBJECT_SCHEMA,
2114
1513
  flowRegistry: ANY_OBJECT_SCHEMA,
1514
+ template: ref("FlowSurfaceBlockTemplateRef"),
1515
+ fieldsTemplate: ref("FlowSurfaceTemplateRef"),
1516
+ popup: ref("FlowSurfacePopupSummary"),
2115
1517
  subModels: {
2116
1518
  type: "object",
2117
1519
  additionalProperties: {
@@ -2251,222 +1653,1372 @@ const schemas = {
2251
1653
  },
2252
1654
  additionalProperties: false
2253
1655
  },
2254
- FlowSurfaceResourceBindingAssociationField: {
1656
+ FlowSurfaceResourceBindingAssociationField: {
1657
+ type: "object",
1658
+ properties: {
1659
+ key: {
1660
+ type: "string"
1661
+ },
1662
+ label: {
1663
+ type: "string"
1664
+ },
1665
+ collectionName: {
1666
+ type: "string"
1667
+ },
1668
+ associationName: {
1669
+ type: "string"
1670
+ }
1671
+ },
1672
+ required: ["key", "label", "collectionName"],
1673
+ additionalProperties: false
1674
+ },
1675
+ FlowSurfaceResourceBindingOption: {
1676
+ type: "object",
1677
+ properties: {
1678
+ key: {
1679
+ type: "string",
1680
+ enum: ["currentCollection", "currentRecord", "associatedRecords", "otherRecords"]
1681
+ },
1682
+ label: {
1683
+ type: "string"
1684
+ },
1685
+ description: {
1686
+ type: "string"
1687
+ },
1688
+ requires: {
1689
+ type: "array",
1690
+ items: {
1691
+ type: "string"
1692
+ }
1693
+ },
1694
+ dataSourceKey: {
1695
+ type: "string"
1696
+ },
1697
+ collectionName: {
1698
+ type: "string"
1699
+ },
1700
+ associationFields: {
1701
+ type: "array",
1702
+ items: ref("FlowSurfaceResourceBindingAssociationField")
1703
+ }
1704
+ },
1705
+ required: ["key", "label"],
1706
+ additionalProperties: false
1707
+ },
1708
+ FlowSurfaceSemanticResourceInput: {
1709
+ type: "object",
1710
+ required: ["binding"],
1711
+ properties: {
1712
+ binding: {
1713
+ type: "string",
1714
+ enum: ["currentCollection", "currentRecord", "associatedRecords", "otherRecords"]
1715
+ },
1716
+ dataSourceKey: {
1717
+ type: "string"
1718
+ },
1719
+ collectionName: {
1720
+ type: "string"
1721
+ },
1722
+ associationField: {
1723
+ type: "string",
1724
+ description: "Canonical association field name for popup `associatedRecords` binding. In applyBlueprint authoring, prefer `associationField`; `associationPathName` is only normalized to this field for convenience when it is a single association field name."
1725
+ }
1726
+ },
1727
+ additionalProperties: false
1728
+ },
1729
+ FlowSurfaceBlockResourceInput: {
1730
+ oneOf: [ref("FlowSurfaceSemanticResourceInput"), ref("FlowSurfaceResourceInit")]
1731
+ },
1732
+ FlowSurfaceMutateResourceInit: {
1733
+ type: "object",
1734
+ properties: {
1735
+ dataSourceKey: ref("FlowSurfaceResolvableString"),
1736
+ collectionName: ref("FlowSurfaceResolvableString"),
1737
+ associationName: ref("FlowSurfaceResolvableString"),
1738
+ associationPathName: ref("FlowSurfaceResolvableString"),
1739
+ sourceId: ref("FlowSurfaceResolvableIdentifier"),
1740
+ filterByTk: ref("FlowSurfaceResolvableIdentifier")
1741
+ },
1742
+ additionalProperties: false
1743
+ },
1744
+ FlowSurfaceCatalogRequest: {
1745
+ type: "object",
1746
+ properties: {
1747
+ target: ref("FlowSurfaceWriteTarget"),
1748
+ sections: {
1749
+ type: "array",
1750
+ items: ref("FlowSurfaceCatalogSection")
1751
+ },
1752
+ expand: {
1753
+ type: "array",
1754
+ items: ref("FlowSurfaceCatalogExpand")
1755
+ }
1756
+ },
1757
+ additionalProperties: false
1758
+ },
1759
+ FlowSurfaceCatalogResponse: {
1760
+ type: "object",
1761
+ properties: {
1762
+ target: {
1763
+ allOf: [ref("FlowSurfaceResolvedTarget")],
1764
+ nullable: true
1765
+ },
1766
+ scenario: ref("FlowSurfaceCatalogScenario"),
1767
+ selectedSections: {
1768
+ type: "array",
1769
+ description: "Final sections returned by the server. When `sections` is omitted from the request, the server smart-selects sections for the current target scenario and clients should treat this field as authoritative.",
1770
+ items: ref("FlowSurfaceCatalogSection")
1771
+ },
1772
+ blocks: {
1773
+ type: "array",
1774
+ items: ref("FlowSurfaceCatalogItem")
1775
+ },
1776
+ fields: {
1777
+ type: "array",
1778
+ items: ref("FlowSurfaceCatalogItem")
1779
+ },
1780
+ actions: {
1781
+ type: "array",
1782
+ description: "Public block/form/filter-form/action-panel actions available under the resolved target.",
1783
+ items: ref("FlowSurfaceCatalogItem")
1784
+ },
1785
+ recordActions: {
1786
+ type: "array",
1787
+ description: "Public record/item-level actions exposed for record-capable targets such as table/details/list/gridCard.",
1788
+ items: ref("FlowSurfaceCatalogItem")
1789
+ },
1790
+ node: ref("FlowSurfaceCatalogNodeInfo")
1791
+ },
1792
+ additionalProperties: false
1793
+ },
1794
+ FlowSurfaceContextVarInfo: {
1795
+ type: "object",
1796
+ properties: {
1797
+ title: {
1798
+ type: "string"
1799
+ },
1800
+ type: {
1801
+ type: "string"
1802
+ },
1803
+ interface: {
1804
+ type: "string"
1805
+ },
1806
+ description: {
1807
+ type: "string"
1808
+ },
1809
+ disabled: {
1810
+ type: "boolean"
1811
+ },
1812
+ disabledReason: {
1813
+ type: "string"
1814
+ },
1815
+ properties: {
1816
+ type: "object",
1817
+ additionalProperties: ref("FlowSurfaceContextVarInfo")
1818
+ }
1819
+ },
1820
+ additionalProperties: false
1821
+ },
1822
+ FlowSurfaceContextRequest: {
1823
+ type: "object",
1824
+ required: ["target"],
1825
+ properties: {
1826
+ target: ref("FlowSurfaceWriteTarget"),
1827
+ path: {
1828
+ type: "string",
1829
+ description: "Bare path only, for example 'record', 'popup.record' or 'item.parentItem.value'."
1830
+ },
1831
+ maxDepth: {
1832
+ type: "integer",
1833
+ minimum: 1
1834
+ }
1835
+ },
1836
+ additionalProperties: false
1837
+ },
1838
+ FlowSurfaceContextResponse: {
1839
+ type: "object",
1840
+ properties: {
1841
+ vars: {
1842
+ type: "object",
1843
+ additionalProperties: ref("FlowSurfaceContextVarInfo")
1844
+ }
1845
+ },
1846
+ additionalProperties: false
1847
+ },
1848
+ FlowSurfaceDescribeSurfaceRequest: {
1849
+ type: "object",
1850
+ required: ["locator"],
1851
+ properties: {
1852
+ locator: ref("FlowSurfaceReadLocator"),
1853
+ bindKeys: {
1854
+ type: "array",
1855
+ items: ref("FlowSurfaceBindKey")
1856
+ }
1857
+ },
1858
+ additionalProperties: false
1859
+ },
1860
+ FlowSurfaceGetResponse: {
1861
+ type: "object",
1862
+ properties: {
1863
+ target: ref("FlowSurfaceReadTarget"),
1864
+ tree: ref("FlowSurfaceGetTreeNode"),
1865
+ nodeMap: ref("FlowSurfaceNodeMap"),
1866
+ pageRoute: ref("FlowSurfaceRouteMeta"),
1867
+ route: ref("FlowSurfaceRouteMeta")
1868
+ },
1869
+ additionalProperties: false
1870
+ },
1871
+ FlowSurfaceDescribeSurfaceResponse: {
1872
+ type: "object",
1873
+ properties: {
1874
+ target: ref("FlowSurfaceReadTarget"),
1875
+ tree: ref("FlowSurfaceGetTreeNode"),
1876
+ nodeMap: ref("FlowSurfaceNodeMap"),
1877
+ pageRoute: ref("FlowSurfaceRouteMeta"),
1878
+ route: ref("FlowSurfaceRouteMeta"),
1879
+ fingerprint: {
1880
+ type: "string"
1881
+ },
1882
+ keys: ref("FlowSurfaceKeysMap")
1883
+ },
1884
+ additionalProperties: false
1885
+ },
1886
+ FlowSurfacePopupSummary: {
1887
+ type: "object",
1888
+ properties: {
1889
+ mode: {
1890
+ type: "string",
1891
+ enum: ["local", "copy"]
1892
+ },
1893
+ pageUid: {
1894
+ type: "string"
1895
+ },
1896
+ tabUid: {
1897
+ type: "string"
1898
+ },
1899
+ gridUid: {
1900
+ type: "string"
1901
+ },
1902
+ template: ref("FlowSurfacePopupTemplateRef")
1903
+ },
1904
+ additionalProperties: false
1905
+ },
1906
+ ...templateSchemas,
1907
+ FlowSurfaceComposeLayoutCell: {
1908
+ oneOf: [
1909
+ {
1910
+ type: "string"
1911
+ },
1912
+ {
1913
+ type: "object",
1914
+ anyOf: [{ required: ["key"] }, { required: ["uid"] }],
1915
+ properties: {
1916
+ key: {
1917
+ type: "string"
1918
+ },
1919
+ uid: {
1920
+ type: "string"
1921
+ },
1922
+ span: {
1923
+ type: "number"
1924
+ }
1925
+ },
1926
+ additionalProperties: false
1927
+ }
1928
+ ]
1929
+ },
1930
+ FlowSurfaceComposeLayout: {
1931
+ type: "object",
1932
+ properties: {
1933
+ rows: {
1934
+ type: "array",
1935
+ items: {
1936
+ type: "array",
1937
+ items: ref("FlowSurfaceComposeLayoutCell")
1938
+ }
1939
+ }
1940
+ },
1941
+ additionalProperties: false
1942
+ },
1943
+ FlowSurfaceComposeFieldSpec: {
1944
+ oneOf: [
1945
+ {
1946
+ type: "string"
1947
+ },
1948
+ {
1949
+ type: "object",
1950
+ required: ["fieldPath"],
1951
+ properties: {
1952
+ key: {
1953
+ type: "string",
1954
+ description: "Optional stable field key returned in compose results."
1955
+ },
1956
+ fieldPath: {
1957
+ type: "string"
1958
+ },
1959
+ renderer: {
1960
+ type: "string",
1961
+ enum: ["js"],
1962
+ description: "Optional public renderer variant for a bound field."
1963
+ },
1964
+ associationPathName: {
1965
+ type: "string"
1966
+ },
1967
+ target: {
1968
+ type: "string",
1969
+ description: "Reference to another compose block key, typically used by filter-form fields."
1970
+ },
1971
+ settings: ANY_OBJECT_SCHEMA,
1972
+ popup: ref("FlowSurfaceComposeFieldPopup")
1973
+ },
1974
+ additionalProperties: false
1975
+ },
1976
+ {
1977
+ type: "object",
1978
+ required: ["type"],
1979
+ properties: {
1980
+ key: {
1981
+ type: "string",
1982
+ description: "Optional stable field key returned in compose results."
1983
+ },
1984
+ type: {
1985
+ type: "string",
1986
+ enum: ["jsColumn", "jsItem"],
1987
+ description: "Standalone synthetic public field capability. Does not accept fieldPath."
1988
+ },
1989
+ settings: ANY_OBJECT_SCHEMA
1990
+ },
1991
+ additionalProperties: false
1992
+ }
1993
+ ]
1994
+ },
1995
+ FlowSurfaceTemplateRef: {
1996
+ type: "object",
1997
+ required: ["uid"],
1998
+ properties: {
1999
+ uid: {
2000
+ type: "string",
2001
+ description: "Saved template uid."
2002
+ },
2003
+ mode: {
2004
+ type: "string",
2005
+ enum: ["reference", "copy"],
2006
+ default: "reference"
2007
+ }
2008
+ },
2009
+ additionalProperties: false
2010
+ },
2011
+ FlowSurfaceBlockTemplateRef: {
2012
+ type: "object",
2013
+ required: ["uid"],
2014
+ properties: {
2015
+ uid: {
2016
+ type: "string"
2017
+ },
2018
+ mode: {
2019
+ type: "string",
2020
+ enum: ["reference", "copy"],
2021
+ default: "reference"
2022
+ },
2023
+ usage: {
2024
+ type: "string",
2025
+ enum: ["block", "fields"],
2026
+ description: "For form templates, choose whether to create the whole block or only import its fields."
2027
+ }
2028
+ },
2029
+ additionalProperties: false
2030
+ },
2031
+ FlowSurfacePopupTemplateRef: {
2032
+ allOf: [ref("FlowSurfaceTemplateRef")]
2033
+ },
2034
+ FlowSurfaceComposeActionPopup: {
2035
+ type: "object",
2036
+ oneOf: [
2037
+ {
2038
+ required: ["template"]
2039
+ },
2040
+ {
2041
+ anyOf: [{ required: ["mode"] }, { required: ["blocks"] }, { required: ["layout"] }]
2042
+ }
2043
+ ],
2044
+ properties: {
2045
+ template: ref("FlowSurfacePopupTemplateRef"),
2046
+ mode: {
2047
+ type: "string",
2048
+ enum: ["append", "replace"]
2049
+ },
2050
+ blocks: {
2051
+ type: "array",
2052
+ items: ref("FlowSurfaceComposeBlockSpec")
2053
+ },
2054
+ layout: ref("FlowSurfaceComposeLayout")
2055
+ },
2056
+ additionalProperties: false
2057
+ },
2058
+ FlowSurfaceComposeFieldPopup: {
2059
+ type: "object",
2060
+ oneOf: [
2061
+ {
2062
+ required: ["template"]
2063
+ },
2064
+ {
2065
+ anyOf: [{ required: ["mode"] }, { required: ["blocks"] }, { required: ["layout"] }]
2066
+ }
2067
+ ],
2068
+ properties: {
2069
+ template: ref("FlowSurfacePopupTemplateRef"),
2070
+ mode: {
2071
+ type: "string",
2072
+ enum: ["append", "replace"]
2073
+ },
2074
+ blocks: {
2075
+ type: "array",
2076
+ items: ref("FlowSurfaceComposeBlockSpec")
2077
+ },
2078
+ layout: ref("FlowSurfaceComposeLayout")
2079
+ },
2080
+ additionalProperties: false
2081
+ },
2082
+ FlowSurfaceComposeActionSpec: {
2083
+ oneOf: [
2084
+ {
2085
+ type: "string"
2086
+ },
2087
+ {
2088
+ type: "object",
2089
+ required: ["type"],
2090
+ properties: {
2091
+ key: {
2092
+ type: "string"
2093
+ },
2094
+ type: {
2095
+ type: "string",
2096
+ enum: NON_RECORD_ACTION_TYPE_ENUM
2097
+ },
2098
+ settings: ANY_OBJECT_SCHEMA,
2099
+ popup: ref("FlowSurfaceComposeActionPopup")
2100
+ },
2101
+ additionalProperties: false
2102
+ }
2103
+ ]
2104
+ },
2105
+ FlowSurfaceComposeRecordActionSpec: {
2106
+ oneOf: [
2107
+ {
2108
+ type: "string"
2109
+ },
2110
+ {
2111
+ type: "object",
2112
+ required: ["type"],
2113
+ properties: {
2114
+ key: {
2115
+ type: "string"
2116
+ },
2117
+ type: {
2118
+ type: "string",
2119
+ enum: RECORD_ACTION_TYPE_ENUM
2120
+ },
2121
+ settings: ANY_OBJECT_SCHEMA,
2122
+ popup: ref("FlowSurfaceComposeActionPopup")
2123
+ },
2124
+ additionalProperties: false
2125
+ }
2126
+ ]
2127
+ },
2128
+ FlowSurfaceComposeBlockSpec: {
2129
+ type: "object",
2130
+ required: ["key"],
2131
+ anyOf: [{ required: ["type"] }, { required: ["template"] }],
2132
+ properties: {
2133
+ key: {
2134
+ type: "string"
2135
+ },
2136
+ type: {
2137
+ type: "string",
2138
+ enum: [
2139
+ "table",
2140
+ "createForm",
2141
+ "editForm",
2142
+ "details",
2143
+ "filterForm",
2144
+ "list",
2145
+ "gridCard",
2146
+ "markdown",
2147
+ "iframe",
2148
+ "chart",
2149
+ "actionPanel",
2150
+ "jsBlock"
2151
+ ]
2152
+ },
2153
+ template: ref("FlowSurfaceBlockTemplateRef"),
2154
+ resource: ref("FlowSurfaceBlockResourceInput"),
2155
+ settings: ANY_OBJECT_SCHEMA,
2156
+ fields: {
2157
+ type: "array",
2158
+ items: ref("FlowSurfaceComposeFieldSpec")
2159
+ },
2160
+ actions: {
2161
+ type: "array",
2162
+ description: "Block-level actions. For table/list/gridCard, prefer block-wide collection actions here.",
2163
+ items: ref("FlowSurfaceComposeActionSpec")
2164
+ },
2165
+ recordActions: {
2166
+ type: "array",
2167
+ description: "Public semantic group for record/item-level actions on record-capable blocks such as table/details/list/gridCard.",
2168
+ items: ref("FlowSurfaceComposeRecordActionSpec")
2169
+ }
2170
+ },
2171
+ additionalProperties: false
2172
+ },
2173
+ FlowSurfaceComposeRequest: {
2174
+ type: "object",
2175
+ required: ["target"],
2176
+ properties: {
2177
+ target: ref("FlowSurfaceWriteTarget"),
2178
+ mode: {
2179
+ type: "string",
2180
+ enum: ["append", "replace"],
2181
+ default: "append"
2182
+ },
2183
+ blocks: {
2184
+ type: "array",
2185
+ items: ref("FlowSurfaceComposeBlockSpec")
2186
+ },
2187
+ layout: ref("FlowSurfaceComposeLayout")
2188
+ },
2189
+ additionalProperties: false
2190
+ },
2191
+ FlowSurfaceComposeFieldResult: {
2192
+ type: "object",
2193
+ properties: {
2194
+ key: {
2195
+ type: "string"
2196
+ },
2197
+ fieldPath: {
2198
+ type: "string"
2199
+ },
2200
+ renderer: {
2201
+ type: "string",
2202
+ enum: ["js"]
2203
+ },
2204
+ type: {
2205
+ type: "string",
2206
+ enum: ["jsColumn", "jsItem"]
2207
+ },
2208
+ uid: {
2209
+ type: "string"
2210
+ },
2211
+ associationPathName: {
2212
+ type: "string",
2213
+ nullable: true
2214
+ },
2215
+ target: {
2216
+ type: "string"
2217
+ },
2218
+ wrapperUid: {
2219
+ type: "string"
2220
+ },
2221
+ fieldUid: {
2222
+ type: "string"
2223
+ },
2224
+ innerFieldUid: {
2225
+ type: "string"
2226
+ },
2227
+ popupPageUid: {
2228
+ type: "string"
2229
+ },
2230
+ popupTabUid: {
2231
+ type: "string"
2232
+ },
2233
+ popupGridUid: {
2234
+ type: "string"
2235
+ }
2236
+ },
2237
+ additionalProperties: false
2238
+ },
2239
+ FlowSurfaceComposeActionResult: {
2240
+ type: "object",
2241
+ properties: {
2242
+ key: {
2243
+ type: "string"
2244
+ },
2245
+ type: {
2246
+ type: "string",
2247
+ enum: ACTION_TYPE_ENUM
2248
+ },
2249
+ scope: {
2250
+ type: "string"
2251
+ },
2252
+ uid: {
2253
+ type: "string"
2254
+ },
2255
+ parentUid: {
2256
+ type: "string"
2257
+ },
2258
+ assignFormUid: {
2259
+ type: "string"
2260
+ },
2261
+ assignFormGridUid: {
2262
+ type: "string"
2263
+ },
2264
+ popupPageUid: {
2265
+ type: "string"
2266
+ },
2267
+ popupTabUid: {
2268
+ type: "string"
2269
+ },
2270
+ popupGridUid: {
2271
+ type: "string"
2272
+ }
2273
+ },
2274
+ additionalProperties: false
2275
+ },
2276
+ FlowSurfaceComposeBlockResult: {
2277
+ type: "object",
2278
+ properties: {
2279
+ key: {
2280
+ type: "string"
2281
+ },
2282
+ type: {
2283
+ type: "string",
2284
+ enum: [
2285
+ "table",
2286
+ "createForm",
2287
+ "editForm",
2288
+ "details",
2289
+ "filterForm",
2290
+ "list",
2291
+ "gridCard",
2292
+ "markdown",
2293
+ "iframe",
2294
+ "chart",
2295
+ "actionPanel",
2296
+ "jsBlock"
2297
+ ]
2298
+ },
2299
+ uid: {
2300
+ type: "string"
2301
+ },
2302
+ gridUid: {
2303
+ type: "string"
2304
+ },
2305
+ itemUid: {
2306
+ type: "string"
2307
+ },
2308
+ itemGridUid: {
2309
+ type: "string"
2310
+ },
2311
+ actionsColumnUid: {
2312
+ type: "string"
2313
+ },
2314
+ fields: {
2315
+ type: "array",
2316
+ items: ref("FlowSurfaceComposeFieldResult")
2317
+ },
2318
+ actions: {
2319
+ type: "array",
2320
+ items: ref("FlowSurfaceComposeActionResult")
2321
+ },
2322
+ recordActions: {
2323
+ type: "array",
2324
+ description: "Returned record/item-level action results for record-capable public compose semantics such as table/details/list/gridCard.",
2325
+ items: ref("FlowSurfaceComposeActionResult")
2326
+ }
2327
+ },
2328
+ additionalProperties: false
2329
+ },
2330
+ FlowSurfaceComposeResult: {
2331
+ type: "object",
2332
+ properties: {
2333
+ target: ref("FlowSurfaceWriteTarget"),
2334
+ mode: {
2335
+ type: "string",
2336
+ enum: ["append", "replace"]
2337
+ },
2338
+ blocks: {
2339
+ type: "array",
2340
+ items: ref("FlowSurfaceComposeBlockResult")
2341
+ },
2342
+ layout: ref("FlowSurfaceSetLayoutResult")
2343
+ },
2344
+ additionalProperties: false
2345
+ },
2346
+ FlowSurfaceReactionKind: {
2347
+ type: "string",
2348
+ enum: ["fieldValue", "blockLinkage", "fieldLinkage", "actionLinkage"]
2349
+ },
2350
+ FlowSurfaceReactionScene: {
2351
+ type: "string",
2352
+ enum: ["form", "block", "action", "details", "subForm"]
2353
+ },
2354
+ FlowSurfaceReactionSlot: {
2355
+ type: "object",
2356
+ required: ["flowKey", "stepKey"],
2357
+ properties: {
2358
+ flowKey: {
2359
+ type: "string",
2360
+ description: "Resolved flow-settings namespace that owns this reaction slot."
2361
+ },
2362
+ stepKey: {
2363
+ type: "string",
2364
+ description: "Resolved step key inside the flow-settings namespace."
2365
+ },
2366
+ valuePath: {
2367
+ type: "string",
2368
+ nullable: true,
2369
+ description: "Optional nested value path when the actual rules array is stored below the step root."
2370
+ }
2371
+ },
2372
+ additionalProperties: false
2373
+ },
2374
+ FlowSurfaceReactionTargetSummary: {
2375
+ type: "object",
2376
+ required: ["uid"],
2377
+ properties: {
2378
+ uid: {
2379
+ type: "string",
2380
+ description: "Resolved live target uid."
2381
+ },
2382
+ publicPath: {
2383
+ type: "string",
2384
+ description: "Resolved public path or bind-key style path when available."
2385
+ }
2386
+ },
2387
+ additionalProperties: false
2388
+ },
2389
+ FlowSurfaceReactionFilter: {
2390
+ type: "object",
2391
+ description: "Recursive public reaction filter object. Paths must use bare ctx-style paths such as `formValues.status` or `record.id`.",
2392
+ additionalProperties: true,
2393
+ example: FILTER_GROUP_EXAMPLE
2394
+ },
2395
+ FlowSurfaceReactionLiteralValueExpr: {
2396
+ type: "object",
2397
+ required: ["source", "value"],
2398
+ properties: {
2399
+ source: {
2400
+ type: "string",
2401
+ enum: ["literal"]
2402
+ },
2403
+ value: {}
2404
+ },
2405
+ additionalProperties: false
2406
+ },
2407
+ FlowSurfaceReactionPathValueExpr: {
2408
+ type: "object",
2409
+ required: ["source", "path"],
2410
+ properties: {
2411
+ source: {
2412
+ type: "string",
2413
+ enum: ["path"]
2414
+ },
2415
+ path: {
2416
+ type: "string",
2417
+ description: "Bare reaction context path such as `formValues.status` or `record.id`."
2418
+ }
2419
+ },
2420
+ additionalProperties: false
2421
+ },
2422
+ FlowSurfaceReactionRunJsValueExpr: {
2423
+ type: "object",
2424
+ required: ["source", "code"],
2425
+ properties: {
2426
+ source: {
2427
+ type: "string",
2428
+ enum: ["runjs"]
2429
+ },
2430
+ code: {
2431
+ type: "string"
2432
+ },
2433
+ version: {
2434
+ type: "string",
2435
+ enum: ["v1", "v2"]
2436
+ }
2437
+ },
2438
+ additionalProperties: false
2439
+ },
2440
+ FlowSurfaceReactionValueExpr: {
2441
+ oneOf: [
2442
+ ref("FlowSurfaceReactionLiteralValueExpr"),
2443
+ ref("FlowSurfaceReactionPathValueExpr"),
2444
+ ref("FlowSurfaceReactionRunJsValueExpr")
2445
+ ]
2446
+ },
2447
+ FlowSurfaceReactionValueExprMeta: {
2448
+ type: "object",
2449
+ required: ["supportedSources", "runjsScene"],
2450
+ properties: {
2451
+ supportedSources: {
2452
+ type: "array",
2453
+ items: {
2454
+ type: "string",
2455
+ enum: ["literal", "path", "runjs"]
2456
+ }
2457
+ },
2458
+ runjsScene: {
2459
+ type: "string",
2460
+ enum: ["fieldValue", "linkage"],
2461
+ description: 'RunJS evaluation scene used by this capability when `source: "runjs"` is allowed.'
2462
+ }
2463
+ },
2464
+ additionalProperties: false
2465
+ },
2466
+ FlowSurfaceReactionConditionMeta: {
2467
+ type: "object",
2468
+ required: ["operatorsByPath"],
2469
+ properties: {
2470
+ operatorsByPath: {
2471
+ type: "object",
2472
+ description: "Allowed operators keyed by bare reaction context path. Use this to drive condition builders instead of guessing path/operator pairs.",
2473
+ additionalProperties: {
2474
+ type: "array",
2475
+ items: {
2476
+ type: "string"
2477
+ }
2478
+ }
2479
+ }
2480
+ },
2481
+ additionalProperties: false
2482
+ },
2483
+ FlowSurfaceReactionSupportedAction: {
2484
+ type: "object",
2485
+ required: ["type"],
2486
+ properties: {
2487
+ type: {
2488
+ type: "string",
2489
+ description: "Public reaction action type available in the resolved scene."
2490
+ },
2491
+ states: {
2492
+ type: "array",
2493
+ description: "Supported state names when the action type is state-based.",
2494
+ items: {
2495
+ type: "string"
2496
+ }
2497
+ }
2498
+ },
2499
+ additionalProperties: false
2500
+ },
2501
+ FlowSurfaceReactionUnavailableCapability: {
2502
+ type: "object",
2503
+ required: ["kind", "code", "reason"],
2504
+ properties: {
2505
+ kind: ref("FlowSurfaceReactionKind"),
2506
+ code: {
2507
+ type: "string"
2508
+ },
2509
+ reason: {
2510
+ type: "string"
2511
+ }
2512
+ },
2513
+ additionalProperties: false
2514
+ },
2515
+ FlowSurfaceFieldOption: {
2516
+ type: "object",
2517
+ required: ["path", "label"],
2518
+ properties: {
2519
+ path: {
2520
+ type: "string",
2521
+ description: "Targetable field path in the resolved scene."
2522
+ },
2523
+ label: {
2524
+ type: "string"
2525
+ },
2526
+ interface: {
2527
+ type: "string"
2528
+ },
2529
+ type: {
2530
+ type: "string"
2531
+ },
2532
+ supportsDefault: {
2533
+ type: "boolean",
2534
+ description: "Whether this field can be targeted by default-value semantics."
2535
+ },
2536
+ supportsAssign: {
2537
+ type: "boolean",
2538
+ description: "Whether this field can be targeted by assignment semantics."
2539
+ },
2540
+ supportsState: {
2541
+ type: "array",
2542
+ description: "Field-state transitions supported for this field in the resolved scene.",
2543
+ items: {
2544
+ type: "string"
2545
+ }
2546
+ }
2547
+ },
2548
+ additionalProperties: false
2549
+ },
2550
+ FlowSurfaceFieldValueRule: {
2551
+ type: "object",
2552
+ required: ["targetPath", "value"],
2553
+ properties: {
2554
+ key: {
2555
+ type: "string"
2556
+ },
2557
+ title: {
2558
+ type: "string"
2559
+ },
2560
+ enabled: {
2561
+ type: "boolean"
2562
+ },
2563
+ targetPath: {
2564
+ type: "string",
2565
+ description: "Field path that receives the computed/default value."
2566
+ },
2567
+ mode: {
2568
+ type: "string",
2569
+ enum: ["default", "assign"],
2570
+ description: "`default` writes default-value semantics, while `assign` writes reactive assignment semantics for the target field."
2571
+ },
2572
+ when: ref("FlowSurfaceReactionFilter"),
2573
+ value: ref("FlowSurfaceReactionValueExpr")
2574
+ },
2575
+ additionalProperties: false
2576
+ },
2577
+ FlowSurfaceReactionRunJsAction: {
2578
+ type: "object",
2579
+ required: ["type", "code"],
2580
+ properties: {
2581
+ key: {
2582
+ type: "string"
2583
+ },
2584
+ type: {
2585
+ type: "string",
2586
+ enum: ["runjs"]
2587
+ },
2588
+ code: {
2589
+ type: "string"
2590
+ },
2591
+ version: {
2592
+ type: "string",
2593
+ enum: ["v1", "v2"]
2594
+ }
2595
+ },
2596
+ additionalProperties: false
2597
+ },
2598
+ FlowSurfaceBlockLinkageActionSetBlockState: {
2599
+ type: "object",
2600
+ required: ["type", "state"],
2601
+ properties: {
2602
+ key: {
2603
+ type: "string"
2604
+ },
2605
+ type: {
2606
+ type: "string",
2607
+ enum: ["setBlockState"]
2608
+ },
2609
+ state: {
2610
+ type: "string",
2611
+ enum: ["visible", "hidden"]
2612
+ }
2613
+ },
2614
+ additionalProperties: false
2615
+ },
2616
+ FlowSurfaceBlockLinkageAction: {
2617
+ oneOf: [ref("FlowSurfaceBlockLinkageActionSetBlockState"), ref("FlowSurfaceReactionRunJsAction")]
2618
+ },
2619
+ FlowSurfaceBlockLinkageRule: {
2620
+ type: "object",
2621
+ required: ["then"],
2622
+ properties: {
2623
+ key: {
2624
+ type: "string"
2625
+ },
2626
+ title: {
2627
+ type: "string"
2628
+ },
2629
+ enabled: {
2630
+ type: "boolean"
2631
+ },
2632
+ when: ref("FlowSurfaceReactionFilter"),
2633
+ then: {
2634
+ type: "array",
2635
+ items: ref("FlowSurfaceBlockLinkageAction")
2636
+ }
2637
+ },
2638
+ additionalProperties: false
2639
+ },
2640
+ FlowSurfaceActionLinkageActionSetActionState: {
2641
+ type: "object",
2642
+ required: ["type", "state"],
2643
+ properties: {
2644
+ key: {
2645
+ type: "string"
2646
+ },
2647
+ type: {
2648
+ type: "string",
2649
+ enum: ["setActionState"]
2650
+ },
2651
+ state: {
2652
+ type: "string",
2653
+ enum: ["visible", "hidden", "hiddenText", "enabled", "disabled"]
2654
+ }
2655
+ },
2656
+ additionalProperties: false
2657
+ },
2658
+ FlowSurfaceActionLinkageAction: {
2659
+ oneOf: [ref("FlowSurfaceActionLinkageActionSetActionState"), ref("FlowSurfaceReactionRunJsAction")]
2660
+ },
2661
+ FlowSurfaceActionLinkageRule: {
2662
+ type: "object",
2663
+ required: ["then"],
2664
+ properties: {
2665
+ key: {
2666
+ type: "string"
2667
+ },
2668
+ title: {
2669
+ type: "string"
2670
+ },
2671
+ enabled: {
2672
+ type: "boolean"
2673
+ },
2674
+ when: ref("FlowSurfaceReactionFilter"),
2675
+ then: {
2676
+ type: "array",
2677
+ items: ref("FlowSurfaceActionLinkageAction")
2678
+ }
2679
+ },
2680
+ additionalProperties: false
2681
+ },
2682
+ FlowSurfaceFieldLinkageAssignItem: {
2255
2683
  type: "object",
2684
+ required: ["targetPath", "value"],
2256
2685
  properties: {
2257
2686
  key: {
2258
2687
  type: "string"
2259
2688
  },
2260
- label: {
2261
- type: "string"
2689
+ enabled: {
2690
+ type: "boolean"
2262
2691
  },
2263
- collectionName: {
2692
+ targetPath: {
2264
2693
  type: "string"
2265
2694
  },
2266
- associationName: {
2267
- type: "string"
2268
- }
2695
+ when: ref("FlowSurfaceReactionFilter"),
2696
+ value: ref("FlowSurfaceReactionValueExpr")
2269
2697
  },
2270
- required: ["key", "label", "collectionName"],
2271
2698
  additionalProperties: false
2272
2699
  },
2273
- FlowSurfaceResourceBindingOption: {
2700
+ FlowSurfaceFieldLinkageActionSetFieldState: {
2274
2701
  type: "object",
2702
+ required: ["type", "fieldPaths", "state"],
2275
2703
  properties: {
2276
2704
  key: {
2277
- type: "string",
2278
- enum: ["currentCollection", "currentRecord", "associatedRecords", "otherRecords"]
2279
- },
2280
- label: {
2281
2705
  type: "string"
2282
2706
  },
2283
- description: {
2284
- type: "string"
2707
+ type: {
2708
+ type: "string",
2709
+ enum: ["setFieldState"]
2285
2710
  },
2286
- requires: {
2711
+ fieldPaths: {
2287
2712
  type: "array",
2288
2713
  items: {
2289
2714
  type: "string"
2290
2715
  }
2291
2716
  },
2292
- dataSourceKey: {
2717
+ state: {
2718
+ type: "string",
2719
+ enum: ["visible", "hidden", "hiddenReservedValue", "required", "notRequired", "disabled", "enabled"]
2720
+ }
2721
+ },
2722
+ additionalProperties: false
2723
+ },
2724
+ FlowSurfaceFieldLinkageActionAssignField: {
2725
+ type: "object",
2726
+ required: ["type", "items"],
2727
+ properties: {
2728
+ key: {
2293
2729
  type: "string"
2294
2730
  },
2295
- collectionName: {
2296
- type: "string"
2731
+ type: {
2732
+ type: "string",
2733
+ enum: ["assignField"]
2297
2734
  },
2298
- associationFields: {
2735
+ items: {
2299
2736
  type: "array",
2300
- items: ref("FlowSurfaceResourceBindingAssociationField")
2737
+ items: ref("FlowSurfaceFieldLinkageAssignItem")
2301
2738
  }
2302
2739
  },
2303
- required: ["key", "label"],
2304
2740
  additionalProperties: false
2305
2741
  },
2306
- FlowSurfaceSemanticResourceInput: {
2742
+ FlowSurfaceFieldLinkageActionSetFieldDefaultValue: {
2307
2743
  type: "object",
2308
- required: ["binding"],
2744
+ required: ["type", "items"],
2309
2745
  properties: {
2310
- binding: {
2746
+ key: {
2747
+ type: "string"
2748
+ },
2749
+ type: {
2311
2750
  type: "string",
2312
- enum: ["currentCollection", "currentRecord", "associatedRecords", "otherRecords"]
2751
+ enum: ["setFieldDefaultValue"]
2313
2752
  },
2314
- dataSourceKey: {
2753
+ items: {
2754
+ type: "array",
2755
+ items: ref("FlowSurfaceFieldLinkageAssignItem")
2756
+ }
2757
+ },
2758
+ additionalProperties: false
2759
+ },
2760
+ FlowSurfaceFieldLinkageAction: {
2761
+ oneOf: [
2762
+ ref("FlowSurfaceFieldLinkageActionSetFieldState"),
2763
+ ref("FlowSurfaceFieldLinkageActionAssignField"),
2764
+ ref("FlowSurfaceFieldLinkageActionSetFieldDefaultValue"),
2765
+ ref("FlowSurfaceReactionRunJsAction")
2766
+ ]
2767
+ },
2768
+ FlowSurfaceFieldLinkageRule: {
2769
+ type: "object",
2770
+ required: ["then"],
2771
+ properties: {
2772
+ key: {
2315
2773
  type: "string"
2316
2774
  },
2317
- collectionName: {
2775
+ title: {
2318
2776
  type: "string"
2319
2777
  },
2320
- associationField: {
2321
- type: "string"
2778
+ enabled: {
2779
+ type: "boolean"
2780
+ },
2781
+ when: ref("FlowSurfaceReactionFilter"),
2782
+ then: {
2783
+ type: "array",
2784
+ items: ref("FlowSurfaceFieldLinkageAction")
2322
2785
  }
2323
2786
  },
2324
2787
  additionalProperties: false
2325
2788
  },
2326
- FlowSurfaceBlockResourceInput: {
2327
- oneOf: [ref("FlowSurfaceSemanticResourceInput"), ref("FlowSurfaceResourceInit")]
2789
+ FlowSurfaceFieldValueCapability: buildReactionCapabilitySchema("fieldValue", "FlowSurfaceFieldValueRule", {
2790
+ targetFields: {
2791
+ type: "array",
2792
+ description: "Fields that can receive field-value writes in the resolved scene.",
2793
+ items: ref("FlowSurfaceFieldOption")
2794
+ },
2795
+ valueExprMeta: {
2796
+ allOf: [ref("FlowSurfaceReactionValueExprMeta")],
2797
+ description: "Allowed value-expression sources for this capability."
2798
+ }
2799
+ }),
2800
+ FlowSurfaceBlockLinkageCapability: buildReactionCapabilitySchema("blockLinkage", "FlowSurfaceBlockLinkageRule", {
2801
+ supportedActions: {
2802
+ type: "array",
2803
+ description: "Block-level reaction actions supported in the resolved scene.",
2804
+ items: ref("FlowSurfaceReactionSupportedAction")
2805
+ },
2806
+ conditionMeta: {
2807
+ allOf: [ref("FlowSurfaceReactionConditionMeta")],
2808
+ description: "Condition-authoring metadata for this capability."
2809
+ }
2810
+ }),
2811
+ FlowSurfaceFieldLinkageCapability: buildReactionCapabilitySchema("fieldLinkage", "FlowSurfaceFieldLinkageRule", {
2812
+ supportedActions: {
2813
+ type: "array",
2814
+ description: "Field-linkage actions supported in the resolved scene.",
2815
+ items: ref("FlowSurfaceReactionSupportedAction")
2816
+ },
2817
+ targetFields: {
2818
+ type: "array",
2819
+ description: "Fields that can be targeted by field-linkage actions in the resolved scene.",
2820
+ items: ref("FlowSurfaceFieldOption")
2821
+ },
2822
+ conditionMeta: {
2823
+ allOf: [ref("FlowSurfaceReactionConditionMeta")],
2824
+ description: "Condition-authoring metadata for this capability."
2825
+ },
2826
+ valueExprMeta: {
2827
+ allOf: [ref("FlowSurfaceReactionValueExprMeta")],
2828
+ description: "Allowed value-expression sources for assignment/default actions in this capability."
2829
+ }
2830
+ }),
2831
+ FlowSurfaceActionLinkageCapability: buildReactionCapabilitySchema("actionLinkage", "FlowSurfaceActionLinkageRule", {
2832
+ supportedActions: {
2833
+ type: "array",
2834
+ description: "Action-linkage actions supported in the resolved scene.",
2835
+ items: ref("FlowSurfaceReactionSupportedAction")
2836
+ },
2837
+ conditionMeta: {
2838
+ allOf: [ref("FlowSurfaceReactionConditionMeta")],
2839
+ description: "Condition-authoring metadata for this capability."
2840
+ }
2841
+ }),
2842
+ FlowSurfaceReactionCapability: {
2843
+ oneOf: [
2844
+ ref("FlowSurfaceFieldValueCapability"),
2845
+ ref("FlowSurfaceBlockLinkageCapability"),
2846
+ ref("FlowSurfaceFieldLinkageCapability"),
2847
+ ref("FlowSurfaceActionLinkageCapability")
2848
+ ]
2328
2849
  },
2329
- FlowSurfaceMutateResourceInit: {
2850
+ FlowSurfaceGetReactionMetaRequest: {
2330
2851
  type: "object",
2852
+ required: ["target"],
2331
2853
  properties: {
2332
- dataSourceKey: ref("FlowSurfaceResolvableString"),
2333
- collectionName: ref("FlowSurfaceResolvableString"),
2334
- associationName: ref("FlowSurfaceResolvableString"),
2335
- associationPathName: ref("FlowSurfaceResolvableString"),
2336
- sourceId: ref("FlowSurfaceResolvableIdentifier"),
2337
- filterByTk: ref("FlowSurfaceResolvableIdentifier")
2854
+ target: ref("FlowSurfaceWriteTarget")
2338
2855
  },
2339
2856
  additionalProperties: false
2340
2857
  },
2341
- FlowSurfaceCatalogRequest: {
2858
+ FlowSurfaceGetReactionMetaResult: {
2342
2859
  type: "object",
2860
+ required: ["target", "capabilities", "unavailable"],
2343
2861
  properties: {
2344
- target: ref("FlowSurfaceWriteTarget")
2862
+ target: ref("FlowSurfaceReactionTargetSummary"),
2863
+ capabilities: {
2864
+ type: "array",
2865
+ items: ref("FlowSurfaceReactionCapability")
2866
+ },
2867
+ unavailable: {
2868
+ type: "array",
2869
+ items: ref("FlowSurfaceReactionUnavailableCapability")
2870
+ }
2345
2871
  },
2346
2872
  additionalProperties: false
2347
2873
  },
2348
- FlowSurfaceCatalogResponse: {
2874
+ FlowSurfaceSetFieldValueRulesRequest: buildReactionWriteRequestSchema("FlowSurfaceFieldValueRule"),
2875
+ FlowSurfaceSetFieldValueRulesResult: buildReactionWriteResultSchema("FlowSurfaceFieldValueRule"),
2876
+ FlowSurfaceSetBlockLinkageRulesRequest: buildReactionWriteRequestSchema("FlowSurfaceBlockLinkageRule"),
2877
+ FlowSurfaceSetBlockLinkageRulesResult: buildReactionWriteResultSchema("FlowSurfaceBlockLinkageRule"),
2878
+ FlowSurfaceSetFieldLinkageRulesRequest: buildReactionWriteRequestSchema("FlowSurfaceFieldLinkageRule"),
2879
+ FlowSurfaceSetFieldLinkageRulesResult: buildReactionWriteResultSchema("FlowSurfaceFieldLinkageRule"),
2880
+ FlowSurfaceSetActionLinkageRulesRequest: buildReactionWriteRequestSchema("FlowSurfaceActionLinkageRule"),
2881
+ FlowSurfaceSetActionLinkageRulesResult: buildReactionWriteResultSchema("FlowSurfaceActionLinkageRule"),
2882
+ FlowSurfaceApplyBlueprintReactionItemSetFieldValueRules: {
2349
2883
  type: "object",
2884
+ required: ["type", "target", "rules"],
2350
2885
  properties: {
2351
- target: {
2352
- allOf: [ref("FlowSurfaceResolvedTarget")],
2353
- nullable: true
2886
+ type: {
2887
+ type: "string",
2888
+ enum: ["setFieldValueRules"]
2354
2889
  },
2355
- blocks: {
2356
- type: "array",
2357
- items: ref("FlowSurfaceCatalogItem")
2890
+ target: {
2891
+ type: "string",
2892
+ description: "Bind key or local key of the reaction target resolved from the same blueprint run. The referenced node must have an explicit key/bind key in that blueprint result. For form field-value writes, point to the form block key/path, not the inner grid node."
2358
2893
  },
2359
- fields: {
2894
+ rules: {
2360
2895
  type: "array",
2361
- items: ref("FlowSurfaceCatalogItem")
2896
+ items: ref("FlowSurfaceFieldValueRule")
2362
2897
  },
2363
- actions: {
2364
- type: "array",
2365
- description: "Public block/form/filter-form/action-panel actions available under the resolved target.",
2366
- items: ref("FlowSurfaceCatalogItem")
2898
+ expectedFingerprint: {
2899
+ type: "string",
2900
+ description: "Optional optimistic-concurrency fingerprint from a prior `getReactionMeta` read of the same slot."
2901
+ }
2902
+ },
2903
+ additionalProperties: false
2904
+ },
2905
+ FlowSurfaceApplyBlueprintReactionItemSetBlockLinkageRules: {
2906
+ type: "object",
2907
+ required: ["type", "target", "rules"],
2908
+ properties: {
2909
+ type: {
2910
+ type: "string",
2911
+ enum: ["setBlockLinkageRules"]
2367
2912
  },
2368
- recordActions: {
2369
- type: "array",
2370
- description: "Public record/item-level actions exposed for record-capable targets such as table/details/list/gridCard.",
2371
- items: ref("FlowSurfaceCatalogItem")
2913
+ target: {
2914
+ type: "string",
2915
+ description: "Bind key or local key of the reaction target resolved from the same blueprint run. The referenced node must have an explicit key/bind key in that blueprint result."
2372
2916
  },
2373
- editableDomains: {
2917
+ rules: {
2374
2918
  type: "array",
2375
- items: ref("FlowSurfaceNodeDomain")
2376
- },
2377
- configureOptions: ref("FlowSurfaceConfigureOptions"),
2378
- settingsSchema: ANY_OBJECT_SCHEMA,
2379
- settingsContract: {
2380
- type: "object",
2381
- properties: {
2382
- props: ref("FlowSurfaceDomainContract"),
2383
- decoratorProps: ref("FlowSurfaceDomainContract"),
2384
- stepParams: ref("FlowSurfaceDomainContract"),
2385
- flowRegistry: ref("FlowSurfaceDomainContract")
2386
- },
2387
- additionalProperties: false
2919
+ items: ref("FlowSurfaceBlockLinkageRule")
2388
2920
  },
2389
- eventCapabilities: ref("FlowSurfaceEventCapabilities"),
2390
- layoutCapabilities: ref("FlowSurfaceLayoutCapabilities")
2921
+ expectedFingerprint: {
2922
+ type: "string",
2923
+ description: "Optional optimistic-concurrency fingerprint from a prior `getReactionMeta` read of the same slot."
2924
+ }
2391
2925
  },
2392
2926
  additionalProperties: false
2393
2927
  },
2394
- FlowSurfaceContextVarInfo: {
2928
+ FlowSurfaceApplyBlueprintReactionItemSetFieldLinkageRules: {
2395
2929
  type: "object",
2930
+ required: ["type", "target", "rules"],
2396
2931
  properties: {
2397
- title: {
2398
- type: "string"
2399
- },
2400
2932
  type: {
2401
- type: "string"
2402
- },
2403
- interface: {
2404
- type: "string"
2405
- },
2406
- description: {
2407
- type: "string"
2933
+ type: "string",
2934
+ enum: ["setFieldLinkageRules"]
2408
2935
  },
2409
- disabled: {
2410
- type: "boolean"
2936
+ target: {
2937
+ type: "string",
2938
+ description: "Bind key or local key of the reaction target resolved from the same blueprint run. The referenced node must have an explicit key/bind key in that blueprint result. Form-scene field linkage still targets the form block key/path, and the backend resolves the concrete grid slot."
2411
2939
  },
2412
- disabledReason: {
2413
- type: "string"
2940
+ rules: {
2941
+ type: "array",
2942
+ items: ref("FlowSurfaceFieldLinkageRule")
2414
2943
  },
2415
- properties: {
2416
- type: "object",
2417
- additionalProperties: ref("FlowSurfaceContextVarInfo")
2944
+ expectedFingerprint: {
2945
+ type: "string",
2946
+ description: "Optional optimistic-concurrency fingerprint from a prior `getReactionMeta` read of the same slot."
2418
2947
  }
2419
2948
  },
2420
2949
  additionalProperties: false
2421
2950
  },
2422
- FlowSurfaceContextRequest: {
2951
+ FlowSurfaceApplyBlueprintReactionItemSetActionLinkageRules: {
2423
2952
  type: "object",
2424
- required: ["target"],
2953
+ required: ["type", "target", "rules"],
2425
2954
  properties: {
2426
- target: ref("FlowSurfaceWriteTarget"),
2427
- path: {
2955
+ type: {
2428
2956
  type: "string",
2429
- description: "Bare path only, for example 'record', 'popup.record' or 'item.parentItem.value'."
2957
+ enum: ["setActionLinkageRules"]
2430
2958
  },
2431
- maxDepth: {
2432
- type: "integer",
2433
- minimum: 1
2959
+ target: {
2960
+ type: "string",
2961
+ description: "Bind key or local key of the reaction target resolved from the same blueprint run. The referenced node must have an explicit key/bind key in that blueprint result."
2962
+ },
2963
+ rules: {
2964
+ type: "array",
2965
+ items: ref("FlowSurfaceActionLinkageRule")
2966
+ },
2967
+ expectedFingerprint: {
2968
+ type: "string",
2969
+ description: "Optional optimistic-concurrency fingerprint from a prior `getReactionMeta` read of the same slot."
2434
2970
  }
2435
2971
  },
2436
2972
  additionalProperties: false
2437
2973
  },
2438
- FlowSurfaceContextResponse: {
2974
+ FlowSurfaceApplyBlueprintReactionItem: {
2975
+ oneOf: [
2976
+ ref("FlowSurfaceApplyBlueprintReactionItemSetFieldValueRules"),
2977
+ ref("FlowSurfaceApplyBlueprintReactionItemSetBlockLinkageRules"),
2978
+ ref("FlowSurfaceApplyBlueprintReactionItemSetFieldLinkageRules"),
2979
+ ref("FlowSurfaceApplyBlueprintReactionItemSetActionLinkageRules")
2980
+ ]
2981
+ },
2982
+ FlowSurfaceApplyBlueprintReaction: {
2439
2983
  type: "object",
2984
+ required: ["items"],
2985
+ description: "Optional whole-page reaction authoring section for blueprint-driven interaction logic. Each item must target an explicit same-run local key / bind key. Only explicitly listed items are written. Repeating the same `(type, target)` slot is invalid. In `replace`, include every slot that must exist in the resulting surface instead of relying on omission. Use localized `getReactionMeta` + `set*Rules` for edits on existing live surfaces.",
2440
2986
  properties: {
2441
- vars: {
2442
- type: "object",
2443
- additionalProperties: ref("FlowSurfaceContextVarInfo")
2987
+ items: {
2988
+ type: "array",
2989
+ items: ref("FlowSurfaceApplyBlueprintReactionItem")
2444
2990
  }
2445
2991
  },
2446
2992
  additionalProperties: false
2447
2993
  },
2448
- FlowSurfaceGetResponse: {
2994
+ FlowSurfaceApplyBlueprintAssets: {
2449
2995
  type: "object",
2450
2996
  properties: {
2451
- target: ref("FlowSurfaceReadTarget"),
2452
- tree: ref("FlowSurfaceGetTreeNode"),
2453
- nodeMap: ref("FlowSurfaceNodeMap"),
2454
- pageRoute: ref("FlowSurfaceRouteMeta"),
2455
- route: ref("FlowSurfaceRouteMeta")
2997
+ scripts: {
2998
+ type: "object",
2999
+ additionalProperties: ANY_OBJECT_SCHEMA
3000
+ },
3001
+ charts: {
3002
+ type: "object",
3003
+ additionalProperties: ANY_OBJECT_SCHEMA
3004
+ }
2456
3005
  },
2457
3006
  additionalProperties: false
2458
3007
  },
2459
- FlowSurfaceComposeLayoutCell: {
3008
+ FlowSurfaceApplyBlueprintLayoutCell: {
2460
3009
  oneOf: [
2461
3010
  {
2462
- type: "string"
3011
+ type: "string",
3012
+ description: "Local block key string in the current tab or popup scope."
2463
3013
  },
2464
3014
  {
2465
3015
  type: "object",
3016
+ description: "Layout cell object in the public applyBlueprint contract. Use only { key, span } to reference a local block key.",
2466
3017
  required: ["key"],
2467
3018
  properties: {
2468
3019
  key: {
2469
- type: "string"
3020
+ type: "string",
3021
+ description: "Local block key in the current tab or popup scope."
2470
3022
  },
2471
3023
  span: {
2472
3024
  type: "number"
@@ -2476,341 +3028,311 @@ const schemas = {
2476
3028
  }
2477
3029
  ]
2478
3030
  },
2479
- FlowSurfaceComposeLayout: {
3031
+ FlowSurfaceApplyBlueprintLayout: {
2480
3032
  type: "object",
3033
+ description: "Layout object allowed only on tabs and inline popup documents, never on individual blocks.",
2481
3034
  properties: {
2482
3035
  rows: {
2483
3036
  type: "array",
3037
+ description: "Two-dimensional layout grid. Each cell is either a block key string or an object { key, span }.",
2484
3038
  items: {
2485
- type: "array",
2486
- items: ref("FlowSurfaceComposeLayoutCell")
2487
- }
2488
- }
2489
- },
2490
- additionalProperties: false
2491
- },
2492
- FlowSurfaceComposeFieldSpec: {
2493
- oneOf: [
2494
- {
2495
- type: "string"
2496
- },
2497
- {
2498
- type: "object",
2499
- required: ["fieldPath"],
2500
- properties: {
2501
- key: {
2502
- type: "string"
2503
- },
2504
- fieldPath: {
2505
- type: "string"
2506
- },
2507
- renderer: {
2508
- type: "string",
2509
- enum: ["js"],
2510
- description: "Optional public renderer variant for a bound field."
2511
- },
2512
- associationPathName: {
2513
- type: "string"
2514
- },
2515
- target: {
2516
- type: "string",
2517
- description: "Reference to another compose block key, typically used by filter-form fields."
2518
- },
2519
- settings: ANY_OBJECT_SCHEMA,
2520
- popup: ref("FlowSurfaceComposeActionPopup")
2521
- },
2522
- additionalProperties: false
2523
- },
2524
- {
2525
- type: "object",
2526
- required: ["type"],
2527
- properties: {
2528
- key: {
2529
- type: "string"
2530
- },
2531
- type: {
2532
- type: "string",
2533
- enum: ["jsColumn", "jsItem"],
2534
- description: "Standalone synthetic public field capability. Does not accept fieldPath."
2535
- },
2536
- settings: ANY_OBJECT_SCHEMA
2537
- },
2538
- additionalProperties: false
3039
+ type: "array",
3040
+ items: ref("FlowSurfaceApplyBlueprintLayoutCell")
3041
+ }
2539
3042
  }
2540
- ]
3043
+ },
3044
+ additionalProperties: false
2541
3045
  },
2542
- FlowSurfaceComposeActionPopup: {
3046
+ FlowSurfaceApplyBlueprintPopup: {
2543
3047
  type: "object",
2544
3048
  properties: {
3049
+ title: {
3050
+ type: "string"
3051
+ },
2545
3052
  mode: {
2546
3053
  type: "string",
2547
3054
  enum: ["append", "replace"]
2548
3055
  },
3056
+ template: ref("FlowSurfacePopupTemplateRef"),
2549
3057
  blocks: {
2550
3058
  type: "array",
2551
- items: ref("FlowSurfaceComposeBlockSpec")
3059
+ description: "Inline popup blocks. For custom `edit` popups, provide exactly one `editForm` block plus any optional sibling blocks.",
3060
+ items: ref("FlowSurfaceApplyBlueprintBlockSpec")
2552
3061
  },
2553
- layout: ref("FlowSurfaceComposeLayout")
3062
+ layout: {
3063
+ allOf: [ref("FlowSurfaceApplyBlueprintLayout")],
3064
+ description: "Popup-scoped layout. Layout is only allowed on tabs and popup documents, not on individual blocks."
3065
+ }
2554
3066
  },
2555
3067
  additionalProperties: false
2556
3068
  },
2557
- FlowSurfaceComposeActionSpec: {
3069
+ FlowSurfaceApplyBlueprintFieldSpec: {
2558
3070
  oneOf: [
2559
3071
  {
2560
3072
  type: "string"
2561
3073
  },
2562
3074
  {
2563
3075
  type: "object",
2564
- required: ["type"],
2565
3076
  properties: {
2566
- key: {
2567
- type: "string"
3077
+ key: { type: "string" },
3078
+ field: { type: "string" },
3079
+ associationPathName: { type: "string" },
3080
+ renderer: { type: "string" },
3081
+ type: { type: "string" },
3082
+ label: { type: "string" },
3083
+ target: {
3084
+ type: "string",
3085
+ description: "String block key on the same tab or popup scope, typically used by filter-form fields."
2568
3086
  },
3087
+ settings: ANY_OBJECT_SCHEMA,
3088
+ popup: ref("FlowSurfaceApplyBlueprintPopup"),
3089
+ script: { type: "string" },
3090
+ chart: { type: "string" }
3091
+ },
3092
+ additionalProperties: false
3093
+ }
3094
+ ]
3095
+ },
3096
+ FlowSurfaceApplyBlueprintActionSpec: {
3097
+ oneOf: [
3098
+ {
3099
+ type: "string",
3100
+ enum: APPLY_BLUEPRINT_ACTION_TYPE_ENUM
3101
+ },
3102
+ {
3103
+ type: "object",
3104
+ required: ["type"],
3105
+ properties: {
3106
+ key: { type: "string" },
2569
3107
  type: {
2570
3108
  type: "string",
2571
- enum: NON_RECORD_ACTION_TYPE_ENUM
3109
+ enum: APPLY_BLUEPRINT_ACTION_TYPE_ENUM,
3110
+ description: `Action type. On record-capable blocks (\`table\`, \`details\`, \`list\`, \`gridCard\`), record actions such as \`view\`, \`edit\`, \`updateRecord\`, \`delete\`, and \`duplicate\` should normally be authored under \`recordActions\`; applyBlueprint also auto-promotes those common record actions from \`actions\` for convenience. ${APPLY_BLUEPRINT_ADD_CHILD_NOTE} For custom \`edit\` popups, include exactly one \`editForm\` block inside popup.blocks.`
2572
3111
  },
3112
+ title: { type: "string" },
2573
3113
  settings: ANY_OBJECT_SCHEMA,
2574
- popup: ref("FlowSurfaceComposeActionPopup")
3114
+ popup: ref("FlowSurfaceApplyBlueprintPopup"),
3115
+ script: { type: "string" },
3116
+ chart: { type: "string" }
2575
3117
  },
2576
3118
  additionalProperties: false
2577
3119
  }
2578
3120
  ]
2579
3121
  },
2580
- FlowSurfaceComposeRecordActionSpec: {
3122
+ FlowSurfaceApplyBlueprintRecordActionSpec: {
2581
3123
  oneOf: [
2582
3124
  {
2583
- type: "string"
3125
+ type: "string",
3126
+ enum: RECORD_ACTION_TYPE_ENUM
2584
3127
  },
2585
3128
  {
2586
3129
  type: "object",
2587
3130
  required: ["type"],
2588
3131
  properties: {
2589
- key: {
2590
- type: "string"
2591
- },
3132
+ key: { type: "string" },
2592
3133
  type: {
2593
3134
  type: "string",
2594
- enum: RECORD_ACTION_TYPE_ENUM
3135
+ enum: RECORD_ACTION_TYPE_ENUM,
3136
+ description: `Record-action type for record-capable blocks such as \`table\`, \`details\`, \`list\`, and \`gridCard\`. ${ADD_CHILD_TREE_TABLE_NOTE} For custom \`edit\` popups, include exactly one \`editForm\` block inside popup.blocks.`
2595
3137
  },
3138
+ title: { type: "string" },
2596
3139
  settings: ANY_OBJECT_SCHEMA,
2597
- popup: ref("FlowSurfaceComposeActionPopup")
3140
+ popup: ref("FlowSurfaceApplyBlueprintPopup"),
3141
+ script: { type: "string" },
3142
+ chart: { type: "string" }
2598
3143
  },
2599
3144
  additionalProperties: false
2600
3145
  }
2601
3146
  ]
2602
3147
  },
2603
- FlowSurfaceComposeBlockSpec: {
3148
+ FlowSurfaceApplyBlueprintBlockSpec: {
2604
3149
  type: "object",
2605
- required: ["key", "type"],
3150
+ description: "Public applyBlueprint block spec. Blocks do not accept a `layout` property; use tab.layout or popup.layout instead. Generic `form` is not supported here; use `editForm` or `createForm`.",
3151
+ anyOf: [{ required: ["type"] }, { required: ["template"] }],
2606
3152
  properties: {
2607
- key: {
2608
- type: "string"
2609
- },
3153
+ key: { type: "string" },
2610
3154
  type: {
2611
3155
  type: "string",
2612
- enum: [
2613
- "table",
2614
- "createForm",
2615
- "editForm",
2616
- "details",
2617
- "filterForm",
2618
- "list",
2619
- "gridCard",
2620
- "markdown",
2621
- "iframe",
2622
- "chart",
2623
- "actionPanel",
2624
- "jsBlock"
2625
- ]
3156
+ enum: APPLY_BLUEPRINT_BLOCK_TYPE_ENUM,
3157
+ description: "Public applyBlueprint block type. Generic `form` is not supported; use `editForm` or `createForm`."
3158
+ },
3159
+ title: { type: "string" },
3160
+ collection: {
3161
+ type: "string",
3162
+ description: "Block-level shorthand collection name. When using the nested resource object instead, use resource.collectionName there."
3163
+ },
3164
+ dataSourceKey: { type: "string" },
3165
+ associationPathName: {
3166
+ type: "string",
3167
+ description: "Association field path used by raw resource-init shorthand. For popup association tables, prefer `resource.binding='associatedRecords'` with `associationField`; applyBlueprint only normalizes `currentRecord|associatedRecords + associationPathName` to that canonical form when `associationPathName` is a single association field name."
3168
+ },
3169
+ binding: {
3170
+ type: "string",
3171
+ enum: ["currentCollection", "currentRecord", "associatedRecords", "otherRecords"]
3172
+ },
3173
+ associationField: {
3174
+ type: "string",
3175
+ description: "Canonical association field name for popup `associatedRecords` binding. Prefer this over `associationPathName` when authoring relation tables inside record popups."
2626
3176
  },
2627
3177
  resource: ref("FlowSurfaceBlockResourceInput"),
3178
+ template: ref("FlowSurfaceBlockTemplateRef"),
2628
3179
  settings: ANY_OBJECT_SCHEMA,
2629
3180
  fields: {
2630
3181
  type: "array",
2631
- items: ref("FlowSurfaceComposeFieldSpec")
3182
+ items: ref("FlowSurfaceApplyBlueprintFieldSpec")
2632
3183
  },
2633
3184
  actions: {
2634
3185
  type: "array",
2635
- description: "Block-level actions. For table/list/gridCard, prefer block-wide collection actions here.",
2636
- items: ref("FlowSurfaceComposeActionSpec")
3186
+ description: `Block-level actions. On record-capable blocks, \`view\`, \`edit\`, \`updateRecord\`, \`delete\`, and \`duplicate\` should normally go to \`recordActions\`; applyBlueprint auto-promotes those common record actions when they are written here. ${APPLY_BLUEPRINT_ADD_CHILD_NOTE}`,
3187
+ items: ref("FlowSurfaceApplyBlueprintActionSpec")
2637
3188
  },
2638
3189
  recordActions: {
2639
3190
  type: "array",
2640
- description: "Public semantic group for record/item-level actions on record-capable blocks such as table/details/list/gridCard.",
2641
- items: ref("FlowSurfaceComposeRecordActionSpec")
2642
- }
3191
+ items: ref("FlowSurfaceApplyBlueprintRecordActionSpec")
3192
+ },
3193
+ script: { type: "string" },
3194
+ chart: { type: "string" }
2643
3195
  },
2644
3196
  additionalProperties: false
2645
3197
  },
2646
- FlowSurfaceComposeRequest: {
3198
+ FlowSurfaceApplyBlueprintTab: {
2647
3199
  type: "object",
2648
- required: ["target"],
3200
+ required: ["blocks"],
2649
3201
  properties: {
2650
- target: ref("FlowSurfaceWriteTarget"),
2651
- mode: {
3202
+ key: {
2652
3203
  type: "string",
2653
- enum: ["append", "replace"],
2654
- default: "append"
3204
+ description: "Optional local tab key used only inside the current applyBlueprint document for layout or in-document references. It is not used to match existing route-backed tabs in replace mode. When omitted, the server generates one."
2655
3205
  },
3206
+ title: { type: "string" },
3207
+ icon: { type: "string" },
3208
+ documentTitle: { type: "string" },
2656
3209
  blocks: {
2657
3210
  type: "array",
2658
- items: ref("FlowSurfaceComposeBlockSpec")
3211
+ minItems: 1,
3212
+ items: ref("FlowSurfaceApplyBlueprintBlockSpec")
2659
3213
  },
2660
- layout: ref("FlowSurfaceComposeLayout")
3214
+ layout: {
3215
+ allOf: [ref("FlowSurfaceApplyBlueprintLayout")],
3216
+ description: "Tab-scoped layout. Layout is allowed here and on popup documents, not on individual blocks."
3217
+ }
2661
3218
  },
2662
3219
  additionalProperties: false
2663
3220
  },
2664
- FlowSurfaceComposeFieldResult: {
3221
+ FlowSurfaceApplyBlueprintNavigationGroup: {
2665
3222
  type: "object",
2666
3223
  properties: {
2667
- key: {
2668
- type: "string"
2669
- },
2670
- fieldPath: {
2671
- type: "string"
3224
+ routeId: {
3225
+ ...STRING_OR_INTEGER_SCHEMA,
3226
+ description: "Preferred existing menu-group route id for exact targeting. Do not mix it with title/icon/tooltip/hideInMenu. applyBlueprint create mode does not mutate existing group metadata; use low-level updateMenu separately when needed."
2672
3227
  },
2673
- renderer: {
3228
+ title: {
2674
3229
  type: "string",
2675
- enum: ["js"]
3230
+ description: "Group title for create mode. When `routeId` is omitted, applyBlueprint reuses a same-title group if the match is unique, creates one when no group exists, and rejects ambiguous multi-match cases. Same-title reuse is title-only; if an existing group's metadata must change, use low-level updateMenu instead of applyBlueprint create."
2676
3231
  },
2677
- type: {
3232
+ icon: {
2678
3233
  type: "string",
2679
- enum: ["jsColumn", "jsItem"]
3234
+ description: "Group icon used only when create mode actually creates a new menu group. Not allowed together with routeId."
2680
3235
  },
2681
- uid: {
2682
- type: "string"
2683
- },
2684
- associationPathName: {
3236
+ tooltip: {
2685
3237
  type: "string",
2686
- nullable: true
2687
- },
2688
- target: {
2689
- type: "string"
2690
- },
2691
- wrapperUid: {
2692
- type: "string"
2693
- },
2694
- fieldUid: {
2695
- type: "string"
2696
- },
2697
- innerFieldUid: {
2698
- type: "string"
2699
- },
2700
- popupPageUid: {
2701
- type: "string"
2702
- },
2703
- popupTabUid: {
2704
- type: "string"
3238
+ description: "Group tooltip used only when create mode actually creates a new menu group. Not allowed together with routeId."
2705
3239
  },
2706
- popupGridUid: {
2707
- type: "string"
3240
+ hideInMenu: {
3241
+ type: "boolean",
3242
+ description: "Group hidden-state used only when create mode actually creates a new menu group. Not allowed together with routeId."
2708
3243
  }
2709
3244
  },
2710
3245
  additionalProperties: false
2711
3246
  },
2712
- FlowSurfaceComposeActionResult: {
3247
+ FlowSurfaceApplyBlueprintNavigation: {
2713
3248
  type: "object",
2714
3249
  properties: {
2715
- key: {
2716
- type: "string"
2717
- },
2718
- type: {
2719
- type: "string",
2720
- enum: ACTION_TYPE_ENUM
2721
- },
2722
- uid: {
2723
- type: "string"
2724
- },
2725
- parentUid: {
2726
- type: "string"
2727
- },
2728
- assignFormUid: {
2729
- type: "string"
2730
- },
2731
- assignFormGridUid: {
2732
- type: "string"
2733
- },
2734
- popupPageUid: {
2735
- type: "string"
2736
- },
2737
- popupTabUid: {
2738
- type: "string"
2739
- },
2740
- popupGridUid: {
2741
- type: "string"
3250
+ group: ref("FlowSurfaceApplyBlueprintNavigationGroup"),
3251
+ item: {
3252
+ type: "object",
3253
+ properties: {
3254
+ title: { type: "string" },
3255
+ icon: { type: "string" },
3256
+ tooltip: { type: "string" },
3257
+ hideInMenu: { type: "boolean" }
3258
+ },
3259
+ additionalProperties: false
2742
3260
  }
2743
3261
  },
2744
3262
  additionalProperties: false
2745
3263
  },
2746
- FlowSurfaceComposeBlockResult: {
3264
+ FlowSurfaceApplyBlueprintPage: {
2747
3265
  type: "object",
2748
3266
  properties: {
2749
- key: {
2750
- type: "string"
2751
- },
2752
- type: {
3267
+ title: { type: "string" },
3268
+ icon: { type: "string" },
3269
+ documentTitle: { type: "string" },
3270
+ enableHeader: { type: "boolean" },
3271
+ enableTabs: { type: "boolean" },
3272
+ displayTitle: { type: "boolean" }
3273
+ },
3274
+ additionalProperties: false
3275
+ },
3276
+ FlowSurfaceApplyBlueprintTarget: {
3277
+ type: "object",
3278
+ required: ["pageSchemaUid"],
3279
+ properties: {
3280
+ pageSchemaUid: { type: "string" }
3281
+ },
3282
+ additionalProperties: false
3283
+ },
3284
+ FlowSurfaceApplyBlueprintRequest: {
3285
+ type: "object",
3286
+ required: ["mode", "tabs"],
3287
+ description: "Simplified page-structure request object for applyBlueprint. `version` may be omitted and defaults to '1'. Runtime validation enforces mode-specific rules: create does not accept target, while replace requires target.pageSchemaUid and does not use navigation.",
3288
+ properties: {
3289
+ version: {
2753
3290
  type: "string",
2754
- enum: [
2755
- "table",
2756
- "createForm",
2757
- "editForm",
2758
- "details",
2759
- "filterForm",
2760
- "list",
2761
- "gridCard",
2762
- "markdown",
2763
- "iframe",
2764
- "chart",
2765
- "actionPanel",
2766
- "jsBlock"
2767
- ]
2768
- },
2769
- uid: {
2770
- type: "string"
3291
+ enum: ["1"]
2771
3292
  },
2772
- gridUid: {
2773
- type: "string"
3293
+ mode: {
3294
+ type: "string",
3295
+ enum: ["create", "replace"]
2774
3296
  },
2775
- itemUid: {
2776
- type: "string"
3297
+ target: ref("FlowSurfaceApplyBlueprintTarget"),
3298
+ navigation: ref("FlowSurfaceApplyBlueprintNavigation"),
3299
+ page: ref("FlowSurfaceApplyBlueprintPage"),
3300
+ tabs: {
3301
+ type: "array",
3302
+ minItems: 1,
3303
+ items: ref("FlowSurfaceApplyBlueprintTab")
2777
3304
  },
2778
- itemGridUid: {
3305
+ assets: ref("FlowSurfaceApplyBlueprintAssets"),
3306
+ reaction: ref("FlowSurfaceApplyBlueprintReaction")
3307
+ },
3308
+ additionalProperties: false
3309
+ },
3310
+ FlowSurfaceApplyBlueprintResponseTarget: {
3311
+ type: "object",
3312
+ properties: {
3313
+ pageSchemaUid: {
2779
3314
  type: "string"
2780
3315
  },
2781
- actionsColumnUid: {
3316
+ pageUid: {
2782
3317
  type: "string"
2783
- },
2784
- fields: {
2785
- type: "array",
2786
- items: ref("FlowSurfaceComposeFieldResult")
2787
- },
2788
- actions: {
2789
- type: "array",
2790
- items: ref("FlowSurfaceComposeActionResult")
2791
- },
2792
- recordActions: {
2793
- type: "array",
2794
- description: "Returned record/item-level action results for record-capable public compose semantics such as table/details/list/gridCard.",
2795
- items: ref("FlowSurfaceComposeActionResult")
2796
3318
  }
2797
3319
  },
2798
3320
  additionalProperties: false
2799
3321
  },
2800
- FlowSurfaceComposeResult: {
3322
+ FlowSurfaceApplyBlueprintResponse: {
2801
3323
  type: "object",
3324
+ required: ["version", "mode", "target", "surface"],
2802
3325
  properties: {
2803
- target: ref("FlowSurfaceWriteTarget"),
2804
- mode: {
3326
+ version: {
2805
3327
  type: "string",
2806
- enum: ["append", "replace"]
3328
+ enum: ["1"]
2807
3329
  },
2808
- keyToUid: ref("FlowSurfaceClientKeyMap"),
2809
- blocks: {
2810
- type: "array",
2811
- items: ref("FlowSurfaceComposeBlockResult")
3330
+ mode: {
3331
+ type: "string",
3332
+ enum: ["create", "replace"]
2812
3333
  },
2813
- layout: ref("FlowSurfaceSetLayoutResult")
3334
+ target: ref("FlowSurfaceApplyBlueprintResponseTarget"),
3335
+ surface: ref("FlowSurfaceGetResponse")
2814
3336
  },
2815
3337
  additionalProperties: false
2816
3338
  },
@@ -3305,6 +3827,7 @@ const schemas = {
3305
3827
  use: {
3306
3828
  type: "string"
3307
3829
  },
3830
+ template: ref("FlowSurfaceBlockTemplateRef"),
3308
3831
  resource: ref("FlowSurfaceBlockResourceInput"),
3309
3832
  resourceInit: ref("FlowSurfaceResourceInit"),
3310
3833
  settings: ANY_OBJECT_SCHEMA
@@ -3359,8 +3882,17 @@ const schemas = {
3359
3882
  FlowSurfaceAddFieldRequest: {
3360
3883
  type: "object",
3361
3884
  required: ["target"],
3885
+ oneOf: [
3886
+ {
3887
+ required: ["template"]
3888
+ },
3889
+ {
3890
+ anyOf: [{ required: ["fieldPath"] }, { required: ["type"] }]
3891
+ }
3892
+ ],
3362
3893
  properties: {
3363
3894
  target: ref("FlowSurfaceWriteTarget"),
3895
+ template: ref("FlowSurfaceTemplateRef"),
3364
3896
  fieldPath: {
3365
3897
  type: "string",
3366
3898
  description: "Required for bound fields. Omit when using synthetic standalone types such as jsColumn/jsItem."
@@ -3396,10 +3928,10 @@ const schemas = {
3396
3928
  },
3397
3929
  targetUid: {
3398
3930
  type: "string",
3399
- description: "Legacy alias used by filter-form target selection. This is not the same field as `target.uid`."
3931
+ description: "Optional filter-form target selection key. This is not the same field as `target.uid`."
3400
3932
  },
3401
3933
  settings: ANY_OBJECT_SCHEMA,
3402
- popup: ref("FlowSurfaceComposeActionPopup")
3934
+ popup: ref("FlowSurfaceComposeFieldPopup")
3403
3935
  },
3404
3936
  additionalProperties: false
3405
3937
  },
@@ -3572,6 +4104,7 @@ const schemas = {
3572
4104
  use: {
3573
4105
  type: "string"
3574
4106
  },
4107
+ template: ref("FlowSurfaceBlockTemplateRef"),
3575
4108
  resource: ref("FlowSurfaceBlockResourceInput"),
3576
4109
  resourceInit: ref("FlowSurfaceResourceInit"),
3577
4110
  settings: ANY_OBJECT_SCHEMA
@@ -3580,10 +4113,19 @@ const schemas = {
3580
4113
  },
3581
4114
  FlowSurfaceAddFieldItem: {
3582
4115
  type: "object",
4116
+ oneOf: [
4117
+ {
4118
+ required: ["template"]
4119
+ },
4120
+ {
4121
+ anyOf: [{ required: ["fieldPath"] }, { required: ["type"] }]
4122
+ }
4123
+ ],
3583
4124
  properties: {
3584
4125
  key: {
3585
4126
  type: "string"
3586
4127
  },
4128
+ template: ref("FlowSurfaceTemplateRef"),
3587
4129
  fieldPath: {
3588
4130
  type: "string"
3589
4131
  },
@@ -3617,7 +4159,7 @@ const schemas = {
3617
4159
  type: "string"
3618
4160
  },
3619
4161
  settings: ANY_OBJECT_SCHEMA,
3620
- popup: ref("FlowSurfaceComposeActionPopup")
4162
+ popup: ref("FlowSurfaceComposeFieldPopup")
3621
4163
  },
3622
4164
  additionalProperties: false
3623
4165
  },
@@ -3673,9 +4215,18 @@ const schemas = {
3673
4215
  },
3674
4216
  FlowSurfaceAddFieldsRequest: {
3675
4217
  type: "object",
3676
- required: ["target", "fields"],
4218
+ required: ["target"],
4219
+ oneOf: [
4220
+ {
4221
+ required: ["template"]
4222
+ },
4223
+ {
4224
+ required: ["fields"]
4225
+ }
4226
+ ],
3677
4227
  properties: {
3678
4228
  target: ref("FlowSurfaceWriteTarget"),
4229
+ template: ref("FlowSurfaceTemplateRef"),
3679
4230
  fields: {
3680
4231
  type: "array",
3681
4232
  items: ref("FlowSurfaceAddFieldItem")
@@ -4167,7 +4718,7 @@ const schemas = {
4167
4718
  target: ref("FlowSurfaceMutateWriteTarget"),
4168
4719
  values: {
4169
4720
  ...ANY_OBJECT_SCHEMA,
4170
- description: 'Business payload for the corresponding `/flowSurfaces:<type>` action. Nested refs must use `{ ref: "<opId>.<path>" }`.'
4721
+ description: 'Business payload for the corresponding `/flowSurfaces:<type>` action. Nested runtime values must use `{ step: "<opId>", path: "<field>" }` or `{ key: "<opId>" }`.'
4171
4722
  }
4172
4723
  },
4173
4724
  additionalProperties: false