@uipath/uipath-typescript 1.3.2 → 1.3.4

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 (38) hide show
  1. package/dist/assets/index.cjs +21 -8
  2. package/dist/assets/index.mjs +21 -8
  3. package/dist/attachments/index.cjs +21 -8
  4. package/dist/attachments/index.mjs +21 -8
  5. package/dist/buckets/index.cjs +21 -8
  6. package/dist/buckets/index.mjs +21 -8
  7. package/dist/cases/index.cjs +41 -13
  8. package/dist/cases/index.d.ts +15 -0
  9. package/dist/cases/index.mjs +41 -13
  10. package/dist/conversational-agent/index.cjs +39 -8
  11. package/dist/conversational-agent/index.d.ts +55 -2
  12. package/dist/conversational-agent/index.mjs +39 -8
  13. package/dist/core/index.cjs +16 -1
  14. package/dist/core/index.d.ts +1 -1
  15. package/dist/core/index.mjs +16 -1
  16. package/dist/entities/index.cjs +55 -8
  17. package/dist/entities/index.d.ts +54 -0
  18. package/dist/entities/index.mjs +55 -8
  19. package/dist/feedback/index.cjs +1911 -0
  20. package/dist/feedback/index.d.ts +475 -0
  21. package/dist/feedback/index.mjs +1909 -0
  22. package/dist/index.cjs +451 -189
  23. package/dist/index.d.ts +388 -13
  24. package/dist/index.mjs +452 -190
  25. package/dist/index.umd.js +451 -189
  26. package/dist/jobs/index.cjs +384 -8
  27. package/dist/jobs/index.d.ts +220 -2
  28. package/dist/jobs/index.mjs +385 -9
  29. package/dist/maestro-processes/index.cjs +21 -8
  30. package/dist/maestro-processes/index.mjs +21 -8
  31. package/dist/processes/index.cjs +21 -8
  32. package/dist/processes/index.mjs +21 -8
  33. package/dist/queues/index.cjs +21 -8
  34. package/dist/queues/index.mjs +21 -8
  35. package/dist/tasks/index.cjs +41 -13
  36. package/dist/tasks/index.d.ts +25 -10
  37. package/dist/tasks/index.mjs +42 -14
  38. package/package.json +13 -2
package/dist/index.cjs CHANGED
@@ -4387,6 +4387,21 @@ function getErrorDetails(error) {
4387
4387
  };
4388
4388
  }
4389
4389
 
4390
+ exports.TaskUserType = void 0;
4391
+ (function (TaskUserType) {
4392
+ /** A user of this type is supposed to be used by a human. */
4393
+ TaskUserType["User"] = "User";
4394
+ /** A user of this type is automatically created when adding a robot, is associated with Robot role and it is used by a robot when communicating with Orchestrator. */
4395
+ TaskUserType["Robot"] = "Robot";
4396
+ /** A user of type Directory User */
4397
+ TaskUserType["DirectoryUser"] = "DirectoryUser";
4398
+ /** A user of type Directory Group */
4399
+ TaskUserType["DirectoryGroup"] = "DirectoryGroup";
4400
+ /** A user of type Directory Robot Account */
4401
+ TaskUserType["DirectoryRobot"] = "DirectoryRobot";
4402
+ /** A user of type Directory External Application */
4403
+ TaskUserType["DirectoryExternalApplication"] = "DirectoryExternalApplication";
4404
+ })(exports.TaskUserType || (exports.TaskUserType = {}));
4390
4405
  /**
4391
4406
  * Types of tasks available in Action Center.
4392
4407
  * Each type determines the task's behavior, UI rendering, and completion requirements.
@@ -4521,6 +4536,9 @@ const QUEUE_ENDPOINTS = {
4521
4536
  const JOB_ENDPOINTS = {
4522
4537
  GET_ALL: `${ORCHESTRATOR_BASE}/odata/Jobs`,
4523
4538
  GET_BY_KEY: (identifier) => `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.GetByKey(identifier=${identifier})`,
4539
+ STOP: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.StopJobs`,
4540
+ RESUME: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.ResumeJob`,
4541
+ RESTART: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.RestartJob`,
4524
4542
  };
4525
4543
  /**
4526
4544
  * Orchestrator Asset Service Endpoints
@@ -4592,6 +4610,7 @@ const DATA_FABRIC_ENDPOINTS = {
4592
4610
  BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
4593
4611
  UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
4594
4612
  UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
4613
+ DELETE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete/${recordId}`,
4595
4614
  DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
4596
4615
  UPSERT: `${DATAFABRIC_BASE}/api/Entity`,
4597
4616
  DELETE: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
@@ -5433,7 +5452,7 @@ function normalizeBaseUrl(url) {
5433
5452
  // Connection string placeholder that will be replaced during build
5434
5453
  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";
5435
5454
  // SDK Version placeholder
5436
- const SDK_VERSION = "1.3.2";
5455
+ const SDK_VERSION = "1.3.4";
5437
5456
  const VERSION = "Version";
5438
5457
  const SERVICE = "Service";
5439
5458
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6268,6 +6287,8 @@ class ErrorFactory {
6268
6287
 
6269
6288
  const FOLDER_KEY = 'X-UIPATH-FolderKey';
6270
6289
  const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
6290
+ const TRACEPARENT = 'traceparent';
6291
+ const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
6271
6292
  /**
6272
6293
  * Content type constants for HTTP requests/responses
6273
6294
  */
