@uipath/maestro-builder-sdk 6.20.1 → 6.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-index.md +2 -2
- package/dist/check.js +48 -20
- package/dist/core/script-return.d.ts +14 -4
- package/dist/decompile.js +3 -1
- package/dist/flow-node-type.d.ts +9 -1
- package/dist/nodes/script/flow/check.js +21 -6
- package/dist/nodes/script/flow/node-type.js +17 -8
- package/dist/serialize.d.ts +20 -0
- package/dist/serialize.js +46 -18
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -219,8 +219,8 @@ could hand you spans for a version you do not have.
|
|
|
219
219
|
| `SchedulePreset` | type | `dist/flow-sdk.d.ts:131` | Supporting types | |
|
|
220
220
|
| `script` | function | `dist/nodes/script/flow/factories.d.ts:7-14` | Actions | Declare an inline script action. |
|
|
221
221
|
| `ScriptInputs` | interface | `dist/nodes/script/flow/spec.d.ts:7-44` | Option shapes | 2 field(s) |
|
|
222
|
-
| `ScriptReturns` | type | `dist/core/script-return.d.ts:
|
|
223
|
-
| `ScriptReturnType` | type | `dist/core/script-return.d.ts:31-
|
|
222
|
+
| `ScriptReturns` | type | `dist/core/script-return.d.ts:42-48` | Supporting types | What an author may write for `script({ returns })`: the type outright, or — for an object return — the FIELDS, which is… |
|
|
223
|
+
| `ScriptReturnType` | type | `dist/core/script-return.d.ts:31-41` | Supporting types | The vocabulary a script's output can be declared as. |
|
|
224
224
|
| `sendMessage` | function | `dist/core/actions.d.ts:2438-2456` | Actions | Post an assistant message into a live conversation (`uipath.conversational.send-message`). |
|
|
225
225
|
| `SendMessageInputs` | interface | `dist/core/actions.d.ts:492-511` | Option shapes | 4 field(s) |
|
|
226
226
|
| `ShownField` | interface | `dist/core/actions.d.ts:198-213` | Supporting types | A value the reviewer READS: shown on the form, filled in from the flow. |
|
package/dist/check.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Expr, SCHEDULE_PRESETS, parseIxpProjectType, flatNameOf, flatNameSegmen
|
|
|
9
9
|
import { FlowNode } from './core/node-classes.js';
|
|
10
10
|
import { planContributionBindings } from './core/contribution-bindings.js';
|
|
11
11
|
import { definitionHasErrorPort, errorPortRefusal } from './core/error-port.js';
|
|
12
|
-
import { bundledActionNodeType, bundledDefinition, resolveContributionDefinition } from './serialize.js';
|
|
12
|
+
import { bundledActionNodeType, bundledDefinition, perCallDefinition, resolveContributionDefinition } from './serialize.js';
|
|
13
13
|
import { sdkFormFieldType } from './core/form-field-type.js';
|
|
14
14
|
import { QUEUE_ITEM_RECORD_SCHEMA } from './core/queue-record.js';
|
|
15
15
|
import { AGENTIC_PROCESS_FORMS } from './core/agentic-process-forms.js';
|
|
@@ -4814,6 +4814,7 @@ function checkRegisteredStep(entry, s, exprs, errorSource, opts, diags, typeOf,
|
|
|
4814
4814
|
const ctx = {
|
|
4815
4815
|
step: s.name,
|
|
4816
4816
|
version: impl.version,
|
|
4817
|
+
definition: () => bundledDefinition(impl.typeName, impl.version),
|
|
4817
4818
|
report: (code, message, suggestion) => diags.push(catalogued(entry, s.name, code, message, suggestion)),
|
|
4818
4819
|
declaredRef: (js) => {
|
|
4819
4820
|
const name = declaredRefName(js, triggerId);
|
|
@@ -4951,25 +4952,31 @@ function collectActionExprs(s, out, errorSource) {
|
|
|
4951
4952
|
}
|
|
4952
4953
|
}
|
|
4953
4954
|
/**
|
|
4954
|
-
* The families
|
|
4955
|
-
*
|
|
4956
|
-
*
|
|
4957
|
-
* `agenticProcessDef` / `agentDef` / `ixpExtractDef` set
|
|
4958
|
-
* `supportsErrorHandling: true`; Integration Service connector activities
|
|
4959
|
-
* declare the `error` handle).
|
|
4955
|
+
* The families with no definition this SDK can ask, and an error port anyway:
|
|
4956
|
+
* an Integration Service connector activity's definition comes from the
|
|
4957
|
+
* connector library, and every connector activity declares the `error` handle.
|
|
4960
4958
|
*
|
|
4961
|
-
* Every family
|
|
4962
|
-
* that definition (`bundledActionNodeType` + `definitionHasErrorPort`), so a
|
|
4963
|
-
* family cannot drift from its definition again (#1011: `documentClassify` was
|
|
4964
|
-
* missing here although `uipath.document.classify@1.0` sets the flag).
|
|
4959
|
+
* Every other family is decided by a definition, never by a list:
|
|
4965
4960
|
*
|
|
4966
|
-
*
|
|
4967
|
-
*
|
|
4968
|
-
*
|
|
4961
|
+
* - a bundled family by its bundled definition (`bundledActionNodeType` +
|
|
4962
|
+
* `bundledDefinition`, #1011: `documentClassify` was missing from the old
|
|
4963
|
+
* list although `uipath.document.classify@1.0` sets the flag);
|
|
4964
|
+
* - a per-tenant family (`rpaWorkflow`, `apiWorkflow`, `agenticProcess`,
|
|
4965
|
+
* `publishedFunction`, `agent`, `ixpExtract`) by the definition serialize
|
|
4966
|
+
* synthesizes for it (`perCallDefinition`, #1040: `publishedFunction` was
|
|
4967
|
+
* refused here although `publishedFunctionDef` sets the flag).
|
|
4968
|
+
*
|
|
4969
|
+
* `publishedFunction`'s flag is measured, not assumed: on 2026-10-08 four
|
|
4970
|
+
* `flow debug` jobs on alpha/codereval called `acme-echo` with a non-string
|
|
4971
|
+
* `message` (null, object, number, array). In each, the function job failed
|
|
4972
|
+
* (`Python.FUNCTION_EXECUTION_ERROR`, category User, status 502), the node's
|
|
4973
|
+
* error boundary fired, and the handler's `err('message')` read
|
|
4974
|
+
* "Failure in the Orchestrator Job".
|
|
4975
|
+
*
|
|
4976
|
+
* A kind in none of these (`waitEvent`) has no error port: an event wait
|
|
4977
|
+
* resumes or does not.
|
|
4969
4978
|
*/
|
|
4970
|
-
const
|
|
4971
|
-
'connector', 'rpaWorkflow', 'apiWorkflow', 'agenticProcess', 'agent', 'ixpExtract',
|
|
4972
|
-
]);
|
|
4979
|
+
const NO_DEFINITION_ERROR_PORT_KINDS = new Set(['connector']);
|
|
4973
4980
|
/**
|
|
4974
4981
|
* The ONERROR_NO_ERROR_PORT sentence for a typed step — a built-in family or a
|
|
4975
4982
|
* registered node type — whose node type has no error port. One spelling for
|
|
@@ -5083,9 +5090,30 @@ placed) {
|
|
|
5083
5090
|
// no definition here to ask; version resolution reports that, not this check.
|
|
5084
5091
|
const bundledType = bundledActionNodeType(spec);
|
|
5085
5092
|
const bundledDef = bundledType ? bundledDefinition(bundledType, step.options?.version) : undefined;
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5093
|
+
// A per-tenant family: ask the definition serialize synthesizes for it (#1040).
|
|
5094
|
+
let perCallDef;
|
|
5095
|
+
if (!bundledType) {
|
|
5096
|
+
try {
|
|
5097
|
+
perCallDef = perCallDefinition(spec);
|
|
5098
|
+
}
|
|
5099
|
+
catch {
|
|
5100
|
+
// The family's own checks report a spec its builder cannot lower.
|
|
5101
|
+
return;
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
const def = bundledType ? bundledDef : perCallDef;
|
|
5105
|
+
const noPort = def !== undefined
|
|
5106
|
+
? !definitionHasErrorPort(def)
|
|
5107
|
+
: !bundledType && !NO_DEFINITION_ERROR_PORT_KINDS.has(spec.kind);
|
|
5108
|
+
if (noPort && perCallDef !== undefined) {
|
|
5109
|
+
diags.push({
|
|
5110
|
+
level: 'error',
|
|
5111
|
+
code: 'ONERROR_NO_ERROR_PORT',
|
|
5112
|
+
message: errorPortRefusal(step.name, perCallDef, { bundled: true }),
|
|
5113
|
+
step: step.name,
|
|
5114
|
+
});
|
|
5115
|
+
return;
|
|
5116
|
+
}
|
|
5089
5117
|
if (noPort) {
|
|
5090
5118
|
diags.push({
|
|
5091
5119
|
level: 'error',
|
|
@@ -28,14 +28,24 @@
|
|
|
28
28
|
* into a designer error — the exact defect this file exists to remove, pointed
|
|
29
29
|
* the other way.
|
|
30
30
|
*/
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The vocabulary a script's output can be declared as.
|
|
33
|
+
*
|
|
34
|
+
* `'any'` is the platform's own declaration on `core.action.script@1.1` (the
|
|
35
|
+
* 1.0.0 definition says `'object'`), so it is valid only as the top-level
|
|
36
|
+
* `returns` of a 1.1 step; `check` refuses it on 1.0.0 and as a field type.
|
|
37
|
+
* Declaring it keeps the output open even when the body plainly returns one
|
|
38
|
+
* type; it is also how decompile writes back a 1.1 node whose output a designer
|
|
39
|
+
* left at that default.
|
|
40
|
+
*/
|
|
41
|
+
export type ScriptReturnType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'any';
|
|
33
42
|
/**
|
|
34
43
|
* What an author may write for `script({ returns })`: the type outright, or —
|
|
35
44
|
* for an object return — the FIELDS, which is the spelling every other action's
|
|
36
|
-
* `returns` uses (`http`, `rpaWorkflow`, `agent`).
|
|
45
|
+
* `returns` uses (`http`, `rpaWorkflow`, `agent`). A field's type is never
|
|
46
|
+
* `'any'`.
|
|
37
47
|
*/
|
|
38
|
-
export type ScriptReturns = ScriptReturnType | Record<string, ScriptReturnType
|
|
48
|
+
export type ScriptReturns = ScriptReturnType | Record<string, Exclude<ScriptReturnType, 'any'>>;
|
|
39
49
|
/** A resolved output declaration: a type, and for objects the fields we know. */
|
|
40
50
|
export interface ScriptOutputShape {
|
|
41
51
|
type: ScriptReturnType;
|
package/dist/decompile.js
CHANGED
|
@@ -563,7 +563,9 @@ function emitRegisteredSpec(node, imp, inputNames) {
|
|
|
563
563
|
sourceText: unwrapSource,
|
|
564
564
|
plainValue: unwrapPlain,
|
|
565
565
|
stepName: (nodeId) => nodeId,
|
|
566
|
-
definition
|
|
566
|
+
// The file's carried definition first; the bundled one at the node's version
|
|
567
|
+
// when the file carries none (a hand-trimmed or SDK-written file).
|
|
568
|
+
definition: () => runDefs.get(`${node.type}@${version}`) ?? BUNDLED_DEFINITIONS[`${node.type}@${version}`] ?? runDefs.get(node.type),
|
|
567
569
|
warn: warnOnce,
|
|
568
570
|
};
|
|
569
571
|
const spec = impl.deserialize(node, ctx);
|
package/dist/flow-node-type.d.ts
CHANGED
|
@@ -92,7 +92,10 @@ export interface FlowDeserializeContext {
|
|
|
92
92
|
plainValue(raw: unknown): unknown;
|
|
93
93
|
/** The step name a node id was emitted for. */
|
|
94
94
|
stepName(nodeId: string): string;
|
|
95
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The node's definition: the file's own `definitions[]` entry for it, else the
|
|
97
|
+
* SDK's bundled definition at the node's version; undefined when neither exists.
|
|
98
|
+
*/
|
|
96
99
|
definition(): unknown;
|
|
97
100
|
/** Report something the lift could not keep. Decompile prints it once. */
|
|
98
101
|
warn(message: string): void;
|
|
@@ -119,6 +122,11 @@ export interface FlowCheckContext {
|
|
|
119
122
|
readonly step: string;
|
|
120
123
|
/** The version the node will be emitted at. */
|
|
121
124
|
readonly version: string;
|
|
125
|
+
/**
|
|
126
|
+
* The SDK's bundled definition of this step's node type at `version` (the one
|
|
127
|
+
* serialize emits from), or undefined when the SDK does not ship it.
|
|
128
|
+
*/
|
|
129
|
+
definition(): unknown;
|
|
122
130
|
/** Report a diagnostic on this step. Its severity is the family catalog's for `code`. */
|
|
123
131
|
report(code: string, message: string, suggestion?: string): void;
|
|
124
132
|
/**
|
|
@@ -2,8 +2,22 @@ export const SCRIPT_DIAGNOSTICS = {
|
|
|
2
2
|
SCRIPT_RETURNS_UNKNOWN_TYPE: { severity: 'error', summary: '`returns` names a type the wire format does not know' },
|
|
3
3
|
SCRIPT_EMPTY_RETURNS: { severity: 'warning', summary: '`returns: {}` names no fields' },
|
|
4
4
|
};
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The types a script's `returns` may name for a FIELD, and at the top level on
|
|
7
|
+
* every version. `any` is not one: no definition declares a field as `any`.
|
|
8
|
+
*/
|
|
9
|
+
const SCRIPT_FIELD_TYPES = new Set(['string', 'number', 'boolean', 'object', 'array']);
|
|
10
|
+
/**
|
|
11
|
+
* The types a top-level `returns` may name at this step's version: the field
|
|
12
|
+
* types, plus the output type the node's own definition declares at that version
|
|
13
|
+
* (`any` on `core.action.script@1.1`, `object` on 1.0.0).
|
|
14
|
+
*/
|
|
15
|
+
function topLevelTypes(ctx) {
|
|
16
|
+
const declared = ctx.definition()
|
|
17
|
+
?.outputDefinition?.output?.type;
|
|
18
|
+
return typeof declared === 'string' ? new Set([...SCRIPT_FIELD_TYPES, declared]) : SCRIPT_FIELD_TYPES;
|
|
19
|
+
}
|
|
20
|
+
const quoted = (types) => [...types].map((t) => `"${t}"`).join(', ');
|
|
7
21
|
/**
|
|
8
22
|
* A script step's `returns` — the author overriding what the body looks like.
|
|
9
23
|
*
|
|
@@ -19,9 +33,10 @@ export function checkScript(inputs, ctx) {
|
|
|
19
33
|
if (returns === undefined)
|
|
20
34
|
return;
|
|
21
35
|
if (typeof returns === 'string') {
|
|
22
|
-
|
|
36
|
+
const allowed = topLevelTypes(ctx);
|
|
37
|
+
if (!allowed.has(returns)) {
|
|
23
38
|
ctx.report('SCRIPT_RETURNS_UNKNOWN_TYPE', `Script step "${step}" declares \`returns: ${JSON.stringify(returns)}\`, which is not a type the `
|
|
24
|
-
+ `wire format knows. Use one of ${
|
|
39
|
+
+ `wire format knows at ${ctx.version}. Use one of ${quoted(allowed)}, or a `
|
|
25
40
|
+ `field map like \`{ total: "number" }\` to name an object's fields.`);
|
|
26
41
|
}
|
|
27
42
|
return;
|
|
@@ -41,9 +56,9 @@ export function checkScript(inputs, ctx) {
|
|
|
41
56
|
return;
|
|
42
57
|
}
|
|
43
58
|
for (const [name, type] of Object.entries(fields)) {
|
|
44
|
-
if (typeof type !== 'string' || !
|
|
59
|
+
if (typeof type !== 'string' || !SCRIPT_FIELD_TYPES.has(type)) {
|
|
45
60
|
ctx.report('SCRIPT_RETURNS_UNKNOWN_TYPE', `Script step "${step}" declares field "${name}" as ${JSON.stringify(type)}, which is not a type the `
|
|
46
|
-
+ `wire format knows. Use one of ${
|
|
61
|
+
+ `wire format knows for a field. Use one of ${quoted(SCRIPT_FIELD_TYPES)}.`);
|
|
47
62
|
}
|
|
48
63
|
}
|
|
49
64
|
}
|
|
@@ -23,9 +23,13 @@ import { checkScript } from './check.js';
|
|
|
23
23
|
*/
|
|
24
24
|
function scriptOutputs(base, returns, code) {
|
|
25
25
|
const shape = returns !== undefined ? declaredScriptShape(returns) : inferScriptShape(code);
|
|
26
|
-
// Nothing knowable
|
|
27
|
-
//
|
|
28
|
-
|
|
26
|
+
// Nothing knowable — leave the node exactly as it was. An INFERRED bare object
|
|
27
|
+
// is nothing knowable either: the inference never enumerates fields, so it
|
|
28
|
+
// only says "some object", and the definition's own declaration stands. A
|
|
29
|
+
// DECLARED type always lands, even `object`: the definition's default is
|
|
30
|
+
// version-dependent (`object` on script 1.0.0, `any` on 1.1), so "the same as
|
|
31
|
+
// the default" is not a property of the word `object`.
|
|
32
|
+
if (!shape || (returns === undefined && shape.type === 'object' && !shape.properties))
|
|
29
33
|
return base;
|
|
30
34
|
if (!base || typeof base !== 'object')
|
|
31
35
|
return base;
|
|
@@ -46,7 +50,7 @@ function scriptOutputs(base, returns, code) {
|
|
|
46
50
|
* the same way — a property map the body does not produce is one the author gave
|
|
47
51
|
* as `returns: {…}`.
|
|
48
52
|
*/
|
|
49
|
-
function liftReturns(node, code) {
|
|
53
|
+
function liftReturns(node, code, definitionType) {
|
|
50
54
|
const out = node.outputs?.output;
|
|
51
55
|
const declared = typeof out?.type === 'string' ? out.type : undefined;
|
|
52
56
|
if (!declared)
|
|
@@ -54,11 +58,14 @@ function liftReturns(node, code) {
|
|
|
54
58
|
const props = out?.properties;
|
|
55
59
|
// What re-compiling this body with NO `returns` would declare. Mirror
|
|
56
60
|
// `scriptOutputs` exactly: an inference of a bare `object` (or none at all)
|
|
57
|
-
// leaves the definition's own
|
|
61
|
+
// leaves the definition's own output type standing, untouched. That type is
|
|
62
|
+
// the node's definition AT ITS VERSION (`definitionType`): `object` on script
|
|
63
|
+
// 1.0.0 but `any` on 1.1, so a 1.1 node's untouched `any` is the default, not
|
|
64
|
+
// an author override.
|
|
58
65
|
const inferred = inferScriptShape(code);
|
|
59
66
|
const effective = inferred && !(inferred.type === 'object' && !inferred.properties)
|
|
60
67
|
? inferred
|
|
61
|
-
: { type:
|
|
68
|
+
: { type: definitionType, properties: undefined };
|
|
62
69
|
const same = effective.type === declared
|
|
63
70
|
&& JSON.stringify(sortKeys(effective.properties ?? {})) === JSON.stringify(sortKeys(props ?? {}));
|
|
64
71
|
if (same)
|
|
@@ -95,14 +102,16 @@ function scriptAt(version) {
|
|
|
95
102
|
...(typed !== base ? { outputs: typed } : {}),
|
|
96
103
|
};
|
|
97
104
|
},
|
|
98
|
-
deserialize: (node) => {
|
|
105
|
+
deserialize: (node, ctx) => {
|
|
99
106
|
const raw = node.inputs?.script;
|
|
100
107
|
const code = typeof raw === 'string' ? raw : '';
|
|
101
108
|
// `returns` is recovered only when the node's declared output is something
|
|
102
109
|
// re-compiling the body would NOT produce on its own: serialize infers from
|
|
103
110
|
// the body first, so a script whose type is already plain in its code
|
|
104
111
|
// round-trips without it.
|
|
105
|
-
const
|
|
112
|
+
const defType = ctx.definition()
|
|
113
|
+
?.outputDefinition?.output?.type;
|
|
114
|
+
const returns = liftReturns(node, code, typeof defType === 'string' ? defType : 'object');
|
|
106
115
|
return { kind: 'script', inputs: { code, ...(returns !== undefined ? { returns } : {}) } };
|
|
107
116
|
},
|
|
108
117
|
print: ({ inputs }, ctx) => {
|
package/dist/serialize.d.ts
CHANGED
|
@@ -102,6 +102,26 @@ export declare function bundledActionNodeType(spec: {
|
|
|
102
102
|
kind?: string;
|
|
103
103
|
inputs?: any;
|
|
104
104
|
} | undefined): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
107
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
108
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
109
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
110
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
111
|
+
* every other kind (a bundled family, a connector, a container).
|
|
112
|
+
*
|
|
113
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
114
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
115
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
116
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
117
|
+
*
|
|
118
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
119
|
+
* `ixpExtract` project that is not a node type).
|
|
120
|
+
*/
|
|
121
|
+
export declare function perCallDefinition(spec: {
|
|
122
|
+
kind?: string;
|
|
123
|
+
inputs?: any;
|
|
124
|
+
} | undefined): any | undefined;
|
|
105
125
|
/**
|
|
106
126
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
107
127
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
package/dist/serialize.js
CHANGED
|
@@ -3793,6 +3793,48 @@ export function bundledActionNodeType(spec) {
|
|
|
3793
3793
|
default: return undefined;
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
|
+
/**
|
|
3797
|
+
* The definition serialize synthesizes for a family that has no bundled one:
|
|
3798
|
+
* a published process resource (`rpaWorkflow`, `apiWorkflow`,
|
|
3799
|
+
* `agenticProcess`, `publishedFunction`, `agent`) or an `ixpExtract` step.
|
|
3800
|
+
* Their node type carries a tenant's key, so the SDK builds the definition
|
|
3801
|
+
* per call, transcribed from what `registry get` returns. `undefined` for
|
|
3802
|
+
* every other kind (a bundled family, a connector, a container).
|
|
3803
|
+
*
|
|
3804
|
+
* The emit path builds its definition here, and `check` asks this same
|
|
3805
|
+
* definition whether the node has an error port (#1040), so the two cannot
|
|
3806
|
+
* disagree. For instance `publishedFunction(...)` yields
|
|
3807
|
+
* `uipath.core.function.<key>@1.0.0` with `supportsErrorHandling: true`.
|
|
3808
|
+
*
|
|
3809
|
+
* Throws what the family's builder throws for an unusable spec (an
|
|
3810
|
+
* `ixpExtract` project that is not a node type).
|
|
3811
|
+
*/
|
|
3812
|
+
export function perCallDefinition(spec) {
|
|
3813
|
+
const s = spec?.inputs ?? {};
|
|
3814
|
+
switch (spec?.kind) {
|
|
3815
|
+
case 'publishedFunction':
|
|
3816
|
+
return publishedFunctionDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3817
|
+
case 'apiWorkflow':
|
|
3818
|
+
return apiWorkflowDef({ key: s.key, name: s.name, folderPath: s.folderPath, inputs: s.inputs ?? {}, returns: s.returns });
|
|
3819
|
+
case 'agenticProcess':
|
|
3820
|
+
return agenticProcessDef({
|
|
3821
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3822
|
+
inputs: s.inputs ?? {}, returns: s.returns, form: s.form,
|
|
3823
|
+
});
|
|
3824
|
+
case 'rpaWorkflow':
|
|
3825
|
+
return rpaWorkflowDef({
|
|
3826
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3827
|
+
inputs: s.inputs ?? {}, returns: s.returns,
|
|
3828
|
+
});
|
|
3829
|
+
case 'agent':
|
|
3830
|
+
return agentDef({
|
|
3831
|
+
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
3832
|
+
inputs: s.inputs ?? {}, returns: s.returns, flavour: s.flavour,
|
|
3833
|
+
});
|
|
3834
|
+
case 'ixpExtract': return ixpExtractDef(s);
|
|
3835
|
+
default: return undefined;
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3796
3838
|
/**
|
|
3797
3839
|
* The bundled definition of `nodeType` that `makeNode` resolves: the author's
|
|
3798
3840
|
* exact `{ version }` when given, otherwise the pinned default (the first
|
|
@@ -5267,10 +5309,7 @@ export function serialize(built, opts = {}) {
|
|
|
5267
5309
|
// because `inputs` is required here (the empty-input floor — see
|
|
5268
5310
|
// `AgentInputs.inputs`) and because the emitted binding subtype is `Agent`.
|
|
5269
5311
|
const s = spec.inputs;
|
|
5270
|
-
const def =
|
|
5271
|
-
key: s.key, name: s.name, folderPath: s.folderPath, location: s.location, projectId: s.projectId,
|
|
5272
|
-
inputs: s.inputs, returns: s.returns, flavour: s.flavour,
|
|
5273
|
-
});
|
|
5312
|
+
const def = perCallDefinition(spec);
|
|
5274
5313
|
// The pair's key and folder come off the definition, as for rpa / agentic
|
|
5275
5314
|
// steps: one place decides the in-solution shape.
|
|
5276
5315
|
const pairFolder = def.model.bindings.values.find((v) => v.name === 'folderPath').default;
|
|
@@ -5842,19 +5881,8 @@ export function serialize(built, opts = {}) {
|
|
|
5842
5881
|
const s = spec.inputs;
|
|
5843
5882
|
const nodeInputs = s.inputs ?? {};
|
|
5844
5883
|
const fireAndForget = spec.kind === 'agenticProcess' && spec.inputs.completion === 'fire-and-forget';
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
: spec.kind === 'apiWorkflow'
|
|
5848
|
-
? apiWorkflowDef({ key: spec.inputs.key, name: s.name, folderPath: spec.inputs.folderPath, inputs: nodeInputs, returns: spec.inputs.returns })
|
|
5849
|
-
: spec.kind === 'agenticProcess'
|
|
5850
|
-
? agenticProcessDef({
|
|
5851
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5852
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns, form: spec.inputs.form,
|
|
5853
|
-
})
|
|
5854
|
-
: rpaWorkflowDef({
|
|
5855
|
-
key: spec.inputs.key, name: s.name, folderPath: s.folderPath, location: spec.inputs.location,
|
|
5856
|
-
projectId: spec.inputs.projectId, inputs: nodeInputs, returns: spec.inputs.returns,
|
|
5857
|
-
});
|
|
5884
|
+
// The same definition `check` asks about the error port.
|
|
5885
|
+
const def = perCallDefinition(spec);
|
|
5858
5886
|
// The bindings first: two steps on the same process share ONE pair, and the
|
|
5859
5887
|
// definition's `model.context` names ids that have to exist.
|
|
5860
5888
|
// Read off the definition: one kind carries several subtypes (agenticProcess by `form`).
|
|
@@ -6155,7 +6183,7 @@ export function serialize(built, opts = {}) {
|
|
|
6155
6183
|
}
|
|
6156
6184
|
if (spec.kind === 'ixpExtract') {
|
|
6157
6185
|
const s = spec.inputs;
|
|
6158
|
-
const def =
|
|
6186
|
+
const def = perCallDefinition(spec); // ixpExtractDef: throws on an unparseable project
|
|
6159
6187
|
const { versionId } = parseIxpProjectType(s.project); // ixpExtractDef threw if it could not parse
|
|
6160
6188
|
// The bindings first: two steps on the same project share ONE pair, and
|
|
6161
6189
|
// the definition's `model.bindings.resourceKey` names the key they hang off.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.20.
|
|
3
|
+
"version": "6.20.3",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "15fa01717ebe49d6cf51c9ec11cca4a7ebbf9bb7"
|
|
96
96
|
}
|