@uipath/integrationservice-sdk 1.196.0 → 1.197.0-preview.59

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 +530 -273
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -19164,6 +19164,9 @@ function singleton(ctorOrName) {
19164
19164
  };
19165
19165
  }
19166
19166
 
19167
+ // ../common/src/telemetry/global-telemetry-properties.ts
19168
+ var telemetryPropsSlot = singleton("TelemetryDefaultProps");
19169
+
19167
19170
  // ../common/src/sdk-user-agent.ts
19168
19171
  var USER_AGENT_HEADER = "User-Agent";
19169
19172
  var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
@@ -19187,8 +19190,8 @@ function appendUserAgentToken(value, userAgent) {
19187
19190
  function getEffectiveUserAgent(userAgent) {
19188
19191
  return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
19189
19192
  }
19190
- function isHeadersLike(headers) {
19191
- return typeof headers === "object" && headers !== null && "get" in headers && typeof headers.get === "function" && "set" in headers && typeof headers.set === "function";
19193
+ function getHeaderName(headers, headerName) {
19194
+ return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
19192
19195
  }
19193
19196
  function getSdkUserAgentToken(pkg) {
19194
19197
  const packageName = pkg.name.replace(/^@uipath\//, "");
@@ -19196,59 +19199,31 @@ function getSdkUserAgentToken(pkg) {
19196
19199
  }
19197
19200
  function addSdkUserAgentHeader(headers, userAgent) {
19198
19201
  const result = { ...headers ?? {} };
19199
- const effectiveUserAgent = getEffectiveUserAgent(userAgent);
19200
- const headerName = Object.keys(result).find((key) => key.toLowerCase() === USER_AGENT_HEADER.toLowerCase());
19201
- if (headerName) {
19202
- result[headerName] = appendUserAgentToken(result[headerName], effectiveUserAgent);
19203
- } else {
19204
- result[USER_AGENT_HEADER] = effectiveUserAgent;
19205
- }
19202
+ const headerName = getHeaderName(result, USER_AGENT_HEADER);
19203
+ result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
19206
19204
  return result;
19207
19205
  }
19208
- function withSdkUserAgentHeader(headers, userAgent) {
19209
- const effectiveUserAgent = getEffectiveUserAgent(userAgent);
19210
- if (isHeadersLike(headers)) {
19211
- headers.set(USER_AGENT_HEADER, appendUserAgentToken(headers.get(USER_AGENT_HEADER), effectiveUserAgent));
19212
- return headers;
19213
- }
19214
- if (Array.isArray(headers)) {
19215
- const result = headers.map((entry) => {
19216
- const [key, value] = entry;
19217
- return [key, value];
19218
- });
19219
- const headerIndex = result.findIndex(([key]) => key.toLowerCase() === USER_AGENT_HEADER.toLowerCase());
19220
- if (headerIndex >= 0) {
19221
- const [key, value] = result[headerIndex];
19222
- result[headerIndex] = [
19223
- key,
19224
- appendUserAgentToken(value, effectiveUserAgent)
19225
- ];
19226
- } else {
19227
- result.push([USER_AGENT_HEADER, effectiveUserAgent]);
19228
- }
19229
- return result;
19230
- }
19231
- return addSdkUserAgentHeader(typeof headers === "object" && headers !== null ? { ...headers } : {}, effectiveUserAgent);
19206
+ function asHeaderRecord(headers) {
19207
+ return typeof headers === "object" && headers !== null ? { ...headers } : {};
19232
19208
  }
19233
- function withUserAgentInitOverride(initOverrides, userAgent) {
19209
+ function withForwardedHeadersInitOverride(initOverrides, forward) {
19234
19210
  return async (requestContext) => {
19235
- const initWithUserAgent = {
19211
+ const initWithHeaders = {
19236
19212
  ...requestContext.init,
19237
- headers: withSdkUserAgentHeader(requestContext.init.headers, userAgent)
19213
+ headers: forward(asHeaderRecord(requestContext.init.headers))
19238
19214
  };
19239
19215
  const override = typeof initOverrides === "function" ? await initOverrides({
19240
19216
  ...requestContext,
19241
- init: initWithUserAgent
19217
+ init: initWithHeaders
19242
19218
  }) : initOverrides;
19243
19219
  return {
19244
19220
  ...override ?? {},
19245
- headers: withSdkUserAgentHeader(override?.headers ?? initWithUserAgent.headers, userAgent)
19221
+ headers: forward(asHeaderRecord(override?.headers ?? initWithHeaders.headers))
19246
19222
  };
19247
19223
  };
19248
19224
  }
19249
- function installSdkUserAgentHeader(BaseApiClass, userAgent) {
19225
+ function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
19250
19226
  const prototype = BaseApiClass.prototype;
19251
- const patchKey = userAgentPatchKey(userAgent);
19252
19227
  if (prototype[patchKey]) {
19253
19228
  return;
19254
19229
  }
@@ -19256,13 +19231,16 @@ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
19256
19231
  throw new Error("Generated BaseAPI request function not found.");
19257
19232
  }
19258
19233
  const originalRequest = prototype.request;
19259
- prototype.request = function requestWithUserAgent(context, initOverrides) {
19260
- return originalRequest.call(this, context, withUserAgentInitOverride(initOverrides, userAgent));
19234
+ prototype.request = function requestWithForwardedHeaders(context, initOverrides) {
19235
+ return originalRequest.call(this, context, withForwardedHeadersInitOverride(initOverrides, forward));
19261
19236
  };
19262
19237
  Object.defineProperty(prototype, patchKey, {
19263
19238
  value: true
19264
19239
  });
19265
19240
  }
19241
+ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
19242
+ installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
19243
+ }
19266
19244
 
19267
19245
  // generated/connections/src/runtime.ts
19268
19246
  var BASE_PATH = "https://alpha.uipath.com/entity/Azure/connections_".replace(/\/+$/, "");
@@ -19833,7 +19811,7 @@ class TextApiResponse2 {
19833
19811
  var package_default = {
19834
19812
  name: "@uipath/integrationservice-sdk",
19835
19813
  license: "MIT",
19836
- version: "1.196.0",
19814
+ version: "1.197.0-preview.59",
19837
19815
  repository: {
19838
19816
  type: "git",
19839
19817
  url: "https://github.com/UiPath/cli.git",
@@ -19860,7 +19838,7 @@ var package_default = {
19860
19838
  "dist"
19861
19839
  ],
19862
19840
  scripts: {
19863
- build: "bun build ./src/index.ts --outdir dist --format esm --target node && tsc -p tsconfig.build.json --noCheck",
19841
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
19864
19842
  generate: "bun run src/scripts/generate-sdk.ts",
19865
19843
  lint: "biome check .",
19866
19844
  test: "vitest run",
@@ -38854,6 +38832,12 @@ var normalizeAndValidateBaseUrl = (rawUrl) => {
38854
38832
  }
38855
38833
  return url.pathname.length > 1 ? url.origin : baseUrl;
38856
38834
  };
38835
+ var resolveScopes = (isExternalAppAuth, customScopes, fileScopes) => {
38836
+ const requestedScopes = customScopes?.length ? customScopes : fileScopes ?? [];
38837
+ if (isExternalAppAuth)
38838
+ return requestedScopes;
38839
+ return [...new Set([...DEFAULT_SCOPES, ...requestedScopes])];
38840
+ };
38857
38841
  var resolveConfigAsync = async ({
38858
38842
  customAuthority,
38859
38843
  customClientId,
@@ -38884,7 +38868,7 @@ var resolveConfigAsync = async ({
38884
38868
  clientSecret = fileAuth.clientSecret;
38885
38869
  }
38886
38870
  const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
38887
- const scopes = customScopes && customScopes.length > 0 ? customScopes : fileAuth.scopes && fileAuth.scopes.length > 0 ? fileAuth.scopes : isExternalAppAuth ? [] : DEFAULT_SCOPES;
38871
+ const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
38888
38872
  return {
38889
38873
  clientId,
38890
38874
  clientSecret,
@@ -38899,6 +38883,76 @@ var resolveConfigAsync = async ({
38899
38883
  init_constants();
38900
38884
  // ../auth/src/loginStatus.ts
38901
38885
  init_src();
38886
+
38887
+ // ../auth/src/authProfile.ts
38888
+ init_src();
38889
+ init_constants();
38890
+ var DEFAULT_AUTH_PROFILE = "default";
38891
+ var PROFILE_DIR = "profiles";
38892
+ var PROFILE_NAME_RE = /^[A-Za-z0-9._-]+$/;
38893
+ var ACTIVE_AUTH_PROFILE_KEY = Symbol.for("@uipath/auth/ActiveAuthProfile");
38894
+ var AUTH_PROFILE_STORAGE_KEY = Symbol.for("@uipath/auth/ProfileStorage");
38895
+ var globalSlot2 = globalThis;
38896
+ function isAuthProfileStorage(value) {
38897
+ return value !== null && typeof value === "object" && "getStore" in value && "run" in value;
38898
+ }
38899
+ function createProfileStorage() {
38900
+ const [error, mod] = catchError(() => __require("node:async_hooks"));
38901
+ if (error || typeof mod?.AsyncLocalStorage !== "function") {
38902
+ return {
38903
+ getStore: () => {
38904
+ return;
38905
+ },
38906
+ run: (_store, fn) => fn()
38907
+ };
38908
+ }
38909
+ return new mod.AsyncLocalStorage;
38910
+ }
38911
+ function getProfileStorage() {
38912
+ const existing = globalSlot2[AUTH_PROFILE_STORAGE_KEY];
38913
+ if (isAuthProfileStorage(existing)) {
38914
+ return existing;
38915
+ }
38916
+ const storage = createProfileStorage();
38917
+ globalSlot2[AUTH_PROFILE_STORAGE_KEY] = storage;
38918
+ return storage;
38919
+ }
38920
+ var profileStorage = getProfileStorage();
38921
+
38922
+ class AuthProfileValidationError extends Error {
38923
+ constructor(message) {
38924
+ super(message);
38925
+ this.name = "AuthProfileValidationError";
38926
+ }
38927
+ }
38928
+ function normalizeAuthProfileName(profile) {
38929
+ if (profile === undefined || profile === DEFAULT_AUTH_PROFILE) {
38930
+ return;
38931
+ }
38932
+ if (profile.length === 0 || profile === "." || profile === ".." || !PROFILE_NAME_RE.test(profile)) {
38933
+ throw new AuthProfileValidationError(`Invalid profile name "${profile}". Profile names may contain only letters, numbers, '.', '_', and '-'.`);
38934
+ }
38935
+ return profile;
38936
+ }
38937
+ function getActiveAuthProfile() {
38938
+ const scopedState = profileStorage.getStore();
38939
+ if (scopedState !== undefined) {
38940
+ return scopedState.profile;
38941
+ }
38942
+ return globalSlot2[ACTIVE_AUTH_PROFILE_KEY]?.profile;
38943
+ }
38944
+ function resolveAuthProfileFilePath(profile) {
38945
+ const normalized = normalizeAuthProfileName(profile);
38946
+ if (normalized === undefined) {
38947
+ throw new AuthProfileValidationError(`"${DEFAULT_AUTH_PROFILE}" is the built-in profile and does not have a profile file path.`);
38948
+ }
38949
+ const fs7 = getFileSystem();
38950
+ return fs7.path.join(fs7.env.homedir(), UIPATH_HOME_DIR, PROFILE_DIR, normalized, AUTH_FILENAME);
38951
+ }
38952
+ function getActiveAuthProfileFilePath() {
38953
+ const profile = getActiveAuthProfile();
38954
+ return profile ? resolveAuthProfileFilePath(profile) : undefined;
38955
+ }
38902
38956
  // ../auth/src/utils/jwt.ts
38903
38957
  class InvalidIssuerError extends Error {
38904
38958
  expected;
@@ -39027,23 +39081,74 @@ var readAuthFromEnv = () => {
39027
39081
  organizationId,
39028
39082
  tenantName,
39029
39083
  tenantId,
39030
- expiration
39084
+ expiration,
39085
+ source: "env" /* Env */
39031
39086
  };
39032
39087
  };
39033
39088
 
39089
+ // ../auth/src/refreshCircuitBreaker.ts
39090
+ init_src();
39091
+ var BREAKER_SUFFIX = ".refresh-state";
39092
+ var BACKOFF_BASE_MS = 60000;
39093
+ var BACKOFF_CAP_MS = 60 * 60 * 1000;
39094
+ var SURFACE_WINDOW_MS = 60 * 60 * 1000;
39095
+ async function refreshTokenFingerprint(refreshToken) {
39096
+ const bytes = new TextEncoder().encode(refreshToken);
39097
+ if (globalThis.crypto?.subtle) {
39098
+ const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
39099
+ return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("").slice(0, 16);
39100
+ }
39101
+ const { createHash } = await import("node:crypto");
39102
+ return createHash("sha256").update(refreshToken).digest("hex").slice(0, 16);
39103
+ }
39104
+ function breakerPathFor(authPath) {
39105
+ return `${authPath}${BREAKER_SUFFIX}`;
39106
+ }
39107
+ async function loadRefreshBreaker(authPath) {
39108
+ const fs7 = getFileSystem();
39109
+ try {
39110
+ const content = await fs7.readFile(breakerPathFor(authPath), "utf-8");
39111
+ if (!content)
39112
+ return {};
39113
+ const parsed = JSON.parse(content);
39114
+ return parsed && typeof parsed === "object" ? parsed : {};
39115
+ } catch {
39116
+ return {};
39117
+ }
39118
+ }
39119
+ async function saveRefreshBreaker(authPath, state) {
39120
+ try {
39121
+ const fs7 = getFileSystem();
39122
+ const path3 = breakerPathFor(authPath);
39123
+ await fs7.mkdir(fs7.path.dirname(path3));
39124
+ const tempPath = `${path3}.tmp`;
39125
+ await fs7.writeFile(tempPath, JSON.stringify(state));
39126
+ await fs7.rename(tempPath, path3);
39127
+ } catch {}
39128
+ }
39129
+ async function clearRefreshBreaker(authPath) {
39130
+ const fs7 = getFileSystem();
39131
+ const path3 = breakerPathFor(authPath);
39132
+ try {
39133
+ if (await fs7.exists(path3)) {
39134
+ await fs7.rm(path3);
39135
+ }
39136
+ } catch {}
39137
+ }
39138
+ function nextBackoffMs(attempts) {
39139
+ const shift = Math.max(0, attempts - 1);
39140
+ return Math.min(BACKOFF_BASE_MS * 2 ** shift, BACKOFF_CAP_MS);
39141
+ }
39142
+ function shouldSurface(state, nowMs) {
39143
+ if (state.lastSurfacedAtMs === undefined)
39144
+ return true;
39145
+ return nowMs - state.lastSurfacedAtMs >= SURFACE_WINDOW_MS;
39146
+ }
39147
+
39034
39148
  // ../auth/src/robotClientFallback.ts
39035
39149
  init_src();
39036
39150
  var DEFAULT_TIMEOUT_MS = 1000;
39037
39151
  var CLOSE_TIMEOUT_MS = 500;
39038
- var NOTICE_SENTINEL = Symbol.for("@uipath/auth/robotFallbackNoticePrinted");
39039
- var printNoticeOnce = () => {
39040
- const slot = globalThis;
39041
- if (slot[NOTICE_SENTINEL])
39042
- return;
39043
- slot[NOTICE_SENTINEL] = true;
39044
- catchError(() => process.stderr.write(`Using UiPath Robot credentials. Run 'uip login' for a dedicated session.
39045
- `));
39046
- };
39047
39152
  var ROBOT_USER_SERVICES_PIPE = "UiPathUserServices";
39048
39153
  var ROBOT_USER_SERVICES_ALTERNATE_PIPE = `${ROBOT_USER_SERVICES_PIPE}Alternate`;
39049
39154
  var PIPE_NAME_MAX_LENGTH = 103;
@@ -39159,7 +39264,6 @@ var tryRobotClientFallback = async (options = {}) => {
39159
39264
  issuerFromToken = issClaim;
39160
39265
  }
39161
39266
  }
39162
- printNoticeOnce();
39163
39267
  return {
39164
39268
  accessToken,
39165
39269
  baseUrl: parsedUrl.baseUrl,
@@ -39384,18 +39488,327 @@ var saveEnvFileAsync = async ({
39384
39488
  };
39385
39489
 
39386
39490
  // ../auth/src/loginStatus.ts
39387
- function normalizeTokenRefreshFailure() {
39388
- return "stored refresh token is invalid or expired";
39491
+ var getLoginStatusAsync = async (options = {}) => {
39492
+ return getLoginStatusWithDeps(options);
39493
+ };
39494
+ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
39495
+ const {
39496
+ resolveEnvFilePath = resolveEnvFilePathAsync,
39497
+ loadEnvFile = loadEnvFileAsync,
39498
+ saveEnvFile = saveEnvFileAsync,
39499
+ getFs = getFileSystem,
39500
+ refreshToken: refreshTokenFn = refreshAccessToken,
39501
+ resolveConfig = resolveConfigAsync,
39502
+ robotFallback = tryRobotClientFallback,
39503
+ loadBreaker = loadRefreshBreaker,
39504
+ saveBreaker = saveRefreshBreaker,
39505
+ clearBreaker = clearRefreshBreaker
39506
+ } = deps;
39507
+ if (isRobotAuthEnforced()) {
39508
+ return resolveRobotEnforcedStatus(robotFallback);
39509
+ }
39510
+ if (isEnvAuthEnabled()) {
39511
+ return readAuthFromEnv();
39512
+ }
39513
+ const activeProfile = getActiveAuthProfile();
39514
+ const activeProfileFilePath = getActiveAuthProfileFilePath();
39515
+ const usingActiveProfile = activeProfile !== undefined && (options.envFilePath === undefined || options.envFilePath === activeProfileFilePath);
39516
+ const envFilePath = options.envFilePath ?? activeProfileFilePath ?? DEFAULT_ENV_FILENAME;
39517
+ const { ensureTokenValidityMinutes } = options;
39518
+ const { absolutePath } = await resolveEnvFilePath(envFilePath);
39519
+ if (absolutePath === undefined) {
39520
+ if (usingActiveProfile) {
39521
+ return {
39522
+ loginStatus: "Not logged in",
39523
+ hint: `No credentials found for profile "${activeProfile}". Run 'uip login --profile ${activeProfile}' to authenticate this profile.`
39524
+ };
39525
+ }
39526
+ return resolveBorrowedRobotStatus(robotFallback);
39527
+ }
39528
+ const loaded = await loadFileCredentials(loadEnvFile, absolutePath);
39529
+ if ("status" in loaded) {
39530
+ return loaded.status;
39531
+ }
39532
+ const { credentials } = loaded;
39533
+ const globalHint = () => usingActiveProfile ? Promise.resolve(undefined) : getGlobalCredsHint(getFs, loadEnvFile, absolutePath, envFilePath);
39534
+ const expiration = getTokenExpiration(credentials.UIPATH_ACCESS_TOKEN);
39535
+ const outerThreshold = computeExpirationThreshold(ensureTokenValidityMinutes);
39536
+ let tokens = {
39537
+ accessToken: credentials.UIPATH_ACCESS_TOKEN,
39538
+ refreshToken: credentials.UIPATH_REFRESH_TOKEN,
39539
+ expiration,
39540
+ lockReleaseFailed: false
39541
+ };
39542
+ const refreshToken = credentials.UIPATH_REFRESH_TOKEN;
39543
+ if (expiration && expiration <= outerThreshold && refreshToken) {
39544
+ const refreshed = await attemptRefresh({
39545
+ absolutePath,
39546
+ credentials,
39547
+ accessToken: credentials.UIPATH_ACCESS_TOKEN,
39548
+ refreshToken,
39549
+ expiration,
39550
+ ensureTokenValidityMinutes,
39551
+ getFs,
39552
+ loadEnvFile,
39553
+ saveEnvFile,
39554
+ refreshFn: refreshTokenFn,
39555
+ resolveConfig,
39556
+ loadBreaker,
39557
+ saveBreaker,
39558
+ clearBreaker,
39559
+ globalHint
39560
+ });
39561
+ if (refreshed.kind === "terminal") {
39562
+ return refreshed.status;
39563
+ }
39564
+ tokens = refreshed.tokens;
39565
+ }
39566
+ return buildFileStatus(tokens, credentials, globalHint);
39567
+ };
39568
+ async function resolveRobotEnforcedStatus(robotFallback) {
39569
+ if (isEnvAuthEnabled()) {
39570
+ throw new EnvAuthConfigError(`${ENV_AUTH_ENABLE_VAR}=true and ${ENFORCE_ROBOT_AUTH_VAR}=true ` + `are mutually exclusive. Unset one of them and re-run.`);
39571
+ }
39572
+ const robotCreds = await robotFallback({ force: true });
39573
+ if (!robotCreds) {
39574
+ return {
39575
+ loginStatus: "Not logged in",
39576
+ hint: `${ENFORCE_ROBOT_AUTH_VAR}=true but the UiPath Robot ` + `session is unavailable. Start and sign in to the Assistant, ` + `or unset ${ENFORCE_ROBOT_AUTH_VAR} to fall back to file or ` + `env-var authentication.`
39577
+ };
39578
+ }
39579
+ return buildRobotStatus(robotCreds);
39389
39580
  }
39390
- function normalizeTokenRefreshUnavailableFailure() {
39391
- return "token refresh failed before authentication completed";
39581
+ async function resolveBorrowedRobotStatus(robotFallback) {
39582
+ const robotCreds = await robotFallback();
39583
+ return robotCreds ? buildRobotStatus(robotCreds) : { loginStatus: "Not logged in" };
39392
39584
  }
39393
- function errorMessage(error) {
39394
- return error instanceof Error ? error.message : String(error);
39585
+ async function loadFileCredentials(loadEnvFile, absolutePath) {
39586
+ let credentials;
39587
+ try {
39588
+ credentials = await loadEnvFile({ envPath: absolutePath });
39589
+ } catch (error) {
39590
+ if (isFileNotFoundError(error)) {
39591
+ return { status: { loginStatus: "Not logged in" } };
39592
+ }
39593
+ throw error;
39594
+ }
39595
+ if (!credentials.UIPATH_ACCESS_TOKEN) {
39596
+ return { status: { loginStatus: "Not logged in" } };
39597
+ }
39598
+ return { credentials };
39599
+ }
39600
+ async function getGlobalCredsHint(getFs, loadEnvFile, absolutePath, envFilePath) {
39601
+ const fs7 = getFs();
39602
+ const globalPath = fs7.path.join(fs7.env.homedir(), envFilePath);
39603
+ if (absolutePath === globalPath)
39604
+ return;
39605
+ if (!await fs7.exists(globalPath))
39606
+ return;
39607
+ try {
39608
+ const globalCreds = await loadEnvFile({ envPath: globalPath });
39609
+ if (!globalCreds.UIPATH_ACCESS_TOKEN)
39610
+ return;
39611
+ const globalExp = getTokenExpiration(globalCreds.UIPATH_ACCESS_TOKEN);
39612
+ if (globalExp && globalExp <= new Date)
39613
+ return;
39614
+ return `Local credentials file at ${absolutePath} has expired credentials. Valid credentials exist in ${globalPath}. Remove the local file or run 'uip login' to re-authenticate.`;
39615
+ } catch {
39616
+ return;
39617
+ }
39395
39618
  }
39396
39619
  function computeExpirationThreshold(ensureTokenValidityMinutes) {
39397
39620
  return new Date(Date.now() + (ensureTokenValidityMinutes ?? 0) * 60 * 1000);
39398
39621
  }
39622
+ async function attemptRefresh(ctx) {
39623
+ const shortCircuit = await circuitBreakerShortCircuit(ctx);
39624
+ if (shortCircuit) {
39625
+ return { kind: "terminal", status: shortCircuit };
39626
+ }
39627
+ let release;
39628
+ try {
39629
+ release = await ctx.getFs().acquireLock(ctx.absolutePath);
39630
+ } catch (error) {
39631
+ return {
39632
+ kind: "terminal",
39633
+ status: await lockAcquireFailureStatus(ctx, error)
39634
+ };
39635
+ }
39636
+ let lockedFailure;
39637
+ let lockReleaseFailed = false;
39638
+ let success;
39639
+ try {
39640
+ const outcome = await runRefreshLocked({
39641
+ absolutePath: ctx.absolutePath,
39642
+ refreshToken: ctx.refreshToken,
39643
+ customAuthority: ctx.credentials.UIPATH_URL,
39644
+ ensureTokenValidityMinutes: ctx.ensureTokenValidityMinutes,
39645
+ loadEnvFile: ctx.loadEnvFile,
39646
+ saveEnvFile: ctx.saveEnvFile,
39647
+ refreshFn: ctx.refreshFn,
39648
+ resolveConfig: ctx.resolveConfig,
39649
+ loadBreaker: ctx.loadBreaker,
39650
+ saveBreaker: ctx.saveBreaker,
39651
+ clearBreaker: ctx.clearBreaker
39652
+ });
39653
+ if (outcome.kind === "fail") {
39654
+ lockedFailure = outcome.status;
39655
+ } else {
39656
+ success = outcome;
39657
+ }
39658
+ } finally {
39659
+ try {
39660
+ await release();
39661
+ } catch {
39662
+ lockReleaseFailed = true;
39663
+ }
39664
+ }
39665
+ if (lockedFailure) {
39666
+ const globalHint = await ctx.globalHint();
39667
+ const base = globalHint ? { ...lockedFailure, loginStatus: "Expired", hint: globalHint } : lockedFailure;
39668
+ return {
39669
+ kind: "terminal",
39670
+ status: lockReleaseFailed ? { ...base, lockReleaseFailed: true } : base
39671
+ };
39672
+ }
39673
+ return {
39674
+ kind: "refreshed",
39675
+ tokens: {
39676
+ accessToken: success?.accessToken,
39677
+ refreshToken: success?.refreshToken,
39678
+ expiration: success?.expiration,
39679
+ tokenRefresh: success?.tokenRefresh,
39680
+ persistenceWarning: success?.persistenceWarning,
39681
+ lockReleaseFailed
39682
+ }
39683
+ };
39684
+ }
39685
+ async function buildFileStatus(tokens, credentials, globalHint) {
39686
+ const result = {
39687
+ loginStatus: tokens.expiration && tokens.expiration <= new Date ? "Expired" : "Logged in",
39688
+ accessToken: tokens.accessToken,
39689
+ refreshToken: tokens.refreshToken,
39690
+ baseUrl: credentials.UIPATH_URL,
39691
+ organizationName: credentials.UIPATH_ORGANIZATION_NAME,
39692
+ organizationId: credentials.UIPATH_ORGANIZATION_ID,
39693
+ tenantName: credentials.UIPATH_TENANT_NAME,
39694
+ tenantId: credentials.UIPATH_TENANT_ID,
39695
+ expiration: tokens.expiration,
39696
+ source: "file" /* File */,
39697
+ ...tokens.persistenceWarning ? { hint: tokens.persistenceWarning, persistenceFailed: true } : {},
39698
+ ...tokens.lockReleaseFailed ? { lockReleaseFailed: true } : {},
39699
+ ...tokens.tokenRefresh ? { tokenRefresh: tokens.tokenRefresh } : {}
39700
+ };
39701
+ if (result.loginStatus === "Expired") {
39702
+ const hint = await globalHint();
39703
+ if (hint) {
39704
+ result.hint = hint;
39705
+ }
39706
+ }
39707
+ return result;
39708
+ }
39709
+ function buildRobotStatus(robotCreds) {
39710
+ return {
39711
+ loginStatus: "Logged in",
39712
+ accessToken: robotCreds.accessToken,
39713
+ baseUrl: robotCreds.baseUrl,
39714
+ organizationName: robotCreds.organizationName,
39715
+ organizationId: robotCreds.organizationId,
39716
+ tenantName: robotCreds.tenantName,
39717
+ tenantId: robotCreds.tenantId,
39718
+ issuer: robotCreds.issuer,
39719
+ expiration: getTokenExpiration(robotCreds.accessToken),
39720
+ source: "robot" /* Robot */
39721
+ };
39722
+ }
39723
+ var isFileNotFoundError = (error) => {
39724
+ if (!(error instanceof Object))
39725
+ return false;
39726
+ return error.code === "ENOENT";
39727
+ };
39728
+ async function circuitBreakerShortCircuit(ctx) {
39729
+ const {
39730
+ absolutePath,
39731
+ refreshToken,
39732
+ accessToken,
39733
+ credentials,
39734
+ expiration,
39735
+ loadBreaker,
39736
+ saveBreaker,
39737
+ clearBreaker
39738
+ } = ctx;
39739
+ const fingerprint = await refreshTokenFingerprint(refreshToken);
39740
+ const breaker = await loadBreaker(absolutePath).catch(() => ({}));
39741
+ if (breaker.deadTokenFp && breaker.deadTokenFp !== fingerprint) {
39742
+ await clearBreaker(absolutePath);
39743
+ breaker.deadTokenFp = undefined;
39744
+ }
39745
+ const nowMs = Date.now();
39746
+ const tokenIsDead = breaker.deadTokenFp === fingerprint;
39747
+ const inBackoff = breaker.backoffUntilMs !== undefined && nowMs < breaker.backoffUntilMs;
39748
+ if (!tokenIsDead && !inBackoff)
39749
+ return;
39750
+ const globalHint = await ctx.globalHint();
39751
+ const suppressed = !shouldSurface(breaker, nowMs);
39752
+ if (!suppressed) {
39753
+ await saveBreaker(absolutePath, {
39754
+ ...breaker,
39755
+ lastSurfacedAtMs: nowMs
39756
+ });
39757
+ }
39758
+ const deadHint = "Run 'uip login' to re-authenticate — the stored refresh token is invalid or expired. In a non-interactive context, authenticate with: uip login --client-id <id> --client-secret <secret> -t <tenant>.";
39759
+ const backoffHint = "Token refresh is temporarily backed off after a recent network error and will retry automatically once the backoff window elapses.";
39760
+ return {
39761
+ loginStatus: globalHint ? "Expired" : "Refresh Failed",
39762
+ ...globalHint ? {
39763
+ accessToken,
39764
+ refreshToken,
39765
+ baseUrl: credentials.UIPATH_URL,
39766
+ organizationName: credentials.UIPATH_ORGANIZATION_NAME,
39767
+ organizationId: credentials.UIPATH_ORGANIZATION_ID,
39768
+ tenantName: credentials.UIPATH_TENANT_NAME,
39769
+ tenantId: credentials.UIPATH_TENANT_ID,
39770
+ expiration,
39771
+ source: "file" /* File */
39772
+ } : {},
39773
+ hint: globalHint ?? (tokenIsDead ? deadHint : backoffHint),
39774
+ refreshCircuitOpen: true,
39775
+ refreshTelemetrySuppressed: suppressed,
39776
+ tokenRefresh: { attempted: false, success: false }
39777
+ };
39778
+ }
39779
+ async function lockAcquireFailureStatus(ctx, error) {
39780
+ const msg = errorMessage(error);
39781
+ const globalHint = await ctx.globalHint();
39782
+ if (globalHint) {
39783
+ return {
39784
+ loginStatus: "Expired",
39785
+ accessToken: ctx.accessToken,
39786
+ refreshToken: ctx.refreshToken,
39787
+ baseUrl: ctx.credentials.UIPATH_URL,
39788
+ organizationName: ctx.credentials.UIPATH_ORGANIZATION_NAME,
39789
+ organizationId: ctx.credentials.UIPATH_ORGANIZATION_ID,
39790
+ tenantName: ctx.credentials.UIPATH_TENANT_NAME,
39791
+ tenantId: ctx.credentials.UIPATH_TENANT_ID,
39792
+ expiration: ctx.expiration,
39793
+ source: "file" /* File */,
39794
+ hint: globalHint,
39795
+ tokenRefresh: {
39796
+ attempted: false,
39797
+ success: false,
39798
+ errorMessage: `lock acquisition failed: ${msg}`
39799
+ }
39800
+ };
39801
+ }
39802
+ return {
39803
+ loginStatus: "Refresh Failed",
39804
+ hint: "Could not acquire the auth-file lock — too many concurrent `uip` processes, or a permission issue on the auth directory. Retry, or run 'uip login' to re-authenticate.",
39805
+ tokenRefresh: {
39806
+ attempted: false,
39807
+ success: false,
39808
+ errorMessage: `lock acquisition failed: ${msg}`
39809
+ }
39810
+ };
39811
+ }
39399
39812
  async function runRefreshLocked(inputs) {
39400
39813
  const {
39401
39814
  absolutePath,
@@ -39405,7 +39818,10 @@ async function runRefreshLocked(inputs) {
39405
39818
  loadEnvFile,
39406
39819
  saveEnvFile,
39407
39820
  refreshFn,
39408
- resolveConfig
39821
+ resolveConfig,
39822
+ loadBreaker,
39823
+ saveBreaker,
39824
+ clearBreaker
39409
39825
  } = inputs;
39410
39826
  const expirationThreshold = computeExpirationThreshold(ensureTokenValidityMinutes);
39411
39827
  let fresh;
@@ -39428,6 +39844,7 @@ async function runRefreshLocked(inputs) {
39428
39844
  const freshAccess = fresh.UIPATH_ACCESS_TOKEN;
39429
39845
  const freshExp = freshAccess ? getTokenExpiration(freshAccess) : undefined;
39430
39846
  if (freshAccess && freshExp && freshExp > expirationThreshold) {
39847
+ await clearBreaker(absolutePath);
39431
39848
  return {
39432
39849
  kind: "ok",
39433
39850
  accessToken: freshAccess,
@@ -39451,8 +39868,21 @@ async function runRefreshLocked(inputs) {
39451
39868
  refreshedRefresh = refreshed.refreshToken;
39452
39869
  } catch (error) {
39453
39870
  const isOAuthFailure = isTokenRefreshOAuthFailure(error);
39454
- const hint = isOAuthFailure ? "Run 'uip login' to re-authenticate — the stored refresh token is invalid or expired." : "Token refresh failed. Check your network connection, then retry or run 'uip login' to re-authenticate.";
39871
+ const hint = isOAuthFailure ? "Run 'uip login' to re-authenticate — the stored refresh token is invalid or expired. In a non-interactive context, authenticate with: uip login --client-id <id> --client-secret <secret> -t <tenant>." : "Token refresh failed. Check your network connection, then retry or run 'uip login' to re-authenticate.";
39455
39872
  const message = isOAuthFailure ? normalizeTokenRefreshFailure() : normalizeTokenRefreshUnavailableFailure();
39873
+ const fp = await refreshTokenFingerprint(tokenForIdP);
39874
+ if (isOAuthFailure) {
39875
+ await saveBreaker(absolutePath, { deadTokenFp: fp });
39876
+ } else {
39877
+ const prior = await loadBreaker(absolutePath).catch(() => ({}));
39878
+ const attempts = (prior.attempts ?? 0) + 1;
39879
+ await saveBreaker(absolutePath, {
39880
+ ...prior,
39881
+ deadTokenFp: undefined,
39882
+ attempts,
39883
+ backoffUntilMs: Date.now() + nextBackoffMs(attempts)
39884
+ });
39885
+ }
39456
39886
  return {
39457
39887
  kind: "fail",
39458
39888
  status: {
@@ -39481,6 +39911,7 @@ async function runRefreshLocked(inputs) {
39481
39911
  }
39482
39912
  };
39483
39913
  }
39914
+ await clearBreaker(absolutePath);
39484
39915
  try {
39485
39916
  await saveEnvFile({
39486
39917
  envPath: absolutePath,
@@ -39513,212 +39944,15 @@ async function runRefreshLocked(inputs) {
39513
39944
  };
39514
39945
  }
39515
39946
  }
39516
- var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
39517
- const {
39518
- resolveEnvFilePath = resolveEnvFilePathAsync,
39519
- loadEnvFile = loadEnvFileAsync,
39520
- saveEnvFile = saveEnvFileAsync,
39521
- getFs = getFileSystem,
39522
- refreshToken: refreshTokenFn = refreshAccessToken,
39523
- resolveConfig = resolveConfigAsync,
39524
- robotFallback = tryRobotClientFallback
39525
- } = deps;
39526
- if (isRobotAuthEnforced()) {
39527
- if (isEnvAuthEnabled()) {
39528
- throw new EnvAuthConfigError(`${ENV_AUTH_ENABLE_VAR}=true and ${ENFORCE_ROBOT_AUTH_VAR}=true ` + `are mutually exclusive. Unset one of them and re-run.`);
39529
- }
39530
- const robotCreds = await robotFallback({ force: true });
39531
- if (!robotCreds) {
39532
- return {
39533
- loginStatus: "Not logged in",
39534
- hint: `${ENFORCE_ROBOT_AUTH_VAR}=true but the UiPath Robot ` + `session is unavailable. Start and sign in to the Assistant, ` + `or unset ${ENFORCE_ROBOT_AUTH_VAR} to fall back to file or ` + `env-var authentication.`
39535
- };
39536
- }
39537
- const expiration2 = getTokenExpiration(robotCreds.accessToken);
39538
- return {
39539
- loginStatus: "Logged in",
39540
- accessToken: robotCreds.accessToken,
39541
- baseUrl: robotCreds.baseUrl,
39542
- organizationName: robotCreds.organizationName,
39543
- organizationId: robotCreds.organizationId,
39544
- tenantName: robotCreds.tenantName,
39545
- tenantId: robotCreds.tenantId,
39546
- issuer: robotCreds.issuer,
39547
- expiration: expiration2,
39548
- source: "robot" /* Robot */
39549
- };
39550
- }
39551
- if (isEnvAuthEnabled()) {
39552
- return readAuthFromEnv();
39553
- }
39554
- const { envFilePath = DEFAULT_ENV_FILENAME, ensureTokenValidityMinutes } = options;
39555
- const { absolutePath } = await resolveEnvFilePath(envFilePath);
39556
- if (absolutePath === undefined) {
39557
- const robotCreds = await robotFallback();
39558
- if (robotCreds) {
39559
- const expiration2 = getTokenExpiration(robotCreds.accessToken);
39560
- const status = {
39561
- loginStatus: "Logged in",
39562
- accessToken: robotCreds.accessToken,
39563
- baseUrl: robotCreds.baseUrl,
39564
- organizationName: robotCreds.organizationName,
39565
- organizationId: robotCreds.organizationId,
39566
- tenantName: robotCreds.tenantName,
39567
- tenantId: robotCreds.tenantId,
39568
- issuer: robotCreds.issuer,
39569
- expiration: expiration2,
39570
- source: "robot" /* Robot */
39571
- };
39572
- return status;
39573
- }
39574
- return { loginStatus: "Not logged in" };
39575
- }
39576
- let credentials;
39577
- try {
39578
- credentials = await loadEnvFile({ envPath: absolutePath });
39579
- } catch (error) {
39580
- if (isFileNotFoundError(error)) {
39581
- return { loginStatus: "Not logged in" };
39582
- }
39583
- throw error;
39584
- }
39585
- if (!credentials.UIPATH_ACCESS_TOKEN) {
39586
- return { loginStatus: "Not logged in" };
39587
- }
39588
- let accessToken = credentials.UIPATH_ACCESS_TOKEN;
39589
- let refreshToken = credentials.UIPATH_REFRESH_TOKEN;
39590
- let expiration = getTokenExpiration(accessToken);
39591
- let persistenceWarning;
39592
- let lockReleaseFailed = false;
39593
- let tokenRefresh;
39594
- const outerThreshold = computeExpirationThreshold(ensureTokenValidityMinutes);
39595
- const tryGlobalCredsHint = async () => {
39596
- const fs7 = getFs();
39597
- const globalPath = fs7.path.join(fs7.env.homedir(), envFilePath);
39598
- if (absolutePath === globalPath)
39599
- return;
39600
- if (!await fs7.exists(globalPath))
39601
- return;
39602
- try {
39603
- const globalCreds = await loadEnvFile({ envPath: globalPath });
39604
- if (!globalCreds.UIPATH_ACCESS_TOKEN)
39605
- return;
39606
- const globalExp = getTokenExpiration(globalCreds.UIPATH_ACCESS_TOKEN);
39607
- if (globalExp && globalExp <= new Date)
39608
- return;
39609
- return `Local credentials file at ${absolutePath} has expired credentials. Valid credentials exist in ${globalPath}. Remove the local file or run 'uip login' to re-authenticate.`;
39610
- } catch {
39611
- return;
39612
- }
39613
- };
39614
- if (expiration && expiration <= outerThreshold && refreshToken) {
39615
- let release;
39616
- try {
39617
- release = await getFs().acquireLock(absolutePath);
39618
- } catch (error) {
39619
- const msg = errorMessage(error);
39620
- const globalHint = await tryGlobalCredsHint();
39621
- if (globalHint) {
39622
- return {
39623
- loginStatus: "Expired",
39624
- accessToken,
39625
- refreshToken,
39626
- baseUrl: credentials.UIPATH_URL,
39627
- organizationName: credentials.UIPATH_ORGANIZATION_NAME,
39628
- organizationId: credentials.UIPATH_ORGANIZATION_ID,
39629
- tenantName: credentials.UIPATH_TENANT_NAME,
39630
- tenantId: credentials.UIPATH_TENANT_ID,
39631
- expiration,
39632
- source: "file" /* File */,
39633
- hint: globalHint,
39634
- tokenRefresh: {
39635
- attempted: false,
39636
- success: false,
39637
- errorMessage: `lock acquisition failed: ${msg}`
39638
- }
39639
- };
39640
- }
39641
- return {
39642
- loginStatus: "Refresh Failed",
39643
- hint: "Could not acquire the auth-file lock — too many concurrent `uip` processes, or a permission issue on the auth directory. Retry, or run 'uip login' to re-authenticate.",
39644
- tokenRefresh: {
39645
- attempted: false,
39646
- success: false,
39647
- errorMessage: `lock acquisition failed: ${msg}`
39648
- }
39649
- };
39650
- }
39651
- let lockedFailure;
39652
- try {
39653
- const outcome = await runRefreshLocked({
39654
- absolutePath,
39655
- refreshToken,
39656
- customAuthority: credentials.UIPATH_URL,
39657
- ensureTokenValidityMinutes,
39658
- loadEnvFile,
39659
- saveEnvFile,
39660
- refreshFn: refreshTokenFn,
39661
- resolveConfig
39662
- });
39663
- if (outcome.kind === "fail") {
39664
- lockedFailure = outcome.status;
39665
- } else {
39666
- accessToken = outcome.accessToken;
39667
- refreshToken = outcome.refreshToken;
39668
- expiration = outcome.expiration;
39669
- tokenRefresh = outcome.tokenRefresh;
39670
- if (outcome.persistenceWarning) {
39671
- persistenceWarning = outcome.persistenceWarning;
39672
- }
39673
- }
39674
- } finally {
39675
- try {
39676
- await release();
39677
- } catch {
39678
- lockReleaseFailed = true;
39679
- }
39680
- }
39681
- if (lockedFailure) {
39682
- const globalHint = await tryGlobalCredsHint();
39683
- const base = globalHint ? {
39684
- ...lockedFailure,
39685
- loginStatus: "Expired",
39686
- hint: globalHint
39687
- } : lockedFailure;
39688
- return lockReleaseFailed ? { ...base, lockReleaseFailed: true } : base;
39689
- }
39690
- }
39691
- const result = {
39692
- loginStatus: expiration && expiration <= new Date ? "Expired" : "Logged in",
39693
- accessToken,
39694
- refreshToken,
39695
- baseUrl: credentials.UIPATH_URL,
39696
- organizationName: credentials.UIPATH_ORGANIZATION_NAME,
39697
- organizationId: credentials.UIPATH_ORGANIZATION_ID,
39698
- tenantName: credentials.UIPATH_TENANT_NAME,
39699
- tenantId: credentials.UIPATH_TENANT_ID,
39700
- expiration,
39701
- source: "file" /* File */,
39702
- ...persistenceWarning ? { hint: persistenceWarning, persistenceFailed: true } : {},
39703
- ...lockReleaseFailed ? { lockReleaseFailed: true } : {},
39704
- ...tokenRefresh ? { tokenRefresh } : {}
39705
- };
39706
- if (result.loginStatus === "Expired") {
39707
- const globalHint = await tryGlobalCredsHint();
39708
- if (globalHint) {
39709
- result.hint = globalHint;
39710
- }
39711
- }
39712
- return result;
39713
- };
39714
- var isFileNotFoundError = (error) => {
39715
- if (!(error instanceof Object))
39716
- return false;
39717
- return error.code === "ENOENT";
39718
- };
39719
- var getLoginStatusAsync = async (options = {}) => {
39720
- return getLoginStatusWithDeps(options);
39721
- };
39947
+ function normalizeTokenRefreshFailure() {
39948
+ return "stored refresh token is invalid or expired";
39949
+ }
39950
+ function normalizeTokenRefreshUnavailableFailure() {
39951
+ return "token refresh failed before authentication completed";
39952
+ }
39953
+ function errorMessage(error) {
39954
+ return error instanceof Error ? error.message : String(error);
39955
+ }
39722
39956
 
39723
39957
  // ../auth/src/authContext.ts
39724
39958
  var getAuthContext = async (options = {}) => {
@@ -39753,6 +39987,14 @@ var getAuthContext = async (options = {}) => {
39753
39987
  };
39754
39988
  // ../auth/src/interactive.ts
39755
39989
  init_src();
39990
+
39991
+ // ../auth/src/selectTenant.ts
39992
+ var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
39993
+ var INVALID_TENANT_CODE = "INVALID_TENANT";
39994
+ var TENANT_SELECTION_CODES = new Set([
39995
+ TENANT_SELECTION_REQUIRED_CODE,
39996
+ INVALID_TENANT_CODE
39997
+ ]);
39756
39998
  // ../auth/src/logout.ts
39757
39999
  init_src();
39758
40000
 
@@ -39979,10 +40221,12 @@ function folderOverride(folderKey) {
39979
40221
  var MANAGED_HTTP_CONNECTOR_KEY = "uipath-uipath-http";
39980
40222
  var MANAGED_HTTP_CONNECTOR_VERSION = "1.4.50";
39981
40223
  function buildActivityEssentialConfiguration(instanceParameters, methodInfo, savedFilterTrees = null, customFieldsRequestDetails = null) {
40224
+ const operation = methodInfo.operation.toLowerCase();
40225
+ const savedJitInputFieldId = computeSavedJitInputFieldId(operation, methodInfo.parameters, instanceParameters.objectName);
39982
40226
  const essentialConfiguration = {
39983
40227
  instanceParameters,
39984
40228
  objectName: instanceParameters.objectName,
39985
- operation: methodInfo.operation.toLowerCase(),
40229
+ operation,
39986
40230
  httpMethod: methodInfo.method,
39987
40231
  path: methodInfo.path,
39988
40232
  packageVersion: "1.0.0",
@@ -39992,10 +40236,21 @@ function buildActivityEssentialConfiguration(instanceParameters, methodInfo, sav
39992
40236
  unifiedTypesCompatible: true,
39993
40237
  ...savedFilterTrees !== null && Object.keys(savedFilterTrees).length > 0 && {
39994
40238
  savedFilterTrees
39995
- }
40239
+ },
40240
+ ...savedJitInputFieldId !== undefined && { savedJitInputFieldId }
39996
40241
  };
39997
40242
  return { essentialConfiguration };
39998
40243
  }
40244
+ var JIT_INPUT_OPERATIONS = new Set(["create", "update", "replace"]);
40245
+ function computeSavedJitInputFieldId(operation, parameters, objectName) {
40246
+ if (!JIT_INPUT_OPERATIONS.has(operation))
40247
+ return;
40248
+ if (typeof objectName !== "string" || objectName.length === 0)
40249
+ return;
40250
+ if (!(parameters ?? []).some((p) => p.type === "body"))
40251
+ return;
40252
+ return `in_${objectName}`;
40253
+ }
39999
40254
  function buildManagedHttpEssentialConfiguration() {
40000
40255
  const essentialConfiguration = {
40001
40256
  connectorVersion: MANAGED_HTTP_CONNECTOR_VERSION,
@@ -40432,7 +40687,7 @@ class CeqlHelper {
40432
40687
  if (fieldType.isSame(ClrTypeMock.Enum)) {
40433
40688
  value = CeqlHelper._getCeqlValueFromEnumValue(value);
40434
40689
  }
40435
- const expression = value == null ? StringExtensions.empty : value.isLiteral ? value.value : "${" + String(value.value) + "}";
40690
+ const expression = value == null ? StringExtensions.empty : value.isLiteral ? value.value : `\${${String(value.value)}}`;
40436
40691
  const valueExpression = CeqlHelper._isStringValue(fieldType) ? `'${String(expression).replace(/'/g, "''")}'` : `${expression}`;
40437
40692
  return CeqlHelper._composeSingleValueExpression(field, op, valueExpression);
40438
40693
  }
@@ -42667,3 +42922,5 @@ export {
42667
42922
  AccessTokenResponseFromJSONTyped,
42668
42923
  AccessTokenResponseFromJSON
42669
42924
  };
42925
+
42926
+ //# debugId=6A2EE5FC74326D7A64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/integrationservice-sdk",
3
3
  "license": "MIT",
4
- "version": "1.196.0",
4
+ "version": "1.197.0-preview.59",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -27,5 +27,5 @@
27
27
  "files": [
28
28
  "dist"
29
29
  ],
30
- "gitHead": "94d71f9c52214980a1f0ae62b3f5372095788553"
30
+ "gitHead": "df0e2b8140cced13f463b487214927c82bc0f85b"
31
31
  }