@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/assets/index.cjs +14 -8
- package/dist/assets/index.mjs +14 -8
- package/dist/attachments/index.cjs +14 -8
- package/dist/attachments/index.mjs +14 -8
- package/dist/buckets/index.cjs +14 -8
- package/dist/buckets/index.mjs +14 -8
- package/dist/cases/index.cjs +34 -13
- package/dist/cases/index.d.ts +15 -0
- package/dist/cases/index.mjs +34 -13
- package/dist/conversational-agent/index.cjs +32 -8
- package/dist/conversational-agent/index.d.ts +26 -0
- package/dist/conversational-agent/index.mjs +32 -8
- package/dist/core/index.cjs +16 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +16 -1
- package/dist/entities/index.cjs +14 -8
- package/dist/entities/index.mjs +14 -8
- package/dist/feedback/index.cjs +1904 -0
- package/dist/feedback/index.d.ts +475 -0
- package/dist/feedback/index.mjs +1902 -0
- package/dist/index.cjs +364 -189
- package/dist/index.d.ts +277 -12
- package/dist/index.mjs +365 -190
- package/dist/index.umd.js +364 -189
- package/dist/jobs/index.cjs +331 -8
- package/dist/jobs/index.d.ts +168 -2
- package/dist/jobs/index.mjs +332 -9
- package/dist/maestro-processes/index.cjs +14 -8
- package/dist/maestro-processes/index.mjs +14 -8
- package/dist/processes/index.cjs +14 -8
- package/dist/processes/index.mjs +14 -8
- package/dist/queues/index.cjs +14 -8
- package/dist/queues/index.mjs +14 -8
- package/dist/tasks/index.cjs +34 -13
- package/dist/tasks/index.d.ts +25 -10
- package/dist/tasks/index.mjs +35 -14
- package/package.json +12 -1
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,8 @@ 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`,
|
|
4524
4541
|
};
|
|
4525
4542
|
/**
|
|
4526
4543
|
* Orchestrator Asset Service Endpoints
|
|
@@ -5433,7 +5450,7 @@ function normalizeBaseUrl(url) {
|
|
|
5433
5450
|
// Connection string placeholder that will be replaced during build
|
|
5434
5451
|
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
5452
|
// SDK Version placeholder
|
|
5436
|
-
const SDK_VERSION = "1.3.
|
|
5453
|
+
const SDK_VERSION = "1.3.3";
|
|
5437
5454
|
const VERSION = "Version";
|
|
5438
5455
|
const SERVICE = "Service";
|
|
5439
5456
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -6362,7 +6379,11 @@ class ApiClient {
|
|
|
6362
6379
|
const text = await response.text();
|
|
6363
6380
|
return text;
|
|
6364
6381
|
}
|
|
6365
|
-
|
|
6382
|
+
const text = await response.text();
|
|
6383
|
+
if (!text) {
|
|
6384
|
+
return undefined;
|
|
6385
|
+
}
|
|
6386
|
+
return JSON.parse(text);
|
|
6366
6387
|
}
|
|
6367
6388
|
catch (error) {
|
|
6368
6389
|
// If it's already one of our errors, re-throw it
|
|
@@ -7265,8 +7286,9 @@ class PaginationHelpers {
|
|
|
7265
7286
|
});
|
|
7266
7287
|
}
|
|
7267
7288
|
// Extract and transform items from response
|
|
7268
|
-
|
|
7269
|
-
const
|
|
7289
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
7290
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
7291
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
7270
7292
|
// Parse items - automatically handle JSON string responses
|
|
7271
7293
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
7272
7294
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -7462,7 +7484,7 @@ class BaseService {
|
|
|
7462
7484
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
7463
7485
|
// Prepare request parameters based on pagination type
|
|
7464
7486
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
7465
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
7487
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
7466
7488
|
if (method.toUpperCase() === 'POST') {
|
|
7467
7489
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
7468
7490
|
options.body = {
|
|
@@ -7470,6 +7492,7 @@ class BaseService {
|
|
|
7470
7492
|
...options.params,
|
|
7471
7493
|
...requestParams
|
|
7472
7494
|
};
|
|
7495
|
+
options.params = undefined;
|
|
7473
7496
|
}
|
|
7474
7497
|
else {
|
|
7475
7498
|
// Merge pagination parameters with existing parameters
|
|
@@ -7510,7 +7533,6 @@ class BaseService {
|
|
|
7510
7533
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
7511
7534
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
7512
7535
|
}
|
|
7513
|
-
// Include total count for ODATA APIs
|
|
7514
7536
|
{
|
|
7515
7537
|
requestParams[countParam] = true;
|
|
7516
7538
|
}
|
|
@@ -7538,8 +7560,9 @@ class BaseService {
|
|
|
7538
7560
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
7539
7561
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
7540
7562
|
// Extract items and metadata
|
|
7541
|
-
|
|
7542
|
-
const
|
|
7563
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
7564
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
7565
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
7543
7566
|
const continuationToken = response.data[continuationTokenField];
|
|
7544
7567
|
// Determine if there are more pages
|
|
7545
7568
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -9936,15 +9959,15 @@ class TaskService extends BaseService {
|
|
|
9936
9959
|
return createTaskWithMethods(transformedData, this);
|
|
9937
9960
|
}
|
|
9938
9961
|
/**
|
|
9939
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
9962
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
9940
9963
|
*
|
|
9941
9964
|
* The method returns either:
|
|
9942
|
-
* - An array of users (when no pagination parameters are provided)
|
|
9965
|
+
* - An array of task users (when no pagination parameters are provided)
|
|
9943
9966
|
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
9944
9967
|
*
|
|
9945
|
-
* @param folderId - The folder ID to get users from
|
|
9968
|
+
* @param folderId - The folder ID to get task users from
|
|
9946
9969
|
* @param options - Optional query and pagination parameters
|
|
9947
|
-
* @returns Promise resolving to an array of users or paginated result
|
|
9970
|
+
* @returns Promise resolving to an array of task users or paginated result
|
|
9948
9971
|
*
|
|
9949
9972
|
* @example
|
|
9950
9973
|
* ```typescript
|
|
@@ -9955,7 +9978,7 @@ class TaskService extends BaseService {
|
|
|
9955
9978
|
* // Standard array return
|
|
9956
9979
|
* const users = await tasks.getUsers(123);
|
|
9957
9980
|
*
|
|
9958
|
-
* // Get users with filtering
|
|
9981
|
+
* // Get task users with filtering
|
|
9959
9982
|
* const users = await tasks.getUsers(123, {
|
|
9960
9983
|
* filter: "name eq 'abc'"
|
|
9961
9984
|
* });
|
|
@@ -11361,6 +11384,20 @@ function createJobMethods(jobData, service) {
|
|
|
11361
11384
|
throw new Error('Job folderId is undefined');
|
|
11362
11385
|
return service.getOutput(jobData.key, jobData.folderId);
|
|
11363
11386
|
},
|
|
11387
|
+
async stop(options) {
|
|
11388
|
+
if (!jobData.key)
|
|
11389
|
+
throw new Error('Job key is undefined');
|
|
11390
|
+
if (!jobData.folderId)
|
|
11391
|
+
throw new Error('Job folderId is undefined');
|
|
11392
|
+
return service.stop([jobData.key], jobData.folderId, options);
|
|
11393
|
+
},
|
|
11394
|
+
async resume(options) {
|
|
11395
|
+
if (!jobData.key)
|
|
11396
|
+
throw new Error('Job key is undefined');
|
|
11397
|
+
if (!jobData.folderId)
|
|
11398
|
+
throw new Error('Job folderId is undefined');
|
|
11399
|
+
return service.resume(jobData.key, jobData.folderId, options);
|
|
11400
|
+
},
|
|
11364
11401
|
};
|
|
11365
11402
|
}
|
|
11366
11403
|
/**
|
|
@@ -11375,6 +11412,8 @@ function createJobWithMethods(jobData, service) {
|
|
|
11375
11412
|
return Object.assign({}, jobData, methods);
|
|
11376
11413
|
}
|
|
11377
11414
|
|
|
11415
|
+
/** Maximum number of job keys to resolve in a single OData filter query */
|
|
11416
|
+
const JOB_KEY_RESOLUTION_CHUNK_SIZE = 50;
|
|
11378
11417
|
/**
|
|
11379
11418
|
* Maps fields for Job entities to ensure consistent naming
|
|
11380
11419
|
* Semantic renames only — case conversion handled by pascalToCamelCaseKeys()
|
|
@@ -11433,6 +11472,182 @@ __decorate([
|
|
|
11433
11472
|
track('Attachments.GetById')
|
|
11434
11473
|
], AttachmentService.prototype, "getById", null);
|
|
11435
11474
|
|
|
11475
|
+
/**
|
|
11476
|
+
* Enum for package types
|
|
11477
|
+
*/
|
|
11478
|
+
exports.PackageType = void 0;
|
|
11479
|
+
(function (PackageType) {
|
|
11480
|
+
PackageType["Undefined"] = "Undefined";
|
|
11481
|
+
PackageType["Process"] = "Process";
|
|
11482
|
+
PackageType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11483
|
+
PackageType["WebApp"] = "WebApp";
|
|
11484
|
+
PackageType["Agent"] = "Agent";
|
|
11485
|
+
PackageType["TestAutomationProcess"] = "TestAutomationProcess";
|
|
11486
|
+
PackageType["Api"] = "Api";
|
|
11487
|
+
PackageType["MCPServer"] = "MCPServer";
|
|
11488
|
+
PackageType["BusinessRules"] = "BusinessRules";
|
|
11489
|
+
PackageType["CaseManagement"] = "CaseManagement";
|
|
11490
|
+
PackageType["Flow"] = "Flow";
|
|
11491
|
+
PackageType["Function"] = "Function";
|
|
11492
|
+
})(exports.PackageType || (exports.PackageType = {}));
|
|
11493
|
+
/**
|
|
11494
|
+
* Enum for job priority
|
|
11495
|
+
*/
|
|
11496
|
+
exports.JobPriority = void 0;
|
|
11497
|
+
(function (JobPriority) {
|
|
11498
|
+
JobPriority["Low"] = "Low";
|
|
11499
|
+
JobPriority["Normal"] = "Normal";
|
|
11500
|
+
JobPriority["High"] = "High";
|
|
11501
|
+
})(exports.JobPriority || (exports.JobPriority = {}));
|
|
11502
|
+
/**
|
|
11503
|
+
* Enum for target framework
|
|
11504
|
+
*/
|
|
11505
|
+
exports.TargetFramework = void 0;
|
|
11506
|
+
(function (TargetFramework) {
|
|
11507
|
+
TargetFramework["Legacy"] = "Legacy";
|
|
11508
|
+
TargetFramework["Windows"] = "Windows";
|
|
11509
|
+
TargetFramework["Portable"] = "Portable";
|
|
11510
|
+
})(exports.TargetFramework || (exports.TargetFramework = {}));
|
|
11511
|
+
/**
|
|
11512
|
+
* Enum for robot size
|
|
11513
|
+
*/
|
|
11514
|
+
exports.RobotSize = void 0;
|
|
11515
|
+
(function (RobotSize) {
|
|
11516
|
+
RobotSize["Small"] = "Small";
|
|
11517
|
+
RobotSize["Standard"] = "Standard";
|
|
11518
|
+
RobotSize["Medium"] = "Medium";
|
|
11519
|
+
RobotSize["Large"] = "Large";
|
|
11520
|
+
})(exports.RobotSize || (exports.RobotSize = {}));
|
|
11521
|
+
/**
|
|
11522
|
+
* Enum for remote control access
|
|
11523
|
+
*/
|
|
11524
|
+
exports.RemoteControlAccess = void 0;
|
|
11525
|
+
(function (RemoteControlAccess) {
|
|
11526
|
+
RemoteControlAccess["None"] = "None";
|
|
11527
|
+
RemoteControlAccess["ReadOnly"] = "ReadOnly";
|
|
11528
|
+
RemoteControlAccess["Full"] = "Full";
|
|
11529
|
+
})(exports.RemoteControlAccess || (exports.RemoteControlAccess = {}));
|
|
11530
|
+
/**
|
|
11531
|
+
* Enum for process start strategy
|
|
11532
|
+
*/
|
|
11533
|
+
exports.StartStrategy = void 0;
|
|
11534
|
+
(function (StartStrategy) {
|
|
11535
|
+
StartStrategy["All"] = "All";
|
|
11536
|
+
StartStrategy["Specific"] = "Specific";
|
|
11537
|
+
StartStrategy["RobotCount"] = "RobotCount";
|
|
11538
|
+
StartStrategy["JobsCount"] = "JobsCount";
|
|
11539
|
+
StartStrategy["ModernJobsCount"] = "ModernJobsCount";
|
|
11540
|
+
})(exports.StartStrategy || (exports.StartStrategy = {}));
|
|
11541
|
+
/**
|
|
11542
|
+
* Enum for package source type
|
|
11543
|
+
*/
|
|
11544
|
+
exports.PackageSourceType = void 0;
|
|
11545
|
+
(function (PackageSourceType) {
|
|
11546
|
+
PackageSourceType["Manual"] = "Manual";
|
|
11547
|
+
PackageSourceType["Schedule"] = "Schedule";
|
|
11548
|
+
PackageSourceType["Queue"] = "Queue";
|
|
11549
|
+
PackageSourceType["StudioWeb"] = "StudioWeb";
|
|
11550
|
+
PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
11551
|
+
PackageSourceType["StudioDesktop"] = "StudioDesktop";
|
|
11552
|
+
PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
11553
|
+
PackageSourceType["Apps"] = "Apps";
|
|
11554
|
+
PackageSourceType["SAP"] = "SAP";
|
|
11555
|
+
PackageSourceType["HttpTrigger"] = "HttpTrigger";
|
|
11556
|
+
PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
|
|
11557
|
+
PackageSourceType["RobotAPI"] = "RobotAPI";
|
|
11558
|
+
PackageSourceType["Assistant"] = "Assistant";
|
|
11559
|
+
PackageSourceType["CommandLine"] = "CommandLine";
|
|
11560
|
+
PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
11561
|
+
PackageSourceType["Autopilot"] = "Autopilot";
|
|
11562
|
+
PackageSourceType["TestManager"] = "TestManager";
|
|
11563
|
+
PackageSourceType["AgentService"] = "AgentService";
|
|
11564
|
+
PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11565
|
+
PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
11566
|
+
PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
11567
|
+
PackageSourceType["AgentHub"] = "AgentHub";
|
|
11568
|
+
PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
11569
|
+
})(exports.PackageSourceType || (exports.PackageSourceType = {}));
|
|
11570
|
+
/**
|
|
11571
|
+
* Enum for job source type
|
|
11572
|
+
*/
|
|
11573
|
+
exports.JobSourceType = void 0;
|
|
11574
|
+
(function (JobSourceType) {
|
|
11575
|
+
JobSourceType["Manual"] = "Manual";
|
|
11576
|
+
JobSourceType["Schedule"] = "Schedule";
|
|
11577
|
+
JobSourceType["Agent"] = "Agent";
|
|
11578
|
+
JobSourceType["Queue"] = "Queue";
|
|
11579
|
+
JobSourceType["StudioWeb"] = "StudioWeb";
|
|
11580
|
+
JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
11581
|
+
JobSourceType["StudioDesktop"] = "StudioDesktop";
|
|
11582
|
+
JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
11583
|
+
JobSourceType["Apps"] = "Apps";
|
|
11584
|
+
JobSourceType["SAP"] = "SAP";
|
|
11585
|
+
JobSourceType["HttpTrigger"] = "HttpTrigger";
|
|
11586
|
+
JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
|
|
11587
|
+
JobSourceType["RobotAPI"] = "RobotAPI";
|
|
11588
|
+
JobSourceType["CommandLine"] = "CommandLine";
|
|
11589
|
+
JobSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
11590
|
+
JobSourceType["Autopilot"] = "Autopilot";
|
|
11591
|
+
JobSourceType["TestManager"] = "TestManager";
|
|
11592
|
+
JobSourceType["AgentService"] = "AgentService";
|
|
11593
|
+
JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11594
|
+
JobSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
11595
|
+
JobSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
11596
|
+
JobSourceType["AgentHub"] = "AgentHub";
|
|
11597
|
+
JobSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
11598
|
+
JobSourceType["CaseManagement"] = "CaseManagement";
|
|
11599
|
+
})(exports.JobSourceType || (exports.JobSourceType = {}));
|
|
11600
|
+
/**
|
|
11601
|
+
* Enum for stop strategy
|
|
11602
|
+
*/
|
|
11603
|
+
exports.StopStrategy = void 0;
|
|
11604
|
+
(function (StopStrategy) {
|
|
11605
|
+
StopStrategy["SoftStop"] = "SoftStop";
|
|
11606
|
+
StopStrategy["Kill"] = "Kill";
|
|
11607
|
+
})(exports.StopStrategy || (exports.StopStrategy = {}));
|
|
11608
|
+
/**
|
|
11609
|
+
* Enum for runtime type
|
|
11610
|
+
*/
|
|
11611
|
+
exports.RuntimeType = void 0;
|
|
11612
|
+
(function (RuntimeType) {
|
|
11613
|
+
RuntimeType["NonProduction"] = "NonProduction";
|
|
11614
|
+
RuntimeType["Attended"] = "Attended";
|
|
11615
|
+
RuntimeType["Unattended"] = "Unattended";
|
|
11616
|
+
RuntimeType["Development"] = "Development";
|
|
11617
|
+
RuntimeType["Studio"] = "Studio";
|
|
11618
|
+
RuntimeType["RpaDeveloper"] = "RpaDeveloper";
|
|
11619
|
+
RuntimeType["StudioX"] = "StudioX";
|
|
11620
|
+
RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
|
|
11621
|
+
RuntimeType["Headless"] = "Headless";
|
|
11622
|
+
RuntimeType["StudioPro"] = "StudioPro";
|
|
11623
|
+
RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
|
|
11624
|
+
RuntimeType["TestAutomation"] = "TestAutomation";
|
|
11625
|
+
RuntimeType["AutomationCloud"] = "AutomationCloud";
|
|
11626
|
+
RuntimeType["Serverless"] = "Serverless";
|
|
11627
|
+
RuntimeType["AutomationKit"] = "AutomationKit";
|
|
11628
|
+
RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
|
|
11629
|
+
RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
|
|
11630
|
+
RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
|
|
11631
|
+
RuntimeType["Hosting"] = "Hosting";
|
|
11632
|
+
RuntimeType["AssistantWeb"] = "AssistantWeb";
|
|
11633
|
+
RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11634
|
+
RuntimeType["AgentService"] = "AgentService";
|
|
11635
|
+
RuntimeType["AppTest"] = "AppTest";
|
|
11636
|
+
RuntimeType["PerformanceTest"] = "PerformanceTest";
|
|
11637
|
+
RuntimeType["BusinessRule"] = "BusinessRule";
|
|
11638
|
+
RuntimeType["CaseManagement"] = "CaseManagement";
|
|
11639
|
+
RuntimeType["Flow"] = "Flow";
|
|
11640
|
+
})(exports.RuntimeType || (exports.RuntimeType = {}));
|
|
11641
|
+
/**
|
|
11642
|
+
* Enum for job type
|
|
11643
|
+
*/
|
|
11644
|
+
exports.JobType = void 0;
|
|
11645
|
+
(function (JobType) {
|
|
11646
|
+
JobType["Unattended"] = "Unattended";
|
|
11647
|
+
JobType["Attended"] = "Attended";
|
|
11648
|
+
JobType["ServerlessGeneric"] = "ServerlessGeneric";
|
|
11649
|
+
})(exports.JobType || (exports.JobType = {}));
|
|
11650
|
+
|
|
11436
11651
|
/**
|
|
11437
11652
|
* Service for interacting with UiPath Orchestrator Jobs API
|
|
11438
11653
|
*/
|
|
@@ -11602,6 +11817,86 @@ class JobService extends FolderScopedService {
|
|
|
11602
11817
|
}
|
|
11603
11818
|
return null;
|
|
11604
11819
|
}
|
|
11820
|
+
/**
|
|
11821
|
+
* Stops one or more jobs by their UUID keys.
|
|
11822
|
+
*
|
|
11823
|
+
* Sends a stop request for the specified jobs to the Orchestrator. Throws if any keys cannot be resolved.
|
|
11824
|
+
*
|
|
11825
|
+
* @param jobKeys - Array of job UUID keys to stop (e.g., from {@link JobGetResponse}.key)
|
|
11826
|
+
* @param folderId - The folder ID where the jobs reside (required)
|
|
11827
|
+
* @param options - Optional {@link JobStopOptions} including stop strategy
|
|
11828
|
+
* @returns Promise that resolves when the jobs are stopped successfully, or rejects on failure
|
|
11829
|
+
*
|
|
11830
|
+
* @example
|
|
11831
|
+
* ```typescript
|
|
11832
|
+
* // Stop a single job with default soft stop
|
|
11833
|
+
* await jobs.stop([<jobKey>], <folderId>);
|
|
11834
|
+
* ```
|
|
11835
|
+
*
|
|
11836
|
+
* @example
|
|
11837
|
+
* ```typescript
|
|
11838
|
+
* import { StopStrategy } from '@uipath/uipath-typescript/jobs';
|
|
11839
|
+
*
|
|
11840
|
+
* // Force-kill multiple jobs
|
|
11841
|
+
* await jobs.stop(
|
|
11842
|
+
* [<jobKey1>, <jobKey2>],
|
|
11843
|
+
* <folderId>,
|
|
11844
|
+
* { strategy: StopStrategy.Kill }
|
|
11845
|
+
* );
|
|
11846
|
+
* ```
|
|
11847
|
+
*/
|
|
11848
|
+
async stop(jobKeys, folderId, options) {
|
|
11849
|
+
if (jobKeys.length === 0) {
|
|
11850
|
+
return;
|
|
11851
|
+
}
|
|
11852
|
+
if (!folderId) {
|
|
11853
|
+
throw new ValidationError({ message: 'folderId is required for stop' });
|
|
11854
|
+
}
|
|
11855
|
+
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
11856
|
+
const strategy = options?.strategy ?? exports.StopStrategy.SoftStop;
|
|
11857
|
+
const jobIds = await this.resolveJobKeys(jobKeys, folderId);
|
|
11858
|
+
await this.stopJobsByIds(jobIds, strategy, headers);
|
|
11859
|
+
}
|
|
11860
|
+
/**
|
|
11861
|
+
* Resumes a suspended job.
|
|
11862
|
+
*
|
|
11863
|
+
* Sends a resume request to a job that is currently in the `Suspended` state.
|
|
11864
|
+
* The job transitions to `Resumed` and then to `Running` as it continues execution. Optionally pass
|
|
11865
|
+
* input arguments to provide data for the resumed workflow.
|
|
11866
|
+
*
|
|
11867
|
+
* @param jobKey - The unique key (GUID) of the suspended job to resume
|
|
11868
|
+
* @param folderId - The folder ID where the job resides
|
|
11869
|
+
* @param options - Optional parameters including input arguments
|
|
11870
|
+
* @returns Promise that resolves when the job is resumed successfully, or rejects on failure
|
|
11871
|
+
*
|
|
11872
|
+
* @example
|
|
11873
|
+
* ```typescript
|
|
11874
|
+
* // Resume a suspended job
|
|
11875
|
+
* await jobs.resume(<jobKey>, <folderId>);
|
|
11876
|
+
* ```
|
|
11877
|
+
*
|
|
11878
|
+
* @example
|
|
11879
|
+
* ```typescript
|
|
11880
|
+
* // Resume with input arguments
|
|
11881
|
+
* await jobs.resume(<jobKey>, <folderId>, {
|
|
11882
|
+
* inputArguments: { approved: true }
|
|
11883
|
+
* });
|
|
11884
|
+
* ```
|
|
11885
|
+
*/
|
|
11886
|
+
async resume(jobKey, folderId, options) {
|
|
11887
|
+
if (!jobKey) {
|
|
11888
|
+
throw new ValidationError({ message: 'jobKey is required for resume' });
|
|
11889
|
+
}
|
|
11890
|
+
if (!folderId) {
|
|
11891
|
+
throw new ValidationError({ message: 'folderId is required for resume' });
|
|
11892
|
+
}
|
|
11893
|
+
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
11894
|
+
const body = { jobKey };
|
|
11895
|
+
if (options?.inputArguments) {
|
|
11896
|
+
body.inputArguments = JSON.stringify(options.inputArguments);
|
|
11897
|
+
}
|
|
11898
|
+
await this.post(JOB_ENDPOINTS.RESUME, body, { headers });
|
|
11899
|
+
}
|
|
11605
11900
|
/**
|
|
11606
11901
|
* Downloads the output file content via the Attachments API.
|
|
11607
11902
|
* 1. Fetches blob access info from the attachment using AttachmentService
|
|
@@ -11636,6 +11931,43 @@ class JobService extends FolderScopedService {
|
|
|
11636
11931
|
throw new ServerError({ message: 'Failed to parse job output file as JSON' });
|
|
11637
11932
|
}
|
|
11638
11933
|
}
|
|
11934
|
+
/**
|
|
11935
|
+
* Resolves job UUID keys to integer IDs via the getAll method.
|
|
11936
|
+
* Chunks keys into batches to avoid URL length limits.
|
|
11937
|
+
*/
|
|
11938
|
+
async resolveJobKeys(jobKeys, folderId) {
|
|
11939
|
+
const uniqueKeys = [...new Set(jobKeys)];
|
|
11940
|
+
const keyToIdMap = new Map();
|
|
11941
|
+
const chunks = [];
|
|
11942
|
+
for (let i = 0; i < uniqueKeys.length; i += JOB_KEY_RESOLUTION_CHUNK_SIZE) {
|
|
11943
|
+
chunks.push(uniqueKeys.slice(i, i + JOB_KEY_RESOLUTION_CHUNK_SIZE));
|
|
11944
|
+
}
|
|
11945
|
+
const results = await Promise.all(chunks.map((chunk) => {
|
|
11946
|
+
const filterValues = chunk.map((key) => `'${key}'`).join(',');
|
|
11947
|
+
return this.getAll({
|
|
11948
|
+
folderId,
|
|
11949
|
+
filter: `key in (${filterValues})`,
|
|
11950
|
+
select: 'id,key',
|
|
11951
|
+
pageSize: chunk.length,
|
|
11952
|
+
});
|
|
11953
|
+
}));
|
|
11954
|
+
for (const response of results) {
|
|
11955
|
+
for (const job of response.items) {
|
|
11956
|
+
keyToIdMap.set(job.key, job.id);
|
|
11957
|
+
}
|
|
11958
|
+
}
|
|
11959
|
+
const missingKeys = uniqueKeys.filter((key) => !keyToIdMap.has(key));
|
|
11960
|
+
if (missingKeys.length > 0) {
|
|
11961
|
+
throw new ValidationError({ message: `Jobs not found for keys: ${missingKeys.join(', ')}` });
|
|
11962
|
+
}
|
|
11963
|
+
return uniqueKeys.map((key) => keyToIdMap.get(key));
|
|
11964
|
+
}
|
|
11965
|
+
/**
|
|
11966
|
+
* Calls the StopJobs OData action with resolved integer IDs.
|
|
11967
|
+
*/
|
|
11968
|
+
async stopJobsByIds(jobIds, strategy, headers) {
|
|
11969
|
+
await this.post(JOB_ENDPOINTS.STOP, { jobIds, strategy }, { headers });
|
|
11970
|
+
}
|
|
11639
11971
|
}
|
|
11640
11972
|
__decorate([
|
|
11641
11973
|
track('Jobs.GetAll')
|
|
@@ -11646,6 +11978,12 @@ __decorate([
|
|
|
11646
11978
|
__decorate([
|
|
11647
11979
|
track('Jobs.GetOutput')
|
|
11648
11980
|
], JobService.prototype, "getOutput", null);
|
|
11981
|
+
__decorate([
|
|
11982
|
+
track('Jobs.Stop')
|
|
11983
|
+
], JobService.prototype, "stop", null);
|
|
11984
|
+
__decorate([
|
|
11985
|
+
track('Jobs.Resume')
|
|
11986
|
+
], JobService.prototype, "resume", null);
|
|
11649
11987
|
|
|
11650
11988
|
/**
|
|
11651
11989
|
* Enum for job sub-state
|
|
@@ -11856,182 +12194,6 @@ __decorate([
|
|
|
11856
12194
|
track('Processes.GetById')
|
|
11857
12195
|
], ProcessService.prototype, "getById", null);
|
|
11858
12196
|
|
|
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
12197
|
/**
|
|
12036
12198
|
* Maps fields for Queue entities to ensure consistent naming
|
|
12037
12199
|
*/
|
|
@@ -12517,6 +12679,19 @@ const UserSettingsMap = {
|
|
|
12517
12679
|
...CommonFieldMap
|
|
12518
12680
|
};
|
|
12519
12681
|
|
|
12682
|
+
/**
|
|
12683
|
+
* Status of a feedback entry in the review workflow
|
|
12684
|
+
*/
|
|
12685
|
+
exports.FeedbackStatus = void 0;
|
|
12686
|
+
(function (FeedbackStatus) {
|
|
12687
|
+
/** Feedback is awaiting review */
|
|
12688
|
+
FeedbackStatus[FeedbackStatus["Pending"] = 0] = "Pending";
|
|
12689
|
+
/** Feedback has been approved and confirmed */
|
|
12690
|
+
FeedbackStatus[FeedbackStatus["Approved"] = 1] = "Approved";
|
|
12691
|
+
/** Feedback has been dismissed */
|
|
12692
|
+
FeedbackStatus[FeedbackStatus["Dismissed"] = 2] = "Dismissed";
|
|
12693
|
+
})(exports.FeedbackStatus || (exports.FeedbackStatus = {}));
|
|
12694
|
+
|
|
12520
12695
|
/**
|
|
12521
12696
|
* Asset resolution utilities for UiPath Coded Apps
|
|
12522
12697
|
*
|