@uipath/maestro-builder-sdk 6.20.3 → 6.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api-index.md CHANGED
@@ -128,11 +128,11 @@ could hand you spans for a version you do not have.
128
128
  | `FilterCondition` | type | `dist/nodes/transform/flow/spec.d.ts:10-11` | Supporting types | Comparison a filter rule applies to a field. |
129
129
  | `FilterMatch` | type | `dist/nodes/transform/flow/spec.d.ts:8-9` | Supporting types | How a filter combines its rules: every rule must match, or any one. |
130
130
  | `FilterRule` | interface | `dist/nodes/transform/flow/spec.d.ts:12-24` | Supporting types | 3 field(s) |
131
- | `flow` | function | `dist/flow-sdk.d.ts:1473-1488` | Flow construction | Start building a flow with the given id. |
131
+ | `flow` | function | `dist/flow-sdk.d.ts:1475-1490` | Flow construction | Start building a flow with the given id. |
132
132
  | `FlowAction` | class | `dist/core/node-classes.d.ts:162-168` | Supporting types | A node placed as a step — pass an instance to `.step(name, …)`. |
133
133
  | `FlowActionSpec` | type | `dist/flow-sdk.d.ts:48-49` | Supporting types | What `.step()` accepts here: the shared actions plus this SDK's subflow. |
134
134
  | `FlowActionSpecs` | interface | `dist/core/actions.d.ts:1995-2104` | Supporting types | Every action kind, keyed by kind, to the body of its spec — the arm's fields other than `kind`. |
135
- | `FlowBuilder` | class | `dist/flow-sdk.d.ts:1203-1472` | Builders | 13 member(s) |
135
+ | `FlowBuilder` | class | `dist/flow-sdk.d.ts:1203-1474` | Builders | 13 member(s) |
136
136
  | `FlowLayout` | interface | `dist/flow-sdk.d.ts:671-684` | Supporting types | Designer layout for a flow, keyed by AUTHOR-level ids: node entries by step name (plus the trigger id and `end`), edge… |
137
137
  | `FlowNode` | class | `dist/core/node-classes.d.ts:126-161` | Supporting types | The abstract root of every definition-backed node the builder can place. |
138
138
  | `FlowResource` | class | `dist/core/node-classes.d.ts:176-183` | Supporting types | A node attached to another semantic node — an inline agent's tool, context, memory, or escalation. |
@@ -229,7 +229,7 @@ could hand you spans for a version you do not have.
229
229
  | `STICKY_NOTE_COLORS` | const | `dist/flow-sdk.d.ts:624-629` | Flow construction | The designer's sticky-note palette. |
230
230
  | `StickyNote` | interface | `dist/flow-sdk.d.ts:636-670` | Supporting types | A canvas sticky note — free text pinned to the diagram, for the humans reading it. |
231
231
  | `StickyNoteColor` | type | `dist/flow-sdk.d.ts:630-635` | Supporting types | A sticky note's swatch. |
232
- | `subflow` | function | `dist/flow-sdk.d.ts:1489-1528` | Flow construction | Run another flow as one step, and read back what it returns. |
232
+ | `subflow` | function | `dist/flow-sdk.d.ts:1491-1530` | Flow construction | Run another flow as one step, and read back what it returns. |
233
233
  | `SubflowSpec` | interface | `dist/flow-sdk.d.ts:40-47` | Supporting types | A step that runs a child flow. |
234
234
  | `summarize` | function | `dist/core/actions.d.ts:2202-2242` | Actions | Summarize a document with citations — the platform's **Summarize** node. |
235
235
  | `SummarizeInputs` | interface | `dist/core/actions.d.ts:674-706` | Option shapes | 3 field(s) |
@@ -104,7 +104,7 @@ not find it either.
104
104
  | `breakEnabled` | property | `LoopOptions` | `dist/flow-sdk.d.ts:458-462` |
105
105
  | `build` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3483-3488` |
106
106
  | `build` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1269-1274` |
107
- | `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1465-1471` |
107
+ | `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1467-1473` |
108
108
  | `businessRule` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2527-2573` |
109
109
  | `by` | property | `LookupResolution` | `dist/core/lookups.d.ts:164` |
110
110
  | `by` | property | `LookupSpec` | `dist/core/lookups.d.ts:27-28` |
@@ -289,7 +289,7 @@ not find it either.
289
289
  | `entity` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1090-1091` |
290
290
  | `entry` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:528` |
291
291
  | `entry` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:520` |
292
- | `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1291-1341` |
292
+ | `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1293-1343` |
293
293
  | `entryPointId` | property | `ProcessMetadata` | `dist/bpmn/bpmn-sdk.d.ts:534-539` |
