@uipath/uipath-typescript 1.3.10 → 1.4.0

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.
Files changed (56) hide show
  1. package/dist/agent-memory/index.cjs +1765 -0
  2. package/dist/agent-memory/index.d.ts +588 -0
  3. package/dist/agent-memory/index.mjs +1763 -0
  4. package/dist/agents/index.cjs +1726 -0
  5. package/dist/agents/index.d.ts +502 -0
  6. package/dist/agents/index.mjs +1724 -0
  7. package/dist/assets/index.cjs +155 -30
  8. package/dist/assets/index.d.ts +84 -5
  9. package/dist/assets/index.mjs +155 -30
  10. package/dist/attachments/index.cjs +37 -6
  11. package/dist/attachments/index.d.ts +1 -0
  12. package/dist/attachments/index.mjs +37 -6
  13. package/dist/buckets/index.cjs +37 -6
  14. package/dist/buckets/index.d.ts +1 -0
  15. package/dist/buckets/index.mjs +37 -6
  16. package/dist/cases/index.cjs +192 -10
  17. package/dist/cases/index.d.ts +208 -7
  18. package/dist/cases/index.mjs +192 -11
  19. package/dist/conversational-agent/index.cjs +124 -57
  20. package/dist/conversational-agent/index.d.ts +190 -122
  21. package/dist/conversational-agent/index.mjs +124 -57
  22. package/dist/core/index.cjs +413 -105
  23. package/dist/core/index.d.ts +15 -0
  24. package/dist/core/index.mjs +413 -105
  25. package/dist/entities/index.cjs +135 -70
  26. package/dist/entities/index.d.ts +146 -45
  27. package/dist/entities/index.mjs +135 -70
  28. package/dist/feedback/index.cjs +37 -6
  29. package/dist/feedback/index.d.ts +1 -0
  30. package/dist/feedback/index.mjs +37 -6
  31. package/dist/governance/index.cjs +1782 -0
  32. package/dist/governance/index.d.ts +598 -0
  33. package/dist/governance/index.mjs +1780 -0
  34. package/dist/index.cjs +1050 -291
  35. package/dist/index.d.ts +1313 -134
  36. package/dist/index.mjs +1050 -292
  37. package/dist/index.umd.js +4546 -3770
  38. package/dist/jobs/index.cjs +37 -6
  39. package/dist/jobs/index.d.ts +1 -0
  40. package/dist/jobs/index.mjs +37 -6
  41. package/dist/maestro-processes/index.cjs +224 -18
  42. package/dist/maestro-processes/index.d.ts +221 -9
  43. package/dist/maestro-processes/index.mjs +224 -18
  44. package/dist/processes/index.cjs +37 -6
  45. package/dist/processes/index.d.ts +1 -0
  46. package/dist/processes/index.mjs +37 -6
  47. package/dist/queues/index.cjs +37 -6
  48. package/dist/queues/index.d.ts +1 -0
  49. package/dist/queues/index.mjs +37 -6
  50. package/dist/tasks/index.cjs +37 -6
  51. package/dist/tasks/index.d.ts +1 -0
  52. package/dist/tasks/index.mjs +37 -6
  53. package/dist/traces/index.cjs +1933 -0
  54. package/dist/traces/index.d.ts +566 -0
  55. package/dist/traces/index.mjs +1931 -0
  56. package/package.json +42 -2
@@ -39,6 +39,20 @@ interface GetTopFaultedCountResponse extends GetTopBaseResponse {
39
39
  /** Number of faulted instances in the given time range */
40
40
  faultedCount: number;
41
41
  }
42
+ /**
43
+ * SDK response for top elements with failure.
44
+ * Shared by both MaestroProcesses and Cases — no service-specific enrichment.
45
+ */
46
+ interface ElementGetTopFailedCountResponse {
47
+ /** BPMN element name (falls back to element ID if name is empty) */
48
+ elementName: string;
49
+ /** BPMN element type (e.g. ServiceTask, ReceiveTask, IntermediateCatchEvent) */
50
+ elementType: string;
51
+ /** The unique process key this element belongs to */
52
+ processKey: string;
53
+ /** Number of failed executions of this element in the given time range */
54
+ failedCount: number;
55
+ }
42
56
  /**
43
57
  * Time bucketing granularity for insights time-series queries.
44
58
  *
@@ -95,6 +109,35 @@ interface GetTopDurationResponse extends GetTopBaseResponse {
95
109
  /** Total execution duration in milliseconds */
96
110
  duration: number;
97
111
  }
