@uipath/integrationservice-sdk 1.200.0-preview.120 → 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.
Files changed (2) hide show
  1. package/dist/index.js +301 -104
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -430,6 +430,12 @@ var init_is_in_ssh = __esm(() => {
430
430
  });
431
431
 
432
432
  // ../../node_modules/open/index.js
433
+ var exports_open = {};
434
+ __export(exports_open, {
435
+ openApp: () => openApp,
436
+ default: () => open_default,
437
+ apps: () => apps
438
+ });
433
439
  import process8 from "node:process";
434
440
  import path from "node:path";
435
441
  import { fileURLToPath } from "node:url";
@@ -663,6 +669,21 @@ var fallbackAttemptSymbol, __dirname2, localXdgOpenPath, platform, arch, tryEach
663
669
  ...options,
664
670
  target
665
671
  });
672
+ }, openApp = (name, options) => {
673
+ if (typeof name !== "string" && !Array.isArray(name)) {
674
+ throw new TypeError("Expected a valid `name`");
675
+ }
676
+ const { arguments: appArguments = [] } = options ?? {};
677
+ if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
678
+ throw new TypeError("Expected `appArguments` as Array type");
679
+ }
680
+ return baseOpen({
681
+ ...options,
682
+ app: {
683
+ name,
684
+ arguments: appArguments
685
+ }
686
+ });
666
687
  }, apps, open_default;