@@ -6321,8 +6342,13 @@ class ApiClient {
6321
6342
  if (isFormData) {
6322
6343
  delete defaultHeaders['Content-Type'];
6323
6344
  }
6345
+ const traceId = crypto.randomUUID().replace(/-/g, '');
6346
+ const spanId = crypto.randomUUID().replace(/-/g, '').slice(0, 16);
6347
+ const traceparentValue = `00-${traceId}-${spanId}-01`;
6324
6348
  const headers = {
6325
6349
  ...defaultHeaders,
6350
+ [TRACEPARENT]: traceparentValue,
6351
+ [UIPATH_TRACEPARENT_ID]: traceparentValue,
6326
6352
  ...options.headers
6327
6353
  };
6328
6354
  // Convert params to URLSearchParams
@@ -6362,7 +6388,11 @@ class ApiClient {
6362
6388
  const text = await response.text();
6363
6389
  return text;
6364
6390
  }
6365
- return response.json();
6391
+ const text = await response.text();
6392
+ if (!text) {
6393
+ return undefined;
6394
+ }
6395
+ return JSON.parse(text);
6366
6396
  }
6367
6397
  catch (error) {
6368
6398
  // If it's already one of our errors, re-throw it
@@ -7265,8 +7295,9 @@ class PaginationHelpers {
7265
7295
  });
7266
7296
  }
7267
7297
  // Extract and transform items from response
7268
- const rawItems = response.data?.[itemsField];
7269
- const totalCount = response.data?.[totalCountField];
7298
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7299
+ const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
7300
+ const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
7270
7301
  // Parse items - automatically handle JSON string responses
