@uipath/maestro-builder-sdk 5.2.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.
- package/LICENSE +21 -0
- package/README.md +322 -0
- package/dist/bindings-v2.d.ts +37 -0
- package/dist/bindings-v2.js +155 -0
- package/dist/bindings.d.ts +6 -0
- package/dist/bindings.js +6 -0
- package/dist/bpmn/bpmn-expr-check.d.ts +41 -0
- package/dist/bpmn/bpmn-expr-check.js +218 -0
- package/dist/bpmn/bpmn-sdk.d.ts +2257 -0
- package/dist/bpmn/bpmn-sdk.js +1476 -0
- package/dist/bpmn/check-cli.d.ts +3 -0
- package/dist/bpmn/check-cli.js +32 -0
- package/dist/bpmn/check.d.ts +25 -0
- package/dist/bpmn/check.js +430 -0
- package/dist/bpmn/compile-cli.d.ts +3 -0
- package/dist/bpmn/compile-cli.js +60 -0
- package/dist/bpmn/connector.d.ts +56 -0
- package/dist/bpmn/connector.js +199 -0
- package/dist/bpmn/decompile-cli.d.ts +8 -0
- package/dist/bpmn/decompile-cli.js +54 -0
- package/dist/bpmn/decompile.d.ts +6 -0
- package/dist/bpmn/decompile.js +1108 -0
- package/dist/bpmn/format-profile.d.ts +27 -0
- package/dist/bpmn/format-profile.js +11 -0
- package/dist/bpmn/intsvc.d.ts +77 -0
- package/dist/bpmn/intsvc.js +155 -0
- package/dist/bpmn/load.d.ts +4 -0
- package/dist/bpmn/load.js +22 -0
- package/dist/bpmn/merge-cli.d.ts +3 -0
- package/dist/bpmn/merge-cli.js +45 -0
- package/dist/bpmn/merge.d.ts +19 -0
- package/dist/bpmn/merge.js +293 -0
- package/dist/bpmn/registry-types.json +1869 -0
- package/dist/bpmn/serialize.d.ts +28 -0
- package/dist/bpmn/serialize.js +757 -0
- package/dist/bpmn/tidy-cli.d.ts +2 -0
- package/dist/bpmn/tidy-cli.js +39 -0
- package/dist/bpmn/typed-node.d.ts +382 -0
- package/dist/bpmn/typed-node.js +551 -0
- package/dist/bpmn/uipath-moddle.v1.json +823 -0
- package/dist/bpmn/xml-ranges.d.ts +45 -0
- package/dist/bpmn/xml-ranges.js +151 -0
- package/dist/case/case-expr-check.d.ts +35 -0
- package/dist/case/case-expr-check.js +85 -0
- package/dist/case/case-sdk.d.ts +1282 -0
- package/dist/case/case-sdk.js +923 -0
- package/dist/case/check-cli.d.ts +3 -0
- package/dist/case/check-cli.js +31 -0
- package/dist/case/check.d.ts +18 -0
- package/dist/case/check.js +456 -0
- package/dist/case/compile-cli.d.ts +3 -0
- package/dist/case/compile-cli.js +291 -0
- package/dist/case/decompile-cli.d.ts +9 -0
- package/dist/case/decompile-cli.js +117 -0
- package/dist/case/decompile.d.ts +187 -0
- package/dist/case/decompile.js +1170 -0
- package/dist/case/entry-points.d.ts +79 -0
- package/dist/case/entry-points.js +118 -0
- package/dist/case/format-profile.d.ts +60 -0
- package/dist/case/format-profile.js +79 -0
- package/dist/case/ids.d.ts +24 -0
- package/dist/case/ids.js +76 -0
- package/dist/case/load.d.ts +12 -0
- package/dist/case/load.js +32 -0
- package/dist/case/preserve.d.ts +133 -0
- package/dist/case/preserve.js +105 -0
- package/dist/case/serialize.d.ts +10 -0
- package/dist/case/serialize.js +1414 -0
- package/dist/check-cli.d.ts +3 -0
- package/dist/check-cli.js +118 -0
- package/dist/check.d.ts +146 -0
- package/dist/check.js +4898 -0
- package/dist/cli/commands/bpmn.d.ts +2 -0
- package/dist/cli/commands/bpmn.js +73 -0
- package/dist/cli/commands/case.d.ts +2 -0
- package/dist/cli/commands/case.js +60 -0
- package/dist/cli/commands/flow.d.ts +2 -0
- package/dist/cli/commands/flow.js +99 -0
- package/dist/cli/commands/registry.d.ts +10 -0
- package/dist/cli/commands/registry.js +170 -0
- package/dist/cli/common.d.ts +30 -0
- package/dist/cli/common.js +92 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +18 -0
- package/dist/cli-run.d.ts +2 -0
- package/dist/cli-run.js +42 -0
- package/dist/compile-cli.d.ts +3 -0
- package/dist/compile-cli.js +160 -0
- package/dist/config.d.ts +47 -0
- package/dist/config.js +201 -0
- package/dist/core/actions.d.ts +3244 -0
- package/dist/core/actions.js +1062 -0
- package/dist/core/binding-messages.d.ts +1 -0
- package/dist/core/binding-messages.js +16 -0
- package/dist/core/bindings.d.ts +12 -0
- package/dist/core/bindings.js +67 -0
- package/dist/core/ceql.d.ts +73 -0
- package/dist/core/ceql.js +272 -0
- package/dist/core/cli-spelling.d.ts +39 -0
- package/dist/core/cli-spelling.js +62 -0
- package/dist/core/connector-raw-node.d.ts +21 -0
- package/dist/core/connector-raw-node.js +47 -0
- package/dist/core/connectors.d.ts +184 -0
- package/dist/core/connectors.js +128 -0
- package/dist/core/expr-check.d.ts +93 -0
- package/dist/core/expr-check.js +186 -0
- package/dist/core/expr.d.ts +323 -0
- package/dist/core/expr.js +400 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +10 -0
- package/dist/core/library.d.ts +440 -0
- package/dist/core/library.js +1183 -0
- package/dist/core/list-envelope.d.ts +45 -0
- package/dist/core/list-envelope.js +97 -0
- package/dist/core/lookup-store.d.ts +22 -0
- package/dist/core/lookup-store.js +85 -0
- package/dist/core/lookups.d.ts +227 -0
- package/dist/core/lookups.js +231 -0
- package/dist/core/node-classes.d.ts +234 -0
- package/dist/core/node-classes.js +158 -0
- package/dist/core/script-return.d.ts +68 -0
- package/dist/core/script-return.js +197 -0
- package/dist/core/stable-id.d.ts +28 -0
- package/dist/core/stable-id.js +37 -0
- package/dist/core-definitions.json +16249 -0
- package/dist/decompile-cli.d.ts +3 -0
- package/dist/decompile-cli.js +131 -0
- package/dist/decompile.d.ts +138 -0
- package/dist/decompile.js +2482 -0
- package/dist/emit.d.ts +10 -0
- package/dist/emit.js +60 -0
- package/dist/event-filters.d.ts +130 -0
- package/dist/event-filters.js +137 -0
- package/dist/flow-expr-check.d.ts +17 -0
- package/dist/flow-expr-check.js +193 -0
- package/dist/flow-sdk.d.ts +1341 -0
- package/dist/flow-sdk.js +1164 -0
- package/dist/flow-variables.d.ts +13 -0
- package/dist/flow-variables.js +42 -0
- package/dist/format-profile.d.ts +72 -0
- package/dist/format-profile.js +97 -0
- package/dist/generators/_connections.py +287 -0
- package/dist/generators/_events.py +355 -0
- package/dist/generators/_lookups.py +114 -0
- package/dist/generators/_naming.py +185 -0
- package/dist/generators/_objects.py +299 -0
- package/dist/generators/_resolve.py +273 -0
- package/dist/generators/convert_library_to_md.py +1441 -0
- package/dist/generators/extract_library.py +125 -0
- package/dist/generators/generate_connectors_ts.py +936 -0
- package/dist/generators/generate_library_json.py +2527 -0
- package/dist/generators/generate_triggers_ts.py +110 -0
- package/dist/generators/materialize_registry.py +155 -0
- package/dist/generators/prepare_connector.py +1688 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +35 -0
- package/dist/ixp-definition.json +1982 -0
- package/dist/library.d.ts +6 -0
- package/dist/library.js +6 -0
- package/dist/load.d.ts +16 -0
- package/dist/load.js +95 -0
- package/dist/merge-cli.d.ts +3 -0
- package/dist/merge-cli.js +47 -0
- package/dist/merge.d.ts +125 -0
- package/dist/merge.js +0 -0
- package/dist/migrate.d.ts +15 -0
- package/dist/migrate.js +245 -0
- package/dist/node-runtime.d.ts +3 -0
- package/dist/node-runtime.js +22 -0
- package/dist/package-name.d.ts +17 -0
- package/dist/package-name.js +17 -0
- package/dist/ref-resolve.d.ts +77 -0
- package/dist/ref-resolve.js +170 -0
- package/dist/registry/cache.d.ts +55 -0
- package/dist/registry/cache.js +134 -0
- package/dist/registry/curated-overlay.d.ts +16 -0
- package/dist/registry/curated-overlay.js +62 -0
- package/dist/registry/extractor.d.ts +22 -0
- package/dist/registry/extractor.js +18 -0
- package/dist/registry/materialize-bin.d.ts +2 -0
- package/dist/registry/materialize-bin.js +7 -0
- package/dist/registry/materialize-cli.d.ts +1 -0
- package/dist/registry/materialize-cli.js +46 -0
- package/dist/registry/materializer.d.ts +23 -0
- package/dist/registry/materializer.js +34 -0
- package/dist/registry/path-cli.d.ts +1 -0
- package/dist/registry/path-cli.js +56 -0
- package/dist/registry/prepare-cli.d.ts +62 -0
- package/dist/registry/prepare-cli.js +185 -0
- package/dist/registry/pull-cli.d.ts +1 -0
- package/dist/registry/pull-cli.js +274 -0
- package/dist/registry/python.d.ts +26 -0
- package/dist/registry/python.js +46 -0
- package/dist/registry/search-cli.d.ts +52 -0
- package/dist/registry/search-cli.js +159 -0
- package/dist/schema-version.d.ts +165 -0
- package/dist/schema-version.js +148 -0
- package/dist/serialize.d.ts +64 -0
- package/dist/serialize.js +6398 -0
- package/lib/README.md +112 -0
- package/lib/library-json.samples/index.json +158 -0
- package/lib/library-json.samples/invariant-collections.json +83 -0
- package/lib/library-json.samples/list-envelopes.json +123 -0
- package/lib/library-json.samples/uipath-atlassian-jira/create-issue@1.0.0.json +131 -0
- package/lib/library-json.samples/uipath-atlassian-jira/create-issue@1.0.0.v1def.json +306 -0
- package/lib/library-json.samples/uipath-atlassian-jira/generic/create_issue/create@1.0.0.json +86 -0
- package/lib/library-json.samples/uipath-atlassian-jira/generic/create_issue/create@1.0.0.v1def.json +208 -0
- package/lib/library-json.samples/uipath-atlassian-jira/get-issue@1.0.0.json +2040 -0
- package/lib/library-json.samples/uipath-atlassian-jira/get-issue@1.0.0.v1def.json +195 -0
- package/lib/library-json.samples/uipath-google-vertex/execute-google-vertex-agent@1.0.0.json +169 -0
- package/lib/library-json.samples/uipath-google-vertex/execute-google-vertex-agent@1.0.0.v1def.json +209 -0
- package/lib/library-json.samples/uipath-http-webhook/event-http-webhook@1.0.0.json +63 -0
- package/lib/library-json.samples/uipath-http-webhook/event-http-webhook@1.0.0.v1def.json +262 -0
- package/lib/library-json.samples/uipath-http-webhook/trigger-http-webhook@1.0.0.json +63 -0
- package/lib/library-json.samples/uipath-http-webhook/trigger-http-webhook@1.0.0.v1def.json +213 -0
- package/lib/library-json.samples/uipath-microsoft-azureactivedirectory/list-groups@1.0.0.json +227 -0
- package/lib/library-json.samples/uipath-microsoft-azureactivedirectory/list-groups@1.0.0.v1def.json +373 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/event-file-created@1.0.0.json +116 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/event-file-created@1.0.0.v1def.json +369 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/event-list-item-added@1.0.0.json +56 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/event-list-item-added@1.0.0.v1def.json +256 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-file-created@1.0.0.json +116 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-file-created@1.0.0.v1def.json +320 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-list-item-added@1.0.0.json +56 -0
- package/lib/library-json.samples/uipath-microsoft-onedrive/trigger-list-item-added@1.0.0.v1def.json +207 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/event-email-received@1.0.0.json +107 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/event-email-received@1.0.0.v1def.json +264 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/send-email@1.0.0.json +142 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/send-email@1.0.0.v1def.json +306 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/trigger-email-received@1.0.0.json +107 -0
- package/lib/library-json.samples/uipath-microsoft-outlook365/trigger-email-received@1.0.0.v1def.json +217 -0
- package/lib/library-json.samples/uipath-microsoft-powerautomate/invoke-a-microsoft-power-automate-flow@1.0.0.json +85 -0
- package/lib/library-json.samples/uipath-microsoft-powerautomate/invoke-a-microsoft-power-automate-flow@1.0.0.v1def.json +209 -0
- package/lib/library-json.samples/uipath-salesforce-slack/send-message-to-user@1.0.0.json +755 -0
- package/lib/library-json.samples/uipath-salesforce-slack/send-message-to-user@1.0.0.v1def.json +513 -0
- package/lib/library-json.samples/uipath-uipath-dataservice/query-entity-records@1.0.0.json +122 -0
- package/lib/library-json.samples/uipath-uipath-dataservice/query-entity-records@1.0.0.v1def.json +227 -0
- package/package.json +85 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tidy-cli — lay out a semantic-only `.bpmn` (add the `bpmndi` diagram).
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* node --experimental-strip-types tidy-cli.js <file.bpmn> [-o out.bpmn]
|
|
6
|
+
*
|
|
7
|
+
* The SDK's serializer emits semantic-only BPMN (no diagram) because validation
|
|
8
|
+
* is layout-independent. This step runs `bpmn-auto-layout` to synthesize a full
|
|
9
|
+
* `bpmndi:BPMNDiagram` — a `BPMNShape` per node and a `BPMNEdge` per flow — so
|
|
10
|
+
* the file imports into a visual canvas. The `uipath:*` extension payloads are
|
|
11
|
+
* preserved. Overwrites the input unless `-o` is given.
|
|
12
|
+
*/
|
|
13
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
14
|
+
import { layoutProcess } from 'bpmn-auto-layout';
|
|
15
|
+
import { finalizeBpmnXml } from './serialize.js';
|
|
16
|
+
import { runWhenInvokedDirectly } from '../cli-run.js';
|
|
17
|
+
function opt(argv, name) {
|
|
18
|
+
const i = argv.indexOf(name);
|
|
19
|
+
return i >= 0 ? argv[i + 1] : undefined;
|
|
20
|
+
}
|
|
21
|
+
export async function run(argv) {
|
|
22
|
+
if (argv.length === 0 || argv[0] === '-h' || argv[0] === '--help') {
|
|
23
|
+
console.error('usage: tidy <file.bpmn> [-o out.bpmn]');
|
|
24
|
+
return 2;
|
|
25
|
+
}
|
|
26
|
+
const flags = new Set(['-o']);
|
|
27
|
+
const input = argv.find((a, i) => !flags.has(a) && !flags.has(argv[i - 1]));
|
|
28
|
+
if (!input) {
|
|
29
|
+
console.error('tidy: missing <file.bpmn>');
|
|
30
|
+
return 2;
|
|
31
|
+
}
|
|
32
|
+
const laidOut = finalizeBpmnXml(await layoutProcess(readFileSync(input, 'utf8')));
|
|
33
|
+
const out = opt(argv, '-o') ?? input;
|
|
34
|
+
writeFileSync(out, laidOut.endsWith('\n') ? laidOut : laidOut + '\n');
|
|
35
|
+
const shapes = (laidOut.match(/BPMNShape/g) ?? []).length;
|
|
36
|
+
console.log(`tidy: laid out ${out} (${shapes} shape(s))`);
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
runWhenInvokedDirectly(import.meta.url, 'tidy', run);
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bpmn/typed-node — emit a REGISTRY-BACKED node from its spec.
|
|
3
|
+
*
|
|
4
|
+
* Phase 3 of `docs/BPMN_COVERAGE_DESIGN.md`. The registry already says, per
|
|
5
|
+
* extension type, everything the wire needs: which BPMN element carries it, which
|
|
6
|
+
* `uipath:*` tag, the context fields and which are required, how inputs are
|
|
7
|
+
* shaped, what the output row looks like, and whether the element needs an event
|
|
8
|
+
* definition. So there is ONE emitter driven by `registry-types.json`, not one
|
|
9
|
+
* per type — the alternative is 30 near-identical functions and a `switch` that
|
|
10
|
+
* grows with the platform.
|
|
11
|
+
*
|
|
12
|
+
* This is deliberately NOT a code generator. Generated emitters would need
|
|
13
|
+
* reviewing on every registry refresh; a spec table turns the same refresh into a
|
|
14
|
+
* data diff, and the emitter stays one readable function.
|
|
15
|
+
*/
|
|
16
|
+
import type BpmnModdle from 'bpmn-moddle';
|
|
17
|
+
import type { ModdleElement } from 'bpmn-moddle';
|
|
18
|
+
type El = ModdleElement;
|
|
19
|
+
/** One context field of a typed node, as the registry describes it. */
|
|
20
|
+
export interface RegistryContextField {
|
|
21
|
+
name: string;
|
|
22
|
+
/** The designer's label — what the product validator quotes in its diagnostics. */
|
|
23
|
+
displayName: string | null;
|
|
24
|
+
type: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
hidden: boolean;
|
|
27
|
+
binding: boolean;
|
|
28
|
+
default: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Which resource and property a binding for this field must target, when the
|
|
31
|
+
* platform requires one. `binding: true` alone does NOT mean "must be bound" —
|
|
32
|
+
* `Intsvc.UnifiedHttpRequest`'s `url` is `binding: true` and a literal validates
|
|
33
|
+
* fine. It is `bindingInfo` together with `required` that the platform enforces.
|
|
34
|
+
*/
|
|
35
|
+
bindingInfo: {
|
|
36
|
+
resource: string | null;
|
|
37
|
+
propertyAttribute: string | null;
|
|
38
|
+
} | null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One PAYLOAD field of a typed node — the registry's `InputFields`, as distinct
|
|
42
|
+
* from the `ContextFields` above.
|
|
43
|
+
*
|
|
44
|
+
* Absent from the snapshot until Phase 3a, on the reading that `inputPattern` plus
|
|
45
|
+
* the type-level `inputName`/`inputTarget` said everything emission needed. Two
|
|
46
|
+
* defects came out of that gap, both invisible to `uip maestro bpmn validate`:
|
|
47
|
+
* a `separateInputs` row was targeted at its own key rather than the field's
|
|
48
|
+
* declared `target`, and every payload row was typed `json`, so a field declared
|
|
49
|
+
* `string` arrived JSON-quoted.
|
|
50
|
+
*
|
|
51
|
+
* Not every type declares these. A connector's inputs are discovered from the
|
|
52
|
+
* connector library rather than the registry, so `Intsvc.ActivityExecution` has
|
|
53
|
+
* none and its rows keep deriving their target from the key — see `inputRows`.
|
|
54
|
+
*/
|
|
55
|
+
export interface RegistryInputField {
|
|
56
|
+
name: string;
|
|
57
|
+
displayName: string | null;
|
|
58
|
+
type: string;
|
|
59
|
+
required: boolean;
|
|
60
|
+
hidden: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Where the row points. `null` means the type's shared `inputTarget` applies,
|
|
63
|
+
* which is the case for every `mergedBody` type — its fields have no target of
|
|
64
|
+
* their own because they are merged into a single row.
|
|
65
|
+
*/
|
|
66
|
+
target: string | null;
|
|
67
|
+
default: string | null;
|
|
68
|
+
}
|
|
69
|
+
/** The output row a typed node writes, or `null` when it has none. */
|
|
70
|
+
export interface RegistryOutput {
|
|
71
|
+
name: string;
|
|
72
|
+
type: string;
|
|
73
|
+
/** `=response`-style source; `null` means the row carries no `source` attribute. */
|
|
74
|
+
source: string | null;
|
|
75
|
+
relative: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** One extension type's emission spec. */
|
|
78
|
+
export interface RegistryTypeSpec {
|
|
79
|
+
/** `bpmn:SendTask`, `bpmn:ServiceTask`, … */
|
|
80
|
+
element: string | null;
|
|
81
|
+
/** `uipath:activity` | `uipath:event` | `uipath:mapping`. */
|
|
82
|
+
tag: string | null;
|
|
83
|
+
inputPattern: 'none' | 'mergedBody' | 'separateInputs' | 'splitInputsItemData' | 'scriptArgs' | string;
|
|
84
|
+
inputName: string | null;
|
|
85
|
+
inputTarget: string | null;
|
|
86
|
+
context: RegistryContextField[];
|
|
87
|
+
/** The payload fields the registry declares; empty for types with dynamic inputs. */
|
|
88
|
+
inputs: RegistryInputField[];
|
|
89
|
+
output: RegistryOutput | null;
|
|
90
|
+
/** e.g. `bpmn:messageEventDefinition` — what makes a message event a message event. */
|
|
91
|
+
eventDefinition: string | null;
|
|
92
|
+
/** True when authoring needs a tenant read (a connection, a process, a queue). */
|
|
93
|
+
requiresDiscovery: boolean;
|
|
94
|
+
bindingPattern: string;
|
|
95
|
+
}
|
|
96
|
+
/** Every extension type in the snapshot, sorted. */
|
|
97
|
+
export declare function registryTypeNames(): string[];
|
|
98
|
+
/**
|
|
99
|
+
* The spec for one extension type.
|
|
100
|
+
*
|
|
101
|
+
* @param type - The extension type, e.g. `'Intsvc.UnifiedHttpRequest'`.
|
|
102
|
+
* @returns Its emission spec.
|
|
103
|
+
* @throws If the type is not in the committed snapshot — which means either a
|
|
104
|
+
* typo or a registry refresh the snapshot has not caught up with.
|
|
105
|
+
*/
|
|
106
|
+
export declare function registryType(type: string): RegistryTypeSpec;
|
|
107
|
+
/**
|
|
108
|
+
* Facts the platform enforces but the registry does not state.
|
|
109
|
+
*
|
|
110
|
+
* Every entry here was found by probing `uip maestro bpmn validate`, not read out
|
|
111
|
+
* of a spec — so every entry is a liability: it can drift without the snapshot
|
|
112
|
+
* changing, and nothing upstream promises it. Keeping them in one visible table
|
|
113
|
+
* beats burying them in a builder method, and each is pinned by a test so a
|
|
114
|
+
* platform change fails loudly instead of silently emitting a rejected artifact.
|
|
115
|
+
*
|
|
116
|
+
* `resourceSubType` — `Orchestrator.StartAgentJob` requires its process bindings to
|
|
117
|
+
* carry `resourceSubType="Agent"` on top of the `resource`/`propertyAttribute` the
|
|
118
|
+
* registry does give:
|
|
119
|
+
*
|
|
120
|
+
* [error] Orchestrator.StartAgentJob binding "x" must target Agent name.
|
|
121
|
+
*
|
|
122
|
+
* `resource="Agent"` and `resource="agent"` are both rejected; only
|
|
123
|
+
* `resource="process"` + `resourceSubType="Agent"` validates. The string matches the
|
|
124
|
+
* field's `DisplayName`, but nothing says that is the rule, so it is recorded as a
|
|
125
|
+
* constant for the one type known to need it rather than derived.
|
|
126
|
+
*/
|
|
127
|
+
export declare const REGISTRY_GAPS: Record<string, {
|
|
128
|
+
resourceSubType?: string;
|
|
129
|
+
extraContext?: string[];
|
|
130
|
+
outputRowsFixed?: boolean;
|
|
131
|
+
notEnforcedInputs?: string[];
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* One `uipath:output` row, spelled out.
|
|
135
|
+
*
|
|
136
|
+
* `schema` is the row's element BODY — a JSON Schema for a `jsonSchema` row. It is
|
|
137
|
+
* modelled as `unknown` rather than a schema type on purpose: the SDK carries it
|
|
138
|
+
* through without interpreting it, which is what makes an artifact from a platform
|
|
139
|
+
* version newer than this SDK still round-trip.
|
|
140
|
+
*/
|
|
141
|
+
/**
|
|
142
|
+
* One `uipath:context` input row, spelled out.
|
|
143
|
+
*
|
|
144
|
+
* The counterpart of {@link TypedOutputRow} on the input side, and for the same
|
|
145
|
+
* reason. `context` is a name→value record, so a row's declared TYPE has to be
|
|
146
|
+
* looked up in the registry — and a field the registry does not declare falls back
|
|
147
|
+
* to `string`. A real HITL node states `type="boolean"` on a field the snapshot has
|
|
148
|
+
* never heard of, so the round trip retyped it, which is the coercion hazard the
|
|
149
|
+
* runtime cares about: it switches on this `type`, and a boolean told to be a
|
|
150
|
+
* string arrives truthy whatever its value.
|
|
151
|
+
*
|
|
152
|
+
* A record also cannot say "no value attribute at all", which is different from
|
|
153
|
+
* `value=""` — 71 rows in one real file differ on exactly that.
|
|
154
|
+
*/
|
|
155
|
+
export interface TypedContextRow {
|
|
156
|
+
/** Field name. */
|
|
157
|
+
name: string;
|
|
158
|
+
/** The row's declared type. Defaults to `string`. */
|
|
159
|
+
type?: string;
|
|
160
|
+
/** The `value` attribute. Omitted entirely when absent — not written as `""`. */
|
|
161
|
+
value?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The row's CDATA body, for a `json` field — the value itself, or a string when
|
|
164
|
+
* the exact bytes matter. See {@link BpmnBuilder.schema} for the same rule on a
|
|
165
|
+
* variable's schema.
|
|
166
|
+
*/
|
|
167
|
+
body?: unknown;
|
|
168
|
+
/** The row's `target` attribute, when the artifact carries one. */
|
|
169
|
+
target?: string;
|
|
170
|
+
/** The row's `required` attribute — 11 context rows in the corpus carry one. */
|
|
171
|
+
required?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface TypedOutputRow {
|
|
174
|
+
/** Row name, e.g. `response` or `Error`. */
|
|
175
|
+
name: string;
|
|
176
|
+
/** Row type, e.g. `jsonSchema`, `string`, or a registry type. Defaults to `string`. */
|
|
177
|
+
type?: string;
|
|
178
|
+
/** Variable the row writes. */
|
|
179
|
+
var?: string;
|
|
180
|
+
/** `=`-expression read against the node's result, e.g. `=response`. */
|
|
181
|
+
source?: string;
|
|
182
|
+
/** The row's body — a JSON Schema for a `jsonSchema` row. */
|
|
183
|
+
schema?: unknown;
|
|
184
|
+
/**
|
|
185
|
+
* Mark the row `custom="true"` — the product's flag for a row an author added
|
|
186
|
+
* rather than one the node's type declares.
|
|
187
|
+
*/
|
|
188
|
+
custom?: boolean;
|
|
189
|
+
/** The row's `description` — designer help text the product carries on some rows. */
|
|
190
|
+
description?: string;
|
|
191
|
+
/**
|
|
192
|
+
* The row's `target`. Rare, and carried for fidelity: a real sub-process mapping
|
|
193
|
+
* writes `target=""`, which is neither absent nor meaningful, and dropping it
|
|
194
|
+
* changes the bytes.
|
|
195
|
+
*/
|
|
196
|
+
target?: string;
|
|
197
|
+
}
|
|
198
|
+
/** What an author supplies for a typed node, on top of its id. */
|
|
199
|
+
export interface TypedNodeInput {
|
|
200
|
+
/** Display name the designer shows. */
|
|
201
|
+
name?: string;
|
|
202
|
+
/** Context values, by field name — the registry decides which are required. */
|
|
203
|
+
context?: Record<string, unknown>;
|
|
204
|
+
/** Context rows spelled out, replacing `context` — see {@link TypedContextRow}. */
|
|
205
|
+
contextRows?: TypedContextRow[];
|
|
206
|
+
/** The payload, shaped per the type's `inputPattern`. */
|
|
207
|
+
inputs?: Record<string, unknown>;
|
|
208
|
+
/** The `uipath:type` `version` attribute — see `ActivityNodeOpts.typeVersion`. */
|
|
209
|
+
typeVersion?: string;
|
|
210
|
+
/** The `uipath:inputSchema` body inside `uipath:context` — see `ActivityNodeOpts.inputSchema`. */
|
|
211
|
+
inputSchema?: unknown;
|
|
212
|
+
/** Variable the output lands in. Defaults to `<id>_<outputName>`. */
|
|
213
|
+
outputVar?: string;
|
|
214
|
+
/**
|
|
215
|
+
* EXTRA output rows: variable id → `=`-expression read against the node's own
|
|
216
|
+
* result, e.g. `{ decision: '=Action' }`.
|
|
217
|
+
*
|
|
218
|
+
* Why this exists: several types declare a TYPED output — `Actions.HITL` writes
|
|
219
|
+
* `type="Actions.HITL"` with no `source` — which the designer resolves into
|
|
220
|
+
* sub-fields but the local engine cannot, so the variable stays `undefined` on a
|
|
221
|
+
* local run and nothing can branch on it. An explicit row alongside it maps one
|
|
222
|
+
* field the way every other output row works, which the runtime does resolve.
|
|
223
|
+
* The spec's own row is still emitted, so the artifact stays what the platform
|
|
224
|
+
* expects.
|
|
225
|
+
*/
|
|
226
|
+
outputs?: Record<string, string>;
|
|
227
|
+
/**
|
|
228
|
+
* The output rows EXACTLY as they should be written, replacing both the spec's
|
|
229
|
+
* derived row and `outputs` above.
|
|
230
|
+
*
|
|
231
|
+
* The counterpart of `contextVerbatim` for outputs, and it exists for the same
|
|
232
|
+
* reason: an imported artifact's rows can carry detail the derived pair cannot
|
|
233
|
+
* express. A connector task (`Intsvc.ActivityExecution`) is the case that forced
|
|
234
|
+
* it — TWO rows, both `type="jsonSchema"`, each carrying a JSON schema in its
|
|
235
|
+
* element BODY (the operation's response shape, and the standard error shape).
|
|
236
|
+
* `outputs` is a variable→expression map with no room for a type or a body, so
|
|
237
|
+
* decompiling a connector through it silently dropped the response schema. That
|
|
238
|
+
* is why connectors were REFUSED by `bpmn-decompile` until this existed.
|
|
239
|
+
*
|
|
240
|
+
* An author writing `.activity()` by hand wants `outputVar`/`outputs`; this is
|
|
241
|
+
* for a caller that already knows the exact rows.
|
|
242
|
+
*/
|
|
243
|
+
outputRows?: TypedOutputRow[];
|
|
244
|
+
/** `=`-expression that skips the node when truthy (activity/event tags only). */
|
|
245
|
+
skipCondition?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Emit `context` EXACTLY as given — same fields, same order — injecting none of
|
|
248
|
+
* the registry's defaults.
|
|
249
|
+
*
|
|
250
|
+
* For importers, not authors. Default injection is an authoring convenience:
|
|
251
|
+
* `.http()` relies on it for `mode`, which is required, hidden, and so never
|
|
252
|
+
* passed by hand. An importer has the opposite need — the artifact already
|
|
253
|
+
* carries the fields it should, and adding a default it lacked, or reordering
|
|
254
|
+
* what it had, breaks a byte-exact round-trip. `bpmn-decompile` sets this.
|
|
255
|
+
*/
|
|
256
|
+
contextVerbatim?: boolean;
|
|
257
|
+
}
|
|
258
|
+
/** The variable a typed node's output row writes, or `undefined` when it has none. */
|
|
259
|
+
export declare function typedNodeOutputVar(id: string, type: string, outputVar?: string): string | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* Emit a registry-backed typed node.
|
|
262
|
+
*
|
|
263
|
+
* @param m - The moddle instance to create elements with.
|
|
264
|
+
* @param id - The BPMN element id.
|
|
265
|
+
* @param type - The extension type, e.g. `'Intsvc.UnifiedHttpRequest'`.
|
|
266
|
+
* @param input - Author-supplied name, context, payload, output variable and skip.
|
|
267
|
+
* @returns The moddle element, ready for the serializer to wire flows onto.
|
|
268
|
+
*/
|
|
269
|
+
export declare function createTypedNode(m: BpmnModdle, id: string, type: string, input: TypedNodeInput,
|
|
270
|
+
/**
|
|
271
|
+
* Declared Maestro `type` for a variable id, for typing the extra output rows below.
|
|
272
|
+
* Optional so a caller with no variable context still gets today's behaviour.
|
|
273
|
+
*/
|
|
274
|
+
varType?: (varId: string) => string | undefined): El;
|
|
275
|
+
/** `uipath:Output` rows exactly as the caller spelled them, deriving nothing. */
|
|
276
|
+
export declare function verbatimOutputRows(m: BpmnModdle, rows: TypedOutputRow[]): El[];
|
|
277
|
+
/**
|
|
278
|
+
* The extension payload for a type and its output rows, with NO element around it.
|
|
279
|
+
*
|
|
280
|
+
* `createTypedNode` takes the element from the registry, which is right for an
|
|
281
|
+
* activity and wrong everywhere the product uses a payload as DECORATION: a
|
|
282
|
+
* `uipath:mapping` on a start event, an end event or a sub-process, a
|
|
283
|
+
* `uipath:activity` on an error boundary. Those arms of `createNode` build their
|
|
284
|
+
* own element and attach this to it, rather than letting `BPMN.Variables` turn a
|
|
285
|
+
* start event into a `bpmn:Task`.
|
|
286
|
+
*
|
|
287
|
+
* @param m - The moddle instance.
|
|
288
|
+
* @param type - The extension type, e.g. `BPMN.Variables` or `uipath:Activity`.
|
|
289
|
+
* @param rows - Output rows, emitted verbatim.
|
|
290
|
+
* @returns The payload element, ready to go inside a `bpmn:ExtensionElements`.
|
|
291
|
+
*/
|
|
292
|
+
export declare function createExtensionPayload(m: BpmnModdle, type: string, rows: TypedOutputRow[]): El;
|
|
293
|
+
/**
|
|
294
|
+
* The context fields this type requires to be a `=bindings.<id>` reference rather
|
|
295
|
+
* than a literal.
|
|
296
|
+
*
|
|
297
|
+
* Narrower than it looks, and the narrowness is measured. `binding: true` marks a
|
|
298
|
+
* field the designer OFFERS a binding picker for — `Intsvc.UnifiedHttpRequest`'s
|
|
299
|
+
* `url` is one, and a literal URL validates fine. What the platform actually
|
|
300
|
+
* enforces is `bindingInfo` AND `required`, which today selects exactly
|
|
301
|
+
* `Orchestrator.StartAgentJob`'s `name` and `folderPath`:
|
|
302
|
+
*
|
|
303
|
+
* [error] Orchestrator.StartAgentJob context input "name" must reference project bindings.
|
|
304
|
+
* [error] Orchestrator.StartAgentJob binding "x" must target Agent name.
|
|
305
|
+
*
|
|
306
|
+
* Both halves are enforced — a literal is rejected, and so is a binding pointing
|
|
307
|
+
* at the wrong property.
|
|
308
|
+
*
|
|
309
|
+
* @param type - The extension type.
|
|
310
|
+
* @returns Its fields that must be bound, with the target each binding needs.
|
|
311
|
+
*/
|
|
312
|
+
export declare function bindingRequiredFields(type: string): RegistryContextField[];
|
|
313
|
+
/**
|
|
314
|
+
* Required context fields the author left unset and the registry cannot default.
|
|
315
|
+
*
|
|
316
|
+
* Separate from emission so `check()` can report them at authoring time. Missing
|
|
317
|
+
* them is what `uip maestro bpmn validate` reports as `EMPTY_REQUIRED_FIELD`, and
|
|
318
|
+
* hearing it from the SDK is faster than hearing it from the CLI.
|
|
319
|
+
*
|
|
320
|
+
* @param type - The extension type.
|
|
321
|
+
* @param context - The context values the author supplied.
|
|
322
|
+
* @returns The names of required fields with no value and no default.
|
|
323
|
+
*/
|
|
324
|
+
export declare function missingRequiredContext(type: string, context?: Record<string, unknown>): string[];
|
|
325
|
+
/**
|
|
326
|
+
* Required PAYLOAD fields the author left unset.
|
|
327
|
+
*
|
|
328
|
+
* The counterpart of {@link missingRequiredContext}, and reported the same way: the
|
|
329
|
+
* platform's `RequiredFieldsRule` draws on `InputFields` as well as `ContextFields`,
|
|
330
|
+
* so an unset required payload field is the same `EMPTY_REQUIRED_FIELD` the CLI
|
|
331
|
+
* would report a build later.
|
|
332
|
+
*
|
|
333
|
+
* @param type - The extension type.
|
|
334
|
+
* @param inputs - The payload the author supplied.
|
|
335
|
+
* @returns The names of required payload fields with no value and no default.
|
|
336
|
+
*/
|
|
337
|
+
export declare function missingRequiredInputs(type: string, inputs?: Record<string, unknown>,
|
|
338
|
+
/**
|
|
339
|
+
* The node's `uipath:context` values, which SATISFY a required payload field too.
|
|
340
|
+
*
|
|
341
|
+
* The platform's `RequiredFieldsRule` draws on both, and a trigger is where that
|
|
342
|
+
* shows: `Intsvc.EventTrigger` declares seven required inputs, and a real one
|
|
343
|
+
* carries every one of them as a `uipath:context` row rather than a
|
|
344
|
+
* `uipath:input`. Checking inputs alone reported all seven; `uip maestro bpmn
|
|
345
|
+
* validate` reports exactly one — `connectionId`, the only name the artifact
|
|
346
|
+
* genuinely does not spell (it writes `connection`). Reading both makes this
|
|
347
|
+
* agree with the CLI instead of guessing on either side of it.
|
|
348
|
+
*/
|
|
349
|
+
context?: Record<string, unknown>): string[];
|
|
350
|
+
/**
|
|
351
|
+
* Whether this type's required payload fields are UNSATISFIABLE on the wire.
|
|
352
|
+
*
|
|
353
|
+
* A platform defect, recorded here because the SDK cannot emit its way around it.
|
|
354
|
+
* `RequiredFieldsRule` builds its required-name set from `InputFields` and then
|
|
355
|
+
* fires when a name is absent from the serialized rows **by name**. Under
|
|
356
|
+
* `mergedBody` and `splitInputsItemData` every payload field collapses into ONE row
|
|
357
|
+
* — named `body` or `ItemData` — so a required input field is never present by
|
|
358
|
+
* name and the rule fires however the node is filled in:
|
|
359
|
+
*
|
|
360
|
+
* [error] [call] EMPTY_REQUIRED_FIELD: The field 'agentUrl' in node 'call' is
|
|
361
|
+
* required but has no value.
|
|
362
|
+
*
|
|
363
|
+
* Note the registry's own `XmlTemplate` for `A2A.AgentExecution` emits exactly the
|
|
364
|
+
* body-only shape that fails, which is the clearest statement that the two halves
|
|
365
|
+
* of the platform disagree rather than that the SDK is writing the wrong thing.
|
|
366
|
+
*
|
|
367
|
+
* Whether a workaround exists is per-type and not derivable from the spec, so it is
|
|
368
|
+
* not encoded here. Measured: `A2A.AgentExecution` accepts redundant sibling rows
|
|
369
|
+
* alongside the merged body (`Valid`); `Maestro.SendMessageEvent` refuses them
|
|
370
|
+
* outright — `does not support input payload "Reference"` as a row, `does not
|
|
371
|
+
* support context input "Reference"` in context, and `ItemData`'s `target="body"`
|
|
372
|
+
* is enforced — so for that type NO artifact satisfies both gates.
|
|
373
|
+
*
|
|
374
|
+
* Selects exactly `A2A.AgentExecution` and `Maestro.SendMessageEvent` today. The
|
|
375
|
+
* three other types with required payload fields are `separateInputs`, whose rows
|
|
376
|
+
* DO carry their own names, and are unaffected.
|
|
377
|
+
*
|
|
378
|
+
* @param type - The extension type.
|
|
379
|
+
* @returns The required payload field names that cannot be expressed, or `[]`.
|
|
380
|
+
*/
|
|
381
|
+
export declare function unsatisfiableRequiredInputs(type: string): string[];
|
|
382
|
+
export {};
|