@uipath/uipath-typescript 1.3.8 → 1.3.10
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 +44 -276
- package/dist/assets/index.mjs +44 -276
- package/dist/attachments/index.cjs +42 -273
- package/dist/attachments/index.mjs +42 -273
- package/dist/buckets/index.cjs +195 -276
- package/dist/buckets/index.d.ts +213 -1
- package/dist/buckets/index.mjs +195 -276
- package/dist/cases/index.cjs +427 -343
- package/dist/cases/index.d.ts +534 -2
- package/dist/cases/index.mjs +428 -344
- package/dist/conversational-agent/index.cjs +90 -287
- package/dist/conversational-agent/index.d.ts +62 -12
- package/dist/conversational-agent/index.mjs +90 -288
- package/dist/core/index.cjs +39 -289
- package/dist/core/index.d.ts +9 -98
- package/dist/core/index.mjs +40 -275
- package/dist/document-understanding/index.cjs +18 -1
- package/dist/document-understanding/index.d.ts +636 -610
- package/dist/document-understanding/index.mjs +18 -1
- package/dist/entities/index.cjs +251 -277
- package/dist/entities/index.d.ts +305 -2
- package/dist/entities/index.mjs +251 -277
- package/dist/feedback/index.cjs +42 -274
- package/dist/feedback/index.mjs +42 -274
- package/dist/index.cjs +998 -351
- package/dist/index.d.ts +2159 -762
- package/dist/index.mjs +998 -337
- package/dist/index.umd.js +1208 -237
- package/dist/jobs/index.cjs +44 -276
- package/dist/jobs/index.mjs +44 -276
- package/dist/maestro-processes/index.cjs +1761 -1717
- package/dist/maestro-processes/index.d.ts +430 -2
- package/dist/maestro-processes/index.mjs +1762 -1718
- package/dist/processes/index.cjs +72 -305
- package/dist/processes/index.d.ts +76 -26
- package/dist/processes/index.mjs +72 -305
- package/dist/queues/index.cjs +44 -276
- package/dist/queues/index.mjs +44 -276
- package/dist/tasks/index.cjs +44 -276
- package/dist/tasks/index.mjs +44 -276
- package/package.json +8 -10
package/dist/cases/index.d.ts
CHANGED
|
@@ -1,5 +1,101 @@
|
|
|
1
1
|
import { IUiPath } from '../core/index';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Insights Types
|
|
5
|
+
* Shared types for Maestro insights analytics endpoints
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Optional filters for Insights "top" endpoint queries.
|
|
9
|
+
* All fields are optional — pass any combination to narrow results.
|
|
10
|
+
*/
|
|
11
|
+
interface TopQueryOptions {
|
|
12
|
+
/** Filter by package identifier */
|
|
13
|
+
packageId?: string;
|
|
14
|
+
/** Filter by process key */
|
|
15
|
+
processKey?: string;
|
|
16
|
+
/** Filter by package version */
|
|
17
|
+
version?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Common fields returned by all Insights "top" endpoints
|
|
21
|
+
*/
|
|
22
|
+
interface GetTopBaseResponse {
|
|
23
|
+
/** The package identifier */
|
|
24
|
+
packageId: string;
|
|
25
|
+
/** The unique process key */
|
|
26
|
+
processKey: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Response for the top run count Insights endpoint
|
|
30
|
+
*/
|
|
31
|
+
interface GetTopRunCountResponse extends GetTopBaseResponse {
|
|
32
|
+
/** Number of times the process was run in the given time range */
|
|
33
|
+
runCount: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Response for the top failure count Insights endpoint
|
|
37
|
+
*/
|
|
38
|
+
interface GetTopFaultedCountResponse extends GetTopBaseResponse {
|
|
39
|
+
/** Number of faulted instances in the given time range */
|
|
40
|
+
faultedCount: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Time bucketing granularity for insights time-series queries.
|
|
44
|
+
*
|
|
45
|
+
* Controls how data points are grouped on the time axis.
|
|
46
|
+
*/
|
|
47
|
+
declare enum TimeInterval {
|
|
48
|
+
/** Group data points by hour */
|
|
49
|
+
Hour = "HOUR",
|
|
50
|
+
/** Group data points by day */
|
|
51
|
+
Day = "DAY",
|
|
52
|
+
/** Group data points by week */
|
|
53
|
+
Week = "WEEK"
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Options for insights time-series queries.
|
|
57
|
+
*/
|
|
58
|
+
interface TimelineOptions {
|
|
59
|
+
/**
|
|
60
|
+
* How to group data points on the time axis.
|
|
61
|
+
* @default TimeInterval.Day
|
|
62
|
+
*/
|
|
63
|
+
groupBy?: TimeInterval;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Final instance statuses returned by the instance status timeline endpoint.
|
|
67
|
+
*
|
|
68
|
+
* Only includes statuses where the instance has finished execution — Completed, Faulted, or Cancelled.
|
|
69
|
+
* Active statuses like Running or Paused are not included.
|
|
70
|
+
*/
|
|
71
|
+
declare enum InstanceFinalStatus {
|
|
72
|
+
/** Instance completed successfully */
|
|
73
|
+
Completed = "Completed",
|
|
74
|
+
/** Instance encountered an error */
|
|
75
|
+
Faulted = "Faulted",
|
|
76
|
+
/** Instance was cancelled */
|
|
77
|
+
Cancelled = "Cancelled"
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Instance count for a process with a given status
|
|
81
|
+
* within a specific time bucket.
|
|
82
|
+
*/
|
|
83
|
+
interface InstanceStatusTimelineResponse {
|
|
84
|
+
/** Start of the time bucket in local timezone (e.g. `"5/8/2026 12:00:00 AM"`) */
|
|
85
|
+
startTime: string;
|
|
86
|
+
/** Instance status */
|
|
87
|
+
status: InstanceFinalStatus;
|
|
88
|
+
/** Number of instances with this status in the time bucket */
|
|
89
|
+
count: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Response for the top duration Insights endpoint
|
|
93
|
+
*/
|
|
94
|
+
interface GetTopDurationResponse extends GetTopBaseResponse {
|
|
95
|
+
/** Total execution duration in milliseconds */
|
|
96
|
+
duration: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
3
99
|
/**
|
|
4
100
|
* Simplified universal pagination cursor
|
|
5
101
|
* Used to fetch next/previous pages
|
|
@@ -98,6 +194,7 @@ interface RequestOptions extends BaseOptions {
|
|
|
98
194
|
* Maestro Cases Types
|
|
99
195
|
* Types and interfaces for Maestro case management
|
|
100
196
|
*/
|
|
197
|
+
|
|
101
198
|
/**
|
|
102
199
|
* Case information with instance statistics
|
|
103
200
|
*/
|
|
@@ -137,6 +234,27 @@ interface CaseGetAllResponse {
|
|
|
137
234
|
/** Case instance count - canceling */
|
|
138
235
|
cancelingCount: number;
|
|
139
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Response for a single entry in top cases by run count
|
|
239
|
+
*/
|
|
240
|
+
interface CaseGetTopRunCountResponse extends GetTopRunCountResponse {
|
|
241
|
+
/** Human-readable case name */
|
|
242
|
+
name: string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Response for a single entry in top cases by failure count
|
|
246
|
+
*/
|
|
247
|
+
interface CaseGetTopFaultedCountResponse extends GetTopFaultedCountResponse {
|
|
248
|
+
/** Human-readable case name */
|
|
249
|
+
name: string;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Response for a single entry in top cases by duration
|
|
253
|
+
*/
|
|
254
|
+
interface CaseGetTopDurationResponse extends GetTopDurationResponse {
|
|
255
|
+
/** Human-readable case name */
|
|
256
|
+
name: string;
|
|
257
|
+
}
|
|
140
258
|
|
|
141
259
|
/**
|
|
142
260
|
* Maestro Cases Models
|
|
@@ -177,6 +295,161 @@ interface CasesServiceModel {
|
|
|
177
295
|
* ```
|
|
178
296
|
*/
|
|
179
297
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
298
|
+
/**
|
|
299
|
+
* Get the top 5 case processes ranked by run count within a time range.
|
|
300
|
+
*
|
|
301
|
+
* Returns an array of up to 5 case processes sorted by how many times they were executed,
|
|
302
|
+
* useful for identifying the most active case processes in a given period.
|
|
303
|
+
*
|
|
304
|
+
* @param startTime - Start of the time range to query
|
|
305
|
+
* @param endTime - End of the time range to query
|
|
306
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
307
|
+
* @returns Promise resolving to an array of {@link CaseGetTopRunCountResponse}
|
|
308
|
+
* @example
|
|
309
|
+
* ```typescript
|
|
310
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
311
|
+
*
|
|
312
|
+
* const cases = new Cases(sdk);
|
|
313
|
+
*
|
|
314
|
+
* // Get top case processes by run count for the last 7 days
|
|
315
|
+
* const topProcesses = await cases.getTopRunCount(
|
|
316
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
317
|
+
* new Date()
|
|
318
|
+
* );
|
|
319
|
+
*
|
|
320
|
+
* for (const process of topProcesses) {
|
|
321
|
+
* console.log(`${process.packageId}: ${process.runCount} runs`);
|
|
322
|
+
* }
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```typescript
|
|
327
|
+
* // Get top case processes by run count for a specific package
|
|
328
|
+
* const filtered = await cases.getTopRunCount(
|
|
329
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
330
|
+
* new Date(),
|
|
331
|
+
* { packageId: '<packageId>' }
|
|
332
|
+
* );
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
getTopRunCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopRunCountResponse[]>;
|
|
336
|
+
/**
|
|
337
|
+
* Get the top 10 case processes ranked by failure count within a time range.
|
|
338
|
+
*
|
|
339
|
+
* Returns an array of up to 10 case processes sorted by how many instances faulted,
|
|
340
|
+
* useful for identifying the most error-prone case processes in a given period.
|
|
341
|
+
*
|
|
342
|
+
* @param startTime - Start of the time range to query
|
|
343
|
+
* @param endTime - End of the time range to query
|
|
344
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
345
|
+
* @returns Promise resolving to an array of {@link CaseGetTopFaultedCountResponse}
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
349
|
+
*
|
|
350
|
+
* const cases = new Cases(sdk);
|
|
351
|
+
*
|
|
352
|
+
* // Get top case processes by faulted count for the last 7 days
|
|
353
|
+
* const topFailing = await cases.getTopFaultedCount(
|
|
354
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
355
|
+
* new Date()
|
|
356
|
+
* );
|
|
357
|
+
*
|
|
358
|
+
* for (const process of topFailing) {
|
|
359
|
+
* console.log(`${process.packageId}: ${process.faultedCount} failures`);
|
|
360
|
+
* }
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* // Get top case processes by faulted count for a specific package
|
|
366
|
+
* const filtered = await cases.getTopFaultedCount(
|
|
367
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
368
|
+
* new Date(),
|
|
369
|
+
* { packageId: '<packageId>' }
|
|
370
|
+
* );
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
getTopFaultedCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopFaultedCountResponse[]>;
|
|
374
|
+
/**
|
|
375
|
+
* Get all instances status counts aggregated by date for case management processes.
|
|
376
|
+
*
|
|
377
|
+
* Returns time-grouped counts of case instances grouped by status (Completed, Faulted, Cancelled),
|
|
378
|
+
* useful for rendering time-series charts. Use `groupBy` to control the time bucket size
|
|
379
|
+
* (hour, day, or week) — defaults to day if not provided.
|
|
380
|
+
*
|
|
381
|
+
* @param startTime - Start of the time range to query
|
|
382
|
+
* @param endTime - End of the time range to query
|
|
383
|
+
* @param options - Optional settings for time bucketing granularity
|
|
384
|
+
* @returns Promise resolving to an array of {@link InstanceStatusTimelineResponse}
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* ```typescript
|
|
388
|
+
* // Get daily instance status for the last 7 days
|
|
389
|
+
* const now = new Date();
|
|
390
|
+
* const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
|
|
391
|
+
* const statuses = await cases.getInstanceStatusTimeline(sevenDaysAgo, now);
|
|
392
|
+
*
|
|
393
|
+
* for (const entry of statuses) {
|
|
394
|
+
* console.log(`${entry.startTime} — ${entry.status}: ${entry.count}`);
|
|
395
|
+
* }
|
|
396
|
+
* ```
|
|
397
|
+
*
|
|
398
|
+
* @example
|
|
399
|
+
* ```typescript
|
|
400
|
+
* import { TimeInterval } from '@uipath/uipath-typescript/cases';
|
|
401
|
+
*
|
|
402
|
+
* // Get weekly breakdown
|
|
403
|
+
* const statuses = await cases.getInstanceStatusTimeline(startTime, endTime, {
|
|
404
|
+
* groupBy: TimeInterval.Week,
|
|
405
|
+
* });
|
|
406
|
+
* ```
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* ```typescript
|
|
410
|
+
* // Get all-time data (from Unix epoch to now)
|
|
411
|
+
* const allTime = await cases.getInstanceStatusTimeline(new Date(0), new Date());
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
getInstanceStatusTimeline(startTime: Date, endTime: Date, options?: TimelineOptions): Promise<InstanceStatusTimelineResponse[]>;
|
|
415
|
+
/**
|
|
416
|
+
* Get the top 5 case processes ranked by total duration within a time range.
|
|
417
|
+
*
|
|
418
|
+
* Returns an array of up to 5 case processes sorted by their total execution time,
|
|
419
|
+
* useful for identifying the longest-running case processes in a given period.
|
|
420
|
+
*
|
|
421
|
+
* @param startTime - Start of the time range to query
|
|
422
|
+
* @param endTime - End of the time range to query
|
|
423
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
424
|
+
* @returns Promise resolving to an array of {@link CaseGetTopDurationResponse}
|
|
425
|
+
* @example
|
|
426
|
+
* ```typescript
|
|
427
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
428
|
+
*
|
|
429
|
+
* const cases = new Cases(sdk);
|
|
430
|
+
*
|
|
431
|
+
* // Get top case processes by duration for the last 7 days
|
|
432
|
+
* const topProcesses = await cases.getTopExecutionDuration(
|
|
433
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
434
|
+
* new Date()
|
|
435
|
+
* );
|
|
436
|
+
*
|
|
437
|
+
* for (const process of topProcesses) {
|
|
438
|
+
* console.log(`${process.packageId}: ${process.duration}ms total`);
|
|
439
|
+
* }
|
|
440
|
+
* ```
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```typescript
|
|
444
|
+
* // Get top case processes by duration for a specific package
|
|
445
|
+
* const filtered = await cases.getTopExecutionDuration(
|
|
446
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
447
|
+
* new Date(),
|
|
448
|
+
* { packageId: '<packageId>' }
|
|
449
|
+
* );
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
getTopExecutionDuration(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopDurationResponse[]>;
|
|
180
453
|
}
|
|
181
454
|
|
|
182
455
|
/**
|
|
@@ -338,6 +611,41 @@ type CaseInstanceSlaSummaryOptions = PaginationOptions & {
|
|
|
338
611
|
/** Filter by event end time in UTC */
|
|
339
612
|
endTimeUtc?: Date;
|
|
340
613
|
};
|
|
614
|
+
/**
|
|
615
|
+
* Stage SLA summary for a single stage within a case instance (from Insights RTM)
|
|
616
|
+
*/
|
|
617
|
+
interface CaseInstanceStageSLAStage {
|
|
618
|
+
/** Stage element identifier */
|
|
619
|
+
elementId: string;
|
|
620
|
+
/** Stage display name */
|
|
621
|
+
name: string;
|
|
622
|
+
/** Current execution status of the stage */
|
|
623
|
+
latestStatus: string;
|
|
624
|
+
/** SLA deadline timestamp in UTC (e.g. `"9/17/2025 8:35:38 PM"`) or empty string if no SLA is configured */
|
|
625
|
+
slaDueTime: string;
|
|
626
|
+
/** SLA status for this stage */
|
|
627
|
+
slaStatus: SlaSummaryStatus;
|
|
628
|
+
/** Index of the current escalation rule */
|
|
629
|
+
escalationRuleIndex: string;
|
|
630
|
+
/** Type of the current escalation rule */
|
|
631
|
+
escalationRuleType: EscalationTriggerType;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Stages SLA summary for a single case instance (from Insights RTM)
|
|
635
|
+
*/
|
|
636
|
+
interface CaseInstanceStageSLAResponse {
|
|
637
|
+
/** Case instance identifier */
|
|
638
|
+
caseInstanceId: string;
|
|
639
|
+
/** Stages within this case instance */
|
|
640
|
+
stages: CaseInstanceStageSLAStage[];
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Options for querying stages SLA summary
|
|
644
|
+
*/
|
|
645
|
+
interface CaseInstanceStageSLAOptions {
|
|
646
|
+
/** Filter to a specific case instance */
|
|
647
|
+
caseInstanceId?: string;
|
|
648
|
+
}
|
|
341
649
|
/**
|
|
342
650
|
* Case stage task type
|
|
343
651
|
*/
|
|
@@ -783,6 +1091,11 @@ type TaskGetResponse = RawTaskGetResponse & TaskMethods;
|
|
|
783
1091
|
* const caseInstances = new CaseInstances(sdk);
|
|
784
1092
|
* const allInstances = await caseInstances.getAll();
|
|
785
1093
|
* ```
|
|
1094
|
+
*
|
|
1095
|
+
* !!! note
|
|
1096
|
+
* Methods that rely on the Insights Real-Time Monitoring service (`getSlaSummary`, `getStagesSlaSummary`)
|
|
1097
|
+
* may have up to ~1 minute latency before reflecting the latest updates. See
|
|
1098
|
+
* [Real-Time Monitoring Overview](https://docs.uipath.com/insights/automation-cloud/latest/user-guide/real-time-monitoring-overview) for details.
|
|
786
1099
|
*/
|
|
787
1100
|
interface CaseInstancesServiceModel {
|
|
788
1101
|
/**
|
|
@@ -1050,6 +1363,35 @@ interface CaseInstancesServiceModel {
|
|
|
1050
1363
|
* ```
|
|
1051
1364
|
*/
|
|
1052
1365
|
getSlaSummary<T extends CaseInstanceSlaSummaryOptions = CaseInstanceSlaSummaryOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
1366
|
+
/**
|
|
1367
|
+
* Get stages SLA summary for case instances across folders.
|
|
1368
|
+
*
|
|
1369
|
+
* Returns stage-level SLA status and escalation information for each case instance, aggregated from Insights Real-Time Monitoring.
|
|
1370
|
+
*
|
|
1371
|
+
* @param options - Optional filtering options
|
|
1372
|
+
* @returns Promise resolving to an array of {@link CaseInstanceStageSLAResponse}
|
|
1373
|
+
* @example
|
|
1374
|
+
* ```typescript
|
|
1375
|
+
* // Get stages SLA summary for all case instances
|
|
1376
|
+
* const stagesSla = await caseInstances.getStagesSlaSummary();
|
|
1377
|
+
* for (const item of stagesSla) {
|
|
1378
|
+
* console.log(`Instance: ${item.caseInstanceId}`);
|
|
1379
|
+
* for (const stage of item.stages) {
|
|
1380
|
+
* console.log(` Stage: ${stage.name} - SLA Status: ${stage.slaStatus}, Due: ${stage.slaDueTime}`);
|
|
1381
|
+
* }
|
|
1382
|
+
* }
|
|
1383
|
+
*
|
|
1384
|
+
* // Filter by case instance ID
|
|
1385
|
+
* const filtered = await caseInstances.getStagesSlaSummary({
|
|
1386
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
1387
|
+
* });
|
|
1388
|
+
*
|
|
1389
|
+
* // Using bound method on a case instance
|
|
1390
|
+
* const instance = await caseInstances.getById('<instanceId>', '<folderKey>');
|
|
1391
|
+
* const stagesSla = await instance.getStagesSlaSummary();
|
|
1392
|
+
* ```
|
|
1393
|
+
*/
|
|
1394
|
+
getStagesSlaSummary(options?: CaseInstanceStageSLAOptions): Promise<CaseInstanceStageSLAResponse[]>;
|
|
1053
1395
|
}
|
|
1054
1396
|
interface CaseInstanceMethods {
|
|
1055
1397
|
/**
|
|
@@ -1107,6 +1449,12 @@ interface CaseInstanceMethods {
|
|
|
1107
1449
|
* @returns Promise resolving to SLA summary items for this case instance
|
|
1108
1450
|
*/
|
|
1109
1451
|
getSlaSummary<T extends Omit<CaseInstanceSlaSummaryOptions, 'caseInstanceId'> = Omit<CaseInstanceSlaSummaryOptions, 'caseInstanceId'>>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
1452
|
+
/**
|
|
1453
|
+
* Gets the stages SLA summary for this case instance.
|
|
1454
|
+
*
|
|
1455
|
+
* @returns Promise resolving to an array of stage SLA summary items for this case instance
|
|
1456
|
+
*/
|
|
1457
|
+
getStagesSlaSummary(): Promise<CaseInstanceStageSLAResponse[]>;
|
|
1110
1458
|
}
|
|
1111
1459
|
type CaseInstanceGetResponse = RawCaseInstanceGetResponse & CaseInstanceMethods;
|
|
1112
1460
|
/**
|
|
@@ -1373,6 +1721,161 @@ declare class CasesService extends BaseService implements CasesServiceModel {
|
|
|
1373
1721
|
* ```
|
|
1374
1722
|
*/
|
|
1375
1723
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
1724
|
+
/**
|
|
1725
|
+
* Get the top 5 case processes ranked by run count within a time range.
|
|
1726
|
+
*
|
|
1727
|
+
* Returns an array of up to 5 case processes sorted by how many times they were executed,
|
|
1728
|
+
* useful for identifying the most active case processes in a given period.
|
|
1729
|
+
*
|
|
1730
|
+
* @param startTime - Start of the time range to query
|
|
1731
|
+
* @param endTime - End of the time range to query
|
|
1732
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
1733
|
+
* @returns Promise resolving to an array of {@link CaseGetTopRunCountResponse}
|
|
1734
|
+
* @example
|
|
1735
|
+
* ```typescript
|
|
1736
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
1737
|
+
*
|
|
1738
|
+
* const cases = new Cases(sdk);
|
|
1739
|
+
*
|
|
1740
|
+
* // Get top case processes by run count for the last 7 days
|
|
1741
|
+
* const topProcesses = await cases.getTopRunCount(
|
|
1742
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1743
|
+
* new Date()
|
|
1744
|
+
* );
|
|
1745
|
+
*
|
|
1746
|
+
* for (const process of topProcesses) {
|
|
1747
|
+
* console.log(`${process.packageId}: ${process.runCount} runs`);
|
|
1748
|
+
* }
|
|
1749
|
+
* ```
|
|
1750
|
+
*
|
|
1751
|
+
* @example
|
|
1752
|
+
* ```typescript
|
|
1753
|
+
* // Get top case processes by run count for a specific package
|
|
1754
|
+
* const filtered = await cases.getTopRunCount(
|
|
1755
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1756
|
+
* new Date(),
|
|
1757
|
+
* { packageId: '<packageId>' }
|
|
1758
|
+
* );
|
|
1759
|
+
* ```
|
|
1760
|
+
*/
|
|
1761
|
+
getTopRunCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopRunCountResponse[]>;
|
|
1762
|
+
/**
|
|
1763
|
+
* Get all instances status counts aggregated by date for case management processes.
|
|
1764
|
+
*
|
|
1765
|
+
* Returns time-grouped counts of case instances grouped by status (Completed, Faulted, Cancelled),
|
|
1766
|
+
* useful for rendering time-series charts. Use `groupBy` to control the time bucket size
|
|
1767
|
+
* (hour, day, or week) — defaults to day if not provided.
|
|
1768
|
+
*
|
|
1769
|
+
* @param startTime - Start of the time range to query
|
|
1770
|
+
* @param endTime - End of the time range to query
|
|
1771
|
+
* @param options - Optional settings for time bucketing granularity
|
|
1772
|
+
* @returns Promise resolving to an array of {@link InstanceStatusTimelineResponse}
|
|
1773
|
+
*
|
|
1774
|
+
* @example
|
|
1775
|
+
* ```typescript
|
|
1776
|
+
* // Get daily instance status for the last 7 days
|
|
1777
|
+
* const now = new Date();
|
|
1778
|
+
* const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
|
|
1779
|
+
* const statuses = await cases.getInstanceStatusTimeline(sevenDaysAgo, now);
|
|
1780
|
+
*
|
|
1781
|
+
* for (const entry of statuses) {
|
|
1782
|
+
* console.log(`${entry.startTime} — ${entry.status}: ${entry.count}`);
|
|
1783
|
+
* }
|
|
1784
|
+
* ```
|
|
1785
|
+
*
|
|
1786
|
+
* @example
|
|
1787
|
+
* ```typescript
|
|
1788
|
+
* import { TimeInterval } from '@uipath/uipath-typescript/cases';
|
|
1789
|
+
*
|
|
1790
|
+
* // Get weekly breakdown
|
|
1791
|
+
* const statuses = await cases.getInstanceStatusTimeline(startTime, endTime, {
|
|
1792
|
+
* groupBy: TimeInterval.Week,
|
|
1793
|
+
* });
|
|
1794
|
+
* ```
|
|
1795
|
+
*
|
|
1796
|
+
* @example
|
|
1797
|
+
* ```typescript
|
|
1798
|
+
* // Get all-time data (from Unix epoch to now)
|
|
1799
|
+
* const allTime = await cases.getInstanceStatusTimeline(new Date(0), new Date());
|
|
1800
|
+
* ```
|
|
1801
|
+
*/
|
|
1802
|
+
getInstanceStatusTimeline(startTime: Date, endTime: Date, options?: TimelineOptions): Promise<InstanceStatusTimelineResponse[]>;
|
|
1803
|
+
/**
|
|
1804
|
+
* Get the top 10 case processes ranked by failure count within a time range.
|
|
1805
|
+
*
|
|
1806
|
+
* Returns an array of up to 10 case processes sorted by how many instances faulted,
|
|
1807
|
+
* useful for identifying the most error-prone case processes in a given period.
|
|
1808
|
+
*
|
|
1809
|
+
* @param startTime - Start of the time range to query
|
|
1810
|
+
* @param endTime - End of the time range to query
|
|
1811
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
1812
|
+
* @returns Promise resolving to an array of {@link CaseGetTopFaultedCountResponse}
|
|
1813
|
+
* @example
|
|
1814
|
+
* ```typescript
|
|
1815
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
1816
|
+
*
|
|
1817
|
+
* const cases = new Cases(sdk);
|
|
1818
|
+
*
|
|
1819
|
+
* // Get top case processes by faulted count for the last 7 days
|
|
1820
|
+
* const topFailing = await cases.getTopFaultedCount(
|
|
1821
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1822
|
+
* new Date()
|
|
1823
|
+
* );
|
|
1824
|
+
*
|
|
1825
|
+
* for (const process of topFailing) {
|
|
1826
|
+
* console.log(`${process.packageId}: ${process.faultedCount} failures`);
|
|
1827
|
+
* }
|
|
1828
|
+
* ```
|
|
1829
|
+
*
|
|
1830
|
+
* @example
|
|
1831
|
+
* ```typescript
|
|
1832
|
+
* // Get top case processes by faulted count for a specific package
|
|
1833
|
+
* const filtered = await cases.getTopFaultedCount(
|
|
1834
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1835
|
+
* new Date(),
|
|
1836
|
+
* { packageId: '<packageId>' }
|
|
1837
|
+
* );
|
|
1838
|
+
* ```
|
|
1839
|
+
*/
|
|
1840
|
+
getTopFaultedCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopFaultedCountResponse[]>;
|
|
1841
|
+
/**
|
|
1842
|
+
* Get the top 5 case processes ranked by total duration within a time range.
|
|
1843
|
+
*
|
|
1844
|
+
* Returns an array of up to 5 case processes sorted by their total execution time,
|
|
1845
|
+
* useful for identifying the longest-running case processes in a given period.
|
|
1846
|
+
*
|
|
1847
|
+
* @param startTime - Start of the time range to query
|
|
1848
|
+
* @param endTime - End of the time range to query
|
|
1849
|
+
* @param options - Optional filters (packageId, processKey, version)
|
|
1850
|
+
* @returns Promise resolving to an array of {@link CaseGetTopDurationResponse}
|
|
1851
|
+
* @example
|
|
1852
|
+
* ```typescript
|
|
1853
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
1854
|
+
*
|
|
1855
|
+
* const cases = new Cases(sdk);
|
|
1856
|
+
*
|
|
1857
|
+
* // Get top case processes by duration for the last 7 days
|
|
1858
|
+
* const topProcesses = await cases.getTopExecutionDuration(
|
|
1859
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1860
|
+
* new Date()
|
|
1861
|
+
* );
|
|
1862
|
+
*
|
|
1863
|
+
* for (const process of topProcesses) {
|
|
1864
|
+
* console.log(`${process.packageId}: ${process.duration}ms total`);
|
|
1865
|
+
* }
|
|
1866
|
+
* ```
|
|
1867
|
+
*
|
|
1868
|
+
* @example
|
|
1869
|
+
* ```typescript
|
|
1870
|
+
* // Get top case processes by duration for a specific package
|
|
1871
|
+
* const filtered = await cases.getTopExecutionDuration(
|
|
1872
|
+
* new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
|
|
1873
|
+
* new Date(),
|
|
1874
|
+
* { packageId: '<packageId>' }
|
|
1875
|
+
* );
|
|
1876
|
+
* ```
|
|
1877
|
+
*/
|
|
1878
|
+
getTopExecutionDuration(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<CaseGetTopDurationResponse[]>;
|
|
1376
1879
|
/**
|
|
1377
1880
|
* Extract a readable case name from the packageId
|
|
1378
1881
|
* @param packageId - The full package identifier
|
|
@@ -1599,7 +2102,36 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
1599
2102
|
* ```
|
|
1600
2103
|
*/
|
|
1601
2104
|
getSlaSummary<T extends CaseInstanceSlaSummaryOptions = CaseInstanceSlaSummaryOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<SlaSummaryResponse> : NonPaginatedResponse<SlaSummaryResponse>>;
|
|
2105
|
+
/**
|
|
2106
|
+
* Get stages SLA summary for case instances across folders.
|
|
2107
|
+
*
|
|
2108
|
+
* Returns stage-level SLA status and escalation information for each case instance, aggregated from Insights Real-Time Monitoring.
|
|
2109
|
+
*
|
|
2110
|
+
* @param options - Optional filtering options
|
|
2111
|
+
* @returns Promise resolving to an array of {@link CaseInstanceStageSLAResponse}
|
|
2112
|
+
* @example
|
|
2113
|
+
* ```typescript
|
|
2114
|
+
* // Get stages SLA summary for all case instances
|
|
2115
|
+
* const stagesSla = await caseInstances.getStagesSlaSummary();
|
|
2116
|
+
* for (const item of stagesSla) {
|
|
2117
|
+
* console.log(`Instance: ${item.caseInstanceId}`);
|
|
2118
|
+
* for (const stage of item.stages) {
|
|
2119
|
+
* console.log(` Stage: ${stage.name} - SLA Status: ${stage.slaStatus}, Due: ${stage.slaDueTime}`);
|
|
2120
|
+
* }
|
|
2121
|
+
* }
|
|
2122
|
+
*
|
|
2123
|
+
* // Filter by case instance ID
|
|
2124
|
+
* const filtered = await caseInstances.getStagesSlaSummary({
|
|
2125
|
+
* caseInstanceId: '<caseInstanceId>'
|
|
2126
|
+
* });
|
|
2127
|
+
*
|
|
2128
|
+
* // Using bound method on a case instance
|
|
2129
|
+
* const instance = await caseInstances.getById('<instanceId>', '<folderKey>');
|
|
2130
|
+
* const stagesSla = await instance.getStagesSlaSummary();
|
|
2131
|
+
* ```
|
|
2132
|
+
*/
|
|
2133
|
+
getStagesSlaSummary(options?: CaseInstanceStageSLAOptions): Promise<CaseInstanceStageSLAResponse[]>;
|
|
1602
2134
|
}
|
|
1603
2135
|
|
|
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 };
|
|
2136
|
+
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, InstanceFinalStatus, InstanceStatus, SLADurationUnit, SlaSummaryStatus, StageTaskType, TimeInterval, createCaseInstanceWithMethods };
|
|
2137
|
+
export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseGetTopDurationResponse, CaseGetTopFaultedCountResponse, CaseGetTopRunCountResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstanceSlaSummaryOptions, CaseInstanceStageSLAOptions, CaseInstanceStageSLAResponse, CaseInstanceStageSLAStage, CaseInstancesServiceModel, CasesServiceModel, ElementExecutionMetadata, ElementRunMetadata, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, GetTopBaseResponse, GetTopDurationResponse, GetTopFaultedCountResponse, GetTopRunCountResponse, InstanceStatusTimelineResponse, RawCaseInstanceGetResponse, SlaSummaryResponse, StageSLA, StageTask, TimelineOptions, TopQueryOptions };
|