@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.
Files changed (41) hide show
  1. package/dist/assets/index.cjs +44 -276
  2. package/dist/assets/index.mjs +44 -276
  3. package/dist/attachments/index.cjs +42 -273
  4. package/dist/attachments/index.mjs +42 -273
  5. package/dist/buckets/index.cjs +195 -276
  6. package/dist/buckets/index.d.ts +213 -1
  7. package/dist/buckets/index.mjs +195 -276
  8. package/dist/cases/index.cjs +427 -343
  9. package/dist/cases/index.d.ts +534 -2
  10. package/dist/cases/index.mjs +428 -344
  11. package/dist/conversational-agent/index.cjs +90 -287
  12. package/dist/conversational-agent/index.d.ts +62 -12
  13. package/dist/conversational-agent/index.mjs +90 -288
  14. package/dist/core/index.cjs +39 -289
  15. package/dist/core/index.d.ts +9 -98
  16. package/dist/core/index.mjs +40 -275
  17. package/dist/document-understanding/index.cjs +18 -1
  18. package/dist/document-understanding/index.d.ts +636 -610
  19. package/dist/document-understanding/index.mjs +18 -1
  20. package/dist/entities/index.cjs +251 -277
  21. package/dist/entities/index.d.ts +305 -2
  22. package/dist/entities/index.mjs +251 -277
  23. package/dist/feedback/index.cjs +42 -274
  24. package/dist/feedback/index.mjs +42 -274
  25. package/dist/index.cjs +998 -351
  26. package/dist/index.d.ts +2159 -762
  27. package/dist/index.mjs +998 -337
  28. package/dist/index.umd.js +1208 -237
  29. package/dist/jobs/index.cjs +44 -276
  30. package/dist/jobs/index.mjs +44 -276
  31. package/dist/maestro-processes/index.cjs +1761 -1717
  32. package/dist/maestro-processes/index.d.ts +430 -2
  33. package/dist/maestro-processes/index.mjs +1762 -1718
  34. package/dist/processes/index.cjs +72 -305
  35. package/dist/processes/index.d.ts +76 -26
  36. package/dist/processes/index.mjs +72 -305
  37. package/dist/queues/index.cjs +44 -276
  38. package/dist/queues/index.mjs +44 -276
  39. package/dist/tasks/index.cjs +44 -276
  40. package/dist/tasks/index.mjs +44 -276
  41. package/package.json +8 -10
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var sdkLogs = require('@opentelemetry/sdk-logs');
3
+ var coreTelemetry = require('@uipath/core-telemetry');
4
4
 
5
5
  /******************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
@@ -4514,6 +4514,8 @@ const BUCKET_ENDPOINTS = {
4514
4514
  GET_FILE_META_DATA: (id) => `${ORCHESTRATOR_BASE}/api/Buckets/${id}/ListFiles`,
4515
4515
  GET_READ_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetReadUri`,
4516
4516
  GET_WRITE_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetWriteUri`,
4517
+ DELETE_FILE: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.DeleteFile`,
4518
+ GET_FILES: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetFiles`,
4517
4519
  };
4518
4520
  /**
4519
4521
  * Orchestrator Process Service Endpoints
@@ -4590,6 +4592,16 @@ const MAESTRO_ENDPOINTS = {
4590
4592
  INSIGHTS: {
4591
4593
  /** SLA summary for case instances */
4592
4594
  SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
4595
+ /** Stages summary for case instances */
4596
+ STAGES_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/stages`,
4597
+ /** Top processes ranked by run count */
4598
+ TOP_PROCESSES_BY_RUN_COUNT: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopProcessesByRunCount`,
4599
+ /** Top processes ranked by failure count */
4600
+ TOP_PROCESSES_WITH_FAILURE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopProcesseswithFailure`,
4601
+ /** Instance status aggregated by date for time-series charts */
4602
+ INSTANCE_STATUS_BY_DATE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/InstanceStatusByDate`,
4603
+ /** Top processes ranked by total duration */
4604
+ TOP_PROCESSES_BY_DURATION: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopProcessesByDuration`,
4593
4605
  },
4594
4606
  };
4595
4607
 
@@ -4629,6 +4641,12 @@ const DATA_FABRIC_ENDPOINTS = {
4629
4641
  CHOICESETS: {
4630
4642
  GET_ALL: `${DATAFABRIC_BASE}/api/Entity/choiceset`,
4631
4643
  GET_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/query_expansion`,
