@uipath/uipath-typescript 1.3.5 → 1.3.7

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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/index.cjs +204 -2
  3. package/dist/assets/index.d.ts +112 -13
  4. package/dist/assets/index.mjs +204 -2
  5. package/dist/attachments/index.cjs +3 -2
  6. package/dist/attachments/index.d.ts +7 -0
  7. package/dist/attachments/index.mjs +3 -2
  8. package/dist/buckets/index.cjs +172 -2
  9. package/dist/buckets/index.d.ts +56 -12
  10. package/dist/buckets/index.mjs +172 -2
  11. package/dist/cases/index.cjs +3 -2
  12. package/dist/cases/index.d.ts +7 -0
  13. package/dist/cases/index.mjs +3 -2
  14. package/dist/conversational-agent/index.cjs +196 -81
  15. package/dist/conversational-agent/index.d.ts +326 -80
  16. package/dist/conversational-agent/index.mjs +195 -80
  17. package/dist/core/index.cjs +44 -7
  18. package/dist/core/index.d.ts +11 -1
  19. package/dist/core/index.mjs +44 -7
  20. package/dist/entities/index.cjs +35 -6
  21. package/dist/entities/index.d.ts +101 -11
  22. package/dist/entities/index.mjs +36 -7
  23. package/dist/feedback/index.cjs +40 -5
  24. package/dist/feedback/index.d.ts +59 -1
  25. package/dist/feedback/index.mjs +40 -5
  26. package/dist/index.cjs +312 -14
  27. package/dist/index.d.ts +515 -32
  28. package/dist/index.mjs +313 -15
  29. package/dist/index.umd.js +312 -14
  30. package/dist/jobs/index.cjs +172 -2
  31. package/dist/jobs/index.d.ts +67 -23
  32. package/dist/jobs/index.mjs +172 -2
  33. package/dist/maestro-processes/index.cjs +3 -2
  34. package/dist/maestro-processes/index.d.ts +7 -0
  35. package/dist/maestro-processes/index.mjs +3 -2
  36. package/dist/processes/index.cjs +240 -3
  37. package/dist/processes/index.d.ts +124 -2
  38. package/dist/processes/index.mjs +240 -3
  39. package/dist/queues/index.cjs +172 -2
  40. package/dist/queues/index.d.ts +56 -12
  41. package/dist/queues/index.mjs +172 -2
  42. package/dist/tasks/index.cjs +3 -2
  43. package/dist/tasks/index.d.ts +7 -0
  44. package/dist/tasks/index.mjs +3 -2
  45. package/package.json +1 -1