667
688
  var init_open = __esm(() => {
668
689
  init_wsl_utils();
@@ -742,7 +763,8 @@ class NodeFileSystem {
742
763
  };
743
764
  utils = {
744
765
  open: async (url) => {
745
- await open_default(url);
766
+ const { default: open2 } = await Promise.resolve().then(() => (init_open(), exports_open));
767
+ await open2(url);
746
768
  }
747
769
  };
748
770
  async readFile(path3, options) {
@@ -937,9 +959,7 @@ class NodeFileSystem {
937
959
  }
938
960
  }
939
961
  var LOCK_HEARTBEAT_MS = 5000, LOCK_STALE_MS = 15000, LOCK_MAX_WAIT_MS = 20000, LOCK_MAX_HOLD_MS = 60000, LOCK_RETRY_MIN_MS = 100, LOCK_RETRY_JITTER_MS = 200;
940
- var init_node = __esm(() => {
941
- init_open();
942
- });
962
+ var init_node = () => {};
943
963
  // ../filesystem/src/index.ts
944
964
  var fsInstance, getFileSystem = () => fsInstance;
945
965
  var init_src = __esm(() => {
@@ -947,10 +967,6 @@ var init_src = __esm(() => {
947
967
  init_node();
948
968
  fsInstance = new NodeFileSystem;
949
969
  });
950
- // ../auth/src/server.ts
951
- var init_server = __esm(() => {
952
- init_constants();
953
- });
954
970
 
955
971
  // ../../node_modules/rxjs/dist/cjs/internal/util/isFunction.js
956
972
  var require_isFunction = __commonJS((exports) => {
@@ -10405,66 +10421,6 @@ var require_operators = __commonJS((exports) => {
10405
10421
  } });
10406
10422
  });
10407
10423
 
10408
- // ../../node_modules/uuid/dist-node/rng.js
10409
- function rng() {
10410
- return crypto.getRandomValues(rnds8);
10411
- }
10412
- var rnds8;
10413
- var init_rng = __esm(() => {
10414
- rnds8 = new Uint8Array(16);
10415
- });
10416
-
10417
- // ../../node_modules/uuid/dist-node/stringify.js
10418
- function unsafeStringify(arr, offset = 0) {
10419
- 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();
10420
- }
10421
- var byteToHex;
10422
- var init_stringify = __esm(() => {
10423
- byteToHex = [];
10424
- for (let i = 0;i < 256; ++i) {
10425
- byteToHex.push((i + 256).toString(16).slice(1));
10426
- }
10427
- });
10428
-
10429
- // ../../node_modules/uuid/dist-node/v4.js
10430
- function v4(options, buf, offset) {
10431
- if (!buf && !options && crypto.randomUUID) {
10432
- return crypto.randomUUID();
10433
- }
10434
- return _v4(options, buf, offset);
10435
- }
10436
- function _v4(options, buf, offset) {
10437
- options = options || {};
10438
- const rnds = options.random ?? options.rng?.() ?? rng();
10439
- if (rnds.length < 16) {
10440
- throw new Error("Random bytes length must be >= 16");
10441
- }
10442
- rnds[6] = rnds[6] & 15 | 64;
10443
- rnds[8] = rnds[8] & 63 | 128;
10444
- if (buf) {
10445
- offset = offset || 0;
10446
- if (offset < 0 || offset + 16 > buf.length) {
10447
- throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
10448
- }
10449
- for (let i = 0;i < 16; ++i) {
10450
- buf[offset + i] = rnds[i];
10451
- }
10452
- return buf;
10453
- }
10454
- return unsafeStringify(rnds);
10455
- }
10456
- var v4_default;
10457
- var init_v4 = __esm(() => {
10458
- init_rng();
10459
- init_stringify();
10460
- v4_default = v4;
10461
- });
10462
-
10463
- // ../../node_modules/uuid/dist-node/index.js
10464
- var init_dist_node = __esm(() => {
10465
- init_v4();
10466
- });
10467
-
10468
10424
  // ../../node_modules/lodash-es/_freeGlobal.js
10469
10425
  var freeGlobal, _freeGlobal_default;
10470
10426
  var init__freeGlobal = __esm(() => {
@@ -30339,8 +30295,25 @@ function bigint3(params) {
30339
30295
  function date4(params) {
30340
30296
  return _coercedDate(ZodDate, params);
30341
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
+ }
30342
30315
  function getUuid() {
30343
- return "randomUUID" in crypto ? crypto.randomUUID() : v4_default();
30316
+ return "randomUUID" in crypto ? crypto.randomUUID() : randomUuidFromBytes();
30344
30317
  }
30345
30318
  function _tryParseDate(input, defaultValue) {
30346
30319
  const value = Date.parse(input);
@@ -30594,6 +30567,8 @@ function replaceTransientProperty(key) {
30594
30567
  return;
30595
30568
  case "savedResourceSelections":
30596
30569
  return;
30570
+ case "disabledReason":
30571
+ return;
30597
30572
  default:
30598
30573
  return null;
30599
30574
  }
@@ -38160,10 +38135,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38160
38135
  };
38161
38136
  }
38162
38137
  }, LookupValue = class _LookupValue {
38163
- constructor(id, displayColumns, stringFormatDisplayColumns) {
38138
+ constructor(id, displayColumns, stringFormatDisplayColumns, disabledReason) {
38164
38139
  this.id = id;
38165
38140
  this.displayColumns = displayColumns;
38166
38141
  this.stringFormatDisplayColumns = stringFormatDisplayColumns ?? "";
38142
+ this.disabledReason = disabledReason;
38167
38143
  }
38168
38144
  get displayName() {
38169
38145
  if (!StringExtensions.isNullOrEmpty(this.stringFormatDisplayColumns)) {
@@ -38829,6 +38805,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
38829
38805
  const result = Object.create(_FilterTree.prototype);
38830
38806
  const parsed = JSON.parse(serialized, _FilterTree._reviver);
38831
38807
  Object.assign(result, parsed);
38808
+ result.groups ??= [];
38832
38809
  return result;
38833
38810
  }
38834
38811
  static _reviver(key, value) {
@@ -40100,9 +40077,10 @@ ${rawValue}
40100
40077
  this.name = name;
40101
40078
  }
40102
40079
  }, ConnectorDateFormatHelper, DataSource = class {
40103
- constructor(getIdFunc, getLabelFunc, getDescriptionFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
40080
+ constructor(getIdFunc, getLabelFunc, getDescriptionFunc, getDisabledReasonFunc, itemToValueFunc, valueToItemFunc, selectionToValueFunc, valueToSelection, data, options) {
40104
40081
  this._getLabelFunc = null;
40105
40082
  this._getDescriptionFunc = null;
40083
+ this._getDisabledReasonFunc = null;
40106
40084
  this._itemToValueFunc = null;
40107
40085
  this._valueToItemFunc = null;
40108
40086
  this._selectionToValueFunc = null;
@@ -40113,6 +40091,7 @@ ${rawValue}
40113
40091
  this._getIdFunc = getIdFunc;
40114
40092
  this._getLabelFunc = getLabelFunc;
40115
40093
  this._getDescriptionFunc = getDescriptionFunc;
40094
+ this._getDisabledReasonFunc = getDisabledReasonFunc;
40116
40095
  this._itemToValueFunc = itemToValueFunc;
40117
40096
  this._valueToItemFunc = valueToItemFunc;
40118
40097
  this._selectionToValueFunc = selectionToValueFunc;
@@ -40130,11 +40109,22 @@ ${rawValue}
40130
40109
  }
40131
40110
  }
40132
40111
  getData() {
40133
- return this.data.map((item) => ({
40134
- id: this._getIdFunc(item) ?? "",
40135
- label: this._getLabelFunc ? this._getLabelFunc(item) : "",
40136
- description: this._getDescriptionFunc ? this._getDescriptionFunc(item) : ""
40137
- }));
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
+ });
40138
40128
  }
40139
40129
  getValue(item) {
40140
40130
  if (this._itemToValueFunc) {
@@ -40167,6 +40157,7 @@ ${rawValue}
40167
40157
  constructor(getIdFunc) {
40168
40158
  this._getLabelFunc = null;
40169
40159
  this._getDescriptionFunc = null;
40160
+ this._getDisabledReasonFunc = null;
40170
40161
  this._itemToValueFunc = null;
40171
40162
  this._valueToItemFunc = null;
40172
40163
  this._selectionToValueFunc = null;
@@ -40186,6 +40177,10 @@ ${rawValue}
40186
40177
  this._getDescriptionFunc = func;
40187
40178
  return this;
40188
40179
  }
40180
+ withDisabled(func) {
40181
+ this._getDisabledReasonFunc = func;
40182
+ return this;
40183
+ }
40189
40184
  withSingleItemConverter(itemToValue, valueToItem) {
40190
40185
  this._itemToValueFunc = itemToValue;
40191
40186
  this._valueToItemFunc = valueToItem;
@@ -40205,7 +40200,7 @@ ${rawValue}
40205
40200
  return this;
40206
40201
  }
40207
40202
  build() {
40208
- 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);
40209
40204
  }
40210
40205
  getCurrentConfig() {
40211
40206
  return {};
@@ -42271,7 +42266,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
42271
42266
  this._translationService = serviceProvider.translationService;
42272
42267
  this._instanceParameters = instanceParameters;
42273
42268
  this._latestLookupValues = this._lookupParameters.defaultValues;
42274
- 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);
42275
42270
  if (this._lookupParameters.defaultValues != null && this._lookupParameters.defaultValues.length > 0) {
42276
42271
  this._passingDefaultValuesPending = true;
42277
42272
  this._lookupPagedDataSourceBuilder = this._lookupPagedDataSourceBuilder.withData(this._lookupParameters.defaultValues);
@@ -42775,12 +42770,14 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
42775
42770
  }
42776
42771
  }
42777
42772
  }, ObjectMethod = class _ObjectMethod {
42778
- 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) {
42779
42774
  this.operation = operation;
42780
42775
  this.method = method;
42781
42776
  this.path = path3;
42782
42777
  this.parameters = parameters;
42783
42778
  this.isHidden = isHidden;
42779
+ this.disabled = disabled;
42780
+ this.disabledReason = disabledReason;
42784
42781
  this.responseDisplayName = responseDisplayName;
42785
42782
  this.responseDescription = responseDescription;
42786
42783
  this.design = design;
@@ -42934,7 +42931,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
42934
42931
  static _buildActivityObjectLookupParameters(activityConfiguration, exceptionHandler, modelItem) {
42935
42932
  const objectsLookupReference = ActivityObjectsLookupHelper.getObjectsLookup(activityConfiguration.instanceParameters.connectorKey);
42936
42933
  const defaultValues = activityConfiguration.cachedLookupValues.get(Constants.ObjectNamePropertyName) ?? null;
42937
- const cacheFilter = (x) => ActivityObjectsLookupHelper.filterCachedConnectorObject(x, activityConfiguration.operation);
42934
+ const cacheFilter = (x) => ActivityObjectsLookupHelper.objectVerdictForOperation(x, activityConfiguration.operation);
42938
42935
  return _DataSourceBuilderFactory._buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, objectsLookupReference, defaultValues, cacheFilter, true);
42939
42936
  }
42940
42937
  static _buildLookupParameters(activityConfiguration, exceptionHandler, modelItem, lookupReference, defaultValues = null, cacheValueFilter = null, sortData = null) {
@@ -43279,7 +43276,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
43279
43276
  }
43280
43277
  getContent(lookupParameters) {
43281
43278
  return this._lookupCacheService.getCachedData(lookupParameters).pipe(import_rxjs16.switchMap((cachedData) => {
43282
- 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));
43283
43280
  if (lookupParameters.sortData === true) {
43284
43281
  lookupValues = lookupValues.sort((lv1, lv2) => lv1.displayName.toLowerCase().localeCompare(lv2.displayName.toLowerCase()));
43285
43282
  }
@@ -43313,17 +43310,24 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
43313
43310
  const lookupValues = [];
43314
43311
  const lookupNameRegexDictionary = new Map(lookupParameters.lookupReference.lookupNames.map((property2) => [property2, new RegExp(`\\{${property2}\\}`, "g")]));
43315
43312
  for (const item of cachedData) {
43316
- if (lookupParameters.cacheValueFilter != null && !lookupParameters.cacheValueFilter(item)) {
43313
+ const verdict = _LookupService._normalizeVerdict(lookupParameters.cacheValueFilter?.(item));
43314
+ if (!verdict.include) {
43317
43315
  continue;
43318
43316
  }
43319
43317
  const {
43320
43318
  argumentValues,
43321
43319
  displayPattern
43322
43320
  } = replaceStringCombinedPattern(lookupNameRegexDictionary, lookupParameters.fieldDesign?.displayPattern ?? null, (keyName) => LookupPropertyHelper.getPropertyOrNull(item.columnValues, keyName));
43323
- lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty));
43321
+ lookupValues.push(createLookupValue(item, argumentValues, displayPattern ?? StringExtensions.empty, verdict.disabledReason));
43324
43322
  }
43325
43323
  return lookupValues;
43326
43324
  }
43325
+ static _normalizeVerdict(result) {
43326
+ if (result === undefined) {
43327
+ return { include: true };
43328
+ }
43329
+ return typeof result === "boolean" ? { include: result } : result;
43330
+ }
43327
43331
  }, ConnectorEventOperation, ConnectorObject = class _ConnectorObject {
43328
43332
  constructor(name, displayName, metadata, fields, baseObject, executionType, agentIdentity = null) {
43329
43333
  this.name = name;
@@ -43825,7 +43829,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
43825
43829
  this.jsonObject = jsonObject;
43826
43830
  this.jsonSchema = jsonSchema;
43827
43831
  }
43828
- }, 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) => {
43829
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());
43830
43834
  return formatted.endsWith(" id") ? `${formatted.slice(0, -3)} ID` : formatted;
43831
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) => {
@@ -43945,7 +43949,7 @@ ${webhookConnectionInfo.webhookConfig?.webhookUrl}`) ?? StringExtensions.empty,
43945
43949
  schema.description = field?.description;
43946
43950
  }
43947
43951
  return schema;
43948
- }, getArrayDepth = (fieldName) => (fieldName.match(/\[\*]/g) ?? []).length, createArrayOrObjectPropertySchema = (fieldName, jsonSchema, definitionName) => {
43952
+ }, createArrayOrObjectPropertySchema = (fieldName, jsonSchema, definitionName) => {
43949
43953
  const finalDefinitionName = definitionName ?? fieldName;
43950
43954
  if (!finalDefinitionName) {
43951
43955
  return {};
@@ -44968,6 +44972,95 @@ ${this._errorMessage}`;
44968
44972
  serviceRegistry.updateHostCapabilities(hostCapabilities ?? apiWorkflowServices.defaultHostCapabilitiesProvider?.() ?? DEFAULT_HOST_CAPABILITIES);
44969
44973
  return activity;
44970
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;
44971
45064
  }, ConnectorActivity, EXPRESSION_VALUE_MARKER = "=js:", CLIENT_HOST_CAPABILITIES, DesignTimeActivityClient = class _DesignTimeActivityClient {
44972
45065
  constructor(hostCapabilities, connectionsProvider) {
44973
45066
  this._services = _DesignTimeActivityClient._buildServices(connectionsProvider);
@@ -45232,7 +45325,6 @@ ${this._errorMessage}`;
45232
45325
  }
45233
45326
  }, DesignTimeActivityClient2;
45234
45327
  var init_dist = __esm(() => {
45235
- init_dist_node();
45236
45328
  init_lodash();
45237
45329
  init_luxon();
45238
45330
  init_lodash();
@@ -50988,18 +51080,38 @@ ErrorMessage: ${this.message}`;
50988
51080
  this._eventLookupNames = [_ActivityObjectsLookupHelper.LookupDisplayName, _ActivityObjectsLookupHelper._eventMode];
50989
51081
  }
50990
51082
  static getObjectsLookup(connectorKey) {
50991
- return new LookupReference(this._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), this._objectLookupNames, null, null);
51083
+ return new LookupReference(_ActivityObjectsLookupHelper._objectsLookupName, Constants.ObjectsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._objectsLookupPath, connectorKey), _ActivityObjectsLookupHelper._objectLookupNames, null, null);
50992
51084
  }
