@uipath/uipath-typescript 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4385,6 +4385,21 @@ function getErrorDetails(error) {
4385
4385
  };
4386
4386
  }
4387
4387
 
4388
+ var TaskUserType;
4389
+ (function (TaskUserType) {
4390
+ /** A user of this type is supposed to be used by a human. */
4391
+ TaskUserType["User"] = "User";
4392
+ /** 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. */
4393
+ TaskUserType["Robot"] = "Robot";
4394
+ /** A user of type Directory User */
4395
+ TaskUserType["DirectoryUser"] = "DirectoryUser";
4396
+ /** A user of type Directory Group */
4397
+ TaskUserType["DirectoryGroup"] = "DirectoryGroup";
4398
+ /** A user of type Directory Robot Account */
4399
+ TaskUserType["DirectoryRobot"] = "DirectoryRobot";
4400
+ /** A user of type Directory External Application */
4401
+ TaskUserType["DirectoryExternalApplication"] = "DirectoryExternalApplication";
4402
+ })(TaskUserType || (TaskUserType = {}));
4388
4403
  /**
4389
4404
  * Types of tasks available in Action Center.
4390
4405
  * Each type determines the task's behavior, UI rendering, and completion requirements.
@@ -4519,6 +4534,8 @@ const QUEUE_ENDPOINTS = {
4519
4534
  const JOB_ENDPOINTS = {
4520
4535
  GET_ALL: `${ORCHESTRATOR_BASE}/odata/Jobs`,
4521
4536
  GET_BY_KEY: (identifier) => `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.GetByKey(identifier=${identifier})`,
4537
+ STOP: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.StopJobs`,
4538
+ RESUME: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.ResumeJob`,
4522
4539
  };
4523
4540
  /**
4524
4541
  * Orchestrator Asset Service Endpoints
@@ -5431,7 +5448,7 @@ function normalizeBaseUrl(url) {
5431
5448
  // Connection string placeholder that will be replaced during build
5432
5449
  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";
5433
5450
  // SDK Version placeholder
5434
- const SDK_VERSION = "1.3.2";
5451
+ const SDK_VERSION = "1.3.3";
5435
5452
  const VERSION = "Version";
5436
5453
  const SERVICE = "Service";
5437
5454
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6360,7 +6377,11 @@ class ApiClient {
6360
6377
  const text = await response.text();
6361
6378
  return text;
6362
6379
  }
6363
- return response.json();
6380
+ const text = await response.text();
6381
+ if (!text) {
6382
+ return undefined;
6383
+ }
6384
+ return JSON.parse(text);
6364
6385
  }
6365
6386
  catch (error) {
6366
6387
  // If it's already one of our errors, re-throw it
@@ -7263,8 +7284,9 @@ class PaginationHelpers {
7263
7284
  });
7264
7285
  }
7265
7286
  // Extract and transform items from response
7266
- const rawItems = response.data?.[itemsField];
7267
- const totalCount = response.data?.[totalCountField];
7287
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7288
+ const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
7289
+ const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
7268
7290
  // Parse items - automatically handle JSON string responses
7269
7291
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
7270
7292
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -7460,7 +7482,7 @@ class BaseService {
7460
7482
  const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
7461
7483
  // Prepare request parameters based on pagination type
7462
7484
  const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
7463
- // For POST requests, merge pagination params into body; for GET, use query params
7485
+ // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
7464
7486
  if (method.toUpperCase() === 'POST') {
7465
7487
  const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
7466
7488
  options.body = {
@@ -7468,6 +7490,7 @@ class BaseService {
7468
7490
  ...options.params,
7469
7491
  ...requestParams
7470
7492
  };
7493
+ options.params = undefined;
7471
7494
  }
7472
7495
  else {
7473
7496
  // Merge pagination parameters with existing parameters
@@ -7508,7 +7531,6 @@ class BaseService {
7508
7531
  if (params.pageNumber && params.pageNumber > 1) {
7509
7532
  requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
7510
7533
  }
7511
- // Include total count for ODATA APIs
7512
7534
  {
7513
7535
  requestParams[countParam] = true;
7514
7536
  }
@@ -7536,8 +7558,9 @@ class BaseService {
7536
7558
  const totalCountField = fields.totalCountField || 'totalRecordCount';
7537
7559
  const continuationTokenField = fields.continuationTokenField || 'continuationToken';
7538
7560
  // Extract items and metadata
7539
- const items = response.data[itemsField] || [];
7540
- const totalCount = response.data[totalCountField];
7561
+ // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7562
+ const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
7563
+ const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
7541
7564
  const continuationToken = response.data[continuationTokenField];
7542
7565
  // Determine if there are more pages
7543
7566
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -9934,15 +9957,15 @@ class TaskService extends BaseService {
9934
9957
  return createTaskWithMethods(transformedData, this);
9935
9958
  }
9936
9959
  /**
9937
- * Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
9960
+ * Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
9938
9961
  *
9939
9962
  * The method returns either:
9940
- * - An array of users (when no pagination parameters are provided)
9963
+ * - An array of task users (when no pagination parameters are provided)
9941
9964
  * - A paginated result with navigation cursors (when any pagination parameter is provided)
9942
9965
  *
9943
- * @param folderId - The folder ID to get users from
9966
+ * @param folderId - The folder ID to get task users from
9944
9967
  * @param options - Optional query and pagination parameters
9945
- * @returns Promise resolving to an array of users or paginated result
9968
+ * @returns Promise resolving to an array of task users or paginated result
9946
9969
  *
9947
9970
  * @example
9948
9971
  * ```typescript
@@ -9953,7 +9976,7 @@ class TaskService extends BaseService {
9953
9976
  * // Standard array return
9954
9977
  * const users = await tasks.getUsers(123);
9955
9978
  *
9956
- * // Get users with filtering
9979
+ * // Get task users with filtering
9957
9980
  * const users = await tasks.getUsers(123, {
9958
9981
  * filter: "name eq 'abc'"
9959
9982
  * });
@@ -11359,6 +11382,20 @@ function createJobMethods(jobData, service) {
11359
11382
  throw new Error('Job folderId is undefined');
11360
11383
  return service.getOutput(jobData.key, jobData.folderId);
11361
11384
  },
11385
+ async stop(options) {
11386
+ if (!jobData.key)
11387
+ throw new Error('Job key is undefined');
11388
+ if (!jobData.folderId)
11389
+ throw new Error('Job folderId is undefined');
11390
+ return service.stop([jobData.key], jobData.folderId, options);
11391
+ },
11392
+ async resume(options) {
11393
+ if (!jobData.key)
11394
+ throw new Error('Job key is undefined');
11395
+ if (!jobData.folderId)
11396
+ throw new Error('Job folderId is undefined');
11397
+ return service.resume(jobData.key, jobData.folderId, options);
11398
+ },
11362
11399
  };
11363
11400
  }
11364
11401
  /**
@@ -11373,6 +11410,8 @@ function createJobWithMethods(jobData, service) {
11373
11410
  return Object.assign({}, jobData, methods);
11374
11411
  }
11375
11412
 
11413
+ /** Maximum number of job keys to resolve in a single OData filter query */
11414
+ const JOB_KEY_RESOLUTION_CHUNK_SIZE = 50;
11376
11415
  /**
11377
11416
  * Maps fields for Job entities to ensure consistent naming
11378
11417
  * Semantic renames only — case conversion handled by pascalToCamelCaseKeys()
@@ -11431,6 +11470,182 @@ __decorate([
11431
11470
  track('Attachments.GetById')
11432
11471
  ], AttachmentService.prototype, "getById", null);
11433
11472
 
11473
+ /**
11474
+ * Enum for package types
11475
+ */
11476
+ var PackageType;
11477
+ (function (PackageType) {
11478
+ PackageType["Undefined"] = "Undefined";
11479
+ PackageType["Process"] = "Process";
11480
+ PackageType["ProcessOrchestration"] = "ProcessOrchestration";
11481
+ PackageType["WebApp"] = "WebApp";
11482
+ PackageType["Agent"] = "Agent";
11483
+ PackageType["TestAutomationProcess"] = "TestAutomationProcess";
11484
+ PackageType["Api"] = "Api";
11485
+ PackageType["MCPServer"] = "MCPServer";
11486
+ PackageType["BusinessRules"] = "BusinessRules";
11487
+ PackageType["CaseManagement"] = "CaseManagement";
11488
+ PackageType["Flow"] = "Flow";
11489
+ PackageType["Function"] = "Function";
11490
+ })(PackageType || (PackageType = {}));
11491
+ /**
11492
+ * Enum for job priority
11493
+ */
11494
+ var JobPriority;
11495
+ (function (JobPriority) {
11496
+ JobPriority["Low"] = "Low";
11497
+ JobPriority["Normal"] = "Normal";
11498
+ JobPriority["High"] = "High";
11499
+ })(JobPriority || (JobPriority = {}));
11500
+ /**
11501
+ * Enum for target framework
11502
+ */
11503
+ var TargetFramework;
11504
+ (function (TargetFramework) {
11505
+ TargetFramework["Legacy"] = "Legacy";
11506
+ TargetFramework["Windows"] = "Windows";
11507
+ TargetFramework["Portable"] = "Portable";
11508
+ })(TargetFramework || (TargetFramework = {}));
11509
+ /**
11510
+ * Enum for robot size
11511
+ */
11512
+ var RobotSize;
11513
+ (function (RobotSize) {
11514
+ RobotSize["Small"] = "Small";
11515
+ RobotSize["Standard"] = "Standard";
11516
+ RobotSize["Medium"] = "Medium";
11517
+ RobotSize["Large"] = "Large";
11518
+ })(RobotSize || (RobotSize = {}));
11519
+ /**
11520
+ * Enum for remote control access
11521
+ */
11522
+ var RemoteControlAccess;
11523
+ (function (RemoteControlAccess) {
11524
+ RemoteControlAccess["None"] = "None";
11525
+ RemoteControlAccess["ReadOnly"] = "ReadOnly";
11526
+ RemoteControlAccess["Full"] = "Full";
11527
+ })(RemoteControlAccess || (RemoteControlAccess = {}));
11528
+ /**
11529
+ * Enum for process start strategy
11530
+ */
11531
+ var StartStrategy;
11532
+ (function (StartStrategy) {
11533
+ StartStrategy["All"] = "All";
11534
+ StartStrategy["Specific"] = "Specific";
11535
+ StartStrategy["RobotCount"] = "RobotCount";
11536
+ StartStrategy["JobsCount"] = "JobsCount";
11537
+ StartStrategy["ModernJobsCount"] = "ModernJobsCount";
11538
+ })(StartStrategy || (StartStrategy = {}));
11539
+ /**
11540
+ * Enum for package source type
11541
+ */
11542
+ var PackageSourceType;
11543
+ (function (PackageSourceType) {
11544
+ PackageSourceType["Manual"] = "Manual";
11545
+ PackageSourceType["Schedule"] = "Schedule";
11546
+ PackageSourceType["Queue"] = "Queue";
11547
+ PackageSourceType["StudioWeb"] = "StudioWeb";
11548
+ PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11549
+ PackageSourceType["StudioDesktop"] = "StudioDesktop";
11550
+ PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11551
+ PackageSourceType["Apps"] = "Apps";
11552
+ PackageSourceType["SAP"] = "SAP";
11553
+ PackageSourceType["HttpTrigger"] = "HttpTrigger";
11554
+ PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
11555
+ PackageSourceType["RobotAPI"] = "RobotAPI";
11556
+ PackageSourceType["Assistant"] = "Assistant";
11557
+ PackageSourceType["CommandLine"] = "CommandLine";
11558
+ PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
11559
+ PackageSourceType["Autopilot"] = "Autopilot";
11560
+ PackageSourceType["TestManager"] = "TestManager";
11561
+ PackageSourceType["AgentService"] = "AgentService";
11562
+ PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11563
+ PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
11564
+ PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
11565
+ PackageSourceType["AgentHub"] = "AgentHub";
11566
+ PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
11567
+ })(PackageSourceType || (PackageSourceType = {}));
11568
+ /**
11569
+ * Enum for job source type
11570
+ */
11571
+ var JobSourceType;
11572
+ (function (JobSourceType) {
11573
+ JobSourceType["Manual"] = "Manual";
11574
+ JobSourceType["Schedule"] = "Schedule";
11575
+ JobSourceType["Agent"] = "Agent";
11576
+ JobSourceType["Queue"] = "Queue";
11577
+ JobSourceType["StudioWeb"] = "StudioWeb";
11578
+ JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11579
+ JobSourceType["StudioDesktop"] = "StudioDesktop";
11580
+ JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11581
+ JobSourceType["Apps"] = "Apps";
11582
+ JobSourceType["SAP"] = "SAP";
11583
+ JobSourceType["HttpTrigger"] = "HttpTrigger";
11584
+ JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
11585
+ JobSourceType["RobotAPI"] = "RobotAPI";
11586
+ JobSourceType["CommandLine"] = "CommandLine";
11587
+ JobSourceType["RobotNetAPI"] = "RobotNetAPI";
11588
+ JobSourceType["Autopilot"] = "Autopilot";
11589
+ JobSourceType["TestManager"] = "TestManager";
11590
+ JobSourceType["AgentService"] = "AgentService";
11591
+ JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11592
+ JobSourceType["PluginEcosystem"] = "PluginEcosystem";
11593
+ JobSourceType["PerformanceTesting"] = "PerformanceTesting";
11594
+ JobSourceType["AgentHub"] = "AgentHub";
11595
+ JobSourceType["ApiWorkflow"] = "ApiWorkflow";
11596
+ JobSourceType["CaseManagement"] = "CaseManagement";
11597
+ })(JobSourceType || (JobSourceType = {}));
11598
+ /**
11599
+ * Enum for stop strategy
11600
+ */
11601
+ var StopStrategy;
11602
+ (function (StopStrategy) {
11603
+ StopStrategy["SoftStop"] = "SoftStop";
11604
+ StopStrategy["Kill"] = "Kill";
11605
+ })(StopStrategy || (StopStrategy = {}));
11606
+ /**
11607
+ * Enum for runtime type
11608
+ */
11609
+ var RuntimeType;
11610
+ (function (RuntimeType) {
11611
+ RuntimeType["NonProduction"] = "NonProduction";
11612
+ RuntimeType["Attended"] = "Attended";
11613
+ RuntimeType["Unattended"] = "Unattended";
11614
+ RuntimeType["Development"] = "Development";
11615
+ RuntimeType["Studio"] = "Studio";
11616
+ RuntimeType["RpaDeveloper"] = "RpaDeveloper";
11617
+ RuntimeType["StudioX"] = "StudioX";
11618
+ RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
11619
+ RuntimeType["Headless"] = "Headless";
11620
+ RuntimeType["StudioPro"] = "StudioPro";
11621
+ RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
11622
+ RuntimeType["TestAutomation"] = "TestAutomation";
11623
+ RuntimeType["AutomationCloud"] = "AutomationCloud";
11624
+ RuntimeType["Serverless"] = "Serverless";
11625
+ RuntimeType["AutomationKit"] = "AutomationKit";
11626
+ RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
11627
+ RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
11628
+ RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
11629
+ RuntimeType["Hosting"] = "Hosting";
11630
+ RuntimeType["AssistantWeb"] = "AssistantWeb";
11631
+ RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
11632
+ RuntimeType["AgentService"] = "AgentService";
11633
+ RuntimeType["AppTest"] = "AppTest";
11634
+ RuntimeType["PerformanceTest"] = "PerformanceTest";
11635
+ RuntimeType["BusinessRule"] = "BusinessRule";
11636
+ RuntimeType["CaseManagement"] = "CaseManagement";
11637
+ RuntimeType["Flow"] = "Flow";
11638
+ })(RuntimeType || (RuntimeType = {}));
11639
+ /**
11640
+ * Enum for job type
11641
+ */
11642
+ var JobType;
11643
+ (function (JobType) {
11644
+ JobType["Unattended"] = "Unattended";
11645
+ JobType["Attended"] = "Attended";
11646
+ JobType["ServerlessGeneric"] = "ServerlessGeneric";
11647
+ })(JobType || (JobType = {}));
11648
+
11434
11649
  /**
11435
11650
  * Service for interacting with UiPath Orchestrator Jobs API
11436
11651
  */
