@uipath/maestro-builder-sdk 6.16.2 → 6.16.3

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,10 +128,10 @@ could hand you spans for a version you do not have.
128
128
  | `FilterCondition` | type | `dist/core/actions.d.ts:233-234` | Supporting types | Comparison a filter rule applies to a field. |
129
129
  | `FilterMatch` | type | `dist/core/actions.d.ts:231-232` | Supporting types | How a filter combines its rules: every rule must match, or any one. |
130
130
  | `FilterRule` | interface | `dist/core/actions.d.ts:235-247` | Supporting types | 3 field(s) |
131
- | `flow` | function | `dist/flow-sdk.d.ts:1423-1438` | Flow construction | Start building a flow with the given id. |
131
+ | `flow` | function | `dist/flow-sdk.d.ts:1424-1439` | Flow construction | Start building a flow with the given id. |
132
132
  | `FlowAction` | class | `dist/core/node-classes.d.ts:158-164` | Supporting types | A node placed as a step — pass an instance to `.step(name, …)`. |
133
133
  | `FlowActionSpec` | type | `dist/flow-sdk.d.ts:41-42` | Supporting types | What `.step()` accepts here: the shared actions plus this SDK's subflow. |
134
- | `FlowBuilder` | class | `dist/flow-sdk.d.ts:1156-1422` | Builders | 13 member(s) |
134
+ | `FlowBuilder` | class | `dist/flow-sdk.d.ts:1156-1423` | Builders | 13 member(s) |
135
135
  | `FlowLayout` | interface | `dist/flow-sdk.d.ts:646-659` | Supporting types | Designer layout for a flow, keyed by AUTHOR-level ids: node entries by step name (plus the trigger id and `end`), edge… |
136
136
  | `FlowNode` | class | `dist/core/node-classes.d.ts:122-157` | Supporting types | The abstract root of every definition-backed node the builder can place. |
137
137
  | `FlowResource` | class | `dist/core/node-classes.d.ts:172-179` | Supporting types | A node attached to another semantic node — an inline agent's tool, context, memory, or escalation. |
@@ -227,7 +227,7 @@ could hand you spans for a version you do not have.
227
227
  | `STICKY_NOTE_COLORS` | const | `dist/flow-sdk.d.ts:599-604` | Flow construction | The designer's sticky-note palette. |
228
228
  | `StickyNote` | interface | `dist/flow-sdk.d.ts:611-645` | Supporting types | A canvas sticky note — free text pinned to the diagram, for the humans reading it. |
229
229
  | `StickyNoteColor` | type | `dist/flow-sdk.d.ts:605-610` | Supporting types | A sticky note's swatch. |
230
- | `subflow` | function | `dist/flow-sdk.d.ts:1439-1478` | Flow construction | Run another flow as one step, and read back what it returns. |
230
+ | `subflow` | function | `dist/flow-sdk.d.ts:1440-1479` | Flow construction | Run another flow as one step, and read back what it returns. |
231
231
  | `SubflowSpec` | interface | `dist/flow-sdk.d.ts:33-40` | Supporting types | A step that runs a child flow. |
232
232
  | `summarize` | function | `dist/core/actions.d.ts:2580-2620` | Actions | Summarize a document with citations — the platform's **Summarize** node. |
233
233
  | `SummarizeInputs` | interface | `dist/core/actions.d.ts:797-829` | Option shapes | 3 field(s) |
@@ -100,7 +100,7 @@ not find it either.
100
100
  | `breakEnabled` | property | `LoopOptions` | `dist/flow-sdk.d.ts:441-445` |
101
101
  | `build` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3534-3539` |
102
102
  | `build` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1269-1274` |
103
- | `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1415-1421` |
103
+ | `build` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1416-1422` |
104
104
  | `businessRule` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2526-2572` |
105
105
  | `by` | property | `LookupResolution` | `dist/core/lookups.d.ts:164` |
106
106
  | `by` | property | `LookupSpec` | `dist/core/lookups.d.ts:27-28` |
