@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,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/expr — Flow-style expressions and type descriptors, shared by every
|
|
3
|
+
* builder SDK (flow, case, bpmn).
|
|
4
|
+
*
|
|
5
|
+
* An expression is either a literal value baked into a node, or a dynamic JS
|
|
6
|
+
* expression the runtime evaluates (a reference to a variable or an upstream
|
|
7
|
+
* node's output). A builder never reads live values — you construct references
|
|
8
|
+
* with these helpers, and nothing runs at author time except graph
|
|
9
|
+
* construction.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A Flow expression. Either a literal value (a constant baked into the node)
|
|
13
|
+
* or a dynamic JS expression that the runtime evaluates (e.g. a reference to a
|
|
14
|
+
* variable or an upstream node's output).
|
|
15
|
+
*/
|
|
16
|
+
export declare class Expr {
|
|
17
|
+
readonly js: string;
|
|
18
|
+
readonly literal: boolean;
|
|
19
|
+
readonly value?: unknown | undefined;
|
|
20
|
+
constructor(js: string, literal?: boolean, value?: unknown | undefined);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A constant value baked directly into a node input.
|
|
24
|
+
*
|
|
25
|
+
* @param value - The constant, JSON-encoded into the emitted expression.
|
|
26
|
+
* @returns An {@link Expr} carrying the literal.
|
|
27
|
+
*/
|
|
28
|
+
export declare function lit(value: unknown): Expr;
|
|
29
|
+
/**
|
|
30
|
+
* Reference a flow-level variable or input by name → `$vars.<name>`.
|
|
31
|
+
*
|
|
32
|
+
* @param name - The variable or input as declared with `.var(...)` / `.input(...)`.
|
|
33
|
+
* @returns An {@link Expr} reading that variable at run time.
|
|
34
|
+
*/
|
|
35
|
+
export declare function v(name: string): Expr;
|
|
36
|
+
/** The manual trigger node's default id. */
|
|
37
|
+
export declare const DEFAULT_TRIGGER_ID = "start";
|
|
38
|
+
/**
|
|
39
|
+
* Reference a flow input by name → `$vars.<triggerId>.output.<name>`.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* NOT an alias of {@link v}: an input is published as the TRIGGER NODE's output,
|
|
43
|
+
* so it is read through the trigger's id rather than as a bare global. Renaming the
|
|
44
|
+
* trigger with `.triggerId(...)` rewrites these references with it.
|
|
45
|
+
*
|
|
46
|
+
* @param name - The input as declared with `.input({ … })`.
|
|
47
|
+
* @returns An {@link Expr} reading that input off the trigger node.
|
|
48
|
+
* @see v
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* .input({ amount: types.number })
|
|
52
|
+
* .step('check', script({ code: `return ${input('amount')} > 100;` }))
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function input(name: string): Expr;
|
|
56
|
+
/**
|
|
57
|
+
* Reference an ENTRY POINT's scoped input: `entryInput('nightly', 'batchDate')`
|
|
58
|
+
* reads `$vars.nightly.output.batchDate` — an input declared on
|
|
59
|
+
* `.entryPoint('nightly', …, { inputs: { batchDate: … } })`. `input(name)`
|
|
60
|
+
* remains the spelling for the DEFAULT root's inputs.
|
|
61
|
+
*
|
|
62
|
+
* @param entryPointId - The `.entryPoint()` id that declared the input.
|
|
63
|
+
* @param name - The input's declared name on that entry point.
|
|
64
|
+
* @returns An expression usable anywhere an `Expr` is accepted.
|
|
65
|
+
*/
|
|
66
|
+
export declare function entryInput(entryPointId: string, name: string): Expr;
|
|
67
|
+
/**
|
|
68
|
+
* Reference an upstream step's output → `$vars.<step>.output[.<path>]`.
|
|
69
|
+
* e.g. `out('fetchRate', 'body.rate')`.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Write the reference this way, or dotted by hand — never through a bracket
|
|
73
|
+
* (`$vars.fetchRate["output"]`, `$vars["fetchRate"].output`). Both of those
|
|
74
|
+
* resolve at run time, so the mistake is invisible, but only the DOTTED form is
|
|
75
|
+
* rewritten on the way out: a subflow copy renames node ids, the queue family
|
|
76
|
+
* publishes its result as `<step>.response`, and a failure envelope resolves per
|
|
77
|
+
* node family. A bracketed read opts out of all three and goes stale the moment
|
|
78
|
+
* one applies. `path` may still bracket INTO the value — `out('rows', 'items')`
|
|
79
|
+
* then `["odd key"]` — because nothing rewrites past the runtime variable.
|
|
80
|
+
*
|
|
81
|
+
* @param step - The step whose result to read, named as it was in `.step(...)`.
|
|
82
|
+
* @param path - A dotted path INTO that result. Omit it for the whole output.
|
|
83
|
+
* @returns An {@link Expr} reading that value at run time.
|
|
84
|
+
* @see ran
|
|
85
|
+
* @see err
|
|
86
|
+
* @enforcedBy VARS_BRACKET_READ Reach a step by a dot, not a bracket — the
|
|
87
|
+
* bracketed spelling is the one the compiler cannot rewrite.
|
|
88
|
+
*/
|
|
89
|
+
export declare function out(step: string, path?: string): Expr;
|
|
90
|
+
/**
|
|
91
|
+
* Did this step run? → `!!$vars.<step>.output`.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* For the shape a `switch` creates: a value is computed in exactly ONE arm, and
|
|
95
|
+
* the step after the join has to read *whichever arm ran*.
|
|
96
|
+
*
|
|
97
|
+
* ```ts
|
|
98
|
+
* .switch('route', [
|
|
99
|
+
* { when: js`${input('direction')} === 'f2i'`, body: (b) => b.step('toInches', script(…)) },
|
|
100
|
+
* { when: js`${input('direction')} === 'i2f'`, body: (b) => b.step('toFeet', script(…)) },
|
|
101
|
+
* ])
|
|
102
|
+
* .return({ result: js`${ran('toInches')} ? ${out('toInches', 'result')} : ${out('toFeet', 'result')}` })
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* ### What it means, and what it does NOT
|
|
106
|
+
*
|
|
107
|
+
* It tests **what the step published**, because that is the only thing the
|
|
108
|
+
* platform will answer. The runtime's variable bag is flat and keyed by dotted
|
|
109
|
+
* names: it holds `"toInches.output"`, pre-declared `null` before the step runs
|
|
110
|
+
* and left `null` if the step never runs. So `!!$vars.toInches.output` is false
|
|
111
|
+
* until the arm runs and true after.
|
|
112
|
+
*
|
|
113
|
+
* Two consequences worth knowing before you rely on it:
|
|
114
|
+
*
|
|
115
|
+
* - **A step that RAN but published nothing reads as not-ran.** Ran-ness is
|
|
116
|
+
* output-presence, not execution. A `mock()` placeholder publishes nothing by
|
|
117
|
+
* design, so `ran()` of one is always false — locally and deployed alike.
|
|
118
|
+
* - **Do not test the step itself.** `$vars.toInches ? … : …` is the spelling
|
|
119
|
+
* deployed flows reach for, and it is DEAD: there is no bare `toInches` key in
|
|
120
|
+
* the bag, so it is `undefined` whether or not the step ran, and every guard
|
|
121
|
+
* built on it silently takes the wrong branch. Measured on the product
|
|
122
|
+
* runtime — a flow whose taken arm computed `23` returned `null`, reported
|
|
123
|
+
* `Completed`, and was scored 1.0 by v1's graders
|
|
124
|
+
* (`runs/flow-sdk-g21-2026-08-02/probe-truthiness/RECORD.md`). A green run is
|
|
125
|
+
* not evidence the expression worked.
|
|
126
|
+
*
|
|
127
|
+
* A switch's own `matchedCase` / `matchedCaseId` cannot help either: the format
|
|
128
|
+
* declares them and the server runtime never populates them (measured, same
|
|
129
|
+
* probe family), which is why ran-ness is computed from the output instead.
|
|
130
|
+
*
|
|
131
|
+
* @param step - The step to test, named as it was in `.step(...)`.
|
|
132
|
+
* @returns An {@link Expr} that is true only if the step produced output.
|
|
133
|
+
* @enforcedBy STEP_READ_WITHOUT_OUTPUT Test ran-ness with `ran()`, never a bare
|
|
134
|
+
* `$vars.<step>` — the runtime has no such key, so the guard is always false.
|
|
135
|
+
*/
|
|
136
|
+
export declare function ran(step: string): Expr;
|
|
137
|
+
/**
|
|
138
|
+
* The fields a failure envelope carries.
|
|
139
|
+
*
|
|
140
|
+
* The first five are what every error-capable node's definition declares
|
|
141
|
+
* (`outputDefinition.error.schema`, `required`, `additionalProperties: false`).
|
|
142
|
+
* `response` and `element` are NOT declared and are present at run time anyway —
|
|
143
|
+
* measured on every family probed (2026-09-10), `element` carrying the id of the
|
|
144
|
+
* step that failed. They are typed here because a field that exists should be
|
|
145
|
+
* readable; the declared five stay first because those are the contract.
|
|
146
|
+
*/
|
|
147
|
+
export type ErrorEnvelopeField = 'code' | 'message' | 'detail' | 'category' | 'status' | 'response' | 'element';
|
|
148
|
+
/**
|
|
149
|
+
* Reference a FAILED step's error → `$vars.<step>.error[.<field>]`.
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
* Only meaningful inside that step's `.onError(...)` handler — the platform
|
|
153
|
+
* writes the failure when the node's error boundary fires, and nowhere else.
|
|
154
|
+
* The envelope carries the same fields on every family that publishes one:
|
|
155
|
+
*
|
|
156
|
+
* | field | type | example |
|
|
157
|
+
* |---|---|---|
|
|
158
|
+
* | `code` | string | `'404'` — a STRING even for an HTTP status |
|
|
159
|
+
* | `message` | string | `'Integration Services resource not found'` |
|
|
160
|
+
* | `detail` | string | the whole upstream response |
|
|
161
|
+
* | `category` | string | `'User'` |
|
|
162
|
+
* | `status` | number | `404` |
|
|
163
|
+
* | `response` | unknown | undeclared; `null` in every probe |
|
|
164
|
+
* | `element` | string | undeclared; the id of the step that failed |
|
|
165
|
+
*
|
|
166
|
+
* The last two resolve at run time — measured, a container handler reading
|
|
167
|
+
* `element` came back with the failing body step's id — but they are absent from
|
|
168
|
+
* the declared schema, so `uip maestro flow validate` reports
|
|
169
|
+
* `EXPRESSION_DIAGNOSTIC: Property 'element' does not exist on type
|
|
170
|
+
* '<Step>_Error'` for them. Valid, and noisy: prefer the declared five unless you
|
|
171
|
+
* specifically need one of these.
|
|
172
|
+
*
|
|
173
|
+
* **Which VARIABLE holds it is per node family, and this helper owns that.**
|
|
174
|
+
* Measured on the product (2026-09-10), one debug run per family:
|
|
175
|
+
*
|
|
176
|
+
* | family | envelope in | `<step>.error` is |
|
|
177
|
+
* |---|---|---|
|
|
178
|
+
* | connector (all 3806 of them) | `<step>.error` | the envelope |
|
|
179
|
+
* | `core.action.script` | `<step>.error` | the envelope |
|
|
180
|
+
* | `uipath.pattern.deep-rag` | `<step>.error` | the envelope |
|
|
181
|
+
* | `core.subflow` | `<step>.error` | the envelope |
|
|
182
|
+
* | `core.action.queue.create` | `<step>.error` | the envelope |
|
|
183
|
+
* | `core.action.http.v2` (managed) | `<step>.output` | the boolean `true` |
|
|
184
|
+
* | `core.action.http` (plain, any version) | nowhere — no envelope at all | the boolean `true` |
|
|
185
|
+
*
|
|
186
|
+
* So the author writes one shape, `.error.<field>`, and `serialize` rewrites it
|
|
187
|
+
* to `.output.<field>` for the one family that publishes it there
|
|
188
|
+
* (`errorEnvelopeVar` in `serialize.ts`). Do not hand-write either prefix: which
|
|
189
|
+
* one is right is not a property of the expression, it is a property of the node
|
|
190
|
+
* the step happens to be, and only the builder knows that.
|
|
191
|
+
*
|
|
192
|
+
* The history matters, because this has now been wrong in both directions. It
|
|
193
|
+
* read `.error.<field>` originally; a managed-http debug run showed `.error` was
|
|
194
|
+
* the boolean `true` there and the envelope sat in `.output`, so it was changed
|
|
195
|
+
* to `.output.<field>` for every family — which silently broke the other six,
|
|
196
|
+
* where `.output` is `null` after a failure. Both measurements were right about
|
|
197
|
+
* the family they measured. The fix is not a constant either way.
|
|
198
|
+
*
|
|
199
|
+
* Plain `http({ managed: false })` publishes NO envelope in any version — 1.0.0
|
|
200
|
+
* and the 1.3 that `uip maestro flow migrate` upgrades it to both set
|
|
201
|
+
* `<step>.error = true` and leave `<step>.output` null — so there is nothing for
|
|
202
|
+
* this helper to read. `check` refuses a handler there (HTTP_ONERROR_V1) rather
|
|
203
|
+
* than emitting a read that resolves to nothing.
|
|
204
|
+
*
|
|
205
|
+
* `out('<step>','error')` is still wrong and `check` still refuses it
|
|
206
|
+
* (ERROR_READ_VIA_OUT): the success-path output has no `error` field of its own.
|
|
207
|
+
* Use the boolean `$vars.<step>.error` — `err('<step>')` with no field — to ask
|
|
208
|
+
* *whether* it failed; that reads truthy on every family, the envelope object
|
|
209
|
+
* included.
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* **Read the failure inside the step's error handler**
|
|
213
|
+
* ```ts
|
|
214
|
+
* .step('load', script({ code: 'return JSON.parse($vars.start.output.raw);' }))
|
|
215
|
+
* .onError((h) => h.return({ note: tmpl`bad payload: ${err('load', 'message')}` }))
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* **The same read, without naming the step** — inside a handler the failed step
|
|
220
|
+
* is known, so the handler's own `err` needs only the field, and a step rename
|
|
221
|
+
* cannot leave the read pointing at the wrong node.
|
|
222
|
+
* ```ts
|
|
223
|
+
* .onError((h) => h.return({ note: tmpl`bad payload: ${h.err('message')}` }))
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @param step - The step that FAILED, named as it was in `.step(...)`.
|
|
227
|
+
* @param field - One of the envelope's fields. Omit it to test WHETHER the step
|
|
228
|
+
* failed.
|
|
229
|
+
* @returns An {@link Expr} reading the failure inside an `.onError(...)` handler.
|
|
230
|
+
* @enforcedBy ERROR_READ_VIA_OUT Read an error with `err()`, never
|
|
231
|
+
* `out('<step>', 'error')` — the success output has no `error` field of its own.
|
|
232
|
+
* @enforcedBy ERROR_ENVELOPE_VIA_OUTPUT Inside a handler, the failed step's
|
|
233
|
+
* `.output` is empty; an envelope field read from it resolves to nothing.
|
|
234
|
+
*/
|
|
235
|
+
export declare function err(step: string, field?: ErrorEnvelopeField): Expr;
|
|
236
|
+
/**
|
|
237
|
+
* Build a raw JS *expression* (a condition or computation).
|
|
238
|
+
* Interpolated `Expr`s contribute their reference; other values are JSON-encoded.
|
|
239
|
+
* e.g. js`${input('from')} !== ${input('to')}` → `$vars.from !== $vars.to`
|
|
240
|
+
*
|
|
241
|
+
* @param strings - The template's literal parts, supplied by the tag call.
|
|
242
|
+
* @param vals - Interpolated values. An {@link Expr} contributes its reference;
|
|
243
|
+
* anything else is JSON-encoded.
|
|
244
|
+
* @returns An {@link Expr} carrying the composed JavaScript expression.
|
|
245
|
+
* @see tmpl
|
|
246
|
+
*/
|
|
247
|
+
export declare function js(strings: TemplateStringsArray, ...vals: unknown[]): Expr;
|
|
248
|
+
/**
|
|
249
|
+
* Build a JS *string template* (for URLs, messages, etc.).
|
|
250
|
+
* e.g. tmpl`https://api.rates.io/${input('from')}` →
|
|
251
|
+
* a JS template literal referencing `$vars.from`.
|
|
252
|
+
*
|
|
253
|
+
* @param strings - The template's literal parts, supplied by the tag call.
|
|
254
|
+
* @param vals - Interpolated values, each rendered into the string at run time.
|
|
255
|
+
* @returns An {@link Expr} carrying a JavaScript template literal.
|
|
256
|
+
* @see js
|
|
257
|
+
*/
|
|
258
|
+
export declare function tmpl(strings: TemplateStringsArray, ...vals: unknown[]): Expr;
|
|
259
|
+
/**
|
|
260
|
+
* Coerce a raw value or Expr into an Expr.
|
|
261
|
+
*
|
|
262
|
+
* @internal Public for compatibility; not an authoring factory.
|
|
263
|
+
*/
|
|
264
|
+
export declare function toExpr(val: unknown): Expr;
|
|
265
|
+
/**
|
|
266
|
+
* flow-v1 flow-schema `utils.ts:70` — the flat-name segment separator.
|
|
267
|
+
*
|
|
268
|
+
* @internal Encoding detail shared by `check` and `serialize`, not an authoring value.
|
|
269
|
+
*/
|
|
270
|
+
export declare const FLAT_SEP = "__";
|
|
271
|
+
/**
|
|
272
|
+
* The name the PLATFORM will call this reference by, or `undefined` when the
|
|
273
|
+
* expression is not a single reference (a literal, or a computed expression
|
|
274
|
+
* spanning zero or several references — neither has one argument to name).
|
|
275
|
+
*
|
|
276
|
+
* flow-v1's `encodeFlatName` (`agent-cluster-rewrite.ts:113-121`): split into
|
|
277
|
+
* identifier segments plus bare index numbers and join with `__`; the `$vars.`
|
|
278
|
+
* prefix is dropped, `$metadata` keeps `metadata` as its first segment.
|
|
279
|
+
*
|
|
280
|
+
* ```
|
|
281
|
+
* flatNameOf('$vars.notes') // 'notes'
|
|
282
|
+
* flatNameOf('$vars.normalizeData.output.invoiceNumber') // 'normalizeData__output__invoiceNumber'
|
|
283
|
+
* flatNameOf('$vars.a.output.items[0].id') // 'a__output__items__0__id'
|
|
284
|
+
* flatNameOf('$metadata.jobId') // 'metadata__jobId'
|
|
285
|
+
* flatNameOf('$vars.a.output.x + $vars.b') // undefined — composite
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* Accepts the expression with or without the `=js:` prefix a rendered binding
|
|
289
|
+
* carries, so both the authored `Expr.js` and an emitted binding can be asked.
|
|
290
|
+
*
|
|
291
|
+
* @internal Public for compatibility; not an authoring factory.
|
|
292
|
+
*/
|
|
293
|
+
export declare function flatNameOf(expression: string): string | undefined;
|
|
294
|
+
/**
|
|
295
|
+
* {@link flatNameOf}'s segments, before they are joined.
|
|
296
|
+
*
|
|
297
|
+
* Exposed because the JOIN is lossy: `__` is both the separator and a legal
|
|
298
|
+
* character inside an identifier, so a step named `erp__lookup` produces
|
|
299
|
+
* `erp__lookup__output__value`, which decodes back to the wrong path
|
|
300
|
+
* (`erp.lookup.output.value`). v1's own inverse says as much — `decodeFlatName`
|
|
301
|
+
* round-trips "provided variable and node IDs disallow `__`". `check` reads the
|
|
302
|
+
* segments to warn about exactly that.
|
|
303
|
+
*
|
|
304
|
+
* @internal Public for compatibility; not an authoring factory.
|
|
305
|
+
*/
|
|
306
|
+
export declare function flatNameSegmentsOf(expression: string): string[] | undefined;
|
|
307
|
+
/** Variable type descriptors (map to Flow variable `type` values). */
|
|
308
|
+
export declare const types: {
|
|
309
|
+
readonly string: "string";
|
|
310
|
+
readonly number: "number";
|
|
311
|
+
readonly boolean: "boolean";
|
|
312
|
+
readonly object: "object";
|
|
313
|
+
readonly array: "array";
|
|
314
|
+
readonly file: "file";
|
|
315
|
+
readonly any: "any";
|
|
316
|
+
readonly integer: "integer";
|
|
317
|
+
readonly float: "float";
|
|
318
|
+
readonly double: "double";
|
|
319
|
+
readonly date: "date";
|
|
320
|
+
readonly datetime: "datetime";
|
|
321
|
+
readonly jsonSchema: "jsonSchema";
|
|
322
|
+
};
|
|
323
|
+
export type TypeDesc = (typeof types)[keyof typeof types];
|