50993
51085
  static eventsLookup(connectorKey) {
50994
- return new LookupReference(this._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), this._eventLookupNames, null, null);
51086
+ return new LookupReference(_ActivityObjectsLookupHelper._eventsLookupName, Constants.EventsLookupId, StringExtensions.format(_ActivityObjectsLookupHelper._eventsLookupPath, connectorKey), _ActivityObjectsLookupHelper._eventLookupNames, null, null);
50995
51087
  }
50996
- static filterCachedConnectorObject(cacheValue, operation) {
51088
+ static findMethodForOperation(cacheValue, operation) {
50997
51089
  const rawObject = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1] ?? null;
50998
51090
  let itemMetadata = null;
50999
51091
  if (rawObject) {
51000
51092
  itemMetadata = Metadata.factory(JSON.stringify(rawObject));
51001
51093
  }
51002
- return itemMetadata != null && ArrayExtensions.any(Object.values(itemMetadata.method), (v) => v.operation === operation && !v.isHidden);
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
+ };
51003
51115
  }
51004
51116
  static filterCachedConnectorEventObject(cacheValue, operation) {
51005
51117
  const itemMetadata = Object.entries(cacheValue.columnValues).find((e) => e[0] === Constants.ObjectLookupMetadata)?.[1];
@@ -52449,6 +52561,7 @@ ErrorMessage: ${this.message}`;
52449
52561
  this._value = value ?? _EntityAttributeNamedArgumentValue._nullValue;
52450
52562
  }
52451
52563
  };
52564
+ ARRAY_MARKER_REGEX = /\[\*]/g;
52452
52565
  primitiveTypes2 = ["string", "number", "boolean", "integer"];
52453
52566
  JitTypesProvider = class _JitTypesProvider {
52454
52567
  static {
@@ -56582,6 +56695,7 @@ ErrorMessage: ${this.message}`;
56582
56695
  return this._fieldsService.refreshJitType(connectionId, this.activityConfiguration, new JitTypesProvider(this._designerCustomTypesService));
56583
56696
  }