4644
+ CREATE: `${DATAFABRIC_BASE}/api/Entity/choiceset`,
4645
+ UPDATE: (choiceSetId) => `${DATAFABRIC_BASE}/api/Entity/${choiceSetId}/metadata`,
4646
+ DELETE: (choiceSetId) => `${DATAFABRIC_BASE}/api/Entity/${choiceSetId}/delete`,
4647
+ INSERT_BY_NAME: (choiceSetName) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/insert`,
4648
+ UPDATE_BY_NAME: (choiceSetName, valueId) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/${valueId}/update`,
4649
+ DELETE_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/choiceset/delete`,
4632
4650
  },
4633
4651
  };
4634
4652
 
@@ -5464,284 +5482,49 @@ function normalizeBaseUrl(url) {
5464
5482
  }
5465
5483
 
5466
5484
  /**
5467
- * SDK Telemetry constants
5468
- */
5469
- // Connection string placeholder that will be replaced during build
5470
- 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";
5471
- // SDK Version placeholder
5472
- const SDK_VERSION = "1.3.8";
5473
- const VERSION = "Version";
5474
- const SERVICE = "Service";
5475
- const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
5476
- const CLOUD_TENANT_NAME = "CloudTenantName";
5477
- const CLOUD_URL = "CloudUrl";
5478
- const CLOUD_CLIENT_ID = "CloudClientId";
5479
- const CLOUD_REDIRECT_URI = "CloudRedirectUri";
5480
- const APP_NAME = "ApplicationName";
5481
- const CLOUD_ROLE_NAME = "uipath-ts-sdk";
5482
- // Service and logger names
5483
- const SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
5484
- const SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
5485
- // Event names
5486
- const SDK_RUN_EVENT = "Sdk.Run";
5487
- // Default value for unknown/empty attributes
5488
- const UNKNOWN$1 = "";
5489
-
5490
- /**
5491
- * Log exporter that sends ALL logs as Application Insights custom events
5492
- */
5493
- class ApplicationInsightsEventExporter {
5494
- constructor(connectionString) {
5495
- this.connectionString = connectionString;
5496
- }
5497
- export(logs, resultCallback) {
5498
- try {
5499
- logs.forEach(logRecord => {
5500
- this.sendAsCustomEvent(logRecord);
5501
- });
5502
- resultCallback({ code: 0 });
5503
- }
5504
- catch (error) {
5505
- console.debug('Failed to export logs to Application Insights:', error);
5506
- resultCallback({ code: 2, error });
5507
- }
5508
- }
5509
- shutdown() {
5510
- return Promise.resolve();
5511
- }
5512
- sendAsCustomEvent(logRecord) {
5513
- // Get event name from body or attributes
5514
- const eventName = logRecord.body || SDK_RUN_EVENT;
5515
- const payload = {
5516
- name: 'Microsoft.ApplicationInsights.Event',
5517
- time: new Date().toISOString(),
5518
- iKey: this.extractInstrumentationKey(),
5519
- data: {
5520
- baseType: 'EventData',
5521
- baseData: {
5522
- ver: 2,
5523
- name: eventName,
5524
- properties: this.convertAttributesToProperties(logRecord.attributes || {})
5525
- }
5526
- },
5527
- tags: {
5528
- 'ai.cloud.role': CLOUD_ROLE_NAME,
5529
- 'ai.cloud.roleInstance': SDK_VERSION
5530
- }
5531
- };
5532
- this.sendToApplicationInsights(payload);
5533
- }
5534
- extractInstrumentationKey() {
5535
- const match = this.connectionString.match(/InstrumentationKey=([^;]+)/);
5536
- return match ? match[1] : '';
5537
- }
5538
- convertAttributesToProperties(attributes) {
5539
- const properties = {};
5540
- Object.entries(attributes || {}).forEach(([key, value]) => {
5541
- properties[key] = String(value);
5542
- });
5543
- return properties;
5544
- }
5545
- async sendToApplicationInsights(payload) {
5546
- try {
5547
- const ingestionEndpoint = this.extractIngestionEndpoint();
5548
- if (!ingestionEndpoint) {
5549
- console.debug('No ingestion endpoint found in connection string');
5550
- return;
5551
- }
5552
- const url = `${ingestionEndpoint}/v2/track`;
5553
- const response = await fetch(url, {
5554
- method: 'POST',
5555
- headers: {
5556
- 'Content-Type': 'application/json',
5557
- },
5558
- body: JSON.stringify(payload)
5559
- });
5560
- if (!response.ok) {
5561
- console.debug(`Failed to send event telemetry: ${response.status} ${response.statusText}`);
5562
- }
5563
- }
5564
- catch (error) {
5565
- console.debug('Error sending event telemetry to Application Insights:', error);
5566
- }
5567
- }
5568
- extractIngestionEndpoint() {
5569
- const match = this.connectionString.match(/IngestionEndpoint=([^;]+)/);
5570
- return match ? match[1] : '';
5571
- }
5572
- }
5573
- /**
5574
- * Singleton telemetry client
5575
- */
5576
- class TelemetryClient {
5577
- constructor() {
5578
- this.isInitialized = false;
5579
- }
5580
- static getInstance() {
5581
- if (!TelemetryClient.instance) {
5582
- TelemetryClient.instance = new TelemetryClient();
5583
- }
5584
- return TelemetryClient.instance;
5585
- }
5586
- /**
5587
- * Initialize telemetry
5588
- */
5589
- initialize(config) {
5590
- if (this.isInitialized) {
5591
- return;
5592
- }
5593
- this.isInitialized = true;
5594
- if (config) {
5595
- this.telemetryContext = config;
5596
- }
5597
- try {
5598
- const connectionString = this.getConnectionString();
5599
- if (!connectionString) {
5600
- return;
5601
- }
5602
- this.setupTelemetryProvider(connectionString);
5603
- }
5604
- catch (error) {
5605
- // Silent failure - telemetry errors shouldn't break functionality
5606
- console.debug('Failed to initialize OpenTelemetry:', error);
5607
- }
5608
- }
5609
- getConnectionString() {
5610
- const connectionString = CONNECTION_STRING;
5611
- return connectionString;
5612
- }
5613
- setupTelemetryProvider(connectionString) {
5614
- const exporter = new ApplicationInsightsEventExporter(connectionString);
5615
- const processor = new sdkLogs.BatchLogRecordProcessor(exporter);
5616
- this.logProvider = new sdkLogs.LoggerProvider({
5617
- processors: [processor]
5618
- });
5619
- this.logger = this.logProvider.getLogger(SDK_LOGGER_NAME);
5620
- }
5621
- /**
5622
- * Track a telemetry event
5623
- */
5624
- track(eventName, name, extraAttributes = {}) {
5625
- try {
5626
- // Skip if logger not initialized
5627
- if (!this.logger) {
5628
- return;
5629
- }
5630
- const finalDisplayName = name || eventName;
5631
- const attributes = this.getEnrichedAttributes(extraAttributes, eventName);
5632
- // Emit as log
5633
- this.logger.emit({
5634
- body: finalDisplayName,
5635
- attributes: attributes,
5636
- timestamp: Date.now(),
5637
- });
5638
- }
5639
- catch (error) {
5640
- // Silent failure
5641
- console.debug('Failed to track telemetry event:', error);
5642
- }
5643
- }
5644
- /**
5645
- * Get enriched attributes for telemetry events
5646
- */
5647
- getEnrichedAttributes(extraAttributes, eventName) {
5648
- const attributes = {
5649
- [APP_NAME]: SDK_SERVICE_NAME,
5650
- [VERSION]: SDK_VERSION,
5651
- [SERVICE]: eventName,
5652
- [CLOUD_URL]: this.createCloudUrl(),
5653
- [CLOUD_ORGANIZATION_NAME]: this.telemetryContext?.orgName || UNKNOWN$1,
5654
- [CLOUD_TENANT_NAME]: this.telemetryContext?.tenantName || UNKNOWN$1,
5655
- [CLOUD_REDIRECT_URI]: this.telemetryContext?.redirectUri || UNKNOWN$1,
5656
- [CLOUD_CLIENT_ID]: this.telemetryContext?.clientId || UNKNOWN$1,
5657
- ...extraAttributes,
5658
- };
5659
- return attributes;
5660
- }
5661
- /**
5662
- * Create cloud URL from base URL, organization ID, and tenant ID
5663
- */
5664
- createCloudUrl() {
5665
- const baseUrl = this.telemetryContext?.baseUrl;
5666
- const orgId = this.telemetryContext?.orgName;
5667
- const tenantId = this.telemetryContext?.tenantName;
5668
- if (!baseUrl || !orgId || !tenantId) {
5669
- return UNKNOWN$1;
5670
- }
5671
- return `${baseUrl}/${orgId}/${tenantId}`;
5672
- }
5673
- }
5674
- // Export singleton instance
5675
- const telemetryClient = TelemetryClient.getInstance();
5676
-
5677
- /**
5678
- * SDK Track decorator and function for telemetry
5679
- */
5680
- /**
5681
- * Common tracking logic shared between method and function decorators
5682
- */
5683
- function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, opts) {
5684
- return function (...args) {
5685
- // Determine if we should track this call
5686
- let shouldTrack = true;
5687
- if (opts.condition !== undefined) {
5688
- if (typeof opts.condition === 'function') {
5689
- shouldTrack = opts.condition.apply(this, args);
5690
- }
5691
- else {
5692
- shouldTrack = opts.condition;
5693
- }
5694
- }
5695
- // Track the event if enabled
5696
- if (shouldTrack) {
5697
- // Use the full name provided in the decorator (e.g., "Queue.GetAll")
5698
- const serviceMethod = typeof nameOrOptions === 'string'
5699
- ? nameOrOptions
5700
- : fallbackName;
5701
- // Use 'Sdk.Run' as the name and serviceMethod as the service
5702
- telemetryClient.track(serviceMethod, SDK_RUN_EVENT, opts.attributes);
5703
- }
5704
- // Execute the original function
5705
- return originalFunction.apply(this, args);
5706
- };
5707
- }
5708
- /**
5709
- * Track decorator that can be used to automatically track function calls
5485
+ * SDK Telemetry constants.
5710
5486
  *
5711
- * Usage:
5712
- * @track("Service.Method")
5713
- * function myFunction() { ... }
5487
+ * Only the SDK's identity (version, service name, role name, …) lives
5488
+ * here. The Application Insights connection string is injected into
5489
+ * `@uipath/core-telemetry` itself at publish time, and the generic attribute
5490
+ * keys (`Version`, `Service`, `CloudOrganizationName`, …) are owned by
5491
+ * `@uipath/core-telemetry` and consumed there — they are not part of the
5492
+ * SDK's public API.
5493
+ */
5494
+ /** SDK version placeholder — patched by the SDK publish workflow. */
5495
+ const SDK_VERSION = '1.3.10';
5496
+ const CLOUD_ROLE_NAME = 'uipath-ts-sdk';
5497
+ const SDK_SERVICE_NAME = 'UiPath.TypeScript.Sdk';
5498
+ const SDK_LOGGER_NAME = 'uipath-ts-sdk-telemetry';
5499
+ const SDK_RUN_EVENT = 'Sdk.Run';
5500
+
5501
+ /**
5502
+ * UiPath TypeScript SDK Telemetry
5714
5503
  *
5715
- * @track("Queue.GetAll")
5716
- * async getAll() { ... }
5717
- *
5718
- * @track("Tasks.Create")
5719
- * async create() { ... }
5720
- *
5721
- * @track("Assets.Update", { condition: false })
5722
- * function myFunction() { ... }
5723
- *
5724
- * @track("Processes.Start", { attributes: { customProp: "value" } })
5725
- * function myFunction() { ... }
5726
- */
5727
- function track(nameOrOptions, options) {
5728
- return function decorator(_target, propertyKey, descriptor) {
5729
- const opts = typeof nameOrOptions === 'object' ? nameOrOptions : options || {};
5730
- if (descriptor && typeof descriptor.value === 'function') {
5731
- // Method decorator
5732
- descriptor.value = createTrackedFunction(descriptor.value, nameOrOptions, propertyKey || 'unknown_method', opts);
5733
- return descriptor;
5734
- }
5735
- // Function decorator
5736
- return (originalFunction) => createTrackedFunction(originalFunction, nameOrOptions, originalFunction.name || 'unknown_function', opts);
5737
- };
5738
- }
5739
- /**
5740
- * Direct tracking function
5741
- */
5742
- function trackEvent(eventName, name, attributes) {
5743
- telemetryClient.track(eventName, name, attributes);
5744
- }
5504
+ * Constructs the SDK's own `TelemetryClient` and binds the SDK-local
5505
+ * `track` / `trackEvent` to it. Each consumer of `@uipath/core-telemetry`
5506
+ * does this independently, so events carry their own consumer's identity
5507
+ * and tenant context.
5508
+ */
5509
+ // Keyed by `CLOUD_ROLE_NAME` so every SDK subpath bundle resolves to the
5510
+ // same `TelemetryClient` instance at runtime. A single `initialize(...)`
5511
+ // from the `UiPath` constructor therefore wires up `@track` decorators
5512
+ // across every subpath bundle (`assets`, `feedback`, `tasks`, …).
5513
+ const sdkClient = coreTelemetry.getOrCreateClient(CLOUD_ROLE_NAME);
5514
+ const track = coreTelemetry.createTrack(sdkClient);
5515
+ const trackEvent = coreTelemetry.createTrackEvent(sdkClient);
5516
+ const telemetryClient = {
5517
+ initialize(context) {
5518
+ sdkClient.initialize({
5519
+ sdkVersion: SDK_VERSION,
5520
+ serviceName: SDK_SERVICE_NAME,
5521
+ cloudRoleName: CLOUD_ROLE_NAME,
5522
+ loggerName: SDK_LOGGER_NAME,
5523
+ defaultEventName: SDK_RUN_EVENT,
5524
+ context,
5525
+ });
5526
+ },
5527
+ };
5745
5528
 
5746
5529
  /**
5747
5530
  * SDK Internals Registry - Internal registry for SDK instances
@@ -6435,14 +6218,25 @@ class ApiClient {
6435
6218
  if (!text) {
6436
6219
  return undefined;
6437
6220
  }
6438
- return JSON.parse(text);
6221
+ try {
6222
+ return JSON.parse(text);
6223
+ }
6224
+ catch (error) {
6225
+ if (error instanceof SyntaxError) {
6226
+ throw new ServerError({
6227
+ message: `Server returned non-JSON response (${response.status} ${response.url}): ${error.message}`,
6228
+ statusCode: response.status,
6229
+ });
6230
+ }
6231
+ throw error;
6232
+ }
6439
6233
  }
6440
6234
  catch (error) {
6441
6235
  // If it's already one of our errors, re-throw it
6442
6236
  if (error.type && error.type.includes('Error')) {
6443
6237
  throw error;
6444
6238
  }
6445
- // Otherwise, it's likely a network error
6239
+ // Otherwise, it's a genuine network/fetch failure
6446
6240
  throw ErrorFactory.createNetworkError(error);
6447
6241
  }
6448
6242
  }
@@ -7338,9 +7132,9 @@ class PaginationHelpers {
7338
7132
  * @returns Promise resolving to a paginated result
7339
7133
  */
7340
7134
  static async getAllPaginated(params) {
7341
- const { serviceAccess, getEndpoint, folderId, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
7135
+ const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
7342
7136
  const endpoint = getEndpoint(folderId);
7343
- const headers = folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {};
7137
+ const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
7344
7138
  const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
7345
7139
  headers,
7346
7140
  params: additionalParams,
@@ -7368,13 +7162,13 @@ class PaginationHelpers {
7368
7162
  * @returns Promise resolving to an object with data and totalCount
7369
7163
  */
7370
7164
  static async getAllNonPaginated(params) {
7371
- const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
7165
+ const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
7372
7166
  // Set default field names
7373
7167
  const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
7374
7168
  const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
7375
7169
  // Determine endpoint and headers based on folderId
7376
7170
  const endpoint = folderId ? getByFolderEndpoint : getAllEndpoint;
7377
- const headers = folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {};
7171
+ const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
7378
7172
  // Make the API call based on method
7379
7173
  let response;
7380
7174
  if (method === HTTP_METHODS.POST) {
@@ -7433,6 +7227,7 @@ class PaginationHelpers {
7433
7227
  serviceAccess: config.serviceAccess,
7434
7228
  getEndpoint: config.getEndpoint,
7435
7229
  folderId,
7230
+ headers: config.headers,
7436
7231
  paginationParams: cursor ? { cursor, pageSize } : jumpToPage ? { jumpToPage, pageSize } : { pageSize },
7437
7232
  additionalParams: prefixedOptions,
7438
7233
  transformFn: config.transformFn,
@@ -7450,6 +7245,7 @@ class PaginationHelpers {
7450
7245
  getAllEndpoint: config.getEndpoint(),
7451
7246
  getByFolderEndpoint: byFolderEndpoint,
7452
7247
  folderId,
7248
+ headers: config.headers,
7453
7249
  additionalParams: prefixedOptions,
7454
7250
  transformFn: config.transformFn,
7455
7251
  method: config.method,
@@ -9237,7 +9033,7 @@ class ChoiceSetService extends BaseService {
9237
9033
  *
9238
9034
  * @example
9239
9035
  * ```typescript