@@ -4867,6 +4867,7 @@ class TokenManager {
4867
4867
  const GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4868
4868
  class AuthService {
4869
4869
  constructor(config, executionContext) {
4870
+ this.skipAcrValues = false;
4870
4871
  // Only use stored OAuth context when completing an active callback (URL has ?code=).
4871
4872
  // If stored context exists but we're NOT in a callback, it's stale from a
4872
4873
  // failed/abandoned flow (e.g. scope mismatch, invalid redirect URI) and must
@@ -4958,6 +4959,14 @@ class AuthService {
4958
4959
  getTokenManager() {
4959
4960
  return this.tokenManager;
4960
4961
  }
4962
+ /**
4963
+ * Enables the UiPath login picker during OAuth sign-in.
4964
+ *
4965
+ * @internal
4966
+ */
4967
+ setMultiLogin() {
4968
+ this.skipAcrValues = true;
4969
+ }
4961
4970
  /**
4962
4971
  * Authenticates the user based on the provided SDK configuration.
4963
4972
  * This method handles OAuth 2.0 authentication flow only.
@@ -5159,7 +5168,10 @@ class AuthService {
5159
5168
  scope: params.scope + ' offline_access',
5160
5169
  state: params.state || this.generateCodeVerifier().slice(0, 16)
5161
5170
  });
5162
- return `${this.config.baseUrl}/${IDENTITY_ENDPOINTS.AUTHORIZE}?${queryParams.toString()}&acr_values=${acrValues}`;
5171
+ const authorizeUrl = `${this.config.baseUrl}/${IDENTITY_ENDPOINTS.AUTHORIZE}?${queryParams.toString()}`;
5172
+ return this.skipAcrValues
5173
+ ? authorizeUrl
5174
+ : `${authorizeUrl}&acr_values=${acrValues}`;
5163
5175
  }
5164
5176
  /**
5165
5177
  * Exchanges the authorization code for an access token and automatically updates the current token
@@ -5293,7 +5305,7 @@ function normalizeBaseUrl(url) {
5293
5305
  // Connection string placeholder that will be replaced during build
5294
5306
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
5295
5307
  // SDK Version placeholder
5296
- const SDK_VERSION = "1.3.5";
5308
+ const SDK_VERSION = "1.3.7";
5297
5309
  const VERSION = "Version";
5298
5310
  const SERVICE = "Service";
5299
5311
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -5640,6 +5652,8 @@ var UiPathMetaTags;
5640
5652
  // Asset resolution and routing
5641
5653
  UiPathMetaTags["CDN_BASE"] = "uipath:cdn-base";
5642
5654
  UiPathMetaTags["APP_BASE"] = "uipath:app-base";
5655
+ // Folder context (injected during coded-app deployment)
5656
+ UiPathMetaTags["FOLDER_KEY"] = "uipath:folder-key";
5643
5657
  })(UiPathMetaTags || (UiPathMetaTags = {}));
5644
5658
 
5645
5659
  /**
@@ -5668,12 +5682,13 @@ function loadFromMetaTags() {
5668
5682
  tenantName: getMetaTagContent(UiPathMetaTags.TENANT_NAME),
5669
5683
  baseUrl: getMetaTagContent(UiPathMetaTags.BASE_URL),
5670
5684
  redirectUri: getMetaTagContent(UiPathMetaTags.REDIRECT_URI),
5685
+ folderKey: getMetaTagContent(UiPathMetaTags.FOLDER_KEY),
5671
5686
  };
5672
5687
  const hasAnyValue = Object.values(config).some(Boolean);
5673
5688
  return hasAnyValue ? config : null;
5674
5689
  }
5675
5690
 
5676
- var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5691
+ var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_metaFolderKey, _UiPath_initializeWithConfig, _UiPath_loadConfig;
5677
5692
  /**
5678
5693
  * UiPath - Core SDK class for authentication and configuration management.
5679
5694
  *
@@ -5713,8 +5728,14 @@ class UiPath {
5713
5728
  _UiPath_authService.set(this, void 0);
5714
5729
  _UiPath_initialized.set(this, false);
5715
5730
  _UiPath_partialConfig.set(this, void 0);
5731
+ _UiPath_multiLogin.set(this, false);
5732
+ // Folder key sourced only from `<meta name="uipath:folder-key">` (coded-app
5733
+ // deployments). Not accepted via the public constructor; lives here so the
5734
+ // SDK can flow it through to BaseService.config without polluting BaseConfig.
5735
+ _UiPath_metaFolderKey.set(this, void 0);
5716
5736
  // Load configuration from meta tags
5717
5737
  const configFromMetaTags = loadFromMetaTags();
5738
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, configFromMetaTags?.folderKey, "f");
5718
5739
  // Merge configuration: constructor config overrides meta tags
5719
5740
  const mergedConfig = config ? { ...configFromMetaTags, ...config } : configFromMetaTags;
5720
5741
  if (mergedConfig && isCompleteConfig(mergedConfig)) {
@@ -5763,6 +5784,15 @@ class UiPath {
5763
5784
  throw new Error(`Failed to initialize UiPath SDK: ${errorMessage}`);
5764
5785
  }
5765
5786
  }
5787
+ /**
5788
+ * Enables the UiPath login picker during OAuth sign-in.
5789
+ *
5790
+ * @internal
5791
+ */
5792
+ setMultiLogin() {
5793
+ __classPrivateFieldSet(this, _UiPath_multiLogin, true, "f");
5794
+ __classPrivateFieldGet(this, _UiPath_authService, "f")?.setMultiLogin();
5795
+ }
5766
5796
  /**
5767
5797
  * Check if the SDK has been initialized
5768
5798
  */
@@ -5834,7 +5864,7 @@ class UiPath {
5834
5864
  __classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
5835
5865
  }
5836
5866
  }
5837
- _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5867
+ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_metaFolderKey = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
5838
5868
  // Validate and normalize the configuration
5839
5869
  validateConfig(config);
5840
5870
  const hasSecretAuth = hasSecretConfig(config);
@@ -5847,16 +5877,22 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5847
5877
  secret: hasSecretAuth ? config.secret : undefined,
5848
5878
  clientId: hasOAuthAuth ? config.clientId : undefined,
5849
5879
  redirectUri: hasOAuthAuth ? config.redirectUri : undefined,
5850
- scope: hasOAuthAuth ? config.scope : undefined
5880
+ scope: hasOAuthAuth ? config.scope : undefined,
5851
5881
  });
5852
5882
  const executionContext = new ExecutionContext();
5853
5883
  __classPrivateFieldSet(this, _UiPath_authService, new AuthService(internalConfig, executionContext), "f");
5884
+ if (__classPrivateFieldGet(this, _UiPath_multiLogin, "f")) {
5885
+ __classPrivateFieldGet(this, _UiPath_authService, "f").setMultiLogin();
5886
+ }
5854
5887
  __classPrivateFieldSet(this, _UiPath_config, internalConfig, "f");
5855
- // Store internals in SDKInternalsRegistry (not visible on instance)
5888
+ // Store internals in SDKInternalsRegistry (not visible on instance).
5889
+ // `folderKey` is meta-tag-only — kept off `UiPathConfig` (which mirrors
5890
+ // user-passed values) and lives here on the runtime registry instead.
5856
5891
  SDKInternalsRegistry.set(this, {
5857
5892
  config: internalConfig,
5858
5893
  context: executionContext,
5859
- tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager()
5894
+ tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager(),
5895
+ folderKey: __classPrivateFieldGet(this, _UiPath_metaFolderKey, "f"),
5860
5896
  });
5861
5897
  // Expose read-only config for user convenience
5862
5898
  this.config = {
@@ -5884,6 +5920,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
5884
5920
  }, _UiPath_loadConfig = function _UiPath_loadConfig() {
5885
5921
  // Load from meta tags
5886
5922
  const metaConfig = loadFromMetaTags();
5923
+ __classPrivateFieldSet(this, _UiPath_metaFolderKey, metaConfig?.folderKey, "f");
5887
5924
  // Merge with any partial config from constructor (constructor overrides meta tags)
5888
5925
  const merged = { ...metaConfig, ...__classPrivateFieldGet(this, _UiPath_partialConfig, "f") };
5889
5926
  if (!isCompleteConfig(merged)) {
@@ -1442,8 +1442,9 @@ class BaseService {
1442
1442
  constructor(instance, headers) {
1443
1443
  // Private field - not visible via Object.keys() or any reflection
1444
1444
  _BaseService_apiClient.set(this, void 0);
1445
- const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1445
+ const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
1446
1446
  __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1447
+ this.config = { folderKey };
1447
1448
  }
1448
1449
  /**
1449
1450
  * Gets a valid authentication token, refreshing if necessary.
@@ -1805,6 +1806,17 @@ exports.QueryFilterOperator = void 0;
1805
1806
  QueryFilterOperator["In"] = "in";
1806
1807
  QueryFilterOperator["NotIn"] = "not in";
1807
1808
  })(exports.QueryFilterOperator || (exports.QueryFilterOperator = {}));
1809
+ /**
1810
+ * Aggregate functions supported by the Data Fabric query API.
1811
+ */
1812
+ exports.EntityAggregateFunction = void 0;
1813
+ (function (EntityAggregateFunction) {
1814
+ EntityAggregateFunction["Count"] = "COUNT";
1815
+ EntityAggregateFunction["Sum"] = "SUM";
1816
+ EntityAggregateFunction["Avg"] = "AVG";
1817
+ EntityAggregateFunction["Min"] = "MIN";
1818
+ EntityAggregateFunction["Max"] = "MAX";
1819
+ })(exports.EntityAggregateFunction || (exports.EntityAggregateFunction = {}));
1808
1820
  /**
1809
1821
  * Entity type enum
1810
1822
  */
@@ -2093,7 +2105,7 @@ const EntityFieldTypeMap = {
2093
2105
  // Connection string placeholder that will be replaced during build
2094
2106
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
2095
2107
  // SDK Version placeholder
2096
- const SDK_VERSION = "1.3.5";
2108
+ const SDK_VERSION = "1.3.7";
2097
2109
  const VERSION = "Version";
2098
2110
  const SERVICE = "Service";
2099
2111
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -2712,16 +2724,16 @@ class EntityService extends BaseService {
2712
2724
  return entities;
2713
2725
  }
2714
2726
  /**
2715
- * Queries entity records with filters, sorting, and pagination
2727
+ * Queries entity records with filters, sorting, aggregates, and pagination
2716
2728
  *
2717
2729
  * @param id - UUID of the entity
2718
- * @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
2730
+ * @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
2719
2731
  * @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
2720
2732
  * or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
2721
2733
  *
2722
2734
  * @example
2723
2735
  * ```typescript
2724
- * import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
2736
+ * import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
2725
2737
  *
2726
2738
  * const entities = new Entities(sdk);
2727
2739
  *
@@ -2745,6 +2757,23 @@ class EntityService extends BaseService {
2745
2757
  * if (page1.hasNextPage) {
2746
2758
  * const page2 = await entities.queryRecordsById("<entityId>", { cursor: page1.nextCursor });
2747
2759
  * }
2760
+ *
2761
+ * // Aggregate: count of records per status
2762
+ * await entities.queryRecordsById("<entityId>", {
2763
+ * selectedFields: ["status"],
2764
+ * groupBy: ["status"],
2765
+ * aggregates: [
2766
+ * { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
2767
+ * ],
2768
+ * });
2769
+ *
2770
+ * // Aggregate: total sum and average across all records (no grouping)
2771
+ * await entities.queryRecordsById("<entityId>", {
2772
+ * aggregates: [
2773
+ * { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
2774
+ * { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
2775
+ * ],
2776
+ * });
2748
2777
  * ```
2749
2778
  */
2750
2779
  async queryRecordsById(id, options) {
@@ -2762,7 +2791,7 @@ class EntityService extends BaseService {
2762
2791
  countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
2763
2792
  }
2764
2793
  },
2765
- excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions']
2794
+ excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions', 'aggregates', 'groupBy']
2766
2795
  }, options);
2767
2796
  }
2768
2797
  /**
@@ -218,6 +218,13 @@ interface ApiResponse<T> {
218
218
  */
219
219
  declare class BaseService {
220
220
  #private;
221
+ /**
222
+ * SDK configuration (read-only). Available to subclasses so they can
223
+ * fall back to init-time defaults like `folderKey`.
224
+ */
225
+ protected readonly config: {
226
+ folderKey?: string;
227
+ };
221
228
  /**
222
229
  * Creates a base service instance with dependency injection.
223
230
  *
@@ -473,7 +480,31 @@ interface EntityQuerySortOption {
473
480
  isDescending?: boolean;
474
481
  }
475
482
  /**
476
- * Options for querying entity records with filters, sorting, and pagination.
483
+ * Aggregate functions supported by the Data Fabric query API.
484
+ */
485
+ declare enum EntityAggregateFunction {
486
+ Count = "COUNT",
487
+ Sum = "SUM",
488
+ Avg = "AVG",
489
+ Min = "MIN",
490
+ Max = "MAX"
491
+ }
492
+ /**
493
+ * A single aggregate expression to apply during a query.
494
+ *
495
+ * Aggregate results are returned as fields on each item in the response,
496
+ * keyed by `alias` when provided.
497
+ */
498
+ interface EntityAggregate {
499
+ /** Aggregate function to apply */
500
+ function: EntityAggregateFunction;
501
+ /** Field to aggregate on. For `COUNT`, any non-null field works (typically `Id`). */
502
+ field: string;
503
+ /** Optional alias for the aggregate result column. */
504
+ alias?: string;
505
+ }
506
+ /**
507
+ * Options for querying entity records with filters, sorting, aggregates, and pagination.
477
508
  *
478
509
  * Use `pageSize`, `cursor`, or `jumpToPage` for SDK-managed pagination.
479
510
  * The SDK computes and manages offset parameters automatically.
@@ -487,6 +518,10 @@ type EntityQueryRecordsOptions = {
487
518
  sortOptions?: EntityQuerySortOption[];
488
519
  /** Level of entity expansion for related fields (default: 0) */
489
520
  expansionLevel?: number;
521
+ /** Aggregate expressions (COUNT, SUM, AVG, MIN, MAX) to apply across the result set. */
522
+ aggregates?: EntityAggregate[];
523
+ /** Field names to group aggregate results by. */
524
+ groupBy?: string[];
490
525
  } & PaginationOptions;
491
526
  /**
492
527
  * Response from querying entity records
@@ -1166,15 +1201,15 @@ interface EntityServiceModel {
1166
1201
  */
1167
1202
  deleteRecordById(entityId: string, recordId: string): Promise<void>;
1168
1203
  /**
1169
- * Queries entity records with filters, sorting, and SDK-managed pagination
1204
+ * Queries entity records with filters, sorting, aggregates, and SDK-managed pagination
1170
1205
  *
1171
1206
  * @param id - UUID of the entity
1172
- * @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
1207
+ * @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
1173
1208
  * @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
1174
1209
  * or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
1175
1210
  * @example
1176
1211
  * ```typescript
1177
- * import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
1212
+ * import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
1178
1213
  *
1179
1214
  * const entities = new Entities(sdk);
1180
1215
  *
@@ -1193,6 +1228,23 @@ interface EntityServiceModel {
1193
1228
  * if (page1.hasNextPage) {
1194
1229
  * const page2 = await entities.queryRecordsById(<id>, { cursor: page1.nextCursor });
1195
1230
  * }
1231
+ *
1232
+ * // Aggregate: count of records per status
1233
+ * await entities.queryRecordsById(<id>, {
1234
+ * selectedFields: ["status"],
1235
+ * groupBy: ["status"],
1236
+ * aggregates: [
1237
+ * { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
1238
+ * ],
1239
+ * });
1240
+ *
1241
+ * // Aggregate: total sum and average across all records (no grouping)
1242
+ * await entities.queryRecordsById(<id>, {
1243
+ * aggregates: [
1244
+ * { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
1245
+ * { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
1246
+ * ],
1247
+ * });
1196
1248
  * ```
1197
1249
  */
1198
1250
  queryRecordsById<T extends EntityQueryRecordsOptions = EntityQueryRecordsOptions>(id: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
@@ -1542,13 +1594,17 @@ interface EntityMethods {
1542
1594
  */
1543
1595
  batchInsert(data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
1544
1596
  /**
1545
- * Queries records in this entity with filters, sorting, and SDK-managed pagination
1597
+ * Queries records in this entity with filters, sorting, aggregates, and SDK-managed pagination
1546
1598
  *
1547
- * @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
1599
+ * @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
1548
1600
  * @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
1549
1601
  * or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
1550
1602
  * @example
1551
1603
  * ```typescript
1604
+ * import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
1605
+ *
1606
+ * const entities = new Entities(sdk);
1607
+ *
1552
1608
  * const entity = await entities.getById(<entityId>);
1553
1609
  * const result = await entity.queryRecords({
1554
1610
  * filterGroup: {
@@ -1558,6 +1614,23 @@ interface EntityMethods {
1558
1614
  * sortOptions: [{ fieldName: "createdTime", isDescending: true }],
1559
1615
  * });
1560
1616
  * console.log(`Found ${result.totalCount} records`);
1617
+ *
1618
+ * // Aggregate: count of records per status
1619
+ * await entity.queryRecords({
1620
+ * selectedFields: ["status"],
1621
+ * groupBy: ["status"],
1622
+ * aggregates: [
1623
+ * { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
1624
+ * ],
1625
+ * });
1626
+ *
1627
+ * // Aggregate: total sum and average across all records (no grouping)
1628
+ * await entity.queryRecords({
1629
+ * aggregates: [
1630
+ * { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
1631
+ * { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
1632
+ * ],
1633
+ * });
1561
1634
  * ```
1562
1635
  */
1563
1636
  queryRecords<T extends EntityQueryRecordsOptions = EntityQueryRecordsOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
@@ -1890,16 +1963,16 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1890
1963
  */
1891
1964
  getAll(): Promise<EntityGetResponse[]>;
1892
1965
  /**
1893
- * Queries entity records with filters, sorting, and pagination
1966
+ * Queries entity records with filters, sorting, aggregates, and pagination
1894
1967
  *
1895
1968
  * @param id - UUID of the entity
1896
- * @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
1969
+ * @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
1897
1970
  * @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
1898
1971
  * or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
1899
1972
  *
1900
1973
  * @example
1901
1974
  * ```typescript
1902
- * import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
1975
+ * import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
1903
1976
  *
1904
1977
  * const entities = new Entities(sdk);
1905
1978
  *
@@ -1923,6 +1996,23 @@ declare class EntityService extends BaseService implements EntityServiceModel {
1923
1996
  * if (page1.hasNextPage) {
1924
1997
  * const page2 = await entities.queryRecordsById("<entityId>", { cursor: page1.nextCursor });
1925
1998
  * }
1999
+ *
2000
+ * // Aggregate: count of records per status
2001
+ * await entities.queryRecordsById("<entityId>", {
2002
+ * selectedFields: ["status"],
2003
+ * groupBy: ["status"],
2004
+ * aggregates: [
2005
+ * { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
2006
+ * ],
2007
+ * });
2008
+ *
2009
+ * // Aggregate: total sum and average across all records (no grouping)
2010
+ * await entities.queryRecordsById("<entityId>", {
2011
+ * aggregates: [
2012
+ * { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
2013
+ * { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
2014
+ * ],
2015
+ * });
1926
2016
  * ```
1927
2017
  */
1928
2018
  queryRecordsById<T extends EntityQueryRecordsOptions = EntityQueryRecordsOptions>(id: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
@@ -2407,5 +2497,5 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
2407
2497
  getById<T extends ChoiceSetGetByIdOptions = ChoiceSetGetByIdOptions>(choiceSetId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<ChoiceSetGetResponse> : NonPaginatedResponse<ChoiceSetGetResponse>>;
2408
2498
  }
2409
2499
 
2410
- export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
2411
- export type { ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityCreateFieldOptions, EntityCreateOptions, EntityDeleteAttachmentResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityFieldBase, EntityFieldUpdateOptions, EntityFileType, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityImportRecordsResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityQueryFilter, EntityQueryFilterGroup, EntityQueryRecordsOptions, EntityQueryRecordsResponse, EntityQuerySortOption, EntityRecord, EntityRemoveFieldOptions, EntityServiceModel, EntityUpdateByIdOptions, EntityUpdateOptions, EntityUpdateRecordOptions, EntityUpdateRecordResponse, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria, SqlType };
2500
+ export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityAggregateFunction, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
2501
+ export type { ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, EntityAggregate, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityCreateFieldOptions, EntityCreateOptions, EntityDeleteAttachmentResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityFieldBase, EntityFieldUpdateOptions, EntityFileType, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityImportRecordsResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityQueryFilter, EntityQueryFilterGroup, EntityQueryRecordsOptions, EntityQueryRecordsResponse, EntityQuerySortOption, EntityRecord, EntityRemoveFieldOptions, EntityServiceModel, EntityUpdateByIdOptions, EntityUpdateOptions, EntityUpdateRecordOptions, EntityUpdateRecordResponse, EntityUpdateRecordsOptions, EntityUpdateResponse, EntityUploadAttachmentOptions, EntityUploadAttachmentResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, RawEntityGetResponse, SourceJoinCriteria, SqlType };
@@ -1440,8 +1440,9 @@ class BaseService {
1440
1440
  constructor(instance, headers) {
1441
1441
  // Private field - not visible via Object.keys() or any reflection
1442
1442
  _BaseService_apiClient.set(this, void 0);
1443
- const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1443
+ const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
1444
1444
  __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1445
+ this.config = { folderKey };
1445
1446
  }
1446
1447
  /**
1447
1448
  * Gets a valid authentication token, refreshing if necessary.
@@ -1803,6 +1804,17 @@ var QueryFilterOperator;
1803
1804
  QueryFilterOperator["In"] = "in";
1804
1805
  QueryFilterOperator["NotIn"] = "not in";
1805
1806
  })(QueryFilterOperator || (QueryFilterOperator = {}));
1807
+ /**
1808
+ * Aggregate functions supported by the Data Fabric query API.
1809
+ */
1810
+ var EntityAggregateFunction;
1811
+ (function (EntityAggregateFunction) {
1812
+ EntityAggregateFunction["Count"] = "COUNT";
1813
+ EntityAggregateFunction["Sum"] = "SUM";
1814
+ EntityAggregateFunction["Avg"] = "AVG";
1815
+ EntityAggregateFunction["Min"] = "MIN";
1816
+ EntityAggregateFunction["Max"] = "MAX";
1817
+ })(EntityAggregateFunction || (EntityAggregateFunction = {}));
1806
1818
  /**
1807
1819
  * Entity type enum
1808
1820
  */
@@ -2091,7 +2103,7 @@ const EntityFieldTypeMap = {
2091
2103
  // Connection string placeholder that will be replaced during build
2092
2104
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
2093
2105
  // SDK Version placeholder
2094
- const SDK_VERSION = "1.3.5";
2106
+ const SDK_VERSION = "1.3.7";
2095
2107
  const VERSION = "Version";
2096
2108
  const SERVICE = "Service";
2097
2109
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -2710,16 +2722,16 @@ class EntityService extends BaseService {
2710
2722
  return entities;
2711
2723
  }
2712
2724
  /**
2713
- * Queries entity records with filters, sorting, and pagination
2725
+ * Queries entity records with filters, sorting, aggregates, and pagination
2714
2726
  *
2715
2727
  * @param id - UUID of the entity
2716
- * @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
2728
+ * @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
2717
2729
  * @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
2718
2730
  * or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
2719
2731
  *
2720
2732
  * @example
2721
2733
  * ```typescript
2722
- * import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
2734
+ * import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
2723
2735
  *
2724
2736
  * const entities = new Entities(sdk);
2725
2737
  *
@@ -2743,6 +2755,23 @@ class EntityService extends BaseService {
2743
2755
  * if (page1.hasNextPage) {
2744
2756
  * const page2 = await entities.queryRecordsById("<entityId>", { cursor: page1.nextCursor });
2745
2757
  * }
2758
+ *
2759
+ * // Aggregate: count of records per status
2760
+ * await entities.queryRecordsById("<entityId>", {
2761
+ * selectedFields: ["status"],
2762
+ * groupBy: ["status"],
2763
+ * aggregates: [
2764
+ * { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
2765
+ * ],
2766
+ * });
2767
+ *
2768
+ * // Aggregate: total sum and average across all records (no grouping)
2769
+ * await entities.queryRecordsById("<entityId>", {
2770
+ * aggregates: [
2771
+ * { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
2772
+ * { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
2773
+ * ],
2774
+ * });
2746
2775
  * ```
2747
2776
  */
2748
2777
  async queryRecordsById(id, options) {
@@ -2760,7 +2789,7 @@ class EntityService extends BaseService {
2760
2789
  countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
2761
2790
  }
2762
2791
  },
2763
- excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions']
2792
+ excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions', 'aggregates', 'groupBy']
2764
2793
  }, options);
2765
2794
  }
2766
2795
  /**
@@ -3503,4 +3532,4 @@ __decorate([
3503
3532
  track('Choicesets.GetById')
3504
3533
  ], ChoiceSetService.prototype, "getById", null);
3505
3534
 
3506
- export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
3535
+ export { ChoiceSetService, ChoiceSetService as ChoiceSets, DataDirectionType, EntityService as Entities, EntityAggregateFunction, EntityFieldDataType, EntityService, EntityType, FieldDisplayType, JoinType, LogicalOperator, QueryFilterOperator, ReferenceType, createEntityWithMethods };
@@ -505,6 +505,7 @@ class ErrorFactory {
505
505
  }
506
506
  }
507
507
 
508
+ const FOLDER_KEY = 'X-UIPATH-FolderKey';
508
509
  const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
509
510
  const TRACEPARENT = 'traceparent';
510
511
  const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
@@ -1341,8 +1342,9 @@ class BaseService {
1341
1342
  constructor(instance, headers) {
1342
1343
  // Private field - not visible via Object.keys() or any reflection
1343
1344
  _BaseService_apiClient.set(this, void 0);
1344
- const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1345
+ const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
1345
1346
  __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1347
+ this.config = { folderKey };
1346
1348
  }
1347
1349
  /**
1348
1350
  * Gets a valid authentication token, refreshing if necessary.
@@ -1557,6 +1559,7 @@ const LLMOPS_BASE = 'llmopstenant_';
1557
1559
  */
1558
1560
  const FEEDBACK_ENDPOINTS = {
1559
1561
  GET_ALL: `${LLMOPS_BASE}/api/Feedback`,
1562
+ GET_BY_ID: (id) => `${LLMOPS_BASE}/api/Feedback/${id}`,
1560
1563
  };
1561
1564
 
1562
1565
  /**
@@ -1565,7 +1568,7 @@ const FEEDBACK_ENDPOINTS = {
1565
1568
  // Connection string placeholder that will be replaced during build
1566
1569
  const CONNECTION_STRING = "InstrumentationKey=a6efa11d-1feb-4508-9738-e13e12dcae5e;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=7c58eb1c-9581-4ba6-839e-11725848a037";
1567
1570
  // SDK Version placeholder
1568
- const SDK_VERSION = "1.3.5";
1571
+ const SDK_VERSION = "1.3.7";
1569
1572
  const VERSION = "Version";
1570
1573
  const SERVICE = "Service";
1571
1574
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1791,8 +1794,9 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
1791
1794
  // Track the event if enabled
1792
1795
  if (shouldTrack) {
1793
1796
  // Use the full name provided in the decorator (e.g., "Queue.GetAll")
1794
- const serviceMethod = nameOrOptions
1795
- ;
1797
+ const serviceMethod = typeof nameOrOptions === 'string'
1798
+ ? nameOrOptions
1799
+ : fallbackName;
1796
1800
  // Use 'Sdk.Run' as the name and serviceMethod as the service
1797
1801
  telemetryClient.track(serviceMethod, SDK_RUN_EVENT, opts.attributes);
1798
1802
  }
@@ -1821,7 +1825,7 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
1821
1825
  */
1822
1826
  function track(nameOrOptions, options) {
1823
1827
  return function decorator(_target, propertyKey, descriptor) {
1824
- const opts = {};
1828
+ const opts = typeof nameOrOptions === 'object' ? nameOrOptions : {};
1825
1829
  if (descriptor && typeof descriptor.value === 'function') {
1826
1830
  // Method decorator
1827
1831
  descriptor.value = createTrackedFunction(descriptor.value, nameOrOptions, propertyKey || 'unknown_method', opts);
@@ -1890,10 +1894,41 @@ class FeedbackService extends BaseService {
1890
1894
  excludeFromPrefix: Object.keys(options || {}),
1891
1895
  }, options);
1892
1896
  }
1897
+ /**
1898
+ * Gets a single feedback entry by its feedback ID.
1899
+ *
1900
+ * @param id - Feedback ID (GUID) of the feedback entry
1901
+ * @param options - Required options including folderKey for folder-level authorization {@link FeedbackOptions}
1902
+ * @returns Promise resolving to {@link FeedbackGetResponse}
1903
+ * @example
1904
+ * ```typescript
1905
+ * import { Feedback } from '@uipath/uipath-typescript/feedback';
1906
+ *
1907
+ * const feedback = new Feedback(sdk);
1908
+ *
1909
+ * // First, get feedback entries to obtain the ID and folder key
1910
+ * const allFeedback = await feedback.getAll({ pageSize: 10 });
1911
+ * const feedbackId = allFeedback.items[0].id;
1912
+ * const folderKey = allFeedback.items[0].folderKey;
1913
+ * const item = await feedback.getById(feedbackId, { folderKey });
1914
+ * console.log(item.isPositive, item.comment, item.status);
1915
+ * ```
1916
+ */
1917
+ async getById(id, options) {
1918
+ if (!id)
1919
+ throw new ValidationError({ message: 'Feedback ID is required for getById' });
1920
+ if (!options?.folderKey)
1921
+ throw new ValidationError({ message: 'folderKey is required for getById' });
1922
+ const response = await this.get(FEEDBACK_ENDPOINTS.GET_BY_ID(id), { headers: createHeaders({ [FOLDER_KEY]: options?.folderKey }) });
1923
+ return transformData(response.data, FeedbackMap);
1924
+ }
1893
1925
  }
1894
1926
  __decorate([
1895
1927
  track('Feedback.GetAll')
1896
1928
  ], FeedbackService.prototype, "getAll", null);
1929
+ __decorate([
1930
+ track('Feedback.GetById')
1931
+ ], FeedbackService.prototype, "getById", null);
1897
1932
 
1898
1933
  /**
1899
1934
  * Status of a feedback entry in the review workflow