56584
56697
  };
56698
+ VALID_JSON_SCHEMA_TYPES = /* @__PURE__ */ new Set(["array", "boolean", "integer", "null", "number", "object", "string"]);
56585
56699
  ConnectorActivity = class extends WorkflowActivityBase {
56586
56700
  constructor(connectorActivityInitializationConfiguration) {
56587
56701
  super(connectorActivityInitializationConfiguration.activityIdRef);
@@ -57270,6 +57384,16 @@ ErrorMessage: ${this.message}`;
57270
57384
  const fieldsContainer = ActivityConfigurationExtensions.getFieldContainer(this._viewModel.activityConfiguration);
57271
57385
  return new WorkflowActivityOutputInformation(name, isCustomName, fieldsContainer.outputTypeDefinition ?? undefined, undefined, fieldsContainer.outputJsonSchema ?? undefined, fieldsContainer.hasFileOutput);
57272
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
+ }
57273
57397
  getActivityState() {
57274
57398
  return this._viewModel.activityState;
57275
57399
  }
@@ -58527,7 +58651,7 @@ class TextApiResponse2 {
58527
58651
  var package_default = {
58528
58652
  name: "@uipath/integrationservice-sdk",
58529
58653
  license: "MIT",
58530
- version: "1.200.0-preview.120",
58654
+ version: "1.201.0-preview.121",
58531
58655
  repository: {
58532
58656
  type: "git",
58533
58657
  url: "https://github.com/UiPath/cli.git",
@@ -58568,7 +58692,7 @@ var package_default = {
58568
58692
  typescript: "^7.0.2"
58569
58693
  },
58570
58694
  dependencies: {
58571
- "@uipath/integration-service-design-time": "0.19.3"
58695
+ "@uipath/integration-service-design-time": "0.25.2"
58572
58696
  }
58573
58697
  };
58574
58698
 
@@ -77743,6 +77867,67 @@ var getTokenExpiration = (accessToken) => {
77743
77867
  }
77744
77868
  };
77745
77869
 
77870
+ // ../auth/src/sessionIdentity.ts
77871
+ var parseAuthFlow = (value) => value === "authorization_code" || value === "client_credentials" || value === "federated_credentials" ? value : undefined;
77872
+ var decodeClaims = (accessToken) => {
77873
+ const [error, claims] = catchError(() => parseJWT(accessToken));
77874
+ return error ? undefined : claims;
77875
+ };
77876
+ var asString = (value) => typeof value === "string" && value.length > 0 ? value : undefined;
77877
+ var resolveIdentityType = (claims, authFlow, email) => {
77878
+ const subType = asString(claims?.sub_type);
77879
+ if (subType) {
77880
+ return subType.startsWith("service") ? "Application" : "User";
77881
+ }
77882
+ if (authFlow) {
77883
+ return authFlow === "authorization_code" ? "User" : "Application";
77884
+ }
77885
+ if (email)
77886
+ return "User";
77887
+ if (asString(claims?.client_id) && !asString(claims?.sub)) {
77888
+ return "Application";
77889
+ }
77890
+ return;
77891
+ };
77892
+ var looksLikeEmail = (value) => value?.includes("@") ?? false;
77893
+ var pickEmail = (claims) => {
77894
+ for (const candidate of [claims?.email, claims?.preferred_username]) {
77895
+ const value = asString(candidate);
77896
+ if (looksLikeEmail(value))
77897
+ return value;
77898
+ }
77899
+ return;
77900
+ };
77901
+ var pickName = (claims) => {
77902
+ const username = asString(claims?.preferred_username);
77903
+ return asString(claims?.name) ?? (looksLikeEmail(username) ? undefined : username);
77904
+ };
77905
+ var resolveSessionIdentity = (accessToken, authFlow) => {
77906
+ const claims = accessToken ? decodeClaims(accessToken) : undefined;
77907
+ const email = pickEmail(claims);
77908
+ const type = resolveIdentityType(claims, authFlow, email);
77909
+ if (!type)
77910
+ return;
77911
+ const identity = { type };
77912
+ if (authFlow)
77913
+ identity.authFlow = authFlow;
77914
+ if (type === "User") {
77915
+ const userId = asString(claims?.sub);
77916
+ if (userId)
77917
+ identity.userId = userId;
77918
+ if (email)
77919
+ identity.userEmail = email;
77920
+ const name = pickName(claims);
77921
+ if (name)
77922
+ identity.userName = name;
77923
+ return identity;
77924
+ }
77925
+ const clientId = asString(claims?.client_id);
77926
+ if (clientId)
77927
+ identity.clientId = clientId;
77928
+ return identity;
77929
+ };
77930
+
77746
77931
  // ../auth/src/envAuth.ts
77747
77932
  var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
77748
77933
  var ENFORCE_ROBOT_AUTH_VAR = "UIPATH_CLI_ENFORCE_ROBOT_AUTH";
@@ -77792,6 +77977,7 @@ var readAuthFromEnv = () => {
77792
77977
  }
77793
77978
  const expiration = getTokenExpiration(accessToken);
77794
77979
  const loginStatus = expiration && expiration <= new Date ? "Expired" : "Logged in";
77980
+ const identity = resolveSessionIdentity(accessToken);
77795
77981
  return {
77796
77982
  loginStatus,
77797
77983
  accessToken,
@@ -77801,7 +77987,8 @@ var readAuthFromEnv = () => {
77801
77987
  tenantName,
77802
77988
  tenantId,
77803
77989
  expiration,
77804
- source: "env" /* Env */
77990
+ source: "env-vars" /* EnvironmentVariables */,
77991
+ ...identity ? { identity } : {}
77805
77992
  };
77806
77993
  };
77807
77994
 
@@ -78054,6 +78241,9 @@ var refreshAccessToken = async ({
78054
78241
  return { accessToken: newAccessToken, refreshToken: newRefreshToken };
78055
78242
  };
78056
78243
 
78244
+ // ../auth/src/types.ts
78245
+ var AUTH_FLOW_ENV_VAR = "UIPATH_AUTH_FLOW";
78246
+
78057
78247
  // ../auth/src/utils/envFile.ts
78058
78248
  init_src();
78059
78249
  init_constants();
@@ -78421,7 +78611,8 @@ async function buildFileStatus(tokens, credentials, globalHint) {
78421
78611
  tenantName: credentials.UIPATH_TENANT_NAME,
78422
78612
  tenantId: credentials.UIPATH_TENANT_ID,
78423
78613
  expiration: tokens.expiration,
78424
- source: "file" /* File */,
78614
+ source: "saved-login" /* SavedLogin */,
78615
+ ...identityFields(tokens.accessToken, credentials),
78425
78616
  ...tokens.persistenceWarning ? { hint: tokens.persistenceWarning, persistenceFailed: true } : {},
78426
78617
  ...tokens.lockReleaseFailed ? { lockReleaseFailed: true } : {},
78427
78618
  ...tokens.tokenRefresh ? { tokenRefresh: tokens.tokenRefresh } : {}
@@ -78434,7 +78625,12 @@ async function buildFileStatus(tokens, credentials, globalHint) {
78434
78625
  }
78435
78626
  return result;
78436
78627
  }
78628
+ function identityFields(accessToken, credentials) {
78629
+ const identity = resolveSessionIdentity(accessToken, parseAuthFlow(credentials[AUTH_FLOW_ENV_VAR]));
78630
+ return identity ? { identity } : {};
78631
+ }
78437
78632
  function buildRobotStatus(robotCreds) {
78633
+ const identity = resolveSessionIdentity(robotCreds.accessToken);
78438
78634
  return {
78439
78635
  loginStatus: "Logged in",
78440
78636
  accessToken: robotCreds.accessToken,
@@ -78445,7 +78641,8 @@ function buildRobotStatus(robotCreds) {
78445
78641
  tenantId: robotCreds.tenantId,
78446
78642
  issuer: robotCreds.issuer,
78447
78643
  expiration: getTokenExpiration(robotCreds.accessToken),
78448
- source: "robot" /* Robot */
78644
+ source: "robot" /* Robot */,
78645
+ ...identity ? { identity } : {}
78449
78646
  };
78450
78647
  }
78451
78648
  var isFileNotFoundError = (error) => {
@@ -78496,7 +78693,8 @@ async function circuitBreakerShortCircuit(ctx) {
78496
78693
  tenantName: credentials.UIPATH_TENANT_NAME,
78497
78694
  tenantId: credentials.UIPATH_TENANT_ID,
78498
78695
  expiration,
78499
- source: "file" /* File */
78696
+ source: "saved-login" /* SavedLogin */,
78697
+ ...identityFields(accessToken, credentials)
78500
78698
  } : {},
78501
78699
  hint: globalHint ?? (tokenIsDead ? deadHint : backoffHint),
78502
78700
  refreshCircuitOpen: true,
@@ -78518,7 +78716,8 @@ async function lockAcquireFailureStatus(ctx, error) {
78518
78716
  tenantName: ctx.credentials.UIPATH_TENANT_NAME,
78519
78717
  tenantId: ctx.credentials.UIPATH_TENANT_ID,
78520
78718
  expiration: ctx.expiration,
78521
- source: "file" /* File */,
78719
+ source: "saved-login" /* SavedLogin */,
78720
+ ...identityFields(ctx.accessToken, ctx.credentials),
78522
78721
  hint: globalHint,
78523
78722
  tokenRefresh: {
78524
78723
  attempted: false,
@@ -78718,6 +78917,8 @@ init_constants();
78718
78917
 
78719
78918
  // ../auth/src/interactive.ts
78720
78919
  init_src();
78920
+ // ../auth/src/tenantSelection.ts
78921
+ var IDENTIFIER_STATUSES = new Set([400, 403, 404]);
78721
78922
 
78722
78923
  // ../auth/src/selectTenant.ts
78723
78924
  var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
@@ -78728,10 +78929,6 @@ var TENANT_SELECTION_CODES = new Set([
78728
78929
  ]);
78729
78930
  // ../auth/src/logout.ts
78730
78931
  init_src();
78731
-
78732
- // ../auth/src/index.ts
78733
- init_server();
78734
-
78735
78932
  // src/client-factory.ts
78736
78933
  var API_DOMAIN_MAP = new Map([
78737
78934
  [ConnectorsApi, "connections"],
@@ -79244,7 +79441,7 @@ function assertConditionSupported(condition) {
79244
79441
  }
79245
79442
  }
79246
79443
  function assertFilterTreeSupported(tree) {
79247
- for (const condition of tree.filters) {
79444
+ for (const condition of tree.filters ?? []) {
79248
79445
  assertConditionSupported(condition);
79249
79446
  }
79250
79447
  for (const group of tree.groups ?? []) {
@@ -79265,7 +79462,7 @@ function substituteFilterVariables(tree) {
79265
79462
  function substituteTree(tree, context) {
79266
79463
  const substituted = {
79267
79464
  ...tree,
79268
- filters: tree.filters.map((condition) => substituteCondition(condition, context))
79465
+ filters: (tree.filters ?? []).map((condition) => substituteCondition(condition, context))
79269
79466
  };
79270
79467
  if (tree.groups) {
79271
79468
  substituted.groups = tree.groups.map((group) => substituteTree(group, context));
@@ -81296,4 +81493,4 @@ export {
81296
81493
  AccessTokenResponseFromJSON
81297
81494
  };
81298
81495
 
81299
- //# debugId=CFAC59A81FF7072764756E2164756E21
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.200.0-preview.120",
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.19.3"
31
+ "@uipath/integration-service-design-time": "0.25.2"
32
32
  },
33
- "gitHead": "173ad4b4930bd3e17a493b32e9f1c3c616ea1c10"
33
+ "gitHead": "c70ccfc0b12e637441d67df1d212b71d7784b5f8"
34
34
  }