@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.cjs
CHANGED
|
@@ -664,6 +664,27 @@ var PaginationType;
|
|
|
664
664
|
/**
|
|
665
665
|
* Collection of utility functions for working with objects
|
|
666
666
|
*/
|
|
667
|
+
/**
|
|
668
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
669
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
670
|
+
* Direct key match takes priority over nested traversal.
|
|
671
|
+
*/
|
|
672
|
+
function resolveNestedField(data, fieldPath) {
|
|
673
|
+
if (!data) {
|
|
674
|
+
return undefined;
|
|
675
|
+
}
|
|
676
|
+
if (fieldPath in data) {
|
|
677
|
+
return data[fieldPath];
|
|
678
|
+
}
|
|
679
|
+
if (!fieldPath.includes('.')) {
|
|
680
|
+
return undefined;
|
|
681
|
+
}
|
|
682
|
+
let value = data;
|
|
683
|
+
for (const part of fieldPath.split('.')) {
|
|
684
|
+
value = value?.[part];
|
|
685
|
+
}
|
|
686
|
+
return value;
|
|
687
|
+
}
|
|
667
688
|
/**
|
|
668
689
|
* Filters out undefined values from an object
|
|
669
690
|
* @param obj The source object
|
|
@@ -902,6 +923,26 @@ const ODATA_PAGINATION = {
|
|
|
902
923
|
/** Default field name for total count in a paginated OData response */
|
|
903
924
|
TOTAL_COUNT_FIELD: '@odata.count'
|
|
904
925
|
};
|
|
926
|
+
/**
|
|
927
|
+
* SLA Summary pagination constants for page-number-based pagination
|
|
928
|
+
*/
|
|
929
|
+
const SLA_SUMMARY_PAGINATION = {
|
|
930
|
+
/** Field name for items in SLA summary response */
|
|
931
|
+
ITEMS_FIELD: 'data',
|
|
932
|
+
/** Dot-notation path for total count in nested pagination object */
|
|
933
|
+
TOTAL_COUNT_FIELD: 'pagination.totalCount'
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
|
|
937
|
+
*/
|
|
938
|
+
const SLA_SUMMARY_OFFSET_PARAMS = {
|
|
939
|
+
/** Page size parameter name */
|
|
940
|
+
PAGE_SIZE_PARAM: 'PageSize',
|
|
941
|
+
/** Page number parameter name (sent directly, not converted to skip) */
|
|
942
|
+
OFFSET_PARAM: 'PageNumber',
|
|
943
|
+
/** No count param needed */
|
|
944
|
+
COUNT_PARAM: undefined
|
|
945
|
+
};
|
|
905
946
|
/**
|
|
906
947
|
* Process Instance pagination constants for token-based pagination
|
|
907
948
|
*/
|
|
@@ -941,6 +982,14 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
|
|
|
941
982
|
TOKEN_PARAM: 'nextPage'
|
|
942
983
|
};
|
|
943
984
|
|
|
985
|
+
/**
|
|
986
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
987
|
+
* Returns the original value if parsing fails.
|
|
988
|
+
*/
|
|
989
|
+
function toISOUtc(value) {
|
|
990
|
+
const date = new Date(value + ' UTC');
|
|
991
|
+
return isNaN(date.getTime()) ? value : date.toISOString();
|
|
992
|
+
}
|
|
944
993
|
/**
|
|
945
994
|
* Transforms data by mapping fields according to the provided field mapping
|
|
946
995
|
* @param data The source data to transform
|
|
@@ -1400,7 +1449,8 @@ class PaginationHelpers {
|
|
|
1400
1449
|
// Extract and transform items from response
|
|
1401
1450
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1402
1451
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1403
|
-
const
|
|
1452
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1453
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1404
1454
|
// Parse items - automatically handle JSON string responses
|
|
1405
1455
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1406
1456
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1576,8 +1626,9 @@ class BaseService {
|
|
|
1576
1626
|
constructor(instance, headers) {
|
|
1577
1627
|
// Private field - not visible via Object.keys() or any reflection
|
|
1578
1628
|
_BaseService_apiClient.set(this, void 0);
|
|
1579
|
-
const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
|
|
1629
|
+
const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
|
|
1580
1630
|
__classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
|
|
1631
|
+
this.config = { folderKey };
|
|
1581
1632
|
}
|
|
1582
1633
|
/**
|
|
1583
1634
|
* Gets a valid authentication token, refreshing if necessary.
|
|
@@ -1696,9 +1747,17 @@ class BaseService {
|
|
|
1696
1747
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
1697
1748
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
1698
1749
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
1750
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
1751
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
1752
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
1699
1753
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
1700
|
-
if (
|
|
1701
|
-
|
|
1754
|
+
if (convertToSkip) {
|
|
1755
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
1756
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
else {
|
|
1760
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
1702
1761
|
}
|
|
1703
1762
|
{
|
|
1704
1763
|
requestParams[countParam] = true;
|
|
@@ -1729,7 +1788,8 @@ class BaseService {
|
|
|
1729
1788
|
// Extract items and metadata
|
|
1730
1789
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1731
1790
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1732
|
-
const
|
|
1791
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1792
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1733
1793
|
const continuationToken = response.data[continuationTokenField];
|
|
1734
1794
|
// Determine if there are more pages
|
|
1735
1795
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1779,6 +1839,7 @@ _BaseService_apiClient = new WeakMap();
|
|
|
1779
1839
|
*/
|
|
1780
1840
|
const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
1781
1841
|
const PIMS_BASE = 'pims_';
|
|
1842
|
+
const INSIGHTS_RTM_BASE = 'insightsrtm_';
|
|
1782
1843
|
|
|
1783
1844
|
/**
|
|
1784
1845
|
* Orchestrator Service Endpoints
|
|
@@ -1834,6 +1895,10 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1834
1895
|
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
1835
1896
|
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
1836
1897
|
},
|
|
1898
|
+
INSIGHTS: {
|
|
1899
|
+
/** SLA summary for case instances */
|
|
1900
|
+
SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
|
|
1901
|
+
},
|
|
1837
1902
|
};
|
|
1838
1903
|
|
|
1839
1904
|
/**
|
|
@@ -1842,7 +1907,7 @@ const MAESTRO_ENDPOINTS = {
|
|
|
1842
1907
|
// Connection string placeholder that will be replaced during build
|
|
1843
1908
|
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";
|
|
1844
1909
|
// SDK Version placeholder
|
|
1845
|
-
const SDK_VERSION = "1.3.
|
|
1910
|
+
const SDK_VERSION = "1.3.8";
|
|
1846
1911
|
const VERSION = "Version";
|
|
1847
1912
|
const SERVICE = "Service";
|
|
1848
1913
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -2243,6 +2308,41 @@ var DebugMode;
|
|
|
2243
2308
|
* Case Instance Types
|
|
2244
2309
|
* Types and interfaces for Maestro case instance management
|
|
2245
2310
|
*/
|
|
2311
|
+
/**
|
|
2312
|
+
* SLA status for a case instance
|
|
2313
|
+
*/
|
|
2314
|
+
exports.SlaSummaryStatus = void 0;
|
|
2315
|
+
(function (SlaSummaryStatus) {
|
|
2316
|
+
/** Case is within SLA deadline */
|
|
2317
|
+
SlaSummaryStatus["ON_TRACK"] = "On Track";
|
|
2318
|
+
/** Case is approaching SLA deadline based on at-risk percentage threshold */
|
|
2319
|
+
SlaSummaryStatus["AT_RISK"] = "At Risk";
|
|
2320
|
+
/** Case has exceeded SLA deadline */
|
|
2321
|
+
SlaSummaryStatus["OVERDUE"] = "Overdue";
|
|
2322
|
+
/** Case instance has completed */
|
|
2323
|
+
SlaSummaryStatus["COMPLETED"] = "Completed";
|
|
2324
|
+
/** SLA status cannot be determined (no SLA deadline defined) */
|
|
2325
|
+
SlaSummaryStatus["UNKNOWN"] = "Unknown";
|
|
2326
|
+
})(exports.SlaSummaryStatus || (exports.SlaSummaryStatus = {}));
|
|
2327
|
+
/**
|
|
2328
|
+
* Instance status values for case instances and process instances
|
|
2329
|
+
*/
|
|
2330
|
+
exports.InstanceStatus = void 0;
|
|
2331
|
+
(function (InstanceStatus) {
|
|
2332
|
+
/** Instance status not yet populated by the backend */
|
|
2333
|
+
InstanceStatus["UNKNOWN"] = "";
|
|
2334
|
+
InstanceStatus["CANCELLED"] = "Cancelled";
|
|
2335
|
+
InstanceStatus["CANCELING"] = "Canceling";
|
|
2336
|
+
InstanceStatus["COMPLETED"] = "Completed";
|
|
2337
|
+
InstanceStatus["FAULTED"] = "Faulted";
|
|
2338
|
+
InstanceStatus["PAUSED"] = "Paused";
|
|
2339
|
+
InstanceStatus["PAUSING"] = "Pausing";
|
|
2340
|
+
InstanceStatus["PENDING"] = "Pending";
|
|
2341
|
+
InstanceStatus["RESUMING"] = "Resuming";
|
|
2342
|
+
InstanceStatus["RETRYING"] = "Retrying";
|
|
2343
|
+
InstanceStatus["RUNNING"] = "Running";
|
|
2344
|
+
InstanceStatus["UPGRADING"] = "Upgrading";
|
|
2345
|
+
})(exports.InstanceStatus || (exports.InstanceStatus = {}));
|
|
2246
2346
|
/**
|
|
2247
2347
|
* Case stage task type
|
|
2248
2348
|
*/
|
|
@@ -2277,6 +2377,8 @@ exports.EscalationTriggerType = void 0;
|
|
|
2277
2377
|
(function (EscalationTriggerType) {
|
|
2278
2378
|
EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
|
|
2279
2379
|
EscalationTriggerType["AT_RISK"] = "at-risk";
|
|
2380
|
+
/** Default value when no escalation rule is defined */
|
|
2381
|
+
EscalationTriggerType["NONE"] = "None";
|
|
2280
2382
|
})(exports.EscalationTriggerType || (exports.EscalationTriggerType = {}));
|
|
2281
2383
|
/**
|
|
2282
2384
|
* SLA duration unit
|
|
@@ -2344,6 +2446,11 @@ function createCaseInstanceMethods(instanceData, service) {
|
|
|
2344
2446
|
if (!instanceData.instanceId)
|
|
2345
2447
|
throw new Error('Case instance ID is undefined');
|
|
2346
2448
|
return service.getActionTasks(instanceData.instanceId, options);
|
|
2449
|
+
},
|
|
2450
|
+
async getSlaSummary(options) {
|
|
2451
|
+
if (!instanceData.instanceId)
|
|
2452
|
+
throw new Error('Case instance ID is undefined');
|
|
2453
|
+
return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
|
|
2347
2454
|
}
|
|
2348
2455
|
};
|
|
2349
2456
|
}
|
|
@@ -3509,6 +3616,70 @@ class CaseInstancesService extends BaseService {
|
|
|
3509
3616
|
};
|
|
3510
3617
|
return await this.taskService.getAll(enhancedOptions);
|
|
3511
3618
|
}
|
|
3619
|
+
/**
|
|
3620
|
+
* Get SLA summary for all case instances across folders.
|
|
3621
|
+
*
|
|
3622
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
3623
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
3624
|
+
*
|
|
3625
|
+
* @param options - Optional filtering and pagination options
|
|
3626
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
3627
|
+
* @example
|
|
3628
|
+
* ```typescript
|
|
3629
|
+
* // Non-paginated (returns top 50 items by default)
|
|
3630
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
3631
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
3632
|
+
*
|
|
3633
|
+
* // Filter by case instance ID
|
|
3634
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
3635
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
3636
|
+
* });
|
|
3637
|
+
*
|
|
3638
|
+
* // Filter by time range
|
|
3639
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
3640
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
3641
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
3642
|
+
* });
|
|
3643
|
+
*
|
|
3644
|
+
* // With pagination
|
|
3645
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
3646
|
+
* if (page1.hasNextPage) {
|
|
3647
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
3648
|
+
* }
|
|
3649
|
+
*
|
|
3650
|
+
* // Jump to specific page
|
|
3651
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
3652
|
+
* ```
|
|
3653
|
+
*/
|
|
3654
|
+
async getSlaSummary(options) {
|
|
3655
|
+
const apiOptions = options ? {
|
|
3656
|
+
...options,
|
|
3657
|
+
startTimeUtc: options.startTimeUtc?.toISOString(),
|
|
3658
|
+
endTimeUtc: options.endTimeUtc?.toISOString()
|
|
3659
|
+
} : undefined;
|
|
3660
|
+
return PaginationHelpers.getAll({
|
|
3661
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
3662
|
+
getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
|
|
3663
|
+
method: HTTP_METHODS.POST,
|
|
3664
|
+
excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
|
|
3665
|
+
transformFn: (item) => ({
|
|
3666
|
+
...item,
|
|
3667
|
+
slaDueTime: toISOUtc(item.slaDueTime),
|
|
3668
|
+
lastModifiedTime: toISOUtc(item.lastModifiedTime)
|
|
3669
|
+
}),
|
|
3670
|
+
pagination: {
|
|
3671
|
+
paginationType: PaginationType.OFFSET,
|
|
3672
|
+
itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
|
|
3673
|
+
totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
|
|
3674
|
+
paginationParams: {
|
|
3675
|
+
pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
3676
|
+
offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
|
|
3677
|
+
countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
|
|
3678
|
+
convertToSkip: false
|
|
3679
|
+
}
|
|
3680
|
+
}
|
|
3681
|
+
}, apiOptions);
|
|
3682
|
+
}
|
|
3512
3683
|
}
|
|
3513
3684
|
__decorate([
|
|
3514
3685
|
track('CaseInstances.GetAll')
|
|
@@ -3537,6 +3708,9 @@ __decorate([
|
|
|
3537
3708
|
__decorate([
|
|
3538
3709
|
track('CaseInstances.GetActionTasks')
|
|
3539
3710
|
], CaseInstancesService.prototype, "getActionTasks", null);
|
|
3711
|
+
__decorate([
|
|
3712
|
+
track('CaseInstances.GetSlaSummary')
|
|
3713
|
+
], CaseInstancesService.prototype, "getSlaSummary", null);
|
|
3540
3714
|
|
|
3541
3715
|
exports.CaseInstances = CaseInstancesService;
|
|
3542
3716
|
exports.CaseInstancesService = CaseInstancesService;
|
package/dist/cases/index.d.ts
CHANGED
|
@@ -266,6 +266,78 @@ interface CaseAppConfig {
|
|
|
266
266
|
caseSummary?: string;
|
|
267
267
|
overview?: CaseAppOverview[];
|
|
268
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* SLA status for a case instance
|
|
271
|
+
*/
|
|
272
|
+
declare enum SlaSummaryStatus {
|
|
273
|
+
/** Case is within SLA deadline */
|
|
274
|
+
ON_TRACK = "On Track",
|
|
275
|
+
/** Case is approaching SLA deadline based on at-risk percentage threshold */
|
|
276
|
+
AT_RISK = "At Risk",
|
|
277
|
+
/** Case has exceeded SLA deadline */
|
|
278
|
+
OVERDUE = "Overdue",
|
|
279
|
+
/** Case instance has completed */
|
|
280
|
+
COMPLETED = "Completed",
|
|
281
|
+
/** SLA status cannot be determined (no SLA deadline defined) */
|
|
282
|
+
UNKNOWN = "Unknown"
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Instance status values for case instances and process instances
|
|
286
|
+
*/
|
|
287
|
+
declare enum InstanceStatus {
|
|
288
|
+
/** Instance status not yet populated by the backend */
|
|
289
|
+
UNKNOWN = "",
|
|
290
|
+
CANCELLED = "Cancelled",
|
|
291
|
+
CANCELING = "Canceling",
|
|
292
|
+
COMPLETED = "Completed",
|
|
293
|
+
FAULTED = "Faulted",
|
|
294
|
+
PAUSED = "Paused",
|
|
295
|
+
PAUSING = "Pausing",
|
|
296
|
+
PENDING = "Pending",
|
|
297
|
+
RESUMING = "Resuming",
|
|
298
|
+
RETRYING = "Retrying",
|
|
299
|
+
RUNNING = "Running",
|
|
300
|
+
UPGRADING = "Upgrading"
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* SLA summary response for a single case instance
|
|
304
|
+
*/
|
|
305
|
+
interface SlaSummaryResponse {
|
|
306
|
+
/** Unique identifier of the case instance */
|
|
307
|
+
caseInstanceId: string;
|
|
308
|
+
/** Folder key that the case instance belongs to */
|
|
309
|
+
folderKey: string;
|
|
310
|
+
/** Display name of the SLA rule */
|
|
311
|
+
name: string;
|
|
312
|
+
/** Human-readable reference number for a case instance */
|
|
313
|
+
externalId: string;
|
|
314
|
+
/** Summary text for the case instance — may be empty */
|
|
315
|
+
caseSummary: string;
|
|
316
|
+
/** Unique key of the process associated with the case instance */
|
|
317
|
+
processKey: string;
|
|
318
|
+
/** SLA deadline timestamp in UTC (ISO 8601 format) */
|
|
319
|
+
slaDueTime: string;
|
|
320
|
+
/** Current SLA status indicating whether the deadline is met, at risk, or breached */
|
|
321
|
+
slaStatus: SlaSummaryStatus;
|
|
322
|
+
/** Index of the escalation rule currently applied to the SLA */
|
|
323
|
+
escalationRuleIndex: string;
|
|
324
|
+
escalationRuleType: EscalationTriggerType;
|
|
325
|
+
/** Current status of the case instance */
|
|
326
|
+
instanceStatus: InstanceStatus;
|
|
327
|
+
/** Last modification timestamp in UTC (ISO 8601 format) */
|
|
328
|
+
lastModifiedTime: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Options for querying SLA summary
|
|
332
|
+
*/
|
|
333
|
+
type CaseInstanceSlaSummaryOptions = PaginationOptions & {
|
|
334
|
+
/** Filter to a specific case instance */
|
|
335
|
+
caseInstanceId?: string;
|
|
336
|
+
/** Filter by event start time in UTC */
|
|
337
|
+
startTimeUtc?: Date;
|
|
338
|
+
/** Filter by event end time in UTC */
|
|
339
|
+
endTimeUtc?: Date;
|
|
340
|
+
};
|
|
269
341
|
/**
|
|
270
342
|
* Case stage task type
|
|
271
343
|
*/
|
|
@@ -324,7 +396,9 @@ interface EscalationAction {
|
|
|
324
396
|
*/
|
|
325
397
|
declare enum EscalationTriggerType {
|
|
326
398
|
SLA_BREACHED = "sla-breached",
|
|
327
|
-
AT_RISK = "at-risk"
|
|
399
|
+
AT_RISK = "at-risk",
|
|
400
|
+
/** Default value when no escalation rule is defined */
|
|
401
|
+
NONE = "None"
|
|
328
402
|
}
|
|
329
403
|
/**
|
|
330
404
|
* Escalation rule trigger metadata
|
|
@@ -940,6 +1014,42 @@ interface CaseInstancesServiceModel {
|
|
|
940
1014
|
* ```
|
|
941
1015
|
*/
|
|
942
1016
|
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Get SLA summary for all case instances across folders.
|
|
1019
|
+
*
|
|
1020
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
1021
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
1022
|
+
*
|
|
1023
|
+
* @param options - Optional filtering and pagination options
|
|
1024
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
1025
|
+
* @example
|
|
1026
|
+
* ```typescript
|
|
1027
|
+
* // Non-paginated (returns top 50 items by default)
|
|
1028
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
1029
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
1030
|
+
*
|
|
1031
|
+
* // Filter by case instance ID
|
|
1032
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
1033
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
1034
|
+
* });
|
|
1035
|
+
*
|
|
1036
|
+
* // Filter by time range
|
|
1037
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
1038
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
1039
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
1040
|
+
* });
|
|
1041
|
+
*
|
|
1042
|
+
* // With pagination
|
|
1043
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
1044
|
+
* if (page1.hasNextPage) {
|
|
1045
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
1046
|
+
* }
|
|
1047
|
+
*
|
|
1048
|
+
* // Jump to specific page
|
|
1049
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
1050
|
+
* ```
|
|
1051
|
+
*/
|
|
1052
|
+
getSlaSummary<T extends CaseInstanceSlaSummaryOptions = CaseInstanceSlaSummaryOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
943
1053
|
}
|
|
944
1054
|
interface CaseInstanceMethods {
|
|
945
1055
|
/**
|
|
@@ -989,6 +1099,14 @@ interface CaseInstanceMethods {
|
|
|
989
1099
|
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
990
1100
|
*/
|
|
991
1101
|
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
1102
|
+
/**
|
|
1103
|
+
* Gets the SLA summary for this case instance.
|
|
1104
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
1105
|
+
*
|
|
1106
|
+
* @param options - Optional time range filtering and pagination options
|
|
1107
|
+
* @returns Promise resolving to SLA summary items for this case instance
|
|
1108
|
+
*/
|
|
1109
|
+
getSlaSummary<T extends Omit<CaseInstanceSlaSummaryOptions, 'caseInstanceId'> = Omit<CaseInstanceSlaSummaryOptions, 'caseInstanceId'>>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
992
1110
|
}
|
|
993
1111
|
type CaseInstanceGetResponse = RawCaseInstanceGetResponse & CaseInstanceMethods;
|
|
994
1112
|
/**
|
|
@@ -1038,6 +1156,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
|
|
|
1038
1156
|
offsetParam?: string;
|
|
1039
1157
|
tokenParam?: string;
|
|
1040
1158
|
countParam?: string;
|
|
1159
|
+
convertToSkip?: boolean;
|
|
1041
1160
|
};
|
|
1042
1161
|
};
|
|
1043
1162
|
}
|
|
@@ -1150,6 +1269,13 @@ interface ApiResponse<T> {
|
|
|
1150
1269
|
*/
|
|
1151
1270
|
declare class BaseService {
|
|
1152
1271
|
#private;
|
|
1272
|
+
/**
|
|
1273
|
+
* SDK configuration (read-only). Available to subclasses so they can
|
|
1274
|
+
* fall back to init-time defaults like `folderKey`.
|
|
1275
|
+
*/
|
|
1276
|
+
protected readonly config: {
|
|
1277
|
+
folderKey?: string;
|
|
1278
|
+
};
|
|
1153
1279
|
/**
|
|
1154
1280
|
* Creates a base service instance with dependency injection.
|
|
1155
1281
|
*
|
|
@@ -1437,7 +1563,43 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
1437
1563
|
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
1438
1564
|
*/
|
|
1439
1565
|
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
1566
|
+
/**
|
|
1567
|
+
* Get SLA summary for all case instances across folders.
|
|
1568
|
+
*
|
|
1569
|
+
* Returns SLA status, due times, escalation info, and instance metadata for each case instance.
|
|
1570
|
+
* The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
|
|
1571
|
+
*
|
|
1572
|
+
* @param options - Optional filtering and pagination options
|
|
1573
|
+
* @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
|
|
1574
|
+
* @example
|
|
1575
|
+
* ```typescript
|
|
1576
|
+
* // Non-paginated (returns top 50 items by default)
|
|
1577
|
+
* const summary = await caseInstances.getSlaSummary();
|
|
1578
|
+
* console.log(`Found ${summary.totalCount} cases`);
|
|
1579
|
+
*
|
|
1580
|
+
* // Filter by case instance ID
|
|
1581
|
+
* const filtered = await caseInstances.getSlaSummary({
|
|
1582
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
1583
|
+
* });
|
|
1584
|
+
*
|
|
1585
|
+
* // Filter by time range
|
|
1586
|
+
* const timeFiltered = await caseInstances.getSlaSummary({
|
|
1587
|
+
* startTimeUtc: new Date('2026-01-01'),
|
|
1588
|
+
* endTimeUtc: new Date('2026-01-31')
|
|
1589
|
+
* });
|
|
1590
|
+
*
|
|
1591
|
+
* // With pagination
|
|
1592
|
+
* const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
|
|
1593
|
+
* if (page1.hasNextPage) {
|
|
1594
|
+
* const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
|
|
1595
|
+
* }
|
|
1596
|
+
*
|
|
1597
|
+
* // Jump to specific page
|
|
1598
|
+
* const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
|
|
1599
|
+
* ```
|
|
1600
|
+
*/
|
|
1601
|
+
getSlaSummary<T extends CaseInstanceSlaSummaryOptions = CaseInstanceSlaSummaryOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
1440
1602
|
}
|
|
1441
1603
|
|
|
1442
|
-
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, SLADurationUnit, StageTaskType, createCaseInstanceWithMethods };
|
|
1443
|
-
export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ElementExecutionMetadata, ElementRunMetadata, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, RawCaseInstanceGetResponse, StageSLA, StageTask };
|
|
1604
|
+
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, InstanceStatus, SLADurationUnit, SlaSummaryStatus, StageTaskType, createCaseInstanceWithMethods };
|
|
1605
|
+
export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstanceSlaSummaryOptions, CaseInstancesServiceModel, CasesServiceModel, ElementExecutionMetadata, ElementRunMetadata, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, RawCaseInstanceGetResponse, SlaSummaryResponse, StageSLA, StageTask };
|