@uipath/uipath-typescript 1.3.0 → 1.3.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 (41) hide show
  1. package/dist/assets/index.cjs +5 -8
  2. package/dist/assets/index.d.ts +3 -1
  3. package/dist/assets/index.mjs +5 -8
  4. package/dist/attachments/index.cjs +5 -8
  5. package/dist/attachments/index.d.ts +3 -1
  6. package/dist/attachments/index.mjs +5 -8
  7. package/dist/buckets/index.cjs +5 -8
  8. package/dist/buckets/index.d.ts +3 -1
  9. package/dist/buckets/index.mjs +5 -8
  10. package/dist/cases/index.cjs +5 -8
  11. package/dist/cases/index.d.ts +3 -1
  12. package/dist/cases/index.mjs +5 -8
  13. package/dist/conversational-agent/index.cjs +38 -16
  14. package/dist/conversational-agent/index.d.ts +26 -4
  15. package/dist/conversational-agent/index.mjs +38 -16
  16. package/dist/core/index.cjs +2 -2
  17. package/dist/core/index.d.ts +2 -2
  18. package/dist/core/index.mjs +2 -2
  19. package/dist/entities/index.cjs +680 -284
  20. package/dist/entities/index.d.ts +559 -45
  21. package/dist/entities/index.mjs +681 -285
  22. package/dist/index.cjs +515 -86
  23. package/dist/index.d.ts +604 -52
  24. package/dist/index.mjs +516 -87
  25. package/dist/index.umd.js +515 -86
  26. package/dist/jobs/index.cjs +57 -27
  27. package/dist/jobs/index.d.ts +70 -11
  28. package/dist/jobs/index.mjs +57 -27
  29. package/dist/maestro-processes/index.cjs +5 -8
  30. package/dist/maestro-processes/index.d.ts +3 -1
  31. package/dist/maestro-processes/index.mjs +5 -8
  32. package/dist/processes/index.cjs +5 -8
  33. package/dist/processes/index.d.ts +3 -1
  34. package/dist/processes/index.mjs +5 -8
  35. package/dist/queues/index.cjs +5 -8
  36. package/dist/queues/index.d.ts +3 -1
  37. package/dist/queues/index.mjs +5 -8
  38. package/dist/tasks/index.cjs +5 -8
  39. package/dist/tasks/index.d.ts +3 -1
  40. package/dist/tasks/index.mjs +5 -8
  41. package/package.json +1 -1