294
294
  | `entryPoints` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:724-725` |
295
295
  | `entryWhen` | method | `StageBuilder` | `dist/case/case-sdk.d.ts:1004-1011` |
@@ -459,7 +459,7 @@ not find it either.
459
459
  | `inclusiveGateway` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2266-2273` |
460
460
  | `inlineAgent` | property | `FlowActionSpecs` | `dist/core/actions.d.ts:2063-2066` |
461
461
  | `input` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1160-1185` |
462
- | `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1416-1428` |
462
+ | `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1418-1430` |
463
463
  | `input` | property | `HumanTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1355-1356` |
464
464
  | `input` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1241-1242` |
465
465
  | `input` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3068-3076` |
@@ -725,7 +725,7 @@ not find it either.
725
725
  | `outcomes` | property | `EscalationRef` | `dist/core/actions.d.ts:1871-1876` |
726
726
  | `outcomes` | property | `HitlInputs` | `dist/core/actions.d.ts:445-459` |
727
727
  | `output` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1186-1198` |
728
- | `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1429-1454` |
728
+ | `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1431-1456` |
729
729
  | `output` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:90` |
730
730
  | `output` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3077-3085` |
731
731
  | `outputColumns` | property | `BatchTransformInputs` | `dist/core/actions.d.ts:722-726` |
@@ -901,7 +901,7 @@ not find it either.
901
901
  | `schemaVersion` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3375-3404` |
902
902
  | `schemaVersion` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:704-710` |
903
903
  | `schemaVersion` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1068-1094` |
904
- | `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1376-1415` |
904
+ | `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1378-1417` |
905
905
  | `scope` | property | `EscalationRecipient` | `dist/case/case-sdk.d.ts:121` |
906
906
  | `scopes` | property | `GuardrailSelector` | `dist/core/actions.d.ts:1177` |
907
907
  | `script` | property | `FlowActionSpecs` | `dist/nodes/script/flow/spec.d.ts:47-50` |
@@ -1044,11 +1044,11 @@ not find it either.
1044
1044
  | `trigger` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:715-717` |
1045
1045
  | `trigger` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1224-1232` |
1046
1046
  | `trigger` | property | `EscalationOpts` | `dist/case/case-sdk.d.ts:128-129` |
1047
- | `trigger` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1272-1290` |
1047
+ | `trigger` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1272-1292` |
1048
1048
  | `trigger` | property | `StartOpts` | `dist/bpmn/bpmn-sdk.d.ts:624-671` |
1049
1049
  | `triggeredByEvent` | property | `SubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:976-977` |
1050
1050
  | `triggerId` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:726-732` |
1051
- | `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1342-1361` |
1051
+ | `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1344-1363` |
1052
1052
  | `triggerOptions` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:718-719` |
1053
1053
  | `triggers` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:644-645` |
1054
1054
  | `triggers` | property | `CaseLayout` | `dist/case/case-sdk.d.ts:620-621` |
@@ -1104,7 +1104,7 @@ not find it either.
1104
1104
  | `value` | property | `TypedInputRow` | `dist/bpmn/typed-node.d.ts:205-206` |
1105
1105
  | `values` | property | `DataFabricCreateInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:132-137` |
1106
1106
  | `var` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1199-1223` |
1107
- | `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1455-1464` |
1107
+ | `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1457-1466` |
1108
1108
  | `var` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3059-3067` |
1109
1109
  | `var` | property | `TaskOutputBinding` | `dist/case/case-sdk.d.ts:494-495` |
1110
1110
  | `var` | property | `TypedOutputRow` | `dist/bpmn/typed-node.d.ts:251-252` |
@@ -1127,7 +1127,7 @@ not find it either.
1127
1127
  | `version` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:1708-1709` |
1128
1128
  | `version` | property | `EventSubscription` | `dist/core/actions.d.ts:2933` |
1129
1129
  | `version` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1507-1508` |
1130
- | `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1362-1375` |
1130
+ | `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1364-1377` |
1131
1131
  | `version` | property | `NodeOptions` | `dist/flow-sdk.d.ts:368-375` |
1132
1132
  | `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:126` |
1133
1133
  | `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:2890-2891` |
package/dist/check.js CHANGED
@@ -1512,10 +1512,14 @@ function checkSubflow(step, child, inputs, parent, ancestors, diags) {
1512
1512
  return;
1513
1513
  }
1514
1514
  // A subflow always starts manually — its caller is what starts it. Nothing
