@uipath/api-workflow-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.
@@ -2466,49 +2466,6 @@ var import_rxjs2 = __toESM(require_cjs(), 1);
2466
2466
  var import_operators = __toESM(require_operators(), 1);
2467
2467
  var import_rxjs3 = __toESM(require_cjs(), 1);
2468
2468
  var import_operators2 = __toESM(require_operators(), 1);
2469
- // ../../node_modules/uuid/dist-node/rng.js
2470
- var rnds8 = new Uint8Array(16);
2471
- function rng() {
2472
- return crypto.getRandomValues(rnds8);
2473
- }
2474
-
2475
- // ../../node_modules/uuid/dist-node/stringify.js
2476
- var byteToHex = [];
2477
- for (let i = 0;i < 256; ++i) {
2478
- byteToHex.push((i + 256).toString(16).slice(1));
2479
- }
2480
- function unsafeStringify(arr, offset = 0) {
2481
- 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();
2482
- }
2483
-
2484
- // ../../node_modules/uuid/dist-node/v4.js
2485
- function v4(options, buf, offset) {
2486
- if (!buf && !options && crypto.randomUUID) {
2487
- return crypto.randomUUID();
2488
- }
2489
- return _v4(options, buf, offset);
2490
- }
2491
- function _v4(options, buf, offset) {
2492
- options = options || {};
2493
- const rnds = options.random ?? options.rng?.() ?? rng();
2494
- if (rnds.length < 16) {
2495
- throw new Error("Random bytes length must be >= 16");
2496
- }
2497
- rnds[6] = rnds[6] & 15 | 64;
2498
- rnds[8] = rnds[8] & 63 | 128;
2499
- if (buf) {
2500
- offset = offset || 0;
2501
- if (offset < 0 || offset + 16 > buf.length) {
2502
- throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
2503
- }
2504
- for (let i = 0;i < 16; ++i) {
2505
- buf[offset + i] = rnds[i];
2506
- }
2507
- return buf;
2508
- }
2509
- return unsafeStringify(rnds);
2510
- }
2511
- var v4_default = v4;
2512
2469
  // ../../node_modules/lodash-es/_freeGlobal.js
2513
2470
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
2514
2471
  var _freeGlobal_default = freeGlobal;
@@ -22787,8 +22744,25 @@ var TypescriptLoader = class _TypescriptLoader {
22787
22744
  this._value = null;
22788
22745
  }
22789
22746
  };
22747
+ function randomUuidFromBytes() {
22748
+ const bytes = new Uint8Array(16);
22749
+ crypto.getRandomValues(bytes);
22750
+ bytes[6] = bytes[6] & 15 | 64;
22751
+ bytes[8] = bytes[8] & 63 | 128;
22752
+ const hex3 = [];
22753
+ for (const byte of bytes) {
22754
+ hex3.push(byte.toString(16).padStart(2, "0"));
22755
+ }
22756
+ return [
22757
+ hex3.slice(0, 4).join(""),
22758
+ hex3.slice(4, 6).join(""),
22759
+ hex3.slice(6, 8).join(""),
22760
+ hex3.slice(8, 10).join(""),
22761
+ hex3.slice(10, 16).join("")
22762
+ ].join("-");
22763
+ }
22790
22764
  function getUuid() {
22791
- return "randomUUID" in crypto ? crypto.randomUUID() : v4_default();
22765
+ return "randomUUID" in crypto ? crypto.randomUUID() : randomUuidFromBytes();
22792
22766
  }
22793
22767
  var WellKnownFileNames = {
22794
22768
  UiCacheTemplate: "{0}_UiCache.zip",
@@ -24177,6 +24151,8 @@ function replaceTransientProperty(key) {
24177
24151
  return;
24178
24152
  case "savedResourceSelections":
24179
24153
  return;
24154
+ case "disabledReason":
24155
+ return;
24180
24156
  default:
24181
24157
  return null;
24182
24158
  }
@@ -24251,10 +24227,11 @@ var BrowserItem = class _BrowserItem {
24251
24227
  }
24252
24228
  };
