@uipath/uipath-typescript 1.4.1 → 1.5.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 (46) hide show
  1. package/dist/agent-memory/index.d.ts +4 -1
  2. package/dist/agents/index.cjs +341 -6
  3. package/dist/agents/index.d.ts +717 -16
  4. package/dist/agents/index.mjs +342 -7
  5. package/dist/assets/index.cjs +25 -9
  6. package/dist/assets/index.mjs +25 -9
  7. package/dist/attachments/index.cjs +25 -9
  8. package/dist/attachments/index.mjs +25 -9
  9. package/dist/buckets/index.cjs +25 -9
  10. package/dist/buckets/index.mjs +25 -9
  11. package/dist/cases/index.cjs +621 -524
  12. package/dist/cases/index.d.ts +186 -43
  13. package/dist/cases/index.mjs +621 -524
  14. package/dist/conversational-agent/index.cjs +25 -9
  15. package/dist/conversational-agent/index.mjs +25 -9
  16. package/dist/core/index.cjs +1 -1
  17. package/dist/core/index.mjs +1 -1
  18. package/dist/document-understanding/index.cjs +84 -84
  19. package/dist/document-understanding/index.d.ts +2 -1
  20. package/dist/document-understanding/index.mjs +1 -1
  21. package/dist/entities/index.cjs +25 -9
  22. package/dist/entities/index.mjs +25 -9
  23. package/dist/feedback/index.cjs +25 -9
  24. package/dist/feedback/index.mjs +25 -9
  25. package/dist/index.cjs +332 -62
  26. package/dist/index.d.ts +827 -89
  27. package/dist/index.mjs +333 -63
  28. package/dist/index.umd.js +332 -62
  29. package/dist/jobs/index.cjs +129 -14
  30. package/dist/jobs/index.d.ts +10 -5
  31. package/dist/jobs/index.mjs +129 -14
  32. package/dist/maestro-processes/index.cjs +198 -100
  33. package/dist/maestro-processes/index.d.ts +188 -43
  34. package/dist/maestro-processes/index.mjs +198 -100
  35. package/dist/processes/index.cjs +25 -9
  36. package/dist/processes/index.d.ts +6 -1
  37. package/dist/processes/index.mjs +25 -9
  38. package/dist/queues/index.cjs +25 -9
  39. package/dist/queues/index.mjs +25 -9
  40. package/dist/tasks/index.cjs +25 -9
  41. package/dist/tasks/index.d.ts +4 -1
  42. package/dist/tasks/index.mjs +25 -9
  43. package/dist/traces/index.cjs +2 -2
  44. package/dist/traces/index.d.ts +3 -3
  45. package/dist/traces/index.mjs +2 -2
  46. package/package.json +1 -1
@@ -110,21 +110,12 @@ interface GetTopDurationResponse extends GetTopBaseResponse {
110
110
  duration: number;
111
111
  }
