@uipath/uipath-typescript 1.3.11 → 1.4.1

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 (59) hide show
  1. package/dist/agent-memory/index.cjs +1772 -0
  2. package/dist/agent-memory/index.d.ts +588 -0
  3. package/dist/agent-memory/index.mjs +1770 -0
  4. package/dist/agents/index.cjs +1995 -0
  5. package/dist/agents/index.d.ts +961 -0
  6. package/dist/agents/index.mjs +1993 -0
  7. package/dist/assets/index.cjs +171 -39
  8. package/dist/assets/index.d.ts +84 -5
  9. package/dist/assets/index.mjs +171 -39
  10. package/dist/attachments/index.cjs +53 -15
  11. package/dist/attachments/index.d.ts +1 -0
  12. package/dist/attachments/index.mjs +53 -15
  13. package/dist/buckets/index.cjs +151 -130
  14. package/dist/buckets/index.d.ts +198 -84
  15. package/dist/buckets/index.mjs +151 -130
  16. package/dist/cases/index.cjs +220 -23
  17. package/dist/cases/index.d.ts +148 -10
  18. package/dist/cases/index.mjs +220 -24
  19. package/dist/conversational-agent/index.cjs +140 -66
  20. package/dist/conversational-agent/index.d.ts +190 -122
  21. package/dist/conversational-agent/index.mjs +140 -66
  22. package/dist/core/index.cjs +445 -108
  23. package/dist/core/index.d.ts +15 -0
  24. package/dist/core/index.mjs +445 -108
  25. package/dist/entities/index.cjs +365 -102
  26. package/dist/entities/index.d.ts +446 -114
  27. package/dist/entities/index.mjs +365 -102
  28. package/dist/feedback/index.cjs +53 -15
  29. package/dist/feedback/index.d.ts +1 -0
  30. package/dist/feedback/index.mjs +53 -15
  31. package/dist/governance/index.cjs +1789 -0
  32. package/dist/governance/index.d.ts +598 -0
  33. package/dist/governance/index.mjs +1787 -0
  34. package/dist/index.cjs +1453 -444
  35. package/dist/index.d.ts +4150 -1742
  36. package/dist/index.mjs +1452 -445
  37. package/dist/index.umd.js +5035 -4009
  38. package/dist/jobs/index.cjs +53 -15
  39. package/dist/jobs/index.d.ts +1 -0
  40. package/dist/jobs/index.mjs +53 -15
  41. package/dist/maestro-processes/index.cjs +189 -27
  42. package/dist/maestro-processes/index.d.ts +131 -9
  43. package/dist/maestro-processes/index.mjs +189 -27
  44. package/dist/orchestrator-du-module/index.cjs +1788 -0
  45. package/dist/orchestrator-du-module/index.d.ts +757 -0
  46. package/dist/orchestrator-du-module/index.mjs +1785 -0
  47. package/dist/processes/index.cjs +53 -15
  48. package/dist/processes/index.d.ts +1 -0
  49. package/dist/processes/index.mjs +53 -15
  50. package/dist/queues/index.cjs +53 -15
  51. package/dist/queues/index.d.ts +1 -0
  52. package/dist/queues/index.mjs +53 -15
  53. package/dist/tasks/index.cjs +116 -19
  54. package/dist/tasks/index.d.ts +110 -4
  55. package/dist/tasks/index.mjs +117 -20
  56. package/dist/traces/index.cjs +340 -15
  57. package/dist/traces/index.d.ts +483 -2
  58. package/dist/traces/index.mjs +339 -16
  59. package/package.json +42 -2
