@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/cases/index.mjs
CHANGED
|
@@ -662,6 +662,27 @@ var PaginationType;
|
|
|
662
662
|
/**
|
|
663
663
|
* Collection of utility functions for working with objects
|
|
664
664
|
*/
|
|
665
|
+
/**
|
|
666
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
667
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
668
|
+
* Direct key match takes priority over nested traversal.
|
|
669
|
+
*/
|
|
670
|
+
function resolveNestedField(data, fieldPath) {
|
|
671
|
+
if (!data) {
|
|
672
|
+
return undefined;
|
|
673
|
+
}
|
|
674
|
+
if (fieldPath in data) {
|
|
675
|
+
return data[fieldPath];
|
|
676
|
+
}
|
|
677
|
+
if (!fieldPath.includes('.')) {
|
|
678
|
+
return undefined;
|
|
679
|
+
}
|
|
680
|
+
let value = data;
|
|
681
|
+
for (const part of fieldPath.split('.')) {
|
|
682
|
+
value = value?.[part];
|
|
683
|
+
}
|
|
684
|
+
return value;
|
|
685
|
+
}
|
|
665
686
|
/**
|
|
666
687
|
* Filters out undefined values from an object
|
|
667
688
|
* @param obj The source object
|
|
@@ -900,6 +921,26 @@ const ODATA_PAGINATION = {
|
|
|
900
921
|
/** Default field name for total count in a paginated OData response */
|
|
901
922
|
TOTAL_COUNT_FIELD: '@odata.count'
|
|
902
923
|
};
|
|
924
|
+
/**
|
|
925
|
+
* SLA Summary pagination constants for page-number-based pagination
|
|
926
|
+
*/
|
|
927
|
+
const SLA_SUMMARY_PAGINATION = {
|
|
928
|
+
/** Field name for items in SLA summary response */
|
|
929
|
+
ITEMS_FIELD: 'data',
|
|
930
|
+
/** Dot-notation path for total count in nested pagination object */
|
|
931
|
+
TOTAL_COUNT_FIELD: 'pagination.totalCount'
|
|
932
|
+
};
|
|
933
|
+
/**
|
|
934
|
+
* SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
|
|
935
|
+
*/
|
|
936
|
+
const SLA_SUMMARY_OFFSET_PARAMS = {
|
|
937
|
+
/** Page size parameter name */
|
|
938
|
+
PAGE_SIZE_PARAM: 'PageSize',
|
|
939
|
+
/** Page number parameter name (sent directly, not converted to skip) */
|
|
940
|
+
OFFSET_PARAM: 'PageNumber',
|
|
941
|
+
/** No count param needed */
|
|
942
|
+
COUNT_PARAM: undefined
|
|
943
|
+
};
|
|
903
944
|
/**
|
|
904
945
|
* Process Instance pagination constants for token-based pagination
|
|
905
946
|
*/
|
|
@@ -939,6 +980,14 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
|
|
|
939
980
|
TOKEN_PARAM: 'nextPage'
|
|
940
981
|
};
|
|
941
982
|
|
|
983
|
+
/**
|
|
984
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
985
|
+
* Returns the original value if parsing fails.
|
|
986
|
+
*/
|
|
987
|
+
function toISOUtc(value) {
|
|
988
|
+
const date = new Date(value + ' UTC');
|
|
989
|
+
return isNaN(date.getTime()) ? value : date.toISOString();
|
|
990
|
+
}
|
|
942
991
|
/**
|
|
943
992
|
* Transforms data by mapping fields according to the provided field mapping
|
|
944
993
|
* @param data The source data to transform
|
|
@@ -1398,7 +1447,8 @@ class PaginationHelpers {
|
|
|
1398
1447
|
// Extract and transform items from response
|
|
1399
1448
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1400
1449
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1401
|
-
const
|
|
1450
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1451
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1402
1452
|
// Parse items - automatically handle JSON string responses
|
|
1403
1453
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1404
1454
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1574,8 +1624,9 @@ class BaseService {
|
|
|
1574
1624
|
constructor(instance, headers) {
|
|
1575
1625
|
// Private field - not visible via Object.keys() or any reflection
|
|
1576
1626
|
_BaseService_apiClient.set(this, void 0);
|
|
1577
|
-
const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
|
|
1627
|
+
const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
|
|
1578
1628
|
__classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
|
|
1629
|
+
this.config = { folderKey };
|
|
1579
1630
|
}
|
|
1580
1631
|
/**
|
|
1581
1632
|
* Gets a valid authentication token, refreshing if necessary.
|
|
@@ -1694,9 +1745,17 @@ class BaseService {
|
|
|
1694
1745
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
1695
1746
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
1696
1747
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
1748
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
1749
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
1750
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
1697
1751
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
1698
|
-
if (
|
|
1699
|
-
|
|
1752
|
+
if (convertToSkip) {
|
|
1753
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
1754
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
else {
|
|
1758
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
1700
1759
|
}
|
|
1701
1760
|
{
|
|
1702
1761
|
requestParams[countParam] = true;
|
|
@@ -1727,7 +1786,8 @@ class BaseService {
|
|
|
1727
1786
|
// Extract items and metadata
|
|
1728
1787
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1729
1788
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1730
|
-
const
|
|
1789
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1790
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1731
1791
|
const continuationToken = response.data[continuationTokenField];
|
|
1732
1792
|
// Determine if there are more pages
|
|
1733
1793
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1777,6 +1837,7 @@ _BaseService_apiClient = new WeakMap();
|
|
|
1777
1837
|
*/
|
|
1778
1838
|
const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
1779
1839
|
const PIMS_BASE = 'pims_';
|
|
1840
|
+
const INSIGHTS_RTM_BASE = 'insightsrtm_';
|
|
1780
1841
|
|
|
1781
1842
|
/**
|
|
1782
1843
|
* Orchestrator Service Endpoints
|
|
@@ -1832,6 +1893,10 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1832
1893
|
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
1833
1894
|
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
1834
1895
|
},
|
|
1896
|
+
INSIGHTS: {
|
|
1897
|
+
/** SLA summary for case instances */
|
|
1898
|
+
SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
|
|
1899
|
+
},
|
|
1835
1900
|
};
|
|
1836
1901
|
|
|
1837
1902
|
/**
|
|
@@ -1840,7 +1905,7 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1840
1905
|
// Connection string placeholder that will be replaced during build
|
|
1841
1906
|
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";
|
|
1842
1907
|
// SDK Version placeholder
|
|
1843
|
-
const SDK_VERSION = "1.3.
|
|
1908
|
+
const SDK_VERSION = "1.3.8";
|
|
1844
1909
|
const VERSION = "Version";
|
|
1845
1910
|
const SERVICE = "Service";
|
|
1846
1911
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -2241,6 +2306,41 @@ var DebugMode;
|
|
|
2241
2306
|
* Case Instance Types
|
|
2242
2307
|
* Types and interfaces for Maestro case instance management
|
|
2243
2308
|
*/
|
|
2309
|
+
/**
|
|
2310
|
+
* SLA status for a case instance
|
|
2311
|
+
*/
|
|
2312
|
+
var SlaSummaryStatus;
|
|
2313
|
+
(function (SlaSummaryStatus) {
|
|
2314
|
+
/** Case is within SLA deadline */
|
|
2315
|
+
SlaSummaryStatus["ON_TRACK"] = "On Track";
|
|
2316
|
+
/** Case is approaching SLA deadline based on at-risk percentage threshold */
|
|
2317
|
+
SlaSummaryStatus["AT_RISK"] = "At Risk";
|
|
2318
|
+
/** Case has exceeded SLA deadline */
|
|
2319
|
+
SlaSummaryStatus["OVERDUE"] = "Overdue";
|
|
2320
|
+
/** Case instance has completed */
|
|
2321
|
+
SlaSummaryStatus["COMPLETED"] = "Completed";
|
|
2322
|
+
/** SLA status cannot be determined (no SLA deadline defined) */
|
|
2323
|
+
SlaSummaryStatus["UNKNOWN"] = "Unknown";
|
|
2324
|
+
})(SlaSummaryStatus || (SlaSummaryStatus = {}));
|
|
2325
|
+
/**
|
|
2326
|
+
* Instance status values for case instances and process instances
|
|
2327
|
+
*/
|
|
2328
|
+
var InstanceStatus;
|
|
2329
|
+
(function (InstanceStatus) {
|
|
2330
|
+
/** Instance status not yet populated by the backend */
|
|
2331
|
+
InstanceStatus["UNKNOWN"] = "";
|
|
2332
|
+
InstanceStatus["CANCELLED"] = "Cancelled";
|
|
2333
|
+
InstanceStatus["CANCELING"] = "Canceling";
|
|
2334
|
+
InstanceStatus["COMPLETED"] = "Completed";
|
|
2335
|
+
InstanceStatus["FAULTED"] = "Faulted";
|
|
2336
|
+
InstanceStatus["PAUSED"] = "Paused";
|
|
2337
|
+
InstanceStatus["PAUSING"] = "Pausing";
|
|
2338
|
+
InstanceStatus["PENDING"] = "Pending";
|
|
2339
|
+
InstanceStatus["RESUMING"] = "Resuming";
|
|
2340
|
+
InstanceStatus["RETRYING"] = "Retrying";
|
|
2341
|
+
InstanceStatus["RUNNING"] = "Running";
|
|
2342
|
+
InstanceStatus["UPGRADING"] = "Upgrading";
|
|
2343
|
+
})(InstanceStatus || (InstanceStatus = {}));
|
|
2244
2344
|
/**
|
|
2245
2345
|
* Case stage task type
|
|
2246
2346
|
*/
|
|
@@ -2275,6 +2375,8 @@ var EscalationTriggerType;
|
|
|
2275
2375
|
(function (EscalationTriggerType) {
|
|
2276
2376
|
EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
|
|
2277
2377
|
EscalationTriggerType["AT_RISK"] = "at-risk";
|
|
2378
|
+
/** Default value when no escalation rule is defined */
|
|
2379
|
+
EscalationTriggerType["NONE"] = "None";
|
|
2278
2380
|
})(EscalationTriggerType || (EscalationTriggerType = {}));
|
|
2279
2381
|
/**
|
|
2280
2382
|
* SLA duration unit
|
|
@@ -2342,6 +2444,11 @@ function createCaseInstanceMethods(instanceData, service) {
|
|
|
2342
2444
|
if (!instanceData.instanceId)
|
|
2343
2445
|
throw new Error('Case instance ID is undefined');
|
|
2344
2446
|
return service.getActionTasks(instanceData.instanceId, options);
|
|
2447
|
+
},
|
|
2448
|
+
async getSlaSummary(options) {
|
|
2449
|
+
if (!instanceData.instanceId)
|
|
2450
|
+
throw new Error('Case instance ID is undefined');
|
|
2451
|
+
return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
|
|
2345
2452
|
}
|
|
2346
2453
|
};
|
|
2347
2454
|
}
|
|
@@ -3507,6 +3614,70 @@ class CaseInstancesService extends BaseService {
|
|
|
3507
3614
|
};
|
|
3508
3615
|
return await this.taskService.getAll(enhancedOptions);
|
|
3509
3616
|
}
|
|
3617
|
+
/**
|
|
3618
|
+
* Get SLA summary for all case instances across folders.
|
|
3619
|
+
*
|
|
3620
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
3621
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
3622
|
+
*
|
|
3623
|
+
* @param options - Optional filtering and pagination options
|
|
3624
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
3625
|
+
* @example
|
|
3626
|
+
* ```typescript
|
|
3627
|
+
* // Non-paginated (returns top 50 items by default)
|
|
3628
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
3629
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
3630
|
+
*
|
|
3631
|
+
* // Filter by case instance ID
|
|
3632
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
3633
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
3634
|
+
* });
|
|
3635
|
+
*
|
|
3636
|
+
* // Filter by time range
|
|
3637
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
3638
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
3639
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
3640
|
+
* });
|
|
3641
|
+
*
|
|
3642
|
+
* // With pagination
|
|
3643
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
3644
|
+
* if (page1.hasNextPage) {
|
|
3645
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
3646
|
+
* }
|
|
3647
|
+
*
|
|
3648
|
+
* // Jump to specific page
|
|
3649
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
3650
|
+
* ```
|
|
3651
|
+
*/
|
|
3652
|
+
async getSlaSummary(options) {
|
|
3653
|
+
const apiOptions = options ? {
|
|
3654
|
+
...options,
|
|
3655
|
+
startTimeUtc: options.startTimeUtc?.toISOString(),
|
|
3656
|
+
endTimeUtc: options.endTimeUtc?.toISOString()
|
|
3657
|
+
} : undefined;
|
|
3658
|
+
return PaginationHelpers.getAll({
|
|
3659
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
3660
|
+
getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
|
|
3661
|
+
method: HTTP_METHODS.POST,
|
|
3662
|
+
excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
|
|
3663
|
+
transformFn: (item) => ({
|
|
3664
|
+
...item,
|
|
3665
|
+
slaDueTime: toISOUtc(item.slaDueTime),
|
|
3666
|
+
lastModifiedTime: toISOUtc(item.lastModifiedTime)
|
|
3667
|
+
}),
|
|
3668
|
+
pagination: {
|
|
3669
|
+
paginationType: PaginationType.OFFSET,
|
|
3670
|
+
itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
|
|
3671
|
+
totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
|
|
3672
|
+
paginationParams: {
|
|
3673
|
+
pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
3674
|
+
offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
|
|
3675
|
+
countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
|
|
3676
|
+
convertToSkip: false
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
}, apiOptions);
|
|
3680
|
+
}
|
|
3510
3681
|
}
|
|
3511
3682
|
__decorate([
|
|
3512
3683
|
track('CaseInstances.GetAll')
|
|
@@ -3535,5 +3706,8 @@ __decorate([
|
|
|
3535
3706
|
__decorate([
|
|
3536
3707
|
track('CaseInstances.GetActionTasks')
|
|
3537
3708
|
], CaseInstancesService.prototype, "getActionTasks", null);
|
|
3709
|
+
__decorate([
|
|
3710
|
+
track('CaseInstances.GetSlaSummary')
|
|
3711
|
+
], CaseInstancesService.prototype, "getSlaSummary", null);
|
|
3538
3712
|
|
|
3539
|
-
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, SLADurationUnit, StageTaskType, createCaseInstanceWithMethods };
|
|
3713
|
+
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, InstanceStatus, SLADurationUnit, SlaSummaryStatus, StageTaskType, createCaseInstanceWithMethods };
|