@uipath/case-tool 1.201.0 → 1.202.0-preview.136
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/{authoring-aaaqwck3.js → authoring-cvjhkfxp.js} +74 -48
- package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
- package/dist/case-api-bwcxsbxe.js +381 -0
- package/dist/case-debug-studio-web-service-qcb328bt.js +335 -0
- package/dist/{case-pack-service-bxas5bxz.js → case-pack-service-txby2znw.js} +11 -18
- package/dist/case-validate-service-0q8krj2a.js +2114 -0
- package/dist/connector-enrichment-service-agqxam5y.js +60 -0
- package/dist/connector-lookup-service-ycgk77n0.js +22 -0
- package/dist/connector-task-spec-kdx5bv87.js +1250 -0
- package/dist/{de-5KVP66U6-t37qr521.js → de-5KVP66U6-1bnf4zt5.js} +54 -54
- package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
- package/dist/debug-service-dxx5pfev.js +57 -0
- package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
- package/dist/{en-4KXU7N7B-24v330b5.js → en-X3S6IZ5J-nhkg6pwn.js} +55 -61
- package/dist/enrichment-service-ebz1f4ds.js +421 -0
- package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
- package/dist/{es-MX-XAVLOQW3-47a405kf.js → es-MX-XAVLOQW3-q00km2y7.js} +54 -54
- package/dist/{es-VFPNVMP5-6sftsdxe.js → es-VFPNVMP5-bx2c337j.js} +54 -54
- package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
- package/dist/{fr-E5MDO4EG-f3x1jeqw.js → fr-E5MDO4EG-c3mkty2t.js} +54 -54
- package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
- package/dist/{index-cncq089f.js → index-7s201ka0.js} +163 -80
- package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
- package/dist/index-k4xz16db.js +63712 -0
- package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
- package/dist/index-kwxe1vep.js +143 -0
- package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
- package/dist/index-qyf1dee9.js +630 -0
- package/dist/index.js +16 -17
- package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
- package/dist/input-reader-xb9vecxv.js +11 -0
- package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
- package/dist/{ja-DPO5PPLO-fmbg7zt2.js → ja-DPO5PPLO-mysfmznx.js} +54 -54
- package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
- package/dist/known-types-qryebm95.js +15 -0
- package/dist/{ko-ITOPNIYI-aqy82jk8.js → ko-ITOPNIYI-hmxd2asd.js} +54 -54
- package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
- package/dist/{node-strategy-8gzp67xs.js → node-strategy-0267x5e5.js} +130 -14
- package/dist/node-sync-service-9a9ksj9s.js +38 -0
- package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
- package/dist/packager-tool-0mj06yen.js +65 -0
- package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
- package/dist/packager-tool-134mvmcm.js +3040 -0
- package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
- package/dist/{packager-tool-zqa5k9f7.js → packager-tool-37zvccmt.js} +990 -2287
- package/dist/packager-tool-3ze5vt52.js +54 -0
- package/dist/{packager-tool-w3h8xrnv.js → packager-tool-56j6keqr.js} +71 -3
- package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
- package/dist/{packager-tool-zx48pq4v.js → packager-tool-5ax2ywcg.js} +1997 -1174
- package/dist/{packager-tool-we1phz71.js → packager-tool-885mmrvr.js} +31 -3
- package/dist/packager-tool-9scn4b15.js +852 -0
- package/dist/{packager-tool-p9j43p8h.js → packager-tool-a42jnpy5.js} +3 -9
- package/dist/packager-tool-ajvse9r3.js +356 -0
- package/dist/{packager-tool-jysvpt8p.js → packager-tool-c23zrhj8.js} +2 -2
- package/dist/packager-tool-dqs5qy9s.js +2327 -0
- package/dist/packager-tool-ee5dhff3.js +6717 -0
- package/dist/{packager-tool-wvqz81mx.js → packager-tool-gtzs471w.js} +3 -2
- package/dist/packager-tool-hrr0efqc.js +546 -0
- package/dist/packager-tool-j9rfdrdm.js +1125 -0
- package/dist/{packager-tool-gq6952nc.js → packager-tool-jhdf8gt1.js} +5054 -17851
- package/dist/packager-tool-mp59jtpm.js +6865 -0
- package/dist/packager-tool-njzcfve1.js +77 -0
- package/dist/packager-tool-p7jgrm5r.js +15 -0
- package/dist/packager-tool-r84ng21s.js +57 -0
- package/dist/packager-tool-rqvr63x5.js +1217 -0
- package/dist/packager-tool-s12392rd.js +80 -0
- package/dist/packager-tool-sv0d6wb6.js +173 -0
- package/dist/packager-tool-ty1t2byf.js +27 -0
- package/dist/packager-tool-vepqrsse.js +23 -0
- package/dist/packager-tool-w5ek334f.js +4892 -0
- package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
- package/dist/packager-tool.js +91 -5
- package/dist/project-artifacts-vhanbtw5.js +14 -0
- package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
- package/dist/{pt-BR-BXURWX4W-xzyndmrx.js → pt-BR-BXURWX4W-bwfcwhk1.js} +54 -54
- package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
- package/dist/{pt-YI4VE4YQ-521681zf.js → pt-YI4VE4YQ-wdkn2dcf.js} +54 -54
- package/dist/resourcesSyncService-mrmmwaqr.js +683 -0
- package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
- package/dist/{ro-RKXZUG7Z-pdztdafr.js → ro-RKXZUG7Z-nndrrsq7.js} +54 -54
- package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
- package/dist/ru-WBLQ5B2U-8r3c7v6d.js +10 -0
- package/dist/strict-case-rules-303vjvas.js +377 -0
- package/dist/strict-sdd-audit-qdmc9e1y.js +1024 -0
- package/dist/tool.js +17 -18
- package/dist/{tr-AA6O2WSR-bj9n80k8.js → tr-AA6O2WSR-86ba4bdf.js} +54 -54
- package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
- package/dist/trigger-enrichment-service-zdx4x92j.js +340 -0
- package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
- package/dist/{zh-CN-R2KLHXQV-x6gnk2n0.js → zh-CN-R2KLHXQV-agqr45ds.js} +54 -54
- package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
- package/dist/{zh-TW-RJGCQANM-tt8j5wv2.js → zh-TW-RJGCQANM-w0x3qc1p.js} +54 -54
- package/package.json +2 -2
- package/dist/index-8bsngk9y.js +0 -247140
- package/dist/packager-tool-axcdppp9.js +0 -13607
- package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseEntryConfiguration
|
|
3
|
+
} from "./packager-tool-hrr0efqc.js";
|
|
4
|
+
import"./packager-tool-134mvmcm.js";
|
|
5
|
+
import"./packager-tool-rqvr63x5.js";
|
|
6
|
+
import"./packager-tool-885mmrvr.js";
|
|
7
|
+
import {
|
|
8
|
+
fetchConnectorConnections,
|
|
9
|
+
lookupTypeCacheEntry
|
|
10
|
+
} from "./packager-tool-njzcfve1.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionOperationsApi,
|
|
13
|
+
ElementsApi,
|
|
14
|
+
assertActivityMetadataResolved,
|
|
15
|
+
createApiClient,
|
|
16
|
+
createConfiguredActivityClient
|
|
17
|
+
} from "./packager-tool-mp59jtpm.js";
|
|
18
|
+
import {
|
|
19
|
+
addVarIdsToInputsOutputs,
|
|
20
|
+
buildErrorOutput
|
|
21
|
+
} from "./packager-tool-ajvse9r3.js";
|
|
22
|
+
import"./packager-tool-s12392rd.js";
|
|
23
|
+
import"./packager-tool-jhdf8gt1.js";
|
|
24
|
+
import"./packager-tool-58q3tvh7.js";
|
|
25
|
+
import"./packager-tool-sc961w0q.js";
|
|
26
|
+
import"./packager-tool-a42jnpy5.js";
|
|
27
|
+
import"./packager-tool-c23zrhj8.js";
|
|
28
|
+
import"./packager-tool-37zvccmt.js";
|
|
29
|
+
import {
|
|
30
|
+
createConnectorBindings
|
|
31
|
+
} from "./packager-tool-0mj06yen.js";
|
|
32
|
+
import"./packager-tool-j9rfdrdm.js";
|
|
33
|
+
import"./packager-tool-r84ng21s.js";
|
|
34
|
+
import"./packager-tool-9scn4b15.js";
|
|
35
|
+
import"./packager-tool-3ze5vt52.js";
|
|
36
|
+
import"./packager-tool-vepqrsse.js";
|
|
37
|
+
import"./packager-tool-dqs5qy9s.js";
|
|
38
|
+
import"./packager-tool-qa9gftnj.js";
|
|
39
|
+
import {
|
|
40
|
+
catchError,
|
|
41
|
+
logger
|
|
42
|
+
} from "./packager-tool-5ax2ywcg.js";
|
|
43
|
+
import"./packager-tool-0v3s8r01.js";
|
|
44
|
+
import"./packager-tool-0gctz400.js";
|
|
45
|
+
import"./packager-tool-yc4kw997.js";
|
|
46
|
+
import"./packager-tool-1yh8g550.js";
|
|
47
|
+
|
|
48
|
+
// src/services/trigger-enrichment-service.ts
|
|
49
|
+
function buildTriggerBodyInput(params) {
|
|
50
|
+
const eventParams = params?.eventParams;
|
|
51
|
+
const filterExpression = params?.filterExpression;
|
|
52
|
+
const hasParams = eventParams !== undefined && Object.keys(eventParams).length > 0;
|
|
53
|
+
const body = {};
|
|
54
|
+
if (hasParams) {
|
|
55
|
+
body.filters = {
|
|
56
|
+
expression: filterExpression ?? ""
|
|
57
|
+
};
|
|
58
|
+
body.queryParams = { ...eventParams };
|
|
59
|
+
body.parameters = { ...eventParams };
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
name: "body",
|
|
63
|
+
type: "json",
|
|
64
|
+
target: "body",
|
|
65
|
+
body
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function buildTriggerOutputs(params) {
|
|
69
|
+
const outputs = [];
|
|
70
|
+
outputs.push({
|
|
71
|
+
name: "response",
|
|
72
|
+
displayName: params.displayName,
|
|
73
|
+
type: "jsonSchema",
|
|
74
|
+
source: "=response",
|
|
75
|
+
...params.responseSchema ? { _jsonSchema: params.responseSchema } : {}
|
|
76
|
+
});
|
|
77
|
+
outputs.push(buildErrorOutput());
|
|
78
|
+
return outputs;
|
|
79
|
+
}
|
|
80
|
+
async function buildTriggerPropertyConfig(params) {
|
|
81
|
+
const { entry, config, uiPathActivityTypeId, connectionId, eventParams } = params;
|
|
82
|
+
const instanceParameters = {
|
|
83
|
+
...parseEntryConfiguration(entry),
|
|
84
|
+
activityType: "CuratedWaitFor"
|
|
85
|
+
};
|
|
86
|
+
const triggerClient = await createConfiguredActivityClient({
|
|
87
|
+
instanceParameters,
|
|
88
|
+
connectionId,
|
|
89
|
+
savedFilterTrees: null,
|
|
90
|
+
fieldValues: eventParams ?? {}
|
|
91
|
+
});
|
|
92
|
+
const { essentialConfiguration } = triggerClient.getEssentialConfiguration();
|
|
93
|
+
assertActivityMetadataResolved(essentialConfiguration, connectionId);
|
|
94
|
+
return {
|
|
95
|
+
activityPropertyConfiguration: {
|
|
96
|
+
objectName: config.objectName ?? null,
|
|
97
|
+
eventType: config.eventOperation ?? null,
|
|
98
|
+
eventMode: config.eventMode ?? null,
|
|
99
|
+
configuration: `=jsonString:${JSON.stringify({ essentialConfiguration })}`,
|
|
100
|
+
uiPathActivityTypeId,
|
|
101
|
+
errorState: { issues: [] }
|
|
102
|
+
},
|
|
103
|
+
filterExpression: triggerClient.getCompiledFilter("filter")
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function buildTriggerContext(params) {
|
|
107
|
+
const {
|
|
108
|
+
config,
|
|
109
|
+
entry,
|
|
110
|
+
connectionBindingId,
|
|
111
|
+
folderKeyBindingId,
|
|
112
|
+
connectionId,
|
|
113
|
+
connectorName,
|
|
114
|
+
inputMetadata,
|
|
115
|
+
primaryKeyName,
|
|
116
|
+
activityPropertyConfiguration
|
|
117
|
+
} = params;
|
|
118
|
+
const context = [
|
|
119
|
+
{
|
|
120
|
+
name: "connectorKey",
|
|
121
|
+
value: config.connectorKey,
|
|
122
|
+
type: "string"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "connection",
|
|
126
|
+
value: `=bindings.${connectionBindingId}`,
|
|
127
|
+
type: "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "resourceKey",
|
|
131
|
+
value: connectionId,
|
|
132
|
+
type: "string"
|
|
133
|
+
}
|
|
134
|
+
];
|
|
135
|
+
if (folderKeyBindingId) {
|
|
136
|
+
context.push({
|
|
137
|
+
name: "folderKey",
|
|
138
|
+
value: `=bindings.${folderKeyBindingId}`,
|
|
139
|
+
type: "string"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
context.push({ name: "method", type: "string" });
|
|
143
|
+
context.push({ name: "path", type: "string" });
|
|
144
|
+
if (config.objectName) {
|
|
145
|
+
context.push({
|
|
146
|
+
name: "objectName",
|
|
147
|
+
value: config.objectName,
|
|
148
|
+
type: "string"
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
if (config.eventOperation) {
|
|
152
|
+
context.push({
|
|
153
|
+
name: "operation",
|
|
154
|
+
value: config.eventOperation,
|
|
155
|
+
type: "string"
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
const metadataBody = {
|
|
159
|
+
activityPropertyConfiguration: activityPropertyConfiguration ?? {},
|
|
160
|
+
activityMetadata: { activity: entry },
|
|
161
|
+
inputMetadata: inputMetadata ?? {},
|
|
162
|
+
telemetryData: {
|
|
163
|
+
connectorKey: config.connectorKey,
|
|
164
|
+
connectorName: connectorName ?? entry.displayName,
|
|
165
|
+
objectName: config.objectName ?? "",
|
|
166
|
+
objectDisplayName: config.objectName?.replaceAll("_", " ") ?? "",
|
|
167
|
+
primaryKeyName: primaryKeyName ?? ""
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
context.push({
|
|
171
|
+
name: "metadata",
|
|
172
|
+
type: "json",
|
|
173
|
+
body: metadataBody
|
|
174
|
+
});
|
|
175
|
+
return context;
|
|
176
|
+
}
|
|
177
|
+
async function fetchTriggerFieldInfo(connectorKey, objectName, eventOperation) {
|
|
178
|
+
const result = { allFields: {}, fieldDefinitions: {} };
|
|
179
|
+
if (!objectName || !eventOperation)
|
|
180
|
+
return result;
|
|
181
|
+
const [apiError, api] = await catchError(createApiClient(ElementsApi));
|
|
182
|
+
if (apiError)
|
|
183
|
+
return result;
|
|
184
|
+
const [fetchError, objects] = await catchError(api.getObjects({ elementKey: connectorKey }));
|
|
185
|
+
if (fetchError || !Array.isArray(objects))
|
|
186
|
+
return result;
|
|
187
|
+
const match = objects.find((obj) => obj.name === objectName);
|
|
188
|
+
if (!match)
|
|
189
|
+
return result;
|
|
190
|
+
const metadata = match.metadata;
|
|
191
|
+
const eventTypes = metadata?.events?.polling?.eventTypes;
|
|
192
|
+
if (!Array.isArray(eventTypes))
|
|
193
|
+
return result;
|
|
194
|
+
const eventType = eventTypes.find((et) => et.operation === eventOperation);
|
|
195
|
+
if (!eventType?.parameters)
|
|
196
|
+
return result;
|
|
197
|
+
const allParams = [];
|
|
198
|
+
const bodyDefs = {};
|
|
199
|
+
for (const param of eventType.parameters) {
|
|
200
|
+
allParams.push(param.name);
|
|
201
|
+
bodyDefs[param.name] = {
|
|
202
|
+
name: param.name,
|
|
203
|
+
displayName: param.displayName ?? param.name,
|
|
204
|
+
type: param.type ?? "string",
|
|
205
|
+
required: !!param.required,
|
|
206
|
+
...param.description && {
|
|
207
|
+
description: param.description
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
if (allParams.length > 0) {
|
|
212
|
+
result.allFields.body = allParams;
|
|
213
|
+
}
|
|
214
|
+
if (Object.keys(bodyDefs).length > 0) {
|
|
215
|
+
result.fieldDefinitions.body = bodyDefs;
|
|
216
|
+
}
|
|
217
|
+
return result;
|
|
218
|
+
}
|
|
219
|
+
async function fetchEventOutputFields(connectionId, operation, objectName) {
|
|
220
|
+
const [apiError, api] = await catchError(createApiClient(ConnectionOperationsApi));
|
|
221
|
+
if (apiError) {
|
|
222
|
+
logger.debug(`Failed to create ConnectionOperationsApi client: ${apiError.message}`);
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
const [fetchError, fields] = await catchError(api.apiV1ConnectionsConnectionIdOperationsOperationNameObjectsObjectNameEventFieldsGet({ connectionId, operationName: operation, objectName }));
|
|
226
|
+
if (fetchError || !Array.isArray(fields)) {
|
|
227
|
+
logger.debug(`Failed to fetch event fields for ${objectName}/${operation}: ${fetchError?.message ?? "unexpected response"}`);
|
|
228
|
+
return [];
|
|
229
|
+
}
|
|
230
|
+
return fields;
|
|
231
|
+
}
|
|
232
|
+
function buildEventOutputSchema(fields) {
|
|
233
|
+
if (fields.length === 0)
|
|
234
|
+
return;
|
|
235
|
+
const properties = {};
|
|
236
|
+
const definitions = {};
|
|
237
|
+
for (const field of fields) {
|
|
238
|
+
const name = field.name;
|
|
239
|
+
if (!name)
|
|
240
|
+
continue;
|
|
241
|
+
const type = field.type ?? "string";
|
|
242
|
+
const title = field.displayName ?? name;
|
|
243
|
+
const arrayMatch = name.match(/^([^[]+)\[\*\]\.(.+)$/);
|
|
244
|
+
if (arrayMatch) {
|
|
245
|
+
const [, arrayName, innerName] = arrayMatch;
|
|
246
|
+
const arrayKey = `${arrayName}[*]`;
|
|
247
|
+
if (!definitions[arrayKey]) {
|
|
248
|
+
definitions[arrayKey] = { type: "object", properties: {} };
|
|
249
|
+
properties[arrayKey] = {
|
|
250
|
+
title: arrayName,
|
|
251
|
+
type: "array",
|
|
252
|
+
items: { $ref: `#/definitions/${arrayKey}` }
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
definitions[arrayKey].properties[innerName] = { title, type };
|
|
256
|
+
} else {
|
|
257
|
+
properties[name] = { title, type };
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return {
|
|
261
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
262
|
+
type: "object",
|
|
263
|
+
properties,
|
|
264
|
+
...Object.keys(definitions).length > 0 ? { definitions } : {}
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
async function enrichConnectorTrigger(triggerTypeId, connectionId, eventParams, indexType = "typecache-triggers") {
|
|
268
|
+
const { entry, config } = await lookupTypeCacheEntry(triggerTypeId, indexType);
|
|
269
|
+
const connections = await fetchConnectorConnections(config.connectorKey);
|
|
270
|
+
const connection = connections.find((c) => c.id === connectionId);
|
|
271
|
+
if (!connection) {
|
|
272
|
+
throw new Error(`Connection "${connectionId}" not found for connector "${config.connectorKey}"`);
|
|
273
|
+
}
|
|
274
|
+
const hasEventParams = eventParams !== undefined && Object.keys(eventParams).length > 0;
|
|
275
|
+
const { activityPropertyConfiguration, filterExpression } = await buildTriggerPropertyConfig({
|
|
276
|
+
entry,
|
|
277
|
+
config,
|
|
278
|
+
uiPathActivityTypeId: triggerTypeId,
|
|
279
|
+
connectionId,
|
|
280
|
+
eventParams: hasEventParams ? eventParams : undefined
|
|
281
|
+
});
|
|
282
|
+
const inputs = [
|
|
283
|
+
buildTriggerBodyInput(hasEventParams ? {
|
|
284
|
+
eventParams,
|
|
285
|
+
filterExpression
|
|
286
|
+
} : undefined)
|
|
287
|
+
];
|
|
288
|
+
let eventFields = [];
|
|
289
|
+
let responseSchema;
|
|
290
|
+
if (config.objectName && config.eventOperation) {
|
|
291
|
+
eventFields = await fetchEventOutputFields(connectionId, config.eventOperation, config.objectName);
|
|
292
|
+
responseSchema = buildEventOutputSchema(eventFields);
|
|
293
|
+
}
|
|
294
|
+
const outputs = buildTriggerOutputs({
|
|
295
|
+
responseSchema,
|
|
296
|
+
displayName: entry.displayName
|
|
297
|
+
});
|
|
298
|
+
const folderKey = connection.folder?.key ?? undefined;
|
|
299
|
+
const connectorName = connection.connector?.name;
|
|
300
|
+
const [connectionBinding, folderKeyBinding] = createConnectorBindings(config.connectorKey, connectionId, folderKey);
|
|
301
|
+
const bindings = [connectionBinding];
|
|
302
|
+
if (folderKeyBinding) {
|
|
303
|
+
bindings.push(folderKeyBinding);
|
|
304
|
+
}
|
|
305
|
+
const context = buildTriggerContext({
|
|
306
|
+
config,
|
|
307
|
+
entry,
|
|
308
|
+
connectionBindingId: connectionBinding.id,
|
|
309
|
+
folderKeyBindingId: folderKeyBinding?.id,
|
|
310
|
+
connectionId,
|
|
311
|
+
connectorName,
|
|
312
|
+
activityPropertyConfiguration
|
|
313
|
+
});
|
|
314
|
+
const { inputsWithVars, outputsWithVars } = addVarIdsToInputsOutputs({
|
|
315
|
+
inputs,
|
|
316
|
+
outputs
|
|
317
|
+
});
|
|
318
|
+
return {
|
|
319
|
+
entry,
|
|
320
|
+
config,
|
|
321
|
+
connectionId,
|
|
322
|
+
folderKey,
|
|
323
|
+
resolvedOperation: config.eventOperation,
|
|
324
|
+
context,
|
|
325
|
+
bindings,
|
|
326
|
+
inputs: inputsWithVars,
|
|
327
|
+
outputs: outputsWithVars
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
export {
|
|
331
|
+
buildEventOutputSchema,
|
|
332
|
+
buildTriggerBodyInput,
|
|
333
|
+
buildTriggerContext,
|
|
334
|
+
buildTriggerOutputs,
|
|
335
|
+
enrichConnectorTrigger,
|
|
336
|
+
fetchEventOutputFields,
|
|
337
|
+
fetchTriggerFieldInfo
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
//# debugId=0E16C74D39425D2D64756E2164756E21
|