9240
- * import { ChoiceSets } from '@uipath/uipath-typescript/choicesets';
9036
+ * import { ChoiceSets } from '@uipath/uipath-typescript/entities';
9241
9037
  *
9242
9038
  * const choiceSets = new ChoiceSets(sdk);
9243
9039
  *
@@ -9286,6 +9082,188 @@ class ChoiceSetService extends BaseService {
9286
9082
  }
9287
9083
  }, options);
9288
9084
  }
9085
+ /**
9086
+ * Creates a new Data Fabric choice set
9087
+ *
9088
+ * @param name - Choice set name. Must start with a
9089
+ * letter, may contain only letters, numbers, and underscores, length
9090
+ * 3–100 characters (e.g., `"expenseTypes"`).
9091
+ * @param options - Optional choice-set-level settings ({@link ChoiceSetCreateOptions})
9092
+ * @returns Promise resolving to the UUID of the created choice set
9093
+ *
9094
+ * @example
9095
+ * ```typescript
9096
+ * import { ChoiceSets } from '@uipath/uipath-typescript/entities';
9097
+ *
9098
+ * const choicesets = new ChoiceSets(sdk);
9099
+ *
9100
+ * // Minimal create
9101
+ * const expenseTypesId = await choicesets.create("expense_types");
9102
+ *
9103
+ * // With display name and description
9104
+ * const priorityLevelsId = await choicesets.create("priority_levels", {
9105
+ * displayName: "Priority Levels",
9106
+ * description: "Ticket priority categories",
9107
+ * });
9108
+ * ```
9109
+ * @internal
9110
+ */
9111
+ async create(name, options) {
9112
+ const opts = options ?? {};
9113
+ const payload = {
9114
+ ...(opts.description !== undefined && { description: opts.description }),
9115
+ ...(opts.displayName !== undefined && { displayName: opts.displayName }),
9116
+ entityDefinition: {
9117
+ name,
9118
+ fields: [],
9119
+ folderId: opts.folderKey ?? DATA_FABRIC_TENANT_FOLDER_ID,
9120
+ },
9121
+ };
9122
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.CHOICESETS.CREATE, payload);
9123
+ return response.data;
9124
+ }
9125
+ /**
9126
+ * Updates an existing choice set's metadata (display name and/or description).
9127
+ *
9128
+ * **At least one of `displayName` or `description` must be provided** —
9129
+ * the call throws `ValidationError` if both are omitted.
9130
+ *
9131
+ * @param choiceSetId - UUID of the choice set to update
9132
+ * @param options - Metadata fields to change ({@link ChoiceSetUpdateOptions})
9133
+ * @returns Promise resolving when the update is complete
9134
+ *
9135
+ * @example
9136
+ * ```typescript
9137
+ * // First, get the choice set ID using getAll()
9138
+ * const allChoiceSets = await choicesets.getAll();
9139
+ * const expenseTypes = allChoiceSets.find(cs => cs.name === 'expense_types');
9140
+ *
9141
+ * await choicesets.updateById(expenseTypes.id, {
9142
+ * displayName: "Expense Categories",
9143
+ * description: "Updated description",
9144
+ * });
9145
+ * ```
9146
+ * @internal
9147
+ */
9148
+ async updateById(choiceSetId, options) {
9149
+ if (options.displayName === undefined && options.description === undefined) {
9150
+ throw new ValidationError({
9151
+ message: 'updateById requires at least one of displayName or description.',
9152
+ });
9153
+ }
9154
+ await this.patch(DATA_FABRIC_ENDPOINTS.CHOICESETS.UPDATE(choiceSetId), {
9155
+ ...(options.displayName !== undefined && { displayName: options.displayName }),
9156
+ ...(options.description !== undefined && { description: options.description }),
9157
+ });
9158
+ }
9159
+ /**
9160
+ * Deletes a Data Fabric choice set and all its values.
9161
+ *
9162
+ * @param choiceSetId - UUID of the choice set to delete
9163
+ * @returns Promise resolving when the choice set is deleted
9164
+ *
9165
+ * @example
9166
+ * ```typescript
9167
+ * // First, get the choice set ID using getAll()
9168
+ * const allChoiceSets = await choicesets.getAll();
9169
+ * const expenseTypes = allChoiceSets.find(cs => cs.name === 'expense_types');
9170
+ *
9171
+ * await choicesets.deleteById(expenseTypes.id);
9172
+ * ```
9173
+ * @internal
9174
+ */
9175
+ async deleteById(choiceSetId) {
9176
+ await this.post(DATA_FABRIC_ENDPOINTS.CHOICESETS.DELETE(choiceSetId), {});
9177
+ }
9178
+ /**
9179
+ * Inserts a single value into a choice set.
9180
+ *
9181
+ * @param choiceSetId - UUID of the parent choice set
9182
+ * @param name - Identifier name of the new value (e.g., `"TRAVEL"`)
9183
+ * @param options - Optional fields ({@link ChoiceSetValueInsertOptions})
9184
+ * @returns Promise resolving to the inserted value ({@link ChoiceSetValueInsertResponse})
9185
+ *
9186
+ * @example
9187
+ * ```typescript
9188
+ * // First, get the choice set ID using getAll()
9189
+ * const allChoiceSets = await choicesets.getAll();
9190
+ * const expenseTypes = allChoiceSets.find(cs => cs.name === 'expense_types');
9191
+ *
9192
+ * const inserted = await choicesets.insertValueById(expenseTypes.id, 'TRAVEL', {
9193
+ * displayName: 'Travel',
9194
+ * });
9195
+ * console.log(inserted.id);
9196
+ * ```
9197
+ * @internal
9198
+ */
9199
+ async insertValueById(choiceSetId, name, options) {
9200
+ const choiceSetName = await this.resolveChoiceSetName(choiceSetId);
9201
+ const payload = {
9202
+ Name: name,
9203
+ ...(options?.displayName !== undefined && { DisplayName: options.displayName }),
9204
+ };
9205
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.CHOICESETS.INSERT_BY_NAME(choiceSetName), payload);
9206
+ const camelCased = pascalToCamelCaseKeys(response.data);
9207
+ return transformData(camelCased, EntityMap);
9208
+ }
9209
+ /**
9210
+ * Updates an existing choice-set value's display name.
9211
+ *
9212
+ * Only `displayName` is mutable; the value's `name` (identifier) is fixed at
9213
+ * insert time and cannot be changed.
9214
+ *
9215
+ * @param choiceSetId - UUID of the parent choice set
9216
+ * @param valueId - UUID of the value to update
9217
+ * @param displayName - New human-readable display name for the value
9218
+ * @returns Promise resolving to the updated value ({@link ChoiceSetValueUpdateResponse})
9219
+ *
9220
+ * @example
9221
+ * ```typescript
9222
+ * // Get the choice set ID from getAll() and the value ID from getById()
9223
+ * const allChoiceSets = await choicesets.getAll();
9224
+ * const expenseTypes = allChoiceSets.find(cs => cs.name === 'expense_types');
9225
+ * const values = await choicesets.getById(expenseTypes.id);
9226
+ * const travel = values.items.find(v => v.name === 'TRAVEL');
9227
+ *
9228
+ * await choicesets.updateValueById(expenseTypes.id, travel.id, 'Business Travel');
9229
+ * ```
9230
+ * @internal
9231
+ */
9232
+ async updateValueById(choiceSetId, valueId, displayName) {
9233
+ const choiceSetName = await this.resolveChoiceSetName(choiceSetId);
9234
+ const payload = { DisplayName: displayName };
9235
+ const response = await this.post(DATA_FABRIC_ENDPOINTS.CHOICESETS.UPDATE_BY_NAME(choiceSetName, valueId), payload);
9236
+ const camelCased = pascalToCamelCaseKeys(response.data);
9237
+ return transformData(camelCased, EntityMap);
9238
+ }
9239
+ /**
9240
+ * Deletes one or more values from a choice set.
9241
+ *
9242
+ * @param choiceSetId - UUID of the parent choice set
9243
+ * @param valueIds - Array of value UUIDs to delete
9244
+ * @returns Promise resolving when the values are deleted
9245
+ *
9246
+ * @example
9247
+ * ```typescript
9248
+ * // Get the value IDs from getById()
9249
+ * const values = await choicesets.getById('<choiceSetId>');
9250
+ * const idsToDelete = values.items.slice(0, 2).map(v => v.id);
9251
+ *
9252
+ * await choicesets.deleteValuesById('<choiceSetId>', idsToDelete);
9253
+ * ```
9254
+ * @internal
9255
+ */
9256
+ async deleteValuesById(choiceSetId, valueIds) {
9257
+ await this.post(DATA_FABRIC_ENDPOINTS.CHOICESETS.DELETE_BY_ID(choiceSetId), valueIds);
9258
+ }
9259
+ async resolveChoiceSetName(choiceSetId) {
9260
+ const all = await this.getAll();
9261
+ const match = all.find(cs => cs.id === choiceSetId);
9262
+ if (!match) {
9263
+ throw new NotFoundError({ message: `Choice set with id '${choiceSetId}' not found.` });
9264
+ }
9265
+ return match.name;
9266
+ }
9289
9267
  }