@@ -524,15 +524,11 @@ const RESPONSE_TYPES = {
524
524
 
525
525
  class ApiClient {
526
526
  constructor(config, executionContext, tokenManager, clientConfig = {}) {
527
- this.defaultHeaders = {};
528
527
  this.config = config;
529
528
  this.executionContext = executionContext;
530
529
  this.clientConfig = clientConfig;
531
530
  this.tokenManager = tokenManager;
532
531
  }
533
- setDefaultHeaders(headers) {
534
- this.defaultHeaders = { ...this.defaultHeaders, ...headers };
535
- }
536
532
  /**
537
533
  * Gets a valid authentication token, refreshing if necessary.
538
534
  * Used internally for API requests and exposed for services that need manual auth headers.
@@ -548,7 +544,6 @@ class ApiClient {
548
544
  return {
549
545
  'Authorization': `Bearer ${token}`,
550
546
  'Content-Type': CONTENT_TYPES.JSON,
551
- ...this.defaultHeaders,
552
547
  ...this.clientConfig.headers
553
548
  };
554
549
  }
@@ -1451,6 +1446,8 @@ class BaseService {
1451
1446
  *
1452
1447
  * @param instance - UiPath SDK instance providing authentication and configuration.
1453
1448
  * Services receive this via dependency injection in the modular pattern.
1449
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
1450
+ * CAS external-app auth)
1454
1451
  *
1455
1452
  * @example
1456
1453
  * ```typescript
@@ -1470,11 +1467,11 @@ class BaseService {
1470
1467
  * const entities = new Entities(sdk);
1471
1468
  * ```
1472
1469
  */
1473
- constructor(instance) {
1470
+ constructor(instance, headers) {
1474
1471
  // Private field - not visible via Object.keys() or any reflection
1475
1472
  _BaseService_apiClient.set(this, void 0);
1476
1473
  const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1477
- __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager), "f");
1474
+ __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1478
1475
  }
1479
1476
  /**
1480
1477
  * Gets a valid authentication token, refreshing if necessary.
@@ -1710,7 +1707,7 @@ const PROCESS_ENDPOINTS = {
1710
1707
  // Connection string placeholder that will be replaced during build
1711
1708
  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";
1712
1709
  // SDK Version placeholder
1713
- const SDK_VERSION = "1.3.0";
1710
+ const SDK_VERSION = "1.3.1";
1714
1711
  const VERSION = "Version";
1715
1712
  const SERVICE = "Service";
1716
1713
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -526,15 +526,11 @@ const RESPONSE_TYPES = {
526
526
 
527
527
  class ApiClient {
528
528
  constructor(config, executionContext, tokenManager, clientConfig = {}) {
529
- this.defaultHeaders = {};
530
529
  this.config = config;
531
530
  this.executionContext = executionContext;
532
531
  this.clientConfig = clientConfig;
533
532
  this.tokenManager = tokenManager;
534
533
  }
535
- setDefaultHeaders(headers) {
536
- this.defaultHeaders = { ...this.defaultHeaders, ...headers };
537
- }
538
534
  /**
539
535
  * Gets a valid authentication token, refreshing if necessary.
540
536
  * Used internally for API requests and exposed for services that need manual auth headers.
@@ -550,7 +546,6 @@ class ApiClient {
550
546
  return {
551
547
  'Authorization': `Bearer ${token}`,
552
548
  'Content-Type': CONTENT_TYPES.JSON,
553
- ...this.defaultHeaders,
554
549
  ...this.clientConfig.headers
555
550
  };
556
551
  }
@@ -1390,6 +1385,8 @@ class BaseService {
1390
1385
  *
1391
1386
  * @param instance - UiPath SDK instance providing authentication and configuration.
1392
1387
  * Services receive this via dependency injection in the modular pattern.
1388
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
1389
+ * CAS external-app auth)
1393
1390
  *
1394
1391
  * @example
1395
1392
  * ```typescript
@@ -1409,11 +1406,11 @@ class BaseService {
1409
1406
  * const entities = new Entities(sdk);
1410
1407
  * ```
1411
1408
  */
1412
- constructor(instance) {
1409
+ constructor(instance, headers) {
1413
1410
  // Private field - not visible via Object.keys() or any reflection
1414
1411
  _BaseService_apiClient.set(this, void 0);
1415
1412
  const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1416
- __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager), "f");
1413
+ __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1417
1414
  }
1418
1415
  /**
1419
1416
  * Gets a valid authentication token, refreshing if necessary.
@@ -1676,7 +1673,7 @@ const QueueMap = {
1676
1673
  // Connection string placeholder that will be replaced during build
1677
1674
  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";
1678
1675
  // SDK Version placeholder
1679
- const SDK_VERSION = "1.3.0";
1676
+ const SDK_VERSION = "1.3.1";
1680
1677
  const VERSION = "Version";
1681
1678
  const SERVICE = "Service";
1682
1679
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -227,6 +227,8 @@ declare class BaseService {
227
227
  *
228
228
  * @param instance - UiPath SDK instance providing authentication and configuration.
229
229
  * Services receive this via dependency injection in the modular pattern.
230
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
231
+ * CAS external-app auth)
230
232
  *
231
233
  * @example
232
234
  * ```typescript
@@ -246,7 +248,7 @@ declare class BaseService {
246
248
  * const entities = new Entities(sdk);
247
249
  * ```
248
250
  */