1515
- // schedules a subflow, so a schedule here is silently ignored.
1516
- if (child.trigger !== undefined) {
1515
+ // schedules a subflow, so a schedule here is silently ignored. `manual()` is
1516
+ // what the child gets anyway, so `.trigger(manual(), { label, version })` is
1517
+ // allowed: it is how the child's start node is labelled (#1050), and the
1518
+ // form decompile writes for a renamed one.
1519
+ if (child.trigger !== undefined && child.trigger.kind !== 'manual') {
1517
1520
  at('SUBFLOW_CHILD_TRIGGER', `Subflow "${step}" runs a flow with its own \`.trigger(…)\`. A subflow is started by its caller, never by a `
1518
- + `trigger of its own — the schedule would be dropped. Remove the .trigger() from "${child.id}".`);
1521
+ + `trigger of its own — the schedule would be dropped. Remove the .trigger() from "${child.id}" `
1522
+ + `(\`.trigger(manual(), { label })\` is allowed, to name the child's start node).`);
1519
1523
  }
1520
1524
  // `{ shared }` merges one input across a flow's ROOTS (#924). A subflow has
1521
1525
  // one root, its caller, so there is nothing to merge; serialize refuses it.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A subflow child's start-node label when the author sets none: `Start`, what
3
+ * Studio Web writes (the vendored golden `shared/sample-flows/new.flow`,
4
+ * `subflow1Start`). It is not the manual trigger definition's `Manual trigger`.
5
+ */
6
+ export declare const SUBFLOW_START_LABEL = "Start";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A subflow child's start-node label when the author sets none: `Start`, what
3
+ * Studio Web writes (the vendored golden `shared/sample-flows/new.flow`,
4
+ * `subflow1Start`). It is not the manual trigger definition's `Manual trigger`.
5
+ */
6
+ export const SUBFLOW_START_LABEL = 'Start';
package/dist/decompile.js CHANGED
@@ -33,6 +33,7 @@ import { preserveSchemaVersion } from './schema-version.js';
33
33
  import { BUNDLED_DEFINITIONS, bundledVersions } from './flow-definitions.js';
34
34
  import { DEFAULT_TRIGGER_ID, Expr } from './core/expr.js';
35
35
  import { FLOW_NODE_TYPES } from './flow-node-registry.js';
36
+ import { SUBFLOW_START_LABEL } from './core/subflow-start.js';
36
37
  import { commentText } from './core/comment-text.js';
37
38
  import { tsLiteral, tsNumber, tsText } from './core/ts-literal.js';
38
39
  import { contextIndexSlug, parseContextIndexType } from './core/context-index.js';
@@ -163,18 +164,22 @@ function verArg(node) {
163
164
  }
164
165
  /**
165
166
  * A trigger node's option clauses: its exact `version`, and its canvas `label`
166
- * when that differs from the definition's label (`definitionLabel`).
167
+ * when that differs from `defaultLabel` (the label serialize writes when the
168
+ * author sets none).
167
169
  */