112
+ /**
113
+ * Element count by status for a BPMN element within a process or case
114
+ */
115
+ interface ElementStats {
116
+ /** BPMN element identifier */
117
+ elementId: string;
118
+ /** Number of successful executions */
119
+ successCount: number;
120
+ /** Number of failed executions */
121
+ failCount: number;
122
+ /** Number of terminated executions */
123
+ terminatedCount: number;
124
+ /** Number of paused executions */
125
+ pausedCount: number;
126
+ /** Number of in-progress executions */
127
+ inProgressCount: number;
128
+ /** Minimum duration in milliseconds */
129
+ minDurationMs: number;
130
+ /** Maximum duration in milliseconds */
131
+ maxDurationMs: number;
132
+ /** Average duration in milliseconds */
133
+ avgDurationMs: number;
134
+ /** 50th percentile (median) duration in milliseconds */
135
+ p50DurationMs: number;
136
+ /** 95th percentile duration in milliseconds */
137
+ p95DurationMs: number;
138
+ /** 99th percentile duration in milliseconds */
139
+ p99DurationMs: number;
140
+ }
98
141
 
99
142
  /**
100
143
  * Maestro Process Types
@@ -364,6 +407,44 @@ interface MaestroProcessesServiceModel {
364
407
  * ```
365
408
  */
366
409
  getTopFaultedCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ProcessGetTopFaultedCountResponse[]>;
410
+ /**
411
+ * Get the top 10 BPMN elements ranked by failure count within a time range.
412
+ *
413
+ * Returns an array of up to 10 elements sorted by how many times they failed,
414
+ * useful for identifying the most error-prone activities in processes.
415
+ *
416
+ * @param startTime - Start of the time range to query
417
+ * @param endTime - End of the time range to query
418
+ * @param options - Optional filters (packageId, processKey, version)
419
+ * @returns Promise resolving to an array of {@link ElementGetTopFailedCountResponse}
420
+ * @example
421
+ * ```typescript
422
+ * import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
423
+ *
424
+ * const maestroProcesses = new MaestroProcesses(sdk);
425
+ *
426
+ * // Get top failing elements for the last 7 days
427
+ * const topFailing = await maestroProcesses.getTopElementFailedCount(
428
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
429
+ * new Date()
430
+ * );
431
+ *
432
+ * for (const element of topFailing) {
433
+ * console.log(`${element.elementName} (${element.elementType}): ${element.failedCount} failures`);
434
+ * }
435
+ * ```
436
+ *
437
+ * @example
438
+ * ```typescript
439
+ * // Get top failing elements for a specific process
440
+ * const filtered = await maestroProcesses.getTopElementFailedCount(
441
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
442
+ * new Date(),
443
+ * { processKey: '<processKey>' }
444
+ * );
445
+ * ```
446
+ */
447
+ getTopElementFailedCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ElementGetTopFailedCountResponse[]>;
367
448
  /**
368
449
  * Get all instances status counts aggregated by date for maestro processes.
369
450
  *
@@ -443,6 +524,38 @@ interface MaestroProcessesServiceModel {
443
524
  * ```
444
525
  */
