@uipath/maestro-builder-sdk 6.40.0 → 6.41.0

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 (36) hide show
  1. package/dist/api-index.md +115 -115
  2. package/dist/api-members.md +356 -354
  3. package/dist/bpmn/bpmn-sdk.d.ts +4 -3
  4. package/dist/bpmn/bpmn-sdk.js +13 -3
  5. package/dist/bpmn/check.js +13 -13
  6. package/dist/bpmn/registry-fallback.js +4 -0
  7. package/dist/bpmn/registry-types.json +1716 -206
  8. package/dist/bpmn/typed-node.d.ts +33 -32
  9. package/dist/bpmn/typed-node.js +19 -37
  10. package/dist/check.js +8 -487
  11. package/dist/core/actions.d.ts +0 -391
  12. package/dist/core/actions.js +0 -167
  13. package/dist/core/nodes/registry.d.ts +6 -1
  14. package/dist/core/nodes/registry.js +32 -2
  15. package/dist/core/nodes/versioned.d.ts +12 -0
  16. package/dist/core/nodes/versioned.js +7 -2
  17. package/dist/core/process-resource.d.ts +102 -0
  18. package/dist/core/process-resource.js +118 -0
  19. package/dist/decompile.js +9 -10
  20. package/dist/flow-node-registry.js +2 -1
  21. package/dist/flow-sdk.d.ts +1 -0
  22. package/dist/flow-sdk.js +1 -0
  23. package/dist/nodes/process/flow/check.d.ts +112 -0
  24. package/dist/nodes/process/flow/check.js +444 -0
  25. package/dist/nodes/process/flow/factories.d.ts +158 -0
  26. package/dist/nodes/process/flow/factories.js +173 -0
  27. package/dist/nodes/process/flow/family.d.ts +3 -0
  28. package/dist/nodes/process/flow/family.js +8 -0
  29. package/dist/nodes/process/flow/index.d.ts +3 -0
  30. package/dist/nodes/process/flow/index.js +3 -0
  31. package/dist/nodes/process/flow/node-type.d.ts +23 -0
  32. package/dist/nodes/process/flow/node-type.js +652 -0
  33. package/dist/nodes/process/flow/spec.d.ts +255 -0
  34. package/dist/nodes/process/flow/spec.js +1 -0
  35. package/dist/serialize.js +41 -612
  36. package/package.json +2 -2