168
- function triggerOptParts(node) {
170
+ function triggerOptParts(node, defaultLabel = definitionLabel(node)) {
169
171
  const parts = [];
170
172
  const ver = verClause(node);
171
173
  if (ver)
172
174
  parts.push(ver);
173
- const label = node.display?.label;
174
- if (typeof label === 'string' && label !== definitionLabel(node))
175
- parts.push(`label: ${tsLiteral(label)}`);
175
+ if (hasRenamedLabel(node, defaultLabel))
176
+ parts.push(`label: ${tsLiteral(node.display.label)}`);
176
177
  return parts;
177
178
  }
179
+ function hasRenamedLabel(node, defaultLabel) {
180
+ const label = node.display?.label;
181
+ return typeof label === 'string' && label !== defaultLabel;
182
+ }
178
183
  /** `triggerOptParts` as the `.trigger(spec, { ... })` options argument. */
179
184
  function triggerOptsArg(node) {
180
185
  const parts = triggerOptParts(node);
@@ -3073,7 +3078,8 @@ function emitSubflow(node, ctx) {
3073
3078
  /**
3074
3079
  * Render a child (sub)flow body as a nested `flow(name)…` builder expression
3075
3080
  * (parenthesized, no `.build()`). Reuses the same region machinery on the child's
3076
- * own scope; the child's trigger is its `<caller>Start` node.
3081
+ * own scope; the child's trigger is its `<caller>Start` node, written as
3082
+ * `.trigger(manual(), { label })` only when its label is not `SUBFLOW_START_LABEL`.
3077
3083
  */
3078
3084
  function emitChildFlow(name, child, ctx) {
3079
3085
  const globals = readFlowGlobals(child.variables, runStrict);
@@ -3098,6 +3104,9 @@ function emitChildFlow(name, child, ctx) {
3098
3104
  }
3099
3105
  // Body: the child's trigger is its own manual Start; walk from its successor.
3100
3106
  const trigger = (child.nodes ?? []).find((n) => isTrigger(n.type) && !(child.edges ?? []).some((e) => e.targetNodeId === n.id));
3107
+ if (trigger?.type === T.triggerManual && hasRenamedLabel(trigger, SUBFLOW_START_LABEL)) {
3108
+ parts.push(`.trigger(${ctx.imp.use('manual')}(), { ${triggerOptParts(trigger, SUBFLOW_START_LABEL).join(', ')} })`);
3109
+ }
3101
3110
  const scope = scopeIds(child.nodes ?? [], undefined);
3102
3111
  const entries = trigger ? scopeSuccEdges(childCtx.graph, trigger.id, scope) : [];
3103
3112
  const ipdom = entries.length
@@ -1284,6 +1284,8 @@ declare class FlowBuilder extends StepList {
1284
1284
  * @param options - Node options; `version` selects the exact definition
1285
1285
  * version and `label` sets what the canvas shows on the trigger node
1286
1286
  * (default: the trigger definition's label, e.g. `Scheduled trigger`). See {@link NodeOptions}.
1287
+ * On a flow run as a `subflow(...)`, only `manual()` is allowed — its caller
1288
+ * starts it — and `label` names the child's start node (default: `Start`).
1287
1289
  * @returns This builder, so calls chain.
1288
1290
  * @defaultValue the manual trigger
1289
1291
  */
package/dist/flow-sdk.js CHANGED
@@ -976,6 +976,8 @@ class FlowBuilder extends StepList {
976
976
  * @param options - Node options; `version` selects the exact definition
977
977
  * version and `label` sets what the canvas shows on the trigger node
978
978
  * (default: the trigger definition's label, e.g. `Scheduled trigger`). See {@link NodeOptions}.
979
+ * On a flow run as a `subflow(...)`, only `manual()` is allowed — its caller
980
+ * starts it — and `label` names the child's start node (default: `Start`).
979
981
  * @returns This builder, so calls chain.
980
982
  * @defaultValue the manual trigger
981
983
  */
package/dist/serialize.js CHANGED
@@ -60,6 +60,7 @@ import { QUEUE_ITEM_RECORD_SCHEMA } from './core/queue-record.js';
60
60
  import { AGENTIC_PROCESS_FORMS } from './core/agentic-process-forms.js';
61
61
  import { resourceNodeSortOrder } from './core/process-resource-sort-order.js';
62
62
  import { types } from './core/expr.js';
63
+ import { SUBFLOW_START_LABEL } from './core/subflow-start.js';
63
64
  import { ownEntry } from './core/own-entry.js';
64
65
  import { jsonClone } from './core/json-file.js';
65
66
  const HERE = dirname(fileURLToPath(import.meta.url));
@@ -4871,7 +4872,9 @@ export function serialize(built, opts = {}) {
4871
4872
  *
4872
4873
  * The child gets its own manual Start node (a subflow always starts manually
4873
4874
  * — nothing schedules a subflow; its caller is the trigger) and its own
4874
- * variables. Every `in` variable carries `triggerNodeId` pointing at that
4875
+ * variables. A child's `.trigger(manual(), { label, version })` sets that
4876
+ * node's canvas label and exact version; `check` refuses any other kind.
4877
+ * Every `in` variable carries `triggerNodeId` pointing at that
4875
4878
  * Start: it is what binds the caller's value, and omitting it is the single
4876
4879
  * defect that makes a subflow validate clean and then fault at run time with
4877
4880
  * a null. It is emitted here, always, so it cannot be forgotten.
@@ -4900,7 +4903,10 @@ export function serialize(built, opts = {}) {
4900
4903
  // Without this a child that reads its own input points at a node that does
4901
4904
  // not exist in its scope.
4902
4905
  scope.rename.nodeIds.set('start', [startId]);
4903
- const start = makeNode(NODE_TYPE.trigger, startId, 'Start', { requestedVersion: child.triggerOptions?.version });
4906
+ // The child's `.trigger(manual(), { label })`, else `SUBFLOW_START_LABEL`.
4907
+ const start = makeNode(NODE_TYPE.trigger, startId, child.triggerOptions?.label ?? SUBFLOW_START_LABEL, {
4908
+ requestedVersion: child.triggerOptions?.version,
4909
+ });
4904
4910
  start.inputs = {};
4905
4911
  scope.nodes.push(start);
4906
4912
  const tails = emit(child.steps, [{ node: startId, port: 'output' }], scope);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.20.3",
3
+ "version": "6.20.4",
4
4
  "description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.uipath.com/maestro",
@@ -92,5 +92,5 @@
92
92
  "@types/node": "^22.7.0",
93
93
  "esbuild": "^0.28.1"
94
94
  },
95
- "gitref": "15fa01717ebe49d6cf51c9ec11cca4a7ebbf9bb7"
95
+ "gitref": "7dcc7ebc0420e1fca8be0368269c8f20ff60eff6"
96
96
  }