@@ -272,7 +272,7 @@ not find it either.
272
272
  | `entity` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1089-1090` |
273
273
  | `entry` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:528` |
274
274
  | `entry` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:520` |
275
- | `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1243-1291` |
275
+ | `entryPoint` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1243-1292` |
276
276
  | `entryPointId` | property | `ProcessMetadata` | `dist/bpmn/bpmn-sdk.d.ts:533-538` |
277
277
  | `entryPoints` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:699-700` |
278
278
  | `entryWhen` | method | `StageBuilder` | `dist/case/case-sdk.d.ts:1004-1011` |
@@ -438,7 +438,7 @@ not find it either.
438
438
  | `inclusive` | property | `ChooseOpts` | `dist/bpmn/bpmn-sdk.d.ts:1819-1823` |
439
439
  | `inclusiveGateway` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2265-2272` |
440
440
  | `input` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1160-1185` |
441
- | `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1366-1378` |
441
+ | `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1367-1379` |
442
442
  | `input` | property | `HumanTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1354-1355` |
443
443
  | `input` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1240-1241` |
444
444
  | `input` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3067-3075` |
@@ -700,7 +700,7 @@ not find it either.
700
700
  | `outcomes` | property | `EscalationRef` | `dist/core/actions.d.ts:1965-1970` |
701
701
  | `outcomes` | property | `HitlInputs` | `dist/core/actions.d.ts:577-591` |
702
702
  | `output` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1186-1198` |
703
- | `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1379-1404` |
703
+ | `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1380-1405` |
704
704
  | `output` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:90` |
705
705
  | `output` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3076-3084` |
706
706
  | `outputColumns` | property | `BatchTransformInputs` | `dist/core/actions.d.ts:845-849` |
@@ -871,7 +871,7 @@ not find it either.
871
871
  | `schemaVersion` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3426-3455` |
872
872
  | `schemaVersion` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:679-685` |
873
873
  | `schemaVersion` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1068-1094` |
874
- | `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1326-1365` |
874
+ | `schemaVersion` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1327-1366` |
875
875
  | `scope` | property | `EscalationRecipient` | `dist/case/case-sdk.d.ts:121` |
876
876
  | `scopes` | property | `GuardrailSelector` | `dist/core/actions.d.ts:1281` |
877
877
  | `script` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:845-861` |
@@ -1014,7 +1014,7 @@ not find it either.
1014
1014
  | `trigger` | property | `StartOpts` | `dist/bpmn/bpmn-sdk.d.ts:623-670` |
1015
1015
  | `triggeredByEvent` | property | `SubProcessOpts` | `dist/bpmn/bpmn-sdk.d.ts:975-976` |
1016
1016
  | `triggerId` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:701-707` |
1017
- | `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1292-1311` |
1017
+ | `triggerId` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1293-1312` |
1018
1018
  | `triggerOptions` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:693-694` |
1019
1019
  | `triggers` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:644-645` |
1020
1020
  | `triggers` | property | `CaseLayout` | `dist/case/case-sdk.d.ts:620-621` |
@@ -1070,7 +1070,7 @@ not find it either.
1070
1070
  | `value` | property | `TypedInputRow` | `dist/bpmn/typed-node.d.ts:205-206` |
1071
1071
  | `values` | property | `DataFabricCreateInputs` | `dist/core/actions.d.ts:2212-2217` |
1072
1072
  | `var` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1199-1223` |
1073
- | `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1405-1414` |
1073
+ | `var` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1406-1415` |
1074
1074
  | `var` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3058-3066` |
1075
1075
  | `var` | property | `TaskOutputBinding` | `dist/case/case-sdk.d.ts:494-495` |
1076
1076
  | `var` | property | `TypedOutputRow` | `dist/bpmn/typed-node.d.ts:251-252` |
@@ -1093,7 +1093,7 @@ not find it either.
1093
1093
  | `version` | property | `ConnectorToolRef` | `dist/core/actions.d.ts:1807-1808` |
