@uipath/uipath-typescript 1.3.6 → 1.3.8
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.
- package/dist/assets/index.cjs +243 -6
- package/dist/assets/index.d.ts +113 -13
- package/dist/assets/index.mjs +243 -6
- package/dist/attachments/index.cjs +42 -6
- package/dist/attachments/index.d.ts +8 -0
- package/dist/attachments/index.mjs +42 -6
- package/dist/buckets/index.cjs +211 -6
- package/dist/buckets/index.d.ts +57 -12
- package/dist/buckets/index.mjs +211 -6
- package/dist/cases/index.cjs +180 -6
- package/dist/cases/index.d.ts +165 -3
- package/dist/cases/index.mjs +181 -7
- package/dist/conversational-agent/index.cjs +235 -85
- package/dist/conversational-agent/index.d.ts +327 -80
- package/dist/conversational-agent/index.mjs +234 -84
- package/dist/core/index.cjs +18 -6
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +18 -6
- package/dist/entities/index.cjs +74 -10
- package/dist/entities/index.d.ts +102 -11
- package/dist/entities/index.mjs +75 -11
- package/dist/feedback/index.cjs +293 -10
- package/dist/feedback/index.d.ts +425 -12
- package/dist/feedback/index.mjs +293 -10
- package/dist/index.cjs +463 -17
- package/dist/index.d.ts +885 -39
- package/dist/index.mjs +464 -18
- package/dist/index.umd.js +463 -17
- package/dist/jobs/index.cjs +211 -6
- package/dist/jobs/index.d.ts +68 -23
- package/dist/jobs/index.mjs +211 -6
- package/dist/maestro-processes/index.cjs +79 -6
- package/dist/maestro-processes/index.d.ts +8 -0
- package/dist/maestro-processes/index.mjs +79 -6
- package/dist/processes/index.cjs +279 -7
- package/dist/processes/index.d.ts +125 -2
- package/dist/processes/index.mjs +279 -7
- package/dist/queues/index.cjs +211 -6
- package/dist/queues/index.d.ts +57 -12
- package/dist/queues/index.mjs +211 -6
- package/dist/tasks/index.cjs +42 -6
- package/dist/tasks/index.d.ts +8 -0
- package/dist/tasks/index.mjs +42 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4480,6 +4480,7 @@ const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
|
4480
4480
|
const PIMS_BASE = 'pims_';
|
|
4481
4481
|
const DATAFABRIC_BASE = 'datafabric_';
|
|
4482
4482
|
const IDENTITY_BASE = 'identity_';
|
|
4483
|
+
const INSIGHTS_RTM_BASE = 'insightsrtm_';
|
|
4483
4484
|
|
|
4484
4485
|
/**
|
|
4485
4486
|
* Orchestrator Service Endpoints
|
|
@@ -4586,6 +4587,10 @@ const MAESTRO_ENDPOINTS = {
|
|
|
4586
4587
|
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
4587
4588
|
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
4588
4589
|
},
|
|
4590
|
+
INSIGHTS: {
|
|
4591
|
+
/** SLA summary for case instances */
|
|
4592
|
+
SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
|
|
4593
|
+
},
|
|
4589
4594
|
};
|
|
4590
4595
|
|
|
4591
4596
|
/**
|
|
@@ -5464,7 +5469,7 @@ function normalizeBaseUrl(url) {
|
|
|
5464
5469
|
// Connection string placeholder that will be replaced during build
|
|
5465
5470
|
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";
|
|
5466
5471
|
// SDK Version placeholder
|
|
5467
|
-
const SDK_VERSION = "1.3.
|
|
5472
|
+
const SDK_VERSION = "1.3.8";
|
|
5468
5473
|
const VERSION = "Version";
|
|
5469
5474
|
const SERVICE = "Service";
|
|
5470
5475
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -5811,6 +5816,8 @@ exports.UiPathMetaTags = void 0;
|
|
|
5811
5816
|
// Asset resolution and routing
|
|
5812
5817
|
UiPathMetaTags["CDN_BASE"] = "uipath:cdn-base";
|
|
5813
5818
|
UiPathMetaTags["APP_BASE"] = "uipath:app-base";
|
|
5819
|
+
// Folder context (injected during coded-app deployment)
|
|
5820
|
+
UiPathMetaTags["FOLDER_KEY"] = "uipath:folder-key";
|
|
5814
5821
|
})(exports.UiPathMetaTags || (exports.UiPathMetaTags = {}));
|
|
5815
5822
|
|
|
5816
5823
|
/**
|
|
@@ -5839,12 +5846,13 @@ function loadFromMetaTags() {
|
|
|
5839
5846
|
tenantName: getMetaTagContent(exports.UiPathMetaTags.TENANT_NAME),
|
|
5840
5847
|
baseUrl: getMetaTagContent(exports.UiPathMetaTags.BASE_URL),
|
|
5841
5848
|
redirectUri: getMetaTagContent(exports.UiPathMetaTags.REDIRECT_URI),
|
|
5849
|
+
folderKey: getMetaTagContent(exports.UiPathMetaTags.FOLDER_KEY),
|
|
5842
5850
|
};
|
|
5843
5851
|
const hasAnyValue = Object.values(config).some(Boolean);
|
|
5844
5852
|
return hasAnyValue ? config : null;
|
|
5845
5853
|
}
|
|
5846
5854
|
|
|
5847
|
-
var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_initializeWithConfig, _UiPath_loadConfig;
|
|
5855
|
+
var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_metaFolderKey, _UiPath_initializeWithConfig, _UiPath_loadConfig;
|
|
5848
5856
|
/**
|
|
5849
5857
|
* UiPath - Core SDK class for authentication and configuration management.
|
|
5850
5858
|
*
|
|
@@ -5885,8 +5893,13 @@ let UiPath$1 = class UiPath {
|
|
|
5885
5893
|
_UiPath_initialized.set(this, false);
|
|
5886
5894
|
_UiPath_partialConfig.set(this, void 0);
|
|
5887
5895
|
_UiPath_multiLogin.set(this, false);
|
|
5896
|
+
// Folder key sourced only from `<meta name="uipath:folder-key">` (coded-app
|
|
5897
|
+
// deployments). Not accepted via the public constructor; lives here so the
|
|
5898
|
+
// SDK can flow it through to BaseService.config without polluting BaseConfig.
|
|
5899
|
+
_UiPath_metaFolderKey.set(this, void 0);
|
|
5888
5900
|
// Load configuration from meta tags
|
|
5889
5901
|
const configFromMetaTags = loadFromMetaTags();
|
|
5902
|
+
__classPrivateFieldSet(this, _UiPath_metaFolderKey, configFromMetaTags?.folderKey, "f");
|
|
5890
5903
|
// Merge configuration: constructor config overrides meta tags
|
|
5891
5904
|
const mergedConfig = config ? { ...configFromMetaTags, ...config } : configFromMetaTags;
|
|
5892
5905
|
if (mergedConfig && isCompleteConfig(mergedConfig)) {
|
|
@@ -6015,7 +6028,7 @@ let UiPath$1 = class UiPath {
|
|
|
6015
6028
|
__classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
|
|
6016
6029
|
}
|
|
6017
6030
|
};
|
|
6018
|
-
_UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_multiLogin = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
|
|
6031
|
+
_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) {
|
|
6019
6032
|
// Validate and normalize the configuration
|
|
6020
6033
|
validateConfig(config);
|
|
6021
6034
|
const hasSecretAuth = hasSecretConfig(config);
|
|
@@ -6028,7 +6041,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
|
|
|
6028
6041
|
secret: hasSecretAuth ? config.secret : undefined,
|
|
6029
6042
|
clientId: hasOAuthAuth ? config.clientId : undefined,
|
|
6030
6043
|
redirectUri: hasOAuthAuth ? config.redirectUri : undefined,
|
|
6031
|
-
scope: hasOAuthAuth ? config.scope : undefined
|
|
6044
|
+
scope: hasOAuthAuth ? config.scope : undefined,
|
|
6032
6045
|
});
|
|
6033
6046
|
const executionContext = new ExecutionContext();
|
|
6034
6047
|
__classPrivateFieldSet(this, _UiPath_authService, new AuthService(internalConfig, executionContext), "f");
|
|
@@ -6036,11 +6049,14 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
|
|
|
6036
6049
|
__classPrivateFieldGet(this, _UiPath_authService, "f").setMultiLogin();
|
|
6037
6050
|
}
|
|
6038
6051
|
__classPrivateFieldSet(this, _UiPath_config, internalConfig, "f");
|
|
6039
|
-
// Store internals in SDKInternalsRegistry (not visible on instance)
|
|
6052
|
+
// Store internals in SDKInternalsRegistry (not visible on instance).
|
|
6053
|
+
// `folderKey` is meta-tag-only — kept off `UiPathConfig` (which mirrors
|
|
6054
|
+
// user-passed values) and lives here on the runtime registry instead.
|
|
6040
6055
|
SDKInternalsRegistry.set(this, {
|
|
6041
6056
|
config: internalConfig,
|
|
6042
6057
|
context: executionContext,
|
|
6043
|
-
tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager()
|
|
6058
|
+
tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager(),
|
|
6059
|
+
folderKey: __classPrivateFieldGet(this, _UiPath_metaFolderKey, "f"),
|
|
6044
6060
|
});
|
|
6045
6061
|
// Expose read-only config for user convenience
|
|
6046
6062
|
this.config = {
|
|
@@ -6068,6 +6084,7 @@ _UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_ini
|
|
|
6068
6084
|
}, _UiPath_loadConfig = function _UiPath_loadConfig() {
|
|
6069
6085
|
// Load from meta tags
|
|
6070
6086
|
const metaConfig = loadFromMetaTags();
|
|
6087
|
+
__classPrivateFieldSet(this, _UiPath_metaFolderKey, metaConfig?.folderKey, "f");
|
|
6071
6088
|
// Merge with any partial config from constructor (constructor overrides meta tags)
|
|
6072
6089
|
const merged = { ...metaConfig, ...__classPrivateFieldGet(this, _UiPath_partialConfig, "f") };
|
|
6073
6090
|
if (!isCompleteConfig(merged)) {
|
|
@@ -6311,6 +6328,7 @@ class ErrorFactory {
|
|
|
6311
6328
|
}
|
|
6312
6329
|
|
|
6313
6330
|
const FOLDER_KEY = 'X-UIPATH-FolderKey';
|
|
6331
|
+
const FOLDER_PATH_ENCODED = 'X-UIPATH-FolderPath-Encoded';
|
|
6314
6332
|
const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
|
|
6315
6333
|
const TRACEPARENT = 'traceparent';
|
|
6316
6334
|
const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
|
|
@@ -6457,6 +6475,27 @@ var PaginationType;
|
|
|
6457
6475
|
/**
|
|
6458
6476
|
* Collection of utility functions for working with objects
|
|
6459
6477
|
*/
|
|
6478
|
+
/**
|
|
6479
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
6480
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
6481
|
+
* Direct key match takes priority over nested traversal.
|
|
6482
|
+
*/
|
|
6483
|
+
function resolveNestedField(data, fieldPath) {
|
|
6484
|
+
if (!data) {
|
|
6485
|
+
return undefined;
|
|
6486
|
+
}
|
|
6487
|
+
if (fieldPath in data) {
|
|
6488
|
+
return data[fieldPath];
|
|
6489
|
+
}
|
|
6490
|
+
if (!fieldPath.includes('.')) {
|
|
6491
|
+
return undefined;
|
|
6492
|
+
}
|
|
6493
|
+
let value = data;
|
|
6494
|
+
for (const part of fieldPath.split('.')) {
|
|
6495
|
+
value = value?.[part];
|
|
6496
|
+
}
|
|
6497
|
+
return value;
|
|
6498
|
+
}
|
|
6460
6499
|
/**
|
|
6461
6500
|
* Filters out undefined values from an object
|
|
6462
6501
|
* @param obj The source object
|
|
@@ -6716,6 +6755,26 @@ const BUCKET_PAGINATION = {
|
|
|
6716
6755
|
/** Field name for continuation token in bucket file metadata response */
|
|
6717
6756
|
CONTINUATION_TOKEN_FIELD: 'continuationToken'
|
|
6718
6757
|
};
|
|
6758
|
+
/**
|
|
6759
|
+
* SLA Summary pagination constants for page-number-based pagination
|
|
6760
|
+
*/
|
|
6761
|
+
const SLA_SUMMARY_PAGINATION = {
|
|
6762
|
+
/** Field name for items in SLA summary response */
|
|
6763
|
+
ITEMS_FIELD: 'data',
|
|
6764
|
+
/** Dot-notation path for total count in nested pagination object */
|
|
6765
|
+
TOTAL_COUNT_FIELD: 'pagination.totalCount'
|
|
6766
|
+
};
|
|
6767
|
+
/**
|
|
6768
|
+
* SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
|
|
6769
|
+
*/
|
|
6770
|
+
const SLA_SUMMARY_OFFSET_PARAMS = {
|
|
6771
|
+
/** Page size parameter name */
|
|
6772
|
+
PAGE_SIZE_PARAM: 'PageSize',
|
|
6773
|
+
/** Page number parameter name (sent directly, not converted to skip) */
|
|
6774
|
+
OFFSET_PARAM: 'PageNumber',
|
|
6775
|
+
/** No count param needed */
|
|
6776
|
+
COUNT_PARAM: undefined
|
|
6777
|
+
};
|
|
6719
6778
|
/**
|
|
6720
6779
|
* Process Instance pagination constants for token-based pagination
|
|
6721
6780
|
*/
|
|
@@ -6766,6 +6825,14 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
|
|
|
6766
6825
|
TOKEN_PARAM: 'nextPage'
|
|
6767
6826
|
};
|
|
6768
6827
|
|
|
6828
|
+
/**
|
|
6829
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
6830
|
+
* Returns the original value if parsing fails.
|
|
6831
|
+
*/
|
|
6832
|
+
function toISOUtc(value) {
|
|
6833
|
+
const date = new Date(value + ' UTC');
|
|
6834
|
+
return isNaN(date.getTime()) ? value : date.toISOString();
|
|
6835
|
+
}
|
|
6769
6836
|
/**
|
|
6770
6837
|
* Transforms data by mapping fields according to the provided field mapping
|
|
6771
6838
|
* @param data The source data to transform
|
|
@@ -7322,7 +7389,8 @@ class PaginationHelpers {
|
|
|
7322
7389
|
// Extract and transform items from response
|
|
7323
7390
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
7324
7391
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
7325
|
-
const
|
|
7392
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
7393
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
7326
7394
|
// Parse items - automatically handle JSON string responses
|
|
7327
7395
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
7328
7396
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -7443,8 +7511,9 @@ class BaseService {
|
|
|
7443
7511
|
constructor(instance, headers) {
|
|
7444
7512
|
// Private field - not visible via Object.keys() or any reflection
|
|
7445
7513
|
_BaseService_apiClient.set(this, void 0);
|
|
7446
|
-
const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
|
|
7514
|
+
const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
|
|
7447
7515
|
__classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
|
|
7516
|
+
this.config = { folderKey };
|
|
7448
7517
|
}
|
|
7449
7518
|
/**
|
|
7450
7519
|
* Gets a valid authentication token, refreshing if necessary.
|
|
@@ -7563,9 +7632,17 @@ class BaseService {
|
|
|
7563
7632
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
7564
7633
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
7565
7634
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
7635
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
7636
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
7637
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
7566
7638
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
7567
|
-
if (
|
|
7568
|
-
|
|
7639
|
+
if (convertToSkip) {
|
|
7640
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
7641
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7644
|
+
else {
|
|
7645
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
7569
7646
|
}
|
|
7570
7647
|
{
|
|
7571
7648
|
requestParams[countParam] = true;
|
|
@@ -7596,7 +7673,8 @@ class BaseService {
|
|
|
7596
7673
|
// Extract items and metadata
|
|
7597
7674
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
7598
7675
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
7599
|
-
const
|
|
7676
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
7677
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
7600
7678
|
const continuationToken = response.data[continuationTokenField];
|
|
7601
7679
|
// Determine if there are more pages
|
|
7602
7680
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -7806,6 +7884,17 @@ exports.QueryFilterOperator = void 0;
|
|
|
7806
7884
|
QueryFilterOperator["In"] = "in";
|
|
7807
7885
|
QueryFilterOperator["NotIn"] = "not in";
|
|
7808
7886
|
})(exports.QueryFilterOperator || (exports.QueryFilterOperator = {}));
|
|
7887
|
+
/**
|
|
7888
|
+
* Aggregate functions supported by the Data Fabric query API.
|
|
7889
|
+
*/
|
|
7890
|
+
exports.EntityAggregateFunction = void 0;
|
|
7891
|
+
(function (EntityAggregateFunction) {
|
|
7892
|
+
EntityAggregateFunction["Count"] = "COUNT";
|
|
7893
|
+
EntityAggregateFunction["Sum"] = "SUM";
|
|
7894
|
+
EntityAggregateFunction["Avg"] = "AVG";
|
|
7895
|
+
EntityAggregateFunction["Min"] = "MIN";
|
|
7896
|
+
EntityAggregateFunction["Max"] = "MAX";
|
|
7897
|
+
})(exports.EntityAggregateFunction || (exports.EntityAggregateFunction = {}));
|
|
7809
7898
|
/**
|
|
7810
7899
|
* Entity type enum
|
|
7811
7900
|
*/
|
|
@@ -8395,16 +8484,16 @@ class EntityService extends BaseService {
|
|
|
8395
8484
|
return entities;
|
|
8396
8485
|
}
|
|
8397
8486
|
/**
|
|
8398
|
-
* Queries entity records with filters, sorting, and pagination
|
|
8487
|
+
* Queries entity records with filters, sorting, aggregates, and pagination
|
|
8399
8488
|
*
|
|
8400
8489
|
* @param id - UUID of the entity
|
|
8401
|
-
* @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
|
|
8490
|
+
* @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
|
|
8402
8491
|
* @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
|
|
8403
8492
|
* or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
|
|
8404
8493
|
*
|
|
8405
8494
|
* @example
|
|
8406
8495
|
* ```typescript
|
|
8407
|
-
* import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
|
|
8496
|
+
* import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
|
|
8408
8497
|
*
|
|
8409
8498
|
* const entities = new Entities(sdk);
|
|
8410
8499
|
*
|
|
@@ -8428,6 +8517,23 @@ class EntityService extends BaseService {
|
|
|
8428
8517
|
* if (page1.hasNextPage) {
|
|
8429
8518
|
* const page2 = await entities.queryRecordsById("<entityId>", { cursor: page1.nextCursor });
|
|
8430
8519
|
* }
|
|
8520
|
+
*
|
|
8521
|
+
* // Aggregate: count of records per status
|
|
8522
|
+
* await entities.queryRecordsById("<entityId>", {
|
|
8523
|
+
* selectedFields: ["status"],
|
|
8524
|
+
* groupBy: ["status"],
|
|
8525
|
+
* aggregates: [
|
|
8526
|
+
* { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
|
|
8527
|
+
* ],
|
|
8528
|
+
* });
|
|
8529
|
+
*
|
|
8530
|
+
* // Aggregate: total sum and average across all records (no grouping)
|
|
8531
|
+
* await entities.queryRecordsById("<entityId>", {
|
|
8532
|
+
* aggregates: [
|
|
8533
|
+
* { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
|
|
8534
|
+
* { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
|
|
8535
|
+
* ],
|
|
8536
|
+
* });
|
|
8431
8537
|
* ```
|
|
8432
8538
|
*/
|
|
8433
8539
|
async queryRecordsById(id, options) {
|
|
@@ -8445,7 +8551,7 @@ class EntityService extends BaseService {
|
|
|
8445
8551
|
countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
|
|
8446
8552
|
}
|
|
8447
8553
|
},
|
|
8448
|
-
excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions']
|
|
8554
|
+
excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions', 'aggregates', 'groupBy']
|
|
8449
8555
|
}, options);
|
|
8450
8556
|
}
|
|
8451
8557
|
/**
|
|
@@ -9455,6 +9561,41 @@ exports.DebugMode = void 0;
|
|
|
9455
9561
|
* Case Instance Types
|
|
9456
9562
|
* Types and interfaces for Maestro case instance management
|
|
9457
9563
|
*/
|
|
9564
|
+
/**
|
|
9565
|
+
* SLA status for a case instance
|
|
9566
|
+
*/
|
|
9567
|
+
exports.SlaSummaryStatus = void 0;
|
|
9568
|
+
(function (SlaSummaryStatus) {
|
|
9569
|
+
/** Case is within SLA deadline */
|
|
9570
|
+
SlaSummaryStatus["ON_TRACK"] = "On Track";
|
|
9571
|
+
/** Case is approaching SLA deadline based on at-risk percentage threshold */
|
|
9572
|
+
SlaSummaryStatus["AT_RISK"] = "At Risk";
|
|
9573
|
+
/** Case has exceeded SLA deadline */
|
|
9574
|
+
SlaSummaryStatus["OVERDUE"] = "Overdue";
|
|
9575
|
+
/** Case instance has completed */
|
|
9576
|
+
SlaSummaryStatus["COMPLETED"] = "Completed";
|
|
9577
|
+
/** SLA status cannot be determined (no SLA deadline defined) */
|
|
9578
|
+
SlaSummaryStatus["UNKNOWN"] = "Unknown";
|
|
9579
|
+
})(exports.SlaSummaryStatus || (exports.SlaSummaryStatus = {}));
|
|
9580
|
+
/**
|
|
9581
|
+
* Instance status values for case instances and process instances
|
|
9582
|
+
*/
|
|
9583
|
+
exports.InstanceStatus = void 0;
|
|
9584
|
+
(function (InstanceStatus) {
|
|
9585
|
+
/** Instance status not yet populated by the backend */
|
|
9586
|
+
InstanceStatus["UNKNOWN"] = "";
|
|
9587
|
+
InstanceStatus["CANCELLED"] = "Cancelled";
|
|
9588
|
+
InstanceStatus["CANCELING"] = "Canceling";
|
|
9589
|
+
InstanceStatus["COMPLETED"] = "Completed";
|
|
9590
|
+
InstanceStatus["FAULTED"] = "Faulted";
|
|
9591
|
+
InstanceStatus["PAUSED"] = "Paused";
|
|
9592
|
+
InstanceStatus["PAUSING"] = "Pausing";
|
|
9593
|
+
InstanceStatus["PENDING"] = "Pending";
|
|
9594
|
+
InstanceStatus["RESUMING"] = "Resuming";
|
|
9595
|
+
InstanceStatus["RETRYING"] = "Retrying";
|
|
9596
|
+
InstanceStatus["RUNNING"] = "Running";
|
|
9597
|
+
InstanceStatus["UPGRADING"] = "Upgrading";
|
|
9598
|
+
})(exports.InstanceStatus || (exports.InstanceStatus = {}));
|
|
9458
9599
|
/**
|
|
9459
9600
|
* Case stage task type
|
|
9460
9601
|
*/
|
|
@@ -9489,6 +9630,8 @@ exports.EscalationTriggerType = void 0;
|
|
|
9489
9630
|
(function (EscalationTriggerType) {
|
|
9490
9631
|
EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
|
|
9491
9632
|
EscalationTriggerType["AT_RISK"] = "at-risk";
|
|
9633
|
+
/** Default value when no escalation rule is defined */
|
|
9634
|
+
EscalationTriggerType["NONE"] = "None";
|
|
9492
9635
|
})(exports.EscalationTriggerType || (exports.EscalationTriggerType = {}));
|
|
9493
9636
|
/**
|
|
9494
9637
|
* SLA duration unit
|
|
@@ -9556,6 +9699,11 @@ function createCaseInstanceMethods(instanceData, service) {
|
|
|
9556
9699
|
if (!instanceData.instanceId)
|
|
9557
9700
|
throw new Error('Case instance ID is undefined');
|
|
9558
9701
|
return service.getActionTasks(instanceData.instanceId, options);
|
|
9702
|
+
},
|
|
9703
|
+
async getSlaSummary(options) {
|
|
9704
|
+
if (!instanceData.instanceId)
|
|
9705
|
+
throw new Error('Case instance ID is undefined');
|
|
9706
|
+
return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
|
|
9559
9707
|
}
|
|
9560
9708
|
};
|
|
9561
9709
|
}
|
|
@@ -11110,6 +11258,70 @@ class CaseInstancesService extends BaseService {
|
|
|
11110
11258
|
};
|
|
11111
11259
|
return await this.taskService.getAll(enhancedOptions);
|
|
11112
11260
|
}
|
|
11261
|
+
/**
|
|
11262
|
+
* Get SLA summary for all case instances across folders.
|
|
11263
|
+
*
|
|
11264
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
11265
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
11266
|
+
*
|
|
11267
|
+
* @param options - Optional filtering and pagination options
|
|
11268
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
11269
|
+
* @example
|
|
11270
|
+
* ```typescript
|
|
11271
|
+
* // Non-paginated (returns top 50 items by default)
|
|
11272
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
11273
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
11274
|
+
*
|
|
11275
|
+
* // Filter by case instance ID
|
|
11276
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
11277
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
11278
|
+
* });
|
|
11279
|
+
*
|
|
11280
|
+
* // Filter by time range
|
|
11281
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
11282
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
11283
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
11284
|
+
* });
|
|
11285
|
+
*
|
|
11286
|
+
* // With pagination
|
|
11287
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
11288
|
+
* if (page1.hasNextPage) {
|
|
11289
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
11290
|
+
* }
|
|
11291
|
+
*
|
|
11292
|
+
* // Jump to specific page
|
|
11293
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
11294
|
+
* ```
|
|
11295
|
+
*/
|
|
11296
|
+
async getSlaSummary(options) {
|
|
11297
|
+
const apiOptions = options ? {
|
|
11298
|
+
...options,
|
|
11299
|
+
startTimeUtc: options.startTimeUtc?.toISOString(),
|
|
11300
|
+
endTimeUtc: options.endTimeUtc?.toISOString()
|
|
11301
|
+
} : undefined;
|
|
11302
|
+
return PaginationHelpers.getAll({
|
|
11303
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
11304
|
+
getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
|
|
11305
|
+
method: HTTP_METHODS.POST,
|
|
11306
|
+
excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
|
|
11307
|
+
transformFn: (item) => ({
|
|
11308
|
+
...item,
|
|
11309
|
+
slaDueTime: toISOUtc(item.slaDueTime),
|
|
11310
|
+
lastModifiedTime: toISOUtc(item.lastModifiedTime)
|
|
11311
|
+
}),
|
|
11312
|
+
pagination: {
|
|
11313
|
+
paginationType: PaginationType.OFFSET,
|
|
11314
|
+
itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
|
|
11315
|
+
totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
|
|
11316
|
+
paginationParams: {
|
|
11317
|
+
pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
11318
|
+
offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
|
|
11319
|
+
countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
|
|
11320
|
+
convertToSkip: false
|
|
11321
|
+
}
|
|
11322
|
+
}
|
|
11323
|
+
}, apiOptions);
|
|
11324
|
+
}
|
|
11113
11325
|
}
|
|
11114
11326
|
__decorate([
|
|
11115
11327
|
track('CaseInstances.GetAll')
|
|
@@ -11138,7 +11350,115 @@ __decorate([
|
|
|
11138
11350
|
__decorate([
|
|
11139
11351
|
track('CaseInstances.GetActionTasks')
|
|
11140
11352
|
], CaseInstancesService.prototype, "getActionTasks", null);
|
|
11353
|
+
__decorate([
|
|
11354
|
+
track('CaseInstances.GetSlaSummary')
|
|
11355
|
+
], CaseInstancesService.prototype, "getSlaSummary", null);
|
|
11356
|
+
|
|
11357
|
+
/**
|
|
11358
|
+
* Validates the `name` argument passed to a `getByName(name, ...)` method.
|
|
11359
|
+
* Trims whitespace and rejects empty/whitespace-only names.
|
|
11360
|
+
*
|
|
11361
|
+
* @param resourceType - Resource label used in error messages (e.g. 'Asset', 'Process')
|
|
11362
|
+
* @param name - Resource name to validate
|
|
11363
|
+
* @returns The trimmed name
|
|
11364
|
+
* @throws ValidationError when `name` is missing or empty after trimming
|
|
11365
|
+
*/
|
|
11366
|
+
function validateName(resourceType, name) {
|
|
11367
|
+
if (!name) {
|
|
11368
|
+
throw new ValidationError({
|
|
11369
|
+
message: `${resourceType} name is required and cannot be empty.`,
|
|
11370
|
+
});
|
|
11371
|
+
}
|
|
11372
|
+
const trimmed = name.trim();
|
|
11373
|
+
if (!trimmed) {
|
|
11374
|
+
throw new ValidationError({
|
|
11375
|
+
message: `${resourceType} name is required and cannot be empty.`,
|
|
11376
|
+
});
|
|
11377
|
+
}
|
|
11378
|
+
return trimmed;
|
|
11379
|
+
}
|
|
11141
11380
|
|
|
11381
|
+
/**
|
|
11382
|
+
* Encodes a folder path for the `X-UIPATH-FolderPath-Encoded` header.
|
|
11383
|
+
*
|
|
11384
|
+
* Orchestrator decodes this header as **base64-encoded UTF-16 LE bytes**
|
|
11385
|
+
* (see `HttpHeadersProviderExtensions.GetDecoded` + `OrganizationUnitProvider`
|
|
11386
|
+
* in the Orchestrator repo, which call `Encoding.Unicode.GetString(...)`).
|
|
11387
|
+
* URL-encoding is NOT what the server expects — it must be base64-of-UTF-16-LE
|
|
11388
|
+
* bytes.
|
|
11389
|
+
*
|
|
11390
|
+
* @param folderPath - The folder path (e.g. 'Shared/Finance')
|
|
11391
|
+
* @returns Base64 string suitable for the `X-UIPATH-FolderPath-Encoded` header
|
|
11392
|
+
*/
|
|
11393
|
+
function encodeFolderPathHeader(folderPath) {
|
|
11394
|
+
// Force little-endian regardless of host byte order. `Uint16Array` viewed
|
|
11395
|
+
// as `Uint8Array` would use the host's native order — correct on LE hosts
|
|
11396
|
+
// (x86/ARM-LE) but wrong on BE hosts. `DataView.setUint16(..., true)`
|
|
11397
|
+
// pins LE.
|
|
11398
|
+
const buf = new ArrayBuffer(folderPath.length * 2);
|
|
11399
|
+
const view = new DataView(buf);
|
|
11400
|
+
for (let i = 0; i < folderPath.length; i++) {
|
|
11401
|
+
view.setUint16(i * 2, folderPath.charCodeAt(i), true);
|
|
11402
|
+
}
|
|
11403
|
+
const bytes = new Uint8Array(buf);
|
|
11404
|
+
let binary = '';
|
|
11405
|
+
for (let i = 0; i < bytes.byteLength; i++) {
|
|
11406
|
+
binary += String.fromCharCode(bytes[i]);
|
|
11407
|
+
}
|
|
11408
|
+
// btoa is browser-native; Node 16+ also has it as a global
|
|
11409
|
+
return btoa(binary);
|
|
11410
|
+
}
|
|
11411
|
+
|
|
11412
|
+
/**
|
|
11413
|
+
* Resolves folder context into the appropriate Orchestrator folder headers.
|
|
11414
|
+
*
|
|
11415
|
+
* Centralized so all folder-scoped methods (e.g. `assets.getByName`,
|
|
11416
|
+
* `processes.getByName`, future Queues/Buckets/Jobs) share one implementation.
|
|
11417
|
+
*
|
|
11418
|
+
* Each input field maps directly to its header — no auto-detection or type
|
|
11419
|
+
* coercion. When multiple fields are supplied, all corresponding headers
|
|
11420
|
+
* are forwarded and the server resolves precedence.
|
|
11421
|
+
*
|
|
11422
|
+
* Routing:
|
|
11423
|
+
* - `folderId` → `X-UIPATH-OrganizationUnitId`
|
|
11424
|
+
* - `folderKey` → `X-UIPATH-FolderKey`
|
|
11425
|
+
* - `folderPath` → `X-UIPATH-FolderPath-Encoded`
|
|
11426
|
+
* - none set + `fallbackFolderKey` → fallback used as `X-UIPATH-FolderKey`
|
|
11427
|
+
* - none set + no fallback → `ValidationError`
|
|
11428
|
+
*
|
|
11429
|
+
* @throws ValidationError when no folder context can be resolved.
|
|
11430
|
+
*/
|
|
11431
|
+
function resolveFolderHeaders(input) {
|
|
11432
|
+
const { folderId, folderKey, folderPath, resourceType, fallbackFolderKey } = input;
|
|
11433
|
+
const trimmedKey = folderKey?.trim();
|
|
11434
|
+
const trimmedPath = folderPath?.trim();
|
|
11435
|
+
const headers = {};
|
|
11436
|
+
if (folderId !== undefined) {
|
|
11437
|
+
headers[FOLDER_ID] = folderId;
|
|
11438
|
+
}
|
|
11439
|
+
if (trimmedKey) {
|
|
11440
|
+
headers[FOLDER_KEY] = trimmedKey;
|
|
11441
|
+
}
|
|
11442
|
+
if (trimmedPath) {
|
|
11443
|
+
headers[FOLDER_PATH_ENCODED] = encodeFolderPathHeader(trimmedPath);
|
|
11444
|
+
}
|
|
11445
|
+
// No explicit folder context → meta-tag fallback or error.
|
|
11446
|
+
if (Object.keys(headers).length === 0) {
|
|
11447
|
+
if (!fallbackFolderKey) {
|
|
11448
|
+
throw new ValidationError({
|
|
11449
|
+
message: `${resourceType} requires folder context: pass \`folderId\`, \`folderKey\`, or \`folderPath\`, or initialize the SDK with a folder context.`,
|
|
11450
|
+
});
|
|
11451
|
+
}
|
|
11452
|
+
headers[FOLDER_KEY] = fallbackFolderKey;
|
|
11453
|
+
}
|
|
11454
|
+
return createHeaders(headers);
|
|
11455
|
+
}
|
|
11456
|
+
|
|
11457
|
+
/**
|
|
11458
|
+
* Matches single-quote characters in OData string literals — escaped to `''`
|
|
11459
|
+
* inside the `$filter=Name eq '…'` clause built by `getByNameLookup`.
|
|
11460
|
+
*/
|
|
11461
|
+
const SINGLE_QUOTE_RE = /'/g;
|
|
11142
11462
|
/**
|
|
11143
11463
|
* Base service for services that need folder-specific functionality.
|
|
11144
11464
|
*
|
|
@@ -11172,6 +11492,68 @@ class FolderScopedService extends BaseService {
|
|
|
11172
11492
|
}
|
|
11173
11493
|
return response.data?.value;
|
|
11174
11494
|
}
|
|
11495
|
+
/**
|
|
11496
|
+
* Look up a single resource by name on a folder-scoped OData collection.
|
|
11497
|
+
*
|
|
11498
|
+
* Shared by `getByName` implementations across services (Assets, Processes, etc).
|
|
11499
|
+
* Handles:
|
|
11500
|
+
* - Name validation via `validateName`
|
|
11501
|
+
* - Folder header resolution via `resolveFolderHeaders` (folderId → ID/key
|
|
11502
|
+
* header by type, folderPath → encoded path header, falls back to
|
|
11503
|
+
* init-time `config.folderKey` from the `uipath:folder-key` meta tag)
|
|
11504
|
+
* - OData `$filter=Name eq '…'` with single-quote escaping + `$top=1`
|
|
11505
|
+
* - Empty-result → `NotFoundError` with folder context in the message
|
|
11506
|
+
*
|
|
11507
|
+
* The transform step is caller-provided because each resource has its own
|
|
11508
|
+
* PascalCase → camelCase field mapping.
|
|
11509
|
+
*
|
|
11510
|
+
* @param resourceType - Resource label used in validation + error messages (e.g. 'Asset', 'Process')
|
|
11511
|
+
* @param endpoint - Folder-scoped OData collection endpoint
|
|
11512
|
+
* @param name - Resource name to search for
|
|
11513
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) + OData query options (`expand`, `select`)
|
|
11514
|
+
* @param transform - Maps a raw OData item to the typed response (e.g. PascalCase → camelCase via field map)
|
|
11515
|
+
* @throws ValidationError when inputs are malformed; NotFoundError when no match
|
|
11516
|
+
*/
|
|
11517
|
+
async getByNameLookup(resourceType, endpoint, name, options, transform) {
|
|
11518
|
+
const validatedName = validateName(resourceType, name);
|
|
11519
|
+
const { folderId, folderKey, folderPath, ...queryOptions } = options;
|
|
11520
|
+
const headers = resolveFolderHeaders({
|
|
11521
|
+
folderId,
|
|
11522
|
+
folderKey,
|
|
11523
|
+
folderPath,
|
|
11524
|
+
resourceType: `${resourceType}.getByName`,
|
|
11525
|
+
fallbackFolderKey: this.config.folderKey,
|
|
11526
|
+
});
|
|
11527
|
+
const apiOptions = {
|
|
11528
|
+
...addPrefixToKeys(queryOptions, ODATA_PREFIX, Object.keys(queryOptions)),
|
|
11529
|
+
'$filter': `Name eq '${validatedName.replace(SINGLE_QUOTE_RE, "''")}'`,
|
|
11530
|
+
'$top': '1',
|
|
11531
|
+
};
|
|
11532
|
+
const response = await this.get(endpoint, {
|
|
11533
|
+
headers,
|
|
11534
|
+
params: apiOptions,
|
|
11535
|
+
});
|
|
11536
|
+
const items = response.data?.value;
|
|
11537
|
+
if (!items?.length) {
|
|
11538
|
+
const folderHint = describeFolderForError(folderId, folderKey, folderPath);
|
|
11539
|
+
throw new NotFoundError({
|
|
11540
|
+
message: `${resourceType} '${validatedName}' not found${folderHint}.`,
|
|
11541
|
+
});
|
|
11542
|
+
}
|
|
11543
|
+
return transform(items[0]);
|
|
11544
|
+
}
|
|
11545
|
+
}
|
|
11546
|
+
/** Renders the supplied folder for a NotFoundError message. */
|
|
11547
|
+
function describeFolderForError(folderId, folderKey, folderPath) {
|
|
11548
|
+
const path = folderPath?.trim();
|
|
11549
|
+
if (path)
|
|
11550
|
+
return ` in folder '${path}'`;
|
|
11551
|
+
const key = folderKey?.trim();
|
|
11552
|
+
if (key)
|
|
11553
|
+
return ` in folder (key: ${key})`;
|
|
11554
|
+
if (typeof folderId === 'number')
|
|
11555
|
+
return ` in folder (id: ${folderId})`;
|
|
11556
|
+
return '';
|
|
11175
11557
|
}
|
|
11176
11558
|
|
|
11177
11559
|
/**
|
|
@@ -11269,6 +11651,35 @@ class AssetService extends FolderScopedService {
|
|
|
11269
11651
|
const transformedAsset = transformData(pascalToCamelCaseKeys(response.data), AssetMap);
|
|
11270
11652
|
return transformedAsset;
|
|
11271
11653
|
}
|
|
11654
|
+
/**
|
|
11655
|
+
* Retrieves a single asset by name.
|
|
11656
|
+
*
|
|
11657
|
+
* @param name - Asset name to search for
|
|
11658
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional query parameters (`expand`, `select`)
|
|
11659
|
+
* @returns Promise resolving to a single asset
|
|
11660
|
+
* {@link AssetGetResponse}
|
|
11661
|
+
* @example
|
|
11662
|
+
* ```typescript
|
|
11663
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
11664
|
+
*
|
|
11665
|
+
* const assets = new Assets(sdk);
|
|
11666
|
+
*
|
|
11667
|
+
* // By folder ID
|
|
11668
|
+
* await assets.getByName('ApiKey', { folderId: 123 });
|
|
11669
|
+
*
|
|
11670
|
+
* // By folder key (GUID)
|
|
11671
|
+
* await assets.getByName('ApiKey', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
11672
|
+
*
|
|
11673
|
+
* // By folder path
|
|
11674
|
+
* await assets.getByName('ApiKey', { folderPath: 'Shared/Finance' });
|
|
11675
|
+
*
|
|
11676
|
+
* // With expand
|
|
11677
|
+
* await assets.getByName('ApiKey', { folderPath: 'Shared/Finance', expand: 'keyValueList' });
|
|
11678
|
+
* ```
|
|
11679
|
+
*/
|
|
11680
|
+
async getByName(name, options = {}) {
|
|
11681
|
+
return this.getByNameLookup('Asset', ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap));
|
|
11682
|
+
}
|
|
11272
11683
|
}
|
|
11273
11684
|
__decorate([
|
|
11274
11685
|
track('Assets.GetAll')
|
|
@@ -11276,6 +11687,9 @@ __decorate([
|
|
|
11276
11687
|
__decorate([
|
|
11277
11688
|
track('Assets.GetById')
|
|
11278
11689
|
], AssetService.prototype, "getById", null);
|
|
11690
|
+
__decorate([
|
|
11691
|
+
track('Assets.GetByName')
|
|
11692
|
+
], AssetService.prototype, "getByName", null);
|
|
11279
11693
|
|
|
11280
11694
|
/**
|
|
11281
11695
|
* Enum for Asset Value Scope
|
|
@@ -12379,7 +12793,7 @@ const ProcessMap = {
|
|
|
12379
12793
|
/**
|
|
12380
12794
|
* Service for interacting with UiPath Orchestrator Processes API
|
|
12381
12795
|
*/
|
|
12382
|
-
class ProcessService extends
|
|
12796
|
+
class ProcessService extends FolderScopedService {
|
|
12383
12797
|
/**
|
|
12384
12798
|
* Gets all processes across folders with optional filtering and folder scoping
|
|
12385
12799
|
*
|
|
@@ -12516,6 +12930,35 @@ class ProcessService extends BaseService {
|
|
|
12516
12930
|
const transformedProcess = transformData(pascalToCamelCaseKeys(response.data), ProcessMap);
|
|
12517
12931
|
return transformedProcess;
|
|
12518
12932
|
}
|
|
12933
|
+
/**
|
|
12934
|
+
* Retrieves a single process by name.
|
|
12935
|
+
*
|
|
12936
|
+
* @param name - Process name to search for
|
|
12937
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional query parameters (`expand`, `select`)
|
|
12938
|
+
* @returns Promise resolving to a single process
|
|
12939
|
+
* {@link ProcessGetResponse}
|
|
12940
|
+
* @example
|
|
12941
|
+
* ```typescript
|
|
12942
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
12943
|
+
*
|
|
12944
|
+
* const processes = new Processes(sdk);
|
|
12945
|
+
*
|
|
12946
|
+
* // By folder ID
|
|
12947
|
+
* await processes.getByName('MyProcess', { folderId: 123 });
|
|
12948
|
+
*
|
|
12949
|
+
* // By folder key (GUID)
|
|
12950
|
+
* await processes.getByName('MyProcess', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
12951
|
+
*
|
|
12952
|
+
* // By folder path
|
|
12953
|
+
* await processes.getByName('MyProcess', { folderPath: 'Shared/Finance' });
|
|
12954
|
+
*
|
|
12955
|
+
* // With expand
|
|
12956
|
+
* await processes.getByName('MyProcess', { folderPath: 'Shared/Finance', expand: 'entryPoints' });
|
|
12957
|
+
* ```
|
|
12958
|
+
*/
|
|
12959
|
+
async getByName(name, options = {}) {
|
|
12960
|
+
return this.getByNameLookup('Process', PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap));
|
|
12961
|
+
}
|
|
12519
12962
|
}
|
|
12520
12963
|
__decorate([
|
|
12521
12964
|
track('Processes.GetAll')
|
|
@@ -12526,6 +12969,9 @@ __decorate([
|
|
|
12526
12969
|
__decorate([
|
|
12527
12970
|
track('Processes.GetById')
|
|
12528
12971
|
], ProcessService.prototype, "getById", null);
|
|
12972
|
+
__decorate([
|
|
12973
|
+
track('Processes.GetByName')
|
|
12974
|
+
], ProcessService.prototype, "getByName", null);
|
|
12529
12975
|
|
|
12530
12976
|
/**
|
|
12531
12977
|
* Maps fields for Queue entities to ensure consistent naming
|
|
@@ -13003,7 +13449,7 @@ const AgentMap = {
|
|
|
13003
13449
|
};
|
|
13004
13450
|
|
|
13005
13451
|
/**
|
|
13006
|
-
* Constants for User Service
|
|
13452
|
+
* Constants for User Settings Service
|
|
13007
13453
|
*/
|
|
13008
13454
|
/**
|
|
13009
13455
|
* Maps fields for User Settings entities to ensure consistent SDK naming
|