@uipath/maestro-builder-sdk 6.120.24 → 6.120.26
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 +90 -89
- package/dist/api-members.md +441 -436
- package/dist/bpmn/bpmn-sdk.d.ts +9 -0
- package/dist/bpmn/check.js +2 -1
- package/dist/bpmn/decompile.js +9 -0
- package/dist/bpmn/serialize.js +1 -1
- package/dist/bpmn-api.md +1 -0
- package/dist/case/case-sdk.d.ts +29 -1
- package/dist/case/case-sdk.js +10 -2
- package/dist/case/decompile.js +33 -2
- package/dist/case/serialize.js +6 -0
- package/dist/core/refusals.d.ts +1 -0
- package/dist/core/refusals.js +1 -0
- package/package.json +2 -2
package/dist/bpmn/bpmn-sdk.d.ts
CHANGED
|
@@ -950,6 +950,15 @@ export interface RetrySpec {
|
|
|
950
950
|
* multiplies it by {@link RetrySpec.exponentialBase} each time.
|
|
951
951
|
*/
|
|
952
952
|
backoffType?: 'static' | 'exponential';
|
|
953
|
+
/**
|
|
954
|
+
* The `retryBackoffType` attribute exactly as an imported file spells it, for a
|
|
955
|
+
* spelling `backoffType` does not write (`'Static'` / `'Exponential'`). Real
|
|
956
|
+
* exports also carry `'exponential'`, `'Linear'` and `'fixed'`; decompile fills
|
|
957
|
+
* this field with such a value so compile writes it back unchanged instead of
|
|
958
|
+
* turning it into `'Static'`. When set, it wins over `backoffType`. Authoring
|
|
959
|
+
* code should use `backoffType`.
|
|
960
|
+
*/
|
|
961
|
+
backoffTypeAsWritten?: string;
|
|
953
962
|
/** Multiplier for `'exponential'` backoff, e.g. `2` for 1s → 2s → 4s. */
|
|
954
963
|
exponentialBase?: number;
|
|
955
964
|
/** Retry every failure, not only the ones the platform marks retryable. */
|
package/dist/bpmn/check.js
CHANGED
|
@@ -1298,7 +1298,8 @@ function checkActivityFields(n, diags) {
|
|
|
1298
1298
|
where: n.id,
|
|
1299
1299
|
});
|
|
1300
1300
|
}
|
|
1301
|
-
|
|
1301
|
+
// A carried product spelling (`backoffTypeAsWritten`) is not judged here: the warning is about `backoffType`.
|
|
1302
|
+
if (retry.exponentialBase !== undefined && retry.backoffType !== 'exponential' && retry.backoffTypeAsWritten === undefined)
|
|
1302
1303
|
diags.push({
|
|
1303
1304
|
level: 'warning',
|
|
1304
1305
|
code: 'RETRY_BASE_WITHOUT_EXPONENTIAL',
|
package/dist/bpmn/decompile.js
CHANGED
|
@@ -637,6 +637,15 @@ function emitRetry(retry) {
|
|
|
637
637
|
['maxRetries', String(count)],
|
|
638
638
|
['backoff', retry.retryBackoff ? tsText(retry.retryBackoff) : undefined],
|
|
639
639
|
['backoffType', retry.retryBackoffType === 'Exponential' ? tsText('exponential') : undefined],
|
|
640
|
+
// Any spelling compile does not write for `backoffType` (`exponential`, `Linear`, `fixed`
|
|
641
|
+
// are all in real exports) is carried as written; reading it as the static default would
|
|
642
|
+
// change the policy on a no-edit round trip.
|
|
643
|
+
[
|
|
644
|
+
'backoffTypeAsWritten',
|
|
645
|
+
retry.retryBackoffType !== undefined && retry.retryBackoffType !== 'Exponential' && retry.retryBackoffType !== 'Static'
|
|
646
|
+
? tsText(String(retry.retryBackoffType))
|
|
647
|
+
: undefined,
|
|
648
|
+
],
|
|
640
649
|
['exponentialBase', retry.exponentialBase !== undefined ? String(Number(retry.exponentialBase)) : undefined],
|
|
641
650
|
['allErrors', retry.retryAllErrors === 'true' || retry.retryAllErrors === true ? 'true' : undefined],
|
|
642
651
|
['maxDuration', retry.maxDuration ? tsText(retry.maxDuration) : undefined],
|
package/dist/bpmn/serialize.js
CHANGED
|
@@ -1324,7 +1324,7 @@ export function folderCompanionKeys(built, sink) {
|
|
|
1324
1324
|
function buildRetryExt(ctx, retry) {
|
|
1325
1325
|
const props = {
|
|
1326
1326
|
maxRetryCount: String(retry.maxRetries),
|
|
1327
|
-
retryBackoffType: retry.backoffType === 'exponential' ? 'Exponential' : 'Static',
|
|
1327
|
+
retryBackoffType: retry.backoffTypeAsWritten ?? (retry.backoffType === 'exponential' ? 'Exponential' : 'Static'),
|
|
1328
1328
|
};
|
|
1329
1329
|
if (retry.backoff !== undefined)
|
|
1330
1330
|
props.retryBackoff = retry.backoff;
|
package/dist/bpmn-api.md
CHANGED
|
@@ -1002,6 +1002,7 @@ Retry an activity that fails (`uipath:retry`).
|
|
|
1002
1002
|
- `RetrySpec.maxRetries: number` — How many times to retry AFTER the first attempt — so `3` means up to four runs in total.
|
|
1003
1003
|
- `RetrySpec.backoff?: string` — Wait this long before retrying, as an ISO-8601 duration (`'PT30S'`, `'PT1M'`, `'P1DT12H'`).
|
|
1004
1004
|
- `RetrySpec.backoffType?: 'static' | 'exponential'` — `'static'` (default) waits `backoff` before every retry; `'exponential'` multiplies it by RetrySpec.exponentialBase each…
|
|
1005
|
+
- `RetrySpec.backoffTypeAsWritten?: string` — The `retryBackoffType` attribute exactly as an imported file spells it, for a spelling `backoffType` does not write…
|
|
1005
1006
|
- `RetrySpec.exponentialBase?: number` — Multiplier for `'exponential'` backoff, e.g. `2` for 1s → 2s → 4s.
|
|
1006
1007
|
- `RetrySpec.allErrors?: boolean` — Retry every failure, not only the ones the platform marks retryable.
|
|
1007
1008
|
- `RetrySpec.maxDuration?: string` — Give up after this much total elapsed time, as an ISO-8601 duration.
|
package/dist/case/case-sdk.d.ts
CHANGED
|
@@ -747,6 +747,30 @@ export interface TaskRef {
|
|
|
747
747
|
name: string;
|
|
748
748
|
folderPath: string;
|
|
749
749
|
}
|
|
750
|
+
/**
|
|
751
|
+
* The entry point a process task runs, for a published package with several
|
|
752
|
+
* (a coded package whose functions are each an entry point). Studio Web saves
|
|
753
|
+
* the one picked as `data.entryPointName`, `data.entryPointPath` and
|
|
754
|
+
* `data.entryPointUniqueId`; a task with none runs the package's default
|
|
755
|
+
* entry point.
|
|
756
|
+
*
|
|
757
|
+
* @example
|
|
758
|
+
* ```ts
|
|
759
|
+
* casePlan('billing').stage('Post', (s) => s
|
|
760
|
+
* .task('Post invoice', (t) => t.process('Billing helpers', {
|
|
761
|
+
* folder: 'Shared',
|
|
762
|
+
* entryPoint: { name: 'post_invoice', path: 'content/functions/post_invoice.ts', uniqueId: '00000000-0000-4000-8000-000000000001' },
|
|
763
|
+
* })))
|
|
764
|
+
* ```
|
|
765
|
+
*/
|
|
766
|
+
export interface ProcessEntryPoint {
|
|
767
|
+
/** The entry point's name, e.g. `post_invoice` (`data.entryPointName`). */
|
|
768
|
+
name: string;
|
|
769
|
+
/** The entry point's file in the package, e.g. `content/functions/post_invoice.ts` (`data.entryPointPath`). */
|
|
770
|
+
path: string;
|
|
771
|
+
/** The entry point's id in the package (`data.entryPointUniqueId`). */
|
|
772
|
+
uniqueId: string;
|
|
773
|
+
}
|
|
750
774
|
/**
|
|
751
775
|
* Options for {@link TaskBuilder.businessRule}.
|
|
752
776
|
*/
|
|
@@ -995,6 +1019,8 @@ export interface BuiltTask {
|
|
|
995
1019
|
kind: TaskKind;
|
|
996
1020
|
/** The published resource the task binds: a reference task's process, agent, … or an action task's Action App. */
|
|
997
1021
|
ref?: TaskRef;
|
|
1022
|
+
/** process task: the package entry point it runs, when it names one. */
|
|
1023
|
+
entryPoint?: ProcessEntryPoint;
|
|
998
1024
|
/** business-rule task: the rule's decision-keyed result schema, when known. */
|
|
999
1025
|
businessRule?: BusinessRuleSpecData;
|
|
1000
1026
|
action?: ActionSpecData;
|
|
@@ -1264,6 +1290,7 @@ declare class TaskBuilder {
|
|
|
1264
1290
|
private readonly _name;
|
|
1265
1291
|
private _kind?;
|
|
1266
1292
|
private _ref?;
|
|
1293
|
+
private _entryPoint?;
|
|
1267
1294
|
private _businessRule?;
|
|
1268
1295
|
private _action?;
|
|
1269
1296
|
private _connector?;
|
|
@@ -1289,11 +1316,12 @@ declare class TaskBuilder {
|
|
|
1289
1316
|
* Reference a published Maestro process.
|
|
1290
1317
|
*
|
|
1291
1318
|
* @param name - The published process's name.
|
|
1292
|
-
* @param opts - `folder` — the Orchestrator folder it lives in, or `'solution_folder'` (the default when omitted) for one built in this solution. Compile binds the task through a name/folderPath pair of root bindings keyed `<folder>.<name>`.
|
|
1319
|
+
* @param opts - `folder` — the Orchestrator folder it lives in, or `'solution_folder'` (the default when omitted) for one built in this solution. Compile binds the task through a name/folderPath pair of root bindings keyed `<folder>.<name>`. `entryPoint` — the package entry point the task runs ({@link ProcessEntryPoint}), for a package with several; omit it for the default one.
|
|
1293
1320
|
* @returns This builder, so calls chain.
|
|
1294
1321
|
*/
|
|
1295
1322
|
process(name: string, opts?: {
|
|
1296
1323
|
folder?: string;
|
|
1324
|
+
entryPoint?: ProcessEntryPoint;
|
|
1297
1325
|
}): this;
|
|
1298
1326
|
/**
|
|
1299
1327
|
* Preserve an explicitly unresolved task as a typed skeleton whose serialized
|
package/dist/case/case-sdk.js
CHANGED
|
@@ -262,6 +262,7 @@ class TaskBuilder {
|
|
|
262
262
|
_name;
|
|
263
263
|
_kind;
|
|
264
264
|
_ref;
|
|
265
|
+
_entryPoint;
|
|
265
266
|
_businessRule;
|
|
266
267
|
_action;
|
|
267
268
|
_connector;
|
|
@@ -297,11 +298,17 @@ class TaskBuilder {
|
|
|
297
298
|
* Reference a published Maestro process.
|
|
298
299
|
*
|
|
299
300
|
* @param name - The published process's name.
|
|
300
|
-
* @param opts - `folder` — the Orchestrator folder it lives in, or `'solution_folder'` (the default when omitted) for one built in this solution. Compile binds the task through a name/folderPath pair of root bindings keyed `<folder>.<name>`.
|
|
301
|
+
* @param opts - `folder` — the Orchestrator folder it lives in, or `'solution_folder'` (the default when omitted) for one built in this solution. Compile binds the task through a name/folderPath pair of root bindings keyed `<folder>.<name>`. `entryPoint` — the package entry point the task runs ({@link ProcessEntryPoint}), for a package with several; omit it for the default one.
|
|
301
302
|
* @returns This builder, so calls chain.
|
|
302
303
|
*/
|
|
303
304
|
process(name, opts) {
|
|
304
|
-
|
|
305
|
+
if (opts?.entryPoint) {
|
|
306
|
+
const bad = ['name', 'path', 'uniqueId'].find((field) => typeof opts.entryPoint[field] !== 'string' || !opts.entryPoint[field]);
|
|
307
|
+
if (bad)
|
|
308
|
+
throw new CompileRefusal('TASK_ENTRY_POINT_INCOMPLETE', `task "${this._name}": entryPoint.${bad} must be a non-empty string; an entry point names its name, path and uniqueId together.`);
|
|
309
|
+
this._entryPoint = { name: opts.entryPoint.name, path: opts.entryPoint.path, uniqueId: opts.entryPoint.uniqueId };
|
|
310
|
+
}
|
|
311
|
+
return this.reference('process', name, { folder: opts?.folder });
|
|
305
312
|
}
|
|
306
313
|
/**
|
|
307
314
|
* Preserve an explicitly unresolved task as a typed skeleton whose serialized
|
|
@@ -923,6 +930,7 @@ class TaskBuilder {
|
|
|
923
930
|
name: this._name,
|
|
924
931
|
kind: this._kind,
|
|
925
932
|
ref: this._ref,
|
|
933
|
+
...(this._entryPoint ? { entryPoint: this._entryPoint } : {}),
|
|
926
934
|
businessRule: this._businessRule,
|
|
927
935
|
action: this._action,
|
|
928
936
|
connector: this._connector,
|
package/dist/case/decompile.js
CHANGED
|
@@ -1263,6 +1263,26 @@ function externalCall(task, refs, library) {
|
|
|
1263
1263
|
const method = kind === 'external-agent' ? 'externalAgent' : 'externalWorkflow';
|
|
1264
1264
|
return `.${method}(${descriptor}, ${options})`;
|
|
1265
1265
|
}
|
|
1266
|
+
/** The `data` fields every reference task (`TASK_KIND_METHOD`) lifts: its resource pair and io rows. */
|
|
1267
|
+
const REFERENCE_DATA_KEYS = new Set(['name', 'folderPath', 'inputs', 'outputs']);
|
|
1268
|
+
/** A process task's saved entry point (`ProcessEntryPoint`), which `.process(..., { entryPoint })` writes. */
|
|
1269
|
+
const ENTRY_POINT_DATA_KEYS = new Set(['entryPointName', 'entryPointPath', 'entryPointUniqueId']);
|
|
1270
|
+
/**
|
|
1271
|
+
* The `entryPoint` option a process task's saved `data.entryPointName`,
|
|
1272
|
+
* `entryPointPath` and `entryPointUniqueId` lift to, or `undefined` when it
|
|
1273
|
+
* names none. Studio Web saves the three together; a task with only some of
|
|
1274
|
+
* them is refused by name, since the source names an entry point whole.
|
|
1275
|
+
*/
|
|
1276
|
+
function entryPointOption(data, owner) {
|
|
1277
|
+
const saved = { name: data.entryPointName, path: data.entryPointPath, uniqueId: data.entryPointUniqueId };
|
|
1278
|
+
if (Object.values(saved).every((value) => value === undefined))
|
|
1279
|
+
return undefined;
|
|
1280
|
+
const bad = Object.entries(saved).find(([, value]) => typeof value !== 'string' || !value);
|
|
1281
|
+
if (bad)
|
|
1282
|
+
throw new Error(`${owner} names an entry point without a non-empty data.entryPoint${bad[0][0].toUpperCase()}${bad[0].slice(1)}; `
|
|
1283
|
+
+ `Studio Web saves entryPointName, entryPointPath and entryPointUniqueId together. Re-pick the entry point in Studio Web, then decompile again.`);
|
|
1284
|
+
return tsLiteral(saved);
|
|
1285
|
+
}
|
|
1266
1286
|
function emitTaskKind(task, refs, library) {
|
|
1267
1287
|
const kind = task.type;
|
|
1268
1288
|
const data = task.data ?? {};
|
|
@@ -1274,7 +1294,15 @@ function emitTaskKind(task, refs, library) {
|
|
|
1274
1294
|
return `.unresolved(${tsLiteral(placeholder)})`;
|
|
1275
1295
|
const method = ownEntry(TASK_KIND_METHOD, kind);
|
|
1276
1296
|
if (method) {
|
|
1297
|
+
// Every `data` field a reference task can carry is lifted or refused by
|
|
1298
|
+
// name: one the source has no place for would be dropped on the round trip
|
|
1299
|
+
// unseen, and the task would run something else.
|
|
1300
|
+
const unknown = Object.keys(data).find((field) => !REFERENCE_DATA_KEYS.has(field) && !(kind === 'process' && ENTRY_POINT_DATA_KEYS.has(field)));
|
|
1301
|
+
if (unknown)
|
|
1302
|
+
throw new Error(`${kind} task "${task.displayName ?? task.id ?? '?'}" has unsupported data field "${unknown}".`);
|
|
1277
1303
|
if (kind !== 'flow-process' && data.name === undefined && data.folderPath === undefined) {
|
|
1304
|
+
if (Object.keys(data).some((field) => ENTRY_POINT_DATA_KEYS.has(field)))
|
|
1305
|
+
throw new Error(`unresolved ${kind} task "${task.displayName ?? task.id ?? '?'}" cannot name an entry point (data.entryPointName / entryPointPath / entryPointUniqueId) without its process.`);
|
|
1278
1306
|
if ((Array.isArray(data.inputs) && data.inputs.length) || (Array.isArray(data.outputs) && data.outputs.length))
|
|
1279
1307
|
throw new Error(`unresolved ${kind} task "${task.displayName ?? task.id ?? '?'}" cannot carry input or output bindings.`);
|
|
1280
1308
|
return `.unresolved(${tsLiteral(kind)})`;
|
|
@@ -1284,8 +1312,11 @@ function emitTaskKind(task, refs, library) {
|
|
|
1284
1312
|
const folderPath = bindingFolder(data.folderPath, refs, owner, name);
|
|
1285
1313
|
// No folder already means the case's own solution folder
|
|
1286
1314
|
// (resource-identity.ts), so an in-solution resource decompiles to none.
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1315
|
+
const options = opts([
|
|
1316
|
+
['folder', folderPath && folderPath !== SOLUTION_FOLDER ? tsLiteral(folderPath) : undefined],
|
|
1317
|
+
['entryPoint', kind === 'process' ? entryPointOption(data, owner) : undefined],
|
|
1318
|
+
]);
|
|
1319
|
+
return `.${method}(${tsLiteral(name ?? '')}${options ? `, ${options}` : ''})`;
|
|
1289
1320
|
}
|
|
1290
1321
|
if (isAuthorableBusinessRule(task))
|
|
1291
1322
|
return businessRuleCall(task, refs);
|
package/dist/case/serialize.js
CHANGED
|
@@ -2755,6 +2755,12 @@ function taskData(task, resolver, taskId, stageId, ids) {
|
|
|
2755
2755
|
// LITERAL_BINDING), and deploy re-targets a resource only through its
|
|
2756
2756
|
// binding (#1240).
|
|
2757
2757
|
const data = { ...referenceBindings(task.kind, task.ref, resolver, ids, task.name) };
|
|
2758
|
+
// The package entry point the task runs (a process with several), as Studio Web saves it.
|
|
2759
|
+
if (task.kind === 'process' && task.entryPoint) {
|
|
2760
|
+
data.entryPointPath = task.entryPoint.path;
|
|
2761
|
+
data.entryPointUniqueId = task.entryPoint.uniqueId;
|
|
2762
|
+
data.entryPointName = task.entryPoint.name;
|
|
2763
|
+
}
|
|
2758
2764
|
const elementId = `${stageId}-${taskId}`;
|
|
2759
2765
|
if (task.inputs?.length)
|
|
2760
2766
|
data.inputs = task.inputs.map((inp, i) => emitTaskInput(inp, elementId, ids, `${elementId}:in:${i}:${inp.name}`));
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -798,6 +798,7 @@ export declare const REFUSALS: {
|
|
|
798
798
|
readonly SWITCH_HAS_NO_OUTPUT: "lint";
|
|
799
799
|
readonly SWITCH_NO_CASES: "lint";
|
|
800
800
|
readonly SWITCH_ON_UNUSED: "lint";
|
|
801
|
+
readonly TASK_ENTRY_POINT_INCOMPLETE: "lowering";
|
|
801
802
|
readonly TASK_INPUTS_UNSUPPORTED: "lowering";
|
|
802
803
|
readonly TASK_IO_TYPE: "lint";
|
|
803
804
|
readonly TASK_IO_UNRESOLVED_REFERENCE: "lowering";
|
package/dist/core/refusals.js
CHANGED
|
@@ -874,6 +874,7 @@ export const REFUSALS = {
|
|
|
874
874
|
SWITCH_HAS_NO_OUTPUT: 'lint',
|
|
875
875
|
SWITCH_NO_CASES: 'lint',
|
|
876
876
|
SWITCH_ON_UNUSED: 'lint',
|
|
877
|
+
TASK_ENTRY_POINT_INCOMPLETE: 'lowering',
|
|
877
878
|
TASK_INPUTS_UNSUPPORTED: 'lowering',
|
|
878
879
|
TASK_IO_TYPE: 'lint',
|
|
879
880
|
TASK_IO_UNRESOLVED_REFERENCE: 'lowering',
|
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.26",
|
|
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": "a09722a6d8633af46769fdf92acfd976c065902b"
|
|
128
128
|
}
|