1094
1094
  | `version` | property | `EventSubscription` | `dist/core/actions.d.ts:3484` |
1095
1095
  | `version` | property | `ExternalTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1506-1507` |
1096
- | `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1312-1325` |
1096
+ | `version` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1313-1326` |
1097
1097
  | `version` | property | `NodeOptions` | `dist/flow-sdk.d.ts:354-361` |
1098
1098
  | `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:126` |
1099
1099
  | `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:3441-3442` |
package/dist/check.js CHANGED
@@ -50,9 +50,9 @@ function checkFlow(built, ancestors, opts = {}) {
50
50
  checkTrigger(built.trigger, diags, opts);
51
51
  if (built.trigger?.kind === 'form' && built.inputs.length === 0) {
52
52
  diags.push({
53
- level: 'warning', code: 'FORM_TRIGGER_NO_INPUTS', step: 'trigger',
54
- message: `formTrigger() renders one field per flow input, and this flow declares none — the person `
55
- + `gets an empty form with only a submit button.`,
53
+ level: 'error', code: 'FORM_TRIGGER_NO_INPUTS', step: 'trigger',
54
+ message: `formTrigger() renders one field per flow input, and this flow declares none. `
55
+ + `Publish skips a form with no fields, so the flow would ship with no form.`,
56
56
  suggestion: `.input({ amount: types.number })`,
57
57
  });
58
58
  }
@@ -857,7 +857,22 @@ function checkFlow(built, ancestors, opts = {}) {
857
857
  }
858
858
  }
859
859
  else {
860
- checkTrigger(ep.trigger, diags, opts, `onEvent() entry point "${ep.id}"`);
860
+ checkTrigger(ep.trigger, diags, opts, ep.id);
861
+ }
862
+ if (ep.trigger.kind === 'form' && ep.inputs.length === 0) {
863
+ diags.push({
864
+ level: 'error', code: 'FORM_TRIGGER_NO_INPUTS', step: ep.id,
865
+ message: `.entryPoint("${ep.id}", formTrigger()) renders one field per entry-point input, and it declares none. `
866
+ + `Publish skips a form with no fields, so this root would ship with no form.`,
867
+ suggestion: `.entryPoint("${ep.id}", formTrigger(), { inputs: { amount: types.number } })`,
868
+ });
869
+ }
870
+ if ((ep.trigger.kind === 'conversation' || ep.trigger.kind === 'voice') && ep.inputs.length) {
871
+ diags.push({
872
+ level: 'warning', code: 'TRIGGER_INPUTS_IGNORED', step: ep.id,
873
+ message: `.entryPoint("${ep.id}") declares inputs, but a ${ep.trigger.kind} trigger starts with only what the platform `
874
+ + `supplies (${ep.trigger.kind === 'voice' ? 'callContext' : 'conversationId'}). Its inputs are never passed.`,
875
+ });
861
876
  }
862
877
  for (const inp of ep.inputs) {
863
878
  const collides = built.inputs.some((g) => g.name === inp.name)
@@ -879,6 +894,17 @@ function checkFlow(built, ancestors, opts = {}) {
879
894
  message: 'Entry points join the shared body, but this flow has no shared step. Add one, or end each prefix terminally.',
880
895
  });
881
896
  }
897
+ const conversationRoots = [
898
+ ...(built.trigger?.kind === 'conversation' ? [triggerId] : []),
899
+ ...(built.entryPoints ?? []).filter((ep) => ep.trigger.kind === 'conversation').map((ep) => ep.id),
900
+ ];
901
+ if (conversationRoots.length > 1) {
902
+ diags.push({
903
+ level: 'error', code: 'SINGLE_CONVERSATION_TRIGGER', step: conversationRoots[1],
904
+ message: `Only one conversationTrigger() is allowed per flow, and ${conversationRoots.length} roots use one: `
905
+ + `${conversationRoots.map((id) => `"${id}"`).join(', ')}. Keep one and give the others another trigger.`,
906
+ });
907
+ }
882
908
  checkStepRefs(built, diags);
883
909
  checkArmScopedReads(built, diags);
884
910
  // A fire-and-forget dispatch publishes no output: any read of it would wait
@@ -1731,9 +1757,11 @@ function checkNodeUpdates(built, diags) {
1731
1757
  };
1732
1758
  visit(built.steps);
1733
1759
  }
1734
- function checkTrigger(spec, diags, opts = {}, where) {
1760
+ function checkTrigger(spec, diags, opts = {}, entryPointId) {
1761
+ const where = entryPointId === undefined ? undefined : `onEvent() entry point "${entryPointId}"`;
1762
+ const call = entryPointId === undefined ? '.trigger()' : `.entryPoint("${entryPointId}")`;
1735
1763
  const push = (level) => (code, message, suggestion) => {
1736
- diags.push({ level, code, message, step: 'trigger', ...(suggestion ? { suggestion } : {}) });
1764
+ diags.push({ level, code, message, step: entryPointId ?? 'trigger', ...(suggestion ? { suggestion } : {}) });
1737
1765
  };
1738
1766
  const at = push('error');
1739
1767
  // Types are stripped at run time, so `.trigger({ every: 'R/PT1H' })` (the spec
@@ -1758,7 +1786,7 @@ function checkTrigger(spec, diags, opts = {}, where) {
1758
1786
  if (spec?.kind === 'conversation' || spec?.kind === 'voice')
1759
1787
  return;
1760
1788
  if (spec?.kind !== 'scheduled') {
1761
- at('TRIGGER_UNKNOWN_KIND', `.trigger() was given ${JSON.stringify(spec?.kind)}, which is not a trigger. `
1789
+ at('TRIGGER_UNKNOWN_KIND', `${call} was given ${JSON.stringify(spec?.kind)}, which is not a trigger. `
1762
1790
  + `Wrap it in a factory: scheduled({ every: 'R/PT1H' }) for a schedule, `
1763
1791
  + `onEvent({ connector, event, where, connection, folder }) to start on a connector event, formTrigger() to start from a `
1764
1792
  + `submitted form, or conversationTrigger() to start on a new conversation. Omit .trigger() entirely `
@@ -661,7 +661,7 @@ export interface FlowLayout {
661
661
  export interface BuiltEntryPoint {
662
662
  /** The trigger node's id — also the root expressions read (`$vars.<id>.output.x`). */
663
663
  id: string;
664
- /** What fires this root: `manual()`, `scheduled(...)`, or `onEvent(...)`. */
664
+ /** What fires this root: any built-in trigger factory, or a custom trigger. */
665
665
  trigger: TriggerSpec;
666
666
  /** Node options for the trigger node — exact `version` selection. */
667
667
  options?: NodeOptions;
@@ -1278,8 +1278,9 @@ declare class FlowBuilder extends StepList {
1278
1278
  *
1279
1279
  * @param id - The root's trigger-node id — unique among entry points, steps,
1280
1280
  * and the default trigger id. Expressions read it as `$vars.<id>.output.*`.
1281
- * @param trigger - What fires this root: `manual()`, `scheduled(...)`, or
1282
- * `onEvent(...)`.
1281
+ * @param trigger - What fires this root: `manual()`, `scheduled(...)`,
1282
+ * `onEvent(...)`, `formTrigger()` (one field per scoped input),
1283
+ * `conversationTrigger()`, or `voiceTrigger()`.
1283
1284
  * @param options - `version` (exact trigger definition version) and `inputs`
1284
1285
  * — this root's scoped inputs, declared like `.input()`.
1285
1286
  * @param prefixFn - Optional sub-builder for the root's prefix steps.
package/dist/flow-sdk.js CHANGED
@@ -993,8 +993,9 @@ class FlowBuilder extends StepList {
993
993
  *
994
994
  * @param id - The root's trigger-node id — unique among entry points, steps,
995
995
  * and the default trigger id. Expressions read it as `$vars.<id>.output.*`.
996
- * @param trigger - What fires this root: `manual()`, `scheduled(...)`, or
997
- * `onEvent(...)`.
996
+ * @param trigger - What fires this root: `manual()`, `scheduled(...)`,
997
+ * `onEvent(...)`, `formTrigger()` (one field per scoped input),
998
+ * `conversationTrigger()`, or `voiceTrigger()`.
998
999
  * @param options - `version` (exact trigger definition version) and `inputs`
999
1000
  * — this root's scoped inputs, declared like `.input()`.
1000
1001
  * @param prefixFn - Optional sub-builder for the root's prefix steps.
package/dist/serialize.js CHANGED
@@ -4838,9 +4838,9 @@ export function serialize(built, opts = {}) {
4838
4838
  ? scheduleInputs(built.trigger.inputs, triggerId)
4839
4839
  : built.trigger?.kind === 'form'
4840
4840
  ? {
4841
- // The definition marks the family an entry point (`model.entryPointId:
4842
- // true`); the id is the node's own, the scheduled trigger's convention.
4843
- entryPointId: triggerId,
4841
+ // A GUID: publish keys the form's FormTrigger binding on it and skips
4842
+ // the form when it is not one.
4843
+ entryPointId: stableId(`${built.id}:${triggerId}:entryPoint`),
4844
4844
  schema: { fields: formTriggerFields(built.inputs), outcomes: [] },
