@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.umd.js
CHANGED
|
@@ -4389,6 +4389,21 @@
|
|
|
4389
4389
|
};
|
|
4390
4390
|
}
|
|
4391
4391
|
|
|
4392
|
+
exports.TaskUserType = void 0;
|
|
4393
|
+
(function (TaskUserType) {
|
|
4394
|
+
/** A user of this type is supposed to be used by a human. */
|
|
4395
|
+
TaskUserType["User"] = "User";
|
|
4396
|
+
/** 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. */
|
|
4397
|
+
TaskUserType["Robot"] = "Robot";
|
|
4398
|
+
/** A user of type Directory User */
|
|
4399
|
+
TaskUserType["DirectoryUser"] = "DirectoryUser";
|
|
4400
|
+
/** A user of type Directory Group */
|
|
4401
|
+
TaskUserType["DirectoryGroup"] = "DirectoryGroup";
|
|
4402
|
+
/** A user of type Directory Robot Account */
|
|
4403
|
+
TaskUserType["DirectoryRobot"] = "DirectoryRobot";
|
|
4404
|
+
/** A user of type Directory External Application */
|
|
4405
|
+
TaskUserType["DirectoryExternalApplication"] = "DirectoryExternalApplication";
|
|
4406
|
+
})(exports.TaskUserType || (exports.TaskUserType = {}));
|
|
4392
4407
|
/**
|
|
4393
4408
|
* Types of tasks available in Action Center.
|
|
4394
4409
|
* Each type determines the task's behavior, UI rendering, and completion requirements.
|
|
@@ -4523,6 +4538,8 @@
|
|
|
4523
4538
|
const JOB_ENDPOINTS = {
|
|
4524
4539
|
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Jobs`,
|
|
4525
4540
|
GET_BY_KEY: (identifier) => `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.GetByKey(identifier=${identifier})`,
|
|
4541
|
+
STOP: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.StopJobs`,
|
|
4542
|
+
RESUME: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.ResumeJob`,
|
|
4526
4543
|
};
|
|
4527
4544
|
/**
|
|
4528
4545
|
* Orchestrator Asset Service Endpoints
|
|
@@ -9190,7 +9207,7 @@
|
|
|
9190
9207
|
// Connection string placeholder that will be replaced during build
|
|
9191
9208
|
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";
|
|
9192
9209
|
// SDK Version placeholder
|
|
9193
|
-
const SDK_VERSION = "1.3.
|
|
9210
|
+
const SDK_VERSION = "1.3.3";
|
|
9194
9211
|
const VERSION = "Version";
|
|
9195
9212
|
const SERVICE = "Service";
|
|
9196
9213
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -10119,7 +10136,11 @@
|
|
|
10119
10136
|
const text = await response.text();
|
|
10120
10137
|
return text;
|
|
10121
10138
|
}
|
|
10122
|
-
|
|
10139
|
+
const text = await response.text();
|
|
10140
|
+
if (!text) {
|
|
10141
|
+
return undefined;
|
|
10142
|
+
}
|
|
10143
|
+
return JSON.parse(text);
|
|
10123
10144
|
}
|
|
10124
10145
|
catch (error) {
|
|
10125
10146
|
// If it's already one of our errors, re-throw it
|
|
@@ -11022,8 +11043,9 @@
|
|
|
11022
11043
|
});
|
|
11023
11044
|
}
|
|
11024
11045
|
// Extract and transform items from response
|
|
11025
|
-
|
|
11026
|
-
const
|
|
11046
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
11047
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
11048
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
11027
11049
|
// Parse items - automatically handle JSON string responses
|
|
11028
11050
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
11029
11051
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -11219,7 +11241,7 @@
|
|
|
11219
11241
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
11220
11242
|
// Prepare request parameters based on pagination type
|
|
11221
11243
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
11222
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
11244
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
11223
11245
|
if (method.toUpperCase() === 'POST') {
|
|
11224
11246
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
11225
11247
|
options.body = {
|
|
@@ -11227,6 +11249,7 @@
|
|
|
11227
11249
|
...options.params,
|
|
11228
11250
|
...requestParams
|
|
11229
11251
|
};
|
|
11252
|
+
options.params = undefined;
|
|
11230
11253
|
}
|
|
11231
11254
|
else {
|
|
11232
11255
|
// Merge pagination parameters with existing parameters
|
|
@@ -11267,7 +11290,6 @@
|
|
|
11267
11290
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
11268
11291
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
11269
11292
|
}
|
|
11270
|
-
// Include total count for ODATA APIs
|
|
11271
11293
|
{
|
|
11272
11294
|
requestParams[countParam] = true;
|
|
11273
11295
|
}
|
|
@@ -11295,8 +11317,9 @@
|
|
|
11295
11317
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
11296
11318
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
11297
11319
|
// Extract items and metadata
|
|
11298
|
-
|
|
11299
|
-
const
|
|
11320
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
11321
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
11322
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
11300
11323
|
const continuationToken = response.data[continuationTokenField];
|
|
11301
11324
|
// Determine if there are more pages
|
|
11302
11325
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -13693,15 +13716,15 @@
|
|
|
13693
13716
|
return createTaskWithMethods(transformedData, this);
|
|
13694
13717
|
}
|
|
13695
13718
|
/**
|
|
13696
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
13719
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
13697
13720
|
*
|
|
13698
13721
|
* The method returns either:
|
|
13699
|
-
* - An array of users (when no pagination parameters are provided)
|
|
13722
|
+
* - An array of task users (when no pagination parameters are provided)
|
|
13700
13723
|
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
13701
13724
|
*
|
|
13702
|
-
* @param folderId - The folder ID to get users from
|
|
13725
|
+
* @param folderId - The folder ID to get task users from
|
|
13703
13726
|
* @param options - Optional query and pagination parameters
|
|
13704
|
-
* @returns Promise resolving to an array of users or paginated result
|
|
13727
|
+
* @returns Promise resolving to an array of task users or paginated result
|
|
13705
13728
|
*
|
|
13706
13729
|
* @example
|
|
13707
13730
|
* ```typescript
|
|
@@ -13712,7 +13735,7 @@
|
|
|
13712
13735
|
* // Standard array return
|
|
13713
13736
|
* const users = await tasks.getUsers(123);
|
|
13714
13737
|
*
|
|
13715
|
-
* // Get users with filtering
|
|
13738
|
+
* // Get task users with filtering
|
|
13716
13739
|
* const users = await tasks.getUsers(123, {
|
|
13717
13740
|
* filter: "name eq 'abc'"
|
|
13718
13741
|
* });
|
|
@@ -15118,6 +15141,20 @@
|
|
|
15118
15141
|
throw new Error('Job folderId is undefined');
|
|
15119
15142
|
return service.getOutput(jobData.key, jobData.folderId);
|
|
15120
15143
|
},
|
|
15144
|
+
async stop(options) {
|
|
15145
|
+
if (!jobData.key)
|
|
15146
|
+
throw new Error('Job key is undefined');
|
|
15147
|
+
if (!jobData.folderId)
|
|
15148
|
+
throw new Error('Job folderId is undefined');
|
|
15149
|
+
return service.stop([jobData.key], jobData.folderId, options);
|
|
15150
|
+
},
|
|
15151
|
+
async resume(options) {
|
|
15152
|
+
if (!jobData.key)
|
|
15153
|
+
throw new Error('Job key is undefined');
|
|
15154
|
+
if (!jobData.folderId)
|
|
15155
|
+
throw new Error('Job folderId is undefined');
|
|
15156
|
+
return service.resume(jobData.key, jobData.folderId, options);
|
|
15157
|
+
},
|
|
15121
15158
|
};
|
|
15122
15159
|
}
|
|
15123
15160
|
/**
|
|
@@ -15132,6 +15169,8 @@
|
|
|
15132
15169
|
return Object.assign({}, jobData, methods);
|
|
15133
15170
|
}
|
|
15134
15171
|
|
|
15172
|
+
/** Maximum number of job keys to resolve in a single OData filter query */
|
|
15173
|
+
const JOB_KEY_RESOLUTION_CHUNK_SIZE = 50;
|
|
15135
15174
|
/**
|
|
15136
15175
|
* Maps fields for Job entities to ensure consistent naming
|
|
15137
15176
|
* Semantic renames only — case conversion handled by pascalToCamelCaseKeys()
|
|
@@ -15190,6 +15229,182 @@
|
|
|
15190
15229
|
track('Attachments.GetById')
|
|
15191
15230
|
], AttachmentService.prototype, "getById", null);
|
|
15192
15231
|
|
|
15232
|
+
/**
|
|
15233
|
+
* Enum for package types
|
|
15234
|
+
*/
|
|
15235
|
+
exports.PackageType = void 0;
|
|
15236
|
+
(function (PackageType) {
|
|
15237
|
+
PackageType["Undefined"] = "Undefined";
|
|
15238
|
+
PackageType["Process"] = "Process";
|
|
15239
|
+
PackageType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15240
|
+
PackageType["WebApp"] = "WebApp";
|
|
15241
|
+
PackageType["Agent"] = "Agent";
|
|
15242
|
+
PackageType["TestAutomationProcess"] = "TestAutomationProcess";
|
|
15243
|
+
PackageType["Api"] = "Api";
|
|
15244
|
+
PackageType["MCPServer"] = "MCPServer";
|
|
15245
|
+
PackageType["BusinessRules"] = "BusinessRules";
|
|
15246
|
+
PackageType["CaseManagement"] = "CaseManagement";
|
|
15247
|
+
PackageType["Flow"] = "Flow";
|
|
15248
|
+
PackageType["Function"] = "Function";
|
|
15249
|
+
})(exports.PackageType || (exports.PackageType = {}));
|
|
15250
|
+
/**
|
|
15251
|
+
* Enum for job priority
|
|
15252
|
+
*/
|
|
15253
|
+
exports.JobPriority = void 0;
|
|
15254
|
+
(function (JobPriority) {
|
|
15255
|
+
JobPriority["Low"] = "Low";
|
|
15256
|
+
JobPriority["Normal"] = "Normal";
|
|
15257
|
+
JobPriority["High"] = "High";
|
|
15258
|
+
})(exports.JobPriority || (exports.JobPriority = {}));
|
|
15259
|
+
/**
|
|
15260
|
+
* Enum for target framework
|
|
15261
|
+
*/
|
|
15262
|
+
exports.TargetFramework = void 0;
|
|
15263
|
+
(function (TargetFramework) {
|
|
15264
|
+
TargetFramework["Legacy"] = "Legacy";
|
|
15265
|
+
TargetFramework["Windows"] = "Windows";
|
|
15266
|
+
TargetFramework["Portable"] = "Portable";
|
|
15267
|
+
})(exports.TargetFramework || (exports.TargetFramework = {}));
|
|
15268
|
+
/**
|
|
15269
|
+
* Enum for robot size
|
|
15270
|
+
*/
|
|
15271
|
+
exports.RobotSize = void 0;
|
|
15272
|
+
(function (RobotSize) {
|
|
15273
|
+
RobotSize["Small"] = "Small";
|
|
15274
|
+
RobotSize["Standard"] = "Standard";
|
|
15275
|
+
RobotSize["Medium"] = "Medium";
|
|
15276
|
+
RobotSize["Large"] = "Large";
|
|
15277
|
+
})(exports.RobotSize || (exports.RobotSize = {}));
|
|
15278
|
+
/**
|
|
15279
|
+
* Enum for remote control access
|
|
15280
|
+
*/
|
|
15281
|
+
exports.RemoteControlAccess = void 0;
|
|
15282
|
+
(function (RemoteControlAccess) {
|
|
15283
|
+
RemoteControlAccess["None"] = "None";
|
|
15284
|
+
RemoteControlAccess["ReadOnly"] = "ReadOnly";
|
|
15285
|
+
RemoteControlAccess["Full"] = "Full";
|
|
15286
|
+
})(exports.RemoteControlAccess || (exports.RemoteControlAccess = {}));
|
|
15287
|
+
/**
|
|
15288
|
+
* Enum for process start strategy
|
|
15289
|
+
*/
|
|
15290
|
+
exports.StartStrategy = void 0;
|
|
15291
|
+
(function (StartStrategy) {
|
|
15292
|
+
StartStrategy["All"] = "All";
|
|
15293
|
+
StartStrategy["Specific"] = "Specific";
|
|
15294
|
+
StartStrategy["RobotCount"] = "RobotCount";
|
|
15295
|
+
StartStrategy["JobsCount"] = "JobsCount";
|
|
15296
|
+
StartStrategy["ModernJobsCount"] = "ModernJobsCount";
|
|
15297
|
+
})(exports.StartStrategy || (exports.StartStrategy = {}));
|
|
15298
|
+
/**
|
|
15299
|
+
* Enum for package source type
|
|
15300
|
+
*/
|
|
15301
|
+
exports.PackageSourceType = void 0;
|
|
15302
|
+
(function (PackageSourceType) {
|
|
15303
|
+
PackageSourceType["Manual"] = "Manual";
|
|
15304
|
+
PackageSourceType["Schedule"] = "Schedule";
|
|
15305
|
+
PackageSourceType["Queue"] = "Queue";
|
|
15306
|
+
PackageSourceType["StudioWeb"] = "StudioWeb";
|
|
15307
|
+
PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
15308
|
+
PackageSourceType["StudioDesktop"] = "StudioDesktop";
|
|
15309
|
+
PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
15310
|
+
PackageSourceType["Apps"] = "Apps";
|
|
15311
|
+
PackageSourceType["SAP"] = "SAP";
|
|
15312
|
+
PackageSourceType["HttpTrigger"] = "HttpTrigger";
|
|
15313
|
+
PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
|
|
15314
|
+
PackageSourceType["RobotAPI"] = "RobotAPI";
|
|
15315
|
+
PackageSourceType["Assistant"] = "Assistant";
|
|
15316
|
+
PackageSourceType["CommandLine"] = "CommandLine";
|
|
15317
|
+
PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
15318
|
+
PackageSourceType["Autopilot"] = "Autopilot";
|
|
15319
|
+
PackageSourceType["TestManager"] = "TestManager";
|
|
15320
|
+
PackageSourceType["AgentService"] = "AgentService";
|
|
15321
|
+
PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15322
|
+
PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
15323
|
+
PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
15324
|
+
PackageSourceType["AgentHub"] = "AgentHub";
|
|
15325
|
+
PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
15326
|
+
})(exports.PackageSourceType || (exports.PackageSourceType = {}));
|
|
15327
|
+
/**
|
|
15328
|
+
* Enum for job source type
|
|
15329
|
+
*/
|
|
15330
|
+
exports.JobSourceType = void 0;
|
|
15331
|
+
(function (JobSourceType) {
|
|
15332
|
+
JobSourceType["Manual"] = "Manual";
|
|
15333
|
+
JobSourceType["Schedule"] = "Schedule";
|
|
15334
|
+
JobSourceType["Agent"] = "Agent";
|
|
15335
|
+
JobSourceType["Queue"] = "Queue";
|
|
15336
|
+
JobSourceType["StudioWeb"] = "StudioWeb";
|
|
15337
|
+
JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
15338
|
+
JobSourceType["StudioDesktop"] = "StudioDesktop";
|
|
15339
|
+
JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
15340
|
+
JobSourceType["Apps"] = "Apps";
|
|
15341
|
+
JobSourceType["SAP"] = "SAP";
|
|
15342
|
+
JobSourceType["HttpTrigger"] = "HttpTrigger";
|
|
15343
|
+
JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
|
|
15344
|
+
JobSourceType["RobotAPI"] = "RobotAPI";
|
|
15345
|
+
JobSourceType["CommandLine"] = "CommandLine";
|
|
15346
|
+
JobSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
15347
|
+
JobSourceType["Autopilot"] = "Autopilot";
|
|
15348
|
+
JobSourceType["TestManager"] = "TestManager";
|
|
15349
|
+
JobSourceType["AgentService"] = "AgentService";
|
|
15350
|
+
JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15351
|
+
JobSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
15352
|
+
JobSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
15353
|
+
JobSourceType["AgentHub"] = "AgentHub";
|
|
15354
|
+
JobSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
15355
|
+
JobSourceType["CaseManagement"] = "CaseManagement";
|
|
15356
|
+
})(exports.JobSourceType || (exports.JobSourceType = {}));
|
|
15357
|
+
/**
|
|
15358
|
+
* Enum for stop strategy
|
|
15359
|
+
*/
|
|
15360
|
+
exports.StopStrategy = void 0;
|
|
15361
|
+
(function (StopStrategy) {
|
|
15362
|
+
StopStrategy["SoftStop"] = "SoftStop";
|
|
15363
|
+
StopStrategy["Kill"] = "Kill";
|
|
15364
|
+
})(exports.StopStrategy || (exports.StopStrategy = {}));
|
|
15365
|
+
/**
|
|
15366
|
+
* Enum for runtime type
|
|
15367
|
+
*/
|
|
15368
|
+
exports.RuntimeType = void 0;
|
|
15369
|
+
(function (RuntimeType) {
|
|
15370
|
+
RuntimeType["NonProduction"] = "NonProduction";
|
|
15371
|
+
RuntimeType["Attended"] = "Attended";
|
|
15372
|
+
RuntimeType["Unattended"] = "Unattended";
|
|
15373
|
+
RuntimeType["Development"] = "Development";
|
|
15374
|
+
RuntimeType["Studio"] = "Studio";
|
|
15375
|
+
RuntimeType["RpaDeveloper"] = "RpaDeveloper";
|
|
15376
|
+
RuntimeType["StudioX"] = "StudioX";
|
|
15377
|
+
RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
|
|
15378
|
+
RuntimeType["Headless"] = "Headless";
|
|
15379
|
+
RuntimeType["StudioPro"] = "StudioPro";
|
|
15380
|
+
RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
|
|
15381
|
+
RuntimeType["TestAutomation"] = "TestAutomation";
|
|
15382
|
+
RuntimeType["AutomationCloud"] = "AutomationCloud";
|
|
15383
|
+
RuntimeType["Serverless"] = "Serverless";
|
|
15384
|
+
RuntimeType["AutomationKit"] = "AutomationKit";
|
|
15385
|
+
RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
|
|
15386
|
+
RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
|
|
15387
|
+
RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
|
|
15388
|
+
RuntimeType["Hosting"] = "Hosting";
|
|
15389
|
+
RuntimeType["AssistantWeb"] = "AssistantWeb";
|
|
15390
|
+
RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15391
|
+
RuntimeType["AgentService"] = "AgentService";
|
|
15392
|
+
RuntimeType["AppTest"] = "AppTest";
|
|
15393
|
+
RuntimeType["PerformanceTest"] = "PerformanceTest";
|
|
15394
|
+
RuntimeType["BusinessRule"] = "BusinessRule";
|
|
15395
|
+
RuntimeType["CaseManagement"] = "CaseManagement";
|
|
15396
|
+
RuntimeType["Flow"] = "Flow";
|
|
15397
|
+
})(exports.RuntimeType || (exports.RuntimeType = {}));
|
|
15398
|
+
/**
|
|
15399
|
+
* Enum for job type
|
|
15400
|
+
*/
|
|
15401
|
+
exports.JobType = void 0;
|
|
15402
|
+
(function (JobType) {
|
|
15403
|
+
JobType["Unattended"] = "Unattended";
|
|
15404
|
+
JobType["Attended"] = "Attended";
|
|
15405
|
+
JobType["ServerlessGeneric"] = "ServerlessGeneric";
|
|
15406
|
+
})(exports.JobType || (exports.JobType = {}));
|
|
15407
|
+
|
|
15193
15408
|
/**
|
|
15194
15409
|
* Service for interacting with UiPath Orchestrator Jobs API
|
|
15195
15410
|
*/
|
|
@@ -15359,6 +15574,86 @@
|
|
|
15359
15574
|
}
|
|
15360
15575
|
return null;
|
|
15361
15576
|
}
|
|
15577
|
+
/**
|
|
15578
|
+
* Stops one or more jobs by their UUID keys.
|
|
15579
|
+
*
|
|
15580
|
+
* Sends a stop request for the specified jobs to the Orchestrator. Throws if any keys cannot be resolved.
|
|
15581
|
+
*
|
|
15582
|
+
* @param jobKeys - Array of job UUID keys to stop (e.g., from {@link JobGetResponse}.key)
|
|
15583
|
+
* @param folderId - The folder ID where the jobs reside (required)
|
|
15584
|
+
* @param options - Optional {@link JobStopOptions} including stop strategy
|
|
15585
|
+
* @returns Promise that resolves when the jobs are stopped successfully, or rejects on failure
|
|
15586
|
+
*
|
|
15587
|
+
* @example
|
|
15588
|
+
* ```typescript
|
|
15589
|
+
* // Stop a single job with default soft stop
|
|
15590
|
+
* await jobs.stop([<jobKey>], <folderId>);
|
|
15591
|
+
* ```
|
|
15592
|
+
*
|
|
15593
|
+
* @example
|
|
15594
|
+
* ```typescript
|
|
15595
|
+
* import { StopStrategy } from '@uipath/uipath-typescript/jobs';
|
|
15596
|
+
*
|
|
15597
|
+
* // Force-kill multiple jobs
|
|
15598
|
+
* await jobs.stop(
|
|
15599
|
+
* [<jobKey1>, <jobKey2>],
|
|
15600
|
+
* <folderId>,
|
|
15601
|
+
* { strategy: StopStrategy.Kill }
|
|
15602
|
+
* );
|
|
15603
|
+
* ```
|
|
15604
|
+
*/
|
|
15605
|
+
async stop(jobKeys, folderId, options) {
|
|
15606
|
+
if (jobKeys.length === 0) {
|
|
15607
|
+
return;
|
|
15608
|
+
}
|
|
15609
|
+
if (!folderId) {
|
|
15610
|
+
throw new ValidationError({ message: 'folderId is required for stop' });
|
|
15611
|
+
}
|
|
15612
|
+
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
15613
|
+
const strategy = options?.strategy ?? exports.StopStrategy.SoftStop;
|
|
15614
|
+
const jobIds = await this.resolveJobKeys(jobKeys, folderId);
|
|
15615
|
+
await this.stopJobsByIds(jobIds, strategy, headers);
|
|
15616
|
+
}
|
|
15617
|
+
/**
|
|
15618
|
+
* Resumes a suspended job.
|
|
15619
|
+
*
|
|
15620
|
+
* Sends a resume request to a job that is currently in the `Suspended` state.
|
|
15621
|
+
* The job transitions to `Resumed` and then to `Running` as it continues execution. Optionally pass
|
|
15622
|
+
* input arguments to provide data for the resumed workflow.
|
|
15623
|
+
*
|
|
15624
|
+
* @param jobKey - The unique key (GUID) of the suspended job to resume
|
|
15625
|
+
* @param folderId - The folder ID where the job resides
|
|
15626
|
+
* @param options - Optional parameters including input arguments
|
|
15627
|
+
* @returns Promise that resolves when the job is resumed successfully, or rejects on failure
|
|
15628
|
+
*
|
|
15629
|
+
* @example
|
|
15630
|
+
* ```typescript
|
|
15631
|
+
* // Resume a suspended job
|
|
15632
|
+
* await jobs.resume(<jobKey>, <folderId>);
|
|
15633
|
+
* ```
|
|
15634
|
+
*
|
|
15635
|
+
* @example
|
|
15636
|
+
* ```typescript
|
|
15637
|
+
* // Resume with input arguments
|
|
15638
|
+
* await jobs.resume(<jobKey>, <folderId>, {
|
|
15639
|
+
* inputArguments: { approved: true }
|
|
15640
|
+
* });
|
|
15641
|
+
* ```
|
|
15642
|
+
*/
|
|
15643
|
+
async resume(jobKey, folderId, options) {
|
|
15644
|
+
if (!jobKey) {
|
|
15645
|
+
throw new ValidationError({ message: 'jobKey is required for resume' });
|
|
15646
|
+
}
|
|
15647
|
+
if (!folderId) {
|
|
15648
|
+
throw new ValidationError({ message: 'folderId is required for resume' });
|
|
15649
|
+
}
|
|
15650
|
+
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
15651
|
+
const body = { jobKey };
|
|
15652
|
+
if (options?.inputArguments) {
|
|
15653
|
+
body.inputArguments = JSON.stringify(options.inputArguments);
|
|
15654
|
+
}
|
|
15655
|
+
await this.post(JOB_ENDPOINTS.RESUME, body, { headers });
|
|
15656
|
+
}
|
|
15362
15657
|
/**
|
|
15363
15658
|
* Downloads the output file content via the Attachments API.
|
|
15364
15659
|
* 1. Fetches blob access info from the attachment using AttachmentService
|
|
@@ -15393,6 +15688,43 @@
|
|
|
15393
15688
|
throw new ServerError({ message: 'Failed to parse job output file as JSON' });
|
|
15394
15689
|
}
|
|
15395
15690
|
}
|
|
15691
|
+
/**
|
|
15692
|
+
* Resolves job UUID keys to integer IDs via the getAll method.
|
|
15693
|
+
* Chunks keys into batches to avoid URL length limits.
|
|
15694
|
+
*/
|
|
15695
|
+
async resolveJobKeys(jobKeys, folderId) {
|
|
15696
|
+
const uniqueKeys = [...new Set(jobKeys)];
|
|
15697
|
+
const keyToIdMap = new Map();
|
|
15698
|
+
const chunks = [];
|
|
15699
|
+
for (let i = 0; i < uniqueKeys.length; i += JOB_KEY_RESOLUTION_CHUNK_SIZE) {
|
|
15700
|
+
chunks.push(uniqueKeys.slice(i, i + JOB_KEY_RESOLUTION_CHUNK_SIZE));
|
|
15701
|
+
}
|
|
15702
|
+
const results = await Promise.all(chunks.map((chunk) => {
|
|
15703
|
+
const filterValues = chunk.map((key) => `'${key}'`).join(',');
|
|
15704
|
+
return this.getAll({
|
|
15705
|
+
folderId,
|
|
15706
|
+
filter: `key in (${filterValues})`,
|
|
15707
|
+
select: 'id,key',
|
|
15708
|
+
pageSize: chunk.length,
|
|
15709
|
+
});
|
|
15710
|
+
}));
|
|
15711
|
+
for (const response of results) {
|
|
15712
|
+
for (const job of response.items) {
|
|
15713
|
+
keyToIdMap.set(job.key, job.id);
|
|
15714
|
+
}
|
|
15715
|
+
}
|
|
15716
|
+
const missingKeys = uniqueKeys.filter((key) => !keyToIdMap.has(key));
|
|
15717
|
+
if (missingKeys.length > 0) {
|
|
15718
|
+
throw new ValidationError({ message: `Jobs not found for keys: ${missingKeys.join(', ')}` });
|
|
15719
|
+
}
|
|
15720
|
+
return uniqueKeys.map((key) => keyToIdMap.get(key));
|
|
15721
|
+
}
|
|
15722
|
+
/**
|
|
15723
|
+
* Calls the StopJobs OData action with resolved integer IDs.
|
|
15724
|
+
*/
|
|
15725
|
+
async stopJobsByIds(jobIds, strategy, headers) {
|
|
15726
|
+
await this.post(JOB_ENDPOINTS.STOP, { jobIds, strategy }, { headers });
|
|
15727
|
+
}
|
|
15396
15728
|
}
|
|
15397
15729
|
__decorate([
|
|
15398
15730
|
track('Jobs.GetAll')
|
|
@@ -15403,6 +15735,12 @@
|
|
|
15403
15735
|
__decorate([
|
|
15404
15736
|
track('Jobs.GetOutput')
|
|
15405
15737
|
], JobService.prototype, "getOutput", null);
|
|
15738
|
+
__decorate([
|
|
15739
|
+
track('Jobs.Stop')
|
|
15740
|
+
], JobService.prototype, "stop", null);
|
|
15741
|
+
__decorate([
|
|
15742
|
+
track('Jobs.Resume')
|
|
15743
|
+
], JobService.prototype, "resume", null);
|
|
15406
15744
|
|
|
15407
15745
|
/**
|
|
15408
15746
|
* Enum for job sub-state
|
|
@@ -15613,182 +15951,6 @@
|
|
|
15613
15951
|
track('Processes.GetById')
|
|
15614
15952
|
], ProcessService.prototype, "getById", null);
|
|
15615
15953
|
|
|
15616
|
-
/**
|
|
15617
|
-
* Enum for package types
|
|
15618
|
-
*/
|
|
15619
|
-
exports.PackageType = void 0;
|
|
15620
|
-
(function (PackageType) {
|
|
15621
|
-
PackageType["Undefined"] = "Undefined";
|
|
15622
|
-
PackageType["Process"] = "Process";
|
|
15623
|
-
PackageType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15624
|
-
PackageType["WebApp"] = "WebApp";
|
|
15625
|
-
PackageType["Agent"] = "Agent";
|
|
15626
|
-
PackageType["TestAutomationProcess"] = "TestAutomationProcess";
|
|
15627
|
-
PackageType["Api"] = "Api";
|
|
15628
|
-
PackageType["MCPServer"] = "MCPServer";
|
|
15629
|
-
PackageType["BusinessRules"] = "BusinessRules";
|
|
15630
|
-
PackageType["CaseManagement"] = "CaseManagement";
|
|
15631
|
-
PackageType["Flow"] = "Flow";
|
|
15632
|
-
PackageType["Function"] = "Function";
|
|
15633
|
-
})(exports.PackageType || (exports.PackageType = {}));
|
|
15634
|
-
/**
|
|
15635
|
-
* Enum for job priority
|
|
15636
|
-
*/
|
|
15637
|
-
exports.JobPriority = void 0;
|
|
15638
|
-
(function (JobPriority) {
|
|
15639
|
-
JobPriority["Low"] = "Low";
|
|
15640
|
-
JobPriority["Normal"] = "Normal";
|
|
15641
|
-
JobPriority["High"] = "High";
|
|
15642
|
-
})(exports.JobPriority || (exports.JobPriority = {}));
|
|
15643
|
-
/**
|
|
15644
|
-
* Enum for target framework
|
|
15645
|
-
*/
|
|
15646
|
-
exports.TargetFramework = void 0;
|
|
15647
|
-
(function (TargetFramework) {
|
|
15648
|
-
TargetFramework["Legacy"] = "Legacy";
|
|
15649
|
-
TargetFramework["Windows"] = "Windows";
|
|
15650
|
-
TargetFramework["Portable"] = "Portable";
|
|
15651
|
-
})(exports.TargetFramework || (exports.TargetFramework = {}));
|
|
15652
|
-
/**
|
|
15653
|
-
* Enum for robot size
|
|
15654
|
-
*/
|
|
15655
|
-
exports.RobotSize = void 0;
|
|
15656
|
-
(function (RobotSize) {
|
|
15657
|
-
RobotSize["Small"] = "Small";
|
|
15658
|
-
RobotSize["Standard"] = "Standard";
|
|
15659
|
-
RobotSize["Medium"] = "Medium";
|
|
15660
|
-
RobotSize["Large"] = "Large";
|
|
15661
|
-
})(exports.RobotSize || (exports.RobotSize = {}));
|
|
15662
|
-
/**
|
|
15663
|
-
* Enum for remote control access
|
|
15664
|
-
*/
|
|
15665
|
-
exports.RemoteControlAccess = void 0;
|
|
15666
|
-
(function (RemoteControlAccess) {
|
|
15667
|
-
RemoteControlAccess["None"] = "None";
|
|
15668
|
-
RemoteControlAccess["ReadOnly"] = "ReadOnly";
|
|
15669
|
-
RemoteControlAccess["Full"] = "Full";
|
|
15670
|
-
})(exports.RemoteControlAccess || (exports.RemoteControlAccess = {}));
|
|
15671
|
-
/**
|
|
15672
|
-
* Enum for process start strategy
|
|
15673
|
-
*/
|
|
15674
|
-
exports.StartStrategy = void 0;
|
|
15675
|
-
(function (StartStrategy) {
|
|
15676
|
-
StartStrategy["All"] = "All";
|
|
15677
|
-
StartStrategy["Specific"] = "Specific";
|
|
15678
|
-
StartStrategy["RobotCount"] = "RobotCount";
|
|
15679
|
-
StartStrategy["JobsCount"] = "JobsCount";
|
|
15680
|
-
StartStrategy["ModernJobsCount"] = "ModernJobsCount";
|
|
15681
|
-
})(exports.StartStrategy || (exports.StartStrategy = {}));
|
|
15682
|
-
/**
|
|
15683
|
-
* Enum for package source type
|
|
15684
|
-
*/
|
|
15685
|
-
exports.PackageSourceType = void 0;
|
|
15686
|
-
(function (PackageSourceType) {
|
|
15687
|
-
PackageSourceType["Manual"] = "Manual";
|
|
15688
|
-
PackageSourceType["Schedule"] = "Schedule";
|
|
15689
|
-
PackageSourceType["Queue"] = "Queue";
|
|
15690
|
-
PackageSourceType["StudioWeb"] = "StudioWeb";
|
|
15691
|
-
PackageSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
15692
|
-
PackageSourceType["StudioDesktop"] = "StudioDesktop";
|
|
15693
|
-
PackageSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
15694
|
-
PackageSourceType["Apps"] = "Apps";
|
|
15695
|
-
PackageSourceType["SAP"] = "SAP";
|
|
15696
|
-
PackageSourceType["HttpTrigger"] = "HttpTrigger";
|
|
15697
|
-
PackageSourceType["HttpTriggerWithCallback"] = "HttpTriggerWithCallback";
|
|
15698
|
-
PackageSourceType["RobotAPI"] = "RobotAPI";
|
|
15699
|
-
PackageSourceType["Assistant"] = "Assistant";
|
|
15700
|
-
PackageSourceType["CommandLine"] = "CommandLine";
|
|
15701
|
-
PackageSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
15702
|
-
PackageSourceType["Autopilot"] = "Autopilot";
|
|
15703
|
-
PackageSourceType["TestManager"] = "TestManager";
|
|
15704
|
-
PackageSourceType["AgentService"] = "AgentService";
|
|
15705
|
-
PackageSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15706
|
-
PackageSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
15707
|
-
PackageSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
15708
|
-
PackageSourceType["AgentHub"] = "AgentHub";
|
|
15709
|
-
PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
15710
|
-
})(exports.PackageSourceType || (exports.PackageSourceType = {}));
|
|
15711
|
-
/**
|
|
15712
|
-
* Enum for job source type
|
|
15713
|
-
*/
|
|
15714
|
-
exports.JobSourceType = void 0;
|
|
15715
|
-
(function (JobSourceType) {
|
|
15716
|
-
JobSourceType["Manual"] = "Manual";
|
|
15717
|
-
JobSourceType["Schedule"] = "Schedule";
|
|
15718
|
-
JobSourceType["Agent"] = "Agent";
|
|
15719
|
-
JobSourceType["Queue"] = "Queue";
|
|
15720
|
-
JobSourceType["StudioWeb"] = "StudioWeb";
|
|
15721
|
-
JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
15722
|
-
JobSourceType["StudioDesktop"] = "StudioDesktop";
|
|
15723
|
-
JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
15724
|
-
JobSourceType["Apps"] = "Apps";
|
|
15725
|
-
JobSourceType["SAP"] = "SAP";
|
|
15726
|
-
JobSourceType["HttpTrigger"] = "HttpTrigger";
|
|
15727
|
-
JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
|
|
15728
|
-
JobSourceType["RobotAPI"] = "RobotAPI";
|
|
15729
|
-
JobSourceType["CommandLine"] = "CommandLine";
|
|
15730
|
-
JobSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
15731
|
-
JobSourceType["Autopilot"] = "Autopilot";
|
|
15732
|
-
JobSourceType["TestManager"] = "TestManager";
|
|
15733
|
-
JobSourceType["AgentService"] = "AgentService";
|
|
15734
|
-
JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15735
|
-
JobSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
15736
|
-
JobSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
15737
|
-
JobSourceType["AgentHub"] = "AgentHub";
|
|
15738
|
-
JobSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
15739
|
-
JobSourceType["CaseManagement"] = "CaseManagement";
|
|
15740
|
-
})(exports.JobSourceType || (exports.JobSourceType = {}));
|
|
15741
|
-
/**
|
|
15742
|
-
* Enum for stop strategy
|
|
15743
|
-
*/
|
|
15744
|
-
exports.StopStrategy = void 0;
|
|
15745
|
-
(function (StopStrategy) {
|
|
15746
|
-
StopStrategy["SoftStop"] = "SoftStop";
|
|
15747
|
-
StopStrategy["Kill"] = "Kill";
|
|
15748
|
-
})(exports.StopStrategy || (exports.StopStrategy = {}));
|
|
15749
|
-
/**
|
|
15750
|
-
* Enum for runtime type
|
|
15751
|
-
*/
|
|
15752
|
-
exports.RuntimeType = void 0;
|
|
15753
|
-
(function (RuntimeType) {
|
|
15754
|
-
RuntimeType["NonProduction"] = "NonProduction";
|
|
15755
|
-
RuntimeType["Attended"] = "Attended";
|
|
15756
|
-
RuntimeType["Unattended"] = "Unattended";
|
|
15757
|
-
RuntimeType["Development"] = "Development";
|
|
15758
|
-
RuntimeType["Studio"] = "Studio";
|
|
15759
|
-
RuntimeType["RpaDeveloper"] = "RpaDeveloper";
|
|
15760
|
-
RuntimeType["StudioX"] = "StudioX";
|
|
15761
|
-
RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
|
|
15762
|
-
RuntimeType["Headless"] = "Headless";
|
|
15763
|
-
RuntimeType["StudioPro"] = "StudioPro";
|
|
15764
|
-
RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
|
|
15765
|
-
RuntimeType["TestAutomation"] = "TestAutomation";
|
|
15766
|
-
RuntimeType["AutomationCloud"] = "AutomationCloud";
|
|
15767
|
-
RuntimeType["Serverless"] = "Serverless";
|
|
15768
|
-
RuntimeType["AutomationKit"] = "AutomationKit";
|
|
15769
|
-
RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
|
|
15770
|
-
RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
|
|
15771
|
-
RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
|
|
15772
|
-
RuntimeType["Hosting"] = "Hosting";
|
|
15773
|
-
RuntimeType["AssistantWeb"] = "AssistantWeb";
|
|
15774
|
-
RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
15775
|
-
RuntimeType["AgentService"] = "AgentService";
|
|
15776
|
-
RuntimeType["AppTest"] = "AppTest";
|
|
15777
|
-
RuntimeType["PerformanceTest"] = "PerformanceTest";
|
|
15778
|
-
RuntimeType["BusinessRule"] = "BusinessRule";
|
|
15779
|
-
RuntimeType["CaseManagement"] = "CaseManagement";
|
|
15780
|
-
RuntimeType["Flow"] = "Flow";
|
|
15781
|
-
})(exports.RuntimeType || (exports.RuntimeType = {}));
|
|
15782
|
-
/**
|
|
15783
|
-
* Enum for job type
|
|
15784
|
-
*/
|
|
15785
|
-
exports.JobType = void 0;
|
|
15786
|
-
(function (JobType) {
|
|
15787
|
-
JobType["Unattended"] = "Unattended";
|
|
15788
|
-
JobType["Attended"] = "Attended";
|
|
15789
|
-
JobType["ServerlessGeneric"] = "ServerlessGeneric";
|
|
15790
|
-
})(exports.JobType || (exports.JobType = {}));
|
|
15791
|
-
|
|
15792
15954
|
/**
|
|
15793
15955
|
* Maps fields for Queue entities to ensure consistent naming
|
|
15794
15956
|
*/
|
|
@@ -16274,6 +16436,19 @@
|
|
|
16274
16436
|
...CommonFieldMap
|
|
16275
16437
|
};
|
|
16276
16438
|
|
|
16439
|
+
/**
|
|
16440
|
+
* Status of a feedback entry in the review workflow
|
|
16441
|
+
*/
|
|
16442
|
+
exports.FeedbackStatus = void 0;
|
|
16443
|
+
(function (FeedbackStatus) {
|
|
16444
|
+
/** Feedback is awaiting review */
|
|
16445
|
+
FeedbackStatus[FeedbackStatus["Pending"] = 0] = "Pending";
|
|
16446
|
+
/** Feedback has been approved and confirmed */
|
|
16447
|
+
FeedbackStatus[FeedbackStatus["Approved"] = 1] = "Approved";
|
|
16448
|
+
/** Feedback has been dismissed */
|
|
16449
|
+
FeedbackStatus[FeedbackStatus["Dismissed"] = 2] = "Dismissed";
|
|
16450
|
+
})(exports.FeedbackStatus || (exports.FeedbackStatus = {}));
|
|
16451
|
+
|
|
16277
16452
|
/**
|
|
16278
16453
|
* Asset resolution utilities for UiPath Coded Apps
|
|
16279
16454
|
*
|