112
112
  /**
113
- * Element count by status for a BPMN element within a process or case
113
+ * Duration percentile stats shared by Insights aggregate endpoints (per-element and per-process/case).
114
+ *
115
+ * For instance-level stats, durations are computed over terminal instances only
116
+ * (Completed, Cancelled, Deleted) and default to `0` when no terminal instances exist.
114
117
  */
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;
118
+ interface DurationStats {
128
119
  /** Minimum duration in milliseconds */
129
120
  minDurationMs: number;
130
121
  /** Maximum duration in milliseconds */
@@ -138,6 +129,65 @@ interface ElementStats {
138
129
  /** 99th percentile duration in milliseconds */
139
130
  p99DurationMs: number;
140
131
  }
132
+ /**
133
+ * Instance count and duration stats aggregated by status for a process or case within a time range.
134
+ *
135
+ * Duration fields are computed over terminal instances only (Completed, Cancelled, Deleted)
136
+ * and default to `0` when no terminal instances exist in the time range.
137
+ */
138
+ interface InstanceStats extends DurationStats {
139
+ /** Total number of instances across all statuses */
140
+ totalCount: number;
141
+ /** Number of currently running instances */
142
+ runningCount: number;
143
+ /** Number of instances in transitioning state */
144
+ transitioningCount: number;
145
+ /** Number of paused instances */
146
+ pausedCount: number;
147
+ /** Number of faulted instances */
148
+ faultedCount: number;
149
+ /** Number of completed instances */
150
+ completedCount: number;
151
+ /** Number of cancelled instances */
152
+ cancelledCount: number;
153
+ /** Number of deleted instances */
154
+ deletedCount: number;
155
+ }
156
+ /**
157
+ * Required request parameters for process-scoped insights stats endpoints
158
+ * (`getElementStats`, `getInstanceStats`).
159
+ *
160
+ * Identifies a single process+package+version and the time range to aggregate over.
161
+ */
162
+ interface MaestroProcessStatsRequest {
163
+ /** Process key to filter by */
164
+ processKey: string;
165
+ /** Package identifier */
166
+ packageId: string;
167
+ /** Package version to filter by */
168
+ packageVersion: string;
169
+ /** Start of the time range to query */
170
+ startTime: Date;
171
+ /** End of the time range to query */
172
+ endTime: Date;
173
+ }
174
+ /**
175
+ * Per-element execution counts and duration percentiles for a BPMN element within a process or case.
176
+ */
177
+ interface ElementStats extends DurationStats {
178
+ /** BPMN element identifier */
179
+ elementId: string;
180
+ /** Number of successful executions */
181
+ successCount: number;
182
+ /** Number of failed executions */
183
+ failCount: number;
184
+ /** Number of terminated executions */
185
+ terminatedCount: number;
186
+ /** Number of paused executions */
187
+ pausedCount: number;
188
+ /** Number of in-progress executions */
189
+ inProgressCount: number;
190
+ }
141
191
 
142
192
  /**
143
193
  * Simplified universal pagination cursor
@@ -536,31 +586,73 @@ interface CasesServiceModel {
536
586
  * Returns per-element execution counts (success, fail, terminated, paused, in-progress) and
537
587
  * duration percentile metrics (min, max, avg, p50, p95, p99) for BPMN elements within a case.
538
588
  *
539
- * @param processKey - Process key to filter by
540
- * @param packageId - Package identifier
541
- * @param startTime - Start of the time range to query
542
- * @param endTime - End of the time range to query
543
- * @param packageVersion - Package version to filter by
589
+ * @param request - Process scope + time range to aggregate over
544
590
  * @returns Promise resolving to an array of {@link ElementStats}
545
591
  * @example
546
592
  * ```typescript
547
- * // Get element metrics for a case
548
- * const elements = await cases.getElementStats(
549
- * '<processKey>',
550
- * '<packageId>',
551
- * new Date('2026-04-01'),
552
- * new Date(),
553
- * '1.0.1'
554
- * );
593
+ * // First, list cases to find the processKey, packageId, and available versions
594
+ * const allCases = await cases.getAll();
595
+ * const caseItem = allCases[0];
596
+ *
597
+ * // Get element metrics for that case
598
+ * const elements = await cases.getElementStats({
599
+ * processKey: caseItem.processKey,
600
+ * packageId: caseItem.packageId,
601
+ * packageVersion: caseItem.packageVersions[0],
602
+ * startTime: new Date('2026-04-01'),
603
+ * endTime: new Date(),
604
+ * });
555
605
  *
556
606
  * // Find elements with failures
557
607
  * const failedElements = elements.filter(e => e.failCount > 0);
558
608
  * for (const element of failedElements) {
559
609
  * console.log(`Failed element: ${element.elementId}, failures: ${element.failCount}`);
560
610
  * }
611
+ *
612
+ * // Using bound method on a case — auto-fills processKey and packageId
613
+ * const boundElements = await caseItem.getElementStats(
614
+ * new Date('2026-04-01'),
615
+ * new Date(),
616
+ * caseItem.packageVersions[0]
617
+ * );
618
+ * ```
619
+ */
620
+ getElementStats(request: MaestroProcessStatsRequest): Promise<ElementStats[]>;
621
+ /**
622
+ * Get instance stats for a case.
623
+ *
624
+ * Returns total instance counts broken down by status (running, completed, faulted, etc.)
625
+ * and the average execution duration for all instances of a case within a time range.
626
+ *
627
+ * @param request - Process scope + time range to aggregate over
628
+ * @returns Promise resolving to {@link InstanceStats}
629
+ * @example
630
+ * ```typescript
631
+ * // First, list cases to find the processKey, packageId, and available versions
632
+ * const allCases = await cases.getAll();
633
+ * const caseItem = allCases[0];
634
+ *
635
+ * // Get instance status breakdown for that case
636
+ * const counts = await cases.getInstanceStats({
637
+ * processKey: caseItem.processKey,
638
+ * packageId: caseItem.packageId,
639
+ * packageVersion: caseItem.packageVersions[0],
640
+ * startTime: new Date('2026-04-01'),
641
+ * endTime: new Date(),
642
+ * });
643
+ *
644
+ * console.log(`Total: ${counts.totalCount}`);
645
+ * console.log(`Completed: ${counts.completedCount}, Faulted: ${counts.faultedCount}`);
646
+ *
647
+ * // Using bound method on a case — auto-fills processKey and packageId
648
+ * const boundCounts = await caseItem.getInstanceStats(
649
+ * new Date('2026-04-01'),
650
+ * new Date(),
651
+ * caseItem.packageVersions[0]
652
+ * );
561
653
  * ```
562
654
  */
563
- getElementStats(processKey: string, packageId: string, startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
655
+ getInstanceStats(request: MaestroProcessStatsRequest): Promise<InstanceStats>;
564
656
  }
565
657
  interface CaseMethods {
566
658
  /**
@@ -572,6 +664,15 @@ interface CaseMethods {
572
664
  * @returns Promise resolving to an array of {@link ElementStats}
573
665
  */
574
666
  getElementStats(startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
667
+ /**
668
+ * Get instance stats for this case
669
+ *
670
+ * @param startTime - Start of the time range to query
671
+ * @param endTime - End of the time range to query
672
+ * @param packageVersion - Package version to filter by
673
+ * @returns Promise resolving to {@link InstanceStats}
674
+ */
675
+ getInstanceStats(startTime: Date, endTime: Date, packageVersion: string): Promise<InstanceStats>;
575
676
  }
576
677
  type CaseGetAllWithMethodsResponse = CaseGetAllResponse & CaseMethods;
577
678
  /**
@@ -2079,31 +2180,73 @@ declare class CasesService extends BaseService implements CasesServiceModel {
2079
2180
  * Returns per-element execution counts (success, fail, terminated, paused, in-progress) and
2080
2181
  * duration percentile metrics (min, max, avg, p50, p95, p99) for BPMN elements within a case.
2081
2182
  *
2082
- * @param processKey - Process key to filter by
2083
- * @param packageId - Package identifier
2084
- * @param startTime - Start of the time range to query
2085
- * @param endTime - End of the time range to query
2086
- * @param packageVersion - Package version to filter by
2183
+ * @param request - Process scope + time range to aggregate over
2087
2184
  * @returns Promise resolving to an array of {@link ElementStats}
2088
2185
  * @example
2089
2186
  * ```typescript
2090
- * // Get element metrics for a case
2091
- * const elements = await cases.getElementStats(
2092
- * '<processKey>',
2093
- * '<packageId>',
2094
- * new Date('2026-04-01'),
2095
- * new Date(),
2096
- * '1.0.1'
2097
- * );
2187
+ * // First, list cases to find the processKey, packageId, and available versions
2188
+ * const allCases = await cases.getAll();
2189
+ * const caseItem = allCases[0];
2190
+ *
2191
+ * // Get element metrics for that case
2192
+ * const elements = await cases.getElementStats({
2193
+ * processKey: caseItem.processKey,
2194
+ * packageId: caseItem.packageId,
2195
+ * packageVersion: caseItem.packageVersions[0],
2196
+ * startTime: new Date('2026-04-01'),
2197
+ * endTime: new Date(),
2198
+ * });
2098
2199
  *
2099
2200
  * // Find elements with failures
2100
2201
  * const failedElements = elements.filter(e => e.failCount > 0);
2101
2202
  * for (const element of failedElements) {
2102
2203
  * console.log(`Failed element: ${element.elementId}, failures: ${element.failCount}`);
2103
2204
  * }
2205
+ *
2206
+ * // Using bound method on a case — auto-fills processKey and packageId
2207
+ * const boundElements = await caseItem.getElementStats(
2208
+ * new Date('2026-04-01'),
2209
+ * new Date(),
2210
+ * caseItem.packageVersions[0]
2211
+ * );
2212
+ * ```
2213
+ */
2214
+ getElementStats(request: MaestroProcessStatsRequest): Promise<ElementStats[]>;
2215
+ /**
2216
+ * Get instance stats for a case.
2217
+ *
2218
+ * Returns total instance counts broken down by status (running, completed, faulted, etc.)
2219
+ * and the average execution duration for all instances of a case within a time range.
2220
+ *
2221
+ * @param request - Process scope + time range to aggregate over
2222
+ * @returns Promise resolving to {@link InstanceStats}
2223
+ * @example
2224
+ * ```typescript
2225
+ * // First, list cases to find the processKey, packageId, and available versions
2226
+ * const allCases = await cases.getAll();
2227
+ * const caseItem = allCases[0];
2228
+ *
2229
+ * // Get instance status breakdown for that case
2230
+ * const counts = await cases.getInstanceStats({
2231
+ * processKey: caseItem.processKey,
2232
+ * packageId: caseItem.packageId,
2233
+ * packageVersion: caseItem.packageVersions[0],
2234
+ * startTime: new Date('2026-04-01'),
2235
+ * endTime: new Date(),
2236
+ * });
2237
+ *
2238
+ * console.log(`Total: ${counts.totalCount}`);
2239
+ * console.log(`Completed: ${counts.completedCount}, Faulted: ${counts.faultedCount}`);
2240
+ *
2241
+ * // Using bound method on a case — auto-fills processKey and packageId
2242
+ * const boundCounts = await caseItem.getInstanceStats(
2243
+ * new Date('2026-04-01'),
2244
+ * new Date(),
2245
+ * caseItem.packageVersions[0]
2246
+ * );
2104
2247
  * ```
2105
2248
  */
2106
- getElementStats(processKey: string, packageId: string, startTime: Date, endTime: Date, packageVersion: string): Promise<ElementStats[]>;
2249
+ getInstanceStats(request: MaestroProcessStatsRequest): Promise<InstanceStats>;
2107
2250
  /**
2108
2251
  * Extract a readable case name from the packageId
2109
2252
  * @param packageId - The full package identifier
@@ -2362,4 +2505,4 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
2362
2505
  }
2363
2506
 
2364
2507
  export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, InstanceFinalStatus, InstanceStatus, SLADurationUnit, SlaSummaryStatus, StageTaskType, TimeInterval, createCaseInstanceWithMethods, createCaseWithMethods };
2365
- export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetAllWithMethodsResponse, CaseGetStageResponse, CaseGetTopDurationResponse, CaseGetTopFaultedCountResponse, CaseGetTopRunCountResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstanceSlaSummaryOptions, CaseInstanceStageSLAOptions, CaseInstanceStageSLAResponse, CaseInstanceStageSLAStage, CaseInstancesServiceModel, CaseMethods, CasesServiceModel, ElementExecutionMetadata, ElementGetTopFailedCountResponse, ElementRunMetadata, ElementStats, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, GetTopBaseResponse, GetTopDurationResponse, GetTopFaultedCountResponse, GetTopRunCountResponse, InstanceStatusTimelineResponse, RawCaseInstanceGetResponse, SlaSummaryResponse, StageSLA, StageTask, TimelineOptions, TopQueryOptions };
2508
+ export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetAllWithMethodsResponse, CaseGetStageResponse, CaseGetTopDurationResponse, CaseGetTopFaultedCountResponse, CaseGetTopRunCountResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstanceSlaSummaryOptions, CaseInstanceStageSLAOptions, CaseInstanceStageSLAResponse, CaseInstanceStageSLAStage, CaseInstancesServiceModel, CaseMethods, CasesServiceModel, DurationStats, ElementExecutionMetadata, ElementGetTopFailedCountResponse, ElementRunMetadata, ElementStats, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, GetTopBaseResponse, GetTopDurationResponse, GetTopFaultedCountResponse, GetTopRunCountResponse, InstanceStats, InstanceStatusTimelineResponse, MaestroProcessStatsRequest, RawCaseInstanceGetResponse, SlaSummaryResponse, StageSLA, StageTask, TimelineOptions, TopQueryOptions };