@uipath/integrationservice-sdk 1.201.0-preview.115 → 1.201.0-preview.121
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.js +197 -87
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10421,66 +10421,6 @@ var require_operators = __commonJS((exports) => {
|
|
|
10421
10421
|
} });
|
|
10422
10422
|
});
|
|
10423
10423
|
|
|
10424
|
-
// ../../node_modules/uuid/dist-node/rng.js
|
|
10425
|
-
function rng() {
|
|
10426
|
-
return crypto.getRandomValues(rnds8);
|
|
10427
|
-
}
|
|
10428
|
-
var rnds8;
|
|
10429
|
-
var init_rng = __esm(() => {
|
|
10430
|
-
rnds8 = new Uint8Array(16);
|
|
10431
|
-
});
|
|
10432
|
-
|
|
10433
|
-
// ../../node_modules/uuid/dist-node/stringify.js
|
|
10434
|
-
function unsafeStringify(arr, offset = 0) {
|
|
10435
|
-
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();
|
|
10436
|
-
}
|
|
10437
|
-
var byteToHex;
|
|
10438
|
-
var init_stringify = __esm(() => {
|
|
10439
|
-
byteToHex = [];
|
|
10440
|
-
for (let i = 0;i < 256; ++i) {
|
|
10441
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
10442
|
-
}
|
|
10443
|
-
});
|
|
10444
|
-
|
|
10445
|
-
// ../../node_modules/uuid/dist-node/v4.js
|
|
10446
|
-
function v4(options, buf, offset) {
|
|
10447
|
-
if (!buf && !options && crypto.randomUUID) {
|
|
10448
|
-
return crypto.randomUUID();
|
|
10449
|
-
}
|
|
10450
|
-
return _v4(options, buf, offset);
|
|
10451
|
-
}
|
|
10452
|
-
function _v4(options, buf, offset) {
|
|
10453
|
-
options = options || {};
|
|
10454
|
-
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
10455
|
-
if (rnds.length < 16) {
|
|
10456
|
-
throw new Error("Random bytes length must be >= 16");
|
|
10457
|
-
}
|
|
10458
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
10459
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
10460
|
-
if (buf) {
|
|
10461
|
-
offset = offset || 0;
|
|
10462
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
10463
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
10464
|
-
}
|
|
10465
|
-
for (let i = 0;i < 16; ++i) {
|
|
10466
|
-
buf[offset + i] = rnds[i];
|
|
10467
|
-
}
|
|
10468
|
-
return buf;
|
|
10469
|
-
}
|
|
10470
|
-
return unsafeStringify(rnds);
|
|
10471
|
-
}
|
|
10472
|
-
var v4_default;
|
|
10473
|
-
var init_v4 = __esm(() => {
|
|
10474
|
-
init_rng();
|
|
10475
|
-
init_stringify();
|
|
10476
|
-
v4_default = v4;
|
|
10477
|
-
});
|
|
10478
|
-
|
|
10479
|
-
// ../../node_modules/uuid/dist-node/index.js
|
|
10480
|
-
var init_dist_node = __esm(() => {
|
|
10481
|
-
init_v4();
|
|
10482
|
-
});
|
|
10483
|
-
|
|
10484
10424
|
// ../../node_modules/lodash-es/_freeGlobal.js
|
|
10485
10425
|
var freeGlobal, _freeGlobal_default;
|
|
10486
10426
|
var init__freeGlobal = __esm(() => {
|
|
@@ -30355,8 +30295,25 @@ function bigint3(params) {
|
|
|
30355
30295
|
function date4(params) {
|
|
30356
30296
|
return _coercedDate(ZodDate, params);
|
|
30357
30297
|
}
|
|
30298
|
+
function randomUuidFromBytes() {
|
|
30299
|
+
const bytes = new Uint8Array(16);
|
|
30300
|
+
crypto.getRandomValues(bytes);
|
|
30301
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
30302
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
30303
|
+
const hex3 = [];
|
|
30304
|
+
for (const byte of bytes) {
|
|
30305
|
+
hex3.push(byte.toString(16).padStart(2, "0"));
|
|
30306
|
+
}
|
|
30307
|
+
return [
|
|
30308
|
+
hex3.slice(0, 4).join(""),
|
|
30309
|
+
hex3.slice(4, 6).join(""),
|
|
30310
|
+
hex3.slice(6, 8).join(""),
|
|
30311
|
+
hex3.slice(8, 10).join(""),
|
|
30312
|
+
hex3.slice(10, 16).join("")
|
|
30313
|
+
].join("-");
|
|
30314
|
+
}
|
|
30358
30315
|
function getUuid() {
|
|
30359
|
-
return "randomUUID" in crypto ? crypto.randomUUID() :
|
|
30316
|
+
return "randomUUID" in crypto ? crypto.randomUUID() : randomUuidFromBytes();
|
|
30360
30317
|
}
|
|
30361
30318
|
function _tryParseDate(input, defaultValue) {
|
|
30362
30319
|
const value = Date.parse(input);
|
|
@@ -30610,6 +30567,8 @@ function replaceTransientProperty(key) {
|
|
|
30610
30567
|
return;
|
|
30611
30568
|
case "savedResourceSelections":
|
|
30612
30569
|
return;
|
|
30570
|
+
case "disabledReason":
|
|
30571
|
+
return;
|
|
30613
30572
|
default:
|
|
30614
30573
|
return null;
|
|
30615
30574
|
}
|
|
@@ -38176,10 +38135,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38176
38135
|
};
|
|
38177
38136
|
}
|
|
38178
38137
|
}, LookupValue = class _LookupValue {
|
|
38179
|
-
constructor(id, displayColumns, stringFormatDisplayColumns) {
|
|
38138
|
+
constructor(id, displayColumns, stringFormatDisplayColumns, disabledReason) {
|
|
38180
38139
|
this.id = id;
|
|
38181
38140
|
this.displayColumns = displayColumns;
|
|
38182
38141
|
this.stringFormatDisplayColumns = stringFormatDisplayColumns ?? "";
|
|
38142
|
+
this.disabledReason = disabledReason;
|
|
38183
38143
|
}
|
|
38184
38144
|
get displayName() {
|
|
38185
38145
|
if (!StringExtensions.isNullOrEmpty(this.stringFormatDisplayColumns)) {
|
|
@@ -38845,6 +38805,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
38845
38805
|
const result = Object.create(_FilterTree.prototype);
|
|
38846
38806
|
const parsed = JSON.parse(serialized, _FilterTree._reviver);
|
|
38847
38807
|
Object.assign(result, parsed);
|
|
38808
|
+
result.groups ??= [];
|
|
38848
38809
|
return result;
|
|
38849
38810
|
}
|
|
38850
38811
|
static _reviver(key, value) {
|
|
@@ -40116,9 +40077,10 @@ ${rawValue}
|
|
|
40116
40077
|
this.name = name;
|
|
40117
40078
|
}
|
|
40118
40079
|
}, ConnectorDateFormatHelper, DataSource = class {
|
|
40119
|
-
constructor(getIdFunc, getLabelFunc, getDescriptionFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
|
|
40080
|
+
constructor(getIdFunc, getLabelFunc, getDescriptionFunc, getDisabledReasonFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
|
|
40120
40081
|
this._getLabelFunc = null;
|
|
40121
40082
|
this._getDescriptionFunc = null;
|
|
40083
|
+
this._getDisabledReasonFunc = null;
|
|
40122
40084
|
this._itemToValueFunc = null;
|
|
40123
40085
|
this._valueToItemFunc = null;
|
|
40124
40086
|
this._selectionToValueFunc = null;
|
|
@@ -40129,6 +40091,7 @@ ${rawValue}
|
|
|
40129
40091
|
this._getIdFunc = getIdFunc;
|
|
40130
40092
|
this._getLabelFunc = getLabelFunc;
|
|
40131
40093
|
this._getDescriptionFunc = getDescriptionFunc;
|
|
40094
|
+
this._getDisabledReasonFunc = getDisabledReasonFunc;
|
|
40132
40095
|
this._itemToValueFunc = itemToValueFunc;
|
|
40133
40096
|
this._valueToItemFunc = valueToItemFunc;
|
|
40134
40097
|
this._selectionToValueFunc = selectionToValueFunc;
|
|
@@ -40146,11 +40109,22 @@ ${rawValue}
|
|
|
40146
40109
|
}
|
|
40147
40110
|
}
|
|
40148
40111
|
getData() {
|
|
40149
|
-
return this.data.map((item) =>
|
|
40150
|
-
|
|
40151
|
-
|
|
40152
|
-
|
|
40153
|
-
|
|
40112
|
+
return this.data.map((item) => {
|
|
40113
|
+
const widgetSourceItem = {
|
|
40114
|
+
id: this._getIdFunc(item) ?? "",
|
|
40115
|
+
label: this._getLabelFunc ? this._getLabelFunc(item) : "",
|
|
40116
|
+
description: this._getDescriptionFunc ? this._getDescriptionFunc(item) : ""
|
|
40117
|
+
};
|
|
40118
|
+
const reason = this._getDisabledReasonFunc?.(item);
|
|
40119
|
+
if (reason === undefined) {
|
|
40120
|
+
return widgetSourceItem;
|
|
40121
|
+
}
|
|
40122
|
+
return {
|
|
40123
|
+
...widgetSourceItem,
|
|
40124
|
+
disabled: true,
|
|
40125
|
+
...reason != null && { tooltip: reason }
|
|
40126
|
+
};
|
|
40127
|
+
});
|
|
40154
40128
|
}
|
|
40155
40129
|
getValue(item) {
|
|
40156
40130
|
if (this._itemToValueFunc) {
|
|
@@ -40183,6 +40157,7 @@ ${rawValue}
|
|
|
40183
40157
|
constructor(getIdFunc) {
|
|
40184
40158
|
this._getLabelFunc = null;
|
|
40185
40159
|
this._getDescriptionFunc = null;
|
|
40160
|
+
this._getDisabledReasonFunc = null;
|
|
40186
40161
|
this._itemToValueFunc = null;
|
|
40187
40162
|
this._valueToItemFunc = null;
|
|
40188
40163
|
this._selectionToValueFunc = null;
|
|
@@ -40202,6 +40177,10 @@ ${rawValue}
|
|
|
40202
40177
|
this._getDescriptionFunc = func;
|
|
40203
40178
|
return this;
|
|
40204
40179
|
}
|
|
40180
|
+
withDisabled(func) {
|
|
40181
|
+
this._getDisabledReasonFunc = func;
|
|
40182
|
+
return this;
|
|
40183
|
+
}
|
|
40205
40184
|
withSingleItemConverter(itemToValue, valueToItem) {
|
|
40206
40185
|
this._itemToValueFunc = itemToValue;
|
|
40207
40186
|
this._valueToItemFunc = valueToItem;
|
|
@@ -40221,7 +40200,7 @@ ${rawValue}
|
|
|
40221
40200
|
return this;
|
|
40222
40201
|
}
|
|
40223
40202
|
build() {
|
|
40224
|
-
return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
|
|
40203
|
+
return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._getDisabledReasonFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
|
|
40225
40204
|
}
|
|
40226
40205
|
getCurrentConfig() {
|
|
40227
40206
|
return {};
|
|
@@ -42287,7 +42266,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
42287
42266
|
this._translationService = serviceProvider.translationService;
|
|
42288
42267
|
this._instanceParameters = instanceParameters;
|
|
42289
42268
|
this._latestLookupValues = this._lookupParameters.defaultValues;
|
|
42290
|
-
this._lookupPagedDataSourceBuilder = DataSourceBuilder.withId((s2) => s2 == null ? null : s2.id).withLabel((s2) => s2?.displayName ?? null).withSingleItemConverter((s2) => this._convertLookupValueToRawId(s2?.id ?? null), this._convertRawIdToLookupValue);
|
|
42269
|
+
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);
|
|
42291
42270
|
if (this._lookupParameters.defaultValues != null && this._lookupParameters.defaultValues.length > 0) {
|
|
42292
42271
|
this._passingDefaultValuesPending = true;
|
|
42293
42272
|
this._lookupPagedDataSourceBuilder = this._lookupPagedDataSourceBuilder.withData(this._lookupParameters.defaultValues);
|
|
@@ -42791,12 +42770,14 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
42791
42770
|
}
|
|
42792
42771
|
}
|
|
42793
42772
|
}, ObjectMethod = class _ObjectMethod {
|
|
42794
|
-
constructor(operation, method, path3, parameters, design, isHidden, responseDisplayName, responseDescription, pagination) {
|
|
42773
|
+
constructor(operation, method, path3, parameters, design, isHidden, responseDisplayName, responseDescription, pagination, disabled = null, disabledReason = null) {
|
|
42795
42774
|
this.operation = operation;
|
|
42796
42775
|
this.method = method;
|
|
42797
42776
|
this.path = path3;
|
|
42798
42777
|
this.parameters = parameters;
|
|
42799
42778
|
this.isHidden = isHidden;
|
|
42779
|
+
this.disabled = disabled;
|
|
42780
|
+
this.disabledReason = disabledReason;
|
|
42800
42781
|
this.responseDisplayName = responseDisplayName;
|
|
42801
42782
|
this.responseDescription = responseDescription;
|
|
42802
42783
|
this.design = design;
|
|
@@ -42950,7 +42931,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
42950
42931
|
static _buildActivityObjectLookupParameters(activityConfiguration, exceptionHandler, modelItem) {
|
|
42951
42932
|
const objectsLookupReference = ActivityObjectsLookupHelper.getObjectsLookup(activityConfiguration.instanceParameters.connectorKey);
|
|
42952
42933
|
const defaultValues = activityConfiguration.cachedLookupValues.get(Constants.ObjectNamePropertyName) ?? null;
|
|
42953
|
-
const cacheFilter = (x) => ActivityObjectsLookupHelper.
|
|
42934
|
+
const cacheFilter = (x) => ActivityObjectsLookupHelper.objectVerdictForOperation(x, activityConfiguration.operation);
|
|
42954
42935
|
return _DataSourceBuilderFactory._buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, objectsLookupReference, defaultValues, cacheFilter, true);
|
|
42955
42936
|
}
|
|
42956
42937
|
static _buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, lookupReference, defaultValues = null, cacheValueFilter = null, sortData = null) {
|
|
@@ -43295,7 +43276,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
43295
43276
|
}
|
|
43296
43277
|
getContent(lookupParameters) {
|
|
43297
43278
|
return this._lookupCacheService.getCachedData(lookupParameters).pipe(import_rxjs16.switchMap((cachedData) => {
|
|
43298
|
-
let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern) => new LookupValue(item.id, columns, pattern));
|
|
43279
|
+
let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern, disabledReason) => new LookupValue(item.id, columns, pattern, disabledReason));
|
|
43299
43280
|
if (lookupParameters.sortData === true) {
|
|
43300
43281
|
lookupValues = lookupValues.sort((lv1, lv2) => lv1.displayName.toLowerCase().localeCompare(lv2.displayName.toLowerCase()));
|
|
43301
43282
|
}
|
|
@@ -43329,17 +43310,24 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
43329
43310
|
const lookupValues = [];
|
|
43330
43311
|
const lookupNameRegexDictionary = new Map(lookupParameters.lookupReference.lookupNames.map((property2) => [property2, new RegExp(`\\{${property2}\\}`, "g")]));
|
|
43331
43312
|
for (const item of cachedData) {
|
|
43332
|
-
|
|
43313
|
+
const verdict = _LookupService._normalizeVerdict(lookupParameters.cacheValueFilter?.(item));
|
|
43314
|
+
if (!verdict.include) {
|
|
43333
43315
|
continue;
|
|
43334
43316
|
}
|
|
43335
43317
|
const {
|
|
43336
43318
|
argumentValues,
|
|
43337
43319
|
displayPattern
|
|
43338
43320
|
} = replaceStringCombinedPattern(lookupNameRegexDictionary, lookupParameters.fieldDesign?.displayPattern ?? null, (keyName) => LookupPropertyHelper.getPropertyOrNull(item.columnValues, keyName));
|
|
43339
|
-
lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty));
|
|
43321
|
+
lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty, verdict.disabledReason));
|
|
43340
43322
|
}
|
|
43341
43323
|
return lookupValues;
|
|
43342
43324
|
}
|
|
43325
|
+
static _normalizeVerdict(result) {
|
|
43326
|
+
if (result === undefined) {
|
|
43327
|
+
return { include: true };
|
|
43328
|
+
}
|
|
43329
|
+
return typeof result === "boolean" ? { include: result } : result;
|
|
43330
|
+
}
|
|
43343
43331
|
}, ConnectorEventOperation, ConnectorObject = class _ConnectorObject {
|
|
43344
43332
|
constructor(name, displayName, metadata, fields, baseObject, executionType, agentIdentity = null) {
|
|
43345
43333
|
this.name = name;
|
|
@@ -43841,7 +43829,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
43841
43829
|
this.jsonObject = jsonObject;
|
|
43842
43830
|
this.jsonSchema = jsonSchema;
|
|
43843
43831
|
}
|
|
43844
|
-
}, capitalize = (str) => str?.charAt(0)?.toUpperCase() + str?.slice(1), formatDisplayName = (displayName) => {
|
|
43832
|
+
}, ARRAY_MARKER_REGEX, getArrayDepth = (fieldName) => (fieldName.match(ARRAY_MARKER_REGEX) ?? []).length, stripArrayMarkers = (fieldName) => fieldName.replace(ARRAY_MARKER_REGEX, ""), capitalize = (str) => str?.charAt(0)?.toUpperCase() + str?.slice(1), formatDisplayName = (displayName) => {
|
|
43845
43833
|
const formatted = displayName.replace(/[-._*[\]]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().replace(/\s+/g, " ").trim().replace(/^[a-z]/, (c) => c.toUpperCase());
|
|
43846
43834
|
return formatted.endsWith(" id") ? `${formatted.slice(0, -3)} ID` : formatted;
|
|
43847
43835
|
}, ARRAY_NOTATION = "[*]", isArrayField = (fieldName) => fieldName?.endsWith(ARRAY_NOTATION) ?? false, primitiveTypes2, isPrimitiveType = (type) => primitiveTypes2.includes(type), isPrimitiveArray = (field) => isArrayField(field?.name) && isPrimitiveType(field?.type), isPrimitiveField = (field) => isPrimitiveType(field?.type), buildJsonSchemaForApiActivity = (standardResource, httpMethod, rootProperties) => {
|
|
@@ -43961,7 +43949,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
|
|
|
43961
43949
|
schema.description = field?.description;
|
|
43962
43950
|
}
|
|
43963
43951
|
return schema;
|
|
43964
|
-
},
|
|
43952
|
+
}, createArrayOrObjectPropertySchema = (fieldName, jsonSchema, definitionName) => {
|
|
43965
43953
|
const finalDefinitionName = definitionName ?? fieldName;
|
|
43966
43954
|
if (!finalDefinitionName) {
|
|
43967
43955
|
return {};
|
|
@@ -44984,6 +44972,95 @@ ${this._errorMessage}`;
|
|
|
44984
44972
|
serviceRegistry.updateHostCapabilities(hostCapabilities ?? apiWorkflowServices.defaultHostCapabilitiesProvider?.() ?? DEFAULT_HOST_CAPABILITIES);
|
|
44985
44973
|
return activity;
|
|
44986
44974
|
}
|
|
44975
|
+
}, VALID_JSON_SCHEMA_TYPES, createObjectNode = () => ({
|
|
44976
|
+
type: "object",
|
|
44977
|
+
properties: {},
|
|
44978
|
+
required: []
|
|
44979
|
+
}), isObjectNode = (schema) => schema?.type === "object" && schema.properties != null && Array.isArray(schema.required), wrapInArrays = (schema, depth) => {
|
|
44980
|
+
let result = schema;
|
|
44981
|
+
for (let i2 = 0;i2 < depth; i2++) {
|
|
44982
|
+
result = {
|
|
44983
|
+
type: "array",
|
|
44984
|
+
items: result
|
|
44985
|
+
};
|
|
44986
|
+
}
|
|
44987
|
+
return result;
|
|
44988
|
+
}, descendArrays = (schema, depth) => {
|
|
44989
|
+
let current = schema;
|
|
44990
|
+
for (let i2 = 0;i2 < depth; i2++) {
|
|
44991
|
+
if (current.type === "array" && current.items) {
|
|
44992
|
+
current = current.items;
|
|
44993
|
+
}
|
|
44994
|
+
}
|
|
44995
|
+
return current;
|
|
44996
|
+
}, setNestedProperty = (parent, pathParts, leaf, required2) => {
|
|
44997
|
+
const head2 = pathParts[0];
|
|
44998
|
+
const key = stripArrayMarkers(head2);
|
|
44999
|
+
const arrayLevels = getArrayDepth(head2);
|
|
45000
|
+
if (pathParts.length === 1) {
|
|
45001
|
+
parent.properties[key] = wrapInArrays(leaf, arrayLevels);
|
|
45002
|
+
if (required2) {
|
|
45003
|
+
parent.required.push(key);
|
|
45004
|
+
}
|
|
45005
|
+
return;
|
|
45006
|
+
}
|
|
45007
|
+
const existing = parent.properties[key];
|
|
45008
|
+
const existingNode = existing ? descendArrays(existing, arrayLevels) : undefined;
|
|
45009
|
+
const child = isObjectNode(existingNode) ? existingNode : createObjectNode();
|
|
45010
|
+
parent.properties[key] ??= wrapInArrays(child, arrayLevels);
|
|
45011
|
+
setNestedProperty(child, pathParts.slice(1), leaf, required2);
|
|
45012
|
+
}, pruneEmptyRequired = (node) => {
|
|
45013
|
+
if (Array.isArray(node.required) && node.required.length === 0) {
|
|
45014
|
+
delete node.required;
|
|
45015
|
+
}
|
|
45016
|
+
for (const child of Object.values(node.properties ?? {})) {
|
|
45017
|
+
pruneEmptyRequired(child);
|
|
45018
|
+
}
|
|
45019
|
+
if (node.items) {
|
|
45020
|
+
pruneEmptyRequired(node.items);
|
|
45021
|
+
}
|
|
45022
|
+
}, createLeafSchema = (field, normalizedType) => {
|
|
45023
|
+
const leaf = { type: normalizedType };
|
|
45024
|
+
if (field.displayName) {
|
|
45025
|
+
leaf.title = field.displayName;
|
|
45026
|
+
}
|
|
45027
|
+
if (field.description) {
|
|
45028
|
+
leaf.description = field.description;
|
|
45029
|
+
}
|
|
45030
|
+
const enumItems = (field.enum ?? []).filter((item) => item.value != null);
|
|
45031
|
+
if (enumItems.length > 0) {
|
|
45032
|
+
leaf.enum = enumItems.map((item) => item.value);
|
|
45033
|
+
leaf.oneOf = enumItems.map((item) => ({
|
|
45034
|
+
const: item.value,
|
|
45035
|
+
title: item.name ?? String(item.value)
|
|
45036
|
+
}));
|
|
45037
|
+
}
|
|
45038
|
+
return leaf;
|
|
45039
|
+
}, hasShowAction = (field) => field.fieldActions?.some((action) => action.actionType === "show") ?? false, indexResourceFieldsByFolderKeyCompanion = (fields) => new Map(fields.filter((field) => field.design?.component === "Resources").map((field) => [NamingHelper.solutionResourceFolderKeyFieldName(field.name), field])), shouldHideField = (field) => field.design?.isHidden === true && !hasShowAction(field), convertToInputJsonSchema = ({ fields }) => {
|
|
45040
|
+
const root2 = {
|
|
45041
|
+
type: "object",
|
|
45042
|
+
properties: {},
|
|
45043
|
+
required: [],
|
|
45044
|
+
additionalProperties: false
|
|
45045
|
+
};
|
|
45046
|
+
const resourceFieldsByFolderKeyCompanion = indexResourceFieldsByFolderKeyCompanion(fields);
|
|
45047
|
+
for (const field of fields) {
|
|
45048
|
+
const owningResourceField = resourceFieldsByFolderKeyCompanion.get(field.name);
|
|
45049
|
+
if (!field.request || field.onCanvas === false || shouldHideField(field) && !owningResourceField) {
|
|
45050
|
+
continue;
|
|
45051
|
+
}
|
|
45052
|
+
const normalizedType = (field.type ?? "").toLowerCase();
|
|
45053
|
+
if (!VALID_JSON_SCHEMA_TYPES.has(normalizedType)) {
|
|
45054
|
+
continue;
|
|
45055
|
+
}
|
|
45056
|
+
const pathParts = field.name.split(".").filter((part) => part.length > 0);
|
|
45057
|
+
if (pathParts.length === 0) {
|
|
45058
|
+
continue;
|
|
45059
|
+
}
|
|
45060
|
+
setNestedProperty(root2, pathParts, createLeafSchema(field, normalizedType), owningResourceField?.required ?? field.required);
|
|
45061
|
+
}
|
|
45062
|
+
pruneEmptyRequired(root2);
|
|
45063
|
+
return root2;
|
|
44987
45064
|
}, ConnectorActivity, EXPRESSION_VALUE_MARKER = "=js:", CLIENT_HOST_CAPABILITIES, DesignTimeActivityClient = class _DesignTimeActivityClient {
|
|
44988
45065
|
constructor(hostCapabilities, connectionsProvider) {
|
|
44989
45066
|
this._services = _DesignTimeActivityClient._buildServices(connectionsProvider);
|
|
@@ -45248,7 +45325,6 @@ ${this._errorMessage}`;
|
|
|
45248
45325
|
}
|
|
45249
45326
|
}, DesignTimeActivityClient2;
|
|
45250
45327
|
var init_dist = __esm(() => {
|
|
45251
|
-
init_dist_node();
|
|
45252
45328
|
init_lodash();
|
|
45253
45329
|
init_luxon();
|
|
45254
45330
|
init_lodash();
|
|
@@ -51004,18 +51080,38 @@ ErrorMessage: ${this.message}`;
|
|
|
51004
51080
|
this._eventLookupNames = [_ActivityObjectsLookupHelper.LookupDisplayName, _ActivityObjectsLookupHelper._eventMode];
|
|
51005
51081
|
}
|
|
51006
51082
|
static getObjectsLookup(connectorKey) {
|
|
51007
|
-
return new LookupReference(
|
|
51083
|
+
return new LookupReference(_ActivityObjectsLookupHelper._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), _ActivityObjectsLookupHelper._objectLookupNames, null, null);
|
|
51008
51084
|
}
|
|
51009
51085
|
static eventsLookup(connectorKey) {
|
|
51010
|
-
return new LookupReference(
|
|
51086
|
+
return new LookupReference(_ActivityObjectsLookupHelper._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), _ActivityObjectsLookupHelper._eventLookupNames, null, null);
|
|
51011
51087
|
}
|
|
51012
|
-
static
|
|
51088
|
+
static findMethodForOperation(cacheValue, operation) {
|
|
51013
51089
|
const rawObject = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1] ?? null;
|
|
51014
51090
|
let itemMetadata = null;
|
|
51015
51091
|
if (rawObject) {
|
|
51016
51092
|
itemMetadata = Metadata.factory(JSON.stringify(rawObject));
|
|
51017
51093
|
}
|
|
51018
|
-
|
|
51094
|
+
if (itemMetadata == null) {
|
|
51095
|
+
return null;
|
|
51096
|
+
}
|
|
51097
|
+
let usable = null;
|
|
51098
|
+
for (const method of Object.values(itemMetadata.method)) {
|
|
51099
|
+
if (method.operation !== operation || method.isHidden) {
|
|
51100
|
+
continue;
|
|
51101
|
+
}
|
|
51102
|
+
if (method.disabled) {
|
|
51103
|
+
return method;
|
|
51104
|
+
}
|
|
51105
|
+
usable ??= method;
|
|
51106
|
+
}
|
|
51107
|
+
return usable;
|
|
51108
|
+
}
|
|
51109
|
+
static objectVerdictForOperation(cacheValue, operation) {
|
|
51110
|
+
const method = _ActivityObjectsLookupHelper.findMethodForOperation(cacheValue, operation);
|
|
51111
|
+
return {
|
|
51112
|
+
include: method != null,
|
|
51113
|
+
disabledReason: method?.disabled ? method.disabledReason ?? null : undefined
|
|
51114
|
+
};
|
|
51019
51115
|
}
|
|
51020
51116
|
static filterCachedConnectorEventObject(cacheValue, operation) {
|
|
51021
51117
|
const itemMetadata = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1];
|
|
@@ -52465,6 +52561,7 @@ ErrorMessage: ${this.message}`;
|
|
|
52465
52561
|
this._value = value ?? _EntityAttributeNamedArgumentValue._nullValue;
|
|
52466
52562
|
}
|
|
52467
52563
|
};
|
|
52564
|
+
ARRAY_MARKER_REGEX = /\[\*]/g;
|
|
52468
52565
|
primitiveTypes2 = ["string", "number", "boolean", "integer"];
|
|
52469
52566
|
JitTypesProvider = class _JitTypesProvider {
|
|
52470
52567
|
static {
|
|
@@ -56598,6 +56695,7 @@ ErrorMessage: ${this.message}`;
|
|
|
56598
56695
|
return this._fieldsService.refreshJitType(connectionId, this.activityConfiguration, new JitTypesProvider(this._designerCustomTypesService));
|
|
56599
56696
|
}
|
|
56600
56697
|
};
|
|
56698
|
+
VALID_JSON_SCHEMA_TYPES = /* @__PURE__ */ new Set(["array", "boolean", "integer", "null", "number", "object", "string"]);
|
|
56601
56699
|
ConnectorActivity = class extends WorkflowActivityBase {
|
|
56602
56700
|
constructor(connectorActivityInitializationConfiguration) {
|
|
56603
56701
|
super(connectorActivityInitializationConfiguration.activityIdRef);
|
|
@@ -57286,6 +57384,16 @@ ErrorMessage: ${this.message}`;
|
|
|
57286
57384
|
const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
|
|
57287
57385
|
return new WorkflowActivityOutputInformation(name, isCustomName, fieldsContainer.outputTypeDefinition ?? undefined, undefined, fieldsContainer.outputJsonSchema ?? undefined, fieldsContainer.hasFileOutput);
|
|
57288
57386
|
}
|
|
57387
|
+
getInputJsonSchema() {
|
|
57388
|
+
if (!(this._viewModel instanceof ConnectorActivityViewModel)) {
|
|
57389
|
+
return null;
|
|
57390
|
+
}
|
|
57391
|
+
const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
|
|
57392
|
+
if (fieldsContainer instanceof ConnectorFieldsContainer && fieldsContainer.inputMode === "jitObject") {
|
|
57393
|
+
return null;
|
|
57394
|
+
}
|
|
57395
|
+
return convertToInputJsonSchema({ fields: fieldsContainer.getActiveInputFields() });
|
|
57396
|
+
}
|
|
57289
57397
|
getActivityState() {
|
|
57290
57398
|
return this._viewModel.activityState;
|
|
57291
57399
|
}
|
|
@@ -58543,7 +58651,7 @@ class TextApiResponse2 {
|
|
|
58543
58651
|
var package_default = {
|
|
58544
58652
|
name: "@uipath/integrationservice-sdk",
|
|
58545
58653
|
license: "MIT",
|
|
58546
|
-
version: "1.201.0-preview.
|
|
58654
|
+
version: "1.201.0-preview.121",
|
|
58547
58655
|
repository: {
|
|
58548
58656
|
type: "git",
|
|
58549
58657
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -58584,7 +58692,7 @@ var package_default = {
|
|
|
58584
58692
|
typescript: "^7.0.2"
|
|
58585
58693
|
},
|
|
58586
58694
|
dependencies: {
|
|
58587
|
-
"@uipath/integration-service-design-time": "0.
|
|
58695
|
+
"@uipath/integration-service-design-time": "0.25.2"
|
|
58588
58696
|
}
|
|
58589
58697
|
};
|
|
58590
58698
|
|
|
@@ -78809,6 +78917,8 @@ init_constants();
|
|
|
78809
78917
|
|
|
78810
78918
|
// ../auth/src/interactive.ts
|
|
78811
78919
|
init_src();
|
|
78920
|
+
// ../auth/src/tenantSelection.ts
|
|
78921
|
+
var IDENTIFIER_STATUSES = new Set([400, 403, 404]);
|
|
78812
78922
|
|
|
78813
78923
|
// ../auth/src/selectTenant.ts
|
|
78814
78924
|
var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
|
|
@@ -79331,7 +79441,7 @@ function assertConditionSupported(condition) {
|
|
|
79331
79441
|
}
|
|
79332
79442
|
}
|
|
79333
79443
|
function assertFilterTreeSupported(tree) {
|
|
79334
|
-
for (const condition of tree.filters) {
|
|
79444
|
+
for (const condition of tree.filters ?? []) {
|
|
79335
79445
|
assertConditionSupported(condition);
|
|
79336
79446
|
}
|
|
79337
79447
|
for (const group of tree.groups ?? []) {
|
|
@@ -79352,7 +79462,7 @@ function substituteFilterVariables(tree) {
|
|
|
79352
79462
|
function substituteTree(tree, context) {
|
|
79353
79463
|
const substituted = {
|
|
79354
79464
|
...tree,
|
|
79355
|
-
filters: tree.filters.map((condition) => substituteCondition(condition, context))
|
|
79465
|
+
filters: (tree.filters ?? []).map((condition) => substituteCondition(condition, context))
|
|
79356
79466
|
};
|
|
79357
79467
|
if (tree.groups) {
|
|
79358
79468
|
substituted.groups = tree.groups.map((group) => substituteTree(group, context));
|
|
@@ -81383,4 +81493,4 @@ export {
|
|
|
81383
81493
|
AccessTokenResponseFromJSON
|
|
81384
81494
|
};
|
|
81385
81495
|
|
|
81386
|
-
//# debugId=
|
|
81496
|
+
//# debugId=99FF4FCD268255FE64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/integrationservice-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.201.0-preview.
|
|
4
|
+
"version": "1.201.0-preview.121",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/UiPath/cli.git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@uipath/integration-service-design-time": "0.
|
|
31
|
+
"@uipath/integration-service-design-time": "0.25.2"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c70ccfc0b12e637441d67df1d212b71d7784b5f8"
|
|
34
34
|
}
|