249
- constructor(instance: IUiPath);
251
+ constructor(instance: IUiPath, headers?: Record<string, string>);
250
252
  /**
251
253
  * Gets a valid authentication token, refreshing if necessary.
252
254
  * Use this when you need to manually add Authorization headers (e.g., direct uploads).
@@ -524,15 +524,11 @@ const RESPONSE_TYPES = {
524
524
 
525
525
  class ApiClient {
526
526
  constructor(config, executionContext, tokenManager, clientConfig = {}) {
527
- this.defaultHeaders = {};
528
527
  this.config = config;
529
528
  this.executionContext = executionContext;
530
529
  this.clientConfig = clientConfig;
531
530
  this.tokenManager = tokenManager;
532
531
  }
533
- setDefaultHeaders(headers) {
534
- this.defaultHeaders = { ...this.defaultHeaders, ...headers };
535
- }
536
532
  /**
537
533
  * Gets a valid authentication token, refreshing if necessary.
538
534
  * Used internally for API requests and exposed for services that need manual auth headers.
@@ -548,7 +544,6 @@ class ApiClient {
548
544
  return {
549
545
  'Authorization': `Bearer ${token}`,
550
546
  'Content-Type': CONTENT_TYPES.JSON,
551
- ...this.defaultHeaders,
552
547
  ...this.clientConfig.headers
553
548
  };
554
549
  }
@@ -1388,6 +1383,8 @@ class BaseService {
1388
1383
  *
1389
1384
  * @param instance - UiPath SDK instance providing authentication and configuration.
1390
1385
  * Services receive this via dependency injection in the modular pattern.
1386
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
1387
+ * CAS external-app auth)
1391
1388
  *
1392
1389
  * @example
1393
1390
  * ```typescript
@@ -1407,11 +1404,11 @@ class BaseService {
1407
1404
  * const entities = new Entities(sdk);
1408
1405
  * ```
1409
1406
  */
1410
- constructor(instance) {
1407
+ constructor(instance, headers) {
1411
1408
  // Private field - not visible via Object.keys() or any reflection
1412
1409
  _BaseService_apiClient.set(this, void 0);
1413
1410
  const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1414
- __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager), "f");
1411
+ __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1415
1412
  }
1416
1413
  /**
1417
1414
  * Gets a valid authentication token, refreshing if necessary.
@@ -1674,7 +1671,7 @@ const QueueMap = {
1674
1671
  // Connection string placeholder that will be replaced during build
1675
1672
  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";
1676
1673
  // SDK Version placeholder
1677
- const SDK_VERSION = "1.3.0";
1674
+ const SDK_VERSION = "1.3.1";
1678
1675
  const VERSION = "Version";
1679
1676
  const SERVICE = "Service";
1680
1677
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -278,7 +278,7 @@ class NetworkError extends UiPathError {
278
278
  // Connection string placeholder that will be replaced during build
279
279
  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";
280
280
  // SDK Version placeholder
281
- const SDK_VERSION = "1.3.0";
281
+ const SDK_VERSION = "1.3.1";
282
282
  const VERSION = "Version";
283
283
  const SERVICE = "Service";
284
284
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1718,15 +1718,11 @@ class ErrorFactory {
1718
1718
 
1719
1719
  class ApiClient {
1720
1720
  constructor(config, executionContext, tokenManager, clientConfig = {}) {
1721
- this.defaultHeaders = {};
1722
1721
  this.config = config;
1723
1722
  this.executionContext = executionContext;
1724
1723
  this.clientConfig = clientConfig;
1725
1724
  this.tokenManager = tokenManager;
1726
1725
  }
1727
- setDefaultHeaders(headers) {
1728
- this.defaultHeaders = { ...this.defaultHeaders, ...headers };
1729
- }
1730
1726
  /**
1731
1727
  * Gets a valid authentication token, refreshing if necessary.
1732
1728
  * Used internally for API requests and exposed for services that need manual auth headers.
@@ -1742,7 +1738,6 @@ class ApiClient {
1742
1738
  return {
1743
1739
  'Authorization': `Bearer ${token}`,
1744
1740
  'Content-Type': CONTENT_TYPES.JSON,
1745
- ...this.defaultHeaders,
1746
1741
  ...this.clientConfig.headers
1747
1742
  };
1748
1743
  }
@@ -1980,6 +1975,8 @@ class BaseService {
1980
1975
  *
1981
1976
  * @param instance - UiPath SDK instance providing authentication and configuration.
1982
1977
  * Services receive this via dependency injection in the modular pattern.
1978
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
1979
+ * CAS external-app auth)
1983
1980
  *
1984
1981
  * @example
1985
1982
  * ```typescript
@@ -1999,11 +1996,11 @@ class BaseService {
1999
1996
  * const entities = new Entities(sdk);
2000
1997
  * ```
2001
1998
  */