@@ -11600,6 +11815,86 @@ class JobService extends FolderScopedService {
11600
11815
  }
11601
11816
  return null;
11602
11817
  }
11818
+ /**
11819
+ * Stops one or more jobs by their UUID keys.
11820
+ *
11821
+ * Sends a stop request for the specified jobs to the Orchestrator. Throws if any keys cannot be resolved.
11822
+ *
11823
+ * @param jobKeys - Array of job UUID keys to stop (e.g., from {@link JobGetResponse}.key)
11824
+ * @param folderId - The folder ID where the jobs reside (required)
11825
+ * @param options - Optional {@link JobStopOptions} including stop strategy
11826
+ * @returns Promise that resolves when the jobs are stopped successfully, or rejects on failure
11827
+ *
11828
+ * @example
11829
+ * ```typescript
11830
+ * // Stop a single job with default soft stop
11831
+ * await jobs.stop([<jobKey>], <folderId>);
11832
+ * ```
11833
+ *
11834
+ * @example
11835
+ * ```typescript
11836
+ * import { StopStrategy } from '@uipath/uipath-typescript/jobs';
11837
+ *
11838
+ * // Force-kill multiple jobs
11839
+ * await jobs.stop(
11840
+ * [<jobKey1>, <jobKey2>],
11841
+ * <folderId>,
11842
+ * { strategy: StopStrategy.Kill }
11843
+ * );
11844
+ * ```
11845
+ */
11846
+ async stop(jobKeys, folderId, options) {
11847
+ if (jobKeys.length === 0) {
11848
+ return;
11849
+ }
11850
+ if (!folderId) {
11851
+ throw new ValidationError({ message: 'folderId is required for stop' });
11852
+ }
11853
+ const headers = createHeaders({ [FOLDER_ID]: folderId });
11854
+ const strategy = options?.strategy ?? StopStrategy.SoftStop;
11855
+ const jobIds = await this.resolveJobKeys(jobKeys, folderId);
11856
+ await this.stopJobsByIds(jobIds, strategy, headers);
11857
+ }
11858
+ /**
11859
+ * Resumes a suspended job.
11860
+ *
11861
+ * Sends a resume request to a job that is currently in the `Suspended` state.
11862
+ * The job transitions to `Resumed` and then to `Running` as it continues execution. Optionally pass
11863
+ * input arguments to provide data for the resumed workflow.
11864
+ *
11865
+ * @param jobKey - The unique key (GUID) of the suspended job to resume
11866
+ * @param folderId - The folder ID where the job resides
11867
+ * @param options - Optional parameters including input arguments
11868
+ * @returns Promise that resolves when the job is resumed successfully, or rejects on failure
11869
+ *
11870
+ * @example
11871
+ * ```typescript
11872
+ * // Resume a suspended job
11873
+ * await jobs.resume(<jobKey>, <folderId>);
11874
+ * ```
11875
+ *
11876
+ * @example
11877
+ * ```typescript
11878
+ * // Resume with input arguments
11879
+ * await jobs.resume(<jobKey>, <folderId>, {
11880
+ * inputArguments: { approved: true }
11881
+ * });
11882
+ * ```
11883
+ */
11884
+ async resume(jobKey, folderId, options) {
11885
+ if (!jobKey) {
11886
+ throw new ValidationError({ message: 'jobKey is required for resume' });
11887
+ }
11888
+ if (!folderId) {
11889
+ throw new ValidationError({ message: 'folderId is required for resume' });
11890
+ }
11891
+ const headers = createHeaders({ [FOLDER_ID]: folderId });
11892
+ const body = { jobKey };
11893
+ if (options?.inputArguments) {
11894
+ body.inputArguments = JSON.stringify(options.inputArguments);
11895
+ }
11896
+ await this.post(JOB_ENDPOINTS.RESUME, body, { headers });
11897
+ }
11603
11898
  /**
11604
11899
  * Downloads the output file content via the Attachments API.
11605
11900
  * 1. Fetches blob access info from the attachment using AttachmentService
@@ -11634,6 +11929,43 @@ class JobService extends FolderScopedService {
11634
11929
  throw new ServerError({ message: 'Failed to parse job output file as JSON' });
11635
11930
  }
11636
11931
  }
11932
+ /**
11933
+ * Resolves job UUID keys to integer IDs via the getAll method.
11934
+ * Chunks keys into batches to avoid URL length limits.
11935
+ */
11936
+ async resolveJobKeys(jobKeys, folderId) {
11937
+ const uniqueKeys = [...new Set(jobKeys)];
11938
+ const keyToIdMap = new Map();
11939
+ const chunks = [];
11940
+ for (let i = 0; i < uniqueKeys.length; i += JOB_KEY_RESOLUTION_CHUNK_SIZE) {
11941
+ chunks.push(uniqueKeys.slice(i, i + JOB_KEY_RESOLUTION_CHUNK_SIZE));
11942
+ }
11943
+ const results = await Promise.all(chunks.map((chunk) => {
11944
+ const filterValues = chunk.map((key) => `'${key}'`).join(',');
11945
+ return this.getAll({
11946
+ folderId,
11947
+ filter: `key in (${filterValues})`,
11948
+ select: 'id,key',
11949
+ pageSize: chunk.length,
11950
+ });
11951
+ }));
11952
+ for (const response of results) {
11953
+ for (const job of response.items) {
11954
+ keyToIdMap.set(job.key, job.id);
11955
+ }
11956
+ }
11957
+ const missingKeys = uniqueKeys.filter((key) => !keyToIdMap.has(key));
11958
+ if (missingKeys.length > 0) {
11959
+ throw new ValidationError({ message: `Jobs not found for keys: ${missingKeys.join(', ')}` });
11960
+ }
11961
+ return uniqueKeys.map((key) => keyToIdMap.get(key));
11962
+ }
11963
+ /**
11964
+ * Calls the StopJobs OData action with resolved integer IDs.
11965
+ */
11966
+ async stopJobsByIds(jobIds, strategy, headers) {
11967
+ await this.post(JOB_ENDPOINTS.STOP, { jobIds, strategy }, { headers });
11968
+ }
11637
11969
  }
