@uipath/integrationservice-tool 1.201.0-preview.115 → 1.201.0-preview.122
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/{index-w23k88b5.js → index-p50kx6jv.js} +202 -64
- package/dist/index.js +1 -1
- package/dist/{tool-jsd9bcge.js → tool-9xk7k4pf.js} +1283 -2537
- package/dist/tool.js +1 -1
- package/package.json +2 -2
|
@@ -11287,49 +11287,6 @@ var import_rxjs2 = __toESM(require_cjs(), 1);
|
|
|
11287
11287
|
var import_operators = __toESM(require_operators(), 1);
|
|
11288
11288
|
var import_rxjs3 = __toESM(require_cjs(), 1);
|
|
11289
11289
|
var import_operators2 = __toESM(require_operators(), 1);
|
|
11290
|
-
// ../../node_modules/uuid/dist-node/rng.js
|
|
11291
|
-
var rnds8 = new Uint8Array(16);
|
|
11292
|
-
function rng() {
|
|
11293
|
-
return crypto.getRandomValues(rnds8);
|
|
11294
|
-
}
|
|
11295
|
-
|
|
11296
|
-
// ../../node_modules/uuid/dist-node/stringify.js
|
|
11297
|
-
var byteToHex = [];
|
|
11298
|
-
for (let i = 0;i < 256; ++i) {
|
|
11299
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
11300
|
-
}
|
|
11301
|
-
function unsafeStringify(arr, offset = 0) {
|
|
11302
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
11303
|
-
}
|
|
11304
|
-
|
|
11305
|
-
// ../../node_modules/uuid/dist-node/v4.js
|
|
11306
|
-
function v4(options, buf, offset) {
|
|
11307
|
-
if (!buf && !options && crypto.randomUUID) {
|
|
11308
|
-
return crypto.randomUUID();
|
|
11309
|
-
}
|
|
11310
|
-
return _v4(options, buf, offset);
|
|
11311
|
-
}
|
|
11312
|
-
function _v4(options, buf, offset) {
|
|
11313
|
-
options = options || {};
|
|
11314
|
-
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
11315
|
-
if (rnds.length < 16) {
|
|
11316
|
-
throw new Error("Random bytes length must be >= 16");
|
|
11317
|
-
}
|
|
11318
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
11319
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
11320
|
-
if (buf) {
|
|
11321
|
-
offset = offset || 0;
|
|
11322
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
11323
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
11324
|
-
}
|
|
11325
|
-
for (let i = 0;i < 16; ++i) {
|
|
11326
|
-
buf[offset + i] = rnds[i];
|
|
11327
|
-
}
|
|
11328
|
-
return buf;
|
|
11329
|
-
}
|
|
11330
|
-
return unsafeStringify(rnds);
|
|
11331
|
-
}
|
|
11332
|
-
var v4_default = v4;
|
|
11333
11290
|
// ../../node_modules/lodash-es/_freeGlobal.js
|
|
11334
11291
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
11335
11292
|
var _freeGlobal_default = freeGlobal;
|
|
@@ -31608,8 +31565,25 @@ var TypescriptLoader = class _TypescriptLoader {
|
|
|
31608
31565
|
this._value = null;
|
|
31609
31566
|
}
|
|
31610
31567
|
};
|
|
31568
|
+
function randomUuidFromBytes() {
|
|
31569
|
+
const bytes = new Uint8Array(16);
|
|
31570
|
+
crypto.getRandomValues(bytes);
|
|
31571
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
31572
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
31573
|
+
const hex3 = [];
|
|
31574
|
+
for (const byte of bytes) {
|
|
31575
|
+
hex3.push(byte.toString(16).padStart(2, "0"));
|
|
31576
|
+
}
|
|
31577
|
+
return [
|
|
31578
|
+
hex3.slice(0, 4).join(""),
|
|
31579
|
+
hex3.slice(4, 6).join(""),
|
|
31580
|
+
hex3.slice(6, 8).join(""),
|
|
31581
|
+
hex3.slice(8, 10).join(""),
|
|
31582
|
+
hex3.slice(10, 16).join("")
|
|
31583
|
+
].join("-");
|
|
31584
|
+
}
|
|
31611
31585
|
function getUuid() {
|
|
31612
|
-
return "randomUUID" in crypto ? crypto.randomUUID() :
|
|
31586
|
+
return "randomUUID" in crypto ? crypto.randomUUID() : randomUuidFromBytes();
|
|
31613
31587
|
}
|
|
31614
31588
|
var WellKnownFileNames = {
|
|
31615
31589
|
UiCacheTemplate: "{0}_UiCache.zip",
|
|
@@ -32998,6 +32972,8 @@ function replaceTransientProperty(key) {
|
|
|
32998
32972
|
return;
|
|
32999
32973
|
case "savedResourceSelections":
|
|
33000
32974
|
return;
|
|
32975
|
+
case "disabledReason":
|
|
32976
|
+
return;
|
|
33001
32977
|
default:
|
|
33002
32978
|
return null;
|
|
33003
32979
|
}
|
|
@@ -33072,10 +33048,11 @@ var BrowserItem = class _BrowserItem {
|
|
|
33072
33048
|
}
|
|
33073
33049
|
};
|
|
33074
33050
|
var LookupValue = class _LookupValue {
|
|
33075
|
-
constructor(id, displayColumns, stringFormatDisplayColumns) {
|
|
33051
|
+
constructor(id, displayColumns, stringFormatDisplayColumns, disabledReason) {
|
|
33076
33052
|
this.id = id;
|
|
33077
33053
|
this.displayColumns = displayColumns;
|
|
33078
33054
|
this.stringFormatDisplayColumns = stringFormatDisplayColumns ?? "";
|
|
33055
|
+
this.disabledReason = disabledReason;
|
|
33079
33056
|
}
|
|
33080
33057
|
get displayName() {
|
|
33081
33058
|
if (!StringExtensions.isNullOrEmpty(this.stringFormatDisplayColumns)) {
|
|
@@ -34156,6 +34133,7 @@ var FilterTree = class _FilterTree {
|
|
|
34156
34133
|
const result = Object.create(_FilterTree.prototype);
|
|
34157
34134
|
const parsed = JSON.parse(serialized, _FilterTree._reviver);
|
|
34158
34135
|
Object.assign(result, parsed);
|
|
34136
|
+
result.groups ??= [];
|
|
34159
34137
|
return result;
|
|
34160
34138
|
}
|
|
34161
34139
|
static _reviver(key, value) {
|
|
@@ -36286,9 +36264,10 @@ var ConnectorDateFormatHelper = class _ConnectorDateFormatHelper {
|
|
|
36286
36264
|
}
|
|
36287
36265
|
};
|
|
36288
36266
|
var DataSource = class {
|
|
36289
|
-
constructor(getIdFunc, getLabelFunc, getDescriptionFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
|
|
36267
|
+
constructor(getIdFunc, getLabelFunc, getDescriptionFunc, getDisabledReasonFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
|
|
36290
36268
|
this._getLabelFunc = null;
|
|
36291
36269
|
this._getDescriptionFunc = null;
|
|
36270
|
+
this._getDisabledReasonFunc = null;
|
|
36292
36271
|
this._itemToValueFunc = null;
|
|
36293
36272
|
this._valueToItemFunc = null;
|
|
36294
36273
|
this._selectionToValueFunc = null;
|
|
@@ -36299,6 +36278,7 @@ var DataSource = class {
|
|
|
36299
36278
|
this._getIdFunc = getIdFunc;
|
|
36300
36279
|
this._getLabelFunc = getLabelFunc;
|
|
36301
36280
|
this._getDescriptionFunc = getDescriptionFunc;
|
|
36281
|
+
this._getDisabledReasonFunc = getDisabledReasonFunc;
|
|
36302
36282
|
this._itemToValueFunc = itemToValueFunc;
|
|
36303
36283
|
this._valueToItemFunc = valueToItemFunc;
|
|
36304
36284
|
this._selectionToValueFunc = selectionToValueFunc;
|
|
@@ -36316,11 +36296,22 @@ var DataSource = class {
|
|
|
36316
36296
|
}
|
|
36317
36297
|
}
|
|
36318
36298
|
getData() {
|
|
36319
|
-
return this.data.map((item) =>
|
|
36320
|
-
|
|
36321
|
-
|
|
36322
|
-
|
|
36323
|
-
|
|
36299
|
+
return this.data.map((item) => {
|
|
36300
|
+
const widgetSourceItem = {
|
|
36301
|
+
id: this._getIdFunc(item) ?? "",
|
|
36302
|
+
label: this._getLabelFunc ? this._getLabelFunc(item) : "",
|
|
36303
|
+
description: this._getDescriptionFunc ? this._getDescriptionFunc(item) : ""
|
|
36304
|
+
};
|
|
36305
|
+
const reason = this._getDisabledReasonFunc?.(item);
|
|
36306
|
+
if (reason === undefined) {
|
|
36307
|
+
return widgetSourceItem;
|
|
36308
|
+
}
|
|
36309
|
+
return {
|
|
36310
|
+
...widgetSourceItem,
|
|
36311
|
+
disabled: true,
|
|
36312
|
+
...reason != null && { tooltip: reason }
|
|
36313
|
+
};
|
|
36314
|
+
});
|
|
36324
36315
|
}
|
|
36325
36316
|
getValue(item) {
|
|
36326
36317
|
if (this._itemToValueFunc) {
|
|
@@ -36354,6 +36345,7 @@ var DataSourceBuilder = class _DataSourceBuilder {
|
|
|
36354
36345
|
constructor(getIdFunc) {
|
|
36355
36346
|
this._getLabelFunc = null;
|
|
36356
36347
|
this._getDescriptionFunc = null;
|
|
36348
|
+
this._getDisabledReasonFunc = null;
|
|
36357
36349
|
this._itemToValueFunc = null;
|
|
36358
36350
|
this._valueToItemFunc = null;
|
|
36359
36351
|
this._selectionToValueFunc = null;
|
|
@@ -36373,6 +36365,10 @@ var DataSourceBuilder = class _DataSourceBuilder {
|
|
|
36373
36365
|
this._getDescriptionFunc = func;
|
|
36374
36366
|
return this;
|
|
36375
36367
|
}
|
|
36368
|
+
withDisabled(func) {
|
|
36369
|
+
this._getDisabledReasonFunc = func;
|
|
36370
|
+
return this;
|
|
36371
|
+
}
|
|
36376
36372
|
withSingleItemConverter(itemToValue, valueToItem) {
|
|
36377
36373
|
this._itemToValueFunc = itemToValue;
|
|
36378
36374
|
this._valueToItemFunc = valueToItem;
|
|
@@ -36392,7 +36388,7 @@ var DataSourceBuilder = class _DataSourceBuilder {
|
|
|
36392
36388
|
return this;
|
|
36393
36389
|
}
|
|
36394
36390
|
build() {
|
|
36395
|
-
return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
|
|
36391
|
+
return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._getDisabledReasonFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
|
|
36396
36392
|
}
|
|
36397
36393
|
getCurrentConfig() {
|
|
36398
36394
|
return {};
|
|
@@ -38590,7 +38586,7 @@ var DynamicDataSourceBuilder = class {
|
|
|
38590
38586
|
this._translationService = serviceProvider.translationService;
|
|
38591
38587
|
this._instanceParameters = instanceParameters;
|
|
38592
38588
|
this._latestLookupValues = this._lookupParameters.defaultValues;
|
|
38593
|
-
this._lookupPagedDataSourceBuilder = DataSourceBuilder.withId((s2) => s2 == null ? null : s2.id).withLabel((s2) => s2?.displayName ?? null).withSingleItemConverter((s2) => this._convertLookupValueToRawId(s2?.id ?? null), this._convertRawIdToLookupValue);
|
|
38589
|
+
this._lookupPagedDataSourceBuilder = DataSourceBuilder.withId((s2) => s2 == null ? null : s2.id).withLabel((s2) => s2?.displayName ?? null).withDisabled((s2) => s2?.disabledReason).withSingleItemConverter((s2) => this._convertLookupValueToRawId(s2?.id ?? null), this._convertRawIdToLookupValue);
|
|
38594
38590
|
if (this._lookupParameters.defaultValues != null && this._lookupParameters.defaultValues.length > 0) {
|
|
38595
38591
|
this._passingDefaultValuesPending = true;
|
|
38596
38592
|
this._lookupPagedDataSourceBuilder = this._lookupPagedDataSourceBuilder.withData(this._lookupParameters.defaultValues);
|
|
@@ -39100,12 +39096,14 @@ var ObjectMethodDesign = class _ObjectMethodDesign {
|
|
|
39100
39096
|
}
|
|
39101
39097
|
};
|
|
39102
39098
|
var ObjectMethod = class _ObjectMethod {
|
|
39103
|
-
constructor(operation, method, path, parameters, design, isHidden, responseDisplayName, responseDescription, pagination) {
|
|
39099
|
+
constructor(operation, method, path, parameters, design, isHidden, responseDisplayName, responseDescription, pagination, disabled = null, disabledReason = null) {
|
|
39104
39100
|
this.operation = operation;
|
|
39105
39101
|
this.method = method;
|
|
39106
39102
|
this.path = path;
|
|
39107
39103
|
this.parameters = parameters;
|
|
39108
39104
|
this.isHidden = isHidden;
|
|
39105
|
+
this.disabled = disabled;
|
|
39106
|
+
this.disabledReason = disabledReason;
|
|
39109
39107
|
this.responseDisplayName = responseDisplayName;
|
|
39110
39108
|
this.responseDescription = responseDescription;
|
|
39111
39109
|
this.design = design;
|
|
@@ -39211,18 +39209,38 @@ var ActivityObjectsLookupHelper = class _ActivityObjectsLookupHelper {
|
|
|
39211
39209
|
this._eventLookupNames = [_ActivityObjectsLookupHelper.LookupDisplayName, _ActivityObjectsLookupHelper._eventMode];
|
|
39212
39210
|
}
|
|
39213
39211
|
static getObjectsLookup(connectorKey) {
|
|
39214
|
-
return new LookupReference(
|
|
39212
|
+
return new LookupReference(_ActivityObjectsLookupHelper._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), _ActivityObjectsLookupHelper._objectLookupNames, null, null);
|
|
39215
39213
|
}
|
|
39216
39214
|
static eventsLookup(connectorKey) {
|
|
39217
|
-
return new LookupReference(
|
|
39215
|
+
return new LookupReference(_ActivityObjectsLookupHelper._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), _ActivityObjectsLookupHelper._eventLookupNames, null, null);
|
|
39218
39216
|
}
|
|
39219
|
-
static
|
|
39217
|
+
static findMethodForOperation(cacheValue, operation) {
|
|
39220
39218
|
const rawObject = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1] ?? null;
|
|
39221
39219
|
let itemMetadata = null;
|
|
39222
39220
|
if (rawObject) {
|
|
39223
39221
|
itemMetadata = Metadata.factory(JSON.stringify(rawObject));
|
|
39224
39222
|
}
|
|
39225
|
-
|
|
39223
|
+
if (itemMetadata == null) {
|
|
39224
|
+
return null;
|
|
39225
|
+
}
|
|
39226
|
+
let usable = null;
|
|
39227
|
+
for (const method of Object.values(itemMetadata.method)) {
|
|
39228
|
+
if (method.operation !== operation || method.isHidden) {
|
|
39229
|
+
continue;
|
|
39230
|
+
}
|
|
39231
|
+
if (method.disabled) {
|
|
39232
|
+
return method;
|
|
39233
|
+
}
|
|
39234
|
+
usable ??= method;
|
|
39235
|
+
}
|
|
39236
|
+
return usable;
|
|
39237
|
+
}
|
|
39238
|
+
static objectVerdictForOperation(cacheValue, operation) {
|
|
39239
|
+
const method = _ActivityObjectsLookupHelper.findMethodForOperation(cacheValue, operation);
|
|
39240
|
+
return {
|
|
39241
|
+
include: method != null,
|
|
39242
|
+
disabledReason: method?.disabled ? method.disabledReason ?? null : undefined
|
|
39243
|
+
};
|
|
39226
39244
|
}
|
|
39227
39245
|
static filterCachedConnectorEventObject(cacheValue, operation) {
|
|
39228
39246
|
const itemMetadata = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1];
|
|
@@ -39312,7 +39330,7 @@ var DataSourceBuilderFactory = class _DataSourceBuilderFactory {
|
|
|
39312
39330
|
static _buildActivityObjectLookupParameters(activityConfiguration, exceptionHandler, modelItem) {
|
|
39313
39331
|
const objectsLookupReference = ActivityObjectsLookupHelper.getObjectsLookup(activityConfiguration.instanceParameters.connectorKey);
|
|
39314
39332
|
const defaultValues = activityConfiguration.cachedLookupValues.get(Constants.ObjectNamePropertyName) ?? null;
|
|
39315
|
-
const cacheFilter = (x) => ActivityObjectsLookupHelper.
|
|
39333
|
+
const cacheFilter = (x) => ActivityObjectsLookupHelper.objectVerdictForOperation(x, activityConfiguration.operation);
|
|
39316
39334
|
return _DataSourceBuilderFactory._buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, objectsLookupReference, defaultValues, cacheFilter, true);
|
|
39317
39335
|
}
|
|
39318
39336
|
static _buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, lookupReference, defaultValues = null, cacheValueFilter = null, sortData = null) {
|
|
@@ -40469,7 +40487,7 @@ var LookupService = class _LookupService {
|
|
|
40469
40487
|
}
|
|
40470
40488
|
getContent(lookupParameters) {
|
|
40471
40489
|
return this._lookupCacheService.getCachedData(lookupParameters).pipe(import_rxjs16.switchMap((cachedData) => {
|
|
40472
|
-
let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern) => new LookupValue(item.id, columns, pattern));
|
|
40490
|
+
let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern, disabledReason) => new LookupValue(item.id, columns, pattern, disabledReason));
|
|
40473
40491
|
if (lookupParameters.sortData === true) {
|
|
40474
40492
|
lookupValues = lookupValues.sort((lv1, lv2) => lv1.displayName.toLowerCase().localeCompare(lv2.displayName.toLowerCase()));
|
|
40475
40493
|
}
|
|
@@ -40503,17 +40521,24 @@ var LookupService = class _LookupService {
|
|
|
40503
40521
|
const lookupValues = [];
|
|
40504
40522
|
const lookupNameRegexDictionary = new Map(lookupParameters.lookupReference.lookupNames.map((property2) => [property2, new RegExp(`\\{${property2}\\}`, "g")]));
|
|
40505
40523
|
for (const item of cachedData) {
|
|
40506
|
-
|
|
40524
|
+
const verdict = _LookupService._normalizeVerdict(lookupParameters.cacheValueFilter?.(item));
|
|
40525
|
+
if (!verdict.include) {
|
|
40507
40526
|
continue;
|
|
40508
40527
|
}
|
|
40509
40528
|
const {
|
|
40510
40529
|
argumentValues,
|
|
40511
40530
|
displayPattern
|
|
40512
40531
|
} = replaceStringCombinedPattern(lookupNameRegexDictionary, lookupParameters.fieldDesign?.displayPattern ?? null, (keyName) => LookupPropertyHelper.getPropertyOrNull(item.columnValues, keyName));
|
|
40513
|
-
lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty));
|
|
40532
|
+
lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty, verdict.disabledReason));
|
|
40514
40533
|
}
|
|
40515
40534
|
return lookupValues;
|
|
40516
40535
|
}
|
|
40536
|
+
static _normalizeVerdict(result) {
|
|
40537
|
+
if (result === undefined) {
|
|
40538
|
+
return { include: true };
|
|
40539
|
+
}
|
|
40540
|
+
return typeof result === "boolean" ? { include: result } : result;
|
|
40541
|
+
}
|
|
40517
40542
|
};
|
|
40518
40543
|
var ConnectorEventOperation = class _ConnectorEventOperation {
|
|
40519
40544
|
static {
|
|
@@ -41709,6 +41734,9 @@ var JitTypeCreationResults = class {
|
|
|
41709
41734
|
this.jsonSchema = jsonSchema;
|
|
41710
41735
|
}
|
|
41711
41736
|
};
|
|
41737
|
+
var ARRAY_MARKER_REGEX = /\[\*]/g;
|
|
41738
|
+
var getArrayDepth = (fieldName) => (fieldName.match(ARRAY_MARKER_REGEX) ?? []).length;
|
|
41739
|
+
var stripArrayMarkers = (fieldName) => fieldName.replace(ARRAY_MARKER_REGEX, "");
|
|
41712
41740
|
var capitalize = (str) => str?.charAt(0)?.toUpperCase() + str?.slice(1);
|
|
41713
41741
|
var formatDisplayName = (displayName) => {
|
|
41714
41742
|
const formatted = displayName.replace(/[-._*[\]]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().replace(/\s+/g, " ").trim().replace(/^[a-z]/, (c) => c.toUpperCase());
|
|
@@ -41846,7 +41874,6 @@ var createPrimitiveFieldSchema = (field) => {
|
|
|
41846
41874
|
}
|
|
41847
41875
|
return schema;
|
|
41848
41876
|
};
|
|
41849
|
-
var getArrayDepth = (fieldName) => (fieldName.match(/\[\*]/g) ?? []).length;
|
|
41850
41877
|
var createArrayOrObjectPropertySchema = (fieldName, jsonSchema, definitionName) => {
|
|
41851
41878
|
const finalDefinitionName = definitionName ?? fieldName;
|
|
41852
41879
|
if (!finalDefinitionName) {
|
|
@@ -47034,6 +47061,107 @@ var ConnectorActivityFactory = class _ConnectorActivityFactory {
|
|
|
47034
47061
|
return activity;
|
|
47035
47062
|
}
|
|
47036
47063
|
};
|
|
47064
|
+
var VALID_JSON_SCHEMA_TYPES = /* @__PURE__ */ new Set(["array", "boolean", "integer", "null", "number", "object", "string"]);
|
|
47065
|
+
var createObjectNode = () => ({
|
|
47066
|
+
type: "object",
|
|
47067
|
+
properties: {},
|
|
47068
|
+
required: []
|
|
47069
|
+
});
|
|
47070
|
+
var isObjectNode = (schema) => schema?.type === "object" && schema.properties != null && Array.isArray(schema.required);
|
|
47071
|
+
var wrapInArrays = (schema, depth) => {
|
|
47072
|
+
let result = schema;
|
|
47073
|
+
for (let i2 = 0;i2 < depth; i2++) {
|
|
47074
|
+
result = {
|
|
47075
|
+
type: "array",
|
|
47076
|
+
items: result
|
|
47077
|
+
};
|
|
47078
|
+
}
|
|
47079
|
+
return result;
|
|
47080
|
+
};
|
|
47081
|
+
var descendArrays = (schema, depth) => {
|
|
47082
|
+
let current = schema;
|
|
47083
|
+
for (let i2 = 0;i2 < depth; i2++) {
|
|
47084
|
+
if (current.type === "array" && current.items) {
|
|
47085
|
+
current = current.items;
|
|
47086
|
+
}
|
|
47087
|
+
}
|
|
47088
|
+
return current;
|
|
47089
|
+
};
|
|
47090
|
+
var setNestedProperty = (parent, pathParts, leaf, required2) => {
|
|
47091
|
+
const head2 = pathParts[0];
|
|
47092
|
+
const key = stripArrayMarkers(head2);
|
|
47093
|
+
const arrayLevels = getArrayDepth(head2);
|
|
47094
|
+
if (pathParts.length === 1) {
|
|
47095
|
+
parent.properties[key] = wrapInArrays(leaf, arrayLevels);
|
|
47096
|
+
if (required2) {
|
|
47097
|
+
parent.required.push(key);
|
|
47098
|
+
}
|
|
47099
|
+
return;
|
|
47100
|
+
}
|
|
47101
|
+
const existing = parent.properties[key];
|
|
47102
|
+
const existingNode = existing ? descendArrays(existing, arrayLevels) : undefined;
|
|
47103
|
+
const child = isObjectNode(existingNode) ? existingNode : createObjectNode();
|
|
47104
|
+
parent.properties[key] ??= wrapInArrays(child, arrayLevels);
|
|
47105
|
+
setNestedProperty(child, pathParts.slice(1), leaf, required2);
|
|
47106
|
+
};
|
|
47107
|
+
var pruneEmptyRequired = (node) => {
|
|
47108
|
+
if (Array.isArray(node.required) && node.required.length === 0) {
|
|
47109
|
+
delete node.required;
|
|
47110
|
+
}
|
|
47111
|
+
for (const child of Object.values(node.properties ?? {})) {
|
|
47112
|
+
pruneEmptyRequired(child);
|
|
47113
|
+
}
|
|
47114
|
+
if (node.items) {
|
|
47115
|
+
pruneEmptyRequired(node.items);
|
|
47116
|
+
}
|
|
47117
|
+
};
|
|
47118
|
+
var createLeafSchema = (field, normalizedType) => {
|
|
47119
|
+
const leaf = { type: normalizedType };
|
|
47120
|
+
if (field.displayName) {
|
|
47121
|
+
leaf.title = field.displayName;
|
|
47122
|
+
}
|
|
47123
|
+
if (field.description) {
|
|
47124
|
+
leaf.description = field.description;
|
|
47125
|
+
}
|
|
47126
|
+
const enumItems = (field.enum ?? []).filter((item) => item.value != null);
|
|
47127
|
+
if (enumItems.length > 0) {
|
|
47128
|
+
leaf.enum = enumItems.map((item) => item.value);
|
|
47129
|
+
leaf.oneOf = enumItems.map((item) => ({
|
|
47130
|
+
const: item.value,
|
|
47131
|
+
title: item.name ?? String(item.value)
|
|
47132
|
+
}));
|
|
47133
|
+
}
|
|
47134
|
+
return leaf;
|
|
47135
|
+
};
|
|
47136
|
+
var hasShowAction = (field) => field.fieldActions?.some((action) => action.actionType === "show") ?? false;
|
|
47137
|
+
var indexResourceFieldsByFolderKeyCompanion = (fields) => new Map(fields.filter((field) => field.design?.component === "Resources").map((field) => [NamingHelper.solutionResourceFolderKeyFieldName(field.name), field]));
|
|
47138
|
+
var shouldHideField = (field) => field.design?.isHidden === true && !hasShowAction(field);
|
|
47139
|
+
var convertToInputJsonSchema = ({ fields }) => {
|
|
47140
|
+
const root2 = {
|
|
47141
|
+
type: "object",
|
|
47142
|
+
properties: {},
|
|
47143
|
+
required: [],
|
|
47144
|
+
additionalProperties: false
|
|
47145
|
+
};
|
|
47146
|
+
const resourceFieldsByFolderKeyCompanion = indexResourceFieldsByFolderKeyCompanion(fields);
|
|
47147
|
+
for (const field of fields) {
|
|
47148
|
+
const owningResourceField = resourceFieldsByFolderKeyCompanion.get(field.name);
|
|
47149
|
+
if (!field.request || field.onCanvas === false || shouldHideField(field) && !owningResourceField) {
|
|
47150
|
+
continue;
|
|
47151
|
+
}
|
|
47152
|
+
const normalizedType = (field.type ?? "").toLowerCase();
|
|
47153
|
+
if (!VALID_JSON_SCHEMA_TYPES.has(normalizedType)) {
|
|
47154
|
+
continue;
|
|
47155
|
+
}
|
|
47156
|
+
const pathParts = field.name.split(".").filter((part) => part.length > 0);
|
|
47157
|
+
if (pathParts.length === 0) {
|
|
47158
|
+
continue;
|
|
47159
|
+
}
|
|
47160
|
+
setNestedProperty(root2, pathParts, createLeafSchema(field, normalizedType), owningResourceField?.required ?? field.required);
|
|
47161
|
+
}
|
|
47162
|
+
pruneEmptyRequired(root2);
|
|
47163
|
+
return root2;
|
|
47164
|
+
};
|
|
47037
47165
|
function buildTriggerFilterExpression(config2, activityState, translationConfiguration, options) {
|
|
47038
47166
|
const userResult = resolveUserFilter(config2, translationConfiguration, options.rebuildUserFilter);
|
|
47039
47167
|
const mandatoryResult = resolveMandatoryFilter(config2, activityState, translationConfiguration);
|
|
@@ -47769,6 +47897,16 @@ var ConnectorActivity = class extends WorkflowActivityBase {
|
|
|
47769
47897
|
const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
|
|
47770
47898
|
return new WorkflowActivityOutputInformation(name, isCustomName, fieldsContainer.outputTypeDefinition ?? undefined, undefined, fieldsContainer.outputJsonSchema ?? undefined, fieldsContainer.hasFileOutput);
|
|
47771
47899
|
}
|
|
47900
|
+
getInputJsonSchema() {
|
|
47901
|
+
if (!(this._viewModel instanceof ConnectorActivityViewModel)) {
|
|
47902
|
+
return null;
|
|
47903
|
+
}
|
|
47904
|
+
const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
|
|
47905
|
+
if (fieldsContainer instanceof ConnectorFieldsContainer && fieldsContainer.inputMode === "jitObject") {
|
|
47906
|
+
return null;
|
|
47907
|
+
}
|
|
47908
|
+
return convertToInputJsonSchema({ fields: fieldsContainer.getActiveInputFields() });
|
|
47909
|
+
}
|
|
47772
47910
|
getActivityState() {
|
|
47773
47911
|
return this._viewModel.activityState;
|
|
47774
47912
|
}
|
|
@@ -48615,4 +48753,4 @@ export {
|
|
|
48615
48753
|
DesignTimeActivityClient2 as DesignTimeActivityClient
|
|
48616
48754
|
};
|
|
48617
48755
|
|
|
48618
|
-
//# debugId=
|
|
48756
|
+
//# debugId=5631A82229190B7464756E2164756E21
|