@uipath/maestro-builder-sdk 6.18.3 → 6.18.5
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 +1 -1
- package/dist/case/check.d.ts +12 -0
- package/dist/case/check.js +15 -2
- package/dist/case/cli-library.js +11 -0
- package/dist/case/external.d.ts +27 -0
- package/dist/case/external.js +25 -0
- package/dist/case/serialize.js +19 -19
- package/dist/core/lookups.d.ts +16 -15
- package/dist/core/lookups.js +26 -23
- package/dist/serialize.js +2 -14
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -204,9 +204,9 @@ could hand you spans for a version you do not have.
|
|
|
204
204
|
| `ran` | function | `dist/core/expr.d.ts:95-141` | Expressions and types | Did this step run? |
|
|
205
205
|
| `rawNode` | function | `dist/core/node-classes.d.ts:180-242` | Supporting types | Place a node this SDK has no factory for, carrying its definition verbatim (`uipath.exotic.thing@2.1` and the manifest… |
|
|
206
206
|
| `RawReference` | type | `dist/core/lookups.d.ts:190-198` | Supporting types | |
|
|
207
|
-
| `refuseLookupToken` | function | `dist/core/lookups.d.ts:207-223` | Generated descriptors | Refuse a lookup token where the family cannot resolve one. |
|
|
208
207
|
| `RemoteA2aToolRef` | interface | `dist/core/actions.d.ts:1745-1765` | Supporting types | A remote A2A (agent-to-agent) endpoint the agent may delegate to. |
|
|
209
208
|
| `resolvedValue` | function | `dist/core/lookups.d.ts:172-179` | Generated descriptors | The recorded id for a token, or `undefined`. |
|
|
209
|
+
| `resolveEventWhere` | function | `dist/core/lookups.d.ts:207-224` | Generated descriptors | An event subscription's `where` with every lookup token swapped for the id `registry prepare --resolve` recorded, or a… |
|
|
210
210
|
| `ReturnFieldType` | type | `dist/core/actions.d.ts:1317-1334` | Supporting types | A JSON-schema-ish type for one field of a step's declared `returns`. |
|
|
211
211
|
| `ReturnOptions` | interface | `dist/flow-sdk.d.ts:397-428` | Option shapes | `.return(...)`-specific options. |
|
|
212
212
|
| `rpaWorkflow` | function | `dist/core/actions.d.ts:2841-2885` | Actions | Invoke a deployed RPA (robotic process automation) workflow — a classic UI-automation process, published to… |
|
package/dist/case/check.d.ts
CHANGED
|
@@ -38,6 +38,18 @@ export type CaseCheckOpts = Pick<ConnectorCheckOpts, 'connectorResolveError' | '
|
|
|
38
38
|
* refuses the `object`) or `EVENT_GENERIC_NO_OBJECT` (a GENERIC event with no
|
|
39
39
|
* `object`). Built on `resolveCaseSubscription`, the call compile makes.
|
|
40
40
|
*/
|
|
41
|
+
/**
|
|
42
|
+
* What Case `compile` would refuse an External Agent / External Workflow
|
|
43
|
+
* task's resolved descriptor with (`externalDescriptorRefusal`), or
|
|
44
|
+
* `undefined`: also `undefined` when the descriptor does not resolve, which
|
|
45
|
+
* `connectorResolveError` reports.
|
|
46
|
+
*/
|
|
47
|
+
externalDescriptorError?: (kind: 'external-agent' | 'external-workflow', descriptor: {
|
|
48
|
+
key: string;
|
|
49
|
+
action: string;
|
|
50
|
+
version?: string;
|
|
51
|
+
object?: string;
|
|
52
|
+
}) => string | undefined;
|
|
41
53
|
subscriptionError?: (kind: 'trigger' | 'event', subscription: EventSubscription) => {
|
|
42
54
|
code: string;
|
|
43
55
|
message: string;
|
package/dist/case/check.js
CHANGED
|
@@ -3,6 +3,8 @@ import { authoredCaseVersion, CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS } from '
|
|
|
3
3
|
import { schemaVersionRefusal } from '../schema-version.js';
|
|
4
4
|
import { caseJsonPreservation, caseJsonPreservationErrors } from './preserve.js';
|
|
5
5
|
import { EQUALS_EXPR_DIALECT, checkConnectorContract, checkConnectorLookups, checkConnectorSchema, } from '../core/connector-checks.js';
|
|
6
|
+
import { checkEventResolution } from '../core/event-checks.js';
|
|
7
|
+
import { EXTERNAL_TASK_DESCRIPTOR_CONTRACT } from './external.js';
|
|
6
8
|
const TYPE_NAMES = new Set(Object.values(types));
|
|
7
9
|
// audit-case-coverage: rule-slot table start
|
|
8
10
|
// This runtime table must equal the committed matrix's rejected cells. The audit
|
|
@@ -269,7 +271,10 @@ export function check(built, opts = {}) {
|
|
|
269
271
|
*
|
|
270
272
|
* - a connector task and an External Agent / External Workflow task resolve
|
|
271
273
|
* their operation (`library.resolve`): CONNECTOR_NOT_IN_LIBRARY,
|
|
272
|
-
* CONNECTOR_OBJECT_REQUIRED, CONNECTOR_OBJECT_NOT_GENERIC;
|
|
274
|
+
* CONNECTOR_OBJECT_REQUIRED, CONNECTOR_OBJECT_NOT_GENERIC; then their inputs
|
|
275
|
+
* (`buildConnectorInputs`): CONNECTOR_INPUT, LOOKUP_UNRESOLVED;
|
|
276
|
+
* - an external task's resolved descriptor (`externalDescriptorRefusal`):
|
|
277
|
+
* EXTERNAL_TASK_DESCRIPTOR_CONTRACT;
|
|
273
278
|
* - an event trigger, a wait-for-connector task and a wait-for-connector rule
|
|
274
279
|
* resolve their subscription (`resolveCaseSubscription`): EVENT_UNKNOWN,
|
|
275
280
|
* EVENT_GENERIC_NO_OBJECT.
|
|
@@ -288,6 +293,9 @@ function checkLibraryConnectors(built, opts, diags) {
|
|
|
288
293
|
const refused = opts.subscriptionError?.(kind, sub);
|
|
289
294
|
if (refused !== undefined)
|
|
290
295
|
diags.push({ level: 'error', code: refused.code, message: `${where}: ${refused.message}`, where: at });
|
|
296
|
+
// A `where` lookup nobody recorded: Flow's LOOKUP_UNRESOLVED warning, from the
|
|
297
|
+
// shared event rules. Only `resolutions` is passed, so nothing else in them fires.
|
|
298
|
+
checkEventResolution(sub, where, kind, { resolutions: opts.resolutions ?? {} }, (code, message) => diags.push({ level: 'error', code, message, where: at }), (code, message) => diags.push({ level: 'warning', code, message, where: at }));
|
|
291
299
|
};
|
|
292
300
|
const rules = (conditions, where) => {
|
|
293
301
|
for (const c of conditions)
|
|
@@ -317,7 +325,12 @@ function checkLibraryConnectors(built, opts, diags) {
|
|
|
317
325
|
if ((t.kind === 'external-agent' || t.kind === 'external-workflow')
|
|
318
326
|
&& t.external?.connector?.key?.trim() && t.external.connector.action?.trim()) {
|
|
319
327
|
const where = `${t.kind === 'external-agent' ? 'External Agent' : 'External Workflow'} task "${t.name}"`;
|
|
320
|
-
|
|
328
|
+
const spec = t.external.connector;
|
|
329
|
+
checkConnectorLookups(where, spec, opts, EQUALS_EXPR_DIALECT, reporter(where, t.name));
|
|
330
|
+
checkConnectorContract(where, spec, opts, reporter(where, t.name));
|
|
331
|
+
const refused = opts.externalDescriptorError?.(t.kind, spec);
|
|
332
|
+
if (refused !== undefined)
|
|
333
|
+
diags.push({ level: 'error', code: EXTERNAL_TASK_DESCRIPTOR_CONTRACT, message: `${where}: ${refused}`, where: t.name });
|
|
321
334
|
}
|
|
322
335
|
if (t.kind === 'wait-for-connector' && isSubscription(t.waitConnector))
|
|
323
336
|
subscription('event', t.waitConnector, `Wait-for-connector task "${t.name}"`, t.name);
|
package/dist/case/cli-library.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* both `case check` and `case compile`'s check pass call.
|
|
9
9
|
*/
|
|
10
10
|
import { connectorCheckOpts } from '../core/cli-library.js';
|
|
11
|
+
import { externalDescriptorRefusal } from './external.js';
|
|
11
12
|
import { EVENT_GENERIC_NO_OBJECT, GenericEventNoObjectError, resolveCaseSubscription } from './subscription.js';
|
|
12
13
|
/**
|
|
13
14
|
* Case's check options from a library the CLI already opened, or `{}` without one.
|
|
@@ -32,6 +33,16 @@ export function caseCheckOpts(library) {
|
|
|
32
33
|
lookups: shared.lookups,
|
|
33
34
|
resolutions: shared.resolutions,
|
|
34
35
|
schemaReadiness: shared.schemaReadiness,
|
|
36
|
+
externalDescriptorError: (kind, d) => {
|
|
37
|
+
let rc;
|
|
38
|
+
try {
|
|
39
|
+
rc = library.resolve(d.key, d.action, d.version, d.object);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return undefined; // connectorResolveError's to report
|
|
43
|
+
}
|
|
44
|
+
return externalDescriptorRefusal(kind, rc);
|
|
45
|
+
},
|
|
35
46
|
subscriptionError: (kind, sub) => {
|
|
36
47
|
try {
|
|
37
48
|
resolveCaseSubscription(library, kind, sub);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* case/external — the descriptor contract of an External Agent / External
|
|
3
|
+
* Workflow task, shared by Case `serialize` (which throws it) and Case `check`
|
|
4
|
+
* (which reports it as EXTERNAL_TASK_DESCRIPTOR_CONTRACT), so the two refuse the
|
|
5
|
+
* same descriptors with the same text (#1035).
|
|
6
|
+
*
|
|
7
|
+
* The task's inputs are not here: they go through the shared
|
|
8
|
+
* `buildConnectorInputs`, which `check` already runs as `connectorInputs`.
|
|
9
|
+
*/
|
|
10
|
+
import type { ResolvedConnector } from '../core/library.js';
|
|
11
|
+
/** Check's code for {@link externalDescriptorRefusal}. */
|
|
12
|
+
export declare const EXTERNAL_TASK_DESCRIPTOR_CONTRACT = "EXTERNAL_TASK_DESCRIPTOR_CONTRACT";
|
|
13
|
+
/**
|
|
14
|
+
* Why a resolved descriptor cannot back this external task, or `undefined`.
|
|
15
|
+
*
|
|
16
|
+
* An External Agent task needs an `AgentExecution` operation and an External
|
|
17
|
+
* Workflow task a `ProcessExecution` one: the service type the task emits
|
|
18
|
+
* (`Intsvc.SyncAgentExecution`, …) is chosen by the family, and a descriptor of
|
|
19
|
+
* the other kind (or a plain connector action) would run the wrong contract.
|
|
20
|
+
* Both need the operation's `uiPathActivityTypeId`, which the task emits as its
|
|
21
|
+
* `activity` context.
|
|
22
|
+
*
|
|
23
|
+
* @param kind - The task kind.
|
|
24
|
+
* @param rc - What `library.resolve` returned for the task's descriptor.
|
|
25
|
+
* @returns The refusal, or `undefined`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function externalDescriptorRefusal(kind: 'external-agent' | 'external-workflow', rc: Pick<ResolvedConnector, 'nodeType' | 'version' | 'activityTypeId' | 'entry'>): string | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Check's code for {@link externalDescriptorRefusal}. */
|
|
2
|
+
export const EXTERNAL_TASK_DESCRIPTOR_CONTRACT = 'EXTERNAL_TASK_DESCRIPTOR_CONTRACT';
|
|
3
|
+
/**
|
|
4
|
+
* Why a resolved descriptor cannot back this external task, or `undefined`.
|
|
5
|
+
*
|
|
6
|
+
* An External Agent task needs an `AgentExecution` operation and an External
|
|
7
|
+
* Workflow task a `ProcessExecution` one: the service type the task emits
|
|
8
|
+
* (`Intsvc.SyncAgentExecution`, …) is chosen by the family, and a descriptor of
|
|
9
|
+
* the other kind (or a plain connector action) would run the wrong contract.
|
|
10
|
+
* Both need the operation's `uiPathActivityTypeId`, which the task emits as its
|
|
11
|
+
* `activity` context.
|
|
12
|
+
*
|
|
13
|
+
* @param kind - The task kind.
|
|
14
|
+
* @param rc - What `library.resolve` returned for the task's descriptor.
|
|
15
|
+
* @returns The refusal, or `undefined`.
|
|
16
|
+
*/
|
|
17
|
+
export function externalDescriptorRefusal(kind, rc) {
|
|
18
|
+
const op = rc.entry?.operation ?? {};
|
|
19
|
+
const expectedSubType = kind === 'external-agent' ? 'AgentExecution' : 'ProcessExecution';
|
|
20
|
+
if (op.subType !== expectedSubType)
|
|
21
|
+
return `${kind} task requires a ${expectedSubType} descriptor; resolved ${String(op.subType ?? 'no subtype')}.`;
|
|
22
|
+
if (!rc.activityTypeId)
|
|
23
|
+
return `${kind} task descriptor ${rc.nodeType}@${rc.version} has no uiPathActivityTypeId.`;
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
package/dist/case/serialize.js
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
import { IdGen } from './ids.js';
|
|
12
12
|
import { buildConnectorInputs, nestConnectorBody, transportHttpMethod } from '../core/connector-inputs.js';
|
|
13
13
|
import { EQUALS_EXPR_DIALECT } from '../core/connector-checks.js';
|
|
14
|
-
import {
|
|
14
|
+
import { resolveEventWhere } from '../core/lookups.js';
|
|
15
15
|
import { resolveCaseSubscription } from './subscription.js';
|
|
16
|
+
import { externalDescriptorRefusal } from './external.js';
|
|
16
17
|
import { CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS } from './format-profile.js';
|
|
17
18
|
import { resolveSchemaVersion } from '../schema-version.js';
|
|
18
19
|
import { caseJsonPreservation, caseJsonPreservationErrors, } from './preserve.js';
|
|
@@ -902,16 +903,13 @@ function resolvedSubscriptionBag(kind, spec, resolver, elementId) {
|
|
|
902
903
|
return {
|
|
903
904
|
serviceType: kind === 'trigger' ? CASE_FORMAT_PROFILE.eventServiceType : CASE_FORMAT_PROFILE.waitConnectorServiceType,
|
|
904
905
|
context,
|
|
905
|
-
inputs: [eventInput(spec.where
|
|
906
|
+
inputs: [eventInput(resolveEventWhere(spec.where, resolver.library.lookupResolutions, `${kind === 'trigger' ? 'event trigger' : 'wait-for-connector'} "${elementId}"`), elementId)],
|
|
906
907
|
outputs: connectorOutputs(rc, elementId, resolver),
|
|
907
908
|
bindings: [],
|
|
908
909
|
};
|
|
909
910
|
}
|
|
911
|
+
/** The subscription's `body` input; `where` has its lookups already resolved (`resolveEventWhere`). */
|
|
910
912
|
function eventInput(where, elementId) {
|
|
911
|
-
// Case compile does not read resolutions.json (Flow does); a token here
|
|
912
|
-
// would be emitted raw where the connector expects an id.
|
|
913
|
-
for (const [field, value] of Object.entries(where))
|
|
914
|
-
refuseLookupToken(value, 'case', field);
|
|
915
913
|
return Object.keys(where).length
|
|
916
914
|
? { name: 'body', type: 'json', target: 'body', body: { queryParams: where }, var: 'vbody', id: 'vbody', elementId }
|
|
917
915
|
: { name: 'body', type: 'json', target: 'body', value: '', var: 'vbody', id: 'vbody', elementId };
|
|
@@ -1134,12 +1132,9 @@ function externalTaskData(kind, spec, resolver) {
|
|
|
1134
1132
|
if (!resolver.library)
|
|
1135
1133
|
throw new Error(`${kind} task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
|
|
1136
1134
|
const rc = resolver.library.resolve(spec.connector.key, spec.connector.action, spec.connector.version, spec.connector.object);
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
throw new Error(`${kind} task requires a ${expectedSubType} descriptor; resolved ${String(op.subType ?? 'no subtype')}.`);
|
|
1141
|
-
if (!rc.activityTypeId)
|
|
1142
|
-
throw new Error(`${kind} task descriptor ${rc.nodeType}@${rc.version} has no uiPathActivityTypeId.`);
|
|
1135
|
+
const refused = externalDescriptorRefusal(kind, rc);
|
|
1136
|
+
if (refused)
|
|
1137
|
+
throw new Error(refused);
|
|
1143
1138
|
if (spec.mode !== 'sync' && spec.mode !== 'async')
|
|
1144
1139
|
throw new Error(`${kind} task mode must be "sync" or "async".`);
|
|
1145
1140
|
const connection = bindingRef(resolver, spec.connector.connection, 'Connection', 'ConnectionId', `${rc.connectorKey} connection`);
|
|
@@ -1153,13 +1148,18 @@ function externalTaskData(kind, spec, resolver) {
|
|
|
1153
1148
|
: (spec.mode === 'sync'
|
|
1154
1149
|
? CASE_FORMAT_PROFILE.externalWorkflowSyncServiceType
|
|
1155
1150
|
: CASE_FORMAT_PROFILE.externalWorkflowAsyncServiceType);
|
|
1151
|
+
// The inputs: the shared validator every connector activity runs (unknown,
|
|
1152
|
+
// missing required or mistyped input; a `lookup()` swapped for its recorded id,
|
|
1153
|
+
// or refused). Case `check` reports the same through `connectorInputs`.
|
|
1156
1154
|
const fields = new Map(rc.fields.map((field) => [field.name, field]));
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1155
|
+
const slots = buildConnectorInputs(rc, spec.connector.inputs, {
|
|
1156
|
+
dialect: EQUALS_EXPR_DIALECT,
|
|
1157
|
+
resolutions: resolver.library.lookupResolutions,
|
|
1158
|
+
lookups: resolver.library.lookupSpecs(spec.connector.key, spec.connector.action, spec.connector.version, spec.connector.object),
|
|
1159
|
+
});
|
|
1160
|
+
const resolved = {
|
|
1161
|
+
...slots.bodyParameters, ...slots.pathParameters, ...slots.queryParameters,
|
|
1162
|
+
};
|
|
1163
1163
|
const responseVar = connectorOutputVar(resolver, 'response');
|
|
1164
1164
|
return {
|
|
1165
1165
|
serviceType,
|
|
@@ -1175,7 +1175,7 @@ function externalTaskData(kind, spec, resolver) {
|
|
|
1175
1175
|
id: name,
|
|
1176
1176
|
name,
|
|
1177
1177
|
type: jsonType(fields.get(name)?.type),
|
|
1178
|
-
value,
|
|
1178
|
+
value: name in resolved ? resolved[name] : value,
|
|
1179
1179
|
target: name,
|
|
1180
1180
|
})),
|
|
1181
1181
|
outputs: [{
|
package/dist/core/lookups.d.ts
CHANGED
|
@@ -205,20 +205,21 @@ type RawReference = {
|
|
|
205
205
|
*/
|
|
206
206
|
export declare function lookupSpecOf(reference: RawReference, invariant?: ReadonlySet<string>): LookupSpec | undefined;
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
* @param
|
|
219
|
-
* @param
|
|
220
|
-
* @param
|
|
221
|
-
* @
|
|
208
|
+
* An event subscription's `where` with every lookup token swapped for the id
|
|
209
|
+
* `registry prepare --resolve` recorded, or a throw naming the first one nobody
|
|
210
|
+
* recorded.
|
|
211
|
+
*
|
|
212
|
+
* The id is looked up under the token's own node type, which for an event
|
|
213
|
+
* lookup is the EVENT form `prepare` stores it under. Emitting a placeholder for
|
|
214
|
+
* a value nobody resolved would subscribe the trigger to the wrong folder,
|
|
215
|
+
* channel or queue, so an unrecorded token is refused, never passed through.
|
|
216
|
+
* Shared by Flow's and Case's serializers, so both resolve and refuse alike.
|
|
217
|
+
*
|
|
218
|
+
* @param where - The authored `where`.
|
|
219
|
+
* @param resolutions - The library's recorded resolutions (`library.lookupResolutions`).
|
|
220
|
+
* @param site - How the caller names the subscription, prefixed to the refusal.
|
|
221
|
+
* @returns The `where` with ids in place of tokens.
|
|
222
|
+
* @throws If a token has no recorded resolution.
|
|
222
223
|
*/
|
|
223
|
-
export declare function
|
|
224
|
+
export declare function resolveEventWhere(where: Record<string, unknown> | undefined, resolutions: LookupResolutions, site: string): Record<string, unknown>;
|
|
224
225
|
export {};
|
package/dist/core/lookups.js
CHANGED
|
@@ -259,30 +259,33 @@ function byAlias(lookupName) {
|
|
|
259
259
|
return 'by' + words.map((w) => w[0].toUpperCase() + w.slice(1)).join('');
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
|
-
*
|
|
262
|
+
* An event subscription's `where` with every lookup token swapped for the id
|
|
263
|
+
* `registry prepare --resolve` recorded, or a throw naming the first one nobody
|
|
264
|
+
* recorded.
|
|
263
265
|
*
|
|
264
|
-
*
|
|
265
|
-
* `
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* embedded as `{"__lookup": {…}}` where the connector expects an id, which is
|
|
270
|
-
* silent wrongness, so it is refused instead.
|
|
266
|
+
* The id is looked up under the token's own node type, which for an event
|
|
267
|
+
* lookup is the EVENT form `prepare` stores it under. Emitting a placeholder for
|
|
268
|
+
* a value nobody resolved would subscribe the trigger to the wrong folder,
|
|
269
|
+
* channel or queue, so an unrecorded token is refused, never passed through.
|
|
270
|
+
* Shared by Flow's and Case's serializers, so both resolve and refuse alike.
|
|
271
271
|
*
|
|
272
|
-
* @param
|
|
273
|
-
* @param
|
|
274
|
-
* @param
|
|
275
|
-
* @
|
|
272
|
+
* @param where - The authored `where`.
|
|
273
|
+
* @param resolutions - The library's recorded resolutions (`library.lookupResolutions`).
|
|
274
|
+
* @param site - How the caller names the subscription, prefixed to the refusal.
|
|
275
|
+
* @returns The `where` with ids in place of tokens.
|
|
276
|
+
* @throws If a token has no recorded resolution.
|
|
276
277
|
*/
|
|
277
|
-
export function
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
278
|
+
export function resolveEventWhere(where, resolutions, site) {
|
|
279
|
+
const out = {};
|
|
280
|
+
for (const [key, value] of Object.entries(where ?? {})) {
|
|
281
|
+
if (!isLookupToken(value)) {
|
|
282
|
+
out[key] = value;
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
const resolved = resolvedValue(value, resolutions);
|
|
286
|
+
if (resolved === undefined)
|
|
287
|
+
throw new Error(`${site}: \`where.${key}\` ` + unresolvedLookupMessage(value));
|
|
288
|
+
out[key] = resolved;
|
|
289
|
+
}
|
|
290
|
+
return out;
|
|
288
291
|
}
|
package/dist/serialize.js
CHANGED
|
@@ -44,7 +44,7 @@ export function connectorInputErrors(rc, inputs, resolutions = {}, lookups = {})
|
|
|
44
44
|
render: (value) => renderDeep(value, NO_RENAME),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
import { isLookupToken,
|
|
47
|
+
import { isLookupToken, resolveEventWhere, } from './core/lookups.js';
|
|
48
48
|
import { declaredScriptShape, inferScriptShape } from './core/script-return.js';
|
|
49
49
|
import { migrateToSchemaVersion } from './migrate.js';
|
|
50
50
|
import { FLOW_SCHEMA_VERSIONS } from './format-profile.js';
|
|
@@ -4127,19 +4127,7 @@ function eventDetail(rc, sub, nodeId, opts, site) {
|
|
|
4127
4127
|
// `prepare --resolve` stored under the EVENT-form node type — or refused.
|
|
4128
4128
|
// Same rule as connector inputs: emitting a placeholder for a value nobody
|
|
4129
4129
|
// resolved would subscribe the trigger to the wrong folder/channel/queue.
|
|
4130
|
-
const
|
|
4131
|
-
const where = {};
|
|
4132
|
-
for (const [k, v] of Object.entries(sub.where ?? {})) {
|
|
4133
|
-
if (!isLookupToken(v)) {
|
|
4134
|
-
where[k] = v;
|
|
4135
|
-
continue;
|
|
4136
|
-
}
|
|
4137
|
-
const resolved = resolvedValue(v, eventResolutions);
|
|
4138
|
-
if (resolved === undefined) {
|
|
4139
|
-
throw new Error(`event node "${nodeId}": \`where.${k}\` ` + unresolvedLookupMessage(v));
|
|
4140
|
-
}
|
|
4141
|
-
where[k] = resolved;
|
|
4142
|
-
}
|
|
4130
|
+
const where = resolveEventWhere(sub.where, opts.library?.lookupResolutions ?? {}, `event node "${nodeId}"`);
|
|
4143
4131
|
// A subscription's parameters do not all travel in the same slot. The
|
|
4144
4132
|
// connector declares which, and the library bakes it per field as `bucket`:
|
|
4145
4133
|
// measured against designer-authored triggers, Jira's `project`/`issuetype`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.5",
|
|
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": "714298df601bba1d5d278525ba354d670cec21aa"
|
|
96
96
|
}
|