7271
7302
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
7272
7303
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -7462,7 +7493,7 @@ class BaseService {
7462
7493
  const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
7463
7494
  // Prepare request parameters based on pagination type
7464
7495
  const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
7465
- // For POST requests, merge pagination params into body; for GET, use query params
7496
+ // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
7466
7497
  if (method.toUpperCase() === 'POST') {
7467
7498
  const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
7468
7499
  options.body = {
@@ -7470,6 +7501,7 @@ class BaseService {
7470
7501
  ...options.params,
7471
7502
  ...requestParams
7472
7503
  };
7504
+ options.params = undefined;
7473
7505
  }
7474
7506
  else {
7475
7507
  // Merge pagination parameters with existing parameters
@@ -7510,7 +7542,6 @@ class BaseService {
7510
7542
  if (params.pageNumber && params.pageNumber > 1) {
7511
7543
  requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
7512
7544
  }
7513
- // Include total count for ODATA APIs
7514
7545
  {
7515
7546
  requestParams[countParam] = true;
7516
7547
  }
@@ -7538,8 +7569,9 @@ class BaseService {
7538
7569
  const totalCountField = fields.totalCountField || 'totalRecordCount';
7539
7570
  const continuationTokenField = fields.continuationTokenField || 'continuationToken';
7540
7571
  // Extract items and metadata
7541
- const items = response.data[itemsField] || [];
7542
- const totalCount = response.data[totalCountField];
7572
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7573
+ const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
7574
+ const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
7543
7575
  const continuationToken = response.data[continuationTokenField];
7544
7576
  // Determine if there are more pages
7545
7577
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -7620,6 +7652,13 @@ function createEntityMethods(entityData, service) {
7620
7652
  throw new Error('Entity ID is undefined');
7621
7653
  return service.deleteRecordsById(entityData.id, recordIds, options);
7622
7654
  },
7655
+ async deleteRecord(recordId) {
7656
+ if (!entityData.id)
7657
+ throw new Error('Entity ID is undefined');
7658
+ if (!recordId)
7659
+ throw new Error('Record ID is undefined');
7660
+ return service.deleteRecordById(entityData.id, recordId);
7661
+ },
7623
7662
  async getAllRecords(options) {
7624
7663
  if (!entityData.id)
7625
7664
  throw new Error('Entity ID is undefined');
@@ -8172,6 +8211,8 @@ class EntityService extends BaseService {
8172
8211
  /**
8173
8212
  * Deletes data from an entity by entity ID
8174
8213
  *
8214
+ * Note: Records deleted using deleteRecordsById will not trigger Data Fabric trigger events. Use {@link deleteRecordById} if you need trigger events to fire for the deleted record.
8215
+ *
8175
8216
  * @param entityId - UUID of the entity
8176
8217
  * @param recordIds - Array of record UUIDs to delete
8177
8218
  * @param options - Delete options
@@ -8199,6 +8240,27 @@ class EntityService extends BaseService {
8199
8240
  });
8200
8241
  return response.data;
8201
8242
  }
8243
+ /**
8244
+ * Deletes a single record from an entity by entity ID and record ID
8245
+ *
8246
+ * Note: Data Fabric supports trigger events only on individual deletes, not on deleting multiple records.
8247
+ * Use this method if you need trigger events to fire for the deleted record.
8248
+ *
8249
+ * @param entityId - UUID of the entity
8250
+ * @param recordId - UUID of the record to delete
8251
+ * @returns Promise resolving to void on success
8252
+ * @example
8253
+ * ```typescript
8254
+ * import { Entities } from '@uipath/uipath-typescript/entities';
8255
+ *
8256
+ * const entities = new Entities(sdk);
8257
+ *
8258
+ * await entities.deleteRecordById("<entityId>", "<recordId>");
8259
+ * ```
8260
+ */
8261
+ async deleteRecordById(entityId, recordId) {
8262
+ await this.delete(DATA_FABRIC_ENDPOINTS.ENTITY.DELETE_RECORD_BY_ID(entityId, recordId));
8263
+ }
8202
8264
  /**
8203
8265
  * Gets all entities in the system
8204
8266
  *
@@ -8751,6 +8813,9 @@ __decorate([
8751
8813
  __decorate([
8752
8814
  track('Entities.DeleteRecordsById')
8753
8815
  ], EntityService.prototype, "deleteRecordsById", null);
8816
+ __decorate([
8817
+ track('Entities.DeleteRecordById')
8818
+ ], EntityService.prototype, "deleteRecordById", null);
8754
8819
  __decorate([
8755
8820
  track('Entities.GetAll')
8756
8821
  ], EntityService.prototype, "getAll", null);
@@ -9936,15 +10001,15 @@ class TaskService extends BaseService {
9936
10001
  return createTaskWithMethods(transformedData, this);
9937
10002
  }
9938
10003
  /**
9939
- * Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
10004
+ * Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
9940
10005
  *
9941
10006
  * The method returns either:
9942
- * - An array of users (when no pagination parameters are provided)
10007
+ * - An array of task users (when no pagination parameters are provided)
9943
10008
  * - A paginated result with navigation cursors (when any pagination parameter is provided)
9944
10009
  *
9945
- * @param folderId - The folder ID to get users from
10010
+ * @param folderId - The folder ID to get task users from
9946
10011
  * @param options - Optional query and pagination parameters
9947
- * @returns Promise resolving to an array of users or paginated result
10012
+ * @returns Promise resolving to an array of task users or paginated result
9948
10013
  *
9949
10014
  * @example
9950
10015
  * ```typescript
@@ -9955,7 +10020,7 @@ class TaskService extends BaseService {
9955
10020
  * // Standard array return
9956
10021
  * const users = await tasks.getUsers(123);
9957
10022
  *
9958
- * // Get users with filtering
10023
+ * // Get task users with filtering
9959
10024
  * const users = await tasks.getUsers(123, {
9960
10025
  * filter: "name eq 'abc'"
9961
10026
  * });
@@ -11361,6 +11426,27 @@ function createJobMethods(jobData, service) {
11361
11426
  throw new Error('Job folderId is undefined');
11362
11427
  return service.getOutput(jobData.key, jobData.folderId);
11363
11428
  },
11429
+ async stop(options) {
11430
+ if (!jobData.key)
11431
+ throw new Error('Job key is undefined');
11432
+ if (!jobData.folderId)
11433
+ throw new Error('Job folderId is undefined');
11434
+ return service.stop([jobData.key], jobData.folderId, options);
11435
+ },
11436
+ async resume(options) {
11437
+ if (!jobData.key)
11438
+ throw new Error('Job key is undefined');
11439
+ if (!jobData.folderId)
11440
+ throw new Error('Job folderId is undefined');
11441
+ return service.resume(jobData.key, jobData.folderId, options);
11442
+ },
11443
+ async restart() {
11444
+ if (!jobData.key)
11445
+ throw new Error('Job key is undefined');
11446
+ if (!jobData.folderId)
11447
+ throw new Error('Job folderId is undefined');
11448
+ return service.restart(jobData.key, jobData.folderId);
11449
+ },
11364
11450
  };
11365
11451
  }
11366
11452
  /**
@@ -11375,6 +11461,8 @@ function createJobWithMethods(jobData, service) {
11375
11461
  return Object.assign({}, jobData, methods);
11376
11462
  }
11377
11463
 
11464
+ /** Maximum number of job keys to resolve in a single OData filter query */
11465
+ const JOB_KEY_RESOLUTION_CHUNK_SIZE = 50;
11378
11466
  /**
11379
11467
  * Maps fields for Job entities to ensure consistent naming
11380
11468
  * Semantic renames only — case conversion handled by pascalToCamelCaseKeys()
@@ -11433,6 +11521,182 @@ __decorate([
11433
11521
  track('Attachments.GetById')
11434
11522
  ], AttachmentService.prototype, "getById", null);
11435
11523
 
11524
+ /**
11525
+ * Enum for package types
11526
+ */
11527
+ exports.PackageType = void 0;
11528
+ (function (PackageType) {
11529
+ PackageType["Undefined"] = "Undefined";
11530
+ PackageType["Process"] = "Process";
11531
+ PackageType["ProcessOrchestration"] = "ProcessOrchestration";
11532
+ PackageType["WebApp"] = "WebApp";
11533
+ PackageType["Agent"] = "Agent";
11534
+ PackageType["TestAutomationProcess"] = "TestAutomationProcess";
11535
+ PackageType["Api"] = "Api";
11536
+ PackageType["MCPServer"] = "MCPServer";
11537
+ PackageType["BusinessRules"] = "BusinessRules";
11538
+ PackageType["CaseManagement"] = "CaseManagement";
11539
+ PackageType["Flow"] = "Flow";
11540
+ PackageType["Function"] = "Function";
11541
+ })(exports.PackageType || (exports.PackageType = {}));
11542
+ /**
11543
+ * Enum for job priority
11544
+ */
11545
+ exports.JobPriority = void 0;
11546
+ (function (JobPriority) {
11547
+ JobPriority["Low"] = "Low";
11548
+ JobPriority["Normal"] = "Normal";
11549
+ JobPriority["High"] = "High";
11550
+ })(exports.JobPriority || (exports.JobPriority = {}));
11551
+ /**
11552
+ * Enum for target framework
11553
+ */
11554
+ exports.TargetFramework = void 0;
11555
+ (function (TargetFramework) {
11556
+ TargetFramework["Legacy"] = "Legacy";
11557
+ TargetFramework["Windows"] = "Windows";
11558
+ TargetFramework["Portable"] = "Portable";
11559
+ })(exports.TargetFramework || (exports.TargetFramework = {}));
11560
+ /**
11561
+ * Enum for robot size
11562
+ */
11563
+ exports.RobotSize = void 0;
11564
+ (function (RobotSize) {
11565
+ RobotSize["Small"] = "Small";
11566
+ RobotSize["Standard"] = "Standard";
11567
+ RobotSize["Medium"] = "Medium";
11568
+ RobotSize["Large"] = "Large";
11569
+ })(exports.RobotSize || (exports.RobotSize = {}));
11570
+ /**
11571
+ * Enum for remote control access
11572
+ */
11573
+ exports.RemoteControlAccess = void 0;
11574
+ (function (RemoteControlAccess) {
11575
+ RemoteControlAccess["None"] = "None";
11576
+ RemoteControlAccess["ReadOnly"] = "ReadOnly";
11577
+ RemoteControlAccess["Full"] = "Full";
11578
+ })(exports.RemoteControlAccess || (exports.RemoteControlAccess = {}));
11579
+ /**
11580
+ * Enum for process start strategy
11581
+ */
11582
+ exports.StartStrategy = void 0;
11583
+ (function (StartStrategy) {
11584
+ StartStrategy["All"] = "All";
11585
+ StartStrategy["Specific"] = "Specific";
11586
+ StartStrategy["RobotCount"] = "RobotCount";
11587
+ StartStrategy["JobsCount"] = "JobsCount";
11588
+ StartStrategy["ModernJobsCount"] = "ModernJobsCount";
11589
+ })(exports.StartStrategy || (exports.StartStrategy = {}));
11590
+ /**
11591
+ * Enum for package source type
11592
+ */
11593
+ exports.PackageSourceType = void 0;
11594
+ (function (PackageSourceType) {
11595
+ PackageSourceType["Manual"] = "Manual";
11596
+ PackageSourceType["Schedule"] = "Schedule";
11597
+ PackageSourceType["Queue"] = "Queue";
11598
+ PackageSourceType["StudioWeb"] = "StudioWeb";
11599
+ PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11600
+ PackageSourceType["StudioDesktop"] = "StudioDesktop";
11601
+ PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11602
+ PackageSourceType["Apps"] = "Apps";
11603
+ PackageSourceType["SAP"] = "SAP";
11604
+ PackageSourceType["HttpTrigger"] = "HttpTrigger";
11605
+ PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
11606
+ PackageSourceType["RobotAPI"] = "RobotAPI";
11607
+ PackageSourceType["Assistant"] = "Assistant";
11608
+ PackageSourceType["CommandLine"] = "CommandLine";
11609
+ PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
11610
+ PackageSourceType["Autopilot"] = "Autopilot";
11611
+ PackageSourceType["TestManager"] = "TestManager";
11612
+ PackageSourceType["AgentService"] = "AgentService";
11613
+ PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11614
+ PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
11615
+ PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
11616
+ PackageSourceType["AgentHub"] = "AgentHub";
11617
+ PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
11618
+ })(exports.PackageSourceType || (exports.PackageSourceType = {}));
11619
+ /**
11620
+ * Enum for job source type
11621
+ */
11622
+ exports.JobSourceType = void 0;
11623
+ (function (JobSourceType) {
11624
+ JobSourceType["Manual"] = "Manual";
11625
+ JobSourceType["Schedule"] = "Schedule";
11626
+ JobSourceType["Agent"] = "Agent";
11627
+ JobSourceType["Queue"] = "Queue";
11628
+ JobSourceType["StudioWeb"] = "StudioWeb";
11629
+ JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11630
+ JobSourceType["StudioDesktop"] = "StudioDesktop";
11631
+ JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11632
+ JobSourceType["Apps"] = "Apps";
11633
+ JobSourceType["SAP"] = "SAP";
11634
+ JobSourceType["HttpTrigger"] = "HttpTrigger";
11635
+ JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
11636
+ JobSourceType["RobotAPI"] = "RobotAPI";
11637
+ JobSourceType["CommandLine"] = "CommandLine";
11638
+ JobSourceType["RobotNetAPI"] = "RobotNetAPI";
11639
+ JobSourceType["Autopilot"] = "Autopilot";
11640
+ JobSourceType["TestManager"] = "TestManager";
11641
+ JobSourceType["AgentService"] = "AgentService";
11642
+ JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11643
+ JobSourceType["PluginEcosystem"] = "PluginEcosystem";
11644
+ JobSourceType["PerformanceTesting"] = "PerformanceTesting";
11645
+ JobSourceType["AgentHub"] = "AgentHub";
11646
+ JobSourceType["ApiWorkflow"] = "ApiWorkflow";
11647
+ JobSourceType["CaseManagement"] = "CaseManagement";
11648
+ })(exports.JobSourceType || (exports.JobSourceType = {}));
11649
+ /**
11650
+ * Enum for stop strategy
11651
+ */
11652
+ exports.StopStrategy = void 0;
11653
+ (function (StopStrategy) {
11654
+ StopStrategy["SoftStop"] = "SoftStop";
11655
+ StopStrategy["Kill"] = "Kill";
11656
+ })(exports.StopStrategy || (exports.StopStrategy = {}));
11657
+ /**
11658
+ * Enum for runtime type
11659
+ */
11660
+ exports.RuntimeType = void 0;
11661
+ (function (RuntimeType) {
11662
+ RuntimeType["NonProduction"] = "NonProduction";
11663
+ RuntimeType["Attended"] = "Attended";
11664
+ RuntimeType["Unattended"] = "Unattended";
11665
+ RuntimeType["Development"] = "Development";
11666
+ RuntimeType["Studio"] = "Studio";
11667
+ RuntimeType["RpaDeveloper"] = "RpaDeveloper";
11668
+ RuntimeType["StudioX"] = "StudioX";
11669
+ RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
11670
+ RuntimeType["Headless"] = "Headless";
11671
+ RuntimeType["StudioPro"] = "StudioPro";
11672
+ RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
11673
+ RuntimeType["TestAutomation"] = "TestAutomation";
11674
+ RuntimeType["AutomationCloud"] = "AutomationCloud";
11675
+ RuntimeType["Serverless"] = "Serverless";
11676
+ RuntimeType["AutomationKit"] = "AutomationKit";
11677
+ RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
11678
+ RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
11679
+ RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
11680
+ RuntimeType["Hosting"] = "Hosting";
11681
+ RuntimeType["AssistantWeb"] = "AssistantWeb";
11682
+ RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
11683
+ RuntimeType["AgentService"] = "AgentService";
11684
+ RuntimeType["AppTest"] = "AppTest";
11685
+ RuntimeType["PerformanceTest"] = "PerformanceTest";
11686
+ RuntimeType["BusinessRule"] = "BusinessRule";
11687
+ RuntimeType["CaseManagement"] = "CaseManagement";
11688
+ RuntimeType["Flow"] = "Flow";
11689
+ })(exports.RuntimeType || (exports.RuntimeType = {}));
11690
+ /**
11691
+ * Enum for job type
11692
+ */
11693
+ exports.JobType = void 0;
11694
+ (function (JobType) {
11695
+ JobType["Unattended"] = "Unattended";
11696
+ JobType["Attended"] = "Attended";
11697
+ JobType["ServerlessGeneric"] = "ServerlessGeneric";
11698
+ })(exports.JobType || (exports.JobType = {}));
11699
+
11436
11700
  /**
11437
11701
  * Service for interacting with UiPath Orchestrator Jobs API
11438
11702
  */
@@ -11602,6 +11866,121 @@ class JobService extends FolderScopedService {
11602
11866
  }
11603
11867
  return null;
11604
11868
  }
11869
+ /**
11870
+ * Stops one or more jobs by their UUID keys.
11871
+ *
11872
+ * Sends a stop request for the specified jobs to the Orchestrator. Throws if any keys cannot be resolved.
11873
+ *
11874
+ * @param jobKeys - Array of job UUID keys to stop (e.g., from {@link JobGetResponse}.key)
11875
+ * @param folderId - The folder ID where the jobs reside (required)
11876
+ * @param options - Optional {@link JobStopOptions} including stop strategy
11877
+ * @returns Promise that resolves when the jobs are stopped successfully, or rejects on failure
11878
+ *
11879
+ * @example
11880
+ * ```typescript
11881
+ * // Stop a single job with default soft stop
11882
+ * await jobs.stop([<jobKey>], <folderId>);
11883
+ * ```
11884
+ *
11885
+ * @example
11886
+ * ```typescript
11887
+ * import { StopStrategy } from '@uipath/uipath-typescript/jobs';
11888
+ *
11889
+ * // Force-kill multiple jobs
11890
+ * await jobs.stop(
11891
+ * [<jobKey1>, <jobKey2>],
11892
+ * <folderId>,
11893
+ * { strategy: StopStrategy.Kill }
11894
+ * );
11895
+ * ```
11896
+ */
11897
+ async stop(jobKeys, folderId, options) {
11898
+ if (jobKeys.length === 0) {
11899
+ return;
11900
+ }
11901
+ if (!folderId) {
11902
+ throw new ValidationError({ message: 'folderId is required for stop' });
11903
+ }
11904
+ const headers = createHeaders({ [FOLDER_ID]: folderId });
11905
+ const strategy = options?.strategy ?? exports.StopStrategy.SoftStop;
11906
+ const jobIds = await this.resolveJobKeys(jobKeys, folderId);
11907
+ await this.stopJobsByIds(jobIds, strategy, headers);
11908
+ }
11909
+ /**
11910
+ * Resumes a suspended job.
11911
+ *
11912
+ * Sends a resume request to a job that is currently in the `Suspended` state.
11913
+ * The job transitions to `Resumed` and then to `Running` as it continues execution. Optionally pass
11914
+ * input arguments to provide data for the resumed workflow.
11915
+ *
11916
+ * @param jobKey - The unique key (GUID) of the suspended job to resume
11917
+ * @param folderId - The folder ID where the job resides
11918
+ * @param options - Optional parameters including input arguments
11919
+ * @returns Promise that resolves when the job is resumed successfully, or rejects on failure
11920
+ *
11921
+ * @example
11922
+ * ```typescript
11923
+ * // Resume a suspended job
11924
+ * await jobs.resume(<jobKey>, <folderId>);
11925
+ * ```
11926
+ *
11927
+ * @example
11928
+ * ```typescript
11929
+ * // Resume with input arguments
11930
+ * await jobs.resume(<jobKey>, <folderId>, {
11931
+ * inputArguments: { approved: true }
11932
+ * });
11933
+ * ```
11934
+ */
11935
+ async resume(jobKey, folderId, options) {
11936
+ if (!jobKey) {
11937
+ throw new ValidationError({ message: 'jobKey is required for resume' });
11938
+ }
11939
+ if (!folderId) {
11940
+ throw new ValidationError({ message: 'folderId is required for resume' });
11941
+ }
11942
+ const headers = createHeaders({ [FOLDER_ID]: folderId });
11943
+ const body = { jobKey };
11944
+ if (options?.inputArguments) {
11945
+ body.inputArguments = JSON.stringify(options.inputArguments);
11946
+ }
11947
+ await this.post(JOB_ENDPOINTS.RESUME, body, { headers });
11948
+ }
11949
+ /**
11950
+ * Restarts a job in a final state (Successful, Faulted, or Stopped).
11951
+ *
11952
+ * Creates a **new** job execution from a previously successful, faulted, or stopped job.
11953
+ * The new job has its own unique `key`, starts in `Pending` state, and uses
11954
+ * the same process and input arguments as the original job.
11955
+ *
11956
+ * To monitor the new job's progress, poll with {@link getById}
11957
+ * using the returned job's key until the state reaches a final value.
11958
+ *
11959
+ * @param jobKey - The unique key (GUID) of the job to restart
11960
+ * @param folderId - The folder ID where the job resides
11961
+ * @returns Promise resolving to the new {@link JobGetResponse} with full job details
11962
+ *
11963
+ * @example
11964
+ * ```typescript
11965
+ * // Restart a faulted job
11966
+ * const newJob = await jobs.restart(<jobKey>, <folderId>);
11967
+ * console.log(newJob.state); // 'Pending'
11968
+ * console.log(newJob.key); // new job key (different from original)
11969
+ * ```
11970
+ */
11971
+ async restart(jobKey, folderId) {
11972
+ if (!jobKey) {
11973
+ throw new ValidationError({ message: 'jobKey is required for restart' });
11974
+ }
11975
+ if (!folderId) {
11976
+ throw new ValidationError({ message: 'folderId is required for restart' });
11977
+ }
11978
+ const [jobId] = await this.resolveJobKeys([jobKey], folderId);
11979
+ const headers = createHeaders({ [FOLDER_ID]: folderId });
11980
+ const response = await this.post(JOB_ENDPOINTS.RESTART, { jobId }, { headers });
11981
+ const rawJob = transformData(pascalToCamelCaseKeys(response.data), JobMap);
11982
+ return createJobWithMethods(rawJob, this);
11983
+ }
11605
11984
  /**
11606
11985
  * Downloads the output file content via the Attachments API.
11607
11986
  * 1. Fetches blob access info from the attachment using AttachmentService
@@ -11636,6 +12015,43 @@ class JobService extends FolderScopedService {
11636
12015
  throw new ServerError({ message: 'Failed to parse job output file as JSON' });
11637
12016
  }
11638
12017
  }
12018
+ /**
12019
+ * Resolves job UUID keys to integer IDs via the getAll method.
12020
+ * Chunks keys into batches to avoid URL length limits.
12021
+ */
12022
+ async resolveJobKeys(jobKeys, folderId) {
12023
+ const uniqueKeys = [...new Set(jobKeys)];
12024
+ const keyToIdMap = new Map();
12025
+ const chunks = [];
12026
+ for (let i = 0; i < uniqueKeys.length; i += JOB_KEY_RESOLUTION_CHUNK_SIZE) {
12027
+ chunks.push(uniqueKeys.slice(i, i + JOB_KEY_RESOLUTION_CHUNK_SIZE));
12028
+ }
12029
+ const results = await Promise.all(chunks.map((chunk) => {
12030
+ const filterValues = chunk.map((key) => `'${key}'`).join(',');
12031
+ return this.getAll({
12032
+ folderId,
12033
+ filter: `key in (${filterValues})`,
12034
+ select: 'id,key',
12035
+ pageSize: chunk.length,
12036
+ });
12037
+ }));
12038
+ for (const response of results) {
12039
+ for (const job of response.items) {
12040
+ keyToIdMap.set(job.key, job.id);
12041
+ }
12042
+ }
12043
+ const missingKeys = uniqueKeys.filter((key) => !keyToIdMap.has(key));
12044
+ if (missingKeys.length > 0) {
12045
+ throw new ValidationError({ message: `Jobs not found for keys: ${missingKeys.join(', ')}` });
12046
+ }
12047
+ return uniqueKeys.map((key) => keyToIdMap.get(key));
12048
+ }
12049
+ /**
12050
+ * Calls the StopJobs OData action with resolved integer IDs.
12051
+ */
12052
+ async stopJobsByIds(jobIds, strategy, headers) {
12053
+ await this.post(JOB_ENDPOINTS.STOP, { jobIds, strategy }, { headers });
12054
+ }
11639
12055
  }
11640
12056
  __decorate([
11641
12057
  track('Jobs.GetAll')
@@ -11646,6 +12062,15 @@ __decorate([
11646
12062
  __decorate([
11647
12063
  track('Jobs.GetOutput')
11648
12064
  ], JobService.prototype, "getOutput", null);
12065
+ __decorate([
12066
+ track('Jobs.Stop')
12067
+ ], JobService.prototype, "stop", null);
12068
+ __decorate([
12069
+ track('Jobs.Resume')
12070
+ ], JobService.prototype, "resume", null);
12071
+ __decorate([
12072
+ track('Jobs.Restart')
12073
+ ], JobService.prototype, "restart", null);
11649
12074
 
11650
12075
  /**
11651
12076
  * Enum for job sub-state
@@ -11856,182 +12281,6 @@ __decorate([
11856
12281
  track('Processes.GetById')
11857
12282
  ], ProcessService.prototype, "getById", null);
11858
12283
 
11859
- /**
11860
- * Enum for package types
11861
- */
11862
- exports.PackageType = void 0;
11863
- (function (PackageType) {
11864
- PackageType["Undefined"] = "Undefined";
11865
- PackageType["Process"] = "Process";
11866
- PackageType["ProcessOrchestration"] = "ProcessOrchestration";
11867
- PackageType["WebApp"] = "WebApp";
11868
- PackageType["Agent"] = "Agent";
11869
- PackageType["TestAutomationProcess"] = "TestAutomationProcess";
11870
- PackageType["Api"] = "Api";
11871
- PackageType["MCPServer"] = "MCPServer";
11872
- PackageType["BusinessRules"] = "BusinessRules";
11873
- PackageType["CaseManagement"] = "CaseManagement";
11874
- PackageType["Flow"] = "Flow";
11875
- PackageType["Function"] = "Function";
11876
- })(exports.PackageType || (exports.PackageType = {}));
11877
- /**
11878
- * Enum for job priority
11879
- */
11880
- exports.JobPriority = void 0;
11881
- (function (JobPriority) {
11882
- JobPriority["Low"] = "Low";
11883
- JobPriority["Normal"] = "Normal";
11884
- JobPriority["High"] = "High";
11885
- })(exports.JobPriority || (exports.JobPriority = {}));
11886
- /**
11887
- * Enum for target framework
11888
- */
11889
- exports.TargetFramework = void 0;
11890
- (function (TargetFramework) {
11891
- TargetFramework["Legacy"] = "Legacy";
11892
- TargetFramework["Windows"] = "Windows";
11893
- TargetFramework["Portable"] = "Portable";
11894
- })(exports.TargetFramework || (exports.TargetFramework = {}));
11895
- /**
11896
- * Enum for robot size
11897
- */
11898
- exports.RobotSize = void 0;
11899
- (function (RobotSize) {
11900
- RobotSize["Small"] = "Small";
11901
- RobotSize["Standard"] = "Standard";
11902
- RobotSize["Medium"] = "Medium";
11903
- RobotSize["Large"] = "Large";
11904
- })(exports.RobotSize || (exports.RobotSize = {}));
11905
- /**
11906
- * Enum for remote control access
11907
- */
11908
- exports.RemoteControlAccess = void 0;
11909
- (function (RemoteControlAccess) {
11910
- RemoteControlAccess["None"] = "None";
11911
- RemoteControlAccess["ReadOnly"] = "ReadOnly";
11912
- RemoteControlAccess["Full"] = "Full";
11913
- })(exports.RemoteControlAccess || (exports.RemoteControlAccess = {}));
11914
- /**
11915
- * Enum for process start strategy
11916
- */
11917
- exports.StartStrategy = void 0;
11918
- (function (StartStrategy) {
11919
- StartStrategy["All"] = "All";
11920
- StartStrategy["Specific"] = "Specific";
11921
- StartStrategy["RobotCount"] = "RobotCount";
11922
- StartStrategy["JobsCount"] = "JobsCount";
11923
- StartStrategy["ModernJobsCount"] = "ModernJobsCount";
11924
- })(exports.StartStrategy || (exports.StartStrategy = {}));
11925
- /**
11926
- * Enum for package source type
11927
- */
11928
- exports.PackageSourceType = void 0;
11929
- (function (PackageSourceType) {
11930
- PackageSourceType["Manual"] = "Manual";
11931
- PackageSourceType["Schedule"] = "Schedule";
11932
- PackageSourceType["Queue"] = "Queue";
11933
- PackageSourceType["StudioWeb"] = "StudioWeb";
11934
- PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11935
- PackageSourceType["StudioDesktop"] = "StudioDesktop";
11936
- PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11937
- PackageSourceType["Apps"] = "Apps";
11938
- PackageSourceType["SAP"] = "SAP";
11939
- PackageSourceType["HttpTrigger"] = "HttpTrigger";
11940
- PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
11941
- PackageSourceType["RobotAPI"] = "RobotAPI";
11942
- PackageSourceType["Assistant"] = "Assistant";
11943
- PackageSourceType["CommandLine"] = "CommandLine";
11944
- PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
11945
- PackageSourceType["Autopilot"] = "Autopilot";
11946
- PackageSourceType["TestManager"] = "TestManager";
11947
- PackageSourceType["AgentService"] = "AgentService";
11948
- PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11949
- PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
11950
- PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
11951
- PackageSourceType["AgentHub"] = "AgentHub";
11952
- PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
11953
- })(exports.PackageSourceType || (exports.PackageSourceType = {}));
11954
- /**
11955
- * Enum for job source type
11956
- */
11957
- exports.JobSourceType = void 0;
11958
- (function (JobSourceType) {
11959
- JobSourceType["Manual"] = "Manual";
11960
- JobSourceType["Schedule"] = "Schedule";
11961
- JobSourceType["Agent"] = "Agent";
11962
- JobSourceType["Queue"] = "Queue";
11963
- JobSourceType["StudioWeb"] = "StudioWeb";
11964
- JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11965
- JobSourceType["StudioDesktop"] = "StudioDesktop";
11966
- JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11967
- JobSourceType["Apps"] = "Apps";
11968
- JobSourceType["SAP"] = "SAP";
11969
- JobSourceType["HttpTrigger"] = "HttpTrigger";
11970
- JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
11971
- JobSourceType["RobotAPI"] = "RobotAPI";
11972
- JobSourceType["CommandLine"] = "CommandLine";
11973
- JobSourceType["RobotNetAPI"] = "RobotNetAPI";
11974
- JobSourceType["Autopilot"] = "Autopilot";
11975
- JobSourceType["TestManager"] = "TestManager";
11976
- JobSourceType["AgentService"] = "AgentService";
11977
- JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11978
- JobSourceType["PluginEcosystem"] = "PluginEcosystem";
11979
- JobSourceType["PerformanceTesting"] = "PerformanceTesting";
11980
- JobSourceType["AgentHub"] = "AgentHub";
11981
- JobSourceType["ApiWorkflow"] = "ApiWorkflow";
11982
- JobSourceType["CaseManagement"] = "CaseManagement";
11983
- })(exports.JobSourceType || (exports.JobSourceType = {}));
11984
- /**
11985
- * Enum for stop strategy
11986
- */
11987
- exports.StopStrategy = void 0;
11988
- (function (StopStrategy) {
11989
- StopStrategy["SoftStop"] = "SoftStop";
11990
- StopStrategy["Kill"] = "Kill";
11991
- })(exports.StopStrategy || (exports.StopStrategy = {}));
11992
- /**
11993
- * Enum for runtime type
11994
- */
11995
- exports.RuntimeType = void 0;
11996
- (function (RuntimeType) {
11997
- RuntimeType["NonProduction"] = "NonProduction";
11998
- RuntimeType["Attended"] = "Attended";
11999
- RuntimeType["Unattended"] = "Unattended";
12000
- RuntimeType["Development"] = "Development";
12001
- RuntimeType["Studio"] = "Studio";
12002
- RuntimeType["RpaDeveloper"] = "RpaDeveloper";
12003
- RuntimeType["StudioX"] = "StudioX";
12004
- RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
12005
- RuntimeType["Headless"] = "Headless";
12006
- RuntimeType["StudioPro"] = "StudioPro";
12007
- RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
12008
- RuntimeType["TestAutomation"] = "TestAutomation";
12009
- RuntimeType["AutomationCloud"] = "AutomationCloud";
12010
- RuntimeType["Serverless"] = "Serverless";
12011
- RuntimeType["AutomationKit"] = "AutomationKit";
12012
- RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
12013
- RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
12014
- RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
12015
- RuntimeType["Hosting"] = "Hosting";
12016
- RuntimeType["AssistantWeb"] = "AssistantWeb";
12017
- RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
12018
- RuntimeType["AgentService"] = "AgentService";
12019
- RuntimeType["AppTest"] = "AppTest";
12020
- RuntimeType["PerformanceTest"] = "PerformanceTest";
12021
- RuntimeType["BusinessRule"] = "BusinessRule";
12022
- RuntimeType["CaseManagement"] = "CaseManagement";
12023
- RuntimeType["Flow"] = "Flow";
12024
- })(exports.RuntimeType || (exports.RuntimeType = {}));
12025
- /**
12026
- * Enum for job type
12027
- */
12028
- exports.JobType = void 0;
12029
- (function (JobType) {
12030
- JobType["Unattended"] = "Unattended";
12031
- JobType["Attended"] = "Attended";
12032
- JobType["ServerlessGeneric"] = "ServerlessGeneric";
12033
- })(exports.JobType || (exports.JobType = {}));
12034
-
12035
12284
  /**
12036
12285
  * Maps fields for Queue entities to ensure consistent naming
12037
12286
  */
@@ -12517,6 +12766,19 @@ const UserSettingsMap = {
12517
12766
  ...CommonFieldMap
12518
12767
  };
12519
12768
 
12769
+ /**
12770
+ * Status of a feedback entry in the review workflow
12771
+ */
12772
+ exports.FeedbackStatus = void 0;
12773
+ (function (FeedbackStatus) {
12774
+ /** Feedback is awaiting review */
12775
+ FeedbackStatus[FeedbackStatus["Pending"] = 0] = "Pending";
12776
+ /** Feedback has been approved and confirmed */
12777
+ FeedbackStatus[FeedbackStatus["Approved"] = 1] = "Approved";
12778
+ /** Feedback has been dismissed */
12779
+ FeedbackStatus[FeedbackStatus["Dismissed"] = 2] = "Dismissed";
12780
+ })(exports.FeedbackStatus || (exports.FeedbackStatus = {}));
12781
+
12520
12782
  /**
12521
12783
  * Asset resolution utilities for UiPath Coded Apps
12522
12784
  *