9290
9268
  __decorate([
9291
9269
  track('Choicesets.GetAll')
@@ -9293,6 +9271,24 @@ __decorate([
9293
9271
  __decorate([
9294
9272
  track('Choicesets.GetById')
9295
9273
  ], ChoiceSetService.prototype, "getById", null);
9274
+ __decorate([
9275
+ track('Choicesets.Create')
9276
+ ], ChoiceSetService.prototype, "create", null);
9277
+ __decorate([
9278
+ track('Choicesets.UpdateById')
9279
+ ], ChoiceSetService.prototype, "updateById", null);
9280
+ __decorate([
9281
+ track('Choicesets.DeleteById')
9282
+ ], ChoiceSetService.prototype, "deleteById", null);
9283
+ __decorate([
9284
+ track('Choicesets.InsertValueById')
9285
+ ], ChoiceSetService.prototype, "insertValueById", null);
9286
+ __decorate([
9287
+ track('Choicesets.UpdateValueById')
9288
+ ], ChoiceSetService.prototype, "updateValueById", null);
9289
+ __decorate([
9290
+ track('Choicesets.DeleteValuesById')
9291
+ ], ChoiceSetService.prototype, "deleteValuesById", null);
9296
9292
 
9297
9293
  /**
9298
9294
  * Maestro Process Models
@@ -9328,6 +9324,53 @@ function createProcessWithMethods(processData, service) {
9328
9324
  return Object.assign({}, processData, methods);
9329
9325
  }
9330
9326
 
9327
+ /**
9328
+ * Builds the request body for Insights RTM "top" endpoints.
9329
+ *
9330
+ * @param startTime - Start of the time range to query
9331
+ * @param endTime - End of the time range to query
9332
+ * @param isCaseManagement - Whether to filter for case management processes
9333
+ * @param options - Optional filters (packageId, processKey, version)
9334
+ * @returns Request body for the Insights RTM endpoint
9335
+ * @internal
9336
+ */
9337
+ function buildInsightsTopBody(startTime, endTime, isCaseManagement, options) {
9338
+ return {
9339
+ commonParams: {
9340
+ startTime: startTime.getTime(),
9341
+ endTime: endTime.getTime(),
9342
+ isCaseManagement,
9343
+ ...(options?.packageId ? { packageId: options.packageId } : {}),
9344
+ ...(options?.processKey ? { processKey: options.processKey } : {}),
9345
+ ...(options?.version ? { version: options.version } : {}),
9346
+ }
9347
+ };
9348
+ }
9349
+ /**
9350
+ * Fetches instance status timeline from the Insights API.
9351
+ * Shared implementation used by both MaestroProcessesService and CasesService.
9352
+ *
9353
+ * @param postFn - Bound post method from a BaseService subclass
9354
+ * @param startTime - Start of the time range to query
9355
+ * @param endTime - End of the time range to query
9356
+ * @param isCaseManagement - Whether to filter for case management processes
9357
+ * @param options - Optional settings for time bucketing granularity
9358
+ * @returns Promise resolving to an array of instance status timeline entries
9359
+ * @internal
9360
+ */
9361
+ async function fetchInstanceStatusTimeline(postFn, startTime, endTime, isCaseManagement, options) {
9362
+ const response = await postFn(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, {
9363
+ commonParams: {
9364
+ startTime: startTime.getTime(),
9365
+ endTime: endTime.getTime(),
9366
+ isCaseManagement,
9367
+ },
9368
+ timeSliceUnit: options?.groupBy,
9369
+ timezoneOffset: new Date().getTimezoneOffset() * -1,
9370
+ });
9371
+ return response.data ?? [];
9372
+ }
9373
+
9331
9374
  /**
9332
9375
  * Maps fields for Incident entities
9333
9376
  */
@@ -9704,6 +9747,11 @@ function createCaseInstanceMethods(instanceData, service) {
9704
9747
  if (!instanceData.instanceId)
9705
9748
  throw new Error('Case instance ID is undefined');
9706
9749
  return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
9750
+ },
9751
+ async getStagesSlaSummary() {
9752
+ if (!instanceData.instanceId)
9753
+ throw new Error('Case instance ID is undefined');
9754
+ return service.getStagesSlaSummary({ caseInstanceId: instanceData.instanceId });
9707
9755
  }
9708
9756
  };
9709
9757
  }
@@ -9719,6 +9767,40 @@ function createCaseInstanceWithMethods(instanceData, service) {
9719
9767
  return Object.assign({}, instanceData, methods);
9720
9768
  }
9721
9769
 
9770
+ /**
9771
+ * Insights Types
9772
+ * Shared types for Maestro insights analytics endpoints
9773
+ */
9774
+ /**
9775
+ * Time bucketing granularity for insights time-series queries.
9776
+ *
9777
+ * Controls how data points are grouped on the time axis.
9778
+ */
9779
+ exports.TimeInterval = void 0;
9780
+ (function (TimeInterval) {
9781
+ /** Group data points by hour */
9782
+ TimeInterval["Hour"] = "HOUR";
9783
+ /** Group data points by day */
9784
+ TimeInterval["Day"] = "DAY";
9785
+ /** Group data points by week */
9786
+ TimeInterval["Week"] = "WEEK";
9787
+ })(exports.TimeInterval || (exports.TimeInterval = {}));
9788
+ /**
9789
+ * Final instance statuses returned by the instance status timeline endpoint.
9790
+ *
9791
+ * Only includes statuses where the instance has finished execution — Completed, Faulted, or Cancelled.
9792
+ * Active statuses like Running or Paused are not included.
9793
+ */
9794
+ exports.InstanceFinalStatus = void 0;
9795
+ (function (InstanceFinalStatus) {
9796
+ /** Instance completed successfully */
9797
+ InstanceFinalStatus["Completed"] = "Completed";
9798
+ /** Instance encountered an error */
9799
+ InstanceFinalStatus["Faulted"] = "Faulted";
9800
+ /** Instance was cancelled */
9801
+ InstanceFinalStatus["Cancelled"] = "Cancelled";
9802
+ })(exports.InstanceFinalStatus || (exports.InstanceFinalStatus = {}));
9803
+
9722
9804
  /**
9723
9805
  * Maps fields for Process Instance entities to ensure consistent naming
9724
9806
  */
@@ -10094,34 +10176,217 @@ class MaestroProcessesService extends BaseService {
10094
10176
  // Fetch BPMN XML and add element name/type to each incident
10095
10177
  return BpmnHelpers.enrichIncidentsWithBpmnData(rawResponse.data || [], folderKey, this.processInstancesService);
10096
10178
  }
10097
- }
10098
- __decorate([
10099
- track('MaestroProcesses.GetAll')
10100
- ], MaestroProcessesService.prototype, "getAll", null);
10101
- __decorate([
10102
- track('MaestroProcesses.GetIncidents')
10103
- ], MaestroProcessesService.prototype, "getIncidents", null);
10104
-
10105
- /**
10106
- * Service class for Maestro Process Incidents
10107
- */
10108
- class ProcessIncidentsService extends BaseService {
10109
10179
  /**
10110
- * Get all process incidents across all folders
10180
+ * Get the top 5 processes ranked by run count within a time range.
10111
10181
  *
10112
- * @returns Promise resolving to array of process incident
10113
- * {@link ProcessIncidentGetAllResponse}
10182
+ * Returns an array of up to 5 processes sorted by how many times they were executed,
10183
+ * useful for identifying the most active processes in a given period.
10184
+ *
10185
+ * @param startTime - Start of the time range to query
10186
+ * @param endTime - End of the time range to query
10187
+ * @param options - Optional filters (packageId, processKey, version)
10188
+ * @returns Promise resolving to an array of {@link ProcessGetTopRunCountResponse}
10114
10189
  * @example
10115
10190
  * ```typescript
10116
- * import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
10191
+ * import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
10117
10192
  *
10118
- * const processIncidents = new ProcessIncidents(sdk);
10119
- * const incidents = await processIncidents.getAll();
10193
+ * const maestroProcesses = new MaestroProcesses(sdk);
10120
10194
  *
10121
- * // Access process incident information
10122
- * for (const incident of incidents) {
10123
- * console.log(`Process: ${incident.processKey}`);
10124
- * console.log(`Error: ${incident.errorMessage}`);
10195
+ * // Get top processes by run count for the last 7 days
10196
+ * const topProcesses = await maestroProcesses.getTopRunCount(
10197
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10198
+ * new Date()
10199
+ * );
10200
+ *
10201
+ * for (const process of topProcesses) {
10202
+ * console.log(`${process.packageId}: ${process.runCount} runs`);
10203
+ * }
10204
+ * ```
10205
+ *
10206
+ * @example
10207
+ * ```typescript
10208
+ * // Get top processes by run count for a specific package
10209
+ * const filtered = await maestroProcesses.getTopRunCount(
10210
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10211
+ * new Date(),
10212
+ * { packageId: '<packageId>' }
10213
+ * );
10214
+ * ```
10215
+ */
10216
+ async getTopRunCount(startTime, endTime, options) {
10217
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_RUN_COUNT, buildInsightsTopBody(startTime, endTime, false, options));
10218
+ return (data ?? []).map(process => ({ ...process, name: process.packageId }));
10219
+ }
10220
+ /**
10221
+ * Get all instances status counts aggregated by date for maestro processes.
10222
+ *
10223
+ * Returns time-grouped counts of instances grouped by status (Completed, Faulted, Cancelled),
10224
+ * useful for rendering time-series charts. Use `groupBy` to control the time bucket size
10225
+ * (hour, day, or week) — defaults to day if not provided.
10226
+ *
10227
+ * @param startTime - Start of the time range to query
10228
+ * @param endTime - End of the time range to query
10229
+ * @param options - Optional settings for time bucketing granularity
10230
+ * @returns Promise resolving to an array of {@link InstanceStatusTimelineResponse}
10231
+ *
10232
+ * @example
10233
+ * ```typescript
10234
+ * // Get daily instance status for the last 7 days
10235
+ * const now = new Date();
10236
+ * const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
10237
+ * const statuses = await maestroProcesses.getInstanceStatusTimeline(sevenDaysAgo, now);
10238
+ *
10239
+ * for (const entry of statuses) {
10240
+ * console.log(`${entry.startTime} — ${entry.status}: ${entry.count}`);
10241
+ * }
10242
+ * ```
10243
+ *
10244
+ * @example
10245
+ * ```typescript
10246
+ * import { TimeInterval } from '@uipath/uipath-typescript/maestro-processes';
10247
+ *
10248
+ * // Get hourly breakdown
10249
+ * const statuses = await maestroProcesses.getInstanceStatusTimeline(startTime, endTime, {
10250
+ * groupBy: TimeInterval.Hour,
10251
+ * });
10252
+ * ```
10253
+ *
10254
+ * @example
10255
+ * ```typescript
10256
+ * // Get all-time data (from Unix epoch to now)
10257
+ * const allTime = await maestroProcesses.getInstanceStatusTimeline(new Date(0), new Date());
10258
+ * ```
10259
+ */
10260
+ async getInstanceStatusTimeline(startTime, endTime, options) {
10261
+ return fetchInstanceStatusTimeline(this.post.bind(this), startTime, endTime, false, options);
10262
+ }
10263
+ /**
10264
+ * Get the top 10 processes ranked by failure count within a time range.
10265
+ *
10266
+ * Returns an array of up to 10 processes sorted by how many instances faulted,
10267
+ * useful for identifying the most error-prone processes in a given period.
10268
+ *
10269
+ * @param startTime - Start of the time range to query
10270
+ * @param endTime - End of the time range to query
10271
+ * @param options - Optional filters (packageId, processKey, version)
10272
+ * @returns Promise resolving to an array of {@link ProcessGetTopFaultedCountResponse}
10273
+ * @example
10274
+ * ```typescript
10275
+ * import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
10276
+ *
10277
+ * const maestroProcesses = new MaestroProcesses(sdk);
10278
+ *
10279
+ * // Get top processes by faulted count for the last 7 days
10280
+ * const topFailing = await maestroProcesses.getTopFaultedCount(
10281
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10282
+ * new Date()
10283
+ * );
10284
+ *
10285
+ * for (const process of topFailing) {
10286
+ * console.log(`${process.packageId}: ${process.faultedCount} failures`);
10287
+ * }
10288
+ * ```
10289
+ *
10290
+ * @example
10291
+ * ```typescript
10292
+ * // Get top processes by faulted count for a specific package
10293
+ * const filtered = await maestroProcesses.getTopFaultedCount(
10294
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10295
+ * new Date(),
10296
+ * { packageId: '<packageId>' }
10297
+ * );
10298
+ * ```
10299
+ */
10300
+ async getTopFaultedCount(startTime, endTime, options) {
10301
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, false, options));
10302
+ return (data ?? []).map(item => ({
10303
+ packageId: item.packageId,
10304
+ processKey: item.processKey,
10305
+ faultedCount: item.runCount,
10306
+ name: item.packageId,
10307
+ }));
10308
+ }
10309
+ /**
10310
+ * Get the top 5 processes ranked by total duration within a time range.
10311
+ *
10312
+ * Returns an array of up to 5 processes sorted by their total execution time,
10313
+ * useful for identifying the longest-running processes in a given period.
10314
+ *
10315
+ * @param startTime - Start of the time range to query
10316
+ * @param endTime - End of the time range to query
10317
+ * @param options - Optional filters (packageId, processKey, version)
10318
+ * @returns Promise resolving to an array of {@link ProcessGetTopDurationResponse}
10319
+ * @example
10320
+ * ```typescript
10321
+ * import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
10322
+ *
10323
+ * const maestroProcesses = new MaestroProcesses(sdk);
10324
+ *
10325
+ * // Get top processes by duration for the last 7 days
10326
+ * const topProcesses = await maestroProcesses.getTopExecutionDuration(
10327
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10328
+ * new Date()
10329
+ * );
10330
+ *
10331
+ * for (const process of topProcesses) {
10332
+ * console.log(`${process.packageId}: ${process.duration}ms total`);
10333
+ * }
10334
+ * ```
10335
+ *
10336
+ * @example
10337
+ * ```typescript
10338
+ * // Get top processes by duration for a specific package
10339
+ * const filtered = await maestroProcesses.getTopExecutionDuration(
10340
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10341
+ * new Date(),
10342
+ * { packageId: '<packageId>' }
10343
+ * );
10344
+ * ```
10345
+ */
10346
+ async getTopExecutionDuration(startTime, endTime, options) {
10347
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, false, options));
10348
+ return (data ?? []).map(process => ({ ...process, name: process.packageId }));
10349
+ }
10350
+ }
10351
+ __decorate([
10352
+ track('MaestroProcesses.GetAll')
10353
+ ], MaestroProcessesService.prototype, "getAll", null);
10354
+ __decorate([
10355
+ track('MaestroProcesses.GetIncidents')
10356
+ ], MaestroProcessesService.prototype, "getIncidents", null);
10357
+ __decorate([
10358
+ track('MaestroProcesses.GetTopRunCount')
10359
+ ], MaestroProcessesService.prototype, "getTopRunCount", null);
10360
+ __decorate([
10361
+ track('MaestroProcesses.GetInstanceStatusTimeline')
10362
+ ], MaestroProcessesService.prototype, "getInstanceStatusTimeline", null);
10363
+ __decorate([
10364
+ track('MaestroProcesses.GetTopFaultedCount')
10365
+ ], MaestroProcessesService.prototype, "getTopFaultedCount", null);
10366
+ __decorate([
10367
+ track('MaestroProcesses.GetTopExecutionDuration')
10368
+ ], MaestroProcessesService.prototype, "getTopExecutionDuration", null);
10369
+
10370
+ /**
10371
+ * Service class for Maestro Process Incidents
10372
+ */
10373
+ class ProcessIncidentsService extends BaseService {
10374
+ /**
10375
+ * Get all process incidents across all folders
10376
+ *
10377
+ * @returns Promise resolving to array of process incident
10378
+ * {@link ProcessIncidentGetAllResponse}
10379
+ * @example
10380
+ * ```typescript
10381
+ * import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
10382
+ *
10383
+ * const processIncidents = new ProcessIncidents(sdk);
10384
+ * const incidents = await processIncidents.getAll();
10385
+ *
10386
+ * // Access process incident information
10387
+ * for (const incident of incidents) {
10388
+ * console.log(`Process: ${incident.processKey}`);
10389
+ * console.log(`Error: ${incident.errorMessage}`);
10125
10390
  * console.log(`Count: ${incident.count}`);
10126
10391
  * console.log(`First occurrence: ${incident.firstOccuranceTime}`);
10127
10392
  * }
@@ -10185,6 +10450,177 @@ class CasesService extends BaseService {
10185
10450
  name: this.extractCaseName(caseItem.packageId)
10186
10451
  }));
10187
10452
  }
10453
+ /**
10454
+ * Get the top 5 case processes ranked by run count within a time range.
10455
+ *
10456
+ * Returns an array of up to 5 case processes sorted by how many times they were executed,
10457
+ * useful for identifying the most active case processes in a given period.
10458
+ *
10459
+ * @param startTime - Start of the time range to query
10460
+ * @param endTime - End of the time range to query
10461
+ * @param options - Optional filters (packageId, processKey, version)
10462
+ * @returns Promise resolving to an array of {@link CaseGetTopRunCountResponse}
10463
+ * @example
10464
+ * ```typescript
10465
+ * import { Cases } from '@uipath/uipath-typescript/cases';
10466
+ *
10467
+ * const cases = new Cases(sdk);
10468
+ *
10469
+ * // Get top case processes by run count for the last 7 days
10470
+ * const topProcesses = await cases.getTopRunCount(
10471
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10472
+ * new Date()
10473
+ * );
10474
+ *
10475
+ * for (const process of topProcesses) {
10476
+ * console.log(`${process.packageId}: ${process.runCount} runs`);
10477
+ * }
10478
+ * ```
10479
+ *
10480
+ * @example
10481
+ * ```typescript
10482
+ * // Get top case processes by run count for a specific package
10483
+ * const filtered = await cases.getTopRunCount(
10484
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10485
+ * new Date(),
10486
+ * { packageId: '<packageId>' }
10487
+ * );
10488
+ * ```
10489
+ */
10490
+ async getTopRunCount(startTime, endTime, options) {
10491
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_RUN_COUNT, buildInsightsTopBody(startTime, endTime, true, options));
10492
+ return (data ?? []).map(process => ({ ...process, name: this.extractCaseName(process.packageId) }));
10493
+ }
10494
+ /**
10495
+ * Get all instances status counts aggregated by date for case management processes.
10496
+ *
10497
+ * Returns time-grouped counts of case instances grouped by status (Completed, Faulted, Cancelled),
10498
+ * useful for rendering time-series charts. Use `groupBy` to control the time bucket size
10499
+ * (hour, day, or week) — defaults to day if not provided.
10500
+ *
10501
+ * @param startTime - Start of the time range to query
10502
+ * @param endTime - End of the time range to query
10503
+ * @param options - Optional settings for time bucketing granularity
10504
+ * @returns Promise resolving to an array of {@link InstanceStatusTimelineResponse}
10505
+ *
10506
+ * @example
10507
+ * ```typescript
10508
+ * // Get daily instance status for the last 7 days
10509
+ * const now = new Date();
10510
+ * const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
10511
+ * const statuses = await cases.getInstanceStatusTimeline(sevenDaysAgo, now);
10512
+ *
10513
+ * for (const entry of statuses) {
10514
+ * console.log(`${entry.startTime} — ${entry.status}: ${entry.count}`);
10515
+ * }
10516
+ * ```
10517
+ *
10518
+ * @example
10519
+ * ```typescript
10520
+ * import { TimeInterval } from '@uipath/uipath-typescript/cases';
10521
+ *
10522
+ * // Get weekly breakdown
10523
+ * const statuses = await cases.getInstanceStatusTimeline(startTime, endTime, {
10524
+ * groupBy: TimeInterval.Week,
10525
+ * });
10526
+ * ```
10527
+ *
10528
+ * @example
10529
+ * ```typescript
10530
+ * // Get all-time data (from Unix epoch to now)
10531
+ * const allTime = await cases.getInstanceStatusTimeline(new Date(0), new Date());
10532
+ * ```
10533
+ */
10534
+ async getInstanceStatusTimeline(startTime, endTime, options) {
10535
+ return fetchInstanceStatusTimeline(this.post.bind(this), startTime, endTime, true, options);
10536
+ }
10537
+ /**
10538
+ * Get the top 10 case processes ranked by failure count within a time range.
10539
+ *
10540
+ * Returns an array of up to 10 case processes sorted by how many instances faulted,
10541
+ * useful for identifying the most error-prone case processes in a given period.
10542
+ *
10543
+ * @param startTime - Start of the time range to query
10544
+ * @param endTime - End of the time range to query
10545
+ * @param options - Optional filters (packageId, processKey, version)
10546
+ * @returns Promise resolving to an array of {@link CaseGetTopFaultedCountResponse}
10547
+ * @example
10548
+ * ```typescript
10549
+ * import { Cases } from '@uipath/uipath-typescript/cases';
10550
+ *
10551
+ * const cases = new Cases(sdk);
10552
+ *
10553
+ * // Get top case processes by faulted count for the last 7 days
10554
+ * const topFailing = await cases.getTopFaultedCount(
10555
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10556
+ * new Date()
10557
+ * );
10558
+ *
10559
+ * for (const process of topFailing) {
10560
+ * console.log(`${process.packageId}: ${process.faultedCount} failures`);
10561
+ * }
10562
+ * ```
10563
+ *
10564
+ * @example
10565
+ * ```typescript
10566
+ * // Get top case processes by faulted count for a specific package
10567
+ * const filtered = await cases.getTopFaultedCount(
10568
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10569
+ * new Date(),
10570
+ * { packageId: '<packageId>' }
10571
+ * );
10572
+ * ```
10573
+ */
10574
+ async getTopFaultedCount(startTime, endTime, options) {
10575
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, true, options));
10576
+ return (data ?? []).map(item => ({
10577
+ packageId: item.packageId,
10578
+ processKey: item.processKey,
10579
+ faultedCount: item.runCount,
10580
+ name: this.extractCaseName(item.packageId),
10581
+ }));
10582
+ }
10583
+ /**
10584
+ * Get the top 5 case processes ranked by total duration within a time range.
10585
+ *
10586
+ * Returns an array of up to 5 case processes sorted by their total execution time,
10587
+ * useful for identifying the longest-running case processes in a given period.
10588
+ *
10589
+ * @param startTime - Start of the time range to query
10590
+ * @param endTime - End of the time range to query
10591
+ * @param options - Optional filters (packageId, processKey, version)
10592
+ * @returns Promise resolving to an array of {@link CaseGetTopDurationResponse}
10593
+ * @example
10594
+ * ```typescript
10595
+ * import { Cases } from '@uipath/uipath-typescript/cases';
10596
+ *
10597
+ * const cases = new Cases(sdk);
10598
+ *
10599
+ * // Get top case processes by duration for the last 7 days
10600
+ * const topProcesses = await cases.getTopExecutionDuration(
10601
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10602
+ * new Date()
10603
+ * );
10604
+ *
10605
+ * for (const process of topProcesses) {
10606
+ * console.log(`${process.packageId}: ${process.duration}ms total`);
10607
+ * }
10608
+ * ```
10609
+ *
10610
+ * @example
10611
+ * ```typescript
10612
+ * // Get top case processes by duration for a specific package
10613
+ * const filtered = await cases.getTopExecutionDuration(
10614
+ * new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
10615
+ * new Date(),
10616
+ * { packageId: '<packageId>' }
10617
+ * );
10618
+ * ```
10619
+ */
10620
+ async getTopExecutionDuration(startTime, endTime, options) {
10621
+ const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, true, options));
10622
+ return (data ?? []).map(process => ({ ...process, name: this.extractCaseName(process.packageId) }));
10623
+ }
10188
10624
  /**
10189
10625
  * Extract a readable case name from the packageId
10190
10626
  * @param packageId - The full package identifier
@@ -10207,6 +10643,18 @@ class CasesService extends BaseService {
10207
10643
  __decorate([
10208
10644
  track('Cases.GetAll')
10209
10645
  ], CasesService.prototype, "getAll", null);
10646
+ __decorate([
10647
+ track('Cases.GetTopRunCount')
10648
+ ], CasesService.prototype, "getTopRunCount", null);
10649
+ __decorate([
10650
+ track('Cases.GetInstanceStatusTimeline')
10651
+ ], CasesService.prototype, "getInstanceStatusTimeline", null);
10652
+ __decorate([
10653
+ track('Cases.GetTopFaultedCount')
10654
+ ], CasesService.prototype, "getTopFaultedCount", null);
10655
+ __decorate([
10656
+ track('Cases.GetTopExecutionDuration')
10657
+ ], CasesService.prototype, "getTopExecutionDuration", null);
10210
10658
 
10211
10659
  /**
10212
10660
  * Maps fields for Case Instance entities to ensure consistent naming
@@ -11322,6 +11770,40 @@ class CaseInstancesService extends BaseService {
11322
11770
  }
11323
11771
  }, apiOptions);
11324
11772
  }
11773
+ /**
11774
+ * Get stages SLA summary for case instances across folders.
11775
+ *
11776
+ * Returns stage-level SLA status and escalation information for each case instance, aggregated from Insights Real-Time Monitoring.
11777
+ *
11778
+ * @param options - Optional filtering options
11779
+ * @returns Promise resolving to an array of {@link CaseInstanceStageSLAResponse}
11780
+ * @example
11781
+ * ```typescript
11782
+ * // Get stages SLA summary for all case instances
11783
+ * const stagesSla = await caseInstances.getStagesSlaSummary();
11784
+ * for (const item of stagesSla) {
11785
+ * console.log(`Instance: ${item.caseInstanceId}`);
11786
+ * for (const stage of item.stages) {
11787
+ * console.log(` Stage: ${stage.name} - SLA Status: ${stage.slaStatus}, Due: ${stage.slaDueTime}`);
11788
+ * }
11789
+ * }
11790
+ *
11791
+ * // Filter by case instance ID
11792
+ * const filtered = await caseInstances.getStagesSlaSummary({
11793
+ * caseInstanceId: '<caseInstanceId>'
11794
+ * });
11795
+ *
11796
+ * // Using bound method on a case instance
11797
+ * const instance = await caseInstances.getById('<instanceId>', '<folderKey>');
11798
+ * const stagesSla = await instance.getStagesSlaSummary();
11799
+ * ```
11800
+ */
11801
+ async getStagesSlaSummary(options) {
11802
+ const response = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.STAGES_SUMMARY, {
11803
+ caseInstanceId: options?.caseInstanceId,
11804
+ });
11805
+ return response.data ?? [];
11806
+ }
11325
11807
  }
