@uipath/maestro-builder-sdk 6.120.15 → 6.120.17
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 +42 -42
- package/dist/api-members.md +177 -176
- package/dist/bpmn/bpmn-sdk.d.ts +10 -2
- package/dist/bpmn/bpmn-sdk.js +7 -2
- package/dist/bpmn/decompile.js +0 -1
- package/dist/bpmn/human-task-form.d.ts +1 -3
- package/dist/bpmn/human-task-form.js +23 -14
- package/dist/bpmn-api.md +2 -1
- package/dist/core/connector-inputs.js +29 -2
- package/dist/core/library.d.ts +35 -0
- package/dist/core/library.js +39 -4
- package/package.json +2 -2
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -1535,8 +1535,6 @@ export interface HumanTaskCommonOpts extends ActivityOpts {
|
|
|
1535
1535
|
* the runtime's own outcome routing reads.
|
|
1536
1536
|
*/
|
|
1537
1537
|
outputs?: Record<string, string>;
|
|
1538
|
-
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
1539
|
-
outputVar?: string;
|
|
1540
1538
|
/** `=`-expression that skips the task when truthy. */
|
|
1541
1539
|
skipCondition?: string;
|
|
1542
1540
|
}
|
|
@@ -1569,6 +1567,8 @@ export interface HumanTaskAppOpts extends HumanTaskCommonOpts {
|
|
|
1569
1567
|
key?: string;
|
|
1570
1568
|
/** Data the task shows the human — the node's `HitlTaskArguments`. */
|
|
1571
1569
|
input?: Record<string, unknown>;
|
|
1570
|
+
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
1571
|
+
outputVar?: string;
|
|
1572
1572
|
}
|
|
1573
1573
|
/**
|
|
1574
1574
|
* Options for `.humanTask()` with an INLINE form — the quick-form `Actions.HITL` task,
|
|
@@ -1593,6 +1593,14 @@ export interface HumanTaskFormOpts extends HumanTaskCommonOpts {
|
|
|
1593
1593
|
priority?: string;
|
|
1594
1594
|
/** Action Center labels, comma-separated (`labels`). */
|
|
1595
1595
|
labels?: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* Not on this variant. An inline form has no whole-response output: the runtime fills
|
|
1598
|
+
* a quick form's outputs one answer at a time (`source="=<fieldId>"`, and `=Action`
|
|
1599
|
+
* for the outcome), and a `Process response` row with no source is never filled, so
|
|
1600
|
+
* its variable reads null on a real tenant. Each answer lands in its field's
|
|
1601
|
+
* `variable`; map the outcome, or anything else, with `outputs`.
|
|
1602
|
+
*/
|
|
1603
|
+
outputVar?: never;
|
|
1596
1604
|
}
|
|
1597
1605
|
/**
|
|
1598
1606
|
* Options for `.humanTask()` — an `Actions.HITL` task, backed by an Action App
|
package/dist/bpmn/bpmn-sdk.js
CHANGED
|
@@ -1697,9 +1697,14 @@ class ScopeBuilder {
|
|
|
1697
1697
|
const o = opts;
|
|
1698
1698
|
// The app variant's fields have no meaning on an inline form: the form IS the
|
|
1699
1699
|
// outcomes (`actions`) and what the human sees (`input`).
|
|
1700
|
-
|
|
1700
|
+
// Nor does `outputVar`: the app task's whole-response row has no source, which a
|
|
1701
|
+
// quick form never fills (UiPath/builder-sdk#2139), so there is nothing to name.
|
|
1702
|
+
const appOnly = ['appVersion', 'actions', 'key', 'input', 'outputVar'].filter((k) => opts[k] !== undefined);
|
|
1701
1703
|
if (appOnly.length) {
|
|
1702
|
-
throw new CompileRefusal('BPMN_HUMAN_TASK_APP_FIELDS_ON_FORM', `humanTask "${id}": ${appOnly.join(', ')} belong to an app-backed task. On an inline form, put the outcomes in form.outcomes and what the human sees in form.fields
|
|
1704
|
+
throw new CompileRefusal('BPMN_HUMAN_TASK_APP_FIELDS_ON_FORM', `humanTask "${id}": ${appOnly.join(', ')} belong to an app-backed task. On an inline form, put the outcomes in form.outcomes and what the human sees in form.fields` +
|
|
1705
|
+
(appOnly.includes('outputVar')
|
|
1706
|
+
? '; an inline form has no whole-response variable, so each answer lands in its field\'s variable and the outcome in an outputs mapping, e.g. outputs: { decision: \'=Action\' }.'
|
|
1707
|
+
: '.'));
|
|
1703
1708
|
}
|
|
1704
1709
|
const rows = quickHumanTaskRows(id, this._sugar.processId, o);
|
|
1705
1710
|
return this.pushActivity({
|
package/dist/bpmn/decompile.js
CHANGED
|
@@ -900,7 +900,6 @@ function emitQuickHumanTask(chain, el, payload) {
|
|
|
900
900
|
['priority', rest.priority !== undefined ? tsText(rest.priority) : undefined],
|
|
901
901
|
['labels', rest.labels !== undefined ? tsText(rest.labels) : undefined],
|
|
902
902
|
['outputs', record(rest.outputs)],
|
|
903
|
-
['outputVar', rest.outputVar !== undefined ? tsText(rest.outputVar) : undefined],
|
|
904
903
|
['skipCondition', payload.skipCondition !== undefined ? tsText(payload.skipCondition) : undefined],
|
|
905
904
|
['tags', tagsOf(el)],
|
|
906
905
|
['retry', emitRetry(retryOf(el))],
|
|
@@ -110,8 +110,6 @@ export interface QuickHumanTaskInput {
|
|
|
110
110
|
labels?: string;
|
|
111
111
|
/** Extra output rows: variable id → `=`-expression against the response, e.g. `{ decision: '=Action' }`. */
|
|
112
112
|
outputs?: Record<string, string>;
|
|
113
|
-
/** Variable the whole typed response lands in. Defaults to `<id>_processResponse`. */
|
|
114
|
-
outputVar?: string;
|
|
115
113
|
}
|
|
116
114
|
/** The rows a quick human task is written as. */
|
|
117
115
|
export interface QuickHumanTaskRows {
|
|
@@ -156,7 +154,7 @@ export type LiftedQuickHumanTask = QuickHumanTaskInput;
|
|
|
156
154
|
*
|
|
157
155
|
* Best effort by construction, and safe because of the last step: the lifted options
|
|
158
156
|
* are run through {@link quickHumanTaskRows} and the result must equal the node's rows,
|
|
159
|
-
* order and all. A Studio Web task (sidecar schema, `_schemaFileId
|
|
157
|
+
* order and all. A Studio Web task (sidecar schema, `_schemaFileId`)
|
|
160
158
|
* fails that and stays the verbatim `.activity()` it was.
|
|
161
159
|
*
|
|
162
160
|
* @param node - The node's rows, as decompile read them.
|
|
@@ -4,8 +4,16 @@ import { schemaId as stableSchemaId } from '../core/stable-id.js';
|
|
|
4
4
|
import { CompileRefusal } from '../core/compile-refusal.js';
|
|
5
5
|
/** The `uipath:type` version both the converter and Studio Web write for `Actions.HITL`. */
|
|
6
6
|
const QUICK_TYPE_VERSION = 'v2';
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The app variant's whole-response row, which a quick form does NOT carry.
|
|
9
|
+
*
|
|
10
|
+
* The registry declares it with a type and no `source` (`type="Actions.HITL"`). On an
|
|
11
|
+
* app task the platform resolves that; on a quick form the runtime fills only rows with
|
|
12
|
+
* a source, so its variable stays null. A quick form therefore writes one row per answer
|
|
13
|
+
* plus `=Action` and nothing else (see {@link quickHumanTaskRows}). The name is kept only
|
|
14
|
+
* so a lift can recognise a legacy file that carries the row and keep it verbatim.
|
|
15
|
+
*/
|
|
16
|
+
const LEGACY_RESPONSE_ROW = 'Process response';
|
|
9
17
|
const DRAFT_07 = 'http://json-schema.org/draft-07/schema#';
|
|
10
18
|
/**
|
|
11
19
|
* A field id has to be a plain, unreserved identifier, for two reasons.
|
|
@@ -110,7 +118,6 @@ function validate(id, input) {
|
|
|
110
118
|
}
|
|
111
119
|
writers.set(variable, writer);
|
|
112
120
|
};
|
|
113
|
-
claim(input.outputVar ?? `${id}_processResponse`, 'the task response (outputVar)');
|
|
114
121
|
for (const f of form.fields)
|
|
115
122
|
if (isAnswer(f))
|
|
116
123
|
claim(f.variable ?? f.id, `form field "${f.id}"`);
|
|
@@ -191,13 +198,12 @@ export function quickHumanTaskRows(id, processId, input) {
|
|
|
191
198
|
{ name: 'HitlTaskArguments', type: 'json', target: 'bodyField', body: Object.fromEntries(shown.map((f) => [f.id, f.value])) },
|
|
192
199
|
];
|
|
193
200
|
const fieldById = new Map(form.fields.map((f) => [f.id, f]));
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
];
|
|
201
|
+
// One row per answer, each with its source — no sourceless whole-response row (see
|
|
202
|
+
// LEGACY_RESPONSE_ROW): the runtime never fills one on a quick form.
|
|
203
|
+
const outputRows = form.fields.filter(isAnswer).map((f) => {
|
|
204
|
+
const v = f.variable ?? f.id;
|
|
205
|
+
return { name: v, type: rowTypeOf(f.type), source: `=${f.id}`, var: v, custom: true };
|
|
206
|
+
});
|
|
201
207
|
const mappedOutputRows = Object.entries(input.outputs ?? {}).map(([v, source]) => {
|
|
202
208
|
// The fallback type: an answer's field type for `=<fieldId>`, `string` otherwise
|
|
203
209
|
// (`=Action`, the outcome NAME, is a string). A declared variable overrides it.
|
|
@@ -242,7 +248,7 @@ function bodyValue(body) {
|
|
|
242
248
|
*
|
|
243
249
|
* Best effort by construction, and safe because of the last step: the lifted options
|
|
244
250
|
* are run through {@link quickHumanTaskRows} and the result must equal the node's rows,
|
|
245
|
-
* order and all. A Studio Web task (sidecar schema, `_schemaFileId
|
|
251
|
+
* order and all. A Studio Web task (sidecar schema, `_schemaFileId`)
|
|
246
252
|
* fails that and stays the verbatim `.activity()` it was.
|
|
247
253
|
*
|
|
248
254
|
* @param node - The node's rows, as decompile read them.
|
|
@@ -285,9 +291,13 @@ export function liftQuickHumanTask(node, processId, authoredVarType = () => unde
|
|
|
285
291
|
return outcomeIdOf(name, i) === o.id ? name : { name, id: String(o.id) };
|
|
286
292
|
});
|
|
287
293
|
const schemaId = String(schema.id);
|
|
288
|
-
|
|
294
|
+
// A legacy file carries the sourceless response row. Nothing lifts it:
|
|
295
|
+
// `.humanTask({ form })` does not write it, so the node stays the verbatim
|
|
296
|
+
// `.activity()` it was rather than being silently rewritten.
|
|
297
|
+
if (node.outputRows.some((r) => r.name === LEGACY_RESPONSE_ROW && r.source === undefined))
|
|
298
|
+
return undefined;
|
|
289
299
|
const answerVars = new Set(fields.filter((f) => f.direction !== 'input').map((f) => f.variable ?? f.id));
|
|
290
|
-
const extra = node.outputRows.
|
|
300
|
+
const extra = node.outputRows.filter((r) => r.var !== undefined && !answerVars.has(r.var) && !r.custom);
|
|
291
301
|
lifted = {
|
|
292
302
|
form: { fields, outcomes, ...(schemaId !== stableSchemaId(processId, node.id) ? { schemaId } : {}) },
|
|
293
303
|
...(node.name !== undefined ? { name: node.name } : {}),
|
|
@@ -295,7 +305,6 @@ export function liftQuickHumanTask(node, processId, authoredVarType = () => unde
|
|
|
295
305
|
...(ctx.has('priority') ? { priority: ctx.get('priority').value } : {}),
|
|
296
306
|
...(ctx.has('labels') ? { labels: ctx.get('labels').value } : {}),
|
|
297
307
|
...(extra.length ? { outputs: Object.fromEntries(extra.map((r) => [r.var, r.source ?? ''])) } : {}),
|
|
298
|
-
...(response?.var !== undefined && response.var !== `${node.id}_processResponse` ? { outputVar: response.var } : {}),
|
|
299
308
|
};
|
|
300
309
|
}
|
|
301
310
|
catch {
|
package/dist/bpmn-api.md
CHANGED
|
@@ -494,6 +494,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
494
494
|
- `HumanTaskAppOpts.actions?: string[]` — The outcomes a human can pick, e.g. `['approve', 'reject']`.
|
|
495
495
|
- `HumanTaskAppOpts.key?: string` — An existing task key, when resuming rather than creating (`key`).
|
|
496
496
|
- `HumanTaskAppOpts.input?: Record<string, unknown>` — Data the task shows the human — the node's `HitlTaskArguments`.
|
|
497
|
+
- `HumanTaskAppOpts.outputVar?: string` — Variable the whole typed response lands in.
|
|
497
498
|
|
|
498
499
|
### `HumanTaskFormOpts`
|
|
499
500
|
|
|
@@ -505,6 +506,7 @@ Extends `HumanTaskCommonOpts` — its fields and methods apply here too.
|
|
|
505
506
|
- `HumanTaskFormOpts.app?: never` — Not on this variant — the form replaces the app.
|
|
506
507
|
- `HumanTaskFormOpts.priority?: string` — Action Center priority, e.g. `'Medium'` (`priority`).
|
|
507
508
|
- `HumanTaskFormOpts.labels?: string` — Action Center labels, comma-separated (`labels`).
|
|
509
|
+
- `HumanTaskFormOpts.outputVar?: never` — Not on this variant.
|
|
508
510
|
|
|
509
511
|
### `JoinOpts`
|
|
510
512
|
|
|
@@ -546,7 +548,6 @@ Extends `ActivityOpts` — its fields and methods apply here too.
|
|
|
546
548
|
- `HumanTaskCommonOpts.name?: string` — Display name the designer shows on the task.
|
|
547
549
|
- `HumanTaskCommonOpts.title?: string` — The task title a human sees (`taskTitle`).
|
|
548
550
|
- `HumanTaskCommonOpts.outputs?: Record<string, string>` — Fields to pull out of the human's response into variables, e.g. `{ decision: '=Action' }`.
|
|
549
|
-
- `HumanTaskCommonOpts.outputVar?: string` — Variable the whole typed response lands in.
|
|
550
551
|
- `HumanTaskCommonOpts.skipCondition?: string` — `=`-expression that skips the task when truthy.
|
|
551
552
|
|
|
552
553
|
## Supporting types
|
|
@@ -101,7 +101,26 @@ export function buildConnectorInputs(rc, inputs, opts) {
|
|
|
101
101
|
const policy = { unresolvedLookups };
|
|
102
102
|
const fields = (rc.fields ?? []);
|
|
103
103
|
const byName = new Map(fields.map((f) => [f.name, f]));
|
|
104
|
-
|
|
104
|
+
// An operation whose input schema the connection resolves, with no `prepare`
|
|
105
|
+
// recorded (`inputFieldsOpen`): the field list is the tenant-agnostic subset,
|
|
106
|
+
// so an input outside it is not a mistake this side can see. It is passed
|
|
107
|
+
// through to the body, the slot an undeclared input has always meant, and
|
|
108
|
+
// `check` warns about it as CUSTOM_FIELDS_UNPREPARED with the `prepare` that
|
|
109
|
+
// records the real schema. A Data Fabric `create-entity-record` step saved by
|
|
110
|
+
// Studio Web carries the entity's columns (`Name: "Ada"`) this way.
|
|
111
|
+
//
|
|
112
|
+
// Not passed through: an input inside an array element (no flat wire name
|
|
113
|
+
// to give it), and a `lookup()` / `resource()` token (nothing records its id).
|
|
114
|
+
const passThrough = [];
|
|
115
|
+
const onUnknown = rc.inputFieldsOpen === true
|
|
116
|
+
? (path, value) => {
|
|
117
|
+
if (path.includes('[*]') || isLookupToken(value) || isResourceToken(value))
|
|
118
|
+
return false;
|
|
119
|
+
passThrough.push({ path, value });
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
: undefined;
|
|
123
|
+
const errs = validateNestedConnectorKeys(fields, inputs, byName, dialect, onUnknown);
|
|
105
124
|
/** The unresolved lookups among `errs`: when they are all of them, the refusal is LOOKUP_UNRESOLVED. */
|
|
106
125
|
const owed = [];
|
|
107
126
|
/** The unresolved resources among `errs`, each with the refusal `resolveRecordedResource` raised. */
|
|
@@ -185,6 +204,8 @@ export function buildConnectorInputs(rc, inputs, opts) {
|
|
|
185
204
|
const slot = ownEntry(SLOT_FOR_LOCATION, location) ?? 'bodyParameters';
|
|
186
205
|
routed[slot][f.name] = render(nested.value);
|
|
187
206
|
}
|
|
207
|
+
for (const { path, value } of passThrough)
|
|
208
|
+
routed.bodyParameters[path] = render(value);
|
|
188
209
|
// Inputs that are fine but for lookups `prepare` has not recorded are that one
|
|
189
210
|
// condition, LOOKUP_UNRESOLVED, with the one command that records them all.
|
|
190
211
|
if (errs.length && owed.length === errs.length) {
|
|
@@ -618,7 +639,9 @@ function buildConnectorInputTrie(fields) {
|
|
|
618
639
|
return root;
|
|
619
640
|
}
|
|
620
641
|
/** Reject nested typos with the same unknown-key message as flat keys. */
|
|
621
|
-
function validateNestedConnectorKeys(fields, inputs, exact, dialect
|
|
642
|
+
function validateNestedConnectorKeys(fields, inputs, exact, dialect,
|
|
643
|
+
/** Takes an unknown input instead of reporting it, when it returns true. */
|
|
644
|
+
onUnknown) {
|
|
622
645
|
const root = buildConnectorInputTrie(fields);
|
|
623
646
|
const errs = [];
|
|
624
647
|
const bare = new Set(bareArraySpellings(fields, exact).values());
|
|
@@ -647,6 +670,8 @@ function validateNestedConnectorKeys(fields, inputs, exact, dialect) {
|
|
|
647
670
|
const child = node.children.get(key);
|
|
648
671
|
const childPath = path ? `${path}.${key}` : key;
|
|
649
672
|
if (!child) {
|
|
673
|
+
if (onUnknown?.(childPath, childValue))
|
|
674
|
+
continue;
|
|
650
675
|
const near = nearestField(childPath, fields.map((f) => f.name));
|
|
651
676
|
errs.push(`unknown input "${childPath}"${near ? ` — did you mean "${near}"?` : ''}`);
|
|
652
677
|
}
|
|
@@ -667,6 +692,8 @@ function validateNestedConnectorKeys(fields, inputs, exact, dialect) {
|
|
|
667
692
|
continue;
|
|
668
693
|
}
|
|
669
694
|
if (!node) {
|
|
695
|
+
if (onUnknown?.(key, value))
|
|
696
|
+
continue;
|
|
670
697
|
const near = nearestField(key, [...exact.keys()]);
|
|
671
698
|
errs.push(`unknown input "${key}"${near ? ` — did you mean "${near}"?` : ''}`);
|
|
672
699
|
}
|
package/dist/core/library.d.ts
CHANGED
|
@@ -74,7 +74,36 @@ export interface ResolvedConnector {
|
|
|
74
74
|
source: string;
|
|
75
75
|
tier: string;
|
|
76
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* True when `fields` is not the operation's whole input set: the operation
|
|
79
|
+
* resolves its real input schema from the connection, and no `registry
|
|
80
|
+
* prepare` has recorded it here. See {@link inputSchemaFromConnection}.
|
|
81
|
+
*
|
|
82
|
+
* Data Fabric `create-entity-record` is the case: the library lists
|
|
83
|
+
* `entityName` and `expansionLevel`, and the entity's own columns (`Name`,
|
|
84
|
+
* `Email`, …) exist only on the tenant. Studio Web saves those columns as body
|
|
85
|
+
* parameters, so a saved step carries inputs the library has never heard of.
|
|
86
|
+
* `buildConnectorInputs` passes such an input through to the body instead of
|
|
87
|
+
* refusing it as `unknown input`; `check` warns about it as
|
|
88
|
+
* CUSTOM_FIELDS_UNPREPARED, with the `prepare` that records the real schema.
|
|
89
|
+
* A prepared operation leaves this unset, so its inputs are checked strictly.
|
|
90
|
+
*/
|
|
91
|
+
inputFieldsOpen?: true;
|
|
77
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Whether a library entry's INPUT field list is resolved from the connection at
|
|
95
|
+
* design time: the operation needs a connection for its schema
|
|
96
|
+
* (`runtime.requiresConnectionForSchema`) and its schema action replaces the
|
|
97
|
+
* input half (`operation.schemaAction.replaces` is `input` or `both`).
|
|
98
|
+
*
|
|
99
|
+
* Both halves matter. `requiresConnectionForSchema` alone is set on every
|
|
100
|
+
* operation of a connector with field discovery (Slack's `send-message`
|
|
101
|
+
* included), whose static field list is complete; and an action that replaces
|
|
102
|
+
* only the `output` leaves the input list authoritative. In the library of
|
|
103
|
+
* #2053, 41 of 1,739 operations pass this test, all of them `Curated`
|
|
104
|
+
* (Data Fabric's record operations, Jira `create-issue`, Smartsheet `add-row`, …).
|
|
105
|
+
*/
|
|
106
|
+
export declare function inputSchemaFromConnection(entry: unknown): boolean;
|
|
78
107
|
/**
|
|
79
108
|
* Where a connector input rides on the wire.
|
|
80
109
|
*
|
|
@@ -552,6 +581,12 @@ export declare class Library {
|
|
|
552
581
|
* of the entries each layer resolves are UNIONED: the overlay can ADD fields
|
|
553
582
|
* but never drop ones the baked library already exposed (C4).
|
|
554
583
|
*/
|
|
584
|
+
/**
|
|
585
|
+
* Whether the connection-scoped overlay carries a `prepare` row for this
|
|
586
|
+
* operation. A row fetched through `uip` has no connection behind it, so it
|
|
587
|
+
* does not count (the same rule as {@link schemaReadiness}).
|
|
588
|
+
*/
|
|
589
|
+
private preparedInOverlay;
|
|
555
590
|
private resolveType;
|
|
556
591
|
/**
|
|
557
592
|
* Turn a lookup miss into something actionable: which operations this connector
|
package/dist/core/library.js
CHANGED
|
@@ -17,6 +17,26 @@ import { ConnectorResolveError } from './connector-resolve-error.js';
|
|
|
17
17
|
import { CompileRefusal } from './compile-refusal.js';
|
|
18
18
|
import { transportHttpMethod } from './connector-inputs.js';
|
|
19
19
|
import { wireActivityTypeMatches } from './connector-configuration.js';
|
|
20
|
+
/**
|
|
21
|
+
* Whether a library entry's INPUT field list is resolved from the connection at
|
|
22
|
+
* design time: the operation needs a connection for its schema
|
|
23
|
+
* (`runtime.requiresConnectionForSchema`) and its schema action replaces the
|
|
24
|
+
* input half (`operation.schemaAction.replaces` is `input` or `both`).
|
|
25
|
+
*
|
|
26
|
+
* Both halves matter. `requiresConnectionForSchema` alone is set on every
|
|
27
|
+
* operation of a connector with field discovery (Slack's `send-message`
|
|
28
|
+
* included), whose static field list is complete; and an action that replaces
|
|
29
|
+
* only the `output` leaves the input list authoritative. In the library of
|
|
30
|
+
* #2053, 41 of 1,739 operations pass this test, all of them `Curated`
|
|
31
|
+
* (Data Fabric's record operations, Jira `create-issue`, Smartsheet `add-row`, …).
|
|
32
|
+
*/
|
|
33
|
+
export function inputSchemaFromConnection(entry) {
|
|
34
|
+
if (!entry || typeof entry !== 'object')
|
|
35
|
+
return false;
|
|
36
|
+
const e = entry;
|
|
37
|
+
const replaces = e.operation?.schemaAction?.replaces;
|
|
38
|
+
return e.runtime?.requiresConnectionForSchema === true && (replaces === 'input' || replaces === 'both');
|
|
39
|
+
}
|
|
20
40
|
export { ConnectorResolveError } from './connector-resolve-error.js';
|
|
21
41
|
/**
|
|
22
42
|
* The `provenance` a definition fetched through `uip` carries, on its entry and
|
|
@@ -297,8 +317,7 @@ export class Library {
|
|
|
297
317
|
|| entry?.connector?.discovery?.hasCustomFieldDiscovery === true;
|
|
298
318
|
if (!connectionResolved)
|
|
299
319
|
return { kind: 'static', prepared: true };
|
|
300
|
-
|
|
301
|
-
if (rows.some(({ overlay, row }) => overlay && row.provenance !== FETCHED_PROVENANCE))
|
|
320
|
+
if (this.preparedInOverlay(nodeType, version))
|
|
302
321
|
return { kind: 'customFields', prepared: true };
|
|
303
322
|
let bakedFields = [];
|
|
304
323
|
try {
|
|
@@ -740,6 +759,16 @@ export class Library {
|
|
|
740
759
|
* of the entries each layer resolves are UNIONED: the overlay can ADD fields
|
|
741
760
|
* but never drop ones the baked library already exposed (C4).
|
|
742
761
|
*/
|
|
762
|
+
/**
|
|
763
|
+
* Whether the connection-scoped overlay carries a `prepare` row for this
|
|
764
|
+
* operation. A row fetched through `uip` has no connection behind it, so it
|
|
765
|
+
* does not count (the same rule as {@link schemaReadiness}).
|
|
766
|
+
*/
|
|
767
|
+
preparedInOverlay(nodeType, version) {
|
|
768
|
+
return this.layers.some((layer) => layer.overlay === true && layer.entries.some((row) => row?.nodeType === nodeType
|
|
769
|
+
&& (!version || String(row.version) === version)
|
|
770
|
+
&& row.provenance !== FETCHED_PROVENANCE));
|
|
771
|
+
}
|
|
743
772
|
resolveType(nodeType, version, objectName, report = true) {
|
|
744
773
|
// A generic operation that carries other objects but not this one is a miss
|
|
745
774
|
// too: a fetch writes only the objects asked for, so a second object is
|
|
@@ -757,11 +786,17 @@ export class Library {
|
|
|
757
786
|
resolved.push(r);
|
|
758
787
|
}
|
|
759
788
|
if (resolved.length) {
|
|
789
|
+
// An input schema the connection resolves is open until a `prepare` row
|
|
790
|
+
// records it. Read from any layer's entry: a prepared overlay copy may not
|
|
791
|
+
// carry the schema action, which is the case where it does not matter.
|
|
792
|
+
const open = resolved.some((r) => inputSchemaFromConnection(r.entry))
|
|
793
|
+
&& !this.preparedInOverlay(nodeType, version);
|
|
794
|
+
const withOpen = (rc) => (open ? { ...rc, inputFieldsOpen: true } : rc);
|
|
760
795
|
// Metadata comes from the highest-priority layer (the overlay when
|
|
761
796
|
// present); fields are the UNION across all layers.
|
|
762
797
|
const primary = resolved[0];
|
|
763
798
|
if (resolved.length === 1)
|
|
764
|
-
return primary;
|
|
799
|
+
return withOpen(primary);
|
|
765
800
|
const byName = new Map();
|
|
766
801
|
// Insert lowest-priority (baked) first so a shared field keeps the baked
|
|
767
802
|
// position but takes the overlay's (higher-priority) definition.
|
|
@@ -769,7 +804,7 @@ export class Library {
|
|
|
769
804
|
for (const f of resolved[i].fields)
|
|
770
805
|
byName.set(f.name, f);
|
|
771
806
|
}
|
|
772
|
-
return { ...primary, fields: [...byName.values()] };
|
|
807
|
+
return withOpen({ ...primary, fields: [...byName.values()] });
|
|
773
808
|
}
|
|
774
809
|
const missing = !this.carries(nodeType);
|
|
775
810
|
if (missing && report)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.17",
|
|
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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "9f8380b59b3b445b01bf0b09b0a4a964ae9c19d7"
|
|
128
128
|
}
|