@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.umd.js
CHANGED
|
@@ -4482,6 +4482,7 @@
|
|
|
4482
4482
|
const PIMS_BASE = 'pims_';
|
|
4483
4483
|
const DATAFABRIC_BASE = 'datafabric_';
|
|
4484
4484
|
const IDENTITY_BASE = 'identity_';
|
|
4485
|
+
const INSIGHTS_RTM_BASE = 'insightsrtm_';
|
|
4485
4486
|
|
|
4486
4487
|
/**
|
|
4487
4488
|
* Orchestrator Service Endpoints
|
|
@@ -4588,6 +4589,10 @@
|
|
|
4588
4589
|
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
4589
4590
|
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
4590
4591
|
},
|
|
4592
|
+
INSIGHTS: {
|
|
4593
|
+
/** SLA summary for case instances */
|
|
4594
|
+
SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
|
|
4595
|
+
},
|
|
4591
4596
|
};
|
|
4592
4597
|
|
|
4593
4598
|
/**
|
|
@@ -9221,7 +9226,7 @@
|
|
|
9221
9226
|
// Connection string placeholder that will be replaced during build
|
|
9222
9227
|
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";
|
|
9223
9228
|
// SDK Version placeholder
|
|
9224
|
-
const SDK_VERSION = "1.3.
|
|
9229
|
+
const SDK_VERSION = "1.3.8";
|
|
9225
9230
|
const VERSION = "Version";
|
|
9226
9231
|
const SERVICE = "Service";
|
|
9227
9232
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -9568,6 +9573,8 @@
|
|
|
9568
9573
|
// Asset resolution and routing
|
|
9569
9574
|
UiPathMetaTags["CDN_BASE"] = "uipath:cdn-base";
|
|
9570
9575
|
UiPathMetaTags["APP_BASE"] = "uipath:app-base";
|
|
9576
|
+
// Folder context (injected during coded-app deployment)
|
|
9577
|
+
UiPathMetaTags["FOLDER_KEY"] = "uipath:folder-key";
|
|
9571
9578
|
})(exports.UiPathMetaTags || (exports.UiPathMetaTags = {}));
|
|
9572
9579
|
|
|
9573
9580
|
/**
|
|
@@ -9596,12 +9603,13 @@
|
|
|
9596
9603
|
tenantName: getMetaTagContent(exports.UiPathMetaTags.TENANT_NAME),
|
|
9597
9604
|
baseUrl: getMetaTagContent(exports.UiPathMetaTags.BASE_URL),
|
|
9598
9605
|
redirectUri: getMetaTagContent(exports.UiPathMetaTags.REDIRECT_URI),
|
|
9606
|
+
folderKey: getMetaTagContent(exports.UiPathMetaTags.FOLDER_KEY),
|
|
9599
9607
|
};
|
|
9600
9608
|
const hasAnyValue = Object.values(config).some(Boolean);
|
|
9601
9609
|
return hasAnyValue ? config : null;
|
|
9602
9610
|
}
|
|
9603
9611
|
|
|
9604
|
-
var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_initializeWithConfig, _UiPath_loadConfig;
|
|
9612
|
+
var _UiPath_instances, _UiPath_config, _UiPath_authService, _UiPath_initialized, _UiPath_partialConfig, _UiPath_multiLogin, _UiPath_metaFolderKey, _UiPath_initializeWithConfig, _UiPath_loadConfig;
|
|
9605
9613
|
/**
|
|
9606
9614
|
* UiPath - Core SDK class for authentication and configuration management.
|
|
9607
9615
|
*
|
|
@@ -9642,8 +9650,13 @@
|
|
|
9642
9650
|
_UiPath_initialized.set(this, false);
|
|
9643
9651
|
_UiPath_partialConfig.set(this, void 0);
|
|
9644
9652
|
_UiPath_multiLogin.set(this, false);
|
|
9653
|
+
// Folder key sourced only from `<meta name="uipath:folder-key">` (coded-app
|
|
9654
|
+
// deployments). Not accepted via the public constructor; lives here so the
|
|
9655
|
+
// SDK can flow it through to BaseService.config without polluting BaseConfig.
|
|
9656
|
+
_UiPath_metaFolderKey.set(this, void 0);
|
|
9645
9657
|
// Load configuration from meta tags
|
|
9646
9658
|
const configFromMetaTags = loadFromMetaTags();
|
|
9659
|
+
__classPrivateFieldSet(this, _UiPath_metaFolderKey, configFromMetaTags?.folderKey, "f");
|
|
9647
9660
|
// Merge configuration: constructor config overrides meta tags
|
|
9648
9661
|
const mergedConfig = config ? { ...configFromMetaTags, ...config } : configFromMetaTags;
|
|
9649
9662
|
if (mergedConfig && isCompleteConfig(mergedConfig)) {
|
|
@@ -9772,7 +9785,7 @@
|
|
|
9772
9785
|
__classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
|
|
9773
9786
|
}
|
|
9774
9787
|
};
|
|
9775
|
-
_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) {
|
|
9788
|
+
_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) {
|
|
9776
9789
|
// Validate and normalize the configuration
|
|
9777
9790
|
validateConfig(config);
|
|
9778
9791
|
const hasSecretAuth = hasSecretConfig(config);
|
|
@@ -9785,7 +9798,7 @@
|
|
|
9785
9798
|
secret: hasSecretAuth ? config.secret : undefined,
|
|
9786
9799
|
clientId: hasOAuthAuth ? config.clientId : undefined,
|
|
9787
9800
|
redirectUri: hasOAuthAuth ? config.redirectUri : undefined,
|
|
9788
|
-
scope: hasOAuthAuth ? config.scope : undefined
|
|
9801
|
+
scope: hasOAuthAuth ? config.scope : undefined,
|
|
9789
9802
|
});
|
|
9790
9803
|
const executionContext = new ExecutionContext();
|
|
9791
9804
|
__classPrivateFieldSet(this, _UiPath_authService, new AuthService(internalConfig, executionContext), "f");
|
|
@@ -9793,11 +9806,14 @@
|
|
|
9793
9806
|
__classPrivateFieldGet(this, _UiPath_authService, "f").setMultiLogin();
|
|
9794
9807
|
}
|
|
9795
9808
|
__classPrivateFieldSet(this, _UiPath_config, internalConfig, "f");
|
|
9796
|
-
// Store internals in SDKInternalsRegistry (not visible on instance)
|
|
9809
|
+
// Store internals in SDKInternalsRegistry (not visible on instance).
|
|
9810
|
+
// `folderKey` is meta-tag-only — kept off `UiPathConfig` (which mirrors
|
|
9811
|
+
// user-passed values) and lives here on the runtime registry instead.
|
|
9797
9812
|
SDKInternalsRegistry.set(this, {
|
|
9798
9813
|
config: internalConfig,
|
|
9799
9814
|
context: executionContext,
|
|
9800
|
-
tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager()
|
|
9815
|
+
tokenManager: __classPrivateFieldGet(this, _UiPath_authService, "f").getTokenManager(),
|
|
9816
|
+
folderKey: __classPrivateFieldGet(this, _UiPath_metaFolderKey, "f"),
|
|
9801
9817
|
});
|
|
9802
9818
|
// Expose read-only config for user convenience
|
|
9803
9819
|
this.config = {
|
|
@@ -9825,6 +9841,7 @@
|
|
|
9825
9841
|
}, _UiPath_loadConfig = function _UiPath_loadConfig() {
|
|
9826
9842
|
// Load from meta tags
|
|
9827
9843
|
const metaConfig = loadFromMetaTags();
|
|
9844
|
+
__classPrivateFieldSet(this, _UiPath_metaFolderKey, metaConfig?.folderKey, "f");
|
|
9828
9845
|
// Merge with any partial config from constructor (constructor overrides meta tags)
|
|
9829
9846
|
const merged = { ...metaConfig, ...__classPrivateFieldGet(this, _UiPath_partialConfig, "f") };
|
|
9830
9847
|
if (!isCompleteConfig(merged)) {
|
|
@@ -10068,6 +10085,7 @@
|
|
|
10068
10085
|
}
|
|
10069
10086
|
|
|
10070
10087
|
const FOLDER_KEY = 'X-UIPATH-FolderKey';
|
|
10088
|
+
const FOLDER_PATH_ENCODED = 'X-UIPATH-FolderPath-Encoded';
|
|
10071
10089
|
const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
|
|
10072
10090
|
const TRACEPARENT = 'traceparent';
|
|
10073
10091
|
const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
|
|
@@ -10214,6 +10232,27 @@
|
|
|
10214
10232
|
/**
|
|
10215
10233
|
* Collection of utility functions for working with objects
|
|
10216
10234
|
*/
|
|
10235
|
+
/**
|
|
10236
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
10237
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
10238
|
+
* Direct key match takes priority over nested traversal.
|
|
10239
|
+
*/
|
|
10240
|
+
function resolveNestedField(data, fieldPath) {
|
|
10241
|
+
if (!data) {
|
|
10242
|
+
return undefined;
|
|
10243
|
+
}
|
|
10244
|
+
if (fieldPath in data) {
|
|
10245
|
+
return data[fieldPath];
|
|
10246
|
+
}
|
|
10247
|
+
if (!fieldPath.includes('.')) {
|
|
10248
|
+
return undefined;
|
|
10249
|
+
}
|
|
10250
|
+
let value = data;
|
|
10251
|
+
for (const part of fieldPath.split('.')) {
|
|
10252
|
+
value = value?.[part];
|
|
10253
|
+
}
|
|
10254
|
+
return value;
|
|
10255
|
+
}
|
|
10217
10256
|
/**
|
|
10218
10257
|
* Filters out undefined values from an object
|
|
10219
10258
|
* @param obj The source object
|
|
@@ -10473,6 +10512,26 @@
|
|
|
10473
10512
|
/** Field name for continuation token in bucket file metadata response */
|
|
10474
10513
|
CONTINUATION_TOKEN_FIELD: 'continuationToken'
|
|
10475
10514
|
};
|
|
10515
|
+
/**
|
|
10516
|
+
* SLA Summary pagination constants for page-number-based pagination
|
|
10517
|
+
*/
|
|
10518
|
+
const SLA_SUMMARY_PAGINATION = {
|
|
10519
|
+
/** Field name for items in SLA summary response */
|
|
10520
|
+
ITEMS_FIELD: 'data',
|
|
10521
|
+
/** Dot-notation path for total count in nested pagination object */
|
|
10522
|
+
TOTAL_COUNT_FIELD: 'pagination.totalCount'
|
|
10523
|
+
};
|
|
10524
|
+
/**
|
|
10525
|
+
* SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
|
|
10526
|
+
*/
|
|
10527
|
+
const SLA_SUMMARY_OFFSET_PARAMS = {
|
|
10528
|
+
/** Page size parameter name */
|
|
10529
|
+
PAGE_SIZE_PARAM: 'PageSize',
|
|
10530
|
+
/** Page number parameter name (sent directly, not converted to skip) */
|
|
10531
|
+
OFFSET_PARAM: 'PageNumber',
|
|
10532
|
+
/** No count param needed */
|
|
10533
|
+
COUNT_PARAM: undefined
|
|
10534
|
+
};
|
|
10476
10535
|
/**
|
|
10477
10536
|
* Process Instance pagination constants for token-based pagination
|
|
10478
10537
|
*/
|
|
@@ -10523,6 +10582,14 @@
|
|
|
10523
10582
|
TOKEN_PARAM: 'nextPage'
|
|
10524
10583
|
};
|
|
10525
10584
|
|
|
10585
|
+
/**
|
|
10586
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
10587
|
+
* Returns the original value if parsing fails.
|
|
10588
|
+
*/
|
|
10589
|
+
function toISOUtc(value) {
|
|
10590
|
+
const date = new Date(value + ' UTC');
|
|
10591
|
+
return isNaN(date.getTime()) ? value : date.toISOString();
|
|
10592
|
+
}
|
|
10526
10593
|
/**
|
|
10527
10594
|
* Transforms data by mapping fields according to the provided field mapping
|
|
10528
10595
|
* @param data The source data to transform
|
|
@@ -11079,7 +11146,8 @@
|
|
|
11079
11146
|
// Extract and transform items from response
|
|
11080
11147
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
11081
11148
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
11082
|
-
const
|
|
11149
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
11150
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
11083
11151
|
// Parse items - automatically handle JSON string responses
|
|
11084
11152
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
11085
11153
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -11200,8 +11268,9 @@
|
|
|
11200
11268
|
constructor(instance, headers) {
|
|
11201
11269
|
// Private field - not visible via Object.keys() or any reflection
|
|
11202
11270
|
_BaseService_apiClient.set(this, void 0);
|
|
11203
|
-
const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
|
|
11271
|
+
const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
|
|
11204
11272
|
__classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
|
|
11273
|
+
this.config = { folderKey };
|
|
11205
11274
|
}
|
|
11206
11275
|
/**
|
|
11207
11276
|
* Gets a valid authentication token, refreshing if necessary.
|
|
@@ -11320,9 +11389,17 @@
|
|
|
11320
11389
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
11321
11390
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
11322
11391
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
11392
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
11393
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
11394
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
11323
11395
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
11324
|
-
if (
|
|
11325
|
-
|
|
11396
|
+
if (convertToSkip) {
|
|
11397
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
11398
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
11399
|
+
}
|
|
11400
|
+
}
|
|
11401
|
+
else {
|
|
11402
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
11326
11403
|
}
|
|
11327
11404
|
{
|
|
11328
11405
|
requestParams[countParam] = true;
|
|
@@ -11353,7 +11430,8 @@
|
|
|
11353
11430
|
// Extract items and metadata
|
|
11354
11431
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
11355
11432
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
11356
|
-
const
|
|
11433
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
11434
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
11357
11435
|
const continuationToken = response.data[continuationTokenField];
|
|
11358
11436
|
// Determine if there are more pages
|
|
11359
11437
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -11563,6 +11641,17 @@
|
|
|
11563
11641
|
QueryFilterOperator["In"] = "in";
|
|
11564
11642
|
QueryFilterOperator["NotIn"] = "not in";
|
|
11565
11643
|
})(exports.QueryFilterOperator || (exports.QueryFilterOperator = {}));
|
|
11644
|
+
/**
|
|
11645
|
+
* Aggregate functions supported by the Data Fabric query API.
|
|
11646
|
+
*/
|
|
11647
|
+
exports.EntityAggregateFunction = void 0;
|
|
11648
|
+
(function (EntityAggregateFunction) {
|
|
11649
|
+
EntityAggregateFunction["Count"] = "COUNT";
|
|
11650
|
+
EntityAggregateFunction["Sum"] = "SUM";
|
|
11651
|
+
EntityAggregateFunction["Avg"] = "AVG";
|
|
11652
|
+
EntityAggregateFunction["Min"] = "MIN";
|
|
11653
|
+
EntityAggregateFunction["Max"] = "MAX";
|
|
11654
|
+
})(exports.EntityAggregateFunction || (exports.EntityAggregateFunction = {}));
|
|
11566
11655
|
/**
|
|
11567
11656
|
* Entity type enum
|
|
11568
11657
|
*/
|
|
@@ -12152,16 +12241,16 @@
|
|
|
12152
12241
|
return entities;
|
|
12153
12242
|
}
|
|
12154
12243
|
/**
|
|
12155
|
-
* Queries entity records with filters, sorting, and pagination
|
|
12244
|
+
* Queries entity records with filters, sorting, aggregates, and pagination
|
|
12156
12245
|
*
|
|
12157
12246
|
* @param id - UUID of the entity
|
|
12158
|
-
* @param options - Query options including filterGroup, selectedFields, sortOptions, and pagination
|
|
12247
|
+
* @param options - Query options including filterGroup, selectedFields, sortOptions, aggregates, groupBy, and pagination
|
|
12159
12248
|
* @returns Promise resolving to {@link NonPaginatedResponse} without pagination options,
|
|
12160
12249
|
* or {@link PaginatedResponse} when `pageSize`, `cursor`, or `jumpToPage` are provided
|
|
12161
12250
|
*
|
|
12162
12251
|
* @example
|
|
12163
12252
|
* ```typescript
|
|
12164
|
-
* import { Entities, LogicalOperator, QueryFilterOperator } from '@uipath/uipath-typescript/entities';
|
|
12253
|
+
* import { Entities, LogicalOperator, QueryFilterOperator, EntityAggregateFunction } from '@uipath/uipath-typescript/entities';
|
|
12165
12254
|
*
|
|
12166
12255
|
* const entities = new Entities(sdk);
|
|
12167
12256
|
*
|
|
@@ -12185,6 +12274,23 @@
|
|
|
12185
12274
|
* if (page1.hasNextPage) {
|
|
12186
12275
|
* const page2 = await entities.queryRecordsById("<entityId>", { cursor: page1.nextCursor });
|
|
12187
12276
|
* }
|
|
12277
|
+
*
|
|
12278
|
+
* // Aggregate: count of records per status
|
|
12279
|
+
* await entities.queryRecordsById("<entityId>", {
|
|
12280
|
+
* selectedFields: ["status"],
|
|
12281
|
+
* groupBy: ["status"],
|
|
12282
|
+
* aggregates: [
|
|
12283
|
+
* { function: EntityAggregateFunction.Count, field: "Id", alias: "total" },
|
|
12284
|
+
* ],
|
|
12285
|
+
* });
|
|
12286
|
+
*
|
|
12287
|
+
* // Aggregate: total sum and average across all records (no grouping)
|
|
12288
|
+
* await entities.queryRecordsById("<entityId>", {
|
|
12289
|
+
* aggregates: [
|
|
12290
|
+
* { function: EntityAggregateFunction.Sum, field: "amount", alias: "totalAmount" },
|
|
12291
|
+
* { function: EntityAggregateFunction.Avg, field: "amount", alias: "avgAmount" },
|
|
12292
|
+
* ],
|
|
12293
|
+
* });
|
|
12188
12294
|
* ```
|
|
12189
12295
|
*/
|
|
12190
12296
|
async queryRecordsById(id, options) {
|
|
@@ -12202,7 +12308,7 @@
|
|
|
12202
12308
|
countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
|
|
12203
12309
|
}
|
|
12204
12310
|
},
|
|
12205
|
-
excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions']
|
|
12311
|
+
excludeFromPrefix: ['expansionLevel', 'filterGroup', 'selectedFields', 'sortOptions', 'aggregates', 'groupBy']
|
|
12206
12312
|
}, options);
|
|
12207
12313
|
}
|
|
12208
12314
|
/**
|
|
@@ -13212,6 +13318,41 @@
|
|
|
13212
13318
|
* Case Instance Types
|
|
13213
13319
|
* Types and interfaces for Maestro case instance management
|
|
13214
13320
|
*/
|
|
13321
|
+
/**
|
|
13322
|
+
* SLA status for a case instance
|
|
13323
|
+
*/
|
|
13324
|
+
exports.SlaSummaryStatus = void 0;
|
|
13325
|
+
(function (SlaSummaryStatus) {
|
|
13326
|
+
/** Case is within SLA deadline */
|
|
13327
|
+
SlaSummaryStatus["ON_TRACK"] = "On Track";
|
|
13328
|
+
/** Case is approaching SLA deadline based on at-risk percentage threshold */
|
|
13329
|
+
SlaSummaryStatus["AT_RISK"] = "At Risk";
|
|
13330
|
+
/** Case has exceeded SLA deadline */
|
|
13331
|
+
SlaSummaryStatus["OVERDUE"] = "Overdue";
|
|
13332
|
+
/** Case instance has completed */
|
|
13333
|
+
SlaSummaryStatus["COMPLETED"] = "Completed";
|
|
13334
|
+
/** SLA status cannot be determined (no SLA deadline defined) */
|
|
13335
|
+
SlaSummaryStatus["UNKNOWN"] = "Unknown";
|
|
13336
|
+
})(exports.SlaSummaryStatus || (exports.SlaSummaryStatus = {}));
|
|
13337
|
+
/**
|
|
13338
|
+
* Instance status values for case instances and process instances
|
|
13339
|
+
*/
|
|
13340
|
+
exports.InstanceStatus = void 0;
|
|
13341
|
+
(function (InstanceStatus) {
|
|
13342
|
+
/** Instance status not yet populated by the backend */
|
|
13343
|
+
InstanceStatus["UNKNOWN"] = "";
|
|
13344
|
+
InstanceStatus["CANCELLED"] = "Cancelled";
|
|
13345
|
+
InstanceStatus["CANCELING"] = "Canceling";
|
|
13346
|
+
InstanceStatus["COMPLETED"] = "Completed";
|
|
13347
|
+
InstanceStatus["FAULTED"] = "Faulted";
|
|
13348
|
+
InstanceStatus["PAUSED"] = "Paused";
|
|
13349
|
+
InstanceStatus["PAUSING"] = "Pausing";
|
|
13350
|
+
InstanceStatus["PENDING"] = "Pending";
|
|
13351
|
+
InstanceStatus["RESUMING"] = "Resuming";
|
|
13352
|
+
InstanceStatus["RETRYING"] = "Retrying";
|
|
13353
|
+
InstanceStatus["RUNNING"] = "Running";
|
|
13354
|
+
InstanceStatus["UPGRADING"] = "Upgrading";
|
|
13355
|
+
})(exports.InstanceStatus || (exports.InstanceStatus = {}));
|
|
13215
13356
|
/**
|
|
13216
13357
|
* Case stage task type
|
|
13217
13358
|
*/
|
|
@@ -13246,6 +13387,8 @@
|
|
|
13246
13387
|
(function (EscalationTriggerType) {
|
|
13247
13388
|
EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
|
|
13248
13389
|
EscalationTriggerType["AT_RISK"] = "at-risk";
|
|
13390
|
+
/** Default value when no escalation rule is defined */
|
|
13391
|
+
EscalationTriggerType["NONE"] = "None";
|
|
13249
13392
|
})(exports.EscalationTriggerType || (exports.EscalationTriggerType = {}));
|
|
13250
13393
|
/**
|
|
13251
13394
|
* SLA duration unit
|
|
@@ -13313,6 +13456,11 @@
|
|
|
13313
13456
|
if (!instanceData.instanceId)
|
|
13314
13457
|
throw new Error('Case instance ID is undefined');
|
|
13315
13458
|
return service.getActionTasks(instanceData.instanceId, options);
|
|
13459
|
+
},
|
|
13460
|
+
async getSlaSummary(options) {
|
|
13461
|
+
if (!instanceData.instanceId)
|
|
13462
|
+
throw new Error('Case instance ID is undefined');
|
|
13463
|
+
return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
|
|
13316
13464
|
}
|
|
13317
13465
|
};
|
|
13318
13466
|
}
|
|
@@ -14867,6 +15015,70 @@
|
|
|
14867
15015
|
};
|
|
14868
15016
|
return await this.taskService.getAll(enhancedOptions);
|
|
14869
15017
|
}
|
|
15018
|
+
/**
|
|
15019
|
+
* Get SLA summary for all case instances across folders.
|
|
15020
|
+
*
|
|
15021
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
15022
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
15023
|
+
*
|
|
15024
|
+
* @param options - Optional filtering and pagination options
|
|
15025
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
15026
|
+
* @example
|
|
15027
|
+
* ```typescript
|
|
15028
|
+
* // Non-paginated (returns top 50 items by default)
|
|
15029
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
15030
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
15031
|
+
*
|
|
15032
|
+
* // Filter by case instance ID
|
|
15033
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
15034
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
15035
|
+
* });
|
|
15036
|
+
*
|
|
15037
|
+
* // Filter by time range
|
|
15038
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
15039
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
15040
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
15041
|
+
* });
|
|
15042
|
+
*
|
|
15043
|
+
* // With pagination
|
|
15044
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
15045
|
+
* if (page1.hasNextPage) {
|
|
15046
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
15047
|
+
* }
|
|
15048
|
+
*
|
|
15049
|
+
* // Jump to specific page
|
|
15050
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
15051
|
+
* ```
|
|
15052
|
+
*/
|
|
15053
|
+
async getSlaSummary(options) {
|
|
15054
|
+
const apiOptions = options ? {
|
|
15055
|
+
...options,
|
|
15056
|
+
startTimeUtc: options.startTimeUtc?.toISOString(),
|
|
15057
|
+
endTimeUtc: options.endTimeUtc?.toISOString()
|
|
15058
|
+
} : undefined;
|
|
15059
|
+
return PaginationHelpers.getAll({
|
|
15060
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
15061
|
+
getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
|
|
15062
|
+
method: HTTP_METHODS.POST,
|
|
15063
|
+
excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
|
|
15064
|
+
transformFn: (item) => ({
|
|
15065
|
+
...item,
|
|
15066
|
+
slaDueTime: toISOUtc(item.slaDueTime),
|
|
15067
|
+
lastModifiedTime: toISOUtc(item.lastModifiedTime)
|
|
15068
|
+
}),
|
|
15069
|
+
pagination: {
|
|
15070
|
+
paginationType: PaginationType.OFFSET,
|
|
15071
|
+
itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
|
|
15072
|
+
totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
|
|
15073
|
+
paginationParams: {
|
|
15074
|
+
pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
15075
|
+
offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
|
|
15076
|
+
countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
|
|
15077
|
+
convertToSkip: false
|
|
15078
|
+
}
|
|
15079
|
+
}
|
|
15080
|
+
}, apiOptions);
|
|
15081
|
+
}
|
|
14870
15082
|
}
|
|
14871
15083
|
__decorate([
|
|
14872
15084
|
track('CaseInstances.GetAll')
|
|
@@ -14895,7 +15107,115 @@
|
|
|
14895
15107
|
__decorate([
|
|
14896
15108
|
track('CaseInstances.GetActionTasks')
|
|
14897
15109
|
], CaseInstancesService.prototype, "getActionTasks", null);
|
|
15110
|
+
__decorate([
|
|
15111
|
+
track('CaseInstances.GetSlaSummary')
|
|
15112
|
+
], CaseInstancesService.prototype, "getSlaSummary", null);
|
|
15113
|
+
|
|
15114
|
+
/**
|
|
15115
|
+
* Validates the `name` argument passed to a `getByName(name, ...)` method.
|
|
15116
|
+
* Trims whitespace and rejects empty/whitespace-only names.
|
|
15117
|
+
*
|
|
15118
|
+
* @param resourceType - Resource label used in error messages (e.g. 'Asset', 'Process')
|
|
15119
|
+
* @param name - Resource name to validate
|
|
15120
|
+
* @returns The trimmed name
|
|
15121
|
+
* @throws ValidationError when `name` is missing or empty after trimming
|
|
15122
|
+
*/
|
|
15123
|
+
function validateName(resourceType, name) {
|
|
15124
|
+
if (!name) {
|
|
15125
|
+
throw new ValidationError({
|
|
15126
|
+
message: `${resourceType} name is required and cannot be empty.`,
|
|
15127
|
+
});
|
|
15128
|
+
}
|
|
15129
|
+
const trimmed = name.trim();
|
|
15130
|
+
if (!trimmed) {
|
|
15131
|
+
throw new ValidationError({
|
|
15132
|
+
message: `${resourceType} name is required and cannot be empty.`,
|
|
15133
|
+
});
|
|
15134
|
+
}
|
|
15135
|
+
return trimmed;
|
|
15136
|
+
}
|
|
15137
|
+
|
|
15138
|
+
/**
|
|
15139
|
+
* Encodes a folder path for the `X-UIPATH-FolderPath-Encoded` header.
|
|
15140
|
+
*
|
|
15141
|
+
* Orchestrator decodes this header as **base64-encoded UTF-16 LE bytes**
|
|
15142
|
+
* (see `HttpHeadersProviderExtensions.GetDecoded` + `OrganizationUnitProvider`
|
|
15143
|
+
* in the Orchestrator repo, which call `Encoding.Unicode.GetString(...)`).
|
|
15144
|
+
* URL-encoding is NOT what the server expects — it must be base64-of-UTF-16-LE
|
|
15145
|
+
* bytes.
|
|
15146
|
+
*
|
|
15147
|
+
* @param folderPath - The folder path (e.g. 'Shared/Finance')
|
|
15148
|
+
* @returns Base64 string suitable for the `X-UIPATH-FolderPath-Encoded` header
|
|
15149
|
+
*/
|
|
15150
|
+
function encodeFolderPathHeader(folderPath) {
|
|
15151
|
+
// Force little-endian regardless of host byte order. `Uint16Array` viewed
|
|
15152
|
+
// as `Uint8Array` would use the host's native order — correct on LE hosts
|
|
15153
|
+
// (x86/ARM-LE) but wrong on BE hosts. `DataView.setUint16(..., true)`
|
|
15154
|
+
// pins LE.
|
|
15155
|
+
const buf = new ArrayBuffer(folderPath.length * 2);
|
|
15156
|
+
const view = new DataView(buf);
|
|
15157
|
+
for (let i = 0; i < folderPath.length; i++) {
|
|
15158
|
+
view.setUint16(i * 2, folderPath.charCodeAt(i), true);
|
|
15159
|
+
}
|
|
15160
|
+
const bytes = new Uint8Array(buf);
|
|
15161
|
+
let binary = '';
|
|
15162
|
+
for (let i = 0; i < bytes.byteLength; i++) {
|
|
15163
|
+
binary += String.fromCharCode(bytes[i]);
|
|
15164
|
+
}
|
|
15165
|
+
// btoa is browser-native; Node 16+ also has it as a global
|
|
15166
|
+
return btoa(binary);
|
|
15167
|
+
}
|
|
14898
15168
|
|
|
15169
|
+
/**
|
|
15170
|
+
* Resolves folder context into the appropriate Orchestrator folder headers.
|
|
15171
|
+
*
|
|
15172
|
+
* Centralized so all folder-scoped methods (e.g. `assets.getByName`,
|
|
15173
|
+
* `processes.getByName`, future Queues/Buckets/Jobs) share one implementation.
|
|
15174
|
+
*
|
|
15175
|
+
* Each input field maps directly to its header — no auto-detection or type
|
|
15176
|
+
* coercion. When multiple fields are supplied, all corresponding headers
|
|
15177
|
+
* are forwarded and the server resolves precedence.
|
|
15178
|
+
*
|
|
15179
|
+
* Routing:
|
|
15180
|
+
* - `folderId` → `X-UIPATH-OrganizationUnitId`
|
|
15181
|
+
* - `folderKey` → `X-UIPATH-FolderKey`
|
|
15182
|
+
* - `folderPath` → `X-UIPATH-FolderPath-Encoded`
|
|
15183
|
+
* - none set + `fallbackFolderKey` → fallback used as `X-UIPATH-FolderKey`
|
|
15184
|
+
* - none set + no fallback → `ValidationError`
|
|
15185
|
+
*
|
|
15186
|
+
* @throws ValidationError when no folder context can be resolved.
|
|
15187
|
+
*/
|
|
15188
|
+
function resolveFolderHeaders(input) {
|
|
15189
|
+
const { folderId, folderKey, folderPath, resourceType, fallbackFolderKey } = input;
|
|
15190
|
+
const trimmedKey = folderKey?.trim();
|
|
15191
|
+
const trimmedPath = folderPath?.trim();
|
|
15192
|
+
const headers = {};
|
|
15193
|
+
if (folderId !== undefined) {
|
|
15194
|
+
headers[FOLDER_ID] = folderId;
|
|
15195
|
+
}
|
|
15196
|
+
if (trimmedKey) {
|
|
15197
|
+
headers[FOLDER_KEY] = trimmedKey;
|
|
15198
|
+
}
|
|
15199
|
+
if (trimmedPath) {
|
|
15200
|
+
headers[FOLDER_PATH_ENCODED] = encodeFolderPathHeader(trimmedPath);
|
|
15201
|
+
}
|
|
15202
|
+
// No explicit folder context → meta-tag fallback or error.
|
|
15203
|
+
if (Object.keys(headers).length === 0) {
|
|
15204
|
+
if (!fallbackFolderKey) {
|
|
15205
|
+
throw new ValidationError({
|
|
15206
|
+
message: `${resourceType} requires folder context: pass \`folderId\`, \`folderKey\`, or \`folderPath\`, or initialize the SDK with a folder context.`,
|
|
15207
|
+
});
|
|
15208
|
+
}
|
|
15209
|
+
headers[FOLDER_KEY] = fallbackFolderKey;
|
|
15210
|
+
}
|
|
15211
|
+
return createHeaders(headers);
|
|
15212
|
+
}
|
|
15213
|
+
|
|
15214
|
+
/**
|
|
15215
|
+
* Matches single-quote characters in OData string literals — escaped to `''`
|
|
15216
|
+
* inside the `$filter=Name eq '…'` clause built by `getByNameLookup`.
|
|
15217
|
+
*/
|
|
15218
|
+
const SINGLE_QUOTE_RE = /'/g;
|
|
14899
15219
|
/**
|
|
14900
15220
|
* Base service for services that need folder-specific functionality.
|
|
14901
15221
|
*
|
|
@@ -14929,6 +15249,68 @@
|
|
|
14929
15249
|
}
|
|
14930
15250
|
return response.data?.value;
|
|
14931
15251
|
}
|
|
15252
|
+
/**
|
|
15253
|
+
* Look up a single resource by name on a folder-scoped OData collection.
|
|
15254
|
+
*
|
|
15255
|
+
* Shared by `getByName` implementations across services (Assets, Processes, etc).
|
|
15256
|
+
* Handles:
|
|
15257
|
+
* - Name validation via `validateName`
|
|
15258
|
+
* - Folder header resolution via `resolveFolderHeaders` (folderId → ID/key
|
|
15259
|
+
* header by type, folderPath → encoded path header, falls back to
|
|
15260
|
+
* init-time `config.folderKey` from the `uipath:folder-key` meta tag)
|
|
15261
|
+
* - OData `$filter=Name eq '…'` with single-quote escaping + `$top=1`
|
|
15262
|
+
* - Empty-result → `NotFoundError` with folder context in the message
|
|
15263
|
+
*
|
|
15264
|
+
* The transform step is caller-provided because each resource has its own
|
|
15265
|
+
* PascalCase → camelCase field mapping.
|
|
15266
|
+
*
|
|
15267
|
+
* @param resourceType - Resource label used in validation + error messages (e.g. 'Asset', 'Process')
|
|
15268
|
+
* @param endpoint - Folder-scoped OData collection endpoint
|
|
15269
|
+
* @param name - Resource name to search for
|
|
15270
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) + OData query options (`expand`, `select`)
|
|
15271
|
+
* @param transform - Maps a raw OData item to the typed response (e.g. PascalCase → camelCase via field map)
|
|
15272
|
+
* @throws ValidationError when inputs are malformed; NotFoundError when no match
|
|
15273
|
+
*/
|
|
15274
|
+
async getByNameLookup(resourceType, endpoint, name, options, transform) {
|
|
15275
|
+
const validatedName = validateName(resourceType, name);
|
|
15276
|
+
const { folderId, folderKey, folderPath, ...queryOptions } = options;
|
|
15277
|
+
const headers = resolveFolderHeaders({
|
|
15278
|
+
folderId,
|
|
15279
|
+
folderKey,
|
|
15280
|
+
folderPath,
|
|
15281
|
+
resourceType: `${resourceType}.getByName`,
|
|
15282
|
+
fallbackFolderKey: this.config.folderKey,
|
|
15283
|
+
});
|
|
15284
|
+
const apiOptions = {
|
|
15285
|
+
...addPrefixToKeys(queryOptions, ODATA_PREFIX, Object.keys(queryOptions)),
|
|
15286
|
+
'$filter': `Name eq '${validatedName.replace(SINGLE_QUOTE_RE, "''")}'`,
|
|
15287
|
+
'$top': '1',
|
|
15288
|
+
};
|
|
15289
|
+
const response = await this.get(endpoint, {
|
|
15290
|
+
headers,
|
|
15291
|
+
params: apiOptions,
|
|
15292
|
+
});
|
|
15293
|
+
const items = response.data?.value;
|
|
15294
|
+
if (!items?.length) {
|
|
15295
|
+
const folderHint = describeFolderForError(folderId, folderKey, folderPath);
|
|
15296
|
+
throw new NotFoundError({
|
|
15297
|
+
message: `${resourceType} '${validatedName}' not found${folderHint}.`,
|
|
15298
|
+
});
|
|
15299
|
+
}
|
|
15300
|
+
return transform(items[0]);
|
|
15301
|
+
}
|
|
15302
|
+
}
|
|
15303
|
+
/** Renders the supplied folder for a NotFoundError message. */
|
|
15304
|
+
function describeFolderForError(folderId, folderKey, folderPath) {
|
|
15305
|
+
const path = folderPath?.trim();
|
|
15306
|
+
if (path)
|
|
15307
|
+
return ` in folder '${path}'`;
|
|
15308
|
+
const key = folderKey?.trim();
|
|
15309
|
+
if (key)
|
|
15310
|
+
return ` in folder (key: ${key})`;
|
|
15311
|
+
if (typeof folderId === 'number')
|
|
15312
|
+
return ` in folder (id: ${folderId})`;
|
|
15313
|
+
return '';
|
|
14932
15314
|
}
|
|
14933
15315
|
|
|
14934
15316
|
/**
|
|
@@ -15026,6 +15408,35 @@
|
|
|
15026
15408
|
const transformedAsset = transformData(pascalToCamelCaseKeys(response.data), AssetMap);
|
|
15027
15409
|
return transformedAsset;
|
|
15028
15410
|
}
|
|
15411
|
+
/**
|
|
15412
|
+
* Retrieves a single asset by name.
|
|
15413
|
+
*
|
|
15414
|
+
* @param name - Asset name to search for
|
|
15415
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional query parameters (`expand`, `select`)
|
|
15416
|
+
* @returns Promise resolving to a single asset
|
|
15417
|
+
* {@link AssetGetResponse}
|
|
15418
|
+
* @example
|
|
15419
|
+
* ```typescript
|
|
15420
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
15421
|
+
*
|
|
15422
|
+
* const assets = new Assets(sdk);
|
|
15423
|
+
*
|
|
15424
|
+
* // By folder ID
|
|
15425
|
+
* await assets.getByName('ApiKey', { folderId: 123 });
|
|
15426
|
+
*
|
|
15427
|
+
* // By folder key (GUID)
|
|
15428
|
+
* await assets.getByName('ApiKey', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
15429
|
+
*
|
|
15430
|
+
* // By folder path
|
|
15431
|
+
* await assets.getByName('ApiKey', { folderPath: 'Shared/Finance' });
|
|
15432
|
+
*
|
|
15433
|
+
* // With expand
|
|
15434
|
+
* await assets.getByName('ApiKey', { folderPath: 'Shared/Finance', expand: 'keyValueList' });
|
|
15435
|
+
* ```
|
|
15436
|
+
*/
|
|
15437
|
+
async getByName(name, options = {}) {
|
|
15438
|
+
return this.getByNameLookup('Asset', ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap));
|
|
15439
|
+
}
|
|
15029
15440
|
}
|
|
15030
15441
|
__decorate([
|
|
15031
15442
|
track('Assets.GetAll')
|
|
@@ -15033,6 +15444,9 @@
|
|
|
15033
15444
|
__decorate([
|
|
15034
15445
|
track('Assets.GetById')
|
|
15035
15446
|
], AssetService.prototype, "getById", null);
|
|
15447
|
+
__decorate([
|
|
15448
|
+
track('Assets.GetByName')
|
|
15449
|
+
], AssetService.prototype, "getByName", null);
|
|
15036
15450
|
|
|
15037
15451
|
/**
|
|
15038
15452
|
* Enum for Asset Value Scope
|
|
@@ -16136,7 +16550,7 @@
|
|
|
16136
16550
|
/**
|
|
16137
16551
|
* Service for interacting with UiPath Orchestrator Processes API
|
|
16138
16552
|
*/
|
|
16139
|
-
class ProcessService extends
|
|
16553
|
+
class ProcessService extends FolderScopedService {
|
|
16140
16554
|
/**
|
|
16141
16555
|
* Gets all processes across folders with optional filtering and folder scoping
|
|
16142
16556
|
*
|
|
@@ -16273,6 +16687,35 @@
|
|
|
16273
16687
|
const transformedProcess = transformData(pascalToCamelCaseKeys(response.data), ProcessMap);
|
|
16274
16688
|
return transformedProcess;
|
|
16275
16689
|
}
|
|
16690
|
+
/**
|
|
16691
|
+
* Retrieves a single process by name.
|
|
16692
|
+
*
|
|
16693
|
+
* @param name - Process name to search for
|
|
16694
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional query parameters (`expand`, `select`)
|
|
16695
|
+
* @returns Promise resolving to a single process
|
|
16696
|
+
* {@link ProcessGetResponse}
|
|
16697
|
+
* @example
|
|
16698
|
+
* ```typescript
|
|
16699
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
16700
|
+
*
|
|
16701
|
+
* const processes = new Processes(sdk);
|
|
16702
|
+
*
|
|
16703
|
+
* // By folder ID
|
|
16704
|
+
* await processes.getByName('MyProcess', { folderId: 123 });
|
|
16705
|
+
*
|
|
16706
|
+
* // By folder key (GUID)
|
|
16707
|
+
* await processes.getByName('MyProcess', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
16708
|
+
*
|
|
16709
|
+
* // By folder path
|
|
16710
|
+
* await processes.getByName('MyProcess', { folderPath: 'Shared/Finance' });
|
|
16711
|
+
*
|
|
16712
|
+
* // With expand
|
|
16713
|
+
* await processes.getByName('MyProcess', { folderPath: 'Shared/Finance', expand: 'entryPoints' });
|
|
16714
|
+
* ```
|
|
16715
|
+
*/
|
|
16716
|
+
async getByName(name, options = {}) {
|
|
16717
|
+
return this.getByNameLookup('Process', PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap));
|
|
16718
|
+
}
|
|
16276
16719
|
}
|
|
16277
16720
|
__decorate([
|
|
16278
16721
|
track('Processes.GetAll')
|
|
@@ -16283,6 +16726,9 @@
|
|
|
16283
16726
|
__decorate([
|
|
16284
16727
|
track('Processes.GetById')
|
|
16285
16728
|
], ProcessService.prototype, "getById", null);
|
|
16729
|
+
__decorate([
|
|
16730
|
+
track('Processes.GetByName')
|
|
16731
|
+
], ProcessService.prototype, "getByName", null);
|
|
16286
16732
|
|
|
16287
16733
|
/**
|
|
16288
16734
|
* Maps fields for Queue entities to ensure consistent naming
|
|
@@ -16760,7 +17206,7 @@
|
|
|
16760
17206
|
};
|
|
16761
17207
|
|
|
16762
17208
|
/**
|
|
16763
|
-
* Constants for User Service
|
|
17209
|
+
* Constants for User Settings Service
|
|
16764
17210
|
*/
|
|
16765
17211
|
/**
|
|
16766
17212
|
* Maps fields for User Settings entities to ensure consistent SDK naming
|