@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,3244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/actions — action specifications shared by every builder SDK.
|
|
3
|
+
*
|
|
4
|
+
* An action describes *what a node does* (an HTTP call, an inline script, an
|
|
5
|
+
* Integration Service connector activity) independent of which artifact it
|
|
6
|
+
* lives in — a Flow step, a Case connector task, or a BPMN service task all
|
|
7
|
+
* take the same specs. Each domain's serializer maps an `ActionSpec` onto its
|
|
8
|
+
* target node shape.
|
|
9
|
+
*/
|
|
10
|
+
import type { Expr } from './expr.js';
|
|
11
|
+
import type { LookupToken } from './lookups.js';
|
|
12
|
+
import { type ConnectorDescriptor, type TriggerDescriptor } from './connectors.js';
|
|
13
|
+
import type { ScriptReturns } from './script-return.js';
|
|
14
|
+
/** One conditional response branch on an HTTP node — a designer-visible side exit. */
|
|
15
|
+
export interface HttpBranch {
|
|
16
|
+
/**
|
|
17
|
+
* The branch's name — it becomes the node's `branch-<name>` source port, so
|
|
18
|
+
* keep it port-safe (letters, digits, `_`, `-`). Route it with
|
|
19
|
+
* `.stepToList('branch-<name>', ...)` after the step; the main path continues
|
|
20
|
+
* from the default port as always.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* When to take this exit, evaluated against the response — e.g.
|
|
25
|
+
* js-tagged: `$vars.fetch.output.statusCode === 429`. Branches are checked in
|
|
26
|
+
* order; the first truthy one wins, else the default port fires.
|
|
27
|
+
*/
|
|
28
|
+
condition: Expr;
|
|
29
|
+
}
|
|
30
|
+
interface HttpInputsBase {
|
|
31
|
+
/**
|
|
32
|
+
* Conditional response branches — extra source ports (`branch-<name>`)
|
|
33
|
+
* beside the default. See {@link HttpBranch}; both HTTP node families
|
|
34
|
+
* declare them.
|
|
35
|
+
*/
|
|
36
|
+
branches?: HttpBranch[];
|
|
37
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
38
|
+
url: string | Expr;
|
|
39
|
+
headers?: Record<string, string | Expr>;
|
|
40
|
+
query?: Record<string, string | Expr>;
|
|
41
|
+
body?: string | Expr;
|
|
42
|
+
contentType?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Choose the HTTP node explicitly. `false` emits the standalone
|
|
45
|
+
* `core.action.http`; `true` emits the managed `core.action.http.v2`, routed
|
|
46
|
+
* through Integration Service's HTTP connector.
|
|
47
|
+
*
|
|
48
|
+
* This has no default because these are different platform nodes, not two
|
|
49
|
+
* modes of one node. A silent `false` made an omitted field compile and
|
|
50
|
+
* validate as the wrong node while changing failure routing and connection
|
|
51
|
+
* behavior.
|
|
52
|
+
*
|
|
53
|
+
* It is not a version bump, it changes two things you can see:
|
|
54
|
+
*
|
|
55
|
+
* - **a 4xx/5xx FAILS the step**, so `.onError(…)` fires on it. On the plain
|
|
56
|
+
* node the same 404 comes back on the SUCCESS path as
|
|
57
|
+
* `out('fetch','statusCode')` and no error handler ever runs — which is why
|
|
58
|
+
* an error port only makes sense here (`check` says so: HTTP_ONERROR_V1).
|
|
59
|
+
* The handler can answer the flow (`.return`), stop the run
|
|
60
|
+
* (`.terminate`), or compensate and continue at a step the success path
|
|
61
|
+
* also reaches (`h.rejoin('<step>')` — see `references/error-handling.md`);
|
|
62
|
+
* - both nodes expose JSON responses as parsed values in the live product;
|
|
63
|
+
* use `returns` to declare fields before reading them. The node choice does
|
|
64
|
+
* not decide whether application/json is parsed.
|
|
65
|
+
*
|
|
66
|
+
* With `managed: true`, omit `connection` and `folder` for the platform's
|
|
67
|
+
* manual/implicit mode, or provide both symbolic names to reuse an Integration
|
|
68
|
+
* Service HTTP connection. A local run remains unauthenticated.
|
|
69
|
+
*
|
|
70
|
+
* @enforcedBy HTTP_ONERROR_V1 `.onError()` on an http step needs `managed: true`; on
|
|
71
|
+
* the standalone node a 4xx arrives on the SUCCESS path and no handler runs.
|
|
72
|
+
*/
|
|
73
|
+
managed: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* The response BODY's top-level fields and their types — e.g.
|
|
76
|
+
* `{ items: 'array' }`. Required for either HTTP node if anything reads a
|
|
77
|
+
* field off a parsed JSON body.
|
|
78
|
+
*
|
|
79
|
+
* Why you have to say: the platform's own definition declares the response as
|
|
80
|
+
* a bare object, because only the API being called knows its shape. Without
|
|
81
|
+
* this, `out('fetch','body','items')` reads from an object with no declared
|
|
82
|
+
* fields, and nothing downstream can tell a real field from a typo. Same rule,
|
|
83
|
+
* and the same word, as
|
|
84
|
+
* `rpaWorkflow`'s `returns`.
|
|
85
|
+
*/
|
|
86
|
+
returns?: Record<string, ReturnFieldType>;
|
|
87
|
+
/**
|
|
88
|
+
* How long to wait for the response before giving up, as an **ISO-8601
|
|
89
|
+
* duration** — `'PT30S'` is "give up after 30 seconds", `'PT1M'` one minute,
|
|
90
|
+
* `'PT15M'` fifteen.
|
|
91
|
+
*
|
|
92
|
+
* Both http node types carry this, and both definitions declare the same
|
|
93
|
+
* default (`PT15M`), so leaving it unset is not "no timeout" — it is fifteen
|
|
94
|
+
* minutes. Omitted from the emitted node unless you set it, which keeps a flow
|
|
95
|
+
* that doesn't care byte-identical to the platform's own default shape (~99%
|
|
96
|
+
* of the 808 deployed http nodes are on the defaults).
|
|
97
|
+
*
|
|
98
|
+
* `check` rejects a string the platform cannot parse as a duration —
|
|
99
|
+
* `'30s'`, `'PT'` and `'30'` are all errors that name the expected form.
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue `'PT15M'`
|
|
102
|
+
* @enforcedBy HTTP_TIMEOUT_NOT_DURATION Must be an ISO-8601 duration.
|
|
103
|
+
*/
|
|
104
|
+
timeout?: string;
|
|
105
|
+
/**
|
|
106
|
+
* How many times to RETRY a retryable failure (5xx, 429, a network error) —
|
|
107
|
+
* `0`, the definitions' default, means "try once, don't retry". `2` means up
|
|
108
|
+
* to three attempts in total.
|
|
109
|
+
*
|
|
110
|
+
* Must be a non-negative integer. Above **5** `check` warns rather than
|
|
111
|
+
* errors: the deployed corpus's
|
|
112
|
+
* largest author-set value is 3, and the platform's own ceiling is not
|
|
113
|
+
* measured — so a bigger number may well work, and refusing it outright would
|
|
114
|
+
* fence off something we have no evidence is wrong.
|
|
115
|
+
*
|
|
116
|
+
* @defaultValue `0`
|
|
117
|
+
* @enforcedBy HTTP_RETRY_COUNT_INVALID Must be a non-negative integer.
|
|
118
|
+
*/
|
|
119
|
+
retryCount?: number;
|
|
120
|
+
}
|
|
121
|
+
export type HttpInputs = HttpInputsBase & ({
|
|
122
|
+
managed: false;
|
|
123
|
+
connection?: never;
|
|
124
|
+
folder?: never;
|
|
125
|
+
} | {
|
|
126
|
+
managed: true;
|
|
127
|
+
/** Symbolic HTTP connection name declared in bindings.json. */
|
|
128
|
+
connection?: string;
|
|
129
|
+
/** Symbolic folder name declared in bindings.json. */
|
|
130
|
+
folder?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Connector key whose authentication the HTTP proxy should reuse.
|
|
133
|
+
* Defaults to `uipath-uipath-http`. Set this for a connector-specific
|
|
134
|
+
* fallback endpoint, for example `uipath-salesforce-slack`.
|
|
135
|
+
* Requires both `connection` and `folder`.
|
|
136
|
+
*/
|
|
137
|
+
targetConnector?: string;
|
|
138
|
+
});
|
|
139
|
+
export interface ScriptInputs {
|
|
140
|
+
/** JavaScript body. Must `return` its result. Referenced via out('<step>'). */
|
|
141
|
+
code: string;
|
|
142
|
+
/**
|
|
143
|
+
* What the body RETURNS — the type of `out('<step>')`.
|
|
144
|
+
*
|
|
145
|
+
* The platform's definition can only say `output: {type: 'object'}` (a node
|
|
146
|
+
* type cannot know what a particular body returns), so the designer types
|
|
147
|
+
* every script read as `Record<string, any>` and reports mapping one into a
|
|
148
|
+
* `string` output as `Type 'Record<string, any>' is not assignable to type
|
|
149
|
+
* 'string'` — on a flow that is correct and runs.
|
|
150
|
+
*
|
|
151
|
+
* **Usually you do not need this.** The compiler reads the body and declares
|
|
152
|
+
* what it plainly returns, so `return "pending-approval"` is already a
|
|
153
|
+
* `string`. Reach for `returns` when the body does not say so syntactically —
|
|
154
|
+
* a value that comes back from a runtime read, or an object assembled
|
|
155
|
+
* dynamically:
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* .step('policyLimit', script({
|
|
159
|
+
* code: 'return $vars.fetchPolicy.output.body.limit;',
|
|
160
|
+
* returns: 'number',
|
|
161
|
+
* }))
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* For an object return, name the FIELDS instead — the spelling every other
|
|
165
|
+
* action's `returns` uses, and what licenses `out('<step>', '<field>')`:
|
|
166
|
+
*
|
|
167
|
+
* ```ts
|
|
168
|
+
* returns: { total: 'number', currency: 'string' }
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* An explicit `returns` always wins over what the body looks like. Nothing is
|
|
172
|
+
* inferred when the body does not plainly agree with itself, and an unknown
|
|
173
|
+
* shape stays the definition's open object rather than being guessed at.
|
|
174
|
+
*/
|
|
175
|
+
returns?: ScriptReturns;
|
|
176
|
+
}
|
|
177
|
+
export interface ConnectorOpts {
|
|
178
|
+
/** Connector action version (defaults to the library's newest match). */
|
|
179
|
+
version?: string;
|
|
180
|
+
/** Symbolic connection name declared in bindings.json (→ ConnectionId). */
|
|
181
|
+
connection?: string;
|
|
182
|
+
/** Symbolic folder name declared in bindings.json (→ connectionFolderKey). */
|
|
183
|
+
folder?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Which OBJECT a **generic** operation addresses — e.g. ServiceNow's "List All
|
|
186
|
+
* Records" on `'acr_user'`, NetSuite's "Get Record" on `'AccountingPeriod'`.
|
|
187
|
+
*
|
|
188
|
+
* A generic (`GenericExpanded`) operation encodes only the VERB in its node
|
|
189
|
+
* type, and the library carries one entry per object underneath it:
|
|
190
|
+
* `uipath.connector.uipath-oracle-netsuite.get-record` alone covers **182
|
|
191
|
+
* objects**. Measured on the shipped library: **448 of 1,823 nodeTypes map to
|
|
192
|
+
* more than one entry, 5,206 entries deep**
|
|
193
|
+
* ([#143](https://github.com/UiPath/flow-builder-sdk/issues/143)) — so without
|
|
194
|
+
* this, `connector(key, action, …)` could only ever reach whichever object
|
|
195
|
+
* sorted first, silently.
|
|
196
|
+
*
|
|
197
|
+
* ```ts
|
|
198
|
+
* connector('uipath-servicenow-servicenow', 'list-all-records', {},
|
|
199
|
+
* { connection: 'servicenow', folder: 'shared', object: 'acr_user' })
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* **Omitting it on an ambiguous nodeType is a compile error** that lists the
|
|
203
|
+
* objects (with a nearest-match hint) — the alternative, keeping first-match,
|
|
204
|
+
* is what made the defect silent.
|
|
205
|
+
*
|
|
206
|
+
* **An object the library does not list is ACCEPTED, with a warning.** A
|
|
207
|
+
* connector's object set is scoped to the *connection*, not to the registry
|
|
208
|
+
* snapshot: `acr_user` is a real ServiceNow table and appears in no library
|
|
209
|
+
* entry. So the contract is: stamp it, flag it `objectNameUnverified`, and let
|
|
210
|
+
* the tenant boundary resolve it before dispatch — the SDK refusing what the
|
|
211
|
+
* platform accepts would just be the two layers disagreeing.
|
|
212
|
+
*
|
|
213
|
+
* Passing it for a CURATED (single-entry) operation whose entry names a
|
|
214
|
+
* different object is an error: nothing could make that right.
|
|
215
|
+
*/
|
|
216
|
+
object?: string;
|
|
217
|
+
}
|
|
218
|
+
/** How a filter combines its rules: every rule must match, or any one. */
|
|
219
|
+
export type FilterMatch = 'and' | 'or';
|
|
220
|
+
/** Comparison a filter rule applies to a field. */
|
|
221
|
+
export type FilterCondition = 'equals' | 'not_equals' | 'greater_than' | 'less_than' | 'greater_equal' | 'less_equal' | 'contains' | 'not_contains' | 'starts_with' | 'not_starts_with' | 'ends_with' | 'not_ends_with' | 'matches_regex' | 'in' | 'not_in' | 'is_null' | 'is_not_null' | 'is_empty' | 'is_not_empty';
|
|
222
|
+
export interface FilterRule {
|
|
223
|
+
/** Field on each item. Dot-paths reach nested fields (`'order.amount'`). */
|
|
224
|
+
field: string;
|
|
225
|
+
condition: FilterCondition;
|
|
226
|
+
/**
|
|
227
|
+
* What to compare against — a LITERAL only. The transform runtime reads this
|
|
228
|
+
* value as-is and evaluates nothing, so an expression here would compare every
|
|
229
|
+
* item against that text and match nothing. Hence `Expr` is not accepted: for
|
|
230
|
+
* a dynamic threshold, filter in a `script` step instead.
|
|
231
|
+
* Omit for the value-free conditions (`is_null`, `is_empty`, …).
|
|
232
|
+
*/
|
|
233
|
+
value?: string | number | boolean | null;
|
|
234
|
+
}
|
|
235
|
+
/** What a map does to a field's value. Only `copy` is meaningful for non-text. */
|
|
236
|
+
export type Transformation = 'copy' | 'uppercase' | 'lowercase' | 'trim';
|
|
237
|
+
export interface FieldMapping {
|
|
238
|
+
/** Field to carry into the output. Must exist on the item, or it is skipped. */
|
|
239
|
+
field: string;
|
|
240
|
+
/** Defaults to `'copy'` (the value unchanged). */
|
|
241
|
+
transformation?: Transformation;
|
|
242
|
+
/** Output field name. Omit to keep `field`'s own name. */
|
|
243
|
+
renameTo?: string;
|
|
244
|
+
}
|
|
245
|
+
export type AggregationOperation = 'count' | 'sum' | 'average' | 'min' | 'max' | 'first' | 'last' | 'collect';
|
|
246
|
+
export interface Aggregation {
|
|
247
|
+
operation: AggregationOperation;
|
|
248
|
+
/** Output field name for the aggregate. Required. */
|
|
249
|
+
alias: string;
|
|
250
|
+
/** Field to aggregate. Required for every operation except `count`. */
|
|
251
|
+
field?: string;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* One link in the chain. Operations run in the order given, and each one's
|
|
255
|
+
* result is the next one's input — so a `map` that drops a field puts it out of
|
|
256
|
+
* reach of a later `filter`.
|
|
257
|
+
*/
|
|
258
|
+
export type TransformOperation = {
|
|
259
|
+
type: 'filter';
|
|
260
|
+
filters: FilterRule[];
|
|
261
|
+
operation?: FilterMatch;
|
|
262
|
+
} | {
|
|
263
|
+
type: 'map';
|
|
264
|
+
mappings: FieldMapping[];
|
|
265
|
+
keepOriginalFields?: boolean;
|
|
266
|
+
} | {
|
|
267
|
+
type: 'groupBy';
|
|
268
|
+
groupByField: string;
|
|
269
|
+
aggregations?: Aggregation[];
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Which Transform node type to emit.
|
|
273
|
+
*
|
|
274
|
+
* @remarks
|
|
275
|
+
* The platform ships four: the generic `core.action.transform`, which chains N
|
|
276
|
+
* operations, plus three single-purpose variants that each run exactly one.
|
|
277
|
+
* They share ONE runtime — flow-v1 routes all four node types through the same
|
|
278
|
+
* script generators and dispatches on the OPERATION's `type`, never the node's
|
|
279
|
+
* (`bpmn-to-xml.ts`'s `DATA_TRANSFORM_NODE_TYPES` / `generateDataTransformScript`).
|
|
280
|
+
* So a variant is the generic constrained to one operation, wearing a
|
|
281
|
+
* self-describing node type and its own editor in the designer.
|
|
282
|
+
*
|
|
283
|
+
* Note the spelling: the node type is `core.action.transform.group-by`
|
|
284
|
+
* (hyphen), while the operation it carries is `type: 'groupBy'` (camelCase) —
|
|
285
|
+
* that mismatch is the platform's, not ours.
|
|
286
|
+
*/
|
|
287
|
+
export type TransformVariant = 'map' | 'filter' | 'group-by';
|
|
288
|
+
/**
|
|
289
|
+
* The operation `type` each variant node must carry — one of, and only.
|
|
290
|
+
*
|
|
291
|
+
* @internal Serializer plumbing; an author states the variant, not the mapping.
|
|
292
|
+
*/
|
|
293
|
+
export declare const VARIANT_OPERATION: Record<TransformVariant, TransformOperation['type']>;
|
|
294
|
+
export interface TransformInputs {
|
|
295
|
+
/**
|
|
296
|
+
* The array to transform, as a REFERENCE: `v('catalog')` or
|
|
297
|
+
* `out('fetchOrders', 'body.items')`.
|
|
298
|
+
*
|
|
299
|
+
* This is a variable PATH, not a value field — the runtime turns the string
|
|
300
|
+
* into a lookup. An inline array or a computed `js` expression therefore
|
|
301
|
+
* resolves to nothing, which is why the type is `Expr` and `check` rejects
|
|
302
|
+
* anything that is not a bare `$vars.…` path. Keep static data in a
|
|
303
|
+
* `.var(name, types.array, [...])` default and point here.
|
|
304
|
+
*/
|
|
305
|
+
collection: Expr;
|
|
306
|
+
/**
|
|
307
|
+
* Emit a single-purpose variant node instead of the generic Transform.
|
|
308
|
+
* Omit it for the generic (the default).
|
|
309
|
+
*
|
|
310
|
+
* With a variant, `operations` must hold exactly ONE operation of the
|
|
311
|
+
* matching type — `'filter'` → `type: 'filter'`, `'map'` → `type: 'map'`,
|
|
312
|
+
* `'group-by'` → `type: 'groupBy'`. `check` rejects anything else, naming
|
|
313
|
+
* both the variant and the operation it found.
|
|
314
|
+
*/
|
|
315
|
+
variant?: TransformVariant;
|
|
316
|
+
/** At least one operation — an empty chain is a no-op node. */
|
|
317
|
+
operations: TransformOperation[];
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* A form field's type. These are the platform's own strings — an unrecognized
|
|
321
|
+
* one is NOT an error there, it silently normalizes to text (so a number field
|
|
322
|
+
* becomes a text box), which is why `check` rejects anything outside this set.
|
|
323
|
+
*/
|
|
324
|
+
export type FormFieldType = 'text' | 'number' | 'boolean' | 'date-time';
|
|
325
|
+
/** A value the reviewer READS: shown on the form, filled in from the flow. */
|
|
326
|
+
export interface ShownField {
|
|
327
|
+
/** Field id — the key the answer object uses. Must be unique on the form. */
|
|
328
|
+
id: string;
|
|
329
|
+
/** Label the reviewer sees. Defaults to `id`. */
|
|
330
|
+
label?: string;
|
|
331
|
+
type: FormFieldType;
|
|
332
|
+
direction: 'input';
|
|
333
|
+
/**
|
|
334
|
+
* What to show — a reference, e.g. `input('amount')` or
|
|
335
|
+
* `out('fetchInvoice', 'body.total')`. Required: a shown field with nothing
|
|
336
|
+
* bound to it renders EMPTY on the deployed form, so the flow says "show them
|
|
337
|
+
* this" and shows them nothing.
|
|
338
|
+
*/
|
|
339
|
+
value: Expr;
|
|
340
|
+
}
|
|
341
|
+
/** A value the reviewer FILLS IN: read downstream with `out('<step>', '<id>')`. */
|
|
342
|
+
export interface AskedField {
|
|
343
|
+
/** Field id — the key the answer object uses. Must be unique on the form. */
|
|
344
|
+
id: string;
|
|
345
|
+
/** Label the reviewer sees. Defaults to `id`. */
|
|
346
|
+
label?: string;
|
|
347
|
+
type: FormFieldType;
|
|
348
|
+
direction: 'output';
|
|
349
|
+
/** Reviewer must fill it in before the task can be completed. */
|
|
350
|
+
required?: boolean;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* A value the reviewer READS **and can correct**: pre-filled from the flow,
|
|
354
|
+
* editable on the form, and the (possibly changed) value comes back as an
|
|
355
|
+
* answer. Read it downstream with `out('<step>', '<id>')` — the write target is
|
|
356
|
+
* the field's own id, deliberately decoupled from where the pre-fill came from.
|
|
357
|
+
*/
|
|
358
|
+
export interface InOutField {
|
|
359
|
+
/** Field id — the key the answer object uses. Must be unique on the form. */
|
|
360
|
+
id: string;
|
|
361
|
+
/** Label the reviewer sees. Defaults to `id`. */
|
|
362
|
+
label?: string;
|
|
363
|
+
type: FormFieldType;
|
|
364
|
+
direction: 'inOut';
|
|
365
|
+
/** What to pre-fill — a reference, e.g. `out('fetchInvoice', 'body.total')`. */
|
|
366
|
+
value: Expr;
|
|
367
|
+
/** Reviewer must confirm/fill it before the task can be completed. */
|
|
368
|
+
required?: boolean;
|
|
369
|
+
}
|
|
370
|
+
export type FormField = ShownField | AskedField | InOutField;
|
|
371
|
+
/**
|
|
372
|
+
* Where the task is delivered. The four ids are the platform's own — including
|
|
373
|
+
* the lowercase `'teams'`, which is how every deployed recipient spells
|
|
374
|
+
* Microsoft Teams (the canvas's channel list, `hitl-types.ts`).
|
|
375
|
+
*/
|
|
376
|
+
export type HitlChannel = 'Slack' | 'teams' | 'Email' | 'ActionCenter';
|
|
377
|
+
/**
|
|
378
|
+
* How the task is assigned, the platform's own vocabulary (canvas
|
|
379
|
+
* `HITL_ASSIGNEE_TYPE`): `'user'` a single user, `'group'` all users of a
|
|
380
|
+
* group, `'staticEmail'`/`'staticGroupName'` literal values instead of
|
|
381
|
+
* directory picks, `'workload'`/`'roundRobin'` distribution over a group, and
|
|
382
|
+
* `'custom'` an expression the engine evaluates (`value` holds it).
|
|
383
|
+
*/
|
|
384
|
+
export type HitlAssigneeType = 'user' | 'group' | 'staticEmail' | 'staticGroupName' | 'workload' | 'roundRobin' | 'custom';
|
|
385
|
+
/** A per-channel Integration Service connection (Slack / Teams delivery). */
|
|
386
|
+
export interface HitlConnection {
|
|
387
|
+
/** The connection's display name. */
|
|
388
|
+
name?: string | null;
|
|
389
|
+
/** The connection key the engine resolves, e.g. `'Slack'` for the default. */
|
|
390
|
+
key: string;
|
|
391
|
+
/** Folder the connection lives in; `null` for tenant-level defaults. */
|
|
392
|
+
folderPath?: string | null;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Who gets the task and over which channels. Omit the whole object for the
|
|
396
|
+
* definition's default (Email + Action Center, assigned to a group) — which is
|
|
397
|
+
* what 203 of 233 deployed v1 human tasks carry, and what this SDK has always
|
|
398
|
+
* emitted.
|
|
399
|
+
*
|
|
400
|
+
* ```ts
|
|
401
|
+
* hitl({
|
|
402
|
+
* recipient: {
|
|
403
|
+
* channels: ['Email', 'ActionCenter'],
|
|
404
|
+
* assignee: { type: 'user', value: 'reviewer@acme.test' },
|
|
405
|
+
* },
|
|
406
|
+
* …
|
|
407
|
+
* })
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
export interface HitlRecipient {
|
|
411
|
+
/** Delivery channels. Defaults to the emitted definition's own default set. */
|
|
412
|
+
channels?: HitlChannel[];
|
|
413
|
+
/** Who the task is assigned to. */
|
|
414
|
+
assignee: {
|
|
415
|
+
type: HitlAssigneeType;
|
|
416
|
+
/**
|
|
417
|
+
* The user email / group name / expression, per `type`. The engine lowers
|
|
418
|
+
* this to its `{ Value, Type }` recipient contract; without one the task
|
|
419
|
+
* falls back to the tenant's assignment default.
|
|
420
|
+
*/
|
|
421
|
+
value?: string;
|
|
422
|
+
/** Display name the designer shows next to the pick. Cosmetic. */
|
|
423
|
+
displayName?: string;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Per-channel connections, keyed by channel id (`Slack` / `teams`). Only the
|
|
427
|
+
* connector-backed channels take one; Email and Action Center do not.
|
|
428
|
+
*/
|
|
429
|
+
connections?: Partial<Record<'Slack' | 'teams', HitlConnection>>;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* The Document Validation task's subject — `variant: 'document-validation'`
|
|
433
|
+
* only. The reviewer gets the platform's validation station (or a custom app
|
|
434
|
+
* with a Validation Control) over a document and its extraction result.
|
|
435
|
+
*/
|
|
436
|
+
export interface DocValidationInputs {
|
|
437
|
+
/**
|
|
438
|
+
* The extraction result to validate — bind the `ExtractionResult` output of
|
|
439
|
+
* an upstream Extract step, e.g. `out('extract', 'ExtractionResult')`.
|
|
440
|
+
* Required: the station has nothing to validate without it.
|
|
441
|
+
*/
|
|
442
|
+
extractionResult: Expr | string;
|
|
443
|
+
/** Storage bucket id holding the document. */
|
|
444
|
+
storageBucket?: string;
|
|
445
|
+
/** The document's id within the bucket. */
|
|
446
|
+
documentId?: string;
|
|
447
|
+
/**
|
|
448
|
+
* `'standard'` (default) for the native validation station, `'custom'` for a
|
|
449
|
+
* custom app with a Validation Control — which then requires `taxonomy`.
|
|
450
|
+
*/
|
|
451
|
+
render?: 'standard' | 'custom';
|
|
452
|
+
/** The taxonomy the custom app validates against. Required when `render: 'custom'`. */
|
|
453
|
+
taxonomy?: Expr | string;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* One completion button. `action: 'End'` marks an outcome that ENDS the process
|
|
457
|
+
* rather than continuing (the platform's own two-value vocabulary — anything
|
|
458
|
+
* that is not exactly `'End'` reads as continue).
|
|
459
|
+
*
|
|
460
|
+
* @remarks
|
|
461
|
+
* A bare string is shorthand for `{ name }`.
|
|
462
|
+
*/
|
|
463
|
+
export type Outcome = string | {
|
|
464
|
+
name: string;
|
|
465
|
+
action?: 'Continue' | 'End';
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* WHICH human-task node type to emit. The platform ships three spellings of the
|
|
469
|
+
* same node; two of them resolve on this tenant and are what this option picks.
|
|
470
|
+
*
|
|
471
|
+
* @remarks
|
|
472
|
+
* - **omitted** — `uipath.human-in-the-loop`, the original node, which chooses
|
|
473
|
+
* the form kind with `inputs.type: 'quick'`. This is the default and it does
|
|
474
|
+
* not change: it is where the platform's own versioning continues, and 319 of
|
|
475
|
+
* the corpus's human tasks are on it.
|
|
476
|
+
* - **`'quick-form'`** — `uipath.human-in-the-loop.quick-form`. Same inline form,
|
|
477
|
+
* but the node TYPE is the "quick" choice, so no `inputs.type` is written
|
|
478
|
+
* (165 of its 175 deployed instances omit it). Everything you author is
|
|
479
|
+
* identical; pick it when something downstream keys on the literal type
|
|
480
|
+
* string, which flow-v1's own task checkers do.
|
|
481
|
+
* - **`'action-app'`** — `uipath.human-in-the-loop.coded-action-app`. The form is
|
|
482
|
+
* NOT in the flow: it belongs to a deployed Action App, named by `app`. You
|
|
483
|
+
* still declare `outcomes` (the flow routes on them); you must NOT declare
|
|
484
|
+
* `fields` (the app owns them) — `check` says so.
|
|
485
|
+
*
|
|
486
|
+
* - **`'document-validation'`** — `uipath.human-in-the-loop.document-validation`.
|
|
487
|
+
* A validation station over a document + extraction result, named by
|
|
488
|
+
* `document`. No `fields` (the station is the form); `outcomes` still route.
|
|
489
|
+
* The definition is BUNDLED from the workbench manifest — the tenant registry
|
|
490
|
+
* does not serve the family (same availability note as do-while).
|
|
491
|
+
*/
|
|
492
|
+
export type HitlVariant = 'quick-form' | 'action-app' | 'document-validation';
|
|
493
|
+
/**
|
|
494
|
+
* A deployed Action App that supplies a human task's form — the `'action-app'`
|
|
495
|
+
* variant's subject.
|
|
496
|
+
*
|
|
497
|
+
* @remarks
|
|
498
|
+
* The names are the platform's own, from flow-v1's app picker: an app is closed
|
|
499
|
+
* by `key` (its GUID) plus the `folderPath` it is deployed in, with `name` the
|
|
500
|
+
* human-readable title. This SDK is offline and never calls the Apps API, so
|
|
501
|
+
* what you write here is what you already know about the app.
|
|
502
|
+
*
|
|
503
|
+
* ```ts
|
|
504
|
+
* hitl({
|
|
505
|
+
* variant: 'action-app',
|
|
506
|
+
* app: {
|
|
507
|
+
* name: 'Expense Review',
|
|
508
|
+
* key: 'c0ba97df-8a30-4fe0-b4b4-4611a631d77b',
|
|
509
|
+
* folderPath: 'Shared',
|
|
510
|
+
* inputs: { 'Expense Amount': out('fetchExpense', 'total') },
|
|
511
|
+
* },
|
|
512
|
+
* outcomes: ['Approve', 'Reject'],
|
|
513
|
+
* })
|
|
514
|
+
* ```
|
|
515
|
+
*/
|
|
516
|
+
export interface AppRef {
|
|
517
|
+
/** The app's display title, e.g. `'Expense Review'`. */
|
|
518
|
+
name: string;
|
|
519
|
+
/** The app's key (a GUID) — how the platform resolves which app this is. */
|
|
520
|
+
key: string;
|
|
521
|
+
/** Fully-qualified folder the app is deployed in, e.g. `'Shared'`. */
|
|
522
|
+
folderPath: string;
|
|
523
|
+
/**
|
|
524
|
+
* The app's stable system name. `null` until the app's first deployment
|
|
525
|
+
* assigns one, which is why it is optional and why `null` is a legal value
|
|
526
|
+
* rather than something to omit.
|
|
527
|
+
*/
|
|
528
|
+
appSystemName?: string | null;
|
|
529
|
+
/**
|
|
530
|
+
* What to send the app, keyed by the app's OWN input parameter names — so the
|
|
531
|
+
* keys are the app author's, spaces and all (`'Invoice Amount'`), not
|
|
532
|
+
* identifiers of ours. Values are references, e.g. `out('step', 'field')`.
|
|
533
|
+
*
|
|
534
|
+
* Emitted as `inputs.appInputBindings`, the map flow-v1's serializer turns
|
|
535
|
+
* into the task's `HitlTaskArguments`.
|
|
536
|
+
*/
|
|
537
|
+
inputs?: Record<string, Expr | string>;
|
|
538
|
+
}
|
|
539
|
+
export interface HitlInputs {
|
|
540
|
+
/**
|
|
541
|
+
* Which human-task node type to emit. Omit it for today's default — see
|
|
542
|
+
* {@link HitlVariant}. Omitting it emits exactly what it always has.
|
|
543
|
+
*/
|
|
544
|
+
variant?: HitlVariant;
|
|
545
|
+
/**
|
|
546
|
+
* The deployed Action App that owns this task's form. Required by — and only
|
|
547
|
+
* legal with — `variant: 'action-app'`.
|
|
548
|
+
*/
|
|
549
|
+
app?: AppRef;
|
|
550
|
+
/** Task title the reviewer sees. Defaults to the step's label. */
|
|
551
|
+
title?: string;
|
|
552
|
+
/** Action Center priority. Defaults to `'Low'`. */
|
|
553
|
+
priority?: 'Low' | 'Medium' | 'High';
|
|
554
|
+
/**
|
|
555
|
+
* The form, as an array of field descriptors — `direction: 'input'` for a value
|
|
556
|
+
* the reviewer reads, `'output'` for one they fill in. An array (not a map)
|
|
557
|
+
* because the ids are yours and order is the order on the form.
|
|
558
|
+
*
|
|
559
|
+
* Required for the inline-form variants (the default and `'quick-form'`).
|
|
560
|
+
* FORBIDDEN with `variant: 'action-app'`, where the form belongs to the
|
|
561
|
+
* deployed app rather than to the flow — `check` says so both ways.
|
|
562
|
+
*/
|
|
563
|
+
fields?: FormField[];
|
|
564
|
+
/**
|
|
565
|
+
* The completion buttons, e.g. `['Approve', 'Reject']`. At least one, or the
|
|
566
|
+
* reviewer has no way to complete the task and the flow waits forever. The
|
|
567
|
+
* first is the primary (default) one.
|
|
568
|
+
*
|
|
569
|
+
* Which one they pressed is `out('<step>', 'Action')` — that is what the
|
|
570
|
+
* platform's own routing conditions compare against, so branch on it.
|
|
571
|
+
*/
|
|
572
|
+
outcomes: Outcome[];
|
|
573
|
+
/** Who gets the task and how. Omit for the definition's default delivery. */
|
|
574
|
+
recipient?: HitlRecipient;
|
|
575
|
+
/** Action Center labels, comma-separated (the platform stores one string). */
|
|
576
|
+
labels?: string;
|
|
577
|
+
/**
|
|
578
|
+
* Route each outcome from its OWN port instead of the single `completed`
|
|
579
|
+
* exit. Selects the node's **1.1** definition, whose exits are
|
|
580
|
+
* `outcome-<id>` handles (one per outcome; ids are the outcome names
|
|
581
|
+
* slugified, e.g. `'Approve'` → `outcome-approve`).
|
|
582
|
+
*
|
|
583
|
+
* The FIRST (primary) outcome continues the main path; route the others with
|
|
584
|
+
* `.stepToList('outcome-<id>', …)`. Base variant only — the sub-typed nodes
|
|
585
|
+
* have no per-outcome definition version.
|
|
586
|
+
*/
|
|
587
|
+
outcomePorts?: boolean;
|
|
588
|
+
/**
|
|
589
|
+
* Expose the task's runtime error as a bindable `out('<step>', 'error')`
|
|
590
|
+
* object (`{ code, message, detail, category, status }`). Selects the node's
|
|
591
|
+
* **1.2** definition — which also routes per outcome, so this implies
|
|
592
|
+
* {@link HitlInputs.outcomePorts | outcomePorts}. Base variant only.
|
|
593
|
+
*/
|
|
594
|
+
exposeError?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* The document to validate. Required by — and only legal with —
|
|
597
|
+
* `variant: 'document-validation'`.
|
|
598
|
+
*/
|
|
599
|
+
document?: DocValidationInputs;
|
|
600
|
+
}
|
|
601
|
+
export interface SendMessageInputs {
|
|
602
|
+
/**
|
|
603
|
+
* The conversation to post into — from the conversation trigger
|
|
604
|
+
* (`out('start', 'conversationId')`) or a context read. Required.
|
|
605
|
+
*/
|
|
606
|
+
conversationId: string | Expr;
|
|
607
|
+
/**
|
|
608
|
+
* The exchange (one user turn plus its answers) the message belongs to —
|
|
609
|
+
* `out('<waitStep>', 'conversationContext.latestExchangeId')`, or the
|
|
610
|
+
* trigger's exchange for the first answer. Required by the node's schema.
|
|
611
|
+
*/
|
|
612
|
+
exchangeId: string | Expr;
|
|
613
|
+
/** What to say. Markdown — the node's only supported `mimeType`. Required. */
|
|
614
|
+
content: string | Expr;
|
|
615
|
+
/**
|
|
616
|
+
* Whether this message CLOSES the exchange. The platform's legacy default is
|
|
617
|
+
* to end it; pass `false` to keep the exchange open for another message.
|
|
618
|
+
*/
|
|
619
|
+
endExchange?: boolean;
|
|
620
|
+
}
|
|
621
|
+
export interface WaitForMessageInputs {
|
|
622
|
+
/** The conversation to wait on. Required. */
|
|
623
|
+
conversationId: string | Expr;
|
|
624
|
+
/**
|
|
625
|
+
* How many past exchanges the returned context carries. 1–40 in the
|
|
626
|
+
* designer; the platform default is 20.
|
|
627
|
+
*/
|
|
628
|
+
numExchanges?: number;
|
|
629
|
+
}
|
|
630
|
+
export interface ConversationContextInputs {
|
|
631
|
+
/** The conversation to read. Required. */
|
|
632
|
+
conversationId: string | Expr;
|
|
633
|
+
/**
|
|
634
|
+
* How many exchanges to return, 1–40. The platform default is 20.
|
|
635
|
+
*/
|
|
636
|
+
exchangeLimit?: number;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* How a conversational agent gets its turn — the node's own
|
|
640
|
+
* `conversationalAgentSettings` sub-object.
|
|
641
|
+
*
|
|
642
|
+
* @remarks
|
|
643
|
+
* `'simple'` (the default) derives everything from ONE conversation-context
|
|
644
|
+
* binding: `context` is the whole context object, and the platform reads
|
|
645
|
+
* `conversationId` / `latestExchangeId` / `messages` / `userSettings` out of
|
|
646
|
+
* it. `'custom'` binds each field yourself — for a flow that assembles a turn
|
|
647
|
+
* from more than one source.
|
|
648
|
+
*/
|
|
649
|
+
export interface ConversationalAgentSettings {
|
|
650
|
+
mode?: 'simple' | 'custom';
|
|
651
|
+
/** The whole conversation context — `'simple'` mode's single binding. */
|
|
652
|
+
context?: Expr | string;
|
|
653
|
+
/** `'custom'` mode: the conversation id. */
|
|
654
|
+
conversationId?: Expr | string;
|
|
655
|
+
/** `'custom'` mode: the exchange id. */
|
|
656
|
+
exchangeId?: Expr | string;
|
|
657
|
+
/** `'custom'` mode: the chat history array. */
|
|
658
|
+
messages?: Expr | string;
|
|
659
|
+
/** `'custom'` mode: the caller's per-user settings object. */
|
|
660
|
+
userSettings?: Expr | string;
|
|
661
|
+
}
|
|
662
|
+
export interface ConversationalAgentInputs {
|
|
663
|
+
/**
|
|
664
|
+
* The agent's standing instructions for the conversation. Plain text — a
|
|
665
|
+
* conversational agent's turn comes from the transcript, not from flow
|
|
666
|
+
* arguments, so there is no `{{input.…}}` templating.
|
|
667
|
+
*/
|
|
668
|
+
systemPrompt: string;
|
|
669
|
+
/** The MODEL to run, e.g. `'gpt-5.4'`. Required by the node's definition. */
|
|
670
|
+
model: string;
|
|
671
|
+
/**
|
|
672
|
+
* How the agent gets its turn. The common case is
|
|
673
|
+
* `{ context: out('<waitStep>', 'conversationContext') }` — one binding the
|
|
674
|
+
* platform reads conversation id, exchange id, history and user settings out
|
|
675
|
+
* of. See {@link ConversationalAgentSettings}.
|
|
676
|
+
*/
|
|
677
|
+
settings: ConversationalAgentSettings;
|
|
678
|
+
/**
|
|
679
|
+
* Whether the agent's reply CLOSES the exchange. The platform's legacy
|
|
680
|
+
* default is to end it; pass `false` to keep it open for another turn.
|
|
681
|
+
*/
|
|
682
|
+
endExchange?: boolean;
|
|
683
|
+
/** Sampling temperature, 0–1. */
|
|
684
|
+
temperature?: number;
|
|
685
|
+
/** Max tokens in one response. */
|
|
686
|
+
maxTokenPerResponse?: number;
|
|
687
|
+
/** The model's own context ceiling — informational. */
|
|
688
|
+
modelMaxTokens?: number;
|
|
689
|
+
/** How many tool-calling rounds one turn may take, 1–100. */
|
|
690
|
+
maxIterations?: number;
|
|
691
|
+
/** Safety rails, the same array `inlineAgent` takes. */
|
|
692
|
+
guardrails?: AgentGuardrail[];
|
|
693
|
+
/**
|
|
694
|
+
* The agent's own directory name (a UUID) — the node carries it as `source`
|
|
695
|
+
* and the compiler writes `<source>/agent.json` beside the flow. Derived from
|
|
696
|
+
* the flow id + step name when omitted.
|
|
697
|
+
*/
|
|
698
|
+
source?: string;
|
|
699
|
+
}
|
|
700
|
+
export interface CreateOutgoingCallInputs {
|
|
701
|
+
/**
|
|
702
|
+
* The number to call FROM — a provisioned number on the tenant's telephony
|
|
703
|
+
* provider, in E.164 (`'+15551234567'`). Required.
|
|
704
|
+
*/
|
|
705
|
+
from: string | Expr;
|
|
706
|
+
/** The number to call, in E.164. Required. */
|
|
707
|
+
to: string | Expr;
|
|
708
|
+
}
|
|
709
|
+
export interface EndCallInputs {
|
|
710
|
+
/**
|
|
711
|
+
* The call to hang up — bind the `callContext` published by the incoming-call
|
|
712
|
+
* trigger (`out('start', 'callContext')`) or by `createOutgoingCall`
|
|
713
|
+
* (`out('<step>', 'callContext')`). Required.
|
|
714
|
+
*/
|
|
715
|
+
callContext: Expr | string;
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* The audio settings a voice agent speaks with.
|
|
719
|
+
*
|
|
720
|
+
* @remarks
|
|
721
|
+
* `model` is a VOICE model (a live/realtime one — not the text models
|
|
722
|
+
* `inlineAgent` takes), and `persona` is one of that model's own voices, so the
|
|
723
|
+
* two travel together. The platform's catalog today is
|
|
724
|
+
* `'gemini-3.1-flash-live-preview'` (personas Aoede, Charon, Fenrir, Kore,
|
|
725
|
+
* Leda, Orus, Puck, Zephyr) and `'gpt-realtime-2'` (alloy, ash, ballad, coral,
|
|
726
|
+
* echo, sage, shimmer, verse); omit both for the platform default.
|
|
727
|
+
*/
|
|
728
|
+
export interface VoiceSettings {
|
|
729
|
+
/** The voice model, e.g. `'gemini-3.1-flash-live-preview'`. */
|
|
730
|
+
model?: string;
|
|
731
|
+
/** One of that model's personas, e.g. `'Kore'`. */
|
|
732
|
+
persona?: string;
|
|
733
|
+
/** Sampling temperature, 0–1. */
|
|
734
|
+
temperature?: number;
|
|
735
|
+
/** Max tokens per response. */
|
|
736
|
+
maxTokens?: number;
|
|
737
|
+
/** The model's own context ceiling — informational. */
|
|
738
|
+
modelMaxTokens?: number;
|
|
739
|
+
}
|
|
740
|
+
export interface VoiceAgentInputs {
|
|
741
|
+
/**
|
|
742
|
+
* The agent's standing instructions — who it is on the call and what it must
|
|
743
|
+
* do. Use `{{input.<name>}}` placeholders for values declared in `inputs`;
|
|
744
|
+
* the caller's audio remains the conversational turn.
|
|
745
|
+
*/
|
|
746
|
+
systemPrompt: string;
|
|
747
|
+
/**
|
|
748
|
+
* Flow values made available to `systemPrompt` placeholders. Each key must
|
|
749
|
+
* be referenced as `{{input.<key>}}`; the compiler emits the node's runtime
|
|
750
|
+
* argument binding and the matching agent.json input contract together.
|
|
751
|
+
*/
|
|
752
|
+
inputs?: Record<string, unknown>;
|
|
753
|
+
/**
|
|
754
|
+
* The call to attach the agent to — the `callContext` from the incoming-call
|
|
755
|
+
* trigger or `createOutgoingCall`. Required: without it the agent has no
|
|
756
|
+
* audio channel to join.
|
|
757
|
+
*/
|
|
758
|
+
callContext: Expr | string;
|
|
759
|
+
/** How the agent sounds. Omit for the platform default voice. */
|
|
760
|
+
voice?: VoiceSettings;
|
|
761
|
+
/**
|
|
762
|
+
* How many tool-calling rounds the agent may take in one turn. The node's
|
|
763
|
+
* schema allows **1–8** — a tighter ceiling than a text agent's, because a
|
|
764
|
+
* caller is waiting.
|
|
765
|
+
*/
|
|
766
|
+
maxIterations?: number;
|
|
767
|
+
/**
|
|
768
|
+
* The agent's own directory name (a UUID) — the node carries it as `source`
|
|
769
|
+
* and the compiler writes `<source>/agent.json` beside the flow. Omit and one
|
|
770
|
+
* is derived from the flow id + step name, so a recompile is not a diff.
|
|
771
|
+
*/
|
|
772
|
+
source?: string;
|
|
773
|
+
}
|
|
774
|
+
export interface SummarizeInputs {
|
|
775
|
+
/**
|
|
776
|
+
* The document to summarize — a whole **Flow Attachment** object
|
|
777
|
+
* (`{ ID, FullName, MimeType, Metadata }`), not a path, id or URL.
|
|
778
|
+
*
|
|
779
|
+
* In practice that is a `file`-typed flow input:
|
|
780
|
+
*
|
|
781
|
+
* ```ts
|
|
782
|
+
* flow('SummarizeDemo')
|
|
783
|
+
* .input({ documentFile: types.file })
|
|
784
|
+
* .step('summarizeContract', summarize({ attachment: input('documentFile'), … }))
|
|
785
|
+
* ```
|
|
786
|
+
*
|
|
787
|
+
* `out('start', 'documentFile')` is the same value written the way the CANVAS
|
|
788
|
+
* writes it (`$vars.start.output.documentFile`, resolved through the input's
|
|
789
|
+
* `triggerNodeId` binding). Both forms run — measured on the real service —
|
|
790
|
+
* so prefer whichever the task asks for; `out('start', …)` is what a
|
|
791
|
+
* designer-made flow looks like.
|
|
792
|
+
*
|
|
793
|
+
* The service reads the file's CONTENT, and refuses one it cannot treat as a
|
|
794
|
+
* document: a PDF summarizes, a plain `.txt` comes back
|
|
795
|
+
* `[460005] … "No valid files to use for Summarization."`
|
|
796
|
+
*/
|
|
797
|
+
attachment: Expr;
|
|
798
|
+
/** What the summary should cover, e.g. `'Write a 5-bullet executive summary…'`. */
|
|
799
|
+
prompt: string | Expr;
|
|
800
|
+
/**
|
|
801
|
+
* Ask the service for per-claim citations. Each is
|
|
802
|
+
* `{ Ordinal, PageNumber, Source, Reference }` and lands in
|
|
803
|
+
* `out('<step>', 'content.Citations')`. Defaults to `false`.
|
|
804
|
+
*/
|
|
805
|
+
returnCitations?: boolean;
|
|
806
|
+
}
|
|
807
|
+
/** One column Batch Transform appends to the CSV. */
|
|
808
|
+
export interface OutputColumn {
|
|
809
|
+
/** The new column's header, e.g. `'Category'`. */
|
|
810
|
+
name: string;
|
|
811
|
+
/** What the model should put in it, e.g. `'One of: Utility, Software, Travel, Other'`. */
|
|
812
|
+
description: string;
|
|
813
|
+
}
|
|
814
|
+
export interface BatchTransformInputs {
|
|
815
|
+
/**
|
|
816
|
+
* The CSV to enrich — a whole **Flow Attachment** object, same shape and same
|
|
817
|
+
* two ways of referencing it as {@link SummarizeInputs.attachment}.
|
|
818
|
+
*/
|
|
819
|
+
attachment: Expr;
|
|
820
|
+
/** How to process each row, e.g. `'Classify each row and write a one-line summary.'`. */
|
|
821
|
+
prompt: string | Expr;
|
|
822
|
+
/**
|
|
823
|
+
* The columns to add, in order. The node's own field name — an array of
|
|
824
|
+
* `{ name, description }`, one per new column.
|
|
825
|
+
*/
|
|
826
|
+
outputColumns: OutputColumn[];
|
|
827
|
+
/** Let the model use web search while transforming. Defaults to `false`. */
|
|
828
|
+
enableWebSearchGrounding?: boolean;
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Split an extractor's node type into the two GUIDs its tail packs.
|
|
832
|
+
*
|
|
833
|
+
* `uipath.ixp.<projectSlug>.<projectVersionId>-<folderKey>` — the version id is
|
|
834
|
+
* the `ixpDeployment` binding's `resourceKey` and the node's `model.id`; the
|
|
835
|
+
* folder key is `inputs.folderKey`. Returns `undefined` for a tail that is not
|
|
836
|
+
* exactly two uuids joined by `-`, which is how the two older spellings (a
|
|
837
|
+
* sanitized folder path, and the literal string `undefined`) are refused rather
|
|
838
|
+
* than mis-split.
|
|
839
|
+
*
|
|
840
|
+
* @internal Public for compatibility; not an authoring factory.
|
|
841
|
+
*/
|
|
842
|
+
export declare function parseIxpProjectType(nodeType: string): {
|
|
843
|
+
slug: string;
|
|
844
|
+
versionId: string;
|
|
845
|
+
folderKey: string;
|
|
846
|
+
} | undefined;
|
|
847
|
+
export interface IxpExtractInputs {
|
|
848
|
+
/**
|
|
849
|
+
* The extractor's node type, verbatim from
|
|
850
|
+
* `uip maestro flow registry search -f "type:startsWith=uipath.ixp"` — e.g.
|
|
851
|
+
* `'uipath.ixp.invoiceixp-cef0d447-ixp.ff973488-5d89-8035-86ac-f980b4be6deb-c4359cde-55f0-4f0e-9322-c6cdce74ab4c'`.
|
|
852
|
+
*
|
|
853
|
+
* **Run `uip maestro flow registry pull --force` first.** `registry search`
|
|
854
|
+
* and `registry get` answer from a local cache (`~/.uipath/nodes/`), so
|
|
855
|
+
* without a pull you are reading whenever you last synced.
|
|
856
|
+
*
|
|
857
|
+
* Two GUIDs are packed in that tail — the project **version** id and the
|
|
858
|
+
* **folder** key — and both are read back out of it here, which is why
|
|
859
|
+
* nothing else has to be passed twice.
|
|
860
|
+
*/
|
|
861
|
+
project: string;
|
|
862
|
+
/**
|
|
863
|
+
* The project's own name, as the tenant spells it — the slug, e.g.
|
|
864
|
+
* `'idp-benchmark---invoices-c735405a-ixp'`. It is
|
|
865
|
+
* `inputDefaults.modelName` in `registry get`, and the node carries it as
|
|
866
|
+
* both `modelName` and `projectName` (one value, two fields — the designer
|
|
867
|
+
* shows it in two disabled boxes).
|
|
868
|
+
*
|
|
869
|
+
* It cannot be recovered from {@link IxpExtractInputs.project}: the node type's slug is
|
|
870
|
+
* lower-cased and de-punctuated (`---` collapses to `-`), which does not
|
|
871
|
+
* invert.
|
|
872
|
+
*/
|
|
873
|
+
modelName: string;
|
|
874
|
+
/**
|
|
875
|
+
* The deployment's display name, e.g. `'InvoiceIXP'` —
|
|
876
|
+
* `inputDefaults.model.modelDisplayName`. It becomes the node's
|
|
877
|
+
* `model.modelDisplayName` and the `ixpDeployment` binding's `name`.
|
|
878
|
+
*/
|
|
879
|
+
name: string;
|
|
880
|
+
/**
|
|
881
|
+
* The folder the project is published in, e.g. `'Shared'` or
|
|
882
|
+
* `'Shared/uipath-maestro-flow/BillingDispute'` —
|
|
883
|
+
* `inputDefaults.folderName`. It becomes the binding's `folderPath` default
|
|
884
|
+
* and the definition's own `description`.
|
|
885
|
+
*/
|
|
886
|
+
folderName: string;
|
|
887
|
+
/**
|
|
888
|
+
* The document to extract from — a whole **Flow Attachment** object, the same
|
|
889
|
+
* shape and the same two ways of referencing it as
|
|
890
|
+
* {@link SummarizeInputs.attachment}:
|
|
891
|
+
*
|
|
892
|
+
* ```ts
|
|
893
|
+
* flow('InvoiceIntake')
|
|
894
|
+
* .input({ invoiceFile: types.file })
|
|
895
|
+
* .step('extract', ixpExtract({ …, fileRef: out('start', 'invoiceFile') }))
|
|
896
|
+
* ```
|
|
897
|
+
*
|
|
898
|
+
* It is the node's only authored input, and the definition marks it
|
|
899
|
+
* `required` (with `modelName` and `folderKey`, which this factory fills in).
|
|
900
|
+
*/
|
|
901
|
+
fileRef: Expr;
|
|
902
|
+
/** Pages to process, e.g. `'1-5'`. Empty (the default) means the whole document. */
|
|
903
|
+
pageRange?: string;
|
|
904
|
+
/** Pin a published version tag. Empty (the default) means the latest. */
|
|
905
|
+
versionTag?: string;
|
|
906
|
+
/**
|
|
907
|
+
* The folder's key CHAIN, when the project lives in a nested folder —
|
|
908
|
+
* `inputDefaults.model.folderPath`, a dot-joined path of ancestor folder keys
|
|
909
|
+
* (`<root>.<parent>.<folder>`). Defaults to the folder key alone, which is
|
|
910
|
+
* what the platform writes for a project published straight into `Shared`.
|
|
911
|
+
*/
|
|
912
|
+
folderPath?: string;
|
|
913
|
+
/**
|
|
914
|
+
* A free-text note on the node. Off by default, deliberately: the definition
|
|
915
|
+
* does not declare it (so setting it draws a "sets an input its type does not
|
|
916
|
+
* declare" warning unless the emitted definition is widened in the same
|
|
917
|
+
* write, which this does), and it is empty in 114 of the 117 deployed nodes
|
|
918
|
+
* that carry it at all.
|
|
919
|
+
*/
|
|
920
|
+
description?: string;
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* The twelve durations the designer's dropdown offers. Purely an ENCODING
|
|
924
|
+
* detail: a duration in this list ships as `timerPreset: '<duration>'` and any
|
|
925
|
+
* other ships as `timerPreset: 'custom'` + `timerValue: '<duration>'`. Both
|
|
926
|
+
* deploy and both wait the same length of time — the author never picks.
|
|
927
|
+
* `core-definitions.test.ts` pins this list against the definition's own form.
|
|
928
|
+
*/
|
|
929
|
+
export declare const DELAY_PRESETS: readonly ["PT5S", "PT15S", "PT30S", "PT1M", "PT5M", "PT15M", "PT30M", "PT1H", "PT6H", "PT12H", "P1D", "P1W"];
|
|
930
|
+
export type DelayInputs = {
|
|
931
|
+
/**
|
|
932
|
+
* How long to wait, as an ISO-8601 duration: `PT30S`, `PT15M`, `PT2H`,
|
|
933
|
+
* `P1D`, `P1W`. `PT` separates the time part, so `P1M` is a MONTH and
|
|
934
|
+
* `PT1M` is a minute.
|
|
935
|
+
* ISO-8601 duration format documentation is here:
|
|
936
|
+
* {@link https://docs.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm}
|
|
937
|
+
*/
|
|
938
|
+
duration: string;
|
|
939
|
+
/** Impossible together with `duration` — a delay waits one way or the other. */
|
|
940
|
+
until?: never;
|
|
941
|
+
} | {
|
|
942
|
+
/**
|
|
943
|
+
* Wait until an ABSOLUTE date-time, ISO-8601: `2026-09-01T09:00:00Z` or
|
|
944
|
+
* `2026-09-01T09:00:00+02:00`. The platform's timeDate timer: the run
|
|
945
|
+
* parks until the wall clock reaches this moment (already-past dates
|
|
946
|
+
* fire immediately).
|
|
947
|
+
*/
|
|
948
|
+
until: string;
|
|
949
|
+
/** Impossible together with `until` — a delay waits one way or the other. */
|
|
950
|
+
duration?: never;
|
|
951
|
+
};
|
|
952
|
+
export interface RpaWorkflowInputs {
|
|
953
|
+
/**
|
|
954
|
+
* The published process's release key (a GUID). It becomes part of the node's
|
|
955
|
+
* type, `uipath.core.rpa-workflow.<key>`. Find it with
|
|
956
|
+
* `uip or processes list --all-folders --process-type Process` (the row's `Key`)
|
|
957
|
+
* or `uip maestro flow registry search "uipath.core.rpa-workflow"`.
|
|
958
|
+
*/
|
|
959
|
+
key: string;
|
|
960
|
+
/** The process's name in Orchestrator — e.g. `'RPA Workflow'`. */
|
|
961
|
+
name: string;
|
|
962
|
+
/**
|
|
963
|
+
* The Orchestrator folder holding the process — e.g.
|
|
964
|
+
* `'Shared/uipath-maestro-flow/ProjectEuler RPA'`.
|
|
965
|
+
*/
|
|
966
|
+
folderPath: string;
|
|
967
|
+
/**
|
|
968
|
+
* The PROCESS's own input arguments, by its own argument names (e.g.
|
|
969
|
+
* `{ problemId: 123 }`). Not a fixed schema — every process declares its own,
|
|
970
|
+
* and only the deployed process knows them.
|
|
971
|
+
*/
|
|
972
|
+
inputs?: Record<string, unknown>;
|
|
973
|
+
/**
|
|
974
|
+
* The process's OUTPUT arguments — the fields it returns, and their types
|
|
975
|
+
* (e.g. `{ title: 'string' }`). Required if anything reads the step's output.
|
|
976
|
+
*
|
|
977
|
+
* Why you have to say: the process's output schema lives on the tenant, and
|
|
978
|
+
* authoring happens offline. Without it `$vars.<step>.output.<field>` reads
|
|
979
|
+
* from an object with no declared fields, and nothing could tell a real field
|
|
980
|
+
* from a typo. Declaring
|
|
981
|
+
* the fields here is the same thing the platform's own definition does when it
|
|
982
|
+
* can reach the process, and it is what lets a misspelled read be caught at
|
|
983
|
+
* `uip maestro flow check` instead of at run time.
|
|
984
|
+
*/
|
|
985
|
+
returns?: Record<string, ReturnFieldType>;
|
|
986
|
+
}
|
|
987
|
+
export interface ApiWorkflowInputs {
|
|
988
|
+
/**
|
|
989
|
+
* The published API workflow's key (a GUID). It becomes part of the node's
|
|
990
|
+
* type, `uipath.core.api-workflow.<key>`. Find it with
|
|
991
|
+
* `uip or processes list --all-folders --process-type Api` (an API workflow's
|
|
992
|
+
* `ProcessKey` reads `<name>.api.<name>`; the GUID you want is the row's `Key`)
|
|
993
|
+
* or `uip maestro flow registry search`.
|
|
994
|
+
*/
|
|
995
|
+
key: string;
|
|
996
|
+
/** The workflow's name in Orchestrator — e.g. `'NameToAgeFixed'`. */
|
|
997
|
+
name: string;
|
|
998
|
+
/** The Orchestrator folder holding it — e.g. `'Shared'`. */
|
|
999
|
+
folderPath: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* The WORKFLOW's own input arguments, by its own argument names (e.g.
|
|
1002
|
+
* `{ name: 'tomasz' }`). Not a fixed schema — every workflow declares its own.
|
|
1003
|
+
*/
|
|
1004
|
+
inputs?: Record<string, unknown>;
|
|
1005
|
+
/**
|
|
1006
|
+
* The workflow's OUTPUT arguments — the fields it returns, and their types
|
|
1007
|
+
* (e.g. `{ EstimatedAge: 'integer' }`). Required if anything reads the step's
|
|
1008
|
+
* output, for the same reason as `rpaWorkflow`'s: the schema lives on the
|
|
1009
|
+
* tenant and authoring happens offline, so an undeclared read is rejected.
|
|
1010
|
+
*
|
|
1011
|
+
* `'integer'` is what makes the replay fixture a number rather than a string;
|
|
1012
|
+
* see {@link ReturnFieldType} for why the vocabulary carries it.
|
|
1013
|
+
*
|
|
1014
|
+
* @enforcedBy APIWF_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
1015
|
+
* declaring it here.
|
|
1016
|
+
*/
|
|
1017
|
+
returns?: Record<string, ReturnFieldType>;
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* A published Orchestrator **Function** — a small, single-purpose unit of code
|
|
1021
|
+
* deployed as its own resource and invoked as one step
|
|
1022
|
+
* (`Orchestrator.ExecuteFunctionAsync`). Same published-resource shape as
|
|
1023
|
+
* {@link ApiWorkflowInputs}; what differs is the family and the folder.
|
|
1024
|
+
*/
|
|
1025
|
+
export interface PublishedFunctionInputs {
|
|
1026
|
+
/**
|
|
1027
|
+
* The function's key (a GUID) — it becomes part of the node's type,
|
|
1028
|
+
* `uipath.core.function.<key>`. Find it with
|
|
1029
|
+
* `uip maestro flow registry search "uipath.core.function"` (after
|
|
1030
|
+
* `registry pull --force`) or the Orchestrator process listing.
|
|
1031
|
+
*/
|
|
1032
|
+
key: string;
|
|
1033
|
+
/** The function's name in Orchestrator, e.g. `'acme-echo'`. */
|
|
1034
|
+
name: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* The Orchestrator folder holding it. A function is usually deployed into a
|
|
1037
|
+
* folder of its OWN name (e.g. `'Shared/acme-echo'`), and the binding's
|
|
1038
|
+
* `resourceKey` is `<folderPath>.<name>` — copy the folder from the tenant
|
|
1039
|
+
* rather than assuming `'Shared'`.
|
|
1040
|
+
*/
|
|
1041
|
+
folderPath: string;
|
|
1042
|
+
/** The function's own input arguments, by its own names. */
|
|
1043
|
+
inputs?: Record<string, unknown>;
|
|
1044
|
+
/**
|
|
1045
|
+
* The function's OUTPUT arguments — the fields it returns, and their types.
|
|
1046
|
+
* Required if anything reads the step's output: the schema lives on the
|
|
1047
|
+
* tenant and authoring is offline, so an undeclared read is rejected.
|
|
1048
|
+
*
|
|
1049
|
+
* @enforcedBy FUNCTION_READ_WITHOUT_RETURNS Reading a field off the result
|
|
1050
|
+
* requires declaring it here.
|
|
1051
|
+
*/
|
|
1052
|
+
returns?: Record<string, ReturnFieldType>;
|
|
1053
|
+
}
|
|
1054
|
+
interface AgenticProcessInputsBase {
|
|
1055
|
+
/**
|
|
1056
|
+
* The published agentic process's key (a GUID). It becomes part of the node's
|
|
1057
|
+
* type, `uipath.core.agentic-process.<key>`. Find it with
|
|
1058
|
+
* `uip or processes list --all-folders --process-type ProcessOrchestration` (an
|
|
1059
|
+
* agentic process's `ProcessKey` reads `<name>.agentic.<name>`; the GUID you want
|
|
1060
|
+
* is the row's `Key`) or `uip maestro flow registry search agentic`.
|
|
1061
|
+
*
|
|
1062
|
+
* `--all-folders` PAGINATES at 50 rows and says so in `Pagination.HasMore` — pass
|
|
1063
|
+
* `--limit`/`--offset`, or scope the call with `--folder-path`, or a process that
|
|
1064
|
+
* exists will look as though it does not.
|
|
1065
|
+
*/
|
|
1066
|
+
key: string;
|
|
1067
|
+
/** The process's name in Orchestrator — e.g. `'ProcurementProcess'`. */
|
|
1068
|
+
name: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* The Orchestrator folder holding it — e.g.
|
|
1071
|
+
* `'Shared/uipath-agents/ProcurementProcess'`.
|
|
1072
|
+
*/
|
|
1073
|
+
folderPath: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* The PROCESS's own input arguments, by its own argument names (e.g.
|
|
1076
|
+
* `{ productId: 1 }`). Not a fixed schema — every agentic process declares its
|
|
1077
|
+
* own, and only the deployed process knows them.
|
|
1078
|
+
*/
|
|
1079
|
+
inputs?: Record<string, unknown>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Which published form this Agentic Process is: the three forms
|
|
1082
|
+
* share one public concept and differ only in wire identity. `'bpmn'` (the
|
|
1083
|
+
* default, and what this factory always emitted) is a Maestro BPMN process
|
|
1084
|
+
* orchestration; `'flow'` is a published Maestro Flow; `'case'` is a Case
|
|
1085
|
+
* Management process.
|
|
1086
|
+
*/
|
|
1087
|
+
form?: 'bpmn' | 'flow' | 'case';
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Whether an Agentic Process step waits for the process's result.
|
|
1091
|
+
* The discriminated union makes `returns` impossible to declare in the
|
|
1092
|
+
* fire-and-forget form: an async dispatch publishes no output, so nothing
|
|
1093
|
+
* downstream may read one.
|
|
1094
|
+
*/
|
|
1095
|
+
export type AgenticProcessCompletion = {
|
|
1096
|
+
/** Wait for the process and publish its outputs (the default). */
|
|
1097
|
+
completion?: 'wait';
|
|
1098
|
+
/**
|
|
1099
|
+
* The process's OUTPUT arguments — the fields it returns, and their types (e.g.
|
|
1100
|
+
* `{ status: 'boolean' }`). Required if anything reads the step's output, for the
|
|
1101
|
+
* same reason as `rpaWorkflow`'s and `apiWorkflow`'s: the schema lives on the
|
|
1102
|
+
* tenant and authoring happens offline, so an undeclared read is rejected.
|
|
1103
|
+
*
|
|
1104
|
+
* `uip maestro flow registry get uipath.core.agentic-process.<process>` shows what
|
|
1105
|
+
* the platform synthesizes, under `outputDefinition.output.schema.properties`.
|
|
1106
|
+
*
|
|
1107
|
+
* Worth knowing before you assert on a value: a process can DECLARE a field and
|
|
1108
|
+
* still leave it empty. `Shared/uipath-agents/ProcurementProcess` declares
|
|
1109
|
+
* `{status: boolean}` and every job returns `{"status": null}` (measured
|
|
1110
|
+
* 2026-07-29, four jobs) — the field arrives, the value does not.
|
|
1111
|
+
*
|
|
1112
|
+
* @enforcedBy AGENTIC_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
1113
|
+
* declaring it here.
|
|
1114
|
+
*/
|
|
1115
|
+
returns?: Record<string, ReturnFieldType>;
|
|
1116
|
+
} | {
|
|
1117
|
+
/**
|
|
1118
|
+
* Dispatch the process and continue immediately — the platform's
|
|
1119
|
+
* fire-and-forget switch. The node keeps only its `error` output (dispatch
|
|
1120
|
+
* failures still route), and `check` rejects any read of the step's result.
|
|
1121
|
+
* A local replay treats this as dispatch-only: it never fabricates the
|
|
1122
|
+
* output a real run would not publish.
|
|
1123
|
+
*/
|
|
1124
|
+
completion: 'fire-and-forget';
|
|
1125
|
+
/** Impossible by design: an async dispatch publishes no output. */
|
|
1126
|
+
returns?: never;
|
|
1127
|
+
};
|
|
1128
|
+
/** What `agenticProcess()` takes: the shared fields plus the completion policy. */
|
|
1129
|
+
export type AgenticProcessInputs = AgenticProcessInputsBase & AgenticProcessCompletion;
|
|
1130
|
+
/**
|
|
1131
|
+
* Which KIND of agent project was published behind a `uipath.core.agent.<key>`
|
|
1132
|
+
* resource. Display-only — see {@link AgentInputs.flavour}.
|
|
1133
|
+
*/
|
|
1134
|
+
export type AgentFlavour = 'coded' | 'lowcode';
|
|
1135
|
+
export type AgentLocation = 'published' | 'in-solution';
|
|
1136
|
+
export interface AgentInputs {
|
|
1137
|
+
/**
|
|
1138
|
+
* The agent resource key (a GUID). It becomes the node's TYPE,
|
|
1139
|
+
* `uipath.core.agent.<key>`. For a published agent this is the Orchestrator
|
|
1140
|
+
* release key; for an in-solution sibling it is `resource.key` from
|
|
1141
|
+
* `resources/solution_folder/process/agent/<project>.json`.
|
|
1142
|
+
*
|
|
1143
|
+
* Find it with `uip or processes list --all-folders --process-type Agent` (an agent's
|
|
1144
|
+
* `ProcessKey` reads `<project>.agent.<name>`; the GUID you want is the row's
|
|
1145
|
+
* **`Key`**) or `uip maestro flow registry search uipath.core.agent`.
|
|
1146
|
+
*
|
|
1147
|
+
* Pass `--limit`: `--all-folders` returns 50 rows and reports the truncation
|
|
1148
|
+
* only in `Pagination.HasMore`, so an agent that exists can look absent.
|
|
1149
|
+
*/
|
|
1150
|
+
key: string;
|
|
1151
|
+
/** The agent project name. */
|
|
1152
|
+
name: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* Where the referenced agent lives. Published is the backward-compatible
|
|
1155
|
+
* default. Use `in-solution` only after registering a sibling agent project
|
|
1156
|
+
* with `uip solution projects add`.
|
|
1157
|
+
*/
|
|
1158
|
+
location?: AgentLocation;
|
|
1159
|
+
/**
|
|
1160
|
+
* The Orchestrator folder holding it — e.g.
|
|
1161
|
+
* `'Shared/uipath-maestro-flow/CountLetters LowCode'`.
|
|
1162
|
+
*
|
|
1163
|
+
* **Not optional, and not cosmetic.** Agent names are unique per FOLDER, not per
|
|
1164
|
+
* tenant: `codereval/DefaultTenant` carries two agents called `CountLetters`,
|
|
1165
|
+
* one in `Shared` and one in `Shared/uipath-maestro-flow/CountLetters CodedAgent`,
|
|
1166
|
+
* with different release keys. The release is resolved by listing THIS
|
|
1167
|
+
* folder, so the folder is what picks the agent you meant. Required for a
|
|
1168
|
+
* published agent; omit it for an in-solution sibling.
|
|
1169
|
+
*/
|
|
1170
|
+
folderPath?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* The sibling agent project's `resource.projectKey`, read from
|
|
1173
|
+
* `resources/solution_folder/process/agent/<project>.json`. Required only
|
|
1174
|
+
* when `location` is `in-solution`.
|
|
1175
|
+
*/
|
|
1176
|
+
projectId?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* The AGENT's own input arguments, by its own argument names (e.g.
|
|
1179
|
+
* `{ inputString: 'arrow' }`). Every agent declares its own — read them from
|
|
1180
|
+
* `uip maestro flow registry get uipath.core.agent.<agent>` under
|
|
1181
|
+
* `inputDefinition.properties`.
|
|
1182
|
+
*
|
|
1183
|
+
* **Required, unlike the other job families' `inputs`.** An agent node with
|
|
1184
|
+
* nothing bound is one the platform REWRITES behind your back: flow-v1's
|
|
1185
|
+
* `applyEmptyInputFloor` seeds `JobArguments: { input: <empty-for-declared-type> }`
|
|
1186
|
+
* — a key named `input`, which is not in the agent's own schema unless the agent
|
|
1187
|
+
* happens to declare one — because the Python agent runner validates the body
|
|
1188
|
+
* against a schema with a required `input` field and rejects a bare `{}` with
|
|
1189
|
+
* *"Field required: input"* (the pod then exits `0x33`). Locally the envelope
|
|
1190
|
+
* passes straight through and the run is green, so nothing but a checker can see
|
|
1191
|
+
* it. Pass `{}` explicitly if you really mean "no arguments" and `check` will
|
|
1192
|
+
* tell you what the platform will do with it.
|
|
1193
|
+
*/
|
|
1194
|
+
inputs: Record<string, unknown>;
|
|
1195
|
+
/**
|
|
1196
|
+
* The agent's OUTPUT fields and their types (e.g.
|
|
1197
|
+
* `{ count: 'integer', inputString: 'string' }`). Required if anything reads the
|
|
1198
|
+
* step's output, for the same reason as `rpaWorkflow`'s: the schema lives on the
|
|
1199
|
+
* tenant and authoring happens offline, so an undeclared read is rejected —
|
|
1200
|
+
* rightly, since nothing offline could tell a real field from a typo.
|
|
1201
|
+
*
|
|
1202
|
+
* `uip maestro flow registry get uipath.core.agent.<agent>` shows what the
|
|
1203
|
+
* platform declares, under `outputDefinition.output.schema.properties`.
|
|
1204
|
+
*
|
|
1205
|
+
* **Case matters.** The agent answers with the field names its own definition
|
|
1206
|
+
* declares (`count`, not `Count`). It used to be a live-only trap: a poller that
|
|
1207
|
+
* read the job through `uip agent run status` got a PascalCased envelope, so a
|
|
1208
|
+
* read of `count` was right offline and `undefined` live (flow-builder-sdk #122).
|
|
1209
|
+
* Declare the names the definition declares.
|
|
1210
|
+
*
|
|
1211
|
+
* @enforcedBy AGENT_READ_WITHOUT_RETURNS Reading a field off the result requires
|
|
1212
|
+
* declaring it here.
|
|
1213
|
+
*/
|
|
1214
|
+
returns?: Record<string, ReturnFieldType>;
|
|
1215
|
+
/**
|
|
1216
|
+
* Whether the published resource is a CODED agent project (LangGraph /
|
|
1217
|
+
* LlamaIndex / OpenAI Agents) or a low-code one built in Agent Builder.
|
|
1218
|
+
*
|
|
1219
|
+
* **Display-only, and it is the only thing that differs.** `registry get` on a
|
|
1220
|
+
* coded and a low-code agent returns the same node type, the same
|
|
1221
|
+
* `Orchestrator.StartAgentJob` service type, the same `sortOrder: 505` and the
|
|
1222
|
+
* same bindings shape; the single difference is `display.icon` —
|
|
1223
|
+
* `coded-agent` vs `autonomous-agent`. Which one a given resource is cannot be
|
|
1224
|
+
* known offline, so it is stated here rather than guessed. Check with
|
|
1225
|
+
* `uip maestro flow registry get uipath.core.agent.<agent>` → `display.icon`.
|
|
1226
|
+
*
|
|
1227
|
+
* Defaults to `'lowcode'`. Nothing in the runtime keys on it.
|
|
1228
|
+
*/
|
|
1229
|
+
flavour?: AgentFlavour;
|
|
1230
|
+
}
|
|
1231
|
+
/** A JSON-schema-ish type for one field of an inline agent's input/output schema. */
|
|
1232
|
+
export type InlineAgentFieldType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array';
|
|
1233
|
+
/**
|
|
1234
|
+
* A JSON-schema-ish type for one field of a step's declared `returns`.
|
|
1235
|
+
*
|
|
1236
|
+
* Every `returns` map is transcribed from — or lowered into — a JSON Schema
|
|
1237
|
+
* `properties.<field>.type`, so the vocabulary is JSON Schema's, and it is the
|
|
1238
|
+
* same at every call site. `'integer'` belongs to it because the platform's own
|
|
1239
|
+
* synthesized definitions use it: `registry get` on a deployed API workflow
|
|
1240
|
+
* returns `properties.EstimatedAge.type: 'integer'`, and Orchestrator does the
|
|
1241
|
+
* same for an `Int32`/`Int64` output argument on an RPA process.
|
|
1242
|
+
*
|
|
1243
|
+
* This type exists so that stays true. It was previously spelled inline at
|
|
1244
|
+
* seven sites, `'integer'` was added to three of them, and the four left behind
|
|
1245
|
+
* were not distinguishable by any contract — `rpaWorkflow` in particular is
|
|
1246
|
+
* decompiled by the SAME line of `emitPublishedResource` as `apiWorkflow`, so a
|
|
1247
|
+
* deployed process with an integer output round-tripped to source that would
|
|
1248
|
+
* not compile.
|
|
1249
|
+
*/
|
|
1250
|
+
export type ReturnFieldType = InlineAgentFieldType;
|
|
1251
|
+
/** Where a guardrail applies: the whole agent, its LLM calls, or its tools. */
|
|
1252
|
+
export type GuardrailScope = 'Agent' | 'Llm' | 'Tool';
|
|
1253
|
+
/** Which artifacts inside the scope the guardrail watches. */
|
|
1254
|
+
export interface GuardrailSelector {
|
|
1255
|
+
scopes: GuardrailScope[];
|
|
1256
|
+
/** Restrict to named tools/models; omit for all in scope. */
|
|
1257
|
+
matchNames?: string[];
|
|
1258
|
+
}
|
|
1259
|
+
/** A field the rule or filter action points at. */
|
|
1260
|
+
export interface GuardrailFieldReference {
|
|
1261
|
+
path: string;
|
|
1262
|
+
source: 'input' | 'output';
|
|
1263
|
+
title?: string;
|
|
1264
|
+
}
|
|
1265
|
+
/** All fields, or a named few. */
|
|
1266
|
+
export type GuardrailFieldSelector = {
|
|
1267
|
+
$selectorType: 'all';
|
|
1268
|
+
} | {
|
|
1269
|
+
$selectorType: 'specific';
|
|
1270
|
+
fields: GuardrailFieldReference[];
|
|
1271
|
+
};
|
|
1272
|
+
/** One condition of a custom guardrail. */
|
|
1273
|
+
export type GuardrailRule = {
|
|
1274
|
+
$ruleType: 'word';
|
|
1275
|
+
fieldSelector: GuardrailFieldSelector;
|
|
1276
|
+
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'doesNotStartWith' | 'endsWith' | 'doesNotEndWith' | 'isEmpty' | 'isNotEmpty' | 'matchesRegex';
|
|
1277
|
+
value?: string;
|
|
1278
|
+
} | {
|
|
1279
|
+
$ruleType: 'number';
|
|
1280
|
+
fieldSelector: GuardrailFieldSelector;
|
|
1281
|
+
operator: 'equals' | 'doesNotEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual';
|
|
1282
|
+
value: number;
|
|
1283
|
+
} | {
|
|
1284
|
+
$ruleType: 'boolean';
|
|
1285
|
+
fieldSelector: GuardrailFieldSelector;
|
|
1286
|
+
operator: 'equals';
|
|
1287
|
+
value: boolean;
|
|
1288
|
+
} | {
|
|
1289
|
+
$ruleType: 'always';
|
|
1290
|
+
applyTo: 'input' | 'output' | 'inputAndOutput';
|
|
1291
|
+
};
|
|
1292
|
+
/** What happens when a guardrail trips. */
|
|
1293
|
+
export type GuardrailAction = {
|
|
1294
|
+
$actionType: 'block';
|
|
1295
|
+
reason: string;
|
|
1296
|
+
} | {
|
|
1297
|
+
$actionType: 'filter';
|
|
1298
|
+
fields: GuardrailFieldReference[];
|
|
1299
|
+
} | {
|
|
1300
|
+
$actionType: 'log';
|
|
1301
|
+
severityLevel: 'Info' | 'Warning' | 'Error';
|
|
1302
|
+
};
|
|
1303
|
+
/** A rule-based guardrail you author in place. */
|
|
1304
|
+
export interface CustomGuardrail {
|
|
1305
|
+
/** Stable id — yours; unique within the agent. */
|
|
1306
|
+
id: string;
|
|
1307
|
+
$guardrailType: 'custom';
|
|
1308
|
+
name: string;
|
|
1309
|
+
description?: string;
|
|
1310
|
+
selector: GuardrailSelector;
|
|
1311
|
+
action: GuardrailAction;
|
|
1312
|
+
/** Also apply the guardrail when the agent runs under evals. */
|
|
1313
|
+
enabledForEvals: boolean;
|
|
1314
|
+
rules: GuardrailRule[];
|
|
1315
|
+
}
|
|
1316
|
+
/** A platform-shipped validator, configured by parameters. */
|
|
1317
|
+
export interface BuiltInValidatorGuardrail {
|
|
1318
|
+
/** Stable id — yours; unique within the agent. */
|
|
1319
|
+
id: string;
|
|
1320
|
+
$guardrailType: 'builtInValidator';
|
|
1321
|
+
name: string;
|
|
1322
|
+
description?: string;
|
|
1323
|
+
selector: GuardrailSelector;
|
|
1324
|
+
action: GuardrailAction;
|
|
1325
|
+
enabledForEvals: boolean;
|
|
1326
|
+
/** The validator's platform id, e.g. a PII or jailbreak detector. */
|
|
1327
|
+
validatorType: string;
|
|
1328
|
+
validatorParameters: Array<{
|
|
1329
|
+
$parameterType: 'enum-list';
|
|
1330
|
+
id: string;
|
|
1331
|
+
value: string[];
|
|
1332
|
+
} | {
|
|
1333
|
+
$parameterType: 'map-enum';
|
|
1334
|
+
id: string;
|
|
1335
|
+
value: Record<string, number>;
|
|
1336
|
+
} | {
|
|
1337
|
+
$parameterType: 'number';
|
|
1338
|
+
id: string;
|
|
1339
|
+
value: number;
|
|
1340
|
+
} | {
|
|
1341
|
+
$parameterType: 'text';
|
|
1342
|
+
id: string;
|
|
1343
|
+
value: string;
|
|
1344
|
+
} | {
|
|
1345
|
+
$parameterType: 'enum';
|
|
1346
|
+
id: string;
|
|
1347
|
+
value: string;
|
|
1348
|
+
} | {
|
|
1349
|
+
$parameterType: 'text-list';
|
|
1350
|
+
id: string;
|
|
1351
|
+
value: string[];
|
|
1352
|
+
} | {
|
|
1353
|
+
$parameterType: 'boolean';
|
|
1354
|
+
id: string;
|
|
1355
|
+
value: boolean;
|
|
1356
|
+
}>;
|
|
1357
|
+
}
|
|
1358
|
+
export type AgentGuardrail = CustomGuardrail | BuiltInValidatorGuardrail;
|
|
1359
|
+
export interface InlineAgentInputs {
|
|
1360
|
+
/**
|
|
1361
|
+
* The MODEL to run, e.g. `'gpt-5.4'`. Required by the node's definition, and
|
|
1362
|
+
* worth a thought rather than a default: the platform's own scaffold ships
|
|
1363
|
+
* `gpt-4o-2024-11-20`, which is stale, and v1's own smoke check for this node
|
|
1364
|
+
* type FAILS a flow that keeps it. List what the tenant has with
|
|
1365
|
+
* `uip agent model list`.
|
|
1366
|
+
*/
|
|
1367
|
+
model: string;
|
|
1368
|
+
/**
|
|
1369
|
+
* The agent's standing instructions — who it is and what it must return.
|
|
1370
|
+
* Required by the definition (`minLength: 1`).
|
|
1371
|
+
*
|
|
1372
|
+
* **Write it as plain text, and reference a value as `{{input.<name>}}`** — the
|
|
1373
|
+
* agent's own template syntax, and the same names `inputs` declares:
|
|
1374
|
+
*
|
|
1375
|
+
* ```ts
|
|
1376
|
+
* systemPrompt: 'You classify support email. Return ONLY {"category","priority"}.',
|
|
1377
|
+
* userPrompt: 'Classify this email:\n{{input.body}}',
|
|
1378
|
+
* inputs: { body: input('body') },
|
|
1379
|
+
* ```
|
|
1380
|
+
*
|
|
1381
|
+
* Why a placeholder rather than an interpolated expression: an inline agent is two
|
|
1382
|
+
* artifacts, and its prompt exists in THREE dialects. You write one; the compiler
|
|
1383
|
+
* emits the other two.
|
|
1384
|
+
*
|
|
1385
|
+
* 1. yours `{{input.claim}}`
|
|
1386
|
+
* 2. the NODE's `=js:$vars.prepare.output.claimRef` ← what the platform SCANS
|
|
1387
|
+
* 3. the AGENT.JSON `{{input.prepare__output__claimRef}}` ← what the runtime SENDS
|
|
1388
|
+
*
|
|
1389
|
+
* The third exists because the platform does not send an agent the names you
|
|
1390
|
+
* declared: it scans the node's prompts for `$vars.*` references and names each
|
|
1391
|
+
* argument after the reference PATH, `__`-joined. For a flow input the two
|
|
1392
|
+
* coincide (`$vars.notes` → `notes`); for a step output they do not, and a sidecar
|
|
1393
|
+
* still saying `{{input.claim}}` templates against a key that is not there — the
|
|
1394
|
+
* literal text reaches the model. See `skill/references/inline-agent.md`
|
|
1395
|
+
* §"The three prompt DIALECTS".
|
|
1396
|
+
*
|
|
1397
|
+
* If the agent has to answer in a shape the flow then reads, say so here. The
|
|
1398
|
+
* `returns` keys are what a downstream `out(...)` reads, and the engine's own live
|
|
1399
|
+
* path appends a "return ONLY a JSON object with exactly these keys" directive for
|
|
1400
|
+
* the same reason — a system prompt that contradicts it is a fight the model may
|
|
1401
|
+
* lose.
|
|
1402
|
+
*/
|
|
1403
|
+
systemPrompt: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* The per-run request. Required by the definition (`minLength: 1`). Same
|
|
1406
|
+
* `{{input.<name>}}` placeholders as `systemPrompt`.
|
|
1407
|
+
*/
|
|
1408
|
+
userPrompt: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* The values the agent gets, by YOUR name for each one — e.g.
|
|
1411
|
+
* `{ body: input('body') }`. These become the node's `agentInputVariables`
|
|
1412
|
+
* descriptor array (`{ id, type, binding }`, the shape 48 of 53 deployed instances
|
|
1413
|
+
* carry) and the `agent.json`'s `inputSchema`.
|
|
1414
|
+
*
|
|
1415
|
+
* **The name is yours only in this file.** Both emitted artifacts carry the
|
|
1416
|
+
* PLATFORM's name — the bound reference's path, `__`-joined
|
|
1417
|
+
* (`out('prepare','claimRef')` → `prepare__output__claimRef`) — because that is what
|
|
1418
|
+
* the runtime keys the agent's JobArguments by, and an `agent.json` speaking any
|
|
1419
|
+
* other name templates against nothing. You never write the long form.
|
|
1420
|
+
*
|
|
1421
|
+
* **Reference each one in a prompt as `{{input.<name>}}`.** Not decoration: the
|
|
1422
|
+
* platform's deployed input list is not necessarily this array. flow-v1's
|
|
1423
|
+
* `preDeriveAgentInputDefinitions` pre-pass scans the node's PROMPTS for `$vars.*`
|
|
1424
|
+
* references, merges what it finds with this list, and — when its caller asks for
|
|
1425
|
+
* pruning — DROPS an entry no prompt reference points at. A referenced entry
|
|
1426
|
+
* survives every one of those paths; an unreferenced one survives only some.
|
|
1427
|
+
* `check` warns when none of them is referenced, which is the case where the agent
|
|
1428
|
+
* would arrive with no arguments at all.
|
|
1429
|
+
*
|
|
1430
|
+
* Two shapes have no platform name and are handled rather than renamed:
|
|
1431
|
+
*
|
|
1432
|
+
* - a **literal** (`{ tier: 'Enterprise' }`) is INLINED into both prompts — there
|
|
1433
|
+
* is no argument for one, so a token could never substitute;
|
|
1434
|
+
* - a **computed expression** is refused by `check`
|
|
1435
|
+
* (`INLINE_AGENT_COMPOSITE_INPUT`): the platform names one argument per
|
|
1436
|
+
* reference, so an expression spanning several has none. Compute it in a
|
|
1437
|
+
* `script` step first and bind that step's output.
|
|
1438
|
+
*/
|
|
1439
|
+
inputs?: Record<string, unknown>;
|
|
1440
|
+
/**
|
|
1441
|
+
* The fields the agent must return, and their types — e.g.
|
|
1442
|
+
* `{ category: 'string', priority: 'string' }`. These become the node's
|
|
1443
|
+
* `agentOutputVariables` descriptor array AND the emitted `agent.json`'s
|
|
1444
|
+
* `outputSchema`, and they are what makes `out('<step>', 'category')` a checkable
|
|
1445
|
+
* read.
|
|
1446
|
+
*
|
|
1447
|
+
* Defaults to the definition's own default, `{ content: 'string' }` — which is
|
|
1448
|
+
* the toy scaffold shape, so declare something real if the flow reads fields.
|
|
1449
|
+
*
|
|
1450
|
+
* @enforcedBy INLINE_AGENT_READ_UNKNOWN_FIELD A read outside the declared set is
|
|
1451
|
+
* undefined on every rung and on the platform.
|
|
1452
|
+
*/
|
|
1453
|
+
returns?: Record<string, InlineAgentFieldType>;
|
|
1454
|
+
/**
|
|
1455
|
+
* The agent's own directory name — a UUID. The node carries it as `source`, and
|
|
1456
|
+
* the platform resolves the agent's configuration at `<source>/agent.json`
|
|
1457
|
+
* relative to the project (flow-v1 emits `entryPoint: <source>/agent.json`), so
|
|
1458
|
+
* the compiler writes that file next to the `.flow`.
|
|
1459
|
+
*
|
|
1460
|
+
* Omit it and one is derived from the flow id + step name, so a given flow emits
|
|
1461
|
+
* the same uuid every time (a random one would make every compile a diff).
|
|
1462
|
+
*/
|
|
1463
|
+
source?: string;
|
|
1464
|
+
/** Sampling temperature, 0–1. The definition's range; omit for the model's default. */
|
|
1465
|
+
temperature?: number;
|
|
1466
|
+
/** Max tokens in one response, 0–16384. */
|
|
1467
|
+
maxTokenPerResponse?: number;
|
|
1468
|
+
/** The model's own context ceiling — informational, e.g. `128000`. */
|
|
1469
|
+
modelMaxTokens?: number;
|
|
1470
|
+
/** How many tool-calling rounds the agent may take, 1–100. */
|
|
1471
|
+
maxIterations?: number;
|
|
1472
|
+
/**
|
|
1473
|
+
* The harness the agent runs on — `'standard'` (the default) or
|
|
1474
|
+
* `'advanced'`. Naming it selects the node's **1.3** definition (the
|
|
1475
|
+
* registry's current, which adds the field); omitting it emits the 1.2
|
|
1476
|
+
* definition byte-identically.
|
|
1477
|
+
*/
|
|
1478
|
+
mode?: 'standard' | 'advanced';
|
|
1479
|
+
/**
|
|
1480
|
+
* Safety rails over the agent's inputs, outputs, LLM calls and tools — the
|
|
1481
|
+
* platform's own array shape ({@link AgentGuardrail}), carried on the node
|
|
1482
|
+
* (its 1.2 definition already declares the input) and in the `agent.json`.
|
|
1483
|
+
*
|
|
1484
|
+
* ```ts
|
|
1485
|
+
* guardrails: [{
|
|
1486
|
+
* id: 'no-pii', $guardrailType: 'custom', name: 'Block PII',
|
|
1487
|
+
* selector: { scopes: ['Agent'] },
|
|
1488
|
+
* action: { $actionType: 'block', reason: 'PII detected' },
|
|
1489
|
+
* enabledForEvals: true,
|
|
1490
|
+
* rules: [{ $ruleType: 'word', fieldSelector: { $selectorType: 'all' },
|
|
1491
|
+
* operator: 'matchesRegex', value: '\\d{3}-\\d{2}-\\d{4}' }],
|
|
1492
|
+
* }]
|
|
1493
|
+
* ```
|
|
1494
|
+
*/
|
|
1495
|
+
guardrails?: AgentGuardrail[];
|
|
1496
|
+
/**
|
|
1497
|
+
* Attach an episodic memory so the agent learns from past runs — one
|
|
1498
|
+
* {@link AgentMemoryRef}, wired to the agent's `memory` handle (its 1.4
|
|
1499
|
+
* definition; naming one selects it).
|
|
1500
|
+
*/
|
|
1501
|
+
memory?: AgentMemoryRef;
|
|
1502
|
+
/**
|
|
1503
|
+
* GROUND the agent on tenant knowledge — one or more Context Grounding
|
|
1504
|
+
* (semantic) indexes, wired to the agent's own `context` handle.
|
|
1505
|
+
*
|
|
1506
|
+
* ```ts
|
|
1507
|
+
* inlineAgent({
|
|
1508
|
+
* model: 'gpt-5.4',
|
|
1509
|
+
* systemPrompt: 'You decide billing disputes from the SOPs. Return ONLY {"determination","rationale"}.',
|
|
1510
|
+
* userPrompt: 'Dispute: {{input.description}}',
|
|
1511
|
+
* inputs: { description: input('disputeDescription') },
|
|
1512
|
+
* returns: { determination: 'string', rationale: 'string' },
|
|
1513
|
+
* context: [{
|
|
1514
|
+
* name: 'Billing Dispute SOP Index',
|
|
1515
|
+
* id: 'cc45b9b4-dbf6-47b3-40ac-08debc0cec5b',
|
|
1516
|
+
* folderPath: 'Shared/uipath-maestro-flow/BillingDispute',
|
|
1517
|
+
* query: 'billing dispute resolution policy',
|
|
1518
|
+
* }],
|
|
1519
|
+
* })
|
|
1520
|
+
* ```
|
|
1521
|
+
*
|
|
1522
|
+
* Each entry becomes its own NODE —
|
|
1523
|
+
* `uipath.agent.resource.context.index.<slug>.<id>` — joined to the agent by an
|
|
1524
|
+
* edge out of the agent's `context` port. That is the platform's own shape: the
|
|
1525
|
+
* agent definition declares the handle with
|
|
1526
|
+
* `allowedTargets: [{ nodeType: 'uipath.agent.resource.context.*' }]`, and the
|
|
1527
|
+
* index's definition declares the mirror
|
|
1528
|
+
* (`allowedSources: [{ nodeType: 'uipath.agent.autonomous', handleId: 'context' }]`,
|
|
1529
|
+
* `maxConnections: 1`). Nothing is a binding: the index's identity is IN the node
|
|
1530
|
+
* type, exactly as a published agent's release key is.
|
|
1531
|
+
*
|
|
1532
|
+
* **Both identifiers are needed and neither is derivable.** The node type carries
|
|
1533
|
+
* a slug of the name AND the index's uuid; the node's inputs carry `indexName` +
|
|
1534
|
+
* `indexId` again, because the designer reads one and the runtime the other. Find
|
|
1535
|
+
* them together — the uuid is the tail of the registry node type:
|
|
1536
|
+
*
|
|
1537
|
+
* ```bash
|
|
1538
|
+
* uip maestro flow registry search "<index name>" --output json
|
|
1539
|
+
* ```
|
|
1540
|
+
*
|
|
1541
|
+
* **Grounding is a CLOUD-side capability.** An offline run has no retrieval
|
|
1542
|
+
* service to reach, so its answer is ungrounded
|
|
1543
|
+
* however this is configured — which is why an offline rung can only assert the
|
|
1544
|
+
* WIRING and a live rung only that the agent answered. Say so in a task rather
|
|
1545
|
+
* than letting a green rung imply retrieval happened.
|
|
1546
|
+
*/
|
|
1547
|
+
context?: ContextIndexRef | ContextIndexRef[];
|
|
1548
|
+
/**
|
|
1549
|
+
* Give the agent TOOLS — capabilities it may call while reasoning, wired to
|
|
1550
|
+
* the agent's own `tool` handle. Each entry becomes its own resource NODE
|
|
1551
|
+
* (`uipath.agent.resource.tool.<kind>…`), joined to the agent by an edge out
|
|
1552
|
+
* of its `tool` port — the same artifact shape as `context`.
|
|
1553
|
+
*
|
|
1554
|
+
* ```ts
|
|
1555
|
+
* tools: [
|
|
1556
|
+
* { kind: 'builtin', tool: 'summarize' },
|
|
1557
|
+
* { kind: 'connector', connector: 'uipath-atlassian-jira', operation: 'create-issue' },
|
|
1558
|
+
* { kind: 'process', key: '6235d64e-b190-4b7a-8918-723df964c068',
|
|
1559
|
+
* name: 'Create TestCase', folderPath: 'Shared',
|
|
1560
|
+
* inputs: { title: 'string' }, returns: { id: 'string' } },
|
|
1561
|
+
* ]
|
|
1562
|
+
* ```
|
|
1563
|
+
*
|
|
1564
|
+
* WHEN a tool runs is the model's decision at run time — nothing in the flow
|
|
1565
|
+
* calls it. Locally that means tool nodes are never stepped through (they are
|
|
1566
|
+
* artifacts, not steps), so no local rung proves a tool was USED — only that
|
|
1567
|
+
* the wiring and shapes are right. Say so in any task that scores this.
|
|
1568
|
+
*/
|
|
1569
|
+
tools?: ToolRef | ToolRef[];
|
|
1570
|
+
/**
|
|
1571
|
+
* Let the agent ESCALATE to a human mid-run — an Action Center app task,
|
|
1572
|
+
* wired to the agent's own `escalation` handle (its TOP port).
|
|
1573
|
+
*
|
|
1574
|
+
* ```ts
|
|
1575
|
+
* escalation: {
|
|
1576
|
+
* name: 'ContentReview',
|
|
1577
|
+
* description: 'Escalate uncertain content to a human reviewer',
|
|
1578
|
+
* app: {
|
|
1579
|
+
* key: '454921d6-137f-4897-943a-1ebf29b15f80',
|
|
1580
|
+
* name: 'ContentReviewApp',
|
|
1581
|
+
* folderPath: 'Shared',
|
|
1582
|
+
* inputs: { ContentText: 'string' },
|
|
1583
|
+
* outputs: { ReviewDecision: 'string' },
|
|
1584
|
+
* },
|
|
1585
|
+
* recipients: ['reviewer@example.com'],
|
|
1586
|
+
* outcomes: ['approve', 'reject'],
|
|
1587
|
+
* }
|
|
1588
|
+
* ```
|
|
1589
|
+
*
|
|
1590
|
+
* The emitted node type is `uipath.agent.resource.escalation.coded-action-app`
|
|
1591
|
+
* — the registry's CURRENT spelling (the bare `….escalation` is the pre-split
|
|
1592
|
+
* era; the agent's handle accepts both, and `registry get` resolves only the
|
|
1593
|
+
* suffixed one). The other variant, `escalation.quick-form`, is feature-gated
|
|
1594
|
+
* off on this tenant and not authorable.
|
|
1595
|
+
*/
|
|
1596
|
+
escalation?: EscalationRef | EscalationRef[];
|
|
1597
|
+
}
|
|
1598
|
+
/** The three platform-shipped built-in tools (fixed registry types). */
|
|
1599
|
+
export type BuiltinToolName = 'analyzefiles' | 'summarize' | 'batchtransform';
|
|
1600
|
+
/**
|
|
1601
|
+
* One tool on an inline agent — a discriminated union over the kinds the
|
|
1602
|
+
* tenant's registry actually serves (`uipath.agent.resource.tool.*`).
|
|
1603
|
+
*
|
|
1604
|
+
* @remarks
|
|
1605
|
+
* One kind is NOT here, and for a reason outside this repo:
|
|
1606
|
+
* `tool.mcp.*`/`uipath.agent.resource.mcp.*` resolves to nothing on this tenant
|
|
1607
|
+
* (no MCP server exists to point at, so there is no definition to derive).
|
|
1608
|
+
*/
|
|
1609
|
+
export type ToolRef = BuiltinToolRef | ConnectorToolRef | ProcessToolRef | IxpToolRef | McpToolRef | RemoteA2aToolRef | ClientSideToolRef | HttpRequestToolRef;
|
|
1610
|
+
/**
|
|
1611
|
+
* An MCP server the agent may call tools on. The node type is minted from the
|
|
1612
|
+
* server's name and key exactly as the platform's own mapper does
|
|
1613
|
+
* (`uipath.agent.resource.tool.mcp.<name-slug>.<key-slug>`), and the node
|
|
1614
|
+
* carries the server identity the runtime resolves (folder + slug).
|
|
1615
|
+
*/
|
|
1616
|
+
export interface McpToolRef {
|
|
1617
|
+
kind: 'mcp';
|
|
1618
|
+
/** The server's display name on the tenant. */
|
|
1619
|
+
name: string;
|
|
1620
|
+
/** The server's key (a GUID) — the solution reference the runtime resolves. */
|
|
1621
|
+
key: string;
|
|
1622
|
+
description?: string;
|
|
1623
|
+
/** Orchestrator folder the server lives in. */
|
|
1624
|
+
folderPath?: string;
|
|
1625
|
+
/** That folder's key, when you have it. */
|
|
1626
|
+
folderKey?: string;
|
|
1627
|
+
/** Server subtype — the referenceV2 `type` (e.g. `'external'`). */
|
|
1628
|
+
mcpType?: string;
|
|
1629
|
+
serviceName?: string;
|
|
1630
|
+
/** The canonical server slug; the runtime resolves `folderPath`/`slug`. */
|
|
1631
|
+
slug?: string;
|
|
1632
|
+
/**
|
|
1633
|
+
* Tool rows from the server's catalog to expose. Omit for none-yet — the
|
|
1634
|
+
* designer's tool picker backfills on discovery, and the runtime can refresh
|
|
1635
|
+
* the schema before a call (the default discovery mode).
|
|
1636
|
+
*/
|
|
1637
|
+
selectedTools?: unknown[];
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* A remote A2A (agent-to-agent) endpoint the agent may delegate to. Node type
|
|
1641
|
+
* `uipath.agent.resource.tool.a2a.<name-slug>.<key-slug>`, minted exactly as
|
|
1642
|
+
* the platform's mapper does.
|
|
1643
|
+
*/
|
|
1644
|
+
export interface RemoteA2aToolRef {
|
|
1645
|
+
kind: 'a2a';
|
|
1646
|
+
/** The remote agent's display name. */
|
|
1647
|
+
name: string;
|
|
1648
|
+
/** The resource key (a GUID). */
|
|
1649
|
+
key: string;
|
|
1650
|
+
/** The remote agent's slug — required; the mapper refuses a blank one. */
|
|
1651
|
+
slug: string;
|
|
1652
|
+
description?: string;
|
|
1653
|
+
/** The cached agent card (capability document), when you have one. */
|
|
1654
|
+
cachedAgentCard?: Record<string, unknown> | null;
|
|
1655
|
+
resourceType?: string | null;
|
|
1656
|
+
folderPath?: string;
|
|
1657
|
+
folderKey?: string;
|
|
1658
|
+
resourceFolderPath?: string;
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* A CLIENT-side tool: the agent asks the CALLING application to run it and
|
|
1662
|
+
* hand the answer back (`uipath.agent.resource.tool.clientside`). The flow
|
|
1663
|
+
* declares the contract; the client owns the implementation.
|
|
1664
|
+
*/
|
|
1665
|
+
export interface ClientSideToolRef {
|
|
1666
|
+
kind: 'clientside';
|
|
1667
|
+
/** The tool's name — what the model calls. */
|
|
1668
|
+
name: string;
|
|
1669
|
+
/** What the tool does — the model reads this to decide when to call it. */
|
|
1670
|
+
description?: string;
|
|
1671
|
+
/** The tool's arguments, by name. */
|
|
1672
|
+
inputs?: Record<string, InlineAgentFieldType>;
|
|
1673
|
+
/** What the client returns, by name. */
|
|
1674
|
+
returns?: Record<string, InlineAgentFieldType>;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* The built-in HTTP-request tool (`uipath.agent.resource.tool.builtin.httprequest`):
|
|
1678
|
+
* the agent performs an HTTP call. Each field is either FIXED here (give a
|
|
1679
|
+
* value) or left to the MODEL to fill at call time (omit it — the definition's
|
|
1680
|
+
* own prompt-mode default, with the platform's field description).
|
|
1681
|
+
*/
|
|
1682
|
+
export interface HttpRequestToolRef {
|
|
1683
|
+
kind: 'httpRequest';
|
|
1684
|
+
/** Node label. Defaults to the definition's ('HTTP Request'). */
|
|
1685
|
+
name?: string;
|
|
1686
|
+
description?: string;
|
|
1687
|
+
/** Fix the absolute URL; omit to let the model supply it. */
|
|
1688
|
+
url?: string;
|
|
1689
|
+
/** Fix the method (GET/POST/PUT/PATCH/DELETE); omit for model-supplied. */
|
|
1690
|
+
method?: string;
|
|
1691
|
+
/** Fix request headers as name/value pairs; omit for model-supplied. */
|
|
1692
|
+
headers?: Array<{
|
|
1693
|
+
name: string;
|
|
1694
|
+
value: string;
|
|
1695
|
+
}>;
|
|
1696
|
+
/** Fix query parameters as name/value pairs; omit for model-supplied. */
|
|
1697
|
+
params?: Array<{
|
|
1698
|
+
name: string;
|
|
1699
|
+
value: string;
|
|
1700
|
+
}>;
|
|
1701
|
+
/** Fix the body (a string — JSON goes as a string); omit for model-supplied. */
|
|
1702
|
+
body?: string;
|
|
1703
|
+
/** Fix the timeout in seconds; omit for model-supplied. */
|
|
1704
|
+
timeout?: number;
|
|
1705
|
+
}
|
|
1706
|
+
/**
|
|
1707
|
+
* An episodic memory the agent learns from across runs, wired to the agent's
|
|
1708
|
+
* own `memory` handle. Node type
|
|
1709
|
+
* `uipath.agent.resource.memory.<name-slug>.<id-slug>`, minted exactly as the
|
|
1710
|
+
* platform's mapper does. Naming one selects the agent's **1.4** definition
|
|
1711
|
+
* (which adds the handle) — transcribed from workbench source; the tenant
|
|
1712
|
+
* registry serves 1.3 (same availability note as do-while).
|
|
1713
|
+
*/
|
|
1714
|
+
export interface AgentMemoryRef {
|
|
1715
|
+
/** The memory's display name on the tenant. */
|
|
1716
|
+
name: string;
|
|
1717
|
+
/** The memory's id (a GUID). */
|
|
1718
|
+
id: string;
|
|
1719
|
+
description?: string;
|
|
1720
|
+
/** Folder key the memory lives in. */
|
|
1721
|
+
folderKey?: string;
|
|
1722
|
+
/** Learn from similar past runs (few-shot). Platform default `true`. */
|
|
1723
|
+
dynamicFewShotLearning?: boolean;
|
|
1724
|
+
/** Similarity threshold 0–1. Platform default `0`. */
|
|
1725
|
+
semanticSimilarity?: number;
|
|
1726
|
+
/** How many past examples to retrieve. Platform default `3`. */
|
|
1727
|
+
kValue?: number;
|
|
1728
|
+
/** Retrieval mode. Platform default `'hybrid'`. */
|
|
1729
|
+
searchMode?: 'hybrid' | 'semantic';
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* A platform built-in tool. Self-contained: no bindings, no tenant resource,
|
|
1733
|
+
* no identifiers to look up — the node type is a fixed string.
|
|
1734
|
+
*/
|
|
1735
|
+
export interface BuiltinToolRef {
|
|
1736
|
+
kind: 'builtin';
|
|
1737
|
+
/** Which built-in: `'analyzefiles'`, `'summarize'` or `'batchtransform'`. */
|
|
1738
|
+
tool: BuiltinToolName;
|
|
1739
|
+
/** What the agent is told the tool does. Defaults to the platform's own text. */
|
|
1740
|
+
description?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* `summarize`/`batchtransform` only: the standing query or instruction. A
|
|
1743
|
+
* plain string, or a flow expression when it depends on the run (the same
|
|
1744
|
+
* mode-tagged rendering as a context index's `query`).
|
|
1745
|
+
*/
|
|
1746
|
+
query?: unknown;
|
|
1747
|
+
/** `summarize` only: restrict to one file type. The platform defaults to `'pdf'`. */
|
|
1748
|
+
fileExtension?: string;
|
|
1749
|
+
/** `summarize` only: citation style. The platform defaults to `'inline'`. */
|
|
1750
|
+
citationMode?: string;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* An Integration Service connector operation as a tool — e.g. "create a Jira
|
|
1754
|
+
* issue". Resolved from the same curated library as `connector(…)`, so the
|
|
1755
|
+
* connector key and operation name are validated at compile and the emitted
|
|
1756
|
+
* definition carries the operation's real object/verb.
|
|
1757
|
+
*/
|
|
1758
|
+
export interface ConnectorToolRef {
|
|
1759
|
+
kind: 'connector';
|
|
1760
|
+
/** The connector's key, e.g. `'uipath-atlassian-jira'`. */
|
|
1761
|
+
connector: string;
|
|
1762
|
+
/** The operation, e.g. `'create-issue'` — same names `connector()` takes. */
|
|
1763
|
+
operation: string;
|
|
1764
|
+
/** Pin an operation version; defaults like `connector()`'s. */
|
|
1765
|
+
version?: string;
|
|
1766
|
+
/** Disambiguate a generic operation by OBJECT, exactly as `connector()` does. */
|
|
1767
|
+
object?: string;
|
|
1768
|
+
/** Display label; defaults to the library's own (e.g. `'Create Issue'`). */
|
|
1769
|
+
name?: string;
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* The tool kinds that wrap a DEPLOYED tenant resource. `kind` picks the
|
|
1773
|
+
* namespace and service:
|
|
1774
|
+
*
|
|
1775
|
+
* @remarks
|
|
1776
|
+
* | kind | node type | starts |
|
|
1777
|
+
* |---|---|---|
|
|
1778
|
+
* | `'process'` | `tool.process.<key>` | an RPA process (`Orchestrator.StartJob`) |
|
|
1779
|
+
* | `'agent'` | `tool.agent.<key>` | a published agent (`StartAgentJob`) |
|
|
1780
|
+
* | `'api'` | `tool.api.<key>` | an API workflow (`ExecuteApiWorkflowAsync`) |
|
|
1781
|
+
* | `'flow'` | `tool.flow.<key>` | a Maestro flow (`StartFlowProcess`) |
|
|
1782
|
+
* | `'maestro'` | `tool.processorchestration.<key>` | an agentic process (`StartAgenticProcess`) |
|
|
1783
|
+
*/
|
|
1784
|
+
export type ProcessToolKind = 'process' | 'agent' | 'api' | 'flow' | 'maestro' | 'function';
|
|
1785
|
+
/**
|
|
1786
|
+
* A deployed tenant resource the agent may invoke. Like `rpaWorkflow()` and
|
|
1787
|
+
* its siblings, the definition cannot be bundled — the node type carries the
|
|
1788
|
+
* resource's own key and the platform synthesizes the contract per tenant —
|
|
1789
|
+
* so the author supplies the three identifiers, plus the contract when the
|
|
1790
|
+
* agent's answer or arguments matter.
|
|
1791
|
+
*/
|
|
1792
|
+
export interface ProcessToolRef {
|
|
1793
|
+
kind: ProcessToolKind;
|
|
1794
|
+
/**
|
|
1795
|
+
* The resource's key (a GUID) — the tail of the registry node type. Find it
|
|
1796
|
+
* with `uip maestro flow registry search "uipath.agent.resource.tool.<ns>"`
|
|
1797
|
+
* (or `uip solution resources list` for the release key).
|
|
1798
|
+
*/
|
|
1799
|
+
key: string;
|
|
1800
|
+
/** The resource's display name on the tenant, e.g. `'Create TestCase'`. */
|
|
1801
|
+
name: string;
|
|
1802
|
+
/** The Orchestrator folder it lives in, e.g. `'Shared'`. */
|
|
1803
|
+
folderPath: string;
|
|
1804
|
+
/** The resource's input arguments, by name and type — becomes its `inputSchema`. */
|
|
1805
|
+
inputs?: Record<string, InlineAgentFieldType>;
|
|
1806
|
+
/** What it returns, by name and type — becomes its `outputSchema`. */
|
|
1807
|
+
returns?: Record<string, InlineAgentFieldType>;
|
|
1808
|
+
}
|
|
1809
|
+
/**
|
|
1810
|
+
* A published IxP (Intelligent eXtraction Platform) project as a tool — the
|
|
1811
|
+
* agent decides when to extract a document and reads the fields back.
|
|
1812
|
+
*
|
|
1813
|
+
* @remarks
|
|
1814
|
+
* The same project identity as {@link IxpExtractInputs}, minus the file: a tool
|
|
1815
|
+
* is handed its document by the agent at run time, so `attachmentConfig` (the
|
|
1816
|
+
* platform's own field) says where that document comes from rather than
|
|
1817
|
+
* `fileRef` naming one.
|
|
1818
|
+
*/
|
|
1819
|
+
export interface IxpToolRef {
|
|
1820
|
+
kind: 'ixp';
|
|
1821
|
+
/**
|
|
1822
|
+
* The IxP project's id (a GUID) — the tail of the registry node type
|
|
1823
|
+
* `uipath.agent.resource.tool.ixp.<slug>.<projectId>`. Find it with
|
|
1824
|
+
* `uip maestro flow registry search -f "type:startsWith=uipath.agent.resource.tool.ixp"`
|
|
1825
|
+
* (after `uip maestro flow registry pull --force`, or the answer is your last
|
|
1826
|
+
* sync's).
|
|
1827
|
+
*
|
|
1828
|
+
* Note this is the PROJECT id, where an extraction STEP's node type carries
|
|
1829
|
+
* the project **version** id — two different GUIDs for the same project.
|
|
1830
|
+
*/
|
|
1831
|
+
projectId: string;
|
|
1832
|
+
/** The project's display name, e.g. `'Vendor Invoices'`. */
|
|
1833
|
+
name: string;
|
|
1834
|
+
/** What the agent is told the tool does. Defaults to the platform's own text. */
|
|
1835
|
+
description?: string;
|
|
1836
|
+
/** Pin a published version tag; the platform defaults to the latest. */
|
|
1837
|
+
versionTag?: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* Where the document comes from. `'prompt'` (the platform's default) lets the
|
|
1840
|
+
* agent pass one; `'argument'` binds it to a named argument path.
|
|
1841
|
+
*/
|
|
1842
|
+
attachment?: {
|
|
1843
|
+
mode?: 'prompt' | 'argument';
|
|
1844
|
+
description?: string;
|
|
1845
|
+
argumentPath?: string;
|
|
1846
|
+
};
|
|
1847
|
+
}
|
|
1848
|
+
/**
|
|
1849
|
+
* One escalation an inline agent may raise — an Action Center app task a human
|
|
1850
|
+
* completes (the `coded-action-app` variant, the one this tenant's registry
|
|
1851
|
+
* serves).
|
|
1852
|
+
*/
|
|
1853
|
+
export interface EscalationRef {
|
|
1854
|
+
/** The escalation's name — required by the definition (`minLength: 1`). */
|
|
1855
|
+
name: string;
|
|
1856
|
+
/** When the agent should escalate — what a reviewer sees as the reason. */
|
|
1857
|
+
description?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* Which escalation node type to emit. Omit for the default —
|
|
1860
|
+
* `….escalation.coded-action-app`, the registry's current spelling, whose
|
|
1861
|
+
* form is a deployed app named by `app`. `'quick-form'` emits
|
|
1862
|
+
* `….escalation.quick-form`, whose form lives INLINE in `fields` (bundled
|
|
1863
|
+
* from the workbench manifest; the tenant registry does not serve it —
|
|
1864
|
+
* same availability note as do-while).
|
|
1865
|
+
*/
|
|
1866
|
+
variant?: 'quick-form';
|
|
1867
|
+
/**
|
|
1868
|
+
* The inline form for a `'quick-form'` escalation — the same field rows a
|
|
1869
|
+
* human task's form takes. Forbidden with the app-backed default.
|
|
1870
|
+
*/
|
|
1871
|
+
fields?: FormField[];
|
|
1872
|
+
/**
|
|
1873
|
+
* The deployed Action Center app that carries the review. Required by — and
|
|
1874
|
+
* only legal with — the app-backed default variant.
|
|
1875
|
+
*/
|
|
1876
|
+
app?: {
|
|
1877
|
+
/** The app's key (a GUID) — from the app's URL or `uip` app listings. */
|
|
1878
|
+
key: string;
|
|
1879
|
+
/** The app's name, e.g. `'ContentReviewApp'`. */
|
|
1880
|
+
name: string;
|
|
1881
|
+
/** The Orchestrator folder the app lives in. */
|
|
1882
|
+
folderPath?: string;
|
|
1883
|
+
/** The fields the agent hands the reviewer — becomes the app's `inputSchema`. */
|
|
1884
|
+
inputs?: Record<string, InlineAgentFieldType>;
|
|
1885
|
+
/** The fields the reviewer answers with — becomes the app's `outputSchema`. */
|
|
1886
|
+
outputs?: Record<string, InlineAgentFieldType>;
|
|
1887
|
+
};
|
|
1888
|
+
/** Who gets the task — email addresses. */
|
|
1889
|
+
recipients?: string[];
|
|
1890
|
+
/**
|
|
1891
|
+
* The outcomes a reviewer can pick (e.g. `['approve', 'reject']`). Each maps
|
|
1892
|
+
* to `'continue'` — the agent resumes with the reviewer's answer either way,
|
|
1893
|
+
* which is the only mapping the deployed corpus carries.
|
|
1894
|
+
*/
|
|
1895
|
+
outcomes?: string[];
|
|
1896
|
+
/** The task's title in Action Center. */
|
|
1897
|
+
taskTitle?: string;
|
|
1898
|
+
/** Task priority. The platform defaults to `'medium'`. */
|
|
1899
|
+
priority?: 'low' | 'medium' | 'high' | 'critical';
|
|
1900
|
+
/** Labels on the task, for Action Center filtering. */
|
|
1901
|
+
labels?: string[];
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* One Context Grounding index an inline agent is grounded on.
|
|
1905
|
+
*
|
|
1906
|
+
* @remarks
|
|
1907
|
+
* The optional fields mirror the platform's own `inputDefaults` for an index
|
|
1908
|
+
* resource, so omitting them emits exactly what the designer would.
|
|
1909
|
+
*/
|
|
1910
|
+
export interface ContextIndexRef {
|
|
1911
|
+
/** The index's display name on the tenant, e.g. `'Billing Dispute SOP Index'`. */
|
|
1912
|
+
name: string;
|
|
1913
|
+
/**
|
|
1914
|
+
* The index's uuid. It is the tail of the registry node type
|
|
1915
|
+
* (`uipath.agent.resource.context.index.<slug>.<uuid>`), which is where to read
|
|
1916
|
+
* it from — `uip maestro flow registry search "<name>"`.
|
|
1917
|
+
*/
|
|
1918
|
+
id: string;
|
|
1919
|
+
/** The Orchestrator folder the index lives in, e.g. `'Shared/uipath-maestro-flow/BillingDispute'`. */
|
|
1920
|
+
folderPath?: string;
|
|
1921
|
+
/** That folder's key, when you have it. The runtime resolves the folder either way. */
|
|
1922
|
+
folderKey?: string;
|
|
1923
|
+
/**
|
|
1924
|
+
* What to retrieve — required by the index definition's own schema for every
|
|
1925
|
+
* retrieval mode except `deeprag`/`batchtransform`. A plain string, or a flow
|
|
1926
|
+
* expression when the query depends on the run.
|
|
1927
|
+
*/
|
|
1928
|
+
query?: string | Expr;
|
|
1929
|
+
/** `'semantic'` (the default), `'structured'`, `'deeprag'` or `'batchtransform'`. */
|
|
1930
|
+
retrievalMode?: 'semantic' | 'structured' | 'deeprag' | 'batchtransform';
|
|
1931
|
+
/** How many chunks to retrieve, 1–40. The platform defaults to 3. */
|
|
1932
|
+
resultCount?: number;
|
|
1933
|
+
/** Minimum similarity, 0–1. The platform defaults to 0. */
|
|
1934
|
+
threshold?: number;
|
|
1935
|
+
/** Restrict to one file type; `'All'` (the platform's default) or e.g. `'pdf'`. */
|
|
1936
|
+
fileExtension?: string;
|
|
1937
|
+
}
|
|
1938
|
+
/** The three priorities an Orchestrator queue item can carry. */
|
|
1939
|
+
export type QueuePriority = 'Low' | 'Normal' | 'High';
|
|
1940
|
+
export interface QueueItemInputs {
|
|
1941
|
+
/** The queue's name in Orchestrator — e.g. `'SupplierInvoices'`. */
|
|
1942
|
+
queue: string;
|
|
1943
|
+
/** The Orchestrator folder holding the queue — e.g. `'Shared'`. */
|
|
1944
|
+
folderPath: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* The queue's own Orchestrator key (a GUID). It is the JOIN between this node
|
|
1947
|
+
* and the flow's queue bindings — a node which does not reference its bindings
|
|
1948
|
+
* cannot be dispatched — and it is what
|
|
1949
|
+
* the designer's queue picker writes. The RUNTIME resolves the queue by
|
|
1950
|
+
* `queue` + `folderPath`, so all three are needed and none is redundant.
|
|
1951
|
+
*
|
|
1952
|
+
* Find it with `uip or queues list --all-folders`.
|
|
1953
|
+
*/
|
|
1954
|
+
key: string;
|
|
1955
|
+
/**
|
|
1956
|
+
* The work item's own data: a FLAT object of primitive values. It becomes the
|
|
1957
|
+
* item's `SpecificContent`, and Orchestrator rejects a nested object or array
|
|
1958
|
+
* with "Property values must be simple (like numbers or text)".
|
|
1959
|
+
*/
|
|
1960
|
+
item: Record<string, unknown>;
|
|
1961
|
+
/** Processing priority. Defaults to `'Normal'`, as the node type does. */
|
|
1962
|
+
priority?: QueuePriority;
|
|
1963
|
+
/**
|
|
1964
|
+
* A reference string for the item. Optional in general — but a queue created
|
|
1965
|
+
* with "enforce unique reference" REQUIRES one and rejects a repeat with
|
|
1966
|
+
* `HTTP 409: Duplicate Reference`, so derive it from the flow's input rather
|
|
1967
|
+
* than hard-coding it.
|
|
1968
|
+
*
|
|
1969
|
+
* Which is why it takes an {@link Expr} as well as a literal: the serializer
|
|
1970
|
+
* renders it through the same path as any other value, so
|
|
1971
|
+
* `reference: input('invoiceRef')` and
|
|
1972
|
+
* ``reference: js`${input('invoiceRef')} + "-review"` `` both emit. Typing it
|
|
1973
|
+
* as a bare `string` contradicted the advice directly above and stopped two
|
|
1974
|
+
* of the SDK's own examples compiling.
|
|
1975
|
+
*/
|
|
1976
|
+
reference?: string | Expr;
|
|
1977
|
+
/** Earliest the item may be processed, ISO-8601 (e.g. `'2026-08-01T09:00:00Z'`). */
|
|
1978
|
+
deferDate?: string;
|
|
1979
|
+
/** Latest the item should be processed, ISO-8601. What an SLA is measured against. */
|
|
1980
|
+
dueDate?: string;
|
|
1981
|
+
/**
|
|
1982
|
+
* `false` (the default) enqueues and moves on — `core.action.queue.create`.
|
|
1983
|
+
* `true` PARKS the flow until whatever consumes the queue has processed the
|
|
1984
|
+
* item, and publishes that result — `core.action.queue.create-and-wait`.
|
|
1985
|
+
*
|
|
1986
|
+
* The two are one construct with two data paths, so this is one field rather
|
|
1987
|
+
* than two factories. Waiting is not free: nothing completes the item but a
|
|
1988
|
+
* consumer (an RPA process bound to the queue), so a flow that waits on a queue
|
|
1989
|
+
* nobody drains waits forever.
|
|
1990
|
+
*/
|
|
1991
|
+
wait?: boolean;
|
|
1992
|
+
/**
|
|
1993
|
+
* Only for `wait: true`: the fields the PROCESSED item's result carries, and
|
|
1994
|
+
* their types (e.g. `{ approved: 'boolean' }`). Required if anything reads the
|
|
1995
|
+
* step's output.
|
|
1996
|
+
*
|
|
1997
|
+
* Why you have to say: what a consumer writes into a transaction's `Output` is
|
|
1998
|
+
* that automation's business, not the queue's — no definition declares it and
|
|
1999
|
+
* authoring happens offline. Without it `$vars.<step>.output.<field>` reads from
|
|
2000
|
+
* an object with no declared fields, and nothing could tell a real field from
|
|
2001
|
+
* a typo.
|
|
2002
|
+
*
|
|
2003
|
+
* `wait: false` needs none: what it publishes is the queue ITEM's own
|
|
2004
|
+
* Orchestrator record (`Key`, `Status`, `Reference`, `SpecificContent`, …),
|
|
2005
|
+
* which is the same for every queue, so the serializer declares it for you.
|
|
2006
|
+
*/
|
|
2007
|
+
returns?: Record<string, ReturnFieldType>;
|
|
2008
|
+
}
|
|
2009
|
+
/** One filter row on a Data Fabric read — rows AND together unless `or` is set. */
|
|
2010
|
+
export interface DataFabricFilter {
|
|
2011
|
+
/** The entity column to filter on. */
|
|
2012
|
+
field: string;
|
|
2013
|
+
/** Comparison operator the designer offers — `=` (the default), `!=`, `>`, `>=`, `<`, `<=`, `contains`, … */
|
|
2014
|
+
operator?: string;
|
|
2015
|
+
/** The comparison value. An `Expr` re-evaluates at activation time. */
|
|
2016
|
+
value: string | Expr;
|
|
2017
|
+
/** Join this row to the PREVIOUS one with OR instead of AND. */
|
|
2018
|
+
or?: boolean;
|
|
2019
|
+
}
|
|
2020
|
+
export interface DataFabricReadInputs {
|
|
2021
|
+
/** The Data Fabric entity's name, e.g. `'Invoices'`. */
|
|
2022
|
+
entity: string;
|
|
2023
|
+
/** Filter rows selecting the record to read. Omit to read the first record. */
|
|
2024
|
+
filters?: DataFabricFilter[];
|
|
2025
|
+
/** Folder key (GUID) for folder-scoped entities. */
|
|
2026
|
+
folderKey?: string;
|
|
2027
|
+
}
|
|
2028
|
+
export interface DataFabricUpdateInputs {
|
|
2029
|
+
/** The Data Fabric entity's name, e.g. `'Invoices'`. */
|
|
2030
|
+
entity: string;
|
|
2031
|
+
/**
|
|
2032
|
+
* Which record to update: `{ byId: <record id> }`, or `{ fromRead: '<step>' }`
|
|
2033
|
+
* naming an earlier `dataFabricRead` step whose record this write targets.
|
|
2034
|
+
*/
|
|
2035
|
+
record: {
|
|
2036
|
+
byId: string | Expr;
|
|
2037
|
+
fromRead?: never;
|
|
2038
|
+
} | {
|
|
2039
|
+
fromRead: string;
|
|
2040
|
+
byId?: never;
|
|
2041
|
+
};
|
|
2042
|
+
/**
|
|
2043
|
+
* The columns to write, by field name. An empty string is a real write — it
|
|
2044
|
+
* clears the column.
|
|
2045
|
+
*/
|
|
2046
|
+
set: Record<string, string | Expr>;
|
|
2047
|
+
/** Folder key (GUID) for folder-scoped entities. */
|
|
2048
|
+
folderKey?: string;
|
|
2049
|
+
}
|
|
2050
|
+
export interface DocumentClassifyInputs {
|
|
2051
|
+
/** The document to classify — a file reference (`input('file')`, `out('fetch', 'fileRef')`, …). */
|
|
2052
|
+
fileRef: string | Expr;
|
|
2053
|
+
/** Page range to classify, e.g. `'1-3'`. Omit for the whole document. */
|
|
2054
|
+
pageRange?: string;
|
|
2055
|
+
/** Split multi-document files into per-type page ranges. */
|
|
2056
|
+
splitPages?: boolean;
|
|
2057
|
+
/** Model configuration overrides; omit for the platform defaults (gemini_2_5_flash). */
|
|
2058
|
+
modelConfig?: Record<string, unknown>;
|
|
2059
|
+
}
|
|
2060
|
+
export interface DynamicExtractInputs {
|
|
2061
|
+
/** The document to extract from — a file reference. */
|
|
2062
|
+
fileRef: string | Expr;
|
|
2063
|
+
/**
|
|
2064
|
+
* The IXP model deployment the extraction runs against. Dynamic Extract
|
|
2065
|
+
* authors its SCHEMA inline, but execution still needs a model: Studio Web's
|
|
2066
|
+
* panel destructures `modelName` and `folderKey`, and the platform rejects an
|
|
2067
|
+
* instance without them.
|
|
2068
|
+
*/
|
|
2069
|
+
model: {
|
|
2070
|
+
/** The deployment's model name, e.g. `'invoiceixp-cef0d447-ixp'`. */
|
|
2071
|
+
modelName: string;
|
|
2072
|
+
/** Folder key (GUID) the deployment lives in. */
|
|
2073
|
+
folderKey: string;
|
|
2074
|
+
/** The IXP project's id (GUID). */
|
|
2075
|
+
projectId?: string;
|
|
2076
|
+
/** The IXP project's display name. */
|
|
2077
|
+
projectName?: string;
|
|
2078
|
+
/** Folder display name. */
|
|
2079
|
+
folderName?: string;
|
|
2080
|
+
/** Deployment version tag; omit for the live version. */
|
|
2081
|
+
versionTag?: string;
|
|
2082
|
+
};
|
|
2083
|
+
/**
|
|
2084
|
+
* The extraction schema (the node's inline taxonomy): a JSON-schema-shaped
|
|
2085
|
+
* document describing the fields to extract. This is the Dynamic Extract
|
|
2086
|
+
* node's defining input — authored inline rather than referencing a deployed
|
|
2087
|
+
* IXP project (use {@link ixpExtract} for those).
|
|
2088
|
+
*/
|
|
2089
|
+
schema?: Record<string, unknown>;
|
|
2090
|
+
/** Page range to extract, e.g. `'1-3'`. Omit for the whole document. */
|
|
2091
|
+
pageRange?: string;
|
|
2092
|
+
/** Model configuration overrides; omit for the platform defaults. */
|
|
2093
|
+
modelConfig?: Record<string, unknown>;
|
|
2094
|
+
}
|
|
2095
|
+
export type ActionSpec = {
|
|
2096
|
+
kind: 'http';
|
|
2097
|
+
inputs: HttpInputs;
|
|
2098
|
+
} | {
|
|
2099
|
+
kind: 'script';
|
|
2100
|
+
inputs: ScriptInputs;
|
|
2101
|
+
} | {
|
|
2102
|
+
kind: 'transform';
|
|
2103
|
+
inputs: TransformInputs;
|
|
2104
|
+
} | {
|
|
2105
|
+
kind: 'hitl';
|
|
2106
|
+
inputs: HitlInputs;
|
|
2107
|
+
} | {
|
|
2108
|
+
kind: 'delay';
|
|
2109
|
+
inputs: DelayInputs;
|
|
2110
|
+
}
|
|
2111
|
+
/** A placeholder — no inputs, publishes nothing. See {@link mock}. */
|
|
2112
|
+
| {
|
|
2113
|
+
kind: 'mock';
|
|
2114
|
+
} | {
|
|
2115
|
+
kind: 'rpaWorkflow';
|
|
2116
|
+
inputs: RpaWorkflowInputs;
|
|
2117
|
+
} | {
|
|
2118
|
+
kind: 'apiWorkflow';
|
|
2119
|
+
inputs: ApiWorkflowInputs;
|
|
2120
|
+
} | {
|
|
2121
|
+
kind: 'publishedFunction';
|
|
2122
|
+
inputs: PublishedFunctionInputs;
|
|
2123
|
+
} | {
|
|
2124
|
+
kind: 'sendMessage';
|
|
2125
|
+
inputs: SendMessageInputs;
|
|
2126
|
+
} | {
|
|
2127
|
+
kind: 'waitForMessage';
|
|
2128
|
+
inputs: WaitForMessageInputs;
|
|
2129
|
+
} | {
|
|
2130
|
+
kind: 'conversationContext';
|
|
2131
|
+
inputs: ConversationContextInputs;
|
|
2132
|
+
} | {
|
|
2133
|
+
kind: 'createOutgoingCall';
|
|
2134
|
+
inputs: CreateOutgoingCallInputs;
|
|
2135
|
+
} | {
|
|
2136
|
+
kind: 'endCall';
|
|
2137
|
+
inputs: EndCallInputs;
|
|
2138
|
+
} | {
|
|
2139
|
+
kind: 'voiceAgent';
|
|
2140
|
+
inputs: VoiceAgentInputs;
|
|
2141
|
+
} | {
|
|
2142
|
+
kind: 'conversationalAgent';
|
|
2143
|
+
inputs: ConversationalAgentInputs;
|
|
2144
|
+
} | {
|
|
2145
|
+
kind: 'agenticProcess';
|
|
2146
|
+
inputs: AgenticProcessInputs;
|
|
2147
|
+
} | {
|
|
2148
|
+
kind: 'agent';
|
|
2149
|
+
inputs: AgentInputs;
|
|
2150
|
+
} | {
|
|
2151
|
+
kind: 'inlineAgent';
|
|
2152
|
+
inputs: InlineAgentInputs;
|
|
2153
|
+
} | {
|
|
2154
|
+
kind: 'queueItem';
|
|
2155
|
+
inputs: QueueItemInputs;
|
|
2156
|
+
} | {
|
|
2157
|
+
kind: 'summarize';
|
|
2158
|
+
inputs: SummarizeInputs;
|
|
2159
|
+
} | {
|
|
2160
|
+
kind: 'batchTransform';
|
|
2161
|
+
inputs: BatchTransformInputs;
|
|
2162
|
+
} | {
|
|
2163
|
+
kind: 'ixpExtract';
|
|
2164
|
+
inputs: IxpExtractInputs;
|
|
2165
|
+
} | {
|
|
2166
|
+
kind: 'connector';
|
|
2167
|
+
key: string;
|
|
2168
|
+
action: string;
|
|
2169
|
+
version?: string;
|
|
2170
|
+
connection?: string;
|
|
2171
|
+
folder?: string;
|
|
2172
|
+
/** Which OBJECT a generic operation addresses — see {@link ConnectorOpts.object}. */
|
|
2173
|
+
object?: string;
|
|
2174
|
+
inputs: Record<string, unknown>;
|
|
2175
|
+
} | {
|
|
2176
|
+
kind: 'documentClassify';
|
|
2177
|
+
inputs: DocumentClassifyInputs;
|
|
2178
|
+
} | {
|
|
2179
|
+
kind: 'dynamicExtract';
|
|
2180
|
+
inputs: DynamicExtractInputs;
|
|
2181
|
+
} | {
|
|
2182
|
+
kind: 'dataFabricRead';
|
|
2183
|
+
inputs: DataFabricReadInputs;
|
|
2184
|
+
} | {
|
|
2185
|
+
kind: 'dataFabricUpdate';
|
|
2186
|
+
inputs: DataFabricUpdateInputs;
|
|
2187
|
+
} | {
|
|
2188
|
+
kind: 'waitEvent';
|
|
2189
|
+
subscription: EventSubscription;
|
|
2190
|
+
};
|
|
2191
|
+
/**
|
|
2192
|
+
* Wrap a built-in action spec literal in its adapter class without changing
|
|
2193
|
+
* its declared type. SDK-internal — factories call it so their results are
|
|
2194
|
+
* `instanceof FlowAction`; authors never need it.
|
|
2195
|
+
*
|
|
2196
|
+
* @internal
|
|
2197
|
+
* @param spec - The spec literal a factory built.
|
|
2198
|
+
* @returns The same spec, as a `FlowAction` instance.
|
|
2199
|
+
*/
|
|
2200
|
+
export declare function builtinActionSpec<S extends object>(spec: S): S;
|
|
2201
|
+
/**
|
|
2202
|
+
* Wrap a built-in trigger spec literal in its adapter class without changing
|
|
2203
|
+
* its declared type. SDK-internal — factories call it so their results are
|
|
2204
|
+
* `instanceof FlowTrigger`; authors never need it.
|
|
2205
|
+
*
|
|
2206
|
+
* @internal
|
|
2207
|
+
* @param spec - The spec literal a factory built.
|
|
2208
|
+
* @returns The same spec, as a `FlowTrigger` instance.
|
|
2209
|
+
*/
|
|
2210
|
+
export declare function builtinTriggerSpec<S extends object>(spec: S): S;
|
|
2211
|
+
/**
|
|
2212
|
+
* Declare an HTTP request action, explicitly choosing standalone or managed.
|
|
2213
|
+
*
|
|
2214
|
+
* @param inputs - The request: `url`, `method`, `body`, the response fields you
|
|
2215
|
+
* read back via `returns`, and the `managed` node choice.
|
|
2216
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2217
|
+
*/
|
|
2218
|
+
export declare function http(inputs: HttpInputs): ActionSpec;
|
|
2219
|
+
/**
|
|
2220
|
+
* Declare an inline script action.
|
|
2221
|
+
*
|
|
2222
|
+
* @param inputs - The JavaScript body (`code`, which must `return`) and what it
|
|
2223
|
+
* returns (`returns`).
|
|
2224
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2225
|
+
*/
|
|
2226
|
+
export declare function script(inputs: ScriptInputs): ActionSpec;
|
|
2227
|
+
/**
|
|
2228
|
+
* Declare a Transform action — a chain of declarative operations over a
|
|
2229
|
+
* collection. Read the result downstream with `out('<step>')`.
|
|
2230
|
+
*
|
|
2231
|
+
* @remarks
|
|
2232
|
+
* For a node that does ONE thing, name the variant — the emitted `.flow` then
|
|
2233
|
+
* carries `core.action.transform.filter` and reads as `Filter` in the designer
|
|
2234
|
+
* instead of a generic `Transform`:
|
|
2235
|
+
*
|
|
2236
|
+
* ```ts
|
|
2237
|
+
* .step('bigOrders', transform({
|
|
2238
|
+
* variant: 'filter',
|
|
2239
|
+
* collection: v('orders'),
|
|
2240
|
+
* operations: [
|
|
2241
|
+
* { type: 'filter', filters: [{ field: 'amount', condition: 'greater_equal', value: 100 }] },
|
|
2242
|
+
* ],
|
|
2243
|
+
* }))
|
|
2244
|
+
* ```
|
|
2245
|
+
*
|
|
2246
|
+
* @example
|
|
2247
|
+
* **Filter a collection, then reshape what survives**
|
|
2248
|
+
* ```ts
|
|
2249
|
+
* .var('catalog', types.array, [
|
|
2250
|
+
* { title: 'Deep Learning', author: 'Goodfellow', difficulty: 9, pages: 800 },
|
|
2251
|
+
* { title: 'Information Theory', author: 'MacKay', difficulty: 7, pages: 540 },
|
|
2252
|
+
* ])
|
|
2253
|
+
* .step('curate', transform({
|
|
2254
|
+
* collection: v('catalog'),
|
|
2255
|
+
* operations: [
|
|
2256
|
+
* { type: 'filter', operation: 'and', filters: [
|
|
2257
|
+
* { field: 'difficulty', condition: 'greater_than', value: 5 },
|
|
2258
|
+
* { field: 'pages', condition: 'less_than', value: 600 },
|
|
2259
|
+
* ] },
|
|
2260
|
+
* { type: 'map', keepOriginalFields: false, mappings: [
|
|
2261
|
+
* { field: 'title', transformation: 'uppercase' },
|
|
2262
|
+
* { field: 'author' },
|
|
2263
|
+
* ] },
|
|
2264
|
+
* ],
|
|
2265
|
+
* }))
|
|
2266
|
+
* ```
|
|
2267
|
+
*
|
|
2268
|
+
* @param inputs - The `collection` to transform and the chain of `operations` to
|
|
2269
|
+
* run over it.
|
|
2270
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2271
|
+
*/
|
|
2272
|
+
export declare function transform(inputs: TransformInputs): ActionSpec;
|
|
2273
|
+
/**
|
|
2274
|
+
* Declare a human task — a step that pauses for a person to read some values,
|
|
2275
|
+
* fill others in, and press one of the outcome buttons.
|
|
2276
|
+
*
|
|
2277
|
+
* @remarks
|
|
2278
|
+
* Read an answer with `out('review', '<fieldId>')`, and which button they pressed
|
|
2279
|
+
* with `out('review', 'Action')` — branch on that for per-outcome routing.
|
|
2280
|
+
*
|
|
2281
|
+
* ### Picking a node type with `variant`
|
|
2282
|
+
*
|
|
2283
|
+
* The example above emits `uipath.human-in-the-loop`, the original node, and
|
|
2284
|
+
* that stays the default. Two other spellings of the same human task exist
|
|
2285
|
+
* ({@link HitlVariant}), and `variant` is how you say which:
|
|
2286
|
+
*
|
|
2287
|
+
* ```ts
|
|
2288
|
+
* // Same inline form, the newer node type — no `inputs.type` is written.
|
|
2289
|
+
* hitl({ variant: 'quick-form', fields: […], outcomes: ['Approve', 'Reject'] })
|
|
2290
|
+
*
|
|
2291
|
+
* // The form lives in a DEPLOYED APP: no `fields`, but still your outcomes.
|
|
2292
|
+
* hitl({
|
|
2293
|
+
* variant: 'action-app',
|
|
2294
|
+
* app: { name: 'Expense Review', key: '<guid>', folderPath: 'Shared',
|
|
2295
|
+
* inputs: { 'Expense Amount': out('fetchExpense', 'total') } },
|
|
2296
|
+
* outcomes: ['Approve', 'Reject'],
|
|
2297
|
+
* })
|
|
2298
|
+
* ```
|
|
2299
|
+
*
|
|
2300
|
+
* What every variant shares: one `completed` port, and the same two outputs
|
|
2301
|
+
* (`output`, carrying the answers, and `status`, carrying the outcome name) —
|
|
2302
|
+
* all three definitions declare them identically, so downstream reads do not
|
|
2303
|
+
* change when you switch.
|
|
2304
|
+
*
|
|
2305
|
+
* @example
|
|
2306
|
+
* **Pause for a person to approve, then read their decision**
|
|
2307
|
+
* ```ts
|
|
2308
|
+
* .step('review', hitl({
|
|
2309
|
+
* title: 'Review Expense',
|
|
2310
|
+
* fields: [
|
|
2311
|
+
* { id: 'amount', type: 'number', direction: 'input', value: input('amount') },
|
|
2312
|
+
* { id: 'approved', type: 'boolean', direction: 'output' },
|
|
2313
|
+
* { id: 'comments', type: 'text', direction: 'output' },
|
|
2314
|
+
* ],
|
|
2315
|
+
* outcomes: ['Approve', 'Reject'],
|
|
2316
|
+
* }))
|
|
2317
|
+
* .step('log', script({ code: 'return "Decision: " + $vars.review.output.approved;' }))
|
|
2318
|
+
* ```
|
|
2319
|
+
*
|
|
2320
|
+
* @param inputs - The form's fields, outcomes and recipient.
|
|
2321
|
+
* @returns An action spec for `.step(...)`.
|
|
2322
|
+
* @example example-eval/GallerySubmission.flow.ts
|
|
2323
|
+
*/
|
|
2324
|
+
export declare function hitl(inputs: HitlInputs): ActionSpec;
|
|
2325
|
+
/**
|
|
2326
|
+
* Summarize a document with citations — the platform's **Summarize** node.
|
|
2327
|
+
*
|
|
2328
|
+
* @remarks
|
|
2329
|
+
* **The node type is `uipath.pattern.deep-rag`.** The canvas calls it
|
|
2330
|
+
* *Summarize*, its properties panel is titled *Summarize Configuration*, and
|
|
2331
|
+
* the wire type stays `deep-rag` — it is the same node, under the name the
|
|
2332
|
+
* backend service contract uses (`ECS.DeepRag`). There is no
|
|
2333
|
+
* `uipath.pattern.summarize`. (A same-named inline-agent TOOL,
|
|
2334
|
+
* `uipath.agent.resource.tool.builtin.summarize`, is a different family.)
|
|
2335
|
+
*
|
|
2336
|
+
* The answer's fields are **PascalCase** — `content.Text`,
|
|
2337
|
+
* `content.Citations[].{Ordinal, PageNumber, Source, Reference}`. Lowercase
|
|
2338
|
+
* `content.text` resolves to nothing at run time.
|
|
2339
|
+
*
|
|
2340
|
+
* A local run cannot reach the service: it returns the baked
|
|
2341
|
+
* fixture shape, and only a real platform run (`uip maestro flow debug
|
|
2342
|
+
* --attachment <var>=<file>`) calls the model.
|
|
2343
|
+
*
|
|
2344
|
+
* @example
|
|
2345
|
+
* **Summarize an attached contract, with citations**
|
|
2346
|
+
* ```ts
|
|
2347
|
+
* flow('SummarizeDemo')
|
|
2348
|
+
* .input({ documentFile: types.file })
|
|
2349
|
+
* .output({ summary: types.string, citations: types.array })
|
|
2350
|
+
* .step('summarizeContract', summarize({
|
|
2351
|
+
* attachment: out('start', 'documentFile'),
|
|
2352
|
+
* prompt: 'Write a 5-bullet executive summary covering scope, term and SLAs.',
|
|
2353
|
+
* returnCitations: true,
|
|
2354
|
+
* }))
|
|
2355
|
+
* .return({
|
|
2356
|
+
* summary: out('summarizeContract', 'content.Text'),
|
|
2357
|
+
* citations: out('summarizeContract', 'content.Citations'),
|
|
2358
|
+
* })
|
|
2359
|
+
* ```
|
|
2360
|
+
*
|
|
2361
|
+
* @param inputs - The document (`attachment`), the question to answer (`prompt`),
|
|
2362
|
+
* and whether to return citations.
|
|
2363
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2364
|
+
*/
|
|
2365
|
+
export declare function summarize(inputs: SummarizeInputs): ActionSpec;
|
|
2366
|
+
/**
|
|
2367
|
+
* Add AI-generated columns to a CSV — the platform's **Batch transform** node,
|
|
2368
|
+
* `uipath.pattern.batch-transform` (service contract `ECS.BatchTransform`).
|
|
2369
|
+
*
|
|
2370
|
+
* @remarks
|
|
2371
|
+
* The output is a **file handle for the enriched CSV**, not the rows:
|
|
2372
|
+
* `{ ID, FullName, MimeType }` — the service writes a new
|
|
2373
|
+
* `batch-transform-<uuid>.csv` and hands back its attachment. Note `ID`, two
|
|
2374
|
+
* capitals: that is what the platform returns.
|
|
2375
|
+
*
|
|
2376
|
+
* Same dispatch story as {@link summarize} — dry-run fixture locally, a real
|
|
2377
|
+
* model call only on a platform run.
|
|
2378
|
+
*
|
|
2379
|
+
* @example
|
|
2380
|
+
* **Categorize each CSV row with two generated columns**
|
|
2381
|
+
* ```ts
|
|
2382
|
+
* flow('BatchTransformDemo')
|
|
2383
|
+
* .input({ csvFile: types.file })
|
|
2384
|
+
* .output({ result: types.file })
|
|
2385
|
+
* .step('categorizeRows', batchTransform({
|
|
2386
|
+
* attachment: out('start', 'csvFile'),
|
|
2387
|
+
* prompt: 'Classify each row by category and write a one-line summary.',
|
|
2388
|
+
* outputColumns: [
|
|
2389
|
+
* { name: 'Category', description: 'One of: Utility, Software, Travel, Other' },
|
|
2390
|
+
* { name: 'Summary', description: 'Plain-English one-line summary of the row' },
|
|
2391
|
+
* ],
|
|
2392
|
+
* }))
|
|
2393
|
+
* .return({ result: out('categorizeRows') })
|
|
2394
|
+
* ```
|
|
2395
|
+
*
|
|
2396
|
+
* @param inputs - The CSV (`attachment`), the instruction (`prompt`), and the
|
|
2397
|
+
* `outputColumns` to add to each row.
|
|
2398
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2399
|
+
*/
|
|
2400
|
+
export declare function batchTransform(inputs: BatchTransformInputs): ActionSpec;
|
|
2401
|
+
/**
|
|
2402
|
+
* Extract fields from a document with a published IxP project — the platform's
|
|
2403
|
+
* **Extract** node (`uipath.ixp.*`, service contract `IXP.Extraction`).
|
|
2404
|
+
*
|
|
2405
|
+
* @remarks
|
|
2406
|
+
* **The result's shape is three levels deep and PascalCase.** A field lands at
|
|
2407
|
+
* `out('<step>', 'ExtractionResult.ResultsDocument.Fields')` — an array of
|
|
2408
|
+
* `{ FieldId, FieldName, FieldType, IsMissing, Values[], Confidence }`, looked
|
|
2409
|
+
* up by `FieldName`. `Fields[]` is under `ResultsDocument`, not directly under
|
|
2410
|
+
* `ExtractionResult`, and there is no `result` wrapper: the platform's
|
|
2411
|
+
* serializer strips it before the value reaches the variable.
|
|
2412
|
+
*
|
|
2413
|
+
* **A local run cannot extract anything** — extraction needs a real document on
|
|
2414
|
+
* the IxP service. An offline run returns the baked
|
|
2415
|
+
* fixture shape, and only a platform run reaches the model. So a green local
|
|
2416
|
+
* rung proves the wiring and the definition, never that a document was read.
|
|
2417
|
+
*
|
|
2418
|
+
* **`fileRef` is emitted as a PLAIN `=js:` string, not the expression envelope
|
|
2419
|
+
* the rest of the file uses** — the one place this family diverges from the
|
|
2420
|
+
* format's general spelling, and the contract this node owes the platform. The
|
|
2421
|
+
* product's own `ixp-node` validator tests `typeof fileRef !== 'string'` and
|
|
2422
|
+
* refuses the object form (*"inputs.fileRef must be a `=js:$vars.…`
|
|
2423
|
+
* expression"*), the node's registry manifest declares
|
|
2424
|
+
* `{type:'string', minLength:1}`, and so do all 150 v1-authored instances in the
|
|
2425
|
+
* deployed corpus that carry the field — at file versions 1.6, 1.8 and 1.9 alike,
|
|
2426
|
+
* with zero envelopes among them. The RUNTIME
|
|
2427
|
+
* accepts both, so only `uip maestro flow validate` sees a wrong one; the
|
|
2428
|
+
* emitter's exemption lives in `migrate.ts` (`UNWRAPPED_INPUTS`).
|
|
2429
|
+
* See `skill/references/ixp.md` §3.
|
|
2430
|
+
*
|
|
2431
|
+
* @example
|
|
2432
|
+
* **Extract an invoice total and read it out of the nested result**
|
|
2433
|
+
* ```ts
|
|
2434
|
+
* flow('InvoiceIntake')
|
|
2435
|
+
* .input({ invoiceFile: types.file })
|
|
2436
|
+
* .output({ total: types.string })
|
|
2437
|
+
* .step('extract', ixpExtract({
|
|
2438
|
+
* project: 'uipath.ixp.invoiceixp-cef0d447-ixp.ff973488-5d89-8035-86ac-f980b4be6deb-c4359cde-55f0-4f0e-9322-c6cdce74ab4c',
|
|
2439
|
+
* modelName: 'invoiceixp-cef0d447-ixp',
|
|
2440
|
+
* name: 'InvoiceIXP',
|
|
2441
|
+
* folderName: 'Shared',
|
|
2442
|
+
* fileRef: out('start', 'invoiceFile'),
|
|
2443
|
+
* }))
|
|
2444
|
+
* .step('readTotal', script({ code: `
|
|
2445
|
+
* const fields = $vars.extract.output.ExtractionResult.ResultsDocument.Fields || [];
|
|
2446
|
+
* return { total: fields.find(f => f.FieldName === 'invoiceTotal')?.Values?.[0] };
|
|
2447
|
+
* ` }))
|
|
2448
|
+
* .return({ total: out('readTotal', 'total') })
|
|
2449
|
+
* ```
|
|
2450
|
+
*
|
|
2451
|
+
* @param inputs - The published IxP `project` and `modelName`, and the document
|
|
2452
|
+
* to read (`fileRef`).
|
|
2453
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2454
|
+
*/
|
|
2455
|
+
export declare function ixpExtract(inputs: IxpExtractInputs): ActionSpec;
|
|
2456
|
+
/**
|
|
2457
|
+
* Declare a delay — a step that pauses the flow for a fixed length of time and
|
|
2458
|
+
* then carries on.
|
|
2459
|
+
*
|
|
2460
|
+
* @remarks
|
|
2461
|
+
* A delay produces nothing: there is no `out('settle')` to read. It is a wait,
|
|
2462
|
+
* not a value.
|
|
2463
|
+
*
|
|
2464
|
+
* The node itself splits that one duration across two fields (`timerPreset`
|
|
2465
|
+
* holds it directly, or the literal `"custom"` with the real value in
|
|
2466
|
+
* `timerValue`); the serializer picks the encoding, so you state the wait once.
|
|
2467
|
+
*
|
|
2468
|
+
* @example
|
|
2469
|
+
* **Wait thirty seconds before carrying on**
|
|
2470
|
+
* ```ts
|
|
2471
|
+
* .step('settle', delay({ duration: 'PT30S' }))
|
|
2472
|
+
* ```
|
|
2473
|
+
*
|
|
2474
|
+
* @param inputs - How long to wait (`duration`), as an ISO-8601 duration.
|
|
2475
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2476
|
+
*/
|
|
2477
|
+
export declare function delay(inputs: DelayInputs): ActionSpec;
|
|
2478
|
+
/**
|
|
2479
|
+
* Declare a PLACEHOLDER step — "a real node goes here later".
|
|
2480
|
+
*
|
|
2481
|
+
* @remarks
|
|
2482
|
+
* A mock takes **no inputs and publishes nothing**. It is a marker on the canvas
|
|
2483
|
+
* that keeps the graph wired and the flow deployable while one step is still
|
|
2484
|
+
* missing — not a stub that returns test data. `out('extractInvoice')` is
|
|
2485
|
+
* refused at compile time (`MOCK_HAS_NO_OUTPUT`) because it would read `null` at
|
|
2486
|
+
* run time, always.
|
|
2487
|
+
*
|
|
2488
|
+
* Say what belongs there in the step's own name and in the label the canvas
|
|
2489
|
+
* shows; the corpus's placeholders read like
|
|
2490
|
+
* `"Extract Invoice Fields (mock — IxP model not yet published)"`.
|
|
2491
|
+
*
|
|
2492
|
+
* ### Why there are no arguments (convention #191 — the family contract)
|
|
2493
|
+
*
|
|
2494
|
+
* The platform's `core.logic.mock@1.0.0` declares **no `inputDefinition`** and one
|
|
2495
|
+
* output whose `source` is the literal `"null"`. Measured over the 4,033 distinct
|
|
2496
|
+
* archived `.flow` artifacts: **74 mock instances in 62 flows, and 0 carrying a
|
|
2497
|
+
* fixture anywhere in the node** — 71 of them with `inputs: {}` or no `inputs`
|
|
2498
|
+
* key. The 3 exceptions carry free-text `placeholder` / `_placeholder` keys the
|
|
2499
|
+
* definition never declares, invented by agents on runs that scored 0.9 and 0.4.
|
|
2500
|
+
*
|
|
2501
|
+
* **This is NOT a local runner's `kind: 'mock'` test construct**, which returns a
|
|
2502
|
+
* baked fixture. They are different things that share
|
|
2503
|
+
* a name, and a `mock({ fixture })` surface would emit a node whose local
|
|
2504
|
+
* behaviour and deployed behaviour disagree silently — see
|
|
2505
|
+
* [#125](https://github.com/UiPath/flow-builder-sdk/issues/125). Nothing this SDK
|
|
2506
|
+
* emits opens that channel: an SDK-authored mock publishes `null` locally,
|
|
2507
|
+
* exactly as the platform does.
|
|
2508
|
+
*
|
|
2509
|
+
* @example
|
|
2510
|
+
* **Hold a step's place until the real node exists**
|
|
2511
|
+
* ```ts
|
|
2512
|
+
* .step('extractInvoice', mock()) // ← swap for the IxP node once the project exists
|
|
2513
|
+
* ```
|
|
2514
|
+
*
|
|
2515
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2516
|
+
*/
|
|
2517
|
+
export declare function mock(): ActionSpec;
|
|
2518
|
+
/**
|
|
2519
|
+
* Invoke a deployed RPA (robotic process automation) workflow — a classic
|
|
2520
|
+
* UI-automation process, published to Orchestrator, run by a robot.
|
|
2521
|
+
*
|
|
2522
|
+
* @remarks
|
|
2523
|
+
* Three fields identify the process and they all come from the tenant, which is
|
|
2524
|
+
* why they are named exactly as the platform names them:
|
|
2525
|
+
*
|
|
2526
|
+
* key the published process's release key (a GUID). It becomes part of
|
|
2527
|
+
* the node's TYPE — `uipath.core.rpa-workflow.<key>` — so the
|
|
2528
|
+
* platform can tell one process's node from another's.
|
|
2529
|
+
* name the process's name in Orchestrator.
|
|
2530
|
+
* folderPath the Orchestrator folder it lives in.
|
|
2531
|
+
*
|
|
2532
|
+
* `name` + `folderPath` are what the robot is actually started by (the runtime
|
|
2533
|
+
* re-resolves the release from them), and together they are also the process's
|
|
2534
|
+
* `resourceKey`: `"<folderPath>.<name>"`. The serializer emits the two of them
|
|
2535
|
+
* as the flow's process bindings and points the node at them, because a
|
|
2536
|
+
* bindings entry the node does not reference is not a bound process.
|
|
2537
|
+
*
|
|
2538
|
+
* `inputs` are the PROCESS's own input arguments — whatever it declares, by its
|
|
2539
|
+
* own argument names. They are not a fixed schema.
|
|
2540
|
+
*
|
|
2541
|
+
* The step publishes whatever the process returns, under `output`: read a field
|
|
2542
|
+
* with `out('<step>', '<field>')`. Nothing local can check that an argument name
|
|
2543
|
+
* or a returned field name matches the deployed process — only the robot knows —
|
|
2544
|
+
* so a wrong name shows up as a faulted job on a live run, not at compile time.
|
|
2545
|
+
*
|
|
2546
|
+
* @example
|
|
2547
|
+
* **Start a deployed process and read what it returns**
|
|
2548
|
+
* ```ts
|
|
2549
|
+
* .step('getTitle', rpaWorkflow({
|
|
2550
|
+
* key: '486edc26-0658-4ac1-92c9-1ef953927151',
|
|
2551
|
+
* name: 'RPA Workflow',
|
|
2552
|
+
* folderPath: 'Shared/uipath-maestro-flow/ProjectEuler RPA',
|
|
2553
|
+
* inputs: { problemId: 123 },
|
|
2554
|
+
* }))
|
|
2555
|
+
* .return({ title: out('getTitle', 'title') })
|
|
2556
|
+
* ```
|
|
2557
|
+
*
|
|
2558
|
+
* @param inputs - The published process to start (`key`, `name`, `folderPath`),
|
|
2559
|
+
* its `inputs`, and the output fields you read back via `returns`.
|
|
2560
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2561
|
+
*/
|
|
2562
|
+
export declare function rpaWorkflow(inputs: RpaWorkflowInputs): ActionSpec;
|
|
2563
|
+
/**
|
|
2564
|
+
* Invoke a deployed API workflow — a coded workflow published to Orchestrator,
|
|
2565
|
+
* run as a serverless job rather than by a robot.
|
|
2566
|
+
*
|
|
2567
|
+
* @remarks
|
|
2568
|
+
* The same three identifiers as `rpaWorkflow`, for the same reason: `key` is
|
|
2569
|
+
* the key the node's TYPE carries (`uipath.core.api-workflow.<key>`), while
|
|
2570
|
+
* `name` + `folderPath` are what the runtime resolves the job by — and together
|
|
2571
|
+
* they are the workflow's `resourceKey`, `"<folderPath>.<name>"`. The serializer
|
|
2572
|
+
* emits those two as the flow's process bindings and points the node at them.
|
|
2573
|
+
*
|
|
2574
|
+
* The step publishes the job's output arguments under `output`, so
|
|
2575
|
+
* `out('<step>', '<field>')` reads one of the fields `returns` declares. Whether
|
|
2576
|
+
* an argument name or a returned field actually matches the deployed workflow is
|
|
2577
|
+
* something only the tenant knows — a wrong one is a faulted job on a live run,
|
|
2578
|
+
* not a compile error.
|
|
2579
|
+
*
|
|
2580
|
+
* @example
|
|
2581
|
+
* **Start an API workflow and read a declared output argument**
|
|
2582
|
+
* ```ts
|
|
2583
|
+
* .step('getAge', apiWorkflow({
|
|
2584
|
+
* key: 'ce857908-ee1d-4392-b552-38bcea0be29c',
|
|
2585
|
+
* name: 'NameToAgeFixed',
|
|
2586
|
+
* folderPath: 'Shared',
|
|
2587
|
+
* inputs: { name: 'tomasz' },
|
|
2588
|
+
* returns: { EstimatedAge: 'integer' },
|
|
2589
|
+
* }))
|
|
2590
|
+
* .return({ age: out('getAge', 'EstimatedAge') })
|
|
2591
|
+
* ```
|
|
2592
|
+
*
|
|
2593
|
+
* @param inputs - The published API workflow to start (`key`, `name`,
|
|
2594
|
+
* `folderPath`), its `inputs`, and the fields you read back via `returns`.
|
|
2595
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2596
|
+
*/
|
|
2597
|
+
export declare function apiWorkflow(inputs: ApiWorkflowInputs): ActionSpec;
|
|
2598
|
+
/**
|
|
2599
|
+
* Invoke a published Orchestrator **Function** — a deployed unit of code run as
|
|
2600
|
+
* one step (`uipath.core.function.<key>`, dispatched as
|
|
2601
|
+
* `Orchestrator.ExecuteFunctionAsync`).
|
|
2602
|
+
*
|
|
2603
|
+
* ```ts
|
|
2604
|
+
* .step('echo', publishedFunction({
|
|
2605
|
+
* key: '7059bdb5-fdd7-4e13-9d7b-1748aaeb129d',
|
|
2606
|
+
* name: 'acme-echo',
|
|
2607
|
+
* folderPath: 'Shared/acme-echo',
|
|
2608
|
+
* inputs: { message: 'hello' },
|
|
2609
|
+
* returns: { echoed: 'string' },
|
|
2610
|
+
* }))
|
|
2611
|
+
* ```
|
|
2612
|
+
*
|
|
2613
|
+
* The node type carries the key, so the function must already exist on the
|
|
2614
|
+
* tenant — read `key`, `name` and `folderPath` from the registry rather than
|
|
2615
|
+
* constructing them. Like the other published families, the resource identity
|
|
2616
|
+
* is CLOSED by a binding pair (`<folderPath>.<name>`), and two steps on the
|
|
2617
|
+
* same function share one pair.
|
|
2618
|
+
*
|
|
2619
|
+
* @param inputs - The function's identity, its arguments, and what it returns.
|
|
2620
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2621
|
+
*/
|
|
2622
|
+
export declare function publishedFunction(inputs: PublishedFunctionInputs): ActionSpec;
|
|
2623
|
+
/**
|
|
2624
|
+
* Post an assistant message into a live conversation
|
|
2625
|
+
* (`uipath.conversational.send-message`).
|
|
2626
|
+
*
|
|
2627
|
+
* ```ts
|
|
2628
|
+
* .step('answer', sendMessage({
|
|
2629
|
+
* conversationId: out('start', 'conversationId'),
|
|
2630
|
+
* exchangeId: out('listen', 'conversationContext.latestExchangeId'),
|
|
2631
|
+
* content: 'Your order ships tomorrow.',
|
|
2632
|
+
* }))
|
|
2633
|
+
* ```
|
|
2634
|
+
*
|
|
2635
|
+
* The message is Markdown (`text/markdown` is the node's only supported type)
|
|
2636
|
+
* and the role is always `assistant` — a flow speaks as the assistant.
|
|
2637
|
+
*
|
|
2638
|
+
* @param inputs - The conversation, the exchange, and what to say.
|
|
2639
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2640
|
+
*/
|
|
2641
|
+
export declare function sendMessage(inputs: SendMessageInputs): ActionSpec;
|
|
2642
|
+
/**
|
|
2643
|
+
* PAUSE until the person sends their next message
|
|
2644
|
+
* (`uipath.conversational.wait-for-message`) — a catch event, like
|
|
2645
|
+
* `waitForEvent`, so the flow suspends rather than polling.
|
|
2646
|
+
*
|
|
2647
|
+
* ```ts
|
|
2648
|
+
* .step('listen', waitForMessage({ conversationId: out('start', 'conversationId') }))
|
|
2649
|
+
* ```
|
|
2650
|
+
*
|
|
2651
|
+
* It resumes with the conversation context:
|
|
2652
|
+
* `out('listen', 'conversationContext.messages')` is the transcript and
|
|
2653
|
+
* `…conversationContext.latestExchangeId` is the turn to answer.
|
|
2654
|
+
*
|
|
2655
|
+
* @param inputs - The conversation to wait on, and how much history to return.
|
|
2656
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2657
|
+
*/
|
|
2658
|
+
export declare function waitForMessage(inputs: WaitForMessageInputs): ActionSpec;
|
|
2659
|
+
/**
|
|
2660
|
+
* READ a conversation's transcript so far without waiting
|
|
2661
|
+
* (`uipath.conversational.get-conversation-context`) — the shape a
|
|
2662
|
+
* conversational agent takes as its turn context.
|
|
2663
|
+
*
|
|
2664
|
+
* ```ts
|
|
2665
|
+
* .step('history', conversationContext({
|
|
2666
|
+
* conversationId: out('start', 'conversationId'), exchangeLimit: 10,
|
|
2667
|
+
* }))
|
|
2668
|
+
* ```
|
|
2669
|
+
*
|
|
2670
|
+
* @param inputs - The conversation to read, and how many exchanges to return.
|
|
2671
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2672
|
+
*/
|
|
2673
|
+
export declare function conversationContext(inputs: ConversationContextInputs): ActionSpec;
|
|
2674
|
+
/**
|
|
2675
|
+
* Place an outgoing phone call
|
|
2676
|
+
* (`uipath.conversational.voice.create-outgoing-call`) and get back the
|
|
2677
|
+
* `callContext` every other voice step is keyed by.
|
|
2678
|
+
*
|
|
2679
|
+
* ```ts
|
|
2680
|
+
* .step('dial', createOutgoingCall({ from: '+15550001111', to: input('customerPhone') }))
|
|
2681
|
+
* .step('talk', voiceAgent({
|
|
2682
|
+
* systemPrompt: 'Confirm the delivery window, then thank them.',
|
|
2683
|
+
* callContext: out('dial', 'callContext'),
|
|
2684
|
+
* }))
|
|
2685
|
+
* ```
|
|
2686
|
+
*
|
|
2687
|
+
* @param inputs - The provisioned `from` number and the `to` number to dial.
|
|
2688
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2689
|
+
*/
|
|
2690
|
+
export declare function createOutgoingCall(inputs: CreateOutgoingCallInputs): ActionSpec;
|
|
2691
|
+
/**
|
|
2692
|
+
* Hang up (`uipath.conversational.voice.end-call`). Reads
|
|
2693
|
+
* `out('<step>', 'ended')`.
|
|
2694
|
+
*
|
|
2695
|
+
* @param inputs - The `callContext` of the call to end.
|
|
2696
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2697
|
+
*/
|
|
2698
|
+
export declare function endCall(inputs: EndCallInputs): ActionSpec;
|
|
2699
|
+
/**
|
|
2700
|
+
* Put a VOICE agent on a live call (`uipath.agent.voice`) — it speaks and
|
|
2701
|
+
* listens for one turn, then the flow continues.
|
|
2702
|
+
*
|
|
2703
|
+
* ```ts
|
|
2704
|
+
* .trigger(voiceTrigger())
|
|
2705
|
+
* .step('greet', voiceAgent({
|
|
2706
|
+
* systemPrompt: 'Greet {{input.customerName}} and find out why they called.',
|
|
2707
|
+
* inputs: { customerName: input('customerName') },
|
|
2708
|
+
* callContext: out('start', 'callContext'),
|
|
2709
|
+
* voice: { model: 'gemini-3.1-flash-live-preview', persona: 'Kore' },
|
|
2710
|
+
* }))
|
|
2711
|
+
* ```
|
|
2712
|
+
*
|
|
2713
|
+
* Like `inlineAgent`, compile emits the node PLUS a stable
|
|
2714
|
+
* `<source>/agent.json` sidecar. Unlike it, the turn's content comes from the
|
|
2715
|
+
* call rather than from a user-prompt argument. Flow context can still be
|
|
2716
|
+
* supplied through `inputs` and referenced from the system prompt. There are no
|
|
2717
|
+
* declared `returns`: read the turn back as
|
|
2718
|
+
* `out('<step>', 'uipath__agent_response_messages')`.
|
|
2719
|
+
*
|
|
2720
|
+
* @param inputs - The instructions, the call to join, and how the agent sounds.
|
|
2721
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2722
|
+
*/
|
|
2723
|
+
export declare function voiceAgent(inputs: VoiceAgentInputs): ActionSpec;
|
|
2724
|
+
/**
|
|
2725
|
+
* A CONVERSATIONAL agent (`uipath.agent.conversational`) — it answers one turn
|
|
2726
|
+
* of a live chat, reading the transcript rather than flow arguments.
|
|
2727
|
+
*
|
|
2728
|
+
* ```ts
|
|
2729
|
+
* .trigger(conversationTrigger())
|
|
2730
|
+
* .step('listen', waitForMessage({ conversationId: out('start', 'conversationId') }))
|
|
2731
|
+
* .step('reply', conversationalAgent({
|
|
2732
|
+
* model: 'gpt-5.4',
|
|
2733
|
+
* systemPrompt: 'You are a support agent. Be brief.',
|
|
2734
|
+
* settings: { context: out('listen', 'conversationContext') },
|
|
2735
|
+
* }))
|
|
2736
|
+
* ```
|
|
2737
|
+
*
|
|
2738
|
+
* The reply is `out('<step>', 'uipath__agent_response_messages')` — the
|
|
2739
|
+
* platform's own field name. Like `inlineAgent`, compile emits the node plus a
|
|
2740
|
+
* stable `<source>/agent.json` sidecar.
|
|
2741
|
+
*
|
|
2742
|
+
* `sendMessage` is the alternative when the flow (not a model) decides what to
|
|
2743
|
+
* say; this factory is for when the model does.
|
|
2744
|
+
*
|
|
2745
|
+
* @param inputs - The model, the instructions, and how the turn is bound.
|
|
2746
|
+
* @returns An action spec to pass to `.step(...)`.
|
|
2747
|
+
*/
|
|
2748
|
+
export declare function conversationalAgent(inputs: ConversationalAgentInputs): ActionSpec;
|
|
2749
|
+
/**
|
|
2750
|
+
* Invoke a deployed AGENTIC PROCESS — a Maestro process orchestration published to
|
|
2751
|
+
* Orchestrator: a BPMN process that coordinates agents, robots and people, started
|
|
2752
|
+
* as a job the same way an RPA or API workflow is.
|
|
2753
|
+
*
|
|
2754
|
+
* @remarks
|
|
2755
|
+
* The same three identifiers as `rpaWorkflow` and `apiWorkflow`, for the same
|
|
2756
|
+
* reason: `key` is the key the node's TYPE carries
|
|
2757
|
+
* (`uipath.core.agentic-process.<key>`), while `name` + `folderPath` are what
|
|
2758
|
+
* the runtime resolves the job by — and together they are the process's
|
|
2759
|
+
* `resourceKey`, `"<folderPath>.<name>"`. The serializer emits those two as the
|
|
2760
|
+
* flow's process bindings and points the node at them.
|
|
2761
|
+
*
|
|
2762
|
+
* By default the step WAITS for the process and publishes its output arguments
|
|
2763
|
+
* under `output`, so `out('<step>', '<field>')` reads one of the fields
|
|
2764
|
+
* `returns` declares.
|
|
2765
|
+
*
|
|
2766
|
+
* `completion: 'fire-and-forget'` selects the designer's own async switch
|
|
2767
|
+
* instead: the node's service type becomes `Orchestrator.Start…ProcessAsync`
|
|
2768
|
+
* and it publishes no output but `error`. The type is a discriminated union, so
|
|
2769
|
+
* `returns` is impossible in that form and nothing downstream can read one; a
|
|
2770
|
+
* local run dispatches without waiting and yields `{ jobKey, started: true }`.
|
|
2771
|
+
*
|
|
2772
|
+
* `form` picks which published Agentic Process this is — `'bpmn'` (the default,
|
|
2773
|
+
* a Maestro process orchestration), `'flow'` (a published Maestro Flow), or
|
|
2774
|
+
* `'case'` (a Case Management process). They share one public concept and
|
|
2775
|
+
* differ only in wire identity.
|
|
2776
|
+
*
|
|
2777
|
+
* @example
|
|
2778
|
+
* **Start a Maestro process and wait for its result**
|
|
2779
|
+
* ```ts
|
|
2780
|
+
* .step('runIntake', agenticProcess({
|
|
2781
|
+
* key: '4fc450ab-89be-4462-8fc8-21ac4c1d6fb9',
|
|
2782
|
+
* name: 'ProcurementProcess',
|
|
2783
|
+
* folderPath: 'Shared/uipath-agents/ProcurementProcess',
|
|
2784
|
+
* inputs: { productId: 1 },
|
|
2785
|
+
* returns: { status: 'boolean' },
|
|
2786
|
+
* }))
|
|
2787
|
+
* .return({ ok: out('runIntake', 'status') })
|
|
2788
|
+
* ```
|
|
2789
|
+
*
|
|
2790
|
+
* @param inputs - The published Maestro process to start (`key`, `name`,
|
|
2791
|
+
* `folderPath`), its `inputs`, and the fields you read back via `returns`.
|
|
2792
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2793
|
+
*/
|
|
2794
|
+
export declare function agenticProcess(inputs: AgenticProcessInputs): ActionSpec;
|
|
2795
|
+
/**
|
|
2796
|
+
* Invoke an AGENT resource — either one published to Orchestrator or a sibling
|
|
2797
|
+
* agent project registered in the same solution. Both start through
|
|
2798
|
+
* `Orchestrator.StartAgentJob`.
|
|
2799
|
+
*
|
|
2800
|
+
* @remarks
|
|
2801
|
+
* **Coded and low-code agents are the same node.** This one factory authors both.
|
|
2802
|
+
* `registry get` on a coded agent and on a low-code one returns the same node type,
|
|
2803
|
+
* the same service type, the same `sortOrder: 505` and the same bindings shape; the
|
|
2804
|
+
* only difference is the icon, which is what `flavour` sets. Which kind a resource
|
|
2805
|
+
* is a property of what somebody published, not of the flow — so if a task asks for
|
|
2806
|
+
* "a coded agent", what it is asking you to get right is the RESOURCE you point at.
|
|
2807
|
+
*
|
|
2808
|
+
* **What this factory cannot do, said plainly:** it does not create an agent. A
|
|
2809
|
+
* published resource must already be deployed. An in-solution resource must first
|
|
2810
|
+
* be scaffolded and registered with `uip solution projects add`; this factory then
|
|
2811
|
+
* authors the local reference from the registered resource key and project id.
|
|
2812
|
+
*
|
|
2813
|
+
* The three identifiers are separate for `rpaWorkflow`'s reason: `agent` is the key
|
|
2814
|
+
* the node's TYPE carries (`uipath.core.agent.<agent>`), while `name` +
|
|
2815
|
+
* `folderPath` are what the runtime resolves the job by and together are the
|
|
2816
|
+
* `resourceKey`, `"<folderPath>.<name>"`. `folderPath` earns its keep twice here —
|
|
2817
|
+
* see {@link AgentInputs.folderPath} for the two-agents-called-CountLetters case.
|
|
2818
|
+
*
|
|
2819
|
+
* The step WAITS for the job and publishes its output arguments under `output`, so
|
|
2820
|
+
* `out('<step>', '<field>')` reads a field `returns` declares — using the names the
|
|
2821
|
+
* agent's own definition declares, case included.
|
|
2822
|
+
*
|
|
2823
|
+
* ── the live bar, stated ─────────────────────────────────────────────────────────
|
|
2824
|
+
* A green live rung here means **a model responded with the declared output shape**,
|
|
2825
|
+
* not that the answer was right. A real Orchestrator job runs, the flow's input
|
|
2826
|
+
* reaches it, and its answer reaches the flow's output — all four independently
|
|
2827
|
+
* checkable (`ladder.sh job`). Whether the number it returned is the correct number
|
|
2828
|
+
* is the model's business, and no rung asserts it. What CAN be asserted is that the
|
|
2829
|
+
* flow did not fake it: the offline seeds assert the exact UNFIXTURED value, which a
|
|
2830
|
+
* hardcoded answer cannot produce.
|
|
2831
|
+
*
|
|
2832
|
+
* @example
|
|
2833
|
+
* **Start a published agent and read one declared output**
|
|
2834
|
+
* ```ts
|
|
2835
|
+
* .step('countLetters', agent({
|
|
2836
|
+
* key: '6a47dc5b-5fd4-461f-b97d-6c1817abcaaa',
|
|
2837
|
+
* name: 'CountLetters LowCode Agent',
|
|
2838
|
+
* folderPath: 'Shared/uipath-maestro-flow/CountLetters LowCode',
|
|
2839
|
+
* inputs: { inputString: input('word') },
|
|
2840
|
+
* returns: { count: 'integer', inputString: 'string' },
|
|
2841
|
+
* }))
|
|
2842
|
+
* .return({ rs: out('countLetters', 'count') })
|
|
2843
|
+
* ```
|
|
2844
|
+
*
|
|
2845
|
+
* @param inputs - The agent to start (`name`, `folderPath`, and `key` or
|
|
2846
|
+
* `projectId`), its `inputs`, and the fields you read back via `returns`.
|
|
2847
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2848
|
+
*/
|
|
2849
|
+
export declare function agent(inputs: AgentInputs): ActionSpec;
|
|
2850
|
+
/**
|
|
2851
|
+
* Declare an INLINE AUTONOMOUS AGENT — an agent defined inside this flow's own
|
|
2852
|
+
* project rather than published to Orchestrator (`uipath.agent.autonomous`,
|
|
2853
|
+
* `Orchestrator.StartInlineAgentJob`).
|
|
2854
|
+
*
|
|
2855
|
+
* @remarks
|
|
2856
|
+
* **Two artifacts, not one.** The node carries the prompts and the variable
|
|
2857
|
+
* descriptors, and it points at a directory — `source` — where the platform expects
|
|
2858
|
+
* the agent's own configuration (flow-v1 emits `entryPoint: <source>/agent.json`).
|
|
2859
|
+
* So `compile` writes `<source>/agent.json` beside the `.flow`, built from the same
|
|
2860
|
+
* fields. Nothing to assemble by hand; `source` defaults to a uuid derived from the
|
|
2861
|
+
* flow id and step name so a recompile is not a diff.
|
|
2862
|
+
*
|
|
2863
|
+
* **How this differs from `agent()`.** That one references something already
|
|
2864
|
+
* published and started as an Orchestrator job; this one IS the definition, and the
|
|
2865
|
+
* platform runs it inside the flow's own debug/publish context. The practical
|
|
2866
|
+
* consequences: there is no folder, no release key and no binding pair here — and
|
|
2867
|
+
* no `uip` verb that starts one headlessly either.
|
|
2868
|
+
*
|
|
2869
|
+
* ── the live bar, stated ─────────────────────────────────────────────────────────
|
|
2870
|
+
* Weaker than `agent()`'s, and in a specific way. `Orchestrator.StartInlineAgentJob`
|
|
2871
|
+
* is Studio-Web-debug-only, so there is no Orchestrator job to point at and no
|
|
2872
|
+
* headless verb that starts one. No local runner currently calls a model for this
|
|
2873
|
+
* node either — an offline run asserts the WIRING and the declared `returns` shape,
|
|
2874
|
+
* never that a model answered. Two differences would remain for any runner that did
|
|
2875
|
+
* call one: knowledge grounding (a context handle) is a cloud-side index an offline
|
|
2876
|
+
* path does not have, so the call would be ungrounded; and the node's `model` would
|
|
2877
|
+
* have to be substituted for one reachable headlessly. Answer quality stays on the
|
|
2878
|
+
* offline `expect` seeds; real behaviour needs a Studio Web debug run.
|
|
2879
|
+
*
|
|
2880
|
+
* @example
|
|
2881
|
+
* **Classify an email with an agent defined inline**
|
|
2882
|
+
* ```ts
|
|
2883
|
+
* .step('triage', inlineAgent({
|
|
2884
|
+
* model: 'gpt-5.4',
|
|
2885
|
+
* systemPrompt:
|
|
2886
|
+
* 'You are a support triage assistant. Classify the email into exactly one ' +
|
|
2887
|
+
* 'category (billing | technical | account) and one priority (low | normal | ' +
|
|
2888
|
+
* 'high). Return ONLY a JSON object with keys "category" and "priority".',
|
|
2889
|
+
* userPrompt: 'Classify this email:\n{{input.body}}',
|
|
2890
|
+
* inputs: { body: input('body') },
|
|
2891
|
+
* returns: { category: 'string', priority: 'string' },
|
|
2892
|
+
* }))
|
|
2893
|
+
* .return({ category: out('triage', 'category') })
|
|
2894
|
+
* ```
|
|
2895
|
+
*
|
|
2896
|
+
* @param inputs - The agent defined in this project: its `model`,
|
|
2897
|
+
* `systemPrompt`, `userPrompt`, and the `returns` fields it must produce.
|
|
2898
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2899
|
+
*/
|
|
2900
|
+
export declare function inlineAgent(inputs: InlineAgentInputs): ActionSpec;
|
|
2901
|
+
/**
|
|
2902
|
+
* Classify a document into a document type (`uipath.document.classify`). The
|
|
2903
|
+
* result publishes `ClassificationResult` — an array of typed classifications
|
|
2904
|
+
* with page ranges and confidences.
|
|
2905
|
+
*
|
|
2906
|
+
* @param inputs - The file reference and optional page range / split / model settings.
|
|
2907
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2908
|
+
*/
|
|
2909
|
+
export declare function documentClassify(inputs: DocumentClassifyInputs): ActionSpec;
|
|
2910
|
+
/**
|
|
2911
|
+
* Extract fields from a document with an INLINE schema — Dynamic Extract
|
|
2912
|
+
* (`uipath.ixp.extract-document-builder`), the newer of the two extraction
|
|
2913
|
+
* shapes. No deployed IXP project is referenced: the extraction schema rides
|
|
2914
|
+
* the node. The result publishes `ExtractionResult` (and `Taxonomy`).
|
|
2915
|
+
*
|
|
2916
|
+
* @param inputs - The file reference, the inline extraction schema, and
|
|
2917
|
+
* optional page range / model settings.
|
|
2918
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2919
|
+
*/
|
|
2920
|
+
export declare function dynamicExtract(inputs: DynamicExtractInputs): ActionSpec;
|
|
2921
|
+
/**
|
|
2922
|
+
* Read ONE entity record from Data Fabric (`core.datafabric.read`). The record
|
|
2923
|
+
* publishes to the step's `output`; downstream references re-fetch fresh data
|
|
2924
|
+
* at activation time (the engine re-runs the query rather than caching).
|
|
2925
|
+
*
|
|
2926
|
+
* @remarks
|
|
2927
|
+
* **Prefer the connector for Data Fabric work during the transition.**
|
|
2928
|
+
* `core.datafabric.*` has exactly two verbs — this one and
|
|
2929
|
+
* {@link dataFabricUpdate} — and neither declares an output schema. Create,
|
|
2930
|
+
* delete, get-by-id, a multi-record query with a row limit, file record fields
|
|
2931
|
+
* and entity events are NOT in this family: they are operations on the SAME
|
|
2932
|
+
* product reached through its Integration Service connector,
|
|
2933
|
+
* `uipath-uipath-dataservice` (the tenant displays it as **UiPath Data
|
|
2934
|
+
* Fabric**), which covers every verb including the two here.
|
|
2935
|
+
*
|
|
2936
|
+
* Taking this node for the one verb that has a native form leaves the rest of
|
|
2937
|
+
* the same entity on the connector — two connection bindings and two payload
|
|
2938
|
+
* shapes in one flow. So route entity work through the connector unless the
|
|
2939
|
+
* scenario names these nodes; native forms for the remaining verbs are the
|
|
2940
|
+
* direction of travel, and this guidance changes when they land. `check` does
|
|
2941
|
+
* not reject a native node — this is a routing default, not a rule:
|
|
2942
|
+
*
|
|
2943
|
+
* ```ts
|
|
2944
|
+
* .step('create', connector('uipath-uipath-dataservice', 'create-entity-record',
|
|
2945
|
+
* { entityName: 'Contracts', contractTitle: 'Q3 renewal' }, { connection: 'df' }))
|
|
2946
|
+
* ```
|
|
2947
|
+
*
|
|
2948
|
+
* That operation's body fields come from the entity, so the library cannot
|
|
2949
|
+
* carry them: run `npx flow-sdk registry prepare uipath-uipath-dataservice
|
|
2950
|
+
* create-entity-record -f entityName=<Entity>` first (`uip maestro registry
|
|
2951
|
+
* prepare …` is the same command when you are driving through the UiPath CLI). The routing table is in
|
|
2952
|
+
* the `data-fabric.md` reference and the parent-field loop in
|
|
2953
|
+
* `connector-params.md` — cited by name rather than linked, because this
|
|
2954
|
+
* comment renders both into the flat corpus, where those files sit alongside
|
|
2955
|
+
* it, and onto the site, where each symbol is its own page and a relative
|
|
2956
|
+
* `./data-fabric` resolves to nothing.
|
|
2957
|
+
*
|
|
2958
|
+
* @param inputs - The entity, optional filter rows, and folder scope.
|
|
2959
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2960
|
+
*/
|
|
2961
|
+
export declare function dataFabricRead(inputs: DataFabricReadInputs): ActionSpec;
|
|
2962
|
+
/**
|
|
2963
|
+
* Update an entity record in Data Fabric (`core.datafabric.update`). Target the
|
|
2964
|
+
* record by id or through an earlier {@link dataFabricRead} step; downstream
|
|
2965
|
+
* reads of this step observe the record AFTER the write.
|
|
2966
|
+
*
|
|
2967
|
+
* @remarks
|
|
2968
|
+
* The second and last verb of the native family — see {@link dataFabricRead}
|
|
2969
|
+
* for what the family does NOT cover, which connector operation covers it
|
|
2970
|
+
* instead, and why entity work routes through the connector during the
|
|
2971
|
+
* transition. For an update whose flow also creates, gets or deletes on the
|
|
2972
|
+
* same entity, use `connector(…, 'update-entity-record', …)` so the flow keeps
|
|
2973
|
+
* one surface.
|
|
2974
|
+
*
|
|
2975
|
+
* @param inputs - The entity, the record selector, and the columns to write.
|
|
2976
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
2977
|
+
*/
|
|
2978
|
+
export declare function dataFabricUpdate(inputs: DataFabricUpdateInputs): ActionSpec;
|
|
2979
|
+
/**
|
|
2980
|
+
* Declare an Orchestrator QUEUE ITEM step.
|
|
2981
|
+
*
|
|
2982
|
+
* @remarks
|
|
2983
|
+
* A queue is Orchestrator's work list: something puts items on it, and an
|
|
2984
|
+
* automation bound to the queue takes them off one at a time. This step is the
|
|
2985
|
+
* putting-on half.
|
|
2986
|
+
*
|
|
2987
|
+
* `queue` + `folderPath` are what the runtime resolves the queue by, and `key` is
|
|
2988
|
+
* the queue's own Orchestrator key: it joins this node to the flow's queue
|
|
2989
|
+
* bindings, which the serializer emits and points the node at. All three, for the
|
|
2990
|
+
* same reason `rpaWorkflow` takes three — the key is the AUTHORING identity, the
|
|
2991
|
+
* two bindings are the RUNTIME one.
|
|
2992
|
+
*
|
|
2993
|
+
* `item` is the work item's data. It becomes the item's `SpecificContent`, and it
|
|
2994
|
+
* must be FLAT: Orchestrator rejects a nested object or array outright.
|
|
2995
|
+
*
|
|
2996
|
+
* **`wait`** picks between the family's two node types, which are one construct
|
|
2997
|
+
* with two data paths. Default `false` enqueues and moves on, publishing the queue
|
|
2998
|
+
* item's own Orchestrator record — read a field with `out('<step>', 'Key')`, and
|
|
2999
|
+
* nothing extra has to be declared because that record's shape is the same for
|
|
3000
|
+
* every queue. `wait: true` PARKS the flow until the item has been processed and
|
|
3001
|
+
* publishes the consumer's result instead, which is per-automation — so a read of
|
|
3002
|
+
* it needs `returns`, exactly as an rpa process's output does.
|
|
3003
|
+
*
|
|
3004
|
+
* What no rung can tell you: whether anything actually drains this queue. A
|
|
3005
|
+
* `wait: true` step on a queue with no consumer waits until it times out.
|
|
3006
|
+
*
|
|
3007
|
+
* @example
|
|
3008
|
+
* **Enqueue a work item and read its Orchestrator key**
|
|
3009
|
+
* ```ts
|
|
3010
|
+
* .step('enqueue', queueItem({
|
|
3011
|
+
* queue: 'SupplierInvoices',
|
|
3012
|
+
* folderPath: 'Shared',
|
|
3013
|
+
* key: 'fa1a7328-cd17-4525-b5ab-29d86e399312',
|
|
3014
|
+
* item: { InvoiceId: input('invoiceRef'), Amount: input('amount') },
|
|
3015
|
+
* reference: 'INV-2031',
|
|
3016
|
+
* }))
|
|
3017
|
+
* .return({ itemKey: out('enqueue', 'Key') })
|
|
3018
|
+
* ```
|
|
3019
|
+
*
|
|
3020
|
+
* @param inputs - The `queue` and `folderPath`, the `item` to add, and whether
|
|
3021
|
+
* to `wait` for it to be processed.
|
|
3022
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
3023
|
+
*/
|
|
3024
|
+
export declare function queueItem(inputs: QueueItemInputs): ActionSpec;
|
|
3025
|
+
/**
|
|
3026
|
+
* Declare an Integration Service connector action — the typed form, where a
|
|
3027
|
+
* generated descriptor supplies the nodeType and statically-checked input types:
|
|
3028
|
+
* `connector(CreateIssue, { fields: { summary: '…' } }, { connection })`.
|
|
3029
|
+
*
|
|
3030
|
+
* @remarks
|
|
3031
|
+
* `I` is deliberately UNCONSTRAINED. It was `I extends Record<string, unknown>`,
|
|
3032
|
+
* and that quietly disabled the entire typed surface: TypeScript gives implicit
|
|
3033
|
+
* index signatures to type aliases but NOT to interfaces, and the generator emits
|
|
3034
|
+
* `export interface CreateIssueInputs`. So the constraint could never be
|
|
3035
|
+
* satisfied, `I` fell back to its default, and every `connector(Descriptor, …)`
|
|
3036
|
+
* call failed to typecheck with "Index signature for type 'string' is missing".
|
|
3037
|
+
* Nothing caught it because `compile` runs under `--experimental-strip-types`,
|
|
3038
|
+
* which erases types without checking them — the descriptors were typed for a
|
|
3039
|
+
* check that was never performed. The constraint bought nothing (the
|
|
3040
|
+
* implementation signature casts regardless) and cost the feature.
|
|
3041
|
+
*
|
|
3042
|
+
* @param descriptor - The generated operation, from a prepared connector module.
|
|
3043
|
+
* @param inputs - The activity's inputs, typed by the descriptor.
|
|
3044
|
+
* @param opts - Symbolic `connection` / `folder`, an action `version`, and the
|
|
3045
|
+
* `object` a generic operation addresses.
|
|
3046
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
3047
|
+
*/
|
|
3048
|
+
export declare function connector<I, O>(descriptor: ConnectorDescriptor<I, O>, inputs: I, opts?: ConnectorOpts): ActionSpec;
|
|
3049
|
+
/**
|
|
3050
|
+
* Stringly form, for a connector with no prepared module —
|
|
3051
|
+
* `connector('uipath-salesforce-slack', 'send-message-to-channel', { … })`.
|
|
3052
|
+
*
|
|
3053
|
+
* @remarks
|
|
3054
|
+
* `key`/`action` identify the library entry; `inputs` are the connector's
|
|
3055
|
+
* activity inputs; `connection`/`folder` are symbolic names resolved via
|
|
3056
|
+
* `bindings.json`.
|
|
3057
|
+
*
|
|
3058
|
+
* @param key - The connector library key, e.g. `'uipath-atlassian-jira'`.
|
|
3059
|
+
* @param action - The operation id, e.g. `'create-issue'`.
|
|
3060
|
+
* @param inputs - The activity's inputs, checked against the library at build time.
|
|
3061
|
+
* @param opts - Symbolic `connection` / `folder`, an action `version`, and the
|
|
3062
|
+
* `object` a generic operation addresses.
|
|
3063
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
3064
|
+
*/
|
|
3065
|
+
export declare function connector(key: string, action: string, inputs?: Record<string, unknown>, opts?: ConnectorOpts): ActionSpec;
|
|
3066
|
+
/**
|
|
3067
|
+
* One filter condition on the event payload. An ARRAY of these, never an object
|
|
3068
|
+
* map — filters are positional, carry author-supplied field names, and the
|
|
3069
|
+
* designer stores them as a list (the descriptor rule, from PR 1's switch cases).
|
|
3070
|
+
*
|
|
3071
|
+
* Exactly ONE operator key per condition. The vocabulary is the designer's own,
|
|
3072
|
+
* and each form was measured against the platform's filter compiler, so the
|
|
3073
|
+
* emitted `filterExpression` is byte-for-byte what the canvas would have written:
|
|
3074
|
+
*
|
|
3075
|
+
* - text tests, string values: `contains` (case-sensitive substring, the same test
|
|
3076
|
+
* Integration Service applies server-side), `startsWith`, `endsWith`;
|
|
3077
|
+
* - equality, any literal: `equals`, `notEquals`;
|
|
3078
|
+
* - ordering, a NUMBER or an ISO-8601 DATE string: `lessThan`, `lessThanOrEqual`,
|
|
3079
|
+
* `greaterThan`, `greaterThanOrEqual`. A date compares as the designer does
|
|
3080
|
+
* (`to_number(dueDate)<to_number('2026-08-04')`); a plain string under an
|
|
3081
|
+
* ordering operator would match nothing at runtime, so `check` refuses it.
|
|
3082
|
+
*
|
|
3083
|
+
* @remarks
|
|
3084
|
+
* `{ field: 'subject', contains: 'Invoice' }`, `{ field: 'priority', greaterThan: 3 }`,
|
|
3085
|
+
* `{ field: 'dueDate', lessThan: '2026-08-04' }`.
|
|
3086
|
+
*/
|
|
3087
|
+
export type EventFilter = {
|
|
3088
|
+
field: string;
|
|
3089
|
+
} & ({
|
|
3090
|
+
contains: string;
|
|
3091
|
+
} | {
|
|
3092
|
+
startsWith: string;
|
|
3093
|
+
} | {
|
|
3094
|
+
endsWith: string;
|
|
3095
|
+
} | {
|
|
3096
|
+
equals: string | number | boolean;
|
|
3097
|
+
} | {
|
|
3098
|
+
notEquals: string | number | boolean;
|
|
3099
|
+
} | {
|
|
3100
|
+
lessThan: string | number;
|
|
3101
|
+
} | {
|
|
3102
|
+
lessThanOrEqual: string | number;
|
|
3103
|
+
} | {
|
|
3104
|
+
greaterThan: string | number;
|
|
3105
|
+
} | {
|
|
3106
|
+
greaterThanOrEqual: string | number;
|
|
3107
|
+
});
|
|
3108
|
+
/**
|
|
3109
|
+
* The typed `onEvent`/`waitForEvent` options — everything an
|
|
3110
|
+
* {@link EventSubscription} carries except `connector`/`event`, which the
|
|
3111
|
+
* {@link TriggerDescriptor} supplies. `where` is generic so a connection-scoped
|
|
3112
|
+
* descriptor (C4) can type its parameter names; offline it is a loose string map.
|
|
3113
|
+
*/
|
|
3114
|
+
export interface TriggerOptions<W = Record<string, string>> {
|
|
3115
|
+
/**
|
|
3116
|
+
* The subscription's scope — the connector's event parameters, which is what IS
|
|
3117
|
+
* registers. Loose offline; for Outlook `email-received` that is
|
|
3118
|
+
* `{ parentFolderId: '<mail folder id>' }`.
|
|
3119
|
+
*
|
|
3120
|
+
* OPTIONAL, because not every operation has event parameters: HTTP Webhook takes
|
|
3121
|
+
* none (the connection IS the scope), so `onEvent(HttpWebhook)` with no options
|
|
3122
|
+
* at all is correct there. `check` reads the library and says which case you are
|
|
3123
|
+
* in.
|
|
3124
|
+
*
|
|
3125
|
+
* A value may be a {@link LookupToken} — `lookup(EmailReceived,
|
|
3126
|
+
* 'parentFolderId').by('displayName', 'Inbox')` — resolved by `registry
|
|
3127
|
+
* prepare --resolve` and substituted at compile, exactly like a connector
|
|
3128
|
+
* input.
|
|
3129
|
+
*/
|
|
3130
|
+
where?: {
|
|
3131
|
+
[K in keyof W]?: W[K] | LookupToken;
|
|
3132
|
+
};
|
|
3133
|
+
/**
|
|
3134
|
+
* The OBJECT a GENERIC event watches — the one thing its node type does not
|
|
3135
|
+
* say. `record-created` / `record-updated` on Data Fabric, Salesforce,
|
|
3136
|
+
* ServiceNow, Jira and some sixty other connectors fire for ONE object of the
|
|
3137
|
+
* connection (an entity, a table, a custom object), and the library carries no
|
|
3138
|
+
* default for it: `uip is triggers objects <key> <EVENT> --connection-id <id>`
|
|
3139
|
+
* lists the choices. REQUIRED for such an event, refused for a curated one whose
|
|
3140
|
+
* object is built in (Outlook `email-received` is always `Message`). It is not
|
|
3141
|
+
* an event parameter, so it does not go in `where`.
|
|
3142
|
+
*/
|
|
3143
|
+
object?: string;
|
|
3144
|
+
/** Optional filters on the payload. Omit to take every event in scope. */
|
|
3145
|
+
filters?: EventFilter[];
|
|
3146
|
+
/** bindings.json id for the connection (defaults to the flow's single binding). */
|
|
3147
|
+
connection?: string;
|
|
3148
|
+
/** bindings.json id for the folder key. */
|
|
3149
|
+
folder?: string;
|
|
3150
|
+
/** Override the descriptor's version. */
|
|
3151
|
+
version?: string;
|
|
3152
|
+
}
|
|
3153
|
+
/** What a connector event subscribes to. */
|
|
3154
|
+
export interface EventSubscription {
|
|
3155
|
+
/** Connector key, e.g. `'uipath-microsoft-outlook365'`. */
|
|
3156
|
+
connector: string;
|
|
3157
|
+
/** The curated event, e.g. `'email-received'`. */
|
|
3158
|
+
event: string;
|
|
3159
|
+
/**
|
|
3160
|
+
* The connector's event parameters — what SCOPES the subscription. For Outlook
|
|
3161
|
+
* email-received that is `{ parentFolderId: '<mail folder id>' }`; the field
|
|
3162
|
+
* names come from the connector, and the ids are only resolvable against the
|
|
3163
|
+
* bound connection (`uip is triggers describe <key> <EVENT> <object>
|
|
3164
|
+
* --connection-id <id>`).
|
|
3165
|
+
*
|
|
3166
|
+
* **Optional, because not every operation has any.** The HTTP Webhook connector
|
|
3167
|
+
* takes none at all — each connection owns one webhook URL and every request to
|
|
3168
|
+
* it is an event for that connection — so `where: {}` (or omitting it) is the
|
|
3169
|
+
* only correct authoring there, and 20 of 20 deployed `http-webhook` nodes carry
|
|
3170
|
+
* an empty `detail.eventParameters`. Omitting it on an operation that DOES have
|
|
3171
|
+
* parameters is legal too (the subscription listens to everything the connection
|
|
3172
|
+
* can see) and `check` says so as a warning.
|
|
3173
|
+
*
|
|
3174
|
+
* A value may be a {@link LookupToken}, resolved by `registry prepare
|
|
3175
|
+
* --resolve` and substituted at compile.
|
|
3176
|
+
*/
|
|
3177
|
+
where?: Record<string, string | LookupToken>;
|
|
3178
|
+
/**
|
|
3179
|
+
* The OBJECT a GENERIC event watches (a Data Fabric entity, a Salesforce or
|
|
3180
|
+
* ServiceNow object, a Jira record type). Required for such an event, refused
|
|
3181
|
+
* for a curated one; see {@link TriggerOptions.object}.
|
|
3182
|
+
*/
|
|
3183
|
+
object?: string;
|
|
3184
|
+
/** Optional filters on the payload. Omit to take every event in scope. */
|
|
3185
|
+
filters?: EventFilter[];
|
|
3186
|
+
/** bindings.json id for the connection (defaults to the flow's single binding). */
|
|
3187
|
+
connection?: string;
|
|
3188
|
+
/** bindings.json id for the folder key. */
|
|
3189
|
+
folder?: string;
|
|
3190
|
+
version?: string;
|
|
3191
|
+
}
|
|
3192
|
+
/**
|
|
3193
|
+
* Fold a typed `(descriptor, opts)` call into the same {@link EventSubscription}
|
|
3194
|
+
* the stringly form produces, or pass a stringly subscription through unchanged.
|
|
3195
|
+
* Shared by `onEvent` (flow-sdk) and `waitForEvent` so both surfaces stay in
|
|
3196
|
+
* lock-step — the descriptor only supplies `connector`/`event`/`version`.
|
|
3197
|
+
*
|
|
3198
|
+
* @internal Public for compatibility; not an authoring factory.
|
|
3199
|
+
*/
|
|
3200
|
+
export declare function subscriptionFrom<W>(a: EventSubscription | TriggerDescriptor<W, unknown>, opts?: TriggerOptions<W>): EventSubscription;
|
|
3201
|
+
/**
|
|
3202
|
+
* Wait mid-flow until a connector event fires, then continue with its payload —
|
|
3203
|
+
* the typed form, where a generated trigger descriptor identifies the event:
|
|
3204
|
+
* `waitForEvent(EmailReceived, { where: { … } })`.
|
|
3205
|
+
*
|
|
3206
|
+
* @remarks
|
|
3207
|
+
* Read the matched event with `out('waitForReply', 'subject')`. To START a flow on
|
|
3208
|
+
* the event instead, pass `onEvent(...)` to `.trigger(...)` — same subscription,
|
|
3209
|
+
* different node type.
|
|
3210
|
+
*
|
|
3211
|
+
* The stringly form names the connector and event directly:
|
|
3212
|
+
*
|
|
3213
|
+
* ```ts
|
|
3214
|
+
* .step('waitForReply', waitForEvent({
|
|
3215
|
+
* connector: 'uipath-microsoft-outlook365',
|
|
3216
|
+
* event: 'email-received',
|
|
3217
|
+
* where: { parentFolderId: inboxId },
|
|
3218
|
+
* filters: [{ field: 'subject', contains: 'TestWaitFor' }],
|
|
3219
|
+
* }))
|
|
3220
|
+
* ```
|
|
3221
|
+
*
|
|
3222
|
+
* A generated {@link TriggerDescriptor} can supply the connector/event instead:
|
|
3223
|
+
*
|
|
3224
|
+
* ```ts
|
|
3225
|
+
* import { EmailReceived } from './sdk/connectors/uipath-microsoft-outlook365.triggers.ts';
|
|
3226
|
+
* waitForEvent(EmailReceived, { where: { parentFolderId: inboxId },
|
|
3227
|
+
* filters: [{ field: 'subject', contains: 'TestWaitFor' }] })
|
|
3228
|
+
* ```
|
|
3229
|
+
*
|
|
3230
|
+
* @param descriptor - The generated trigger, from a prepared connector module.
|
|
3231
|
+
* @param opts - The event's `where` scope, `filters`, and symbolic
|
|
3232
|
+
* `connection` / `folder`.
|
|
3233
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
3234
|
+
*/
|
|
3235
|
+
export declare function waitForEvent<W>(descriptor: TriggerDescriptor<W, unknown>, opts?: TriggerOptions<W>): ActionSpec;
|
|
3236
|
+
/**
|
|
3237
|
+
* Stringly form, for an event with no prepared module.
|
|
3238
|
+
*
|
|
3239
|
+
* @param subscription - The event to wait for: `connector`, `event`, its `where`
|
|
3240
|
+
* scope, and optional `filters`.
|
|
3241
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
3242
|
+
*/
|
|
3243
|
+
export declare function waitForEvent(subscription: EventSubscription): ActionSpec;
|
|
3244
|
+
export {};
|