11638
11970
  __decorate([
11639
11971
  track('Jobs.GetAll')
@@ -11644,6 +11976,12 @@ __decorate([
11644
11976
  __decorate([
11645
11977
  track('Jobs.GetOutput')
11646
11978
  ], JobService.prototype, "getOutput", null);
11979
+ __decorate([
11980
+ track('Jobs.Stop')
11981
+ ], JobService.prototype, "stop", null);
11982
+ __decorate([
11983
+ track('Jobs.Resume')
11984
+ ], JobService.prototype, "resume", null);
11647
11985
 
11648
11986
  /**
11649
11987
  * Enum for job sub-state
@@ -11854,182 +12192,6 @@ __decorate([
11854
12192
  track('Processes.GetById')
11855
12193
  ], ProcessService.prototype, "getById", null);
11856
12194
 
11857
- /**
11858
- * Enum for package types
11859
- */
11860
- var PackageType;
11861
- (function (PackageType) {
11862
- PackageType["Undefined"] = "Undefined";
11863
- PackageType["Process"] = "Process";
11864
- PackageType["ProcessOrchestration"] = "ProcessOrchestration";
11865
- PackageType["WebApp"] = "WebApp";
11866
- PackageType["Agent"] = "Agent";
11867
- PackageType["TestAutomationProcess"] = "TestAutomationProcess";
11868
- PackageType["Api"] = "Api";
11869
- PackageType["MCPServer"] = "MCPServer";
11870
- PackageType["BusinessRules"] = "BusinessRules";
11871
- PackageType["CaseManagement"] = "CaseManagement";
11872
- PackageType["Flow"] = "Flow";
11873
- PackageType["Function"] = "Function";
11874
- })(PackageType || (PackageType = {}));
11875
- /**
11876
- * Enum for job priority
11877
- */
11878
- var JobPriority;
11879
- (function (JobPriority) {
11880
- JobPriority["Low"] = "Low";
11881
- JobPriority["Normal"] = "Normal";
11882
- JobPriority["High"] = "High";
11883
- })(JobPriority || (JobPriority = {}));
11884
- /**
11885
- * Enum for target framework
11886
- */
11887
- var TargetFramework;
11888
- (function (TargetFramework) {
11889
- TargetFramework["Legacy"] = "Legacy";
11890
- TargetFramework["Windows"] = "Windows";
11891
- TargetFramework["Portable"] = "Portable";
11892
- })(TargetFramework || (TargetFramework = {}));
11893
- /**
11894
- * Enum for robot size
11895
- */
11896
- var RobotSize;
11897
- (function (RobotSize) {
11898
- RobotSize["Small"] = "Small";
11899
- RobotSize["Standard"] = "Standard";
11900
- RobotSize["Medium"] = "Medium";
11901
- RobotSize["Large"] = "Large";
11902
- })(RobotSize || (RobotSize = {}));
11903
- /**
11904
- * Enum for remote control access
11905
- */
11906
- var RemoteControlAccess;
11907
- (function (RemoteControlAccess) {
11908
- RemoteControlAccess["None"] = "None";
11909
- RemoteControlAccess["ReadOnly"] = "ReadOnly";
11910
- RemoteControlAccess["Full"] = "Full";
11911
- })(RemoteControlAccess || (RemoteControlAccess = {}));
11912
- /**
11913
- * Enum for process start strategy
11914
- */
11915
- var StartStrategy;
11916
- (function (StartStrategy) {
11917
- StartStrategy["All"] = "All";
11918
- StartStrategy["Specific"] = "Specific";
11919
- StartStrategy["RobotCount"] = "RobotCount";
11920
- StartStrategy["JobsCount"] = "JobsCount";
11921
- StartStrategy["ModernJobsCount"] = "ModernJobsCount";
11922
- })(StartStrategy || (StartStrategy = {}));
11923
- /**
11924
- * Enum for package source type
11925
- */
11926
- var PackageSourceType;
11927
- (function (PackageSourceType) {
11928
- PackageSourceType["Manual"] = "Manual";
11929
- PackageSourceType["Schedule"] = "Schedule";
11930
- PackageSourceType["Queue"] = "Queue";
11931
- PackageSourceType["StudioWeb"] = "StudioWeb";
11932
- PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11933
- PackageSourceType["StudioDesktop"] = "StudioDesktop";
11934
- PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11935
- PackageSourceType["Apps"] = "Apps";
11936
- PackageSourceType["SAP"] = "SAP";
11937
- PackageSourceType["HttpTrigger"] = "HttpTrigger";
11938
- PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
11939
- PackageSourceType["RobotAPI"] = "RobotAPI";
11940
- PackageSourceType["Assistant"] = "Assistant";
11941
- PackageSourceType["CommandLine"] = "CommandLine";
11942
- PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
11943
- PackageSourceType["Autopilot"] = "Autopilot";
11944
- PackageSourceType["TestManager"] = "TestManager";
11945
- PackageSourceType["AgentService"] = "AgentService";
11946
- PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11947
- PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
11948
- PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
11949
- PackageSourceType["AgentHub"] = "AgentHub";
11950
- PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
11951
- })(PackageSourceType || (PackageSourceType = {}));
11952
- /**
11953
- * Enum for job source type
11954
- */
11955
- var JobSourceType;
11956
- (function (JobSourceType) {
11957
- JobSourceType["Manual"] = "Manual";
11958
- JobSourceType["Schedule"] = "Schedule";
11959
- JobSourceType["Agent"] = "Agent";
11960
- JobSourceType["Queue"] = "Queue";
11961
- JobSourceType["StudioWeb"] = "StudioWeb";
11962
- JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
11963
- JobSourceType["StudioDesktop"] = "StudioDesktop";
11964
- JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
11965
- JobSourceType["Apps"] = "Apps";
11966
- JobSourceType["SAP"] = "SAP";
11967
- JobSourceType["HttpTrigger"] = "HttpTrigger";
11968
- JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
11969
- JobSourceType["RobotAPI"] = "RobotAPI";
11970
- JobSourceType["CommandLine"] = "CommandLine";
11971
- JobSourceType["RobotNetAPI"] = "RobotNetAPI";
11972
- JobSourceType["Autopilot"] = "Autopilot";
11973
- JobSourceType["TestManager"] = "TestManager";
11974
- JobSourceType["AgentService"] = "AgentService";
11975
- JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
11976
- JobSourceType["PluginEcosystem"] = "PluginEcosystem";
11977
- JobSourceType["PerformanceTesting"] = "PerformanceTesting";
11978
- JobSourceType["AgentHub"] = "AgentHub";
11979
- JobSourceType["ApiWorkflow"] = "ApiWorkflow";
11980
- JobSourceType["CaseManagement"] = "CaseManagement";
11981
- })(JobSourceType || (JobSourceType = {}));
11982
- /**
11983
- * Enum for stop strategy
11984
- */
11985
- var StopStrategy;
11986
- (function (StopStrategy) {
11987
- StopStrategy["SoftStop"] = "SoftStop";
11988
- StopStrategy["Kill"] = "Kill";
11989
- })(StopStrategy || (StopStrategy = {}));
11990
- /**
11991
- * Enum for runtime type
11992
- */
11993
- var RuntimeType;
11994
- (function (RuntimeType) {
11995
- RuntimeType["NonProduction"] = "NonProduction";
11996
- RuntimeType["Attended"] = "Attended";
11997
- RuntimeType["Unattended"] = "Unattended";
11998
- RuntimeType["Development"] = "Development";
11999
- RuntimeType["Studio"] = "Studio";
12000
- RuntimeType["RpaDeveloper"] = "RpaDeveloper";
12001
- RuntimeType["StudioX"] = "StudioX";
12002
- RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
12003
- RuntimeType["Headless"] = "Headless";
12004
- RuntimeType["StudioPro"] = "StudioPro";
12005
- RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
12006
- RuntimeType["TestAutomation"] = "TestAutomation";
12007
- RuntimeType["AutomationCloud"] = "AutomationCloud";
12008
- RuntimeType["Serverless"] = "Serverless";
12009
- RuntimeType["AutomationKit"] = "AutomationKit";
12010
- RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
12011
- RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
12012
- RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
12013
- RuntimeType["Hosting"] = "Hosting";
12014
- RuntimeType["AssistantWeb"] = "AssistantWeb";
12015
- RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
12016
- RuntimeType["AgentService"] = "AgentService";
12017
- RuntimeType["AppTest"] = "AppTest";
12018
- RuntimeType["PerformanceTest"] = "PerformanceTest";
12019
- RuntimeType["BusinessRule"] = "BusinessRule";
12020
- RuntimeType["CaseManagement"] = "CaseManagement";
12021
- RuntimeType["Flow"] = "Flow";
12022
- })(RuntimeType || (RuntimeType = {}));
12023
- /**
12024
- * Enum for job type
12025
- */
12026
- var JobType;
12027
- (function (JobType) {
12028
- JobType["Unattended"] = "Unattended";
12029
- JobType["Attended"] = "Attended";
12030
- JobType["ServerlessGeneric"] = "ServerlessGeneric";
12031
- })(JobType || (JobType = {}));
12032
-
12033
12195
  /**
12034
12196
  * Maps fields for Queue entities to ensure consistent naming
12035
12197
  */
@@ -12515,6 +12677,19 @@ const UserSettingsMap = {
12515
12677
  ...CommonFieldMap
12516
12678
  };
12517
12679
 
12680
+ /**
12681
+ * Status of a feedback entry in the review workflow
12682
+ */
12683
+ var FeedbackStatus;
12684
+ (function (FeedbackStatus) {
12685
+ /** Feedback is awaiting review */
12686
+ FeedbackStatus[FeedbackStatus["Pending"] = 0] = "Pending";
12687
+ /** Feedback has been approved and confirmed */
12688
+ FeedbackStatus[FeedbackStatus["Approved"] = 1] = "Approved";
12689
+ /** Feedback has been dismissed */
12690
+ FeedbackStatus[FeedbackStatus["Dismissed"] = 2] = "Dismissed";
12691
+ })(FeedbackStatus || (FeedbackStatus = {}));
12692
+
12518
12693
  /**
12519
12694
  * Asset resolution utilities for UiPath Coded Apps
12520
12695
  *
@@ -12590,4 +12765,4 @@ function getAppBase() {
12590
12765
  return getMetaTagContent(UiPathMetaTags.APP_BASE) || '/';
12591
12766
  }
12592
12767
 
12593
- export { APP_NAME, AgentMap, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, CitationErrorType, ConversationMap, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, ExchangeMap, FeedbackRating, FieldDisplayType, HttpStatus, InputStreamSpeechSensitivity, InterruptType, JobPriority, JobSourceType, JobState, JobSubState, JobType, JoinType, LogicalOperator, MAX_PAGE_SIZE, MessageMap, MessageRole, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, QueryFilterOperator, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, RuntimeType, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, ServerlessJobType, SortOrder, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN$1 as UNKNOWN, UiPath, UiPathError, UiPathMetaTags, UserSettingsMap, VERSION, ValidationError, createAgentWithMethods, createCaseInstanceWithMethods, createConversationWithMethods, createEntityWithMethods, createJobWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getAppBase, getAsset, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, loadFromMetaTags, telemetryClient, track, trackEvent };
12768
+ export { APP_NAME, AgentMap, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, CitationErrorType, ConversationMap, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, ExchangeMap, FeedbackRating, FeedbackStatus, FieldDisplayType, HttpStatus, InputStreamSpeechSensitivity, InterruptType, JobPriority, JobSourceType, JobState, JobSubState, JobType, JoinType, LogicalOperator, MAX_PAGE_SIZE, MessageMap, MessageRole, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, QueryFilterOperator, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, RuntimeType, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, ServerlessJobType, SortOrder, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskUserType, UNKNOWN$1 as UNKNOWN, UiPath, UiPathError, UiPathMetaTags, UserSettingsMap, VERSION, ValidationError, createAgentWithMethods, createCaseInstanceWithMethods, createConversationWithMethods, createEntityWithMethods, createJobWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getAppBase, getAsset, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, loadFromMetaTags, telemetryClient, track, trackEvent };