@uipath/maestro-builder-sdk 6.83.0 → 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 +41 -41
- package/dist/api-members.md +160 -160
- 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/serialize.js +6 -125
- 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 +1 -0
- package/dist/core/refusals.js +1 -0
- package/package.json +2 -2
|
@@ -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
|
@@ -322,6 +322,7 @@ export declare const REFUSALS: {
|
|
|
322
322
|
readonly EVENT_NO_SCOPE: "lint";
|
|
323
323
|
readonly EVENT_NO_SUBSCRIPTION: "lint";
|
|
324
324
|
readonly EVENT_OBJECT_NOT_GENERIC: "lint";
|
|
325
|
+
readonly EVENT_OUTPUT_NOT_RESPONSE: "lint";
|
|
325
326
|
readonly EVENT_SCOPE_NOT_TAKEN: "lint";
|
|
326
327
|
readonly EVENT_UNKNOWN: "lowering";
|
|
327
328
|
readonly EVENT_UNPREPARED: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -395,6 +395,7 @@ export const REFUSALS = {
|
|
|
395
395
|
EVENT_NO_SCOPE: 'lint',
|
|
396
396
|
EVENT_NO_SUBSCRIPTION: 'lint',
|
|
397
397
|
EVENT_OBJECT_NOT_GENERIC: 'lint',
|
|
398
|
+
EVENT_OUTPUT_NOT_RESPONSE: 'lint',
|
|
398
399
|
EVENT_SCOPE_NOT_TAKEN: 'lint',
|
|
399
400
|
EVENT_UNKNOWN: 'lowering',
|
|
400
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
|
}
|