@@ -2725,9 +2725,10 @@ declare abstract class ScopeBuilder {
2725
2725
  * therefore proves the graph runs and the artifact validates — nothing about the
2726
2726
  * message actually arriving. See Phase 5 in `docs/BPMN_COVERAGE_DESIGN.md`.
2727
2727
  *
2728
- * The throw side (`Maestro.SendMessageEvent`) is deliberately NOT authored: its
2729
- * required `Reference` payload field cannot be expressed in a way the platform
2730
- * validator accepts. See `unsatisfiableRequiredInputs`.
2728
+ * The throw side (`Maestro.SendMessageEvent`) has no builder method yet; author it
2729
+ * as `.activity('send', 'Maestro.SendMessageEvent', { context: { name, inputSchema },
2730
+ * inputs: { Reference } })` — it validates on uip 1.205 (Phase 6 in
2731
+ * `docs/BPMN_COVERAGE_DESIGN.md`).
2731
2732
  *
2732
2733
  * @example
2733
2734
  * **Wait for another process to signal a shipment**
@@ -344,6 +344,15 @@ class ScopeBuilder {
344
344
  * @returns This builder, so calls chain.
345
345
  */
346
346
  pushActivity(node, body) {
347
+ // An `outputVar` names the variable the type's own output row lands in; a type
348
+ // with no output row (the fire-and-forget Async starts) would accept it and emit
349
+ // nothing, so the author reads a variable nothing ever writes.
350
+ if (node.kind === 'typed' && node.outputVar !== undefined && !node.outputRows && !registryType(node.type, node.spec).output) {
351
+ throw new Error(`"${node.id}" (${node.type}) publishes no output row, so outputVar "${node.outputVar}" would bind nothing. ` +
352
+ (node.type.endsWith('Async')
353
+ ? 'The Async start returns before the job does: drop outputVar, or use the waiting form (async: false) to read the response.'
354
+ : 'Drop outputVar, or spell the rows with outputRows.'));
355
+ }
347
356
  this.place(node);
348
357
  if (body)
349
358
  body(new ActivityBuilder(this, node.id));
@@ -1620,9 +1629,10 @@ class ScopeBuilder {
1620
1629
  * therefore proves the graph runs and the artifact validates — nothing about the
1621
1630
  * message actually arriving. See Phase 5 in `docs/BPMN_COVERAGE_DESIGN.md`.
1622
1631
  *
1623
- * The throw side (`Maestro.SendMessageEvent`) is deliberately NOT authored: its
1624
- * required `Reference` payload field cannot be expressed in a way the platform
1625
- * validator accepts. See `unsatisfiableRequiredInputs`.
1632
+ * The throw side (`Maestro.SendMessageEvent`) has no builder method yet; author it
1633
+ * as `.activity('send', 'Maestro.SendMessageEvent', { context: { name, inputSchema },
1634
+ * inputs: { Reference } })` — it validates on uip 1.205 (Phase 6 in
1635
+ * `docs/BPMN_COVERAGE_DESIGN.md`).
1626
1636
  *
1627
1637
  * @example
1628
1638
  * **Wait for another process to signal a shipment**
@@ -3,7 +3,7 @@ import { allNodes, folderCompanionKeys, implicitNodeVars, processId } from './se
3
3
  import { KNOWN_METHOD_SET } from './known-methods.js';
4
4
  import { EQUALS_EXPR_DIALECT, checkConnectorContract, checkConnectorLookups, checkConnectorSchema, checkBindingLabels, } from '../core/connector-checks.js';
5
5
  import { checkEventResolution, checkEventSubscription, eventParamsFor, } from '../core/event-checks.js';
6
- import { bindingRequiredFields, missingRequiredContext, missingRequiredInputs, REGISTRY_GAPS, registryType, unsatisfiableRequiredInputs, } from './typed-node.js';
6
+ import { bindingRequiredFields, CASE_RUNTIME_INTERNAL_TYPES, missingRequiredContext, missingRequiredInputs, REGISTRY_GAPS, registryType, } from './typed-node.js';
7
7
  import { ownEntry } from '../core/own-entry.js';
8
8
  /**
9
9
  * The job-start family — the types whose engine handler switches addressing on the
@@ -1427,20 +1427,20 @@ inEventSubProcess = false) {
1427
1427
  where: n.id,
1428
1428
  });
1429
1429
  }
1430
- // A type whose required payload fields cannot be expressed at all. Warning,
1431
- // not error: the node is as correct as the registry allows, so refusing it
1432
- // would block work the platform, not the author, has to fix. Saying nothing
1433
- // is worse — the artifact validates here and is rejected by the CLI.
1434
- const unsatisfiable = unsatisfiableRequiredInputs(n.type, n.spec);
1435
- if (unsatisfiable.length) {
1430
+ // A type the case-management runtime writes for itself. Warning, not error:
1431
+ // the platform validates it, and nobody designs a process around it. The one
1432
+ // legitimate authored form is a preserved import, which `decompile` writes as
1433
+ // `contextVerbatim: true` — that node is left alone, so a brownfield edit that
1434
+ // keeps the platform's nodes as they were is not told off on every check.
1435
+ if (CASE_RUNTIME_INTERNAL_TYPES.has(n.type) && n.contextVerbatim !== true) {
1436
1436
  diags.push({
1437
1437
  level: 'warning',
1438
- code: 'REQUIRED_INPUT_UNSATISFIABLE',
1439
- message: `"${n.id}" (${n.type}) declares required input(s) ${unsatisfiable.map((f) => `"${f}"`).join(', ')}, ` +
1440
- `but its "${registryType(n.type, n.spec).inputPattern}" pattern merges every input into one row, so the ` +
1441
- `platform's required-field rule cannot see them. \`uip maestro bpmn validate\` will report ` +
1442
- `EMPTY_REQUIRED_FIELD whatever this node carries — a platform defect, not an authoring error. ` +
1443
- `See docs/BPMN_COVERAGE_DESIGN.md D13.`,
1438
+ code: 'TYPE_RUNTIME_INTERNAL',
1439
+ message: `"${n.id}" (${n.type}) is a node the case-management runtime writes for itself when it materializes a ` +
1440
+ `case plan (scheduler state only the platform produces); the canvas offers it nowhere, and a process is not ` +
1441
+ `designed around one — author the case in the Case SDK instead. To preserve an imported one as it was, keep ` +
1442
+ `the form \`decompile\` writes (\`contextVerbatim: true\`), which this check leaves alone. ` +
1443
+ `See its row in typescript/sdk/bpmn-coverage.json.`,
1444
1444
  where: n.id,
1445
1445
  });
1446
1446
  }
@@ -159,7 +159,11 @@ export function shapeExtensionType(spec) {
159
159
  output,
160
160
  eventDefinition: eventDefinitionOf(spec.XmlTemplate),
161
161
  requiresDiscovery: Boolean(spec.RequiresDiscovery),
162
+ isDynamic: Boolean(spec.IsDynamic),
162
163
  bindingPattern: spec.BindingPattern ?? 'none',
164
+ placements: Object.fromEntries(Object.entries((spec.Placements ?? {}))
165
+ .sort(([a], [b]) => a.localeCompare(b))
166
+ .map(([name, p]) => [name, { element: p?.Type ?? null, eventDefinition: p?.EventDefinition?.Type ?? null }])),
163
167
  };
164
168
  }
165
169
  /** `registry get <type>`, shaped, or `undefined` when the registry has no such type. */