4845
4845
  }
4846
4846
  : built.trigger?.kind === 'conversation' || built.trigger?.kind === 'voice'
@@ -6842,10 +6842,28 @@ export function serialize(built, opts = {}) {
6842
6842
  ...scheduleInputs(epSpec.inputs, ep.id),
6843
6843
  };
6844
6844
  }
6845
- else {
6845
+ else if (epSpec.kind === 'form') {
6846
+ node = makeNode(NODE_TYPE.formTrigger, ep.id, 'Form trigger', { requestedVersion });
6847
+ node.inputs = {
6848
+ entryPointId: stableId(`${built.id}:${ep.id}:entryPoint`),
6849
+ schema: { fields: formTriggerFields(ep.inputs), outcomes: [] },
6850
+ };
6851
+ }
6852
+ else if (epSpec.kind === 'conversation') {
6853
+ node = makeNode(NODE_TYPE.conversationTrigger, ep.id, 'Conversation trigger', { requestedVersion });
6854
+ node.inputs = { entryPointId: stableId(`${built.id}:${ep.id}:entryPoint`) };
6855
+ }
6856
+ else if (epSpec.kind === 'voice') {
6857
+ node = makeNode(NODE_TYPE.voiceTrigger, ep.id, 'Incoming call trigger', { requestedVersion });
6858
+ node.inputs = { entryPointId: stableId(`${built.id}:${ep.id}:entryPoint`) };
6859
+ }
6860
+ else if (epSpec.kind === 'manual') {
6846
6861
  node = makeNode(NODE_TYPE.trigger, ep.id, 'Manual trigger', { requestedVersion });
6847
6862
  node.inputs = { entryPointId: stableId(`${built.id}:${ep.id}:entryPoint`) };
6848
6863
  }
6864
+ else {
6865
+ throw new Error(`.entryPoint("${ep.id}"): unsupported trigger kind ${JSON.stringify(epSpec.kind)}.`);
6866
+ }
6849
6867
  root.nodes.push(node);
6850
6868
  const prefixTails = emit(ep.steps, [{ node: ep.id, port: 'output' }], root);
6851
6869
  for (const t of prefixTails) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.16.2",
3
+ "version": "6.16.3",
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": "f8da41b16f3176129d44eeb3dbd1f6c8be1ecfef"
95
+ "gitref": "c6b0cc7e26df31a2699ad9b67f3b5a9e2532bcd4"
96
96
  }