24253
24229
  var LookupValue = class _LookupValue {
24254
- constructor(id, displayColumns, stringFormatDisplayColumns) {
24230
+ constructor(id, displayColumns, stringFormatDisplayColumns, disabledReason) {
24255
24231
  this.id = id;
24256
24232
  this.displayColumns = displayColumns;
24257
24233
  this.stringFormatDisplayColumns = stringFormatDisplayColumns ?? "";
24234
+ this.disabledReason = disabledReason;
24258
24235
  }
24259
24236
  get displayName() {
24260
24237
  if (!StringExtensions.isNullOrEmpty(this.stringFormatDisplayColumns)) {
@@ -25335,6 +25312,7 @@ var FilterTree = class _FilterTree {
25335
25312
  const result = Object.create(_FilterTree.prototype);
25336
25313
  const parsed = JSON.parse(serialized, _FilterTree._reviver);
25337
25314
  Object.assign(result, parsed);
25315
+ result.groups ??= [];
25338
25316
  return result;
25339
25317
  }
25340
25318
  static _reviver(key, value) {
@@ -27465,9 +27443,10 @@ var ConnectorDateFormatHelper = class _ConnectorDateFormatHelper {
27465
27443
  }
27466
27444
  };
27467
27445
  var DataSource = class {
27468
- constructor(getIdFunc, getLabelFunc, getDescriptionFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
27446
+ constructor(getIdFunc, getLabelFunc, getDescriptionFunc, getDisabledReasonFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
27469
27447
  this._getLabelFunc = null;
27470
27448
  this._getDescriptionFunc = null;
27449
+ this._getDisabledReasonFunc = null;
27471
27450
  this._itemToValueFunc = null;
27472
27451
  this._valueToItemFunc = null;
27473
27452
  this._selectionToValueFunc = null;
@@ -27478,6 +27457,7 @@ var DataSource = class {
27478
27457
  this._getIdFunc = getIdFunc;
27479
27458
  this._getLabelFunc = getLabelFunc;
27480
27459
  this._getDescriptionFunc = getDescriptionFunc;
27460
+ this._getDisabledReasonFunc = getDisabledReasonFunc;
27481
27461
  this._itemToValueFunc = itemToValueFunc;
27482
27462
  this._valueToItemFunc = valueToItemFunc;
27483
27463
  this._selectionToValueFunc = selectionToValueFunc;
@@ -27495,11 +27475,22 @@ var DataSource = class {
27495
27475
  }
27496
27476
  }
27497
27477
  getData() {
27498
- return this.data.map((item) => ({
27499
- id: this._getIdFunc(item) ?? "",
27500
- label: this._getLabelFunc ? this._getLabelFunc(item) : "",
27501
- description: this._getDescriptionFunc ? this._getDescriptionFunc(item) : ""
27502
- }));
27478
+ return this.data.map((item) => {
27479
+ const widgetSourceItem = {
27480
+ id: this._getIdFunc(item) ?? "",
27481
+ label: this._getLabelFunc ? this._getLabelFunc(item) : "",
27482
+ description: this._getDescriptionFunc ? this._getDescriptionFunc(item) : ""
27483
+ };
27484
+ const reason = this._getDisabledReasonFunc?.(item);
27485
+ if (reason === undefined) {
27486
+ return widgetSourceItem;
27487
+ }
27488
+ return {
27489
+ ...widgetSourceItem,
27490
+ disabled: true,
27491
+ ...reason != null && { tooltip: reason }
27492
+ };
27493
+ });
27503
27494
  }
27504
27495
  getValue(item) {
27505
27496
  if (this._itemToValueFunc) {
@@ -27533,6 +27524,7 @@ var DataSourceBuilder = class _DataSourceBuilder {
27533
27524
  constructor(getIdFunc) {
27534
27525
  this._getLabelFunc = null;
27535
27526
  this._getDescriptionFunc = null;
27527
+ this._getDisabledReasonFunc = null;
27536
27528
  this._itemToValueFunc = null;
27537
27529
  this._valueToItemFunc = null;
27538
27530
  this._selectionToValueFunc = null;
@@ -27552,6 +27544,10 @@ var DataSourceBuilder = class _DataSourceBuilder {
27552
27544
  this._getDescriptionFunc = func;
27553
27545
  return this;
27554
27546
  }
27547
+ withDisabled(func) {
27548
+ this._getDisabledReasonFunc = func;
27549
+ return this;
27550
+ }
27555
27551
  withSingleItemConverter(itemToValue, valueToItem) {
27556
27552
  this._itemToValueFunc = itemToValue;
27557
27553
  this._valueToItemFunc = valueToItem;
@@ -27571,7 +27567,7 @@ var DataSourceBuilder = class _DataSourceBuilder {
27571
27567
  return this;
27572
27568
  }
27573
27569
  build() {
27574
- return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
27570
+ return new DataSource(this._getIdFunc, this._getLabelFunc, this._getDescriptionFunc, this._getDisabledReasonFunc, this._itemToValueFunc, this._valueToItemFunc, this._selectionToValueFunc, this._valueToSelectionFunc, this._data, this._options);
27575
27571
  }
27576
27572
  getCurrentConfig() {
27577
27573
  return {};
@@ -29769,7 +29765,7 @@ var DynamicDataSourceBuilder = class {
29769
29765
  this._translationService = serviceProvider.translationService;
29770
29766
  this._instanceParameters = instanceParameters;
29771
29767
  this._latestLookupValues = this._lookupParameters.defaultValues;
29772
- this._lookupPagedDataSourceBuilder = DataSourceBuilder.withId((s2) => s2 == null ? null : s2.id).withLabel((s2) => s2?.displayName ?? null).withSingleItemConverter((s2) => this._convertLookupValueToRawId(s2?.id ?? null), this._convertRawIdToLookupValue);
29768
+ 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);
29773
29769
  if (this._lookupParameters.defaultValues != null && this._lookupParameters.defaultValues.length > 0) {
29774
29770
  this._passingDefaultValuesPending = true;
29775
29771
  this._lookupPagedDataSourceBuilder = this._lookupPagedDataSourceBuilder.withData(this._lookupParameters.defaultValues);
@@ -30279,12 +30275,14 @@ var ObjectMethodDesign = class _ObjectMethodDesign {
30279
30275
  }
30280
30276
  };
30281
30277
  var ObjectMethod = class _ObjectMethod {
30282
- constructor(operation, method, path, parameters, design, isHidden, responseDisplayName, responseDescription, pagination) {
30278
+ constructor(operation, method, path, parameters, design, isHidden, responseDisplayName, responseDescription, pagination, disabled = null, disabledReason = null) {
30283
30279
  this.operation = operation;
30284
30280
  this.method = method;
30285
30281
  this.path = path;
30286
30282
  this.parameters = parameters;
30287
30283
  this.isHidden = isHidden;
30284
+ this.disabled = disabled;
30285
+ this.disabledReason = disabledReason;
30288
30286
  this.responseDisplayName = responseDisplayName;
30289
30287
  this.responseDescription = responseDescription;
30290
30288
  this.design = design;
@@ -30390,18 +30388,38 @@ var ActivityObjectsLookupHelper = class _ActivityObjectsLookupHelper {
30390
30388
  this._eventLookupNames = [_ActivityObjectsLookupHelper.LookupDisplayName, _ActivityObjectsLookupHelper._eventMode];
30391
30389
  }
30392
30390
  static getObjectsLookup(connectorKey) {
30393
- return new LookupReference(this._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), this._objectLookupNames, null, null);
30391
+ return new LookupReference(_ActivityObjectsLookupHelper._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), _ActivityObjectsLookupHelper._objectLookupNames, null, null);
30394
30392
  }
30395
30393
  static eventsLookup(connectorKey) {
30396
- return new LookupReference(this._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), this._eventLookupNames, null, null);
30394
+ return new LookupReference(_ActivityObjectsLookupHelper._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), _ActivityObjectsLookupHelper._eventLookupNames, null, null);
30397
30395
  }
30398
- static filterCachedConnectorObject(cacheValue, operation) {
30396
+ static findMethodForOperation(cacheValue, operation) {
30399
30397
  const rawObject = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1] ?? null;
30400
30398
  let itemMetadata = null;
30401
30399
  if (rawObject) {
30402
30400
  itemMetadata = Metadata.factory(JSON.stringify(rawObject));
30403
30401
  }
30404
- return itemMetadata != null && ArrayExtensions.any(Object.values(itemMetadata.method), (v) => v.operation === operation && !v.isHidden);
30402
+ if (itemMetadata == null) {
30403
+ return null;
30404
+ }
30405
+ let usable = null;
30406
+ for (const method of Object.values(itemMetadata.method)) {
30407
+ if (method.operation !== operation || method.isHidden) {
30408
+ continue;
30409
+ }
30410
+ if (method.disabled) {
30411
+ return method;
30412
+ }
30413
+ usable ??= method;
30414
+ }
30415
+ return usable;
30416
+ }
30417
+ static objectVerdictForOperation(cacheValue, operation) {
30418
+ const method = _ActivityObjectsLookupHelper.findMethodForOperation(cacheValue, operation);
30419
+ return {
30420
+ include: method != null,
30421
+ disabledReason: method?.disabled ? method.disabledReason ?? null : undefined
30422
+ };
30405
30423
  }
30406
30424
  static filterCachedConnectorEventObject(cacheValue, operation) {
30407
30425
  const itemMetadata = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1];
@@ -30491,7 +30509,7 @@ var DataSourceBuilderFactory = class _DataSourceBuilderFactory {
30491
30509
  static _buildActivityObjectLookupParameters(activityConfiguration, exceptionHandler, modelItem) {
30492
30510
  const objectsLookupReference = ActivityObjectsLookupHelper.getObjectsLookup(activityConfiguration.instanceParameters.connectorKey);
30493
30511
  const defaultValues = activityConfiguration.cachedLookupValues.get(Constants.ObjectNamePropertyName) ?? null;
30494
- const cacheFilter = (x) => ActivityObjectsLookupHelper.filterCachedConnectorObject(x, activityConfiguration.operation);
30512
+ const cacheFilter = (x) => ActivityObjectsLookupHelper.objectVerdictForOperation(x, activityConfiguration.operation);
30495
30513
  return _DataSourceBuilderFactory._buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, objectsLookupReference, defaultValues, cacheFilter, true);
30496
30514
  }
30497
30515
  static _buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, lookupReference, defaultValues = null, cacheValueFilter = null, sortData = null) {
@@ -31648,7 +31666,7 @@ var LookupService = class _LookupService {
31648
31666
  }
31649
31667
  getContent(lookupParameters) {
31650
31668
  return this._lookupCacheService.getCachedData(lookupParameters).pipe(import_rxjs16.switchMap((cachedData) => {
31651
- let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern) => new LookupValue(item.id, columns, pattern));
31669
+ let lookupValues = _LookupService._getLookupValues(lookupParameters, cachedData, (item, columns, pattern, disabledReason) => new LookupValue(item.id, columns, pattern, disabledReason));
31652
31670
  if (lookupParameters.sortData === true) {
31653
31671
  lookupValues = lookupValues.sort((lv1, lv2) => lv1.displayName.toLowerCase().localeCompare(lv2.displayName.toLowerCase()));
31654
31672
  }
@@ -31682,17 +31700,24 @@ var LookupService = class _LookupService {
31682
31700
  const lookupValues = [];
31683
31701
  const lookupNameRegexDictionary = new Map(lookupParameters.lookupReference.lookupNames.map((property2) => [property2, new RegExp(`\\{${property2}\\}`, "g")]));
31684
31702
  for (const item of cachedData) {
31685
- if (lookupParameters.cacheValueFilter != null && !lookupParameters.cacheValueFilter(item)) {
31703
+ const verdict = _LookupService._normalizeVerdict(lookupParameters.cacheValueFilter?.(item));
31704
+ if (!verdict.include) {
31686
31705
  continue;
31687
31706
  }
31688
31707
  const {
31689
31708
  argumentValues,
31690
31709
  displayPattern
31691
31710
  } = replaceStringCombinedPattern(lookupNameRegexDictionary, lookupParameters.fieldDesign?.displayPattern ?? null, (keyName) => LookupPropertyHelper.getPropertyOrNull(item.columnValues, keyName));
31692
- lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty));
31711
+ lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty, verdict.disabledReason));
31693
31712
  }
31694
31713
  return lookupValues;
31695
31714
  }
31715
+ static _normalizeVerdict(result) {
31716
+ if (result === undefined) {
31717
+ return { include: true };
31718
+ }
31719
+ return typeof result === "boolean" ? { include: result } : result;
31720
+ }
31696
31721
  };
31697
31722
  var ConnectorEventOperation = class _ConnectorEventOperation {
31698
31723
  static {
@@ -32888,6 +32913,9 @@ var JitTypeCreationResults = class {
32888
32913
  this.jsonSchema = jsonSchema;
32889
32914
  }
32890
32915
  };
32916
+ var ARRAY_MARKER_REGEX = /\[\*]/g;
32917
+ var getArrayDepth = (fieldName) => (fieldName.match(ARRAY_MARKER_REGEX) ?? []).length;
32918
+ var stripArrayMarkers = (fieldName) => fieldName.replace(ARRAY_MARKER_REGEX, "");
32891
32919
  var capitalize = (str) => str?.charAt(0)?.toUpperCase() + str?.slice(1);
32892
32920
  var formatDisplayName = (displayName) => {
32893
32921
  const formatted = displayName.replace(/[-._*[\]]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().replace(/\s+/g, " ").trim().replace(/^[a-z]/, (c) => c.toUpperCase());
@@ -33025,7 +33053,6 @@ var createPrimitiveFieldSchema = (field) => {
33025
33053
  }
33026
33054
  return schema;
33027
33055
  };
33028
- var getArrayDepth = (fieldName) => (fieldName.match(/\[\*]/g) ?? []).length;
33029
33056
  var createArrayOrObjectPropertySchema = (fieldName, jsonSchema, definitionName) => {
33030
33057
  const finalDefinitionName = definitionName ?? fieldName;
33031
33058
  if (!finalDefinitionName) {
@@ -38213,6 +38240,107 @@ var ConnectorActivityFactory = class _ConnectorActivityFactory {
38213
38240
  return activity;
38214
38241
  }
38215
38242
  };
38243
+ var VALID_JSON_SCHEMA_TYPES = /* @__PURE__ */ new Set(["array", "boolean", "integer", "null", "number", "object", "string"]);
38244
+ var createObjectNode = () => ({
38245
+ type: "object",
38246
+ properties: {},
38247
+ required: []
38248
+ });
38249
+ var isObjectNode = (schema) => schema?.type === "object" && schema.properties != null && Array.isArray(schema.required);
38250
+ var wrapInArrays = (schema, depth) => {
38251
+ let result = schema;
38252
+ for (let i2 = 0;i2 < depth; i2++) {
38253
+ result = {
38254
+ type: "array",
38255
+ items: result
38256
+ };
38257
+ }
38258
+ return result;
38259
+ };
38260
+ var descendArrays = (schema, depth) => {
38261
+ let current = schema;
38262
+ for (let i2 = 0;i2 < depth; i2++) {
38263
+ if (current.type === "array" && current.items) {
38264
+ current = current.items;
38265
+ }
38266
+ }
38267
+ return current;
38268
+ };
38269
+ var setNestedProperty = (parent, pathParts, leaf, required2) => {
38270
+ const head2 = pathParts[0];
38271
+ const key = stripArrayMarkers(head2);
38272
+ const arrayLevels = getArrayDepth(head2);
38273
+ if (pathParts.length === 1) {
38274
+ parent.properties[key] = wrapInArrays(leaf, arrayLevels);
38275
+ if (required2) {
38276
+ parent.required.push(key);
38277
+ }
38278
+ return;
38279
+ }
38280
+ const existing = parent.properties[key];
38281
+ const existingNode = existing ? descendArrays(existing, arrayLevels) : undefined;
38282
+ const child = isObjectNode(existingNode) ? existingNode : createObjectNode();
38283
+ parent.properties[key] ??= wrapInArrays(child, arrayLevels);
38284
+ setNestedProperty(child, pathParts.slice(1), leaf, required2);
38285
+ };
38286
+ var pruneEmptyRequired = (node) => {
38287
+ if (Array.isArray(node.required) && node.required.length === 0) {
38288
+ delete node.required;
38289
+ }
38290
+ for (const child of Object.values(node.properties ?? {})) {
38291
+ pruneEmptyRequired(child);
38292
+ }
38293
+ if (node.items) {
38294
+ pruneEmptyRequired(node.items);
38295
+ }
38296
+ };
38297
+ var createLeafSchema = (field, normalizedType) => {
38298
+ const leaf = { type: normalizedType };
38299
+ if (field.displayName) {
38300
+ leaf.title = field.displayName;
38301
+ }
38302
+ if (field.description) {
38303
+ leaf.description = field.description;
38304
+ }
38305
+ const enumItems = (field.enum ?? []).filter((item) => item.value != null);
38306
+ if (enumItems.length > 0) {
38307
+ leaf.enum = enumItems.map((item) => item.value);
38308
+ leaf.oneOf = enumItems.map((item) => ({
38309
+ const: item.value,
38310
+ title: item.name ?? String(item.value)
38311
+ }));
38312
+ }
38313
+ return leaf;
38314
+ };
38315
+ var hasShowAction = (field) => field.fieldActions?.some((action) => action.actionType === "show") ?? false;
38316
+ var indexResourceFieldsByFolderKeyCompanion = (fields) => new Map(fields.filter((field) => field.design?.component === "Resources").map((field) => [NamingHelper.solutionResourceFolderKeyFieldName(field.name), field]));
38317
+ var shouldHideField = (field) => field.design?.isHidden === true && !hasShowAction(field);
38318
+ var convertToInputJsonSchema = ({ fields }) => {
38319
+ const root2 = {
38320
+ type: "object",
38321
+ properties: {},
38322
+ required: [],
38323
+ additionalProperties: false
38324
+ };
38325
+ const resourceFieldsByFolderKeyCompanion = indexResourceFieldsByFolderKeyCompanion(fields);
38326
+ for (const field of fields) {
38327
+ const owningResourceField = resourceFieldsByFolderKeyCompanion.get(field.name);
38328
+ if (!field.request || field.onCanvas === false || shouldHideField(field) && !owningResourceField) {
38329
+ continue;
38330
+ }
38331
+ const normalizedType = (field.type ?? "").toLowerCase();
38332
+ if (!VALID_JSON_SCHEMA_TYPES.has(normalizedType)) {
38333
+ continue;
38334
+ }
38335
+ const pathParts = field.name.split(".").filter((part) => part.length > 0);
38336
+ if (pathParts.length === 0) {
38337
+ continue;
38338
+ }
38339
+ setNestedProperty(root2, pathParts, createLeafSchema(field, normalizedType), owningResourceField?.required ?? field.required);
38340
+ }
38341
+ pruneEmptyRequired(root2);
38342
+ return root2;
38343
+ };
38216
38344
  function buildTriggerFilterExpression(config2, activityState, translationConfiguration, options) {
38217
38345
  const userResult = resolveUserFilter(config2, translationConfiguration, options.rebuildUserFilter);
38218
38346
  const mandatoryResult = resolveMandatoryFilter(config2, activityState, translationConfiguration);
@@ -38948,6 +39076,16 @@ var ConnectorActivity = class extends WorkflowActivityBase {
38948
39076
  const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
38949
39077
  return new WorkflowActivityOutputInformation(name, isCustomName, fieldsContainer.outputTypeDefinition ?? undefined, undefined, fieldsContainer.outputJsonSchema ?? undefined, fieldsContainer.hasFileOutput);
38950
39078
  }
39079
+ getInputJsonSchema() {
39080
+ if (!(this._viewModel instanceof ConnectorActivityViewModel)) {
39081
+ return null;
39082
+ }
39083
+ const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
39084
+ if (fieldsContainer instanceof ConnectorFieldsContainer && fieldsContainer.inputMode === "jitObject") {
39085
+ return null;
39086
+ }
39087
+ return convertToInputJsonSchema({ fields: fieldsContainer.getActiveInputFields() });
39088
+ }
38951
39089
  getActivityState() {
38952
39090
  return this._viewModel.activityState;
38953
39091
  }
@@ -39794,4 +39932,4 @@ export {
39794
39932
  DesignTimeActivityClient2 as DesignTimeActivityClient
39795
39933
  };
39796
39934
 
39797
- //# debugId=C2362A4D66EA8D6D64756E2164756E21
39935
+ //# debugId=0A2E6A297241D1F464756E2164756E21
@@ -18,7 +18,7 @@ import {
18
18
  resolveProducedNupkgsAsync,
19
19
  setGlobalLogHandler,
20
20
  signNupkgsAsync
21
- } from "./packager-tool-6ph5rsqt.js";
21
+ } from "./packager-tool-2zhkjkmy.js";
22
22
  import {
23
23
  ToolErrorCodes,
24
24
  ToolResult,
@@ -287,7 +287,7 @@ function addSdkUserAgentHeader(headers, userAgent) {
287
287
  var package_default = {
288
288
  name: "@uipath/project-packager",
289
289
  license: "MIT",
290
- version: "1.201.0-preview.115",
290
+ version: "1.201.0-preview.122",
291
291
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
292
292
  type: "module",
293
293
  main: "./dist/index.js",
@@ -719,4 +719,4 @@ export {
719
719
  BrowserContextStorage
720
720
  };
721
721
 
722
- //# debugId=7B28B6A84040C8FE64756E2164756E21
722
+ //# debugId=18EB75752ED79ED564756E2164756E21
package/dist/index.js CHANGED
@@ -1,15 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- Command,
4
3
  metadata,
5
4
  registerCommands
6
- } from "./packager-tool-e0yjd91y.js";
7
- import"./packager-tool-y7hv8v54.js";
5
+ } from "./packager-tool-1pky82jr.js";
8
6
  import"./packager-tool-1v8fmky0.js";
9
7
  import"./packager-tool-h1tyrbff.js";
8
+ import {
9
+ Command
10
+ } from "./packager-tool-bprnbg91.js";
11
+ import"./packager-tool-4pvh3k50.js";
12
+ import"./packager-tool-y7hv8v54.js";
10
13
  import"./packager-tool-t01cjyjh.js";
11
14
  import"./packager-tool-9qecd4wb.js";
12
- import"./packager-tool-4pvh3k50.js";
13
15
  import"./packager-tool-5arsyj36.js";
14
16
  import"./packager-tool-wckvcay0.js";
15
17
 
@@ -19,4 +21,4 @@ program.name(metadata.commandPrefix).description(metadata.description).version(m
19
21
  await registerCommands(program);
20
22
  program.parse(process.argv);
21
23
 
22
- //# debugId=1BEEB2B24358010764756E2164756E21
24
+ //# debugId=DD47897ACDB6FFAB64756E2164756E21
@@ -10463,6 +10463,7 @@ var TLS_ERROR_CODES = new Set([
10463
10463
  ]);
10464
10464
  var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
10465
10465
  var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
10466
+ var LOCAL_PERMISSION_ERROR_CODES = new Set(["EACCES", "EPERM", "EROFS"]);
10466
10467
  var import__ = __toESM(require_commander(), 1);
10467
10468
  var {
10468
10469
  program,
@@ -11618,6 +11619,7 @@ var CLI_ERROR_CODES = [
11618
11619
  "invalid_argument",
11619
11620
  "authentication_required",
11620
11621
  "permission_denied",
11622
+ "local_permission_denied",
11621
11623
  "not_found",
11622
11624
  "rate_limited",
11623
11625
  "network_error",
@@ -12054,12 +12056,16 @@ function defaultErrorCodeForHttpStatus(status) {
12054
12056
  return "server_error";
12055
12057
  return;
12056
12058
  }
12059
+ var LOCAL_PERMISSION_TEXT_PATTERN = /(?:\b|\()(?:EACCES|EPERM|EROFS)(?::\s|\))/;
12057
12060
  function defaultErrorCodeForFailure(data) {
12058
12061
  if (data.Result === RESULTS.Failure) {
12059
12062
  const status = data.Context?.httpStatus ?? parseHttpStatusFromMessage2(data.Message);
12060
12063
  const errorCode = defaultErrorCodeForHttpStatus(status);
12061
12064
  if (errorCode)
12062
12065
  return errorCode;
12066
+ if (status === undefined && (LOCAL_PERMISSION_TEXT_PATTERN.test(data.Message) || LOCAL_PERMISSION_TEXT_PATTERN.test(data.Instructions))) {
12067
+ return "local_permission_denied";
12068
+ }
12063
12069
  }
12064
12070
  return defaultErrorCodeForResult(data.Result);
12065
12071
  }
@@ -12525,8 +12531,6 @@ var ScreenLogger;
12525
12531
  ScreenLogger2.progress = progress;
12526
12532
  })(ScreenLogger ||= {});
12527
12533
  var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
12528
- var factorySlot = singleton("PackagerFactoryProvider");
12529
- var moduleSlot = singleton("ToolModuleProvider");
12530
12534
 
12531
12535
  class ConsoleTelemetryProvider {
12532
12536
  async trackEvent(eventName, _properties) {
@@ -12543,6 +12547,7 @@ class ConsoleTelemetryProvider {
12543
12547
  }
12544
12548
  }
12545
12549
  var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
12550
+ var factorySlot = singleton("PackagerFactoryProvider");
12546
12551
  var globalLogHandler = (logMessage) => {
12547
12552
  const formattedMessage = logMessage.toFormattedString();
12548
12553
  switch (logMessage.logLevel) {
@@ -13836,7 +13841,7 @@ function addSdkUserAgentHeader(headers, userAgent) {
13836
13841
  var package_default = {
13837
13842
  name: "@uipath/project-packager",
13838
13843
  license: "MIT",
13839
- version: "1.201.0-preview.115",
13844
+ version: "1.201.0-preview.122",
13840
13845
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
13841
13846
  type: "module",
13842
13847
  main: "./dist/index.js",
@@ -14287,4 +14292,4 @@ export {
14287
14292
  BaseNodePackagerFactory
14288
14293
  };
14289
14294
 
14290
- //# debugId=CB68264744B37B0264756E2164756E21
14295
+ //# debugId=FD4E9CB3B48156DA64756E2164756E21