11326
11808
  __decorate([
11327
11809
  track('CaseInstances.GetAll')
@@ -11353,6 +11835,9 @@ __decorate([
11353
11835
  __decorate([
11354
11836
  track('CaseInstances.GetSlaSummary')
11355
11837
  ], CaseInstancesService.prototype, "getSlaSummary", null);
11838
+ __decorate([
11839
+ track('CaseInstances.GetStagesSlaSummary')
11840
+ ], CaseInstancesService.prototype, "getStagesSlaSummary", null);
11356
11841
 
11357
11842
  /**
11358
11843
  * Validates the `name` argument passed to a `getByName(name, ...)` method.
@@ -11760,6 +12245,32 @@ class BucketService extends FolderScopedService {
11760
12245
  // Transform response from PascalCase to camelCase
11761
12246
  return pascalToCamelCaseKeys(response.data);
11762
12247
  }
12248
+ /**
12249
+ * Retrieves a single orchestrator storage bucket by name.
12250
+ *
12251
+ * @param name - Bucket name to search for
12252
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional query parameters (`expand`, `select`)
12253
+ * @returns Promise resolving to a single bucket
12254
+ * {@link BucketGetResponse}
12255
+ * @example
12256
+ * ```typescript
12257
+ * import { Buckets } from '@uipath/uipath-typescript/buckets';
12258
+ *
12259
+ * const buckets = new Buckets(sdk);
12260
+ *
12261
+ * // By folder ID
12262
+ * await buckets.getByName('MyBucket', { folderId: <folderId> });
12263
+ *
12264
+ * // By folder key (GUID)
12265
+ * await buckets.getByName('MyBucket', { folderKey: '<folderKey>' });
12266
+ *
12267
+ * // By folder path
12268
+ * await buckets.getByName('MyBucket', { folderPath: '<folderPath>' });
12269
+ * ```
12270
+ */
12271
+ async getByName(name, options = {}) {
12272
+ return this.getByNameLookup('Bucket', BUCKET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => pascalToCamelCaseKeys(raw));
12273
+ }
11763
12274
  /**
11764
12275
  * Gets all buckets across folders with optional filtering and folder scoping
11765
12276
  *
@@ -12031,6 +12542,120 @@ class BucketService extends FolderScopedService {
12031
12542
  }
12032
12543
  return transformedData;
12033
12544
  }
12545
+ /**
12546
+ * Lists all files in a bucket.
12547
+ *
12548
+ * Returns a flat, recursive listing of all files in the bucket. Supports regex filtering
12549
+ * and filter / orderby / select / expand. {@link BucketFile} entries include
12550
+ * `isDirectory` so callers can distinguish folders from files.
12551
+ *
12552
+ * The method returns either:
12553
+ * - A NonPaginatedResponse with items array (when no pagination parameters are provided)
12554
+ * - A PaginatedResponse with navigation cursors (when any pagination parameter is provided)
12555
+ *
12556
+ * @param bucketId - The ID of the bucket
12557
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional parameters for regex filtering, query options, and pagination
12558
+ * @returns Promise resolving to either an array of files NonPaginatedResponse<BucketFile> or a PaginatedResponse<BucketFile> when pagination options are used.
12559
+ *
12560
+ * @example
12561
+ * ```typescript
12562
+ * import { Buckets } from '@uipath/uipath-typescript/buckets';
12563
+ *
12564
+ * const buckets = new Buckets(sdk);
12565
+ *
12566
+ * // List all files in the bucket
12567
+ * const files = await buckets.getFiles(<bucketId>, { folderId: <folderId> });
12568
+ *
12569
+ * // Filter by regex pattern
12570
+ * const pdfs = await buckets.getFiles(<bucketId>, {
12571
+ * folderId: <folderId>,
12572
+ * fileNameRegex: '.*\\.pdf$'
12573
+ * });
12574
+ *
12575
+ * // First page with pagination
12576
+ * const page1 = await buckets.getFiles(<bucketId>, { folderId: <folderId>, pageSize: 10 });
12577
+ *
12578
+ * // Navigate using cursor
12579
+ * if (page1.hasNextPage) {
12580
+ * const page2 = await buckets.getFiles(<bucketId>, { folderId: <folderId>, cursor: page1.nextCursor });
12581
+ * }
12582
+ *
12583
+ * // Jump to specific page
12584
+ * const page5 = await buckets.getFiles(<bucketId>, {
12585
+ * folderId: <folderId>,
12586
+ * jumpToPage: 5,
12587
+ * pageSize: 10
12588
+ * });
12589
+ * ```
12590
+ */
12591
+ async getFiles(bucketId, options) {
12592
+ if (!bucketId) {
12593
+ throw new ValidationError({ message: 'bucketId is required for getFiles' });
12594
+ }
12595
+ const { folderId, folderKey, folderPath, ...restOptions } = options ?? {};
12596
+ const headers = resolveFolderHeaders({
12597
+ folderId,
12598
+ folderKey,
12599
+ folderPath,
12600
+ resourceType: 'Buckets.getFiles',
12601
+ fallbackFolderKey: this.config.folderKey,
12602
+ });
12603
+ const transformBucketFile = (file) => transformData(pascalToCamelCaseKeys(file), BucketMap);
12604
+ return PaginationHelpers.getAll({
12605
+ serviceAccess: this.createPaginationServiceAccess(),
12606
+ getEndpoint: () => BUCKET_ENDPOINTS.GET_FILES(bucketId),
12607
+ transformFn: transformBucketFile,
12608
+ pagination: {
12609
+ paginationType: PaginationType.OFFSET,
12610
+ itemsField: ODATA_PAGINATION.ITEMS_FIELD,
12611
+ totalCountField: ODATA_PAGINATION.TOTAL_COUNT_FIELD,
12612
+ paginationParams: {
12613
+ pageSizeParam: ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM,
12614
+ offsetParam: ODATA_OFFSET_PARAMS.OFFSET_PARAM,
12615
+ countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM,
12616
+ },
12617
+ },
12618
+ excludeFromPrefix: ['directory', 'recursive', 'fileNameRegex'],
12619
+ headers,
12620
+ }, { ...restOptions, directory: '/', recursive: true });
12621
+ }
12622
+ /**
12623
+ * Deletes a file from a bucket
12624
+ *
12625
+ * @param bucketId - The ID of the bucket
12626
+ * @param path - The full path to the file to delete
12627
+ * @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
12628
+ * @returns Promise resolving when the file is deleted
12629
+ *
12630
+ * @example
12631
+ * ```typescript
12632
+ * import { Buckets } from '@uipath/uipath-typescript/buckets';
12633
+ *
12634
+ * const buckets = new Buckets(sdk);
12635
+ *
12636
+ * // Delete a file from a bucket
12637
+ * await buckets.deleteFile(<bucketId>, '/folder/file.pdf', { folderId: <folderId> });
12638
+ * ```
12639
+ */
12640
+ async deleteFile(bucketId, path, options) {
12641
+ if (!bucketId) {
12642
+ throw new ValidationError({ message: 'bucketId is required for deleteFile' });
12643
+ }
12644
+ if (!path) {
12645
+ throw new ValidationError({ message: 'path is required for deleteFile' });
12646
+ }
12647
+ const headers = resolveFolderHeaders({
12648
+ folderId: options?.folderId,
12649
+ folderKey: options?.folderKey,
12650
+ folderPath: options?.folderPath,
12651
+ resourceType: 'Buckets.deleteFile',
12652
+ fallbackFolderKey: this.config.folderKey,
12653
+ });
12654
+ await this.delete(BUCKET_ENDPOINTS.DELETE_FILE(bucketId), {
12655
+ params: { path },
12656
+ headers,
12657
+ });
12658
+ }
12034
12659
  /**
12035
12660
  * Gets a direct upload URL for a file in the bucket
12036
12661
  *
@@ -12049,6 +12674,9 @@ class BucketService extends FolderScopedService {
12049
12674
  __decorate([
12050
12675
  track('Buckets.GetById')
12051
12676
  ], BucketService.prototype, "getById", null);
12677
+ __decorate([
12678
+ track('Buckets.GetByName')
12679
+ ], BucketService.prototype, "getByName", null);
12052
12680
  __decorate([
12053
12681
  track('Buckets.GetAll')
12054
12682
  ], BucketService.prototype, "getAll", null);
@@ -12061,6 +12689,12 @@ __decorate([
12061
12689
  __decorate([
12062
12690
  track('Buckets.GetReadUri')
12063
12691
  ], BucketService.prototype, "getReadUri", null);
12692
+ __decorate([
12693
+ track('Buckets.GetFiles')
12694
+ ], BucketService.prototype, "getFiles", null);
12695
+ __decorate([
12696
+ track('Buckets.DeleteFile')
12697
+ ], BucketService.prototype, "deleteFile", null);
12064
12698
 
12065
12699
  exports.BucketOptions = void 0;
12066
12700
  (function (BucketOptions) {
@@ -12858,33 +13492,32 @@ class ProcessService extends FolderScopedService {
12858
13492
  }
12859
13493
  }, options);
12860
13494
  }
12861
- /**
12862
- * Starts a process execution (job)
12863
- *
12864
- * @param request - Process start request body
12865
- * @param folderId - Required folder ID
12866
- * @param options - Optional query parameters
12867
- * @returns Promise resolving to the created jobs
12868
- *
12869
- * @example
12870
- * ```typescript
12871
- * import { Processes } from '@uipath/uipath-typescript/processes';
12872
- *
12873
- * const processes = new Processes(sdk);
12874
- *
12875
- * // Start a process by process key
12876
- * const jobs = await processes.start({
12877
- * processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
12878
- * }, 123); // folderId is required
12879
- *
12880
- * // Start a process by name with specific robots
12881
- * const jobs = await processes.start({
12882
- * processName: "MyProcess"
12883
- * }, 123); // folderId is required
12884
- * ```
12885
- */
12886
- async start(request, folderId, options = {}) {
12887
- const headers = createHeaders({ [FOLDER_ID]: folderId });
13495
+ async start(request, optionsOrFolderId, legacyOptions) {
13496
+ // Normalize the two overload forms into a single internal shape.
13497
+ let folderId;
13498
+ let folderKey;
13499
+ let folderPath;
13500
+ let queryOptions;
13501
+ if (typeof optionsOrFolderId === 'number') {
13502
+ // Deprecated positional form: start(request, folderId, options?)
13503
+ folderId = optionsOrFolderId;
13504
+ queryOptions = legacyOptions ?? {};
13505
+ }
13506
+ else {
13507
+ // Preferred form: start(request, options?)
13508
+ const { folderId: fid, folderKey: fkey, folderPath: fpath, ...rest } = optionsOrFolderId ?? {};
13509
+ folderId = fid;
13510
+ folderKey = fkey;
13511
+ folderPath = fpath;
13512
+ queryOptions = rest;
13513
+ }
13514
+ const headers = resolveFolderHeaders({
13515
+ folderId,
13516
+ folderKey,
13517
+ folderPath,
13518
+ resourceType: 'processes.start',
13519
+ fallbackFolderKey: this.config.folderKey,
13520
+ });
12888
13521
  // Transform SDK field names to API field names (e.g., processKey → releaseKey)
12889
13522
  const apiRequest = transformRequest(request, ProcessMap);
12890
13523
  // Create the request object according to API spec
@@ -12892,8 +13525,8 @@ class ProcessService extends FolderScopedService {
12892
13525
  startInfo: apiRequest
12893
13526
  };
12894
13527
  // Prefix all query parameter keys with '$' for OData
12895
- const keysToPrefix = Object.keys(options);
12896
- const apiOptions = addPrefixToKeys(options, ODATA_PREFIX, keysToPrefix);
13528
+ const keysToPrefix = Object.keys(queryOptions);
13529
+ const apiOptions = addPrefixToKeys(queryOptions, ODATA_PREFIX, keysToPrefix);
12897
13530
  const response = await this.post(PROCESS_ENDPOINTS.START_PROCESS, requestBody, {
12898
13531
  params: apiOptions,
12899
13532
  headers
@@ -13226,6 +13859,17 @@ const ConversationMap = {
13226
13859
  lastActivityAt: 'lastActivityTime',
13227
13860
  agentReleaseId: 'agentId'
13228
13861
  };
13862
+ /**
13863
+ * Maps API filter param names (left) to SDK-facing names (right) for the conversation list endpoint.
13864
+ * Used by `getAll` to translate SDK filters to the field names the backend expects. Kept separate
13865
+ * from `ConversationMap` because `label`/`search` would otherwise collide with the `label` field
13866
+ * on create/update payloads.
13867
+ */
13868
+ const ConversationGetAllFilterMap = {
13869
+ agentReleaseKey: 'agentKey',
13870
+ agentReleaseId: 'agentId',
13871
+ search: 'label'
13872
+ };
13229
13873
  /**
13230
13874
  * Maps fields for Exchange entity to ensure consistent SDK naming
13231
13875
  */
@@ -13585,8 +14229,8 @@ var WordGroupType;
13585
14229
  // Auto-generated from the OpenAPI spec — do not edit manually.
13586
14230
  var ModelKind;
13587
14231
  (function (ModelKind) {
13588
- ModelKind["Classifier"] = "Classifier";
13589
14232
  ModelKind["Extractor"] = "Extractor";
14233
+ ModelKind["Classifier"] = "Classifier";
13590
14234
  })(ModelKind || (ModelKind = {}));
13591
14235
  var ModelType;
13592
14236
  (function (ModelType) {
@@ -13595,6 +14239,14 @@ var ModelType;
13595
14239
  ModelType["Predefined"] = "Predefined";
13596
14240
  })(ModelType || (ModelType = {}));
13597
14241
 
14242
+ // Auto-generated from the OpenAPI spec — do not edit manually.
14243
+ var ErrorSeverity;
14244
+ (function (ErrorSeverity) {
14245
+ ErrorSeverity["Info"] = "Info";
14246
+ ErrorSeverity["Warning"] = "Warning";
14247
+ ErrorSeverity["Error"] = "Error";
14248
+ })(ErrorSeverity || (ErrorSeverity = {}));
14249
+
13598
14250
  // Auto-generated from the OpenAPI spec — do not edit manually.
13599
14251
  var ClassifierDocumentTypeType;
13600
14252
  (function (ClassifierDocumentTypeType) {
@@ -13619,6 +14271,13 @@ var GptFieldType;
13619
14271
  GptFieldType["Number"] = "Number";
13620
14272
  GptFieldType["Text"] = "Text";
13621
14273
  })(GptFieldType || (GptFieldType = {}));
14274
+ var JobStatus;
14275
+ (function (JobStatus) {
14276
+ JobStatus["Succeeded"] = "Succeeded";
14277
+ JobStatus["Failed"] = "Failed";
14278
+ JobStatus["Running"] = "Running";
14279
+ JobStatus["NotStarted"] = "NotStarted";
14280
+ })(JobStatus || (JobStatus = {}));
13622
14281
  var ValidationDisplayMode;
13623
14282
  (function (ValidationDisplayMode) {
13624
14283
  ValidationDisplayMode["Classic"] = "Classic";
@@ -13705,8 +14364,10 @@ var index = /*#__PURE__*/Object.freeze({
13705
14364
  get DocumentActionPriority () { return DocumentActionPriority; },
13706
14365
  get DocumentActionStatus () { return DocumentActionStatus; },
13707
14366
  get DocumentActionType () { return DocumentActionType; },
14367
+ get ErrorSeverity () { return ErrorSeverity; },
13708
14368
  get FieldType () { return FieldType; },
13709
14369
  get GptFieldType () { return GptFieldType; },
14370
+ get JobStatus () { return JobStatus; },
13710
14371
  get LogicalOperator () { return LogicalOperator; },
13711
14372
  get MarkupType () { return MarkupType; },
13712
14373
  get ModelKind () { return ModelKind; },
@@ -13800,17 +14461,10 @@ function getAppBase() {
13800
14461
  return getMetaTagContent(exports.UiPathMetaTags.APP_BASE) || '/';
13801
14462
  }
13802
14463
 
13803
- exports.APP_NAME = APP_NAME;
13804
14464
  exports.AgentMap = AgentMap;
13805
14465
  exports.AuthenticationError = AuthenticationError;
13806
14466
  exports.AuthorizationError = AuthorizationError;
13807
- exports.CLOUD_CLIENT_ID = CLOUD_CLIENT_ID;
13808
- exports.CLOUD_ORGANIZATION_NAME = CLOUD_ORGANIZATION_NAME;
13809
- exports.CLOUD_REDIRECT_URI = CLOUD_REDIRECT_URI;
13810
- exports.CLOUD_ROLE_NAME = CLOUD_ROLE_NAME;
13811
- exports.CLOUD_TENANT_NAME = CLOUD_TENANT_NAME;
13812
- exports.CLOUD_URL = CLOUD_URL;
13813
- exports.CONNECTION_STRING = CONNECTION_STRING;
14467
+ exports.ConversationGetAllFilterMap = ConversationGetAllFilterMap;
13814
14468
  exports.ConversationMap = ConversationMap;
13815
14469
  exports.DEFAULT_ITEMS_FIELD = DEFAULT_ITEMS_FIELD;
13816
14470
  exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE;
@@ -13824,17 +14478,10 @@ exports.MessageMap = MessageMap;
13824
14478
  exports.NetworkError = NetworkError;
13825
14479
  exports.NotFoundError = NotFoundError;
13826
14480
  exports.RateLimitError = RateLimitError;
13827
- exports.SDK_LOGGER_NAME = SDK_LOGGER_NAME;
13828
- exports.SDK_RUN_EVENT = SDK_RUN_EVENT;
13829
- exports.SDK_SERVICE_NAME = SDK_SERVICE_NAME;
13830
- exports.SDK_VERSION = SDK_VERSION;
13831
- exports.SERVICE = SERVICE;
13832
14481
  exports.ServerError = ServerError;
13833
- exports.UNKNOWN = UNKNOWN$1;
13834
14482
  exports.UiPath = UiPath;
13835
14483
  exports.UiPathError = UiPathError;
13836
14484
  exports.UserSettingsMap = UserSettingsMap;
13837
- exports.VERSION = VERSION;
13838
14485
  exports.ValidationError = ValidationError;
13839
14486
  exports.createAgentWithMethods = createAgentWithMethods;
13840
14487
  exports.createCaseInstanceWithMethods = createCaseInstanceWithMethods;