445
526
  getTopExecutionDuration(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ProcessGetTopDurationResponse[]>;
527
+ /**
528
+ * Get element stats for process instances
529
+ *
530
+ * Returns per-element execution counts (success, fail, terminated, paused, in-progress) and
531
+ * duration percentile metrics (min, max, avg, p50, p95, p99) for BPMN elements within a process.
532
+ *
533
+ * @param processKey - Process key to filter by
534
+ * @param packageId - Package identifier
535
+ * @param startTime - Start of the time range to query
536
+ * @param endTime - End of the time range to query
537
+ * @param packageVersion - Package version to filter by
538
+ * @returns Promise resolving to an array of {@link ElementStats}
539
+ * @example
540
+ * ```typescript
541
+ * // Get element metrics for a process
542
+ * const elements = await maestroProcesses.getElementStats(
543
+ * '<processKey>',
544
+ * '<packageId>',
545
+ * new Date('2026-04-01'),
546
+ * new Date(),
547
+ * '1.0.1'
548
+ * );
549
+ *
550
+ * // Analyze element performance
551
+ * for (const element of elements) {
552
+ * console.log(`Element: ${element.elementId}`);
553
+ * console.log(` Success: ${element.successCount}, Failed: ${element.failCount}`);
554
+ * console.log(` Avg duration: ${element.avgDurationMs}ms, P95: ${element.p95DurationMs}ms`);
555
+ * }
556
+ * ```
557
+ */
558
+ getElementStats(processKey: string, packageId: string, startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
446
559
  }
447
560
  interface ProcessMethods {
448
561
  /**
@@ -451,6 +564,15 @@ interface ProcessMethods {
451
564
  * @returns Promise resolving to array of process incidents
452
565
  */
453
566
  getIncidents(): Promise<ProcessIncidentGetResponse[]>;
567
+ /**
568
+ * Get element stats for this process
569
+ *
570
+ * @param startTime - Start of the time range to query
571
+ * @param endTime - End of the time range to query
572
+ * @param packageVersion - Package version to filter by
573
+ * @returns Promise resolving to an array of {@link ElementStats}
574
+ */
575
+ getElementStats(startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
454
576
  }
455
577
  type MaestroProcessGetAllResponse = RawMaestroProcessGetAllResponse & ProcessMethods;
456
578
  /**
@@ -593,8 +715,7 @@ interface ProcessInstanceExecutionHistoryResponse {
593
715
  startedTime: string;
594
716
  endTime: string | null;
595
717
  attributes: string | null;
596
- createdTime: string;
597
- updatedTime?: string;
718
+ updatedTime: string;
598
719
  expiredTime: string | null;
599
720
  }
600
721
  /**
@@ -741,24 +862,26 @@ interface ProcessInstancesServiceModel {
741
862
  /**
742
863
  * Get execution history (spans) for a process instance
743
864
  * @param instanceId The ID of the instance to get history for
865
+ * @param folderKey The folder key for authorization
744
866
  * @returns Promise resolving to execution history
745
867
  * {@link ProcessInstanceExecutionHistoryResponse}
746
868
  * @example
747
869
  * ```typescript
748
870
  * // Get execution history for a process instance
749
871
  * const history = await processInstances.getExecutionHistory(
750
- * <instanceId>
872
+ * <instanceId>,
873
+ * <folderKey>
751
874
  * );
752
875
  *
753
876
  * // Analyze execution timeline
754
877
  * history.forEach(span => {
755
878
  * console.log(`Activity: ${span.name}`);
756
- * console.log(`Start: ${span.startTime}`);
757
- * console.log(`Duration: ${span.duration}ms`);
879
+ * console.log(`Start: ${span.startedTime}`);
880
+ * console.log(`End: ${span.endTime}`);
758
881
  * });
759
882
  * ```
760
883
  */
761
- getExecutionHistory(instanceId: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
884
+ getExecutionHistory(instanceId: string, folderKey: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
762
885
  /**
763
886
  * Get BPMN XML file for a process instance
764
887
  * @param instanceId The ID of the instance to get BPMN for
@@ -1024,6 +1147,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
1024
1147
  tokenParam?: string;
1025
1148
  countParam?: string;
1026
1149
  convertToSkip?: boolean;
1150
+ zeroBased?: boolean;
1027
1151
  };
1028
1152
  };
1029
1153
  }
@@ -1289,6 +1413,44 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
1289
1413
  * ```
1290
1414
  */
1291
1415
  getTopRunCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ProcessGetTopRunCountResponse[]>;
1416
+ /**
1417
+ * Get the top 10 BPMN elements ranked by failure count within a time range.
1418
+ *
1419
+ * Returns an array of up to 10 elements sorted by how many times they failed,
1420
+ * useful for identifying the most error-prone activities in processes.
1421
+ *
1422
+ * @param startTime - Start of the time range to query
1423
+ * @param endTime - End of the time range to query
1424
+ * @param options - Optional filters (packageId, processKey, version)
1425
+ * @returns Promise resolving to an array of {@link ElementGetTopFailedCountResponse}
1426
+ * @example
1427
+ * ```typescript
1428
+ * import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
1429
+ *
1430
+ * const maestroProcesses = new MaestroProcesses(sdk);
1431
+ *
1432
+ * // Get top failing elements for the last 7 days
1433
+ * const topFailing = await maestroProcesses.getTopElementFailedCount(
1434
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
1435
+ * new Date()
1436
+ * );
1437
+ *
1438
+ * for (const element of topFailing) {
1439
+ * console.log(`${element.elementName} (${element.elementType}): ${element.failedCount} failures`);
1440
+ * }
1441
+ * ```
1442
+ *
1443
+ * @example
1444
+ * ```typescript
1445
+ * // Get top failing elements for a specific process
1446
+ * const filtered = await maestroProcesses.getTopElementFailedCount(
1447
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
1448
+ * new Date(),
1449
+ * { processKey: '<processKey>' }
1450
+ * );
1451
+ * ```
1452
+ */
1453
+ getTopElementFailedCount(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ElementGetTopFailedCountResponse[]>;
1292
1454
  /**
1293
1455
  * Get all instances status counts aggregated by date for maestro processes.
1294
1456
  *
@@ -1406,6 +1568,38 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
1406
1568
  * ```
1407
1569
  */
1408
1570
  getTopExecutionDuration(startTime: Date, endTime: Date, options?: TopQueryOptions): Promise<ProcessGetTopDurationResponse[]>;
1571
+ /**
1572
+ * Get element stats for process instances
1573
+ *
1574
+ * Returns per-element execution counts (success, fail, terminated, paused, in-progress) and
1575
+ * duration percentile metrics (min, max, avg, p50, p95, p99) for BPMN elements within a process.
1576
+ *
1577
+ * @param processKey - Process key to filter by
1578
+ * @param packageId - Package identifier
1579
+ * @param startTime - Start of the time range to query
1580
+ * @param endTime - End of the time range to query
1581
+ * @param packageVersion - Package version to filter by
1582
+ * @returns Promise resolving to an array of {@link ElementStats}
1583
+ * @example
1584
+ * ```typescript
1585
+ * // Get element metrics for a process
1586
+ * const elements = await maestroProcesses.getElementStats(
1587
+ * '<processKey>',
1588
+ * '<packageId>',
1589
+ * new Date('2026-04-01'),
1590
+ * new Date(),
1591
+ * '1.0.1'
1592
+ * );
1593
+ *
1594
+ * // Analyze element performance
1595
+ * for (const element of elements) {
1596
+ * console.log(`Element: ${element.elementId}`);
1597
+ * console.log(` Success: ${element.successCount}, Failed: ${element.failCount}`);
1598
+ * console.log(` Avg duration: ${element.avgDurationMs}ms, P95: ${element.p95DurationMs}ms`);
1599
+ * }
1600
+ * ```
1601
+ */
1602
+ getElementStats(processKey: string, packageId: string, startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
1409
1603
  }
1410
1604
 
1411
1605
  declare class ProcessInstancesService extends BaseService implements ProcessInstancesServiceModel {
@@ -1460,9 +1654,27 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
1460
1654
  /**
1461
1655
  * Get execution history (spans) for a process instance
1462
1656
  * @param instanceId The ID of the instance to get history for
1463
- * @returns Promise<ProcessInstanceExecutionHistoryResponse[]>
1657
+ * @param folderKey The folder key for authorization
1658
+ * @returns Promise resolving to execution history
1659
+ * {@link ProcessInstanceExecutionHistoryResponse}
1660
+ * @example
1661
+ * ```typescript
1662
+ * // Get execution history for a process instance
1663
+ * const history = await processInstances.getExecutionHistory(
1664
+ * <instanceId>,
1665
+ * <folderKey>
1666
+ * );
1667
+ *
1668
+ * // Analyze execution timeline
1669
+ * history.forEach(span => {
1670
+ * console.log(`Activity: ${span.name}`);
1671
+ * console.log(`Start: ${span.startedTime}`);
1672
+ * console.log(`End: ${span.endTime}`);
1673
+ * });
1674
+ * ```
1464
1675
  */
1465
- getExecutionHistory(instanceId: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
1676
+ getExecutionHistory(instanceId: string, folderKey: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
1677
+ private mapSpanToHistory;
1466
1678
  /**
1467
1679
  * Get BPMN XML file for a process instance
1468
1680
  * @param instanceId The ID of the instance to get BPMN for
@@ -1562,4 +1774,4 @@ declare class ProcessIncidentsService extends BaseService implements ProcessInci
1562
1774
  }
1563
1775
 
1564
1776
  export { DebugMode, InstanceFinalStatus, MaestroProcessesService as MaestroProcesses, MaestroProcessesService, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, ProcessIncidentsService as ProcessIncidents, ProcessIncidentsService, ProcessInstancesService as ProcessInstances, ProcessInstancesService, TimeInterval, createProcessInstanceWithMethods, createProcessWithMethods };
1565
- export type { BpmnXmlString, ElementMetaData, GetTopBaseResponse, GetTopDurationResponse, GetTopFaultedCountResponse, GetTopRunCountResponse, GlobalVariableMetaData, InstanceStatusTimelineResponse, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, ProcessGetTopDurationResponse, ProcessGetTopFaultedCountResponse, ProcessGetTopRunCountResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, TimelineOptions, TopQueryOptions };
1777
+ export type { BpmnXmlString, ElementGetTopFailedCountResponse, ElementMetaData, ElementStats, GetTopBaseResponse, GetTopDurationResponse, GetTopFaultedCountResponse, GetTopRunCountResponse, GlobalVariableMetaData, InstanceStatusTimelineResponse, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, ProcessGetTopDurationResponse, ProcessGetTopFaultedCountResponse, ProcessGetTopRunCountResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, TimelineOptions, TopQueryOptions };