2002
- constructor(instance) {
1999
+ constructor(instance, headers) {
2003
2000
  // Private field - not visible via Object.keys() or any reflection
2004
2001
  _BaseService_apiClient.set(this, void 0);
2005
2002
  const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
2006
- __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager), "f");
2003
+ __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
2007
2004
  }
2008
2005
  /**
2009
2006
  * Gets a valid authentication token, refreshing if necessary.
@@ -810,6 +810,8 @@ declare class BaseService {
810
810
  *
811
811
  * @param instance - UiPath SDK instance providing authentication and configuration.
812
812
  * Services receive this via dependency injection in the modular pattern.
813
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
814
+ * CAS external-app auth)
813
815
  *
814
816
  * @example
815
817
  * ```typescript
@@ -829,7 +831,7 @@ declare class BaseService {
829
831
  * const entities = new Entities(sdk);
830
832
  * ```
831
833
  */
832
- constructor(instance: IUiPath);
834
+ constructor(instance: IUiPath, headers?: Record<string, string>);
833
835
  /**
834
836
  * Gets a valid authentication token, refreshing if necessary.
835
837
  * Use this when you need to manually add Authorization headers (e.g., direct uploads).
@@ -276,7 +276,7 @@ class NetworkError extends UiPathError {
276
276
  // Connection string placeholder that will be replaced during build
277
277
  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";
278
278
  // SDK Version placeholder
279
- const SDK_VERSION = "1.3.0";
279
+ const SDK_VERSION = "1.3.1";
280
280
  const VERSION = "Version";
281
281
  const SERVICE = "Service";
282
282
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1716,15 +1716,11 @@ class ErrorFactory {
1716
1716
 
1717
1717
  class ApiClient {
1718
1718
  constructor(config, executionContext, tokenManager, clientConfig = {}) {
1719
- this.defaultHeaders = {};
1720
1719
  this.config = config;
1721
1720
  this.executionContext = executionContext;
1722
1721
  this.clientConfig = clientConfig;
1723
1722
  this.tokenManager = tokenManager;
1724
1723
  }
1725
- setDefaultHeaders(headers) {
1726
- this.defaultHeaders = { ...this.defaultHeaders, ...headers };
1727
- }
1728
1724
  /**
1729
1725
  * Gets a valid authentication token, refreshing if necessary.
1730
1726
  * Used internally for API requests and exposed for services that need manual auth headers.
@@ -1740,7 +1736,6 @@ class ApiClient {
1740
1736
  return {
1741
1737
  'Authorization': `Bearer ${token}`,
1742
1738
  'Content-Type': CONTENT_TYPES.JSON,
1743
- ...this.defaultHeaders,
1744
1739
  ...this.clientConfig.headers
1745
1740
  };
1746
1741
  }
@@ -1978,6 +1973,8 @@ class BaseService {
1978
1973
  *
1979
1974
  * @param instance - UiPath SDK instance providing authentication and configuration.
1980
1975
  * Services receive this via dependency injection in the modular pattern.
1976
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
1977
+ * CAS external-app auth)
1981
1978
  *
1982
1979
  * @example
1983
1980
  * ```typescript
@@ -1997,11 +1994,11 @@ class BaseService {
1997
1994
  * const entities = new Entities(sdk);
1998
1995
  * ```
1999
1996
  */
2000
- constructor(instance) {
1997
+ constructor(instance, headers) {
2001
1998
  // Private field - not visible via Object.keys() or any reflection
2002
1999
  _BaseService_apiClient.set(this, void 0);
2003
2000
  const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
2004
- __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager), "f");
2001
+ __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
2005
2002
  }
2006
2003
  /**
2007
2004
  * Gets a valid authentication token, refreshing if necessary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/uipath-typescript",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "UiPath TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "keywords": [