@@ -721,6 +721,32 @@ function filterUndefined(obj) {
721
721
  */
722
722
  const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
723
723
  isBrowser && window.self != window.top && window.location.href.includes('source=ActionCenter');
724
+ const _params = isBrowser ? new URLSearchParams(window.location.search) : null;
725
+ /**
726
+ * True when the coded app has been loaded inside a host frame that explicitly
727
+ * opted into token delegation by adding `?host=embed` to the iframe src URL.
728
+ */
729
+ const isHostEmbedded = isBrowser && window.self !== window.top && _params?.get('host') === 'embed';
730
+ /**
731
+ * The validated parent origin, read from the `?basedomain=` query param set
732
+ * by the embedding host in the iframe src URL.
733
+ * Mirrors the same mechanism used by ActionCenterTokenManager.
734
+ * Non-null only when `?host=embed` is present and `?basedomain=` is a valid URL.
735
+ */
736
+ (() => {
737
+ if (!isHostEmbedded)
738
+ return null;
739
+ const basedomain = _params?.get('basedomain');
740
+ if (!basedomain)
741
+ return null;
742
+ try {
743
+ return new URL(basedomain).origin;
744
+ }
745
+ catch {
746
+ console.warn('embeddingOrigin: basedomain query param is not a valid URL', basedomain);
747
+ return null;
748
+ }
749
+ })();
724
750
 
725
751
  /**
726
752
  * Base64 encoding/decoding
@@ -1232,12 +1258,18 @@ class PaginationHelpers {
1232
1258
  * @returns Promise resolving to a paginated result
1233
1259
  */
1234
1260
  static async getAllPaginated(params) {
1235
- const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1261
+ const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1236
1262
  const endpoint = getEndpoint(folderId);
1237
1263
  const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
1264
+ // On POST, the caller's options go in the body; queryParams stays in the URL.
1265
+ // On GET, everything is URL — queryParams merges with additionalParams.
1266
+ const isPost = method === HTTP_METHODS.POST;
1267
+ const requestSpec = isPost
1268
+ ? { body: additionalParams, params: queryParams }
1269
+ : { params: { ...additionalParams, ...queryParams } };
1238
1270
  const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
1239
1271
  headers,
1240
- params: additionalParams,
1272
+ ...requestSpec,
1241
1273
  pagination: {
1242
1274
  paginationType: options.paginationType || PaginationType.OFFSET,
1243
1275
  itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
@@ -1262,7 +1294,7 @@ class PaginationHelpers {
1262
1294
  * @returns Promise resolving to an object with data and totalCount
1263
1295
  */
1264
1296
  static async getAllNonPaginated(params) {
1265
- const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1297
+ const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1266
1298
  // Set default field names
1267
1299
  const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
1268
1300
  const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
@@ -1272,17 +1304,18 @@ class PaginationHelpers {
1272
1304
  // Make the API call based on method
1273
1305
  let response;
1274
1306
  if (method === HTTP_METHODS.POST) {
1275
- response = await serviceAccess.post(endpoint, additionalParams, { headers });
1307
+ response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
1276
1308
  }
1277
1309
  else {
1278
1310
  response = await serviceAccess.get(endpoint, {
1279
- params: additionalParams,
1311
+ params: { ...additionalParams, ...queryParams },
1280
1312
  headers
1281
1313
  });
1282
1314
  }
1283
1315
  // Extract and transform items from response
1284
- // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1285
- const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1316
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N }).
1317
+ // itemsField may be a dotted path (e.g. 'data.agents') for nested envelopes.
1318
+ const rawItems = Array.isArray(response.data) ? response.data : resolveNestedField(response.data, itemsField);
1286
1319
  const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1287
1320
  const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1288
1321
  // Parse items - automatically handle JSON string responses
@@ -1328,8 +1361,9 @@ class PaginationHelpers {
1328
1361
  getEndpoint: config.getEndpoint,
1329
1362
  folderId,
1330
1363
  headers: config.headers,
1331
- paginationParams: cursor ? { cursor, pageSize } : jumpToPage ? { jumpToPage, pageSize } : { pageSize },
1364
+ paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
1332
1365
  additionalParams: prefixedOptions,
1366
+ queryParams: config.queryParams,
1333
1367
  transformFn: config.transformFn,
1334
1368
  method: config.method,
1335
1369
  options: {
@@ -1347,6 +1381,7 @@ class PaginationHelpers {
1347
1381
  folderId,
1348
1382
  headers: config.headers,
1349
1383
  additionalParams: prefixedOptions,
1384
+ queryParams: config.queryParams,
1350
1385
  transformFn: config.transformFn,
1351
1386
  method: config.method,
1352
1387
  options: {
@@ -1538,18 +1573,17 @@ class BaseService {
1538
1573
  const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
1539
1574
  // Prepare request parameters based on pagination type
1540
1575
  const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
1541
- // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
1576
+ // Route pagination state to wherever the API expects it (body for POST, URL for GET).
1577
+ // Caller-supplied options.body / options.params are respected as-is — the api-client
1578
+ // already handles params (URL) and body (request body) independently for every method.
1542
1579
  if (method.toUpperCase() === 'POST') {
1543
1580
  const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
1544
1581
  options.body = {
1545
1582
  ...existingBody,
1546
- ...options.params,
1547
1583
  ...requestParams
1548
1584
  };
1549
- options.params = undefined;
1550
1585
  }
1551
1586
  else {
1552
- // Merge pagination parameters with existing parameters
1553
1587
  options.params = {
1554
1588
  ...options.params,
1555
1589
  ...requestParams
@@ -1586,6 +1620,8 @@ class BaseService {
1586
1620
  // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1587
1621
  // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1588
1622
  const convertToSkip = paginationParams?.convertToSkip ?? true;
1623
+ // When true, sends pageNumber - 1 (for 0-based APIs). Default false (1-based).
1624
+ const zeroBased = paginationParams?.zeroBased ?? false;
1589
1625
  requestParams[pageSizeParam] = limitedPageSize;
1590
1626
  if (convertToSkip) {
1591
1627
  if (params.pageNumber && params.pageNumber > 1) {
@@ -1593,7 +1629,8 @@ class BaseService {
1593
1629
  }
1594
1630
  }
1595
1631
  else {
1596
- requestParams[offsetParam] = params.pageNumber || 1;
1632
+ const sdkPageNumber = params.pageNumber || 1;
1633
+ requestParams[offsetParam] = zeroBased ? sdkPageNumber - 1 : sdkPageNumber;
1597
1634
  }
1598
1635
  {
1599
1636
  requestParams[countParam] = true;
@@ -1622,8 +1659,9 @@ class BaseService {
1622
1659
  const totalCountField = fields.totalCountField || 'totalRecordCount';
1623
1660
  const continuationTokenField = fields.continuationTokenField || 'continuationToken';
1624
1661
  // Extract items and metadata
1625
- // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1626
- const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1662
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N }).
1663
+ // itemsField may be a dotted path (e.g. 'data.agents') for nested envelopes.
1664
+ const items = Array.isArray(response.data) ? response.data : (resolveNestedField(response.data, itemsField) || []);
1627
1665
  const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1628
1666
  const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1629
1667
  const continuationToken = response.data[continuationTokenField];
@@ -1872,6 +1910,26 @@ function describeFolderForError(folderId, folderKey, folderPath) {
1872
1910
  return '';
1873
1911
  }
1874
1912
 
1913
+ /**
1914
+ * Enum for Asset Value Scope
1915
+ */
1916
+ exports.AssetValueScope = void 0;
1917
+ (function (AssetValueScope) {
1918
+ AssetValueScope["Global"] = "Global";
1919
+ AssetValueScope["PerRobot"] = "PerRobot";
1920
+ })(exports.AssetValueScope || (exports.AssetValueScope = {}));
1921
+ /**
1922
+ * Enum for Asset Value Type
1923
+ */
1924
+ exports.AssetValueType = void 0;
1925
+ (function (AssetValueType) {
1926
+ AssetValueType["Text"] = "Text";
1927
+ AssetValueType["Bool"] = "Bool";
1928
+ AssetValueType["Integer"] = "Integer";
1929
+ AssetValueType["Credential"] = "Credential";
1930
+ AssetValueType["Secret"] = "Secret";
1931
+ })(exports.AssetValueType || (exports.AssetValueType = {}));
1932
+
1875
1933
  /**
1876
1934
  * Base path constants for different services
1877
1935
  */
@@ -2042,6 +2100,68 @@ class AssetService extends FolderScopedService {
2042
2100
  async getByName(name, options = {}) {
2043
2101
  return this.getByNameLookup('Asset', ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap));
2044
2102
  }
2103
+ /**
2104
+ * Updates the value of an existing asset by ID.
2105
+ *
2106
+ * Fetches the asset internally to determine its type, then updates only the value while
2107
+ * preserving the asset's name, scope, and description.
2108
+ *
2109
+ * **Supported value types:** `Text`, `Integer`, and `Bool` only. Other types
2110
+ * (`Credential`, `Secret`) throw a `ValidationError`.
2111
+ *
2112
+ * The `newValue` runtime type must match the asset's `valueType`:
2113
+ * - `Text` → `string`
2114
+ * - `Integer` → `number` (integer)
2115
+ * - `Bool` → `boolean`
2116
+ *
2117
+ * @param id - Asset ID
2118
+ * @param newValue - New value to apply (string for `Text`, number for `Integer`, boolean for `Bool`)
2119
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
2120
+ * @returns Promise resolving when the asset has been updated
2121
+ *
2122
+ * @example
2123
+ * ```typescript
2124
+ * import { Assets } from '@uipath/uipath-typescript/assets';
2125
+ *
2126
+ * const assets = new Assets(sdk);
2127
+ *
2128
+ * // Update a Text asset by folder ID
2129
+ * await assets.updateValueById(<assetId>, 'new-value', { folderId: <folderId> });
2130
+ *
2131
+ * // Update an Integer asset by folder key (GUID)
2132
+ * await assets.updateValueById(<assetId>, 42, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
2133
+ *
2134
+ * // Update a Bool asset by folder path
2135
+ * await assets.updateValueById(<assetId>, true, { folderPath: 'Shared/Finance' });
2136
+ * ```
2137
+ */
2138
+ async updateValueById(id, newValue, options) {
2139
+ if (!id) {
2140
+ throw new ValidationError({ message: 'id is required for updateValueById' });
2141
+ }
2142
+ if (newValue === null || newValue === undefined) {
2143
+ throw new ValidationError({ message: 'newValue is required for updateValueById' });
2144
+ }
2145
+ const headers = resolveFolderHeaders({
2146
+ folderId: options?.folderId,
2147
+ folderKey: options?.folderKey,
2148
+ folderPath: options?.folderPath,
2149
+ resourceType: 'Assets.updateValueById',
2150
+ fallbackFolderKey: this.config.folderKey,
2151
+ });
2152
+ const existingResponse = await this.get(ASSET_ENDPOINTS.GET_BY_ID(id), { headers });
2153
+ const existing = existingResponse.data;
2154
+ const valueField = resolveValueField(id, existing.ValueType, newValue);
2155
+ const body = {
2156
+ Id: id,
2157
+ Name: existing.Name,
2158
+ ValueScope: existing.ValueScope,
2159
+ ValueType: existing.ValueType,
2160
+ Description: existing.Description,
2161
+ [valueField]: newValue,
2162
+ };
2163
+ await this.put(ASSET_ENDPOINTS.GET_BY_ID(id), body, { headers });
2164
+ }
2045
2165
  }
2046
2166
  __decorate([
2047
2167
  track('Assets.GetAll')
@@ -2052,30 +2172,42 @@ __decorate([
2052
2172
  __decorate([
2053
2173
  track('Assets.GetByName')
2054
2174
  ], AssetService.prototype, "getByName", null);
2055
-
2056
- /**
2057
- * Enum for Asset Value Scope
2058
- */
2059
- exports.AssetValueScope = void 0;
2060
- (function (AssetValueScope) {
2061
- AssetValueScope["Global"] = "Global";
2062
- AssetValueScope["PerRobot"] = "PerRobot";
2063
- })(exports.AssetValueScope || (exports.AssetValueScope = {}));
2064
- /**
2065
- * Enum for Asset Value Type
2066
- */
2067
- exports.AssetValueType = void 0;
2068
- (function (AssetValueType) {
2069
- AssetValueType["DBConnectionString"] = "DBConnectionString";
2070
- AssetValueType["HttpConnectionString"] = "HttpConnectionString";
2071
- AssetValueType["Text"] = "Text";
2072
- AssetValueType["Bool"] = "Bool";
2073
- AssetValueType["Integer"] = "Integer";
2074
- AssetValueType["Credential"] = "Credential";
2075
- AssetValueType["WindowsCredential"] = "WindowsCredential";
2076
- AssetValueType["KeyValueList"] = "KeyValueList";
2077
- AssetValueType["Secret"] = "Secret";
2078
- })(exports.AssetValueType || (exports.AssetValueType = {}));
2175
+ __decorate([
2176
+ track('Assets.UpdateValueById')
2177
+ ], AssetService.prototype, "updateValueById", null);
2178
+ /**
2179
+ * Maps the asset's `valueType` to the PUT body field carrying the new value, validating
2180
+ * that the new value's runtime type matches the asset type.
2181
+ */
2182
+ function resolveValueField(id, valueType, newValue) {
2183
+ switch (valueType) {
2184
+ case exports.AssetValueType.Text:
2185
+ if (typeof newValue !== 'string') {
2186
+ throw new ValidationError({
2187
+ message: `Asset ${id} has valueType Text; newValue must be a string, got ${typeof newValue}`,
2188
+ });
2189
+ }
2190
+ return 'StringValue';
2191
+ case exports.AssetValueType.Integer:
2192
+ if (typeof newValue !== 'number' || !Number.isInteger(newValue)) {
2193
+ throw new ValidationError({
2194
+ message: `Asset ${id} has valueType Integer; newValue must be an integer number, got ${typeof newValue}`,
2195
+ });
2196
+ }
2197
+ return 'IntValue';
2198
+ case exports.AssetValueType.Bool:
2199
+ if (typeof newValue !== 'boolean') {
2200
+ throw new ValidationError({
2201
+ message: `Asset ${id} has valueType Bool; newValue must be a boolean, got ${typeof newValue}`,
2202
+ });
2203
+ }
2204
+ return 'BoolValue';
2205
+ default:
2206
+ throw new ValidationError({
2207
+ message: `updateValueById only supports Text, Integer, or Bool assets; asset ${id} has valueType ${valueType}`,
2208
+ });
2209
+ }
2210
+ }
2079
2211
 
2080
2212
  exports.AssetService = AssetService;
2081
2213
  exports.Assets = AssetService;
@@ -107,6 +107,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
107
107
  tokenParam?: string;
108
108
  countParam?: string;
109
109
  convertToSkip?: boolean;
110
+ zeroBased?: boolean;
110
111
  };
111
112
  };
112
113
  }
@@ -382,14 +383,10 @@ declare enum AssetValueScope {
382
383
  * Enum for Asset Value Type
383
384
  */
384
385
  declare enum AssetValueType {
385
- DBConnectionString = "DBConnectionString",
386
- HttpConnectionString = "HttpConnectionString",
387
386
  Text = "Text",
388
387
  Bool = "Bool",
389
388
  Integer = "Integer",
390
389
  Credential = "Credential",
391
- WindowsCredential = "WindowsCredential",
392
- KeyValueList = "KeyValueList",
393
390
  Secret = "Secret"
394
391
  }
395
392
  /**
@@ -439,6 +436,20 @@ interface AssetGetByIdOptions extends BaseOptions {
439
436
  */
440
437
  interface AssetGetByNameOptions extends FolderScopedOptions {
441
438
  }
439
+ /**
440
+ * New value accepted by {@link AssetServiceModel.updateValueById}.
441
+ *
442
+ * The runtime type must match the asset's `valueType`:
443
+ * - `Text` → `string`
444
+ * - `Integer` → `number`
445
+ * - `Bool` → `boolean`
446
+ */
447
+ type AssetNewValue = string | number | boolean;
448
+ /**
449
+ * Options for updating an asset value by ID
450
+ */
451
+ interface AssetUpdateValueByIdOptions extends FolderScopedOptions {
452
+ }
442
453
 
443
454
  /**
444
455
  * Service for managing UiPath Assets.
@@ -523,6 +534,38 @@ interface AssetServiceModel {
523
534
  * ```
524
535
  */
525
536
  getByName(name: string, options?: AssetGetByNameOptions): Promise<AssetGetResponse>;
537
+ /**
538
+ * Updates the value of an existing asset by ID.
539
+ *
540
+ * Fetches the asset internally to determine its type, then updates only the value while
541
+ * preserving the asset's name, scope, and description.
542
+ *
543
+ * **Supported value types:** `Text`, `Integer`, and `Bool` only. Other types
544
+ * (`Credential`, `Secret`) throw a `ValidationError`.
545
+ *
546
+ * The `newValue` runtime type must match the asset's `valueType`:
547
+ * - `Text` → `string`
548
+ * - `Integer` → `number` (integer)
549
+ * - `Bool` → `boolean`
550
+ *
551
+ * @param id - Asset ID
552
+ * @param newValue - New value to apply (string for `Text`, number for `Integer`, boolean for `Bool`)
553
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
554
+ * @returns Promise resolving when the asset has been updated
555
+ *
556
+ * @example
557
+ * ```typescript
558
+ * // Update a Text asset by folder ID
559
+ * await assets.updateValueById(<assetId>, 'new-value', { folderId: <folderId> });
560
+ *
561
+ * // Update an Integer asset by folder key (GUID)
562
+ * await assets.updateValueById(<assetId>, 42, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
563
+ *
564
+ * // Update a Bool asset by folder path
565
+ * await assets.updateValueById(<assetId>, true, { folderPath: 'Shared/Finance' });
566
+ * ```
567
+ */
568
+ updateValueById(id: number, newValue: AssetNewValue, options?: AssetUpdateValueByIdOptions): Promise<void>;
526
569
  }
527
570
 
528
571
  /**
@@ -610,7 +653,43 @@ declare class AssetService extends FolderScopedService implements AssetServiceMo
610
653
  * ```
611
654
  */
612
655
  getByName(name: string, options?: AssetGetByNameOptions): Promise<AssetGetResponse>;
656
+ /**
657
+ * Updates the value of an existing asset by ID.
658
+ *
659
+ * Fetches the asset internally to determine its type, then updates only the value while
660
+ * preserving the asset's name, scope, and description.
661
+ *
662
+ * **Supported value types:** `Text`, `Integer`, and `Bool` only. Other types
663
+ * (`Credential`, `Secret`) throw a `ValidationError`.
664
+ *
665
+ * The `newValue` runtime type must match the asset's `valueType`:
666
+ * - `Text` → `string`
667
+ * - `Integer` → `number` (integer)
668
+ * - `Bool` → `boolean`
669
+ *
670
+ * @param id - Asset ID
671
+ * @param newValue - New value to apply (string for `Text`, number for `Integer`, boolean for `Bool`)
672
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
673
+ * @returns Promise resolving when the asset has been updated
674
+ *
675
+ * @example
676
+ * ```typescript
677
+ * import { Assets } from '@uipath/uipath-typescript/assets';
678
+ *
679
+ * const assets = new Assets(sdk);
680
+ *
681
+ * // Update a Text asset by folder ID
682
+ * await assets.updateValueById(<assetId>, 'new-value', { folderId: <folderId> });
683
+ *
684
+ * // Update an Integer asset by folder key (GUID)
685
+ * await assets.updateValueById(<assetId>, 42, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
686
+ *
687
+ * // Update a Bool asset by folder path
688
+ * await assets.updateValueById(<assetId>, true, { folderPath: 'Shared/Finance' });
689
+ * ```
690
+ */
691
+ updateValueById(id: number, newValue: AssetNewValue, options?: AssetUpdateValueByIdOptions): Promise<void>;
613
692
  }
614
693
 
615
694
  export { AssetService, AssetValueScope, AssetValueType, AssetService as Assets };
616
- export type { AssetGetAllOptions, AssetGetByIdOptions, AssetGetByNameOptions, AssetGetResponse, AssetServiceModel, CustomKeyValuePair };
695
+ export type { AssetGetAllOptions, AssetGetByIdOptions, AssetGetByNameOptions, AssetGetResponse, AssetNewValue, AssetServiceModel, AssetUpdateValueByIdOptions, CustomKeyValuePair };