@uipath/maestro-builder-sdk 6.82.8 → 6.84.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/dist/api-index.md +126 -125
- package/dist/api-members.md +428 -428
- package/dist/bpmn/bpmn-sdk.d.ts +33 -22
- package/dist/bpmn/bpmn-sdk.js +12 -9
- package/dist/bpmn/check.js +32 -2
- package/dist/bpmn/connector-lift-verify.js +3 -3
- package/dist/bpmn/connector.d.ts +17 -5
- package/dist/bpmn/connector.js +63 -119
- package/dist/bpmn/data-service.d.ts +70 -49
- package/dist/bpmn/data-service.js +149 -58
- package/dist/bpmn/declared-vars.js +8 -0
- package/dist/bpmn/decompile.d.ts +2 -0
- package/dist/bpmn/decompile.js +53 -33
- package/dist/bpmn/intsvc-vars.d.ts +38 -0
- package/dist/bpmn/intsvc-vars.js +44 -0
- package/dist/bpmn/intsvc.d.ts +6 -23
- package/dist/bpmn/intsvc.js +66 -77
- package/dist/bpmn/serialize.js +11 -3
- package/dist/case/case-sdk.d.ts +24 -3
- package/dist/case/case-sdk.js +21 -0
- package/dist/case/check-rule-semantics.d.ts +4 -2
- package/dist/case/check-rule-semantics.js +34 -0
- package/dist/case/decompile.js +9 -1
- package/dist/case/rule-options.d.ts +7 -0
- package/dist/case/rule-options.js +7 -0
- package/dist/case/serialize.js +13 -127
- package/dist/core/connector-configuration.js +3 -2
- package/dist/core/connector-v2-metadata.d.ts +67 -0
- package/dist/core/connector-v2-metadata.js +145 -0
- package/dist/core/refusals.d.ts +2 -0
- package/dist/core/refusals.js +2 -0
- package/package.json +2 -2
package/dist/case/serialize.js
CHANGED
|
@@ -13,10 +13,10 @@ import { isUnrestorableSlotId, METADATA_ABSENT_READING, STAGE_EMPTY_LISTS, TASK_
|
|
|
13
13
|
import { v31TaskSets } from './task-sets.js';
|
|
14
14
|
import { camelizeName, defaultActionOutputVar } from './action-output-var.js';
|
|
15
15
|
import { ACTION_CONTEXT_COPIES, ACTION_FORM_KIND_CONTEXT, ACTION_PASSTHROUGH_SETTINGS } from './action-settings.js';
|
|
16
|
-
import { buildConnectorInputs, nestConnectorBody,
|
|
16
|
+
import { buildConnectorInputs, nestConnectorBody, transportHttpMethod } from '../core/connector-inputs.js';
|
|
17
17
|
import { carriedConnectorFieldsRefusal, withCarriedFields } from '../core/carried-connector-fields.js';
|
|
18
18
|
import { connectorTaskIdentity, sameConnectorOperation, withCurrentCaches, writeOptionalConfiguration } from './connector-saved-config.js';
|
|
19
|
-
import {
|
|
19
|
+
import { connectorActivityMetadata, connectorEventFilterTree, connectorEventMetadata } from '../core/connector-v2-metadata.js';
|
|
20
20
|
import { EQUALS_EXPR_DIALECT } from '../core/connector-checks.js';
|
|
21
21
|
import { bindingLabelRefusal, connectionStubMessage } from '../core/binding-messages.js';
|
|
22
22
|
import { resolveEventWhere } from '../core/lookups.js';
|
|
@@ -33,7 +33,7 @@ import { CASE_NODE_LAYOUT_FIELDS, caseJsonPreservation, caseJsonPreservationErro
|
|
|
33
33
|
import { businessEventProblems } from './business-event-shape.js';
|
|
34
34
|
import { eventFiltersNotArray, readEventFilter, readEventFilterLeaf, eventFilterTreeLeaf } from '../core/event-filters.js';
|
|
35
35
|
import { responseJsonSchema } from '../core/connector-response-schema.js';
|
|
36
|
-
import { ruleShapeProblems } from './rule-options.js';
|
|
36
|
+
import { ANY_ESCALATION_ID, ANY_ESCALATION_KEY, ruleShapeProblems } from './rule-options.js';
|
|
37
37
|
import { CompileRefusal } from '../core/compile-refusal.js';
|
|
38
38
|
import { expressionBindingId } from '../core/expression-binding-id.js';
|
|
39
39
|
import { implicitInArgBuiltTrigger, unboundInArgMessage } from './in-arg-binding.js';
|
|
@@ -2240,7 +2240,9 @@ function resolvedSubscriptionBag(kind, spec, resolver, elementId, where) {
|
|
|
2240
2240
|
if (folder)
|
|
2241
2241
|
context.push(io('folderKey', 'string', { value: `=bindings.${folder.id}` }));
|
|
2242
2242
|
const conditions = caseEventFilterReads(spec.filters ?? [], kind);
|
|
2243
|
-
const metadataRow = io('metadata', 'json', {
|
|
2243
|
+
const metadataRow = io('metadata', 'json', {
|
|
2244
|
+
body: connectorEventMetadata(rc, op, connectorEventFilterTree(conditions, (suffix) => elementSeededId(resolver, elementId, suffix))),
|
|
2245
|
+
});
|
|
2244
2246
|
context.push(io('method', 'string', {}), io('path', 'string', {}), io('objectName', 'string', { value: op.objectName ?? spec.event }), io('operation', 'string', { value: op.eventOperation ?? spec.event }), metadataRow);
|
|
2245
2247
|
const resolvedWhere = resolveEventWhere(spec.where, library.lookupResolutions, where);
|
|
2246
2248
|
const inputRow = eventInput(caseSubscriptionBody(rc, resolvedWhere, conditions, elementId), elementId);
|
|
@@ -2283,73 +2285,6 @@ function caseEventFilterReads(filters, kind) {
|
|
|
2283
2285
|
return judged.read;
|
|
2284
2286
|
});
|
|
2285
2287
|
}
|
|
2286
|
-
function subscriptionMetadata(rc, op, conditions, elementId, resolver) {
|
|
2287
|
-
const instanceParameters = {
|
|
2288
|
-
connectorKey: rc.connectorKey,
|
|
2289
|
-
objectName: op.objectName ?? rc.nodeType.split('.').pop(),
|
|
2290
|
-
activityType: op.activityType,
|
|
2291
|
-
version: rc.version,
|
|
2292
|
-
eventOperation: op.eventOperation,
|
|
2293
|
-
eventMode: op.eventMode,
|
|
2294
|
-
supportsStreaming: op.supportsStreaming ?? false,
|
|
2295
|
-
};
|
|
2296
|
-
const filter = conditions.length ? {
|
|
2297
|
-
groupOperator: 0,
|
|
2298
|
-
index: 0,
|
|
2299
|
-
filters: conditions.map((read, index) => {
|
|
2300
|
-
return {
|
|
2301
|
-
...eventFilterTreeLeaf(read),
|
|
2302
|
-
uiId: elementSeededId(resolver, elementId, `:${read.field}:${read.expression ?? String(read.value)}:${index}`),
|
|
2303
|
-
};
|
|
2304
|
-
}).map((leaf) => ({
|
|
2305
|
-
id: leaf.id,
|
|
2306
|
-
operator: leaf.operator,
|
|
2307
|
-
value: leaf.value,
|
|
2308
|
-
uiId: leaf.uiId,
|
|
2309
|
-
})),
|
|
2310
|
-
groups: [],
|
|
2311
|
-
uuId: elementSeededId(resolver, elementId, ':filters'),
|
|
2312
|
-
} : null;
|
|
2313
|
-
const configuration = {
|
|
2314
|
-
essentialConfiguration: {
|
|
2315
|
-
connectorVersion: null,
|
|
2316
|
-
executionType: null,
|
|
2317
|
-
customFieldsRequestDetails: null,
|
|
2318
|
-
instanceParameters,
|
|
2319
|
-
objectName: instanceParameters.objectName,
|
|
2320
|
-
packageVersion: rc.version,
|
|
2321
|
-
httpMethod: null,
|
|
2322
|
-
path: null,
|
|
2323
|
-
filter,
|
|
2324
|
-
},
|
|
2325
|
-
};
|
|
2326
|
-
return {
|
|
2327
|
-
activityPropertyConfiguration: {
|
|
2328
|
-
objectName: instanceParameters.objectName,
|
|
2329
|
-
eventType: op.eventOperation,
|
|
2330
|
-
eventMode: op.eventMode,
|
|
2331
|
-
configuration: `=jsonString:${JSON.stringify(configuration)}`,
|
|
2332
|
-
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
2333
|
-
errorState: { issues: [] },
|
|
2334
|
-
},
|
|
2335
|
-
activityMetadata: {
|
|
2336
|
-
activity: {
|
|
2337
|
-
displayName: rc.entry.display?.label ?? instanceParameters.objectName,
|
|
2338
|
-
description: rc.entry.display?.description ?? '',
|
|
2339
|
-
category: rc.connectorName,
|
|
2340
|
-
configuration: JSON.stringify(instanceParameters),
|
|
2341
|
-
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
2342
|
-
isEnabled: true,
|
|
2343
|
-
},
|
|
2344
|
-
},
|
|
2345
|
-
telemetryData: {
|
|
2346
|
-
connectorKey: rc.connectorKey,
|
|
2347
|
-
connectorName: rc.connectorName,
|
|
2348
|
-
objectName: instanceParameters.objectName,
|
|
2349
|
-
objectDisplayName: op.objectDisplayName ?? rc.entry.display?.operationLabel ?? '',
|
|
2350
|
-
},
|
|
2351
|
-
};
|
|
2352
|
-
}
|
|
2353
2288
|
// ─── Reference-mode task io-binding (data.inputs[] / data.outputs[]) ───────────
|
|
2354
2289
|
//
|
|
2355
2290
|
// Wire shape verified against a real `uip maestro case` caseplan (the io-binding
|
|
@@ -2742,7 +2677,7 @@ function connectorTaskData(spec, resolver, elementId, where, executionType, even
|
|
|
2742
2677
|
// from the `body` slot. This used to drop the whole wire and push a filled
|
|
2743
2678
|
// file part into the body, where the runtime does not look for it (#1420).
|
|
2744
2679
|
const fileParts = (slots.multipartParameters ?? []).filter((part) => part.dataType.toLowerCase() === 'file');
|
|
2745
|
-
context.push(io('metadata', 'json', { body:
|
|
2680
|
+
context.push(io('metadata', 'json', { body: connectorActivityMetadata(rc, op, slots, elementId, executionType, event) }));
|
|
2746
2681
|
const inputs = [
|
|
2747
2682
|
ioSlot('pathParameters', pathParameters, `${elementId}`),
|
|
2748
2683
|
ioSlot('queryParameters', queryParameters, `${elementId}`),
|
|
@@ -3175,60 +3110,6 @@ function folderBindingRef(resolver, name, connection, site) {
|
|
|
3175
3110
|
}
|
|
3176
3111
|
return { id };
|
|
3177
3112
|
}
|
|
3178
|
-
/**
|
|
3179
|
-
* The connector `metadata` json blob: the FUNCTIONAL essentialConfiguration +
|
|
3180
|
-
* activityTypeId, and the multipart wire of a multipart operation. Designer
|
|
3181
|
-
* cosmetics (packageId/activityColor/…) are omitted — the caseplan
|
|
3182
|
-
* schema-validates without them (see design §C).
|
|
3183
|
-
*
|
|
3184
|
-
* The configuration is the one Flow writes, from the shared
|
|
3185
|
-
* {@link buildEssentialConfiguration}. Case used to build its own, thinner copy:
|
|
3186
|
-
* no `operation` verb, `customFieldsRequestDetails`, `connectorVersion` or
|
|
3187
|
-
* `unifiedTypesCompatible`, a curated-only `instanceParameters` even for a
|
|
3188
|
-
* Generic activity, and the library version where the platform writes
|
|
3189
|
-
* `packageVersion: "1.0.0"` (#1420).
|
|
3190
|
-
*/
|
|
3191
|
-
function connectorMetadata(rc, op, slots, seed, executionType, event) {
|
|
3192
|
-
// The part DECLARATIONS only: a file part's value rides on its `file` input.
|
|
3193
|
-
const multipartParameters = (slots.multipartParameters ?? []).map(({ name, dataType }) => ({ name, dataType }));
|
|
3194
|
-
// The configuration replays the authored values (a schema action's parent
|
|
3195
|
-
// fields, a CEQL filter's tree), keyed by the library's own names, as Flow's.
|
|
3196
|
-
const essential = buildEssentialConfiguration(rc.entry, rc.version, replayInputsOf(slots), seed, executionType ?? null);
|
|
3197
|
-
const configuration = `=jsonString:${JSON.stringify({ essentialConfiguration: essential })}`;
|
|
3198
|
-
const instanceParameters = essential.instanceParameters;
|
|
3199
|
-
const objectName = String(op.objectName ?? rc.nodeType.split('.').pop());
|
|
3200
|
-
return {
|
|
3201
|
-
activityPropertyConfiguration: {
|
|
3202
|
-
...(multipartParameters.length ? { multipartParameters } : {}),
|
|
3203
|
-
configuration,
|
|
3204
|
-
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
3205
|
-
errorState: { issues: [] },
|
|
3206
|
-
...(executionType ? { executionType } : {}),
|
|
3207
|
-
// The event an async / hybrid object answers with, named as the Designer
|
|
3208
|
-
// names it here (`eventType`, where the context row is `operation`).
|
|
3209
|
-
...(event ? { eventType: event.operation, eventMode: event.mode } : {}),
|
|
3210
|
-
},
|
|
3211
|
-
activityMetadata: {
|
|
3212
|
-
activity: {
|
|
3213
|
-
displayName: rc.entry.display?.label ?? objectName,
|
|
3214
|
-
description: rc.entry.display?.description ?? '',
|
|
3215
|
-
category: rc.connectorName,
|
|
3216
|
-
configuration: JSON.stringify(instanceParameters),
|
|
3217
|
-
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
3218
|
-
isEnabled: true,
|
|
3219
|
-
},
|
|
3220
|
-
},
|
|
3221
|
-
// `{}` unless the operation is multipart, as the Designer saves every
|
|
3222
|
-
// connector activity, external tasks included.
|
|
3223
|
-
inputMetadata: slots.inputMetadata ?? {},
|
|
3224
|
-
telemetryData: {
|
|
3225
|
-
connectorKey: rc.connectorKey,
|
|
3226
|
-
connectorName: rc.connectorName,
|
|
3227
|
-
objectName,
|
|
3228
|
-
objectDisplayName: op.objectDisplayName ?? rc.entry.display?.operationLabel ?? '',
|
|
3229
|
-
},
|
|
3230
|
-
};
|
|
3231
|
-
}
|
|
3232
3113
|
/** The `outputs[]`: a `response` json-schema from the op's output schema, plus a
|
|
3233
3114
|
* standard `Error` schema. */
|
|
3234
3115
|
function connectorOutputVar(resolver, base) {
|
|
@@ -3438,7 +3319,12 @@ function emitRule(r, seed, ownerId, ids, resolver, site) {
|
|
|
3438
3319
|
if (!slaId)
|
|
3439
3320
|
throw new CompileRefusal('UNKNOWN_SLA_REF', `rule "sla-status-change" references unknown SLA "${r.sla}" — declare it with .sla({ displayName: "${r.sla}", … }).`);
|
|
3440
3321
|
out.slaId = slaId;
|
|
3441
|
-
|
|
3322
|
+
// `ANY_ESCALATION` (case-sdk), matched by its registered key, so a second copy of the SDK matches too.
|
|
3323
|
+
if (r.escalation === Symbol.for(ANY_ESCALATION_KEY))
|
|
3324
|
+
out.escalationId = ANY_ESCALATION_ID;
|
|
3325
|
+
else if (r.escalation) {
|
|
3326
|
+
if (typeof r.escalation !== 'string')
|
|
3327
|
+
throw new CompileRefusal('UNKNOWN_ESCALATION_REF', `rule "sla-status-change" escalation must be an escalation displayName or ANY_ESCALATION.`);
|
|
3442
3328
|
const escId = resolver.escalationIdByName.get(r.escalation);
|
|
3443
3329
|
if (!escId)
|
|
3444
3330
|
throw new CompileRefusal('UNKNOWN_ESCALATION_REF', `rule "sla-status-change" references unknown escalation "${r.escalation}".`);
|
|
@@ -57,7 +57,8 @@ function ceqlParameterNames(op) {
|
|
|
57
57
|
* artifacts carry.
|
|
58
58
|
*
|
|
59
59
|
* Only a LITERAL string is parsed. A filter built from a runtime expression
|
|
60
|
-
* renders as
|
|
60
|
+
* renders as an `=`-expression here (Flow's `=js:…`, BPMN's `=vars.…`; no CEQL
|
|
61
|
+
* clause starts with `=`), and the v1 authoring path turns that into a
|
|
61
62
|
* `{var_…}` placeholder plus `inputs.detail.filterVariables`; nothing offline
|
|
62
63
|
* can reproduce that pairing, and a tree that disagrees with the query string is
|
|
63
64
|
* the one outcome worse than no tree. Those keep their runtime half and get no
|
|
@@ -69,7 +70,7 @@ function savedFilterTrees(op, inputValues, seed) {
|
|
|
69
70
|
const trees = {};
|
|
70
71
|
for (const name of ceqlParameterNames(op)) {
|
|
71
72
|
const raw = inputValues[name];
|
|
72
|
-
if (typeof raw !== 'string' || raw.trim() === '' || raw.startsWith('=
|
|
73
|
+
if (typeof raw !== 'string' || raw.trim() === '' || raw.startsWith('='))
|
|
73
74
|
continue;
|
|
74
75
|
trees[name] = parseCeql(raw, `${seed}:${name}`);
|
|
75
76
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* core/connector-v2-metadata — the `metadata` json a V2 (`activityConfigurationVersion:
|
|
3
|
+
* v2`) Integration Service node carries in its context: the design-time configuration
|
|
4
|
+
* and the activity's catalog entry, as Studio Web's V2 connector panel saves them.
|
|
5
|
+
*
|
|
6
|
+
* Case and BPMN write the same blob. Their envelopes differ (caseplan JSON rows,
|
|
7
|
+
* `uipath:input` rows), but the CLI renders one connector spec into both
|
|
8
|
+
* (UiPath/cli `buildActivityContext` / `buildTriggerContext`, rendered for BPMN by
|
|
9
|
+
* `renderBpmnV2Element`), so the two families share one builder here. It used to
|
|
10
|
+
* live in `case/serialize.ts`, where BPMN could not reach it.
|
|
11
|
+
*
|
|
12
|
+
* The configuration is functional only: designer cosmetics (packageId,
|
|
13
|
+
* activityColor, svgIconUrl, …) are omitted. Studio Web fills them from its type
|
|
14
|
+
* cache on open.
|
|
15
|
+
*/
|
|
16
|
+
import type { Library, ResolvedConnector } from './library.js';
|
|
17
|
+
import type { buildConnectorInputs } from './connector-inputs.js';
|
|
18
|
+
import { type ReadEventFilter } from './event-filters.js';
|
|
19
|
+
/**
|
|
20
|
+
* What the activity metadata reads of a resolved operation. A library entry
|
|
21
|
+
* (`Library.resolve`) is one; an operation the SDK describes itself, such as a
|
|
22
|
+
* Data Service curated record operation (`bpmn/data-service.ts`), is another.
|
|
23
|
+
*/
|
|
24
|
+
export type ConnectorMetadataSource = Pick<ResolvedConnector, 'entry' | 'version' | 'activityTypeId' | 'nodeType' | 'connectorKey' | 'connectorName'>;
|
|
25
|
+
/** The routed inputs the activity metadata replays (`buildConnectorInputs`'s slots). */
|
|
26
|
+
export type ConnectorMetadataSlots = Pick<ReturnType<typeof buildConnectorInputs>, 'pathParameters' | 'queryParameters' | 'bodyParameters' | 'multipartParameters' | 'inputMetadata'>;
|
|
27
|
+
/** How an External Agent / Workflow object runs; a connector activity has none. */
|
|
28
|
+
export type ConnectorExecutionType = 'sync' | 'async' | 'hybrid';
|
|
29
|
+
/** The event an async or hybrid external object answers with. */
|
|
30
|
+
export interface ConnectorEventPair {
|
|
31
|
+
operation: string;
|
|
32
|
+
mode: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The `metadata` of a connector activity: the FUNCTIONAL essentialConfiguration +
|
|
36
|
+
* activityTypeId, and the multipart wire of a multipart operation.
|
|
37
|
+
*
|
|
38
|
+
* The configuration is the one Flow writes, from the shared
|
|
39
|
+
* {@link buildEssentialConfiguration}. Case used to build its own, thinner copy:
|
|
40
|
+
* no `operation` verb, `customFieldsRequestDetails`, `connectorVersion` or
|
|
41
|
+
* `unifiedTypesCompatible`, a curated-only `instanceParameters` even for a
|
|
42
|
+
* Generic activity, and the library version where the platform writes
|
|
43
|
+
* `packageVersion: "1.0.0"` (#1420).
|
|
44
|
+
*
|
|
45
|
+
* @param seed - The element id, which seeds the ids inside the configuration.
|
|
46
|
+
*/
|
|
47
|
+
export declare function connectorActivityMetadata(rc: ConnectorMetadataSource, op: any, slots: ConnectorMetadataSlots, seed: string, executionType?: ConnectorExecutionType, event?: ConnectorEventPair): Record<string, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* The designer's filter tree for a connector event's filter conditions, or `null`
|
|
50
|
+
* for none: the `essentialConfiguration.filter` the event metadata carries.
|
|
51
|
+
*
|
|
52
|
+
* @param conditions - The authored leaves, already read and judged (each caller
|
|
53
|
+
* refuses a malformed leaf with its own message, under the code `check` gives).
|
|
54
|
+
* @param seededId - Mints a stable id from a suffix of the element's id; Case
|
|
55
|
+
* records each one so preservation can re-mint it.
|
|
56
|
+
*/
|
|
57
|
+
export declare function connectorEventFilterTree(conditions: readonly ReadEventFilter[], seededId: (suffix: string) => string): Record<string, unknown> | null;
|
|
58
|
+
/**
|
|
59
|
+
* The `metadata` of a connector event (a trigger or a wait): the subscription's
|
|
60
|
+
* essentialConfiguration, its event type and mode, and the catalog entry.
|
|
61
|
+
*
|
|
62
|
+
* @param filter - The designer's filter tree ({@link connectorEventFilterTree}).
|
|
63
|
+
* @param filterExpression - The compiled JMESPath of the same filter, which Studio
|
|
64
|
+
* Web also records here (`activityPropertyConfiguration.filterExpression`); omitted
|
|
65
|
+
* when there is none.
|
|
66
|
+
*/
|
|
67
|
+
export declare function connectorEventMetadata(rc: ReturnType<Library['resolveEvent']>, op: any, filter: Record<string, unknown> | null, filterExpression?: string): Record<string, unknown>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { replayInputsOf } from './connector-inputs.js';
|
|
2
|
+
import { buildEssentialConfiguration } from './connector-configuration.js';
|
|
3
|
+
import { eventFilterTreeLeaf } from './event-filters.js';
|
|
4
|
+
/**
|
|
5
|
+
* The `metadata` of a connector activity: the FUNCTIONAL essentialConfiguration +
|
|
6
|
+
* activityTypeId, and the multipart wire of a multipart operation.
|
|
7
|
+
*
|
|
8
|
+
* The configuration is the one Flow writes, from the shared
|
|
9
|
+
* {@link buildEssentialConfiguration}. Case used to build its own, thinner copy:
|
|
10
|
+
* no `operation` verb, `customFieldsRequestDetails`, `connectorVersion` or
|
|
11
|
+
* `unifiedTypesCompatible`, a curated-only `instanceParameters` even for a
|
|
12
|
+
* Generic activity, and the library version where the platform writes
|
|
13
|
+
* `packageVersion: "1.0.0"` (#1420).
|
|
14
|
+
*
|
|
15
|
+
* @param seed - The element id, which seeds the ids inside the configuration.
|
|
16
|
+
*/
|
|
17
|
+
export function connectorActivityMetadata(rc, op, slots, seed, executionType, event) {
|
|
18
|
+
// The part DECLARATIONS only: a file part's value rides on its `file` input.
|
|
19
|
+
const multipartParameters = (slots.multipartParameters ?? []).map(({ name, dataType }) => ({ name, dataType }));
|
|
20
|
+
// The configuration replays the authored values (a schema action's parent
|
|
21
|
+
// fields, a CEQL filter's tree), keyed by the library's own names, as Flow's.
|
|
22
|
+
const essential = buildEssentialConfiguration(rc.entry, rc.version, replayInputsOf(slots), seed, executionType ?? null);
|
|
23
|
+
const configuration = `=jsonString:${JSON.stringify({ essentialConfiguration: essential })}`;
|
|
24
|
+
const instanceParameters = essential.instanceParameters;
|
|
25
|
+
const objectName = String(op.objectName ?? rc.nodeType.split('.').pop());
|
|
26
|
+
return {
|
|
27
|
+
activityPropertyConfiguration: {
|
|
28
|
+
...(multipartParameters.length ? { multipartParameters } : {}),
|
|
29
|
+
configuration,
|
|
30
|
+
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
31
|
+
errorState: { issues: [] },
|
|
32
|
+
...(executionType ? { executionType } : {}),
|
|
33
|
+
// The event an async / hybrid object answers with, named as the Designer
|
|
34
|
+
// names it here (`eventType`, where the context row is `operation`).
|
|
35
|
+
...(event ? { eventType: event.operation, eventMode: event.mode } : {}),
|
|
36
|
+
},
|
|
37
|
+
activityMetadata: {
|
|
38
|
+
activity: {
|
|
39
|
+
displayName: rc.entry.display?.label ?? objectName,
|
|
40
|
+
description: rc.entry.display?.description ?? '',
|
|
41
|
+
category: rc.connectorName,
|
|
42
|
+
configuration: JSON.stringify(instanceParameters),
|
|
43
|
+
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
44
|
+
isEnabled: true,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
// `{}` unless the operation is multipart, as the Designer saves every
|
|
48
|
+
// connector activity, external tasks included.
|
|
49
|
+
inputMetadata: slots.inputMetadata ?? {},
|
|
50
|
+
telemetryData: {
|
|
51
|
+
connectorKey: rc.connectorKey,
|
|
52
|
+
connectorName: rc.connectorName,
|
|
53
|
+
objectName,
|
|
54
|
+
objectDisplayName: op.objectDisplayName ?? rc.entry.display?.operationLabel ?? '',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The designer's filter tree for a connector event's filter conditions, or `null`
|
|
60
|
+
* for none: the `essentialConfiguration.filter` the event metadata carries.
|
|
61
|
+
*
|
|
62
|
+
* @param conditions - The authored leaves, already read and judged (each caller
|
|
63
|
+
* refuses a malformed leaf with its own message, under the code `check` gives).
|
|
64
|
+
* @param seededId - Mints a stable id from a suffix of the element's id; Case
|
|
65
|
+
* records each one so preservation can re-mint it.
|
|
66
|
+
*/
|
|
67
|
+
export function connectorEventFilterTree(conditions, seededId) {
|
|
68
|
+
if (!conditions.length)
|
|
69
|
+
return null;
|
|
70
|
+
return {
|
|
71
|
+
groupOperator: 0,
|
|
72
|
+
index: 0,
|
|
73
|
+
filters: conditions.map((read, index) => ({
|
|
74
|
+
...eventFilterTreeLeaf(read),
|
|
75
|
+
uiId: seededId(`:${read.field}:${read.expression ?? String(read.value)}:${index}`),
|
|
76
|
+
})).map((leaf) => ({
|
|
77
|
+
id: leaf.id,
|
|
78
|
+
operator: leaf.operator,
|
|
79
|
+
value: leaf.value,
|
|
80
|
+
uiId: leaf.uiId,
|
|
81
|
+
})),
|
|
82
|
+
groups: [],
|
|
83
|
+
uuId: seededId(':filters'),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The `metadata` of a connector event (a trigger or a wait): the subscription's
|
|
88
|
+
* essentialConfiguration, its event type and mode, and the catalog entry.
|
|
89
|
+
*
|
|
90
|
+
* @param filter - The designer's filter tree ({@link connectorEventFilterTree}).
|
|
91
|
+
* @param filterExpression - The compiled JMESPath of the same filter, which Studio
|
|
92
|
+
* Web also records here (`activityPropertyConfiguration.filterExpression`); omitted
|
|
93
|
+
* when there is none.
|
|
94
|
+
*/
|
|
95
|
+
export function connectorEventMetadata(rc, op, filter, filterExpression) {
|
|
96
|
+
const instanceParameters = {
|
|
97
|
+
connectorKey: rc.connectorKey,
|
|
98
|
+
objectName: op.objectName ?? rc.nodeType.split('.').pop(),
|
|
99
|
+
activityType: op.activityType,
|
|
100
|
+
version: rc.version,
|
|
101
|
+
eventOperation: op.eventOperation,
|
|
102
|
+
eventMode: op.eventMode,
|
|
103
|
+
supportsStreaming: op.supportsStreaming ?? false,
|
|
104
|
+
};
|
|
105
|
+
const configuration = {
|
|
106
|
+
essentialConfiguration: {
|
|
107
|
+
connectorVersion: null,
|
|
108
|
+
executionType: null,
|
|
109
|
+
customFieldsRequestDetails: null,
|
|
110
|
+
instanceParameters,
|
|
111
|
+
objectName: instanceParameters.objectName,
|
|
112
|
+
packageVersion: rc.version,
|
|
113
|
+
httpMethod: null,
|
|
114
|
+
path: null,
|
|
115
|
+
filter,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
activityPropertyConfiguration: {
|
|
120
|
+
objectName: instanceParameters.objectName,
|
|
121
|
+
eventType: op.eventOperation,
|
|
122
|
+
eventMode: op.eventMode,
|
|
123
|
+
configuration: `=jsonString:${JSON.stringify(configuration)}`,
|
|
124
|
+
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
125
|
+
errorState: { issues: [] },
|
|
126
|
+
...(filterExpression ? { filterExpression } : {}),
|
|
127
|
+
},
|
|
128
|
+
activityMetadata: {
|
|
129
|
+
activity: {
|
|
130
|
+
displayName: rc.entry.display?.label ?? instanceParameters.objectName,
|
|
131
|
+
description: rc.entry.display?.description ?? '',
|
|
132
|
+
category: rc.connectorName,
|
|
133
|
+
configuration: JSON.stringify(instanceParameters),
|
|
134
|
+
uiPathActivityTypeId: rc.activityTypeId ?? '',
|
|
135
|
+
isEnabled: true,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
telemetryData: {
|
|
139
|
+
connectorKey: rc.connectorKey,
|
|
140
|
+
connectorName: rc.connectorName,
|
|
141
|
+
objectName: instanceParameters.objectName,
|
|
142
|
+
objectDisplayName: op.objectDisplayName ?? rc.entry.display?.operationLabel ?? '',
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ export declare const REFUSALS: {
|
|
|
185
185
|
readonly SELECTED_STAGE_EXITED_NO_EXIT: "lint";
|
|
186
186
|
readonly SLA_RESPONSE_REENTERS_STAGE: "lint";
|
|
187
187
|
readonly SLA_NAME_DUPLICATE: "lint";
|
|
188
|
+
readonly ANY_ESCALATION_NO_AT_RISK: "lint";
|
|
188
189
|
readonly CASE_MGMT_BINDING_KEY_MISMATCH: "lint";
|
|
189
190
|
readonly CASE_MGMT_NODE_ID_DUPLICATE: "lint";
|
|
190
191
|
readonly CASE_MGMT_OUTPUT_ID_DUPLICATE: "lint";
|
|
@@ -321,6 +322,7 @@ export declare const REFUSALS: {
|
|
|
321
322
|
readonly EVENT_NO_SCOPE: "lint";
|
|
322
323
|
readonly EVENT_NO_SUBSCRIPTION: "lint";
|
|
323
324
|
readonly EVENT_OBJECT_NOT_GENERIC: "lint";
|
|
325
|
+
readonly EVENT_OUTPUT_NOT_RESPONSE: "lint";
|
|
324
326
|
readonly EVENT_SCOPE_NOT_TAKEN: "lint";
|
|
325
327
|
readonly EVENT_UNKNOWN: "lowering";
|
|
326
328
|
readonly EVENT_UNPREPARED: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -249,6 +249,7 @@ export const REFUSALS = {
|
|
|
249
249
|
SELECTED_STAGE_EXITED_NO_EXIT: 'lint',
|
|
250
250
|
SLA_RESPONSE_REENTERS_STAGE: 'lint',
|
|
251
251
|
SLA_NAME_DUPLICATE: 'lint',
|
|
252
|
+
ANY_ESCALATION_NO_AT_RISK: 'lint',
|
|
252
253
|
// `uip maestro case validate`'s own codes, ported to case/plan-check/. All
|
|
253
254
|
// `lint` for now: only `check` reports them. The four on fields compile writes
|
|
254
255
|
// (ids, binding keys) are also carried from a decompiled plan's preserved
|
|
@@ -394,6 +395,7 @@ export const REFUSALS = {
|
|
|
394
395
|
EVENT_NO_SCOPE: 'lint',
|
|
395
396
|
EVENT_NO_SUBSCRIPTION: 'lint',
|
|
396
397
|
EVENT_OBJECT_NOT_GENERIC: 'lint',
|
|
398
|
+
EVENT_OUTPUT_NOT_RESPONSE: 'lint',
|
|
397
399
|
EVENT_SCOPE_NOT_TAKEN: 'lint',
|
|
398
400
|
EVENT_UNKNOWN: 'lowering',
|
|
399
401
|
EVENT_UNPREPARED: 'lint',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.84.0",
|
|
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",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@types/node": "^22.7.0",
|
|
104
104
|
"esbuild": "^0.28.1"
|
|
105
105
|
},
|
|
106
|
-
"gitref": "
|
|
106
|
+
"gitref": "88ebbb3e7bf229cd27aa610cd6e0ff2285900502"
|
|
107
107
|
}
|