@uipath/uipath-typescript 1.2.0 → 1.2.2
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 +1 -1
- package/dist/assets/index.d.ts +2 -1
- package/dist/assets/index.mjs +1 -1
- package/dist/attachments/index.cjs +1944 -0
- package/dist/attachments/index.d.ts +399 -0
- package/dist/attachments/index.mjs +1941 -0
- package/dist/buckets/index.cjs +1 -1
- package/dist/buckets/index.d.ts +4 -2
- package/dist/buckets/index.mjs +1 -1
- package/dist/cases/index.cjs +95 -48
- package/dist/cases/index.d.ts +31 -2
- package/dist/cases/index.mjs +95 -48
- package/dist/conversational-agent/index.cjs +38 -7
- package/dist/conversational-agent/index.d.ts +72 -6
- package/dist/conversational-agent/index.mjs +38 -7
- package/dist/core/index.cjs +118 -17
- package/dist/core/index.d.ts +26 -2
- package/dist/core/index.mjs +118 -17
- package/dist/entities/index.cjs +48 -1
- package/dist/entities/index.d.ts +106 -19
- package/dist/entities/index.mjs +48 -1
- package/dist/index.cjs +585 -267
- package/dist/index.d.ts +595 -67
- package/dist/index.mjs +586 -268
- package/dist/index.umd.js +582 -264
- package/dist/jobs/index.cjs +2036 -0
- package/dist/jobs/index.d.ts +724 -0
- package/dist/jobs/index.mjs +2033 -0
- package/dist/maestro-processes/index.cjs +1 -1
- package/dist/maestro-processes/index.mjs +1 -1
- package/dist/processes/index.cjs +67 -1
- package/dist/processes/index.d.ts +80 -15
- package/dist/processes/index.mjs +68 -2
- package/dist/queues/index.cjs +1 -1
- package/dist/queues/index.d.ts +2 -1
- package/dist/queues/index.mjs +1 -1
- package/dist/tasks/index.cjs +1319 -1272
- package/dist/tasks/index.d.ts +331 -287
- package/dist/tasks/index.mjs +1319 -1272
- package/package.json +25 -3
package/dist/index.cjs
CHANGED
|
@@ -4387,6 +4387,234 @@ function getErrorDetails(error) {
|
|
|
4387
4387
|
};
|
|
4388
4388
|
}
|
|
4389
4389
|
|
|
4390
|
+
/**
|
|
4391
|
+
* Types of tasks available in Action Center.
|
|
4392
|
+
* Each type determines the task's behavior, UI rendering, and completion requirements.
|
|
4393
|
+
*/
|
|
4394
|
+
exports.TaskType = void 0;
|
|
4395
|
+
(function (TaskType) {
|
|
4396
|
+
/** A form-based task that renders a UiPath form layout for user input */
|
|
4397
|
+
TaskType["Form"] = "FormTask";
|
|
4398
|
+
/** An externally managed task handled outside of Action Center */
|
|
4399
|
+
TaskType["External"] = "ExternalTask";
|
|
4400
|
+
/** A task powered by a UiPath App */
|
|
4401
|
+
TaskType["App"] = "AppTask";
|
|
4402
|
+
/** A document validation task for reviewing and correcting extracted document data */
|
|
4403
|
+
TaskType["DocumentValidation"] = "DocumentValidationTask";
|
|
4404
|
+
/** A document classification task for categorizing documents */
|
|
4405
|
+
TaskType["DocumentClassification"] = "DocumentClassificationTask";
|
|
4406
|
+
/** A data labeling task for annotating training data */
|
|
4407
|
+
TaskType["DataLabeling"] = "DataLabelingTask";
|
|
4408
|
+
})(exports.TaskType || (exports.TaskType = {}));
|
|
4409
|
+
exports.TaskPriority = void 0;
|
|
4410
|
+
(function (TaskPriority) {
|
|
4411
|
+
TaskPriority["Low"] = "Low";
|
|
4412
|
+
TaskPriority["Medium"] = "Medium";
|
|
4413
|
+
TaskPriority["High"] = "High";
|
|
4414
|
+
TaskPriority["Critical"] = "Critical";
|
|
4415
|
+
})(exports.TaskPriority || (exports.TaskPriority = {}));
|
|
4416
|
+
exports.TaskStatus = void 0;
|
|
4417
|
+
(function (TaskStatus) {
|
|
4418
|
+
TaskStatus["Unassigned"] = "Unassigned";
|
|
4419
|
+
TaskStatus["Pending"] = "Pending";
|
|
4420
|
+
TaskStatus["Completed"] = "Completed";
|
|
4421
|
+
})(exports.TaskStatus || (exports.TaskStatus = {}));
|
|
4422
|
+
exports.TaskSlaCriteria = void 0;
|
|
4423
|
+
(function (TaskSlaCriteria) {
|
|
4424
|
+
TaskSlaCriteria["TaskCreated"] = "TaskCreated";
|
|
4425
|
+
TaskSlaCriteria["TaskAssigned"] = "TaskAssigned";
|
|
4426
|
+
TaskSlaCriteria["TaskCompleted"] = "TaskCompleted";
|
|
4427
|
+
})(exports.TaskSlaCriteria || (exports.TaskSlaCriteria = {}));
|
|
4428
|
+
exports.TaskSlaStatus = void 0;
|
|
4429
|
+
(function (TaskSlaStatus) {
|
|
4430
|
+
TaskSlaStatus["OverdueLater"] = "OverdueLater";
|
|
4431
|
+
TaskSlaStatus["OverdueSoon"] = "OverdueSoon";
|
|
4432
|
+
TaskSlaStatus["Overdue"] = "Overdue";
|
|
4433
|
+
TaskSlaStatus["CompletedInTime"] = "CompletedInTime";
|
|
4434
|
+
})(exports.TaskSlaStatus || (exports.TaskSlaStatus = {}));
|
|
4435
|
+
exports.TaskSourceName = void 0;
|
|
4436
|
+
(function (TaskSourceName) {
|
|
4437
|
+
TaskSourceName["Agent"] = "Agent";
|
|
4438
|
+
TaskSourceName["Workflow"] = "Workflow";
|
|
4439
|
+
TaskSourceName["Maestro"] = "Maestro";
|
|
4440
|
+
TaskSourceName["Default"] = "Default";
|
|
4441
|
+
})(exports.TaskSourceName || (exports.TaskSourceName = {}));
|
|
4442
|
+
/**
|
|
4443
|
+
* Task activity types
|
|
4444
|
+
*/
|
|
4445
|
+
exports.TaskActivityType = void 0;
|
|
4446
|
+
(function (TaskActivityType) {
|
|
4447
|
+
TaskActivityType["Created"] = "Created";
|
|
4448
|
+
TaskActivityType["Assigned"] = "Assigned";
|
|
4449
|
+
TaskActivityType["Reassigned"] = "Reassigned";
|
|
4450
|
+
TaskActivityType["Unassigned"] = "Unassigned";
|
|
4451
|
+
TaskActivityType["Saved"] = "Saved";
|
|
4452
|
+
TaskActivityType["Forwarded"] = "Forwarded";
|
|
4453
|
+
TaskActivityType["Completed"] = "Completed";
|
|
4454
|
+
TaskActivityType["Commented"] = "Commented";
|
|
4455
|
+
TaskActivityType["Deleted"] = "Deleted";
|
|
4456
|
+
TaskActivityType["BulkSaved"] = "BulkSaved";
|
|
4457
|
+
TaskActivityType["BulkCompleted"] = "BulkCompleted";
|
|
4458
|
+
TaskActivityType["FirstOpened"] = "FirstOpened";
|
|
4459
|
+
})(exports.TaskActivityType || (exports.TaskActivityType = {}));
|
|
4460
|
+
|
|
4461
|
+
/**
|
|
4462
|
+
* Base path constants for different services
|
|
4463
|
+
*/
|
|
4464
|
+
const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
4465
|
+
const PIMS_BASE = 'pims_';
|
|
4466
|
+
const DATAFABRIC_BASE = 'datafabric_';
|
|
4467
|
+
const IDENTITY_BASE = 'identity_';
|
|
4468
|
+
|
|
4469
|
+
/**
|
|
4470
|
+
* Orchestrator Service Endpoints
|
|
4471
|
+
*/
|
|
4472
|
+
/**
|
|
4473
|
+
* Task Service (Action Center) Endpoints
|
|
4474
|
+
*/
|
|
4475
|
+
const TASK_ENDPOINTS = {
|
|
4476
|
+
CREATE_GENERIC_TASK: `${ORCHESTRATOR_BASE}/tasks/GenericTasks/CreateTask`,
|
|
4477
|
+
GET_TASK_USERS: (folderId) => `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTaskUsers(organizationUnitId=${folderId})`,
|
|
4478
|
+
GET_TASKS_ACROSS_FOLDERS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFolders`,
|
|
4479
|
+
GET_TASKS_ACROSS_FOLDERS_ADMIN: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFoldersForAdmin`,
|
|
4480
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Tasks(${id})`,
|
|
4481
|
+
ASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.AssignTasks`,
|
|
4482
|
+
REASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.ReassignTasks`,
|
|
4483
|
+
UNASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.UnassignTasks`,
|
|
4484
|
+
COMPLETE_FORM_TASK: `${ORCHESTRATOR_BASE}/forms/TaskForms/CompleteTask`,
|
|
4485
|
+
COMPLETE_APP_TASK: `${ORCHESTRATOR_BASE}/tasks/AppTasks/CompleteAppTask`,
|
|
4486
|
+
COMPLETE_GENERIC_TASK: `${ORCHESTRATOR_BASE}/tasks/GenericTasks/CompleteTask`,
|
|
4487
|
+
GET_TASK_FORM_BY_ID: `${ORCHESTRATOR_BASE}/forms/TaskForms/GetTaskFormById`,
|
|
4488
|
+
GET_GENERIC_TASK_BY_ID: `${ORCHESTRATOR_BASE}/tasks/GenericTasks/GetTaskDataById`,
|
|
4489
|
+
GET_APP_TASK_BY_ID: `${ORCHESTRATOR_BASE}/tasks/AppTasks/GetAppTaskById`,
|
|
4490
|
+
};
|
|
4491
|
+
/**
|
|
4492
|
+
* Orchestrator Bucket Endpoints
|
|
4493
|
+
*/
|
|
4494
|
+
const BUCKET_ENDPOINTS = {
|
|
4495
|
+
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/Buckets`,
|
|
4496
|
+
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Buckets/UiPath.Server.Configuration.OData.GetBucketsAcrossFolders`,
|
|
4497
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})`,
|
|
4498
|
+
GET_FILE_META_DATA: (id) => `${ORCHESTRATOR_BASE}/api/Buckets/${id}/ListFiles`,
|
|
4499
|
+
GET_READ_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetReadUri`,
|
|
4500
|
+
GET_WRITE_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetWriteUri`,
|
|
4501
|
+
};
|
|
4502
|
+
/**
|
|
4503
|
+
* Orchestrator Process Service Endpoints
|
|
4504
|
+
*/
|
|
4505
|
+
const PROCESS_ENDPOINTS = {
|
|
4506
|
+
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Releases`,
|
|
4507
|
+
START_PROCESS: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs`,
|
|
4508
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Releases(${id})`,
|
|
4509
|
+
};
|
|
4510
|
+
/**
|
|
4511
|
+
* Orchestrator Queue Service Endpoints
|
|
4512
|
+
*/
|
|
4513
|
+
const QUEUE_ENDPOINTS = {
|
|
4514
|
+
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/QueueDefinitions`,
|
|
4515
|
+
GET_ALL: `${ORCHESTRATOR_BASE}/odata/QueueDefinitions/UiPath.Server.Configuration.OData.GetQueuesAcrossFolders`,
|
|
4516
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/QueueDefinitions(${id})`,
|
|
4517
|
+
};
|
|
4518
|
+
/**
|
|
4519
|
+
* Orchestrator Job Service Endpoints
|
|
4520
|
+
*/
|
|
4521
|
+
const JOB_ENDPOINTS = {
|
|
4522
|
+
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Jobs`,
|
|
4523
|
+
};
|
|
4524
|
+
/**
|
|
4525
|
+
* Orchestrator Asset Service Endpoints
|
|
4526
|
+
*/
|
|
4527
|
+
const ASSET_ENDPOINTS = {
|
|
4528
|
+
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/Assets/UiPath.Server.Configuration.OData.GetFiltered`,
|
|
4529
|
+
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Assets/UiPath.Server.Configuration.OData.GetAssetsAcrossFolders`,
|
|
4530
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Assets(${id})`,
|
|
4531
|
+
};
|
|
4532
|
+
/**
|
|
4533
|
+
* Orchestrator Attachment Service Endpoints
|
|
4534
|
+
*/
|
|
4535
|
+
const ORCHESTRATOR_ATTACHMENT_ENDPOINTS = {
|
|
4536
|
+
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Attachments(${id})`,
|
|
4537
|
+
};
|
|
4538
|
+
|
|
4539
|
+
/**
|
|
4540
|
+
* Maestro Service Endpoints
|
|
4541
|
+
*/
|
|
4542
|
+
/**
|
|
4543
|
+
* Maestro Process Service Endpoints
|
|
4544
|
+
*/
|
|
4545
|
+
const MAESTRO_ENDPOINTS = {
|
|
4546
|
+
PROCESSES: {
|
|
4547
|
+
GET_ALL: `${PIMS_BASE}/api/v1/processes/summary`,
|
|
4548
|
+
GET_SETTINGS: (processKey) => `${PIMS_BASE}/api/v1/processes/${processKey}/settings`,
|
|
4549
|
+
},
|
|
4550
|
+
INSTANCES: {
|
|
4551
|
+
GET_ALL: `${PIMS_BASE}/api/v1/instances`,
|
|
4552
|
+
GET_BY_ID: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}`,
|
|
4553
|
+
GET_EXECUTION_HISTORY: (instanceId) => `${PIMS_BASE}/api/v1/spans/${instanceId}`,
|
|
4554
|
+
GET_BPMN: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/bpmn`,
|
|
4555
|
+
GET_VARIABLES: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/variables`,
|
|
4556
|
+
CANCEL: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/cancel`,
|
|
4557
|
+
PAUSE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/pause`,
|
|
4558
|
+
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume`,
|
|
4559
|
+
},
|
|
4560
|
+
INCIDENTS: {
|
|
4561
|
+
GET_ALL: `${PIMS_BASE}/api/v1/incidents/summary`,
|
|
4562
|
+
GET_BY_PROCESS: (processKey) => `${PIMS_BASE}/api/v1/incidents/process/${processKey}`,
|
|
4563
|
+
GET_BY_INSTANCE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/incidents`,
|
|
4564
|
+
},
|
|
4565
|
+
CASES: {
|
|
4566
|
+
GET_CASE_JSON: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/case-json`,
|
|
4567
|
+
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
4568
|
+
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
4569
|
+
},
|
|
4570
|
+
};
|
|
4571
|
+
|
|
4572
|
+
/**
|
|
4573
|
+
* Data Fabric Service Endpoints
|
|
4574
|
+
*/
|
|
4575
|
+
/**
|
|
4576
|
+
* Data Fabric Entity Service Endpoints
|
|
4577
|
+
*/
|
|
4578
|
+
const DATA_FABRIC_ENDPOINTS = {
|
|
4579
|
+
ENTITY: {
|
|
4580
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/Entity`,
|
|
4581
|
+
GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
|
|
4582
|
+
GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
|
|
4583
|
+
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read/${recordId}`,
|
|
4584
|
+
INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
|
|
4585
|
+
BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
|
|
4586
|
+
UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
|
|
4587
|
+
UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
|
|
4588
|
+
DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
|
|
4589
|
+
DOWNLOAD_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4590
|
+
UPLOAD_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4591
|
+
DELETE_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4592
|
+
},
|
|
4593
|
+
CHOICESETS: {
|
|
4594
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/Entity/choiceset`,
|
|
4595
|
+
GET_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/query_expansion`,
|
|
4596
|
+
},
|
|
4597
|
+
};
|
|
4598
|
+
|
|
4599
|
+
/**
|
|
4600
|
+
* Identity/Authentication Endpoints
|
|
4601
|
+
*/
|
|
4602
|
+
/**
|
|
4603
|
+
* Identity Service Endpoints
|
|
4604
|
+
*/
|
|
4605
|
+
const IDENTITY_ENDPOINTS = {
|
|
4606
|
+
TOKEN: `${IDENTITY_BASE}/connect/token`,
|
|
4607
|
+
AUTHORIZE: `${IDENTITY_BASE}/connect/authorize`,
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4610
|
+
const TASK_TYPE_ENDPOINTS = {
|
|
4611
|
+
[exports.TaskType.Form]: TASK_ENDPOINTS.GET_TASK_FORM_BY_ID,
|
|
4612
|
+
[exports.TaskType.App]: TASK_ENDPOINTS.GET_APP_TASK_BY_ID,
|
|
4613
|
+
[exports.TaskType.DocumentValidation]: TASK_ENDPOINTS.GET_GENERIC_TASK_BY_ID,
|
|
4614
|
+
[exports.TaskType.DocumentClassification]: TASK_ENDPOINTS.GET_GENERIC_TASK_BY_ID,
|
|
4615
|
+
[exports.TaskType.External]: TASK_ENDPOINTS.GET_GENERIC_TASK_BY_ID,
|
|
4616
|
+
[exports.TaskType.DataLabeling]: TASK_ENDPOINTS.GET_GENERIC_TASK_BY_ID,
|
|
4617
|
+
};
|
|
4390
4618
|
var ActionCenterEventNames;
|
|
4391
4619
|
(function (ActionCenterEventNames) {
|
|
4392
4620
|
ActionCenterEventNames["TOKENREFRESHED"] = "AC.tokenRefreshed";
|
|
@@ -4733,170 +4961,36 @@ class TokenManager {
|
|
|
4733
4961
|
if (!tokenInfo?.refreshToken) {
|
|
4734
4962
|
throw new Error('No refresh token available. User may need to re-authenticate.');
|
|
4735
4963
|
}
|
|
4736
|
-
const orgName = this.config.orgName;
|
|
4737
|
-
const body = new URLSearchParams({
|
|
4738
|
-
grant_type: 'refresh_token',
|
|
4739
|
-
client_id: this.config.clientId,
|
|
4740
|
-
refresh_token: tokenInfo.refreshToken
|
|
4741
|
-
});
|
|
4742
|
-
const response = await fetch(`${this.config.baseUrl}/${orgName}/identity_/connect/token`, {
|
|
4743
|
-
method: 'POST',
|
|
4744
|
-
headers: {
|
|
4745
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
4746
|
-
},
|
|
4747
|
-
body: body.toString()
|
|
4748
|
-
});
|
|
4749
|
-
if (!response.ok) {
|
|
4750
|
-
const errorData = await response.json().catch(() => ({ message: response.statusText }));
|
|
4751
|
-
console.error("Token refresh error:", errorData);
|
|
4752
|
-
// Clear the invalid token to prevent further failed requests
|
|
4753
|
-
this.clearToken();
|
|
4754
|
-
throw new Error(`Failed to refresh access token: ${JSON.stringify(errorData)}`);
|
|
4755
|
-
}
|
|
4756
|
-
const token = await response.json();
|
|
4757
|
-
this.setToken({
|
|
4758
|
-
token: token.access_token,
|
|
4759
|
-
type: 'oauth',
|
|
4760
|
-
expiresAt: new Date(Date.now() + token.expires_in * 1000),
|
|
4761
|
-
refreshToken: token.refresh_token
|
|
4762
|
-
});
|
|
4763
|
-
return token;
|
|
4764
|
-
}
|
|
4765
|
-
}
|
|
4766
|
-
|
|
4767
|
-
/**
|
|
4768
|
-
* Base path constants for different services
|
|
4769
|
-
*/
|
|
4770
|
-
const ORCHESTRATOR_BASE = 'orchestrator_';
|
|
4771
|
-
const PIMS_BASE = 'pims_';
|
|
4772
|
-
const DATAFABRIC_BASE = 'datafabric_';
|
|
4773
|
-
const IDENTITY_BASE = 'identity_';
|
|
4774
|
-
|
|
4775
|
-
/**
|
|
4776
|
-
* Orchestrator Service Endpoints
|
|
4777
|
-
*/
|
|
4778
|
-
/**
|
|
4779
|
-
* Task Service (Action Center) Endpoints
|
|
4780
|
-
*/
|
|
4781
|
-
const TASK_ENDPOINTS = {
|
|
4782
|
-
CREATE_GENERIC_TASK: `${ORCHESTRATOR_BASE}/tasks/GenericTasks/CreateTask`,
|
|
4783
|
-
GET_TASK_USERS: (folderId) => `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTaskUsers(organizationUnitId=${folderId})`,
|
|
4784
|
-
GET_TASKS_ACROSS_FOLDERS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFolders`,
|
|
4785
|
-
GET_TASKS_ACROSS_FOLDERS_ADMIN: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.GetTasksAcrossFoldersForAdmin`,
|
|
4786
|
-
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Tasks(${id})`,
|
|
4787
|
-
ASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.AssignTasks`,
|
|
4788
|
-
REASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.ReassignTasks`,
|
|
4789
|
-
UNASSIGN_TASKS: `${ORCHESTRATOR_BASE}/odata/Tasks/UiPath.Server.Configuration.OData.UnassignTasks`,
|
|
4790
|
-
COMPLETE_FORM_TASK: `${ORCHESTRATOR_BASE}/forms/TaskForms/CompleteTask`,
|
|
4791
|
-
COMPLETE_APP_TASK: `${ORCHESTRATOR_BASE}/tasks/AppTasks/CompleteAppTask`,
|
|
4792
|
-
COMPLETE_GENERIC_TASK: `${ORCHESTRATOR_BASE}/tasks/GenericTasks/CompleteTask`,
|
|
4793
|
-
GET_TASK_FORM_BY_ID: `${ORCHESTRATOR_BASE}/forms/TaskForms/GetTaskFormById`,
|
|
4794
|
-
};
|
|
4795
|
-
/**
|
|
4796
|
-
* Orchestrator Bucket Endpoints
|
|
4797
|
-
*/
|
|
4798
|
-
const BUCKET_ENDPOINTS = {
|
|
4799
|
-
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/Buckets`,
|
|
4800
|
-
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Buckets/UiPath.Server.Configuration.OData.GetBucketsAcrossFolders`,
|
|
4801
|
-
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})`,
|
|
4802
|
-
GET_FILE_META_DATA: (id) => `${ORCHESTRATOR_BASE}/api/Buckets/${id}/ListFiles`,
|
|
4803
|
-
GET_READ_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetReadUri`,
|
|
4804
|
-
GET_WRITE_URI: (id) => `${ORCHESTRATOR_BASE}/odata/Buckets(${id})/UiPath.Server.Configuration.OData.GetWriteUri`,
|
|
4805
|
-
};
|
|
4806
|
-
/**
|
|
4807
|
-
* Orchestrator Process Service Endpoints
|
|
4808
|
-
*/
|
|
4809
|
-
const PROCESS_ENDPOINTS = {
|
|
4810
|
-
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Releases`,
|
|
4811
|
-
START_PROCESS: `${ORCHESTRATOR_BASE}/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs`,
|
|
4812
|
-
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Releases(${id})`,
|
|
4813
|
-
};
|
|
4814
|
-
/**
|
|
4815
|
-
* Orchestrator Queue Service Endpoints
|
|
4816
|
-
*/
|
|
4817
|
-
const QUEUE_ENDPOINTS = {
|
|
4818
|
-
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/QueueDefinitions`,
|
|
4819
|
-
GET_ALL: `${ORCHESTRATOR_BASE}/odata/QueueDefinitions/UiPath.Server.Configuration.OData.GetQueuesAcrossFolders`,
|
|
4820
|
-
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/QueueDefinitions(${id})`,
|
|
4821
|
-
};
|
|
4822
|
-
/**
|
|
4823
|
-
* Orchestrator Asset Service Endpoints
|
|
4824
|
-
*/
|
|
4825
|
-
const ASSET_ENDPOINTS = {
|
|
4826
|
-
GET_BY_FOLDER: `${ORCHESTRATOR_BASE}/odata/Assets/UiPath.Server.Configuration.OData.GetFiltered`,
|
|
4827
|
-
GET_ALL: `${ORCHESTRATOR_BASE}/odata/Assets/UiPath.Server.Configuration.OData.GetAssetsAcrossFolders`,
|
|
4828
|
-
GET_BY_ID: (id) => `${ORCHESTRATOR_BASE}/odata/Assets(${id})`,
|
|
4829
|
-
};
|
|
4830
|
-
|
|
4831
|
-
/**
|
|
4832
|
-
* Maestro Service Endpoints
|
|
4833
|
-
*/
|
|
4834
|
-
/**
|
|
4835
|
-
* Maestro Process Service Endpoints
|
|
4836
|
-
*/
|
|
4837
|
-
const MAESTRO_ENDPOINTS = {
|
|
4838
|
-
PROCESSES: {
|
|
4839
|
-
GET_ALL: `${PIMS_BASE}/api/v1/processes/summary`,
|
|
4840
|
-
GET_SETTINGS: (processKey) => `${PIMS_BASE}/api/v1/processes/${processKey}/settings`,
|
|
4841
|
-
},
|
|
4842
|
-
INSTANCES: {
|
|
4843
|
-
GET_ALL: `${PIMS_BASE}/api/v1/instances`,
|
|
4844
|
-
GET_BY_ID: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}`,
|
|
4845
|
-
GET_EXECUTION_HISTORY: (instanceId) => `${PIMS_BASE}/api/v1/spans/${instanceId}`,
|
|
4846
|
-
GET_BPMN: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/bpmn`,
|
|
4847
|
-
GET_VARIABLES: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/variables`,
|
|
4848
|
-
CANCEL: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/cancel`,
|
|
4849
|
-
PAUSE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/pause`,
|
|
4850
|
-
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume`,
|
|
4851
|
-
},
|
|
4852
|
-
INCIDENTS: {
|
|
4853
|
-
GET_ALL: `${PIMS_BASE}/api/v1/incidents/summary`,
|
|
4854
|
-
GET_BY_PROCESS: (processKey) => `${PIMS_BASE}/api/v1/incidents/process/${processKey}`,
|
|
4855
|
-
GET_BY_INSTANCE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/incidents`,
|
|
4856
|
-
},
|
|
4857
|
-
CASES: {
|
|
4858
|
-
GET_CASE_JSON: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/case-json`,
|
|
4859
|
-
GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
|
|
4860
|
-
REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
|
|
4861
|
-
},
|
|
4862
|
-
};
|
|
4863
|
-
|
|
4864
|
-
/**
|
|
4865
|
-
* Data Fabric Service Endpoints
|
|
4866
|
-
*/
|
|
4867
|
-
/**
|
|
4868
|
-
* Data Fabric Entity Service Endpoints
|
|
4869
|
-
*/
|
|
4870
|
-
const DATA_FABRIC_ENDPOINTS = {
|
|
4871
|
-
ENTITY: {
|
|
4872
|
-
GET_ALL: `${DATAFABRIC_BASE}/api/Entity`,
|
|
4873
|
-
GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
|
|
4874
|
-
GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
|
|
4875
|
-
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read/${recordId}`,
|
|
4876
|
-
INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
|
|
4877
|
-
BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
|
|
4878
|
-
UPDATE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update-batch`,
|
|
4879
|
-
DELETE_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/delete-batch`,
|
|
4880
|
-
DOWNLOAD_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4881
|
-
UPLOAD_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4882
|
-
DELETE_ATTACHMENT: (entityId, recordId, fieldName) => `${DATAFABRIC_BASE}/api/Attachment/entity/${entityId}/${recordId}/${fieldName}`,
|
|
4883
|
-
},
|
|
4884
|
-
CHOICESETS: {
|
|
4885
|
-
GET_ALL: `${DATAFABRIC_BASE}/api/Entity/choiceset`,
|
|
4886
|
-
GET_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/query_expansion`,
|
|
4887
|
-
},
|
|
4888
|
-
};
|
|
4889
|
-
|
|
4890
|
-
/**
|
|
4891
|
-
* Identity/Authentication Endpoints
|
|
4892
|
-
*/
|
|
4893
|
-
/**
|
|
4894
|
-
* Identity Service Endpoints
|
|
4895
|
-
*/
|
|
4896
|
-
const IDENTITY_ENDPOINTS = {
|
|
4897
|
-
TOKEN: `${IDENTITY_BASE}/connect/token`,
|
|
4898
|
-
AUTHORIZE: `${IDENTITY_BASE}/connect/authorize`,
|
|
4899
|
-
};
|
|
4964
|
+
const orgName = this.config.orgName;
|
|
4965
|
+
const body = new URLSearchParams({
|
|
4966
|
+
grant_type: 'refresh_token',
|
|
4967
|
+
client_id: this.config.clientId,
|
|
4968
|
+
refresh_token: tokenInfo.refreshToken
|
|
4969
|
+
});
|
|
4970
|
+
const response = await fetch(`${this.config.baseUrl}/${orgName}/identity_/connect/token`, {
|
|
4971
|
+
method: 'POST',
|
|
4972
|
+
headers: {
|
|
4973
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
4974
|
+
},
|
|
4975
|
+
body: body.toString()
|
|
4976
|
+
});
|
|
4977
|
+
if (!response.ok) {
|
|
4978
|
+
const errorData = await response.json().catch(() => ({ message: response.statusText }));
|
|
4979
|
+
console.error("Token refresh error:", errorData);
|
|
4980
|
+
// Clear the invalid token to prevent further failed requests
|
|
4981
|
+
this.clearToken();
|
|
4982
|
+
throw new Error(`Failed to refresh access token: ${JSON.stringify(errorData)}`);
|
|
4983
|
+
}
|
|
4984
|
+
const token = await response.json();
|
|
4985
|
+
this.setToken({
|
|
4986
|
+
token: token.access_token,
|
|
4987
|
+
type: 'oauth',
|
|
4988
|
+
expiresAt: new Date(Date.now() + token.expires_in * 1000),
|
|
4989
|
+
refreshToken: token.refresh_token
|
|
4990
|
+
});
|
|
4991
|
+
return token;
|
|
4992
|
+
}
|
|
4993
|
+
}
|
|
4900
4994
|
|
|
4901
4995
|
class AuthService {
|
|
4902
4996
|
constructor(config, executionContext) {
|
|
@@ -5325,7 +5419,7 @@ function normalizeBaseUrl(url) {
|
|
|
5325
5419
|
// Connection string placeholder that will be replaced during build
|
|
5326
5420
|
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";
|
|
5327
5421
|
// SDK Version placeholder
|
|
5328
|
-
const SDK_VERSION = "1.2.
|
|
5422
|
+
const SDK_VERSION = "1.2.2";
|
|
5329
5423
|
const VERSION = "Version";
|
|
5330
5424
|
const SERVICE = "Service";
|
|
5331
5425
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -5856,6 +5950,15 @@ let UiPath$1 = class UiPath {
|
|
|
5856
5950
|
__classPrivateFieldGet(this, _UiPath_authService, "f")?.logout();
|
|
5857
5951
|
__classPrivateFieldSet(this, _UiPath_initialized, false, "f");
|
|
5858
5952
|
}
|
|
5953
|
+
/**
|
|
5954
|
+
* Updates the access token used for API requests.
|
|
5955
|
+
* Use this to inject or refresh a token externally.
|
|
5956
|
+
*
|
|
5957
|
+
* @param tokenInfo - The token information containing the access token, type, expiration, and optional refresh token
|
|
5958
|
+
*/
|
|
5959
|
+
updateToken(tokenInfo) {
|
|
5960
|
+
__classPrivateFieldGet(this, _UiPath_authService, "f")?.updateToken(tokenInfo);
|
|
5961
|
+
}
|
|
5859
5962
|
};
|
|
5860
5963
|
_UiPath_config = new WeakMap(), _UiPath_authService = new WeakMap(), _UiPath_initialized = new WeakMap(), _UiPath_partialConfig = new WeakMap(), _UiPath_instances = new WeakSet(), _UiPath_initializeWithConfig = function _UiPath_initializeWithConfig(config) {
|
|
5861
5964
|
// Validate and normalize the configuration
|
|
@@ -7489,6 +7592,13 @@ function createEntityMethods(entityData, service) {
|
|
|
7489
7592
|
throw new Error('Entity ID is undefined');
|
|
7490
7593
|
return service.insertRecordsById(entityData.id, data, options);
|
|
7491
7594
|
},
|
|
7595
|
+
async updateRecord(recordId, data, options) {
|
|
7596
|
+
if (!entityData.id)
|
|
7597
|
+
throw new Error('Entity ID is undefined');
|
|
7598
|
+
if (!recordId)
|
|
7599
|
+
throw new Error('Record ID is undefined');
|
|
7600
|
+
return service.updateRecordById(entityData.id, recordId, data, options);
|
|
7601
|
+
},
|
|
7492
7602
|
async updateRecords(data, options) {
|
|
7493
7603
|
if (!entityData.id)
|
|
7494
7604
|
throw new Error('Entity ID is undefined');
|
|
@@ -7897,6 +8007,42 @@ class EntityService extends BaseService {
|
|
|
7897
8007
|
const camelResponse = pascalToCamelCaseKeys(response.data);
|
|
7898
8008
|
return camelResponse;
|
|
7899
8009
|
}
|
|
8010
|
+
/**
|
|
8011
|
+
* Updates a single record in an entity by entity ID
|
|
8012
|
+
*
|
|
8013
|
+
* @param entityId - UUID of the entity
|
|
8014
|
+
* @param recordId - UUID of the record to update
|
|
8015
|
+
* @param data - Key-value pairs of fields to update
|
|
8016
|
+
* @param options - Update options
|
|
8017
|
+
* @returns Promise resolving to the updated record
|
|
8018
|
+
*
|
|
8019
|
+
* @example
|
|
8020
|
+
* ```typescript
|
|
8021
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
8022
|
+
*
|
|
8023
|
+
* const entities = new Entities(sdk);
|
|
8024
|
+
*
|
|
8025
|
+
* // Basic usage
|
|
8026
|
+
* const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 });
|
|
8027
|
+
*
|
|
8028
|
+
* // With options
|
|
8029
|
+
* const result = await entities.updateRecordById("<entityId>", "<recordId>", { name: "John Updated", age: 31 }, {
|
|
8030
|
+
* expansionLevel: 1
|
|
8031
|
+
* });
|
|
8032
|
+
* ```
|
|
8033
|
+
*/
|
|
8034
|
+
async updateRecordById(entityId, recordId, data, options = {}) {
|
|
8035
|
+
const params = createParams({
|
|
8036
|
+
expansionLevel: options.expansionLevel
|
|
8037
|
+
});
|
|
8038
|
+
const response = await this.post(DATA_FABRIC_ENDPOINTS.ENTITY.UPDATE_RECORD_BY_ID(entityId, recordId), data, {
|
|
8039
|
+
params,
|
|
8040
|
+
...options
|
|
8041
|
+
});
|
|
8042
|
+
// Convert PascalCase response to camelCase
|
|
8043
|
+
const camelResponse = pascalToCamelCaseKeys(response.data);
|
|
8044
|
+
return camelResponse;
|
|
8045
|
+
}
|
|
7900
8046
|
/**
|
|
7901
8047
|
* Updates data in an entity by entity ID
|
|
7902
8048
|
*
|
|
@@ -8228,6 +8374,9 @@ __decorate([
|
|
|
8228
8374
|
__decorate([
|
|
8229
8375
|
track('Entities.InsertRecordsById')
|
|
8230
8376
|
], EntityService.prototype, "insertRecordsById", null);
|
|
8377
|
+
__decorate([
|
|
8378
|
+
track('Entities.UpdateRecordById')
|
|
8379
|
+
], EntityService.prototype, "updateRecordById", null);
|
|
8231
8380
|
__decorate([
|
|
8232
8381
|
track('Entities.UpdateRecordsById')
|
|
8233
8382
|
], EntityService.prototype, "updateRecordsById", null);
|
|
@@ -9266,63 +9415,27 @@ const CASE_INSTANCE_TASK_FILTER = (caseInstanceId) => `Tags/any(tags:tags/Displa
|
|
|
9266
9415
|
*/
|
|
9267
9416
|
const CASE_INSTANCE_TASK_EXPAND = 'AssignedToUser,Activities';
|
|
9268
9417
|
|
|
9269
|
-
exports.TaskType = void 0;
|
|
9270
|
-
(function (TaskType) {
|
|
9271
|
-
TaskType["Form"] = "FormTask";
|
|
9272
|
-
TaskType["External"] = "ExternalTask";
|
|
9273
|
-
TaskType["App"] = "AppTask";
|
|
9274
|
-
})(exports.TaskType || (exports.TaskType = {}));
|
|
9275
|
-
exports.TaskPriority = void 0;
|
|
9276
|
-
(function (TaskPriority) {
|
|
9277
|
-
TaskPriority["Low"] = "Low";
|
|
9278
|
-
TaskPriority["Medium"] = "Medium";
|
|
9279
|
-
TaskPriority["High"] = "High";
|
|
9280
|
-
TaskPriority["Critical"] = "Critical";
|
|
9281
|
-
})(exports.TaskPriority || (exports.TaskPriority = {}));
|
|
9282
|
-
exports.TaskStatus = void 0;
|
|
9283
|
-
(function (TaskStatus) {
|
|
9284
|
-
TaskStatus["Unassigned"] = "Unassigned";
|
|
9285
|
-
TaskStatus["Pending"] = "Pending";
|
|
9286
|
-
TaskStatus["Completed"] = "Completed";
|
|
9287
|
-
})(exports.TaskStatus || (exports.TaskStatus = {}));
|
|
9288
|
-
exports.TaskSlaCriteria = void 0;
|
|
9289
|
-
(function (TaskSlaCriteria) {
|
|
9290
|
-
TaskSlaCriteria["TaskCreated"] = "TaskCreated";
|
|
9291
|
-
TaskSlaCriteria["TaskAssigned"] = "TaskAssigned";
|
|
9292
|
-
TaskSlaCriteria["TaskCompleted"] = "TaskCompleted";
|
|
9293
|
-
})(exports.TaskSlaCriteria || (exports.TaskSlaCriteria = {}));
|
|
9294
|
-
exports.TaskSlaStatus = void 0;
|
|
9295
|
-
(function (TaskSlaStatus) {
|
|
9296
|
-
TaskSlaStatus["OverdueLater"] = "OverdueLater";
|
|
9297
|
-
TaskSlaStatus["OverdueSoon"] = "OverdueSoon";
|
|
9298
|
-
TaskSlaStatus["Overdue"] = "Overdue";
|
|
9299
|
-
TaskSlaStatus["CompletedInTime"] = "CompletedInTime";
|
|
9300
|
-
})(exports.TaskSlaStatus || (exports.TaskSlaStatus = {}));
|
|
9301
|
-
exports.TaskSourceName = void 0;
|
|
9302
|
-
(function (TaskSourceName) {
|
|
9303
|
-
TaskSourceName["Agent"] = "Agent";
|
|
9304
|
-
TaskSourceName["Workflow"] = "Workflow";
|
|
9305
|
-
TaskSourceName["Maestro"] = "Maestro";
|
|
9306
|
-
TaskSourceName["Default"] = "Default";
|
|
9307
|
-
})(exports.TaskSourceName || (exports.TaskSourceName = {}));
|
|
9308
9418
|
/**
|
|
9309
|
-
*
|
|
9419
|
+
* Maps numeric TaskStatus values (from API) to TaskStatus enum values.
|
|
9420
|
+
* Extend this file with additional field mappings as needed.
|
|
9310
9421
|
*/
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9422
|
+
const TaskStatusMap = {
|
|
9423
|
+
0: exports.TaskStatus.Unassigned,
|
|
9424
|
+
1: exports.TaskStatus.Pending,
|
|
9425
|
+
2: exports.TaskStatus.Completed,
|
|
9426
|
+
};
|
|
9427
|
+
// Field mapping for time-related fields to ensure consistent naming
|
|
9428
|
+
const TaskMap = {
|
|
9429
|
+
completionTime: 'completedTime',
|
|
9430
|
+
deletionTime: 'deletedTime',
|
|
9431
|
+
lastModificationTime: 'lastModifiedTime',
|
|
9432
|
+
creationTime: 'createdTime',
|
|
9433
|
+
organizationUnitId: 'folderId'
|
|
9434
|
+
};
|
|
9435
|
+
/**
|
|
9436
|
+
* Default expand parameters
|
|
9437
|
+
*/
|
|
9438
|
+
const DEFAULT_TASK_EXPAND = 'AssignedToUser,CreatorUser,LastModifierUser';
|
|
9326
9439
|
|
|
9327
9440
|
/**
|
|
9328
9441
|
* Creates methods for a task
|
|
@@ -9381,28 +9494,6 @@ function createTaskWithMethods(taskData, service) {
|
|
|
9381
9494
|
return Object.assign({}, taskData, methods);
|
|
9382
9495
|
}
|
|
9383
9496
|
|
|
9384
|
-
/**
|
|
9385
|
-
* Maps numeric TaskStatus values (from API) to TaskStatus enum values.
|
|
9386
|
-
* Extend this file with additional field mappings as needed.
|
|
9387
|
-
*/
|
|
9388
|
-
const TaskStatusMap = {
|
|
9389
|
-
0: exports.TaskStatus.Unassigned,
|
|
9390
|
-
1: exports.TaskStatus.Pending,
|
|
9391
|
-
2: exports.TaskStatus.Completed,
|
|
9392
|
-
};
|
|
9393
|
-
// Field mapping for time-related fields to ensure consistent naming
|
|
9394
|
-
const TaskMap = {
|
|
9395
|
-
completionTime: 'completedTime',
|
|
9396
|
-
deletionTime: 'deletedTime',
|
|
9397
|
-
lastModificationTime: 'lastModifiedTime',
|
|
9398
|
-
creationTime: 'createdTime',
|
|
9399
|
-
organizationUnitId: 'folderId'
|
|
9400
|
-
};
|
|
9401
|
-
/**
|
|
9402
|
-
* Default expand parameters
|
|
9403
|
-
*/
|
|
9404
|
-
const DEFAULT_TASK_EXPAND = 'AssignedToUser,CreatorUser,LastModifierUser';
|
|
9405
|
-
|
|
9406
9497
|
/**
|
|
9407
9498
|
* Service for interacting with UiPath Tasks API
|
|
9408
9499
|
*/
|
|
@@ -9597,29 +9688,38 @@ class TaskService extends BaseService {
|
|
|
9597
9688
|
}
|
|
9598
9689
|
/**
|
|
9599
9690
|
* Gets a task by ID
|
|
9600
|
-
* IMPORTANT: For form tasks, folderId must be provided.
|
|
9601
|
-
*
|
|
9602
9691
|
* @param id - The ID of the task to retrieve
|
|
9603
|
-
* @param options - Optional query parameters
|
|
9604
|
-
* @param folderId - Optional folder ID (REQUIRED
|
|
9605
|
-
* @returns Promise resolving to the task
|
|
9606
|
-
*
|
|
9692
|
+
* @param options - Optional query parameters including taskType for faster retrieval {@link TaskGetByIdOptions}
|
|
9693
|
+
* @param folderId - Optional folder ID (REQUIRED when options.taskType is provided)
|
|
9694
|
+
* @returns Promise resolving to the task
|
|
9695
|
+
* {@link TaskGetResponse}
|
|
9607
9696
|
* @example
|
|
9608
9697
|
* ```typescript
|
|
9609
|
-
*
|
|
9698
|
+
* // Get a task by ID
|
|
9699
|
+
* const task = await tasks.getById(<taskId>);
|
|
9610
9700
|
*
|
|
9611
|
-
*
|
|
9701
|
+
* // Get a form task by ID
|
|
9702
|
+
* const formTask = await tasks.getById(<taskId>, {}, <folderId>);
|
|
9612
9703
|
*
|
|
9613
|
-
* //
|
|
9614
|
-
*
|
|
9704
|
+
* // Access form task properties
|
|
9705
|
+
* console.log(formTask.formLayout);
|
|
9615
9706
|
*
|
|
9616
|
-
* //
|
|
9707
|
+
* // Get a document validation task by ID (faster with taskType provided in the options)
|
|
9708
|
+
* const dvTask = await tasks.getById(<taskId>, { taskType: TaskType.DocumentValidation }, <folderId>);
|
|
9617
9709
|
* ```
|
|
9618
9710
|
*/
|
|
9619
9711
|
async getById(id, options = {}, folderId) {
|
|
9712
|
+
const { taskType, ...restOptions } = options;
|
|
9713
|
+
// If taskType is provided, skip the generic GET_BY_ID call and go directly to the type-specific endpoint
|
|
9714
|
+
if (taskType && taskType in TASK_TYPE_ENDPOINTS) {
|
|
9715
|
+
if (!folderId) {
|
|
9716
|
+
throw new ValidationError({ message: 'folderId is required when taskType is provided' });
|
|
9717
|
+
}
|
|
9718
|
+
return this.getByTaskType(id, folderId, taskType, restOptions);
|
|
9719
|
+
}
|
|
9620
9720
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
9621
9721
|
// Add default expand parameters
|
|
9622
|
-
const modifiedOptions = this.addDefaultExpand(
|
|
9722
|
+
const modifiedOptions = this.addDefaultExpand(restOptions);
|
|
9623
9723
|
// prefix all keys in options
|
|
9624
9724
|
const keysToPrefix = Object.keys(modifiedOptions);
|
|
9625
9725
|
const apiOptions = addPrefixToKeys(modifiedOptions, ODATA_PREFIX, keysToPrefix);
|
|
@@ -9629,10 +9729,10 @@ class TaskService extends BaseService {
|
|
|
9629
9729
|
});
|
|
9630
9730
|
// Transform response from PascalCase to camelCase and normalize time fields
|
|
9631
9731
|
const transformedTask = transformData(pascalToCamelCaseKeys(response.data), TaskMap);
|
|
9632
|
-
//
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
return this.
|
|
9732
|
+
// Get task type from response and fetch type-specific data
|
|
9733
|
+
const resolvedFolderId = folderId || transformedTask.folderId;
|
|
9734
|
+
if (transformedTask.type in TASK_TYPE_ENDPOINTS) {
|
|
9735
|
+
return this.getByTaskType(id, resolvedFolderId, transformedTask.type, restOptions);
|
|
9636
9736
|
}
|
|
9637
9737
|
return createTaskWithMethods(applyDataTransforms(transformedTask, { field: 'status', valueMap: TaskStatusMap }), this);
|
|
9638
9738
|
}
|
|
@@ -9821,24 +9921,33 @@ class TaskService extends BaseService {
|
|
|
9821
9921
|
};
|
|
9822
9922
|
}
|
|
9823
9923
|
/**
|
|
9824
|
-
*
|
|
9924
|
+
* Routes to the type-specific endpoint based on task type.
|
|
9925
|
+
*/
|
|
9926
|
+
getByTaskType(id, folderId, taskType, options = {}) {
|
|
9927
|
+
const endpoint = TASK_TYPE_ENDPOINTS[taskType];
|
|
9928
|
+
const extraParams = taskType === exports.TaskType.Form ? { expandOnFormLayout: true, ...options } : options;
|
|
9929
|
+
return this.getTaskByTypeEndpoint(id, folderId, endpoint, extraParams);
|
|
9930
|
+
}
|
|
9931
|
+
/**
|
|
9932
|
+
* Fetches a task from a type-specific endpoint.
|
|
9825
9933
|
*
|
|
9826
|
-
* @param id - The
|
|
9934
|
+
* @param id - The task ID
|
|
9827
9935
|
* @param folderId - Required folder ID
|
|
9828
|
-
* @param
|
|
9829
|
-
* @
|
|
9936
|
+
* @param endpoint - The type-specific endpoint to call
|
|
9937
|
+
* @param extraParams - Additional query parameters (e.g. form options)
|
|
9938
|
+
* @returns Promise resolving to the task
|
|
9830
9939
|
*/
|
|
9831
|
-
async
|
|
9940
|
+
async getTaskByTypeEndpoint(id, folderId, endpoint, extraParams = {}) {
|
|
9832
9941
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
9833
|
-
const response = await this.get(
|
|
9942
|
+
const response = await this.get(endpoint, {
|
|
9834
9943
|
params: {
|
|
9835
9944
|
taskId: id,
|
|
9836
|
-
...
|
|
9945
|
+
...extraParams
|
|
9837
9946
|
},
|
|
9838
9947
|
headers
|
|
9839
9948
|
});
|
|
9840
|
-
const
|
|
9841
|
-
return createTaskWithMethods(applyDataTransforms(
|
|
9949
|
+
const transformedTask = transformData(response.data, TaskMap);
|
|
9950
|
+
return createTaskWithMethods(applyDataTransforms(transformedTask, { field: 'status', valueMap: TaskStatusMap }), this);
|
|
9842
9951
|
}
|
|
9843
9952
|
/**
|
|
9844
9953
|
* Adds default expand parameters to options
|
|
@@ -10853,6 +10962,106 @@ exports.BucketOptions = void 0;
|
|
|
10853
10962
|
BucketOptions["AccessDataThroughOrchestrator"] = "AccessDataThroughOrchestrator";
|
|
10854
10963
|
})(exports.BucketOptions || (exports.BucketOptions = {}));
|
|
10855
10964
|
|
|
10965
|
+
/**
|
|
10966
|
+
* Maps fields for Job entities to ensure consistent naming
|
|
10967
|
+
* Semantic renames only — case conversion handled by pascalToCamelCaseKeys()
|
|
10968
|
+
*/
|
|
10969
|
+
const JobMap = {
|
|
10970
|
+
creationTime: 'createdTime',
|
|
10971
|
+
lastModificationTime: 'lastModifiedTime',
|
|
10972
|
+
organizationUnitId: 'folderId',
|
|
10973
|
+
organizationUnitFullyQualifiedName: 'folderName',
|
|
10974
|
+
releaseName: 'processName',
|
|
10975
|
+
releaseVersionId: 'processVersionId',
|
|
10976
|
+
processType: 'packageType',
|
|
10977
|
+
release: 'process',
|
|
10978
|
+
};
|
|
10979
|
+
|
|
10980
|
+
/**
|
|
10981
|
+
* Service for interacting with UiPath Orchestrator Jobs API
|
|
10982
|
+
*/
|
|
10983
|
+
class JobService extends FolderScopedService {
|
|
10984
|
+
/**
|
|
10985
|
+
* Gets all jobs across folders with optional filtering
|
|
10986
|
+
*
|
|
10987
|
+
* @param options - Query options including optional folderId and pagination options
|
|
10988
|
+
* @returns Promise resolving to array of jobs or paginated response
|
|
10989
|
+
*
|
|
10990
|
+
* @example
|
|
10991
|
+
* ```typescript
|
|
10992
|
+
* import { Jobs } from '@uipath/uipath-typescript/jobs';
|
|
10993
|
+
*
|
|
10994
|
+
* const jobs = new Jobs(sdk);
|
|
10995
|
+
*
|
|
10996
|
+
* // Get all jobs
|
|
10997
|
+
* const allJobs = await jobs.getAll();
|
|
10998
|
+
*
|
|
10999
|
+
* // Get all jobs in a specific folder
|
|
11000
|
+
* const folderJobs = await jobs.getAll({ folderId: 123 });
|
|
11001
|
+
*
|
|
11002
|
+
* // With filtering
|
|
11003
|
+
* const runningJobs = await jobs.getAll({
|
|
11004
|
+
* filter: "state eq 'Running'"
|
|
11005
|
+
* });
|
|
11006
|
+
*
|
|
11007
|
+
* // First page with pagination
|
|
11008
|
+
* const page1 = await jobs.getAll({ pageSize: 10 });
|
|
11009
|
+
*
|
|
11010
|
+
* // Navigate using cursor
|
|
11011
|
+
* if (page1.hasNextPage) {
|
|
11012
|
+
* const page2 = await jobs.getAll({ cursor: page1.nextCursor });
|
|
11013
|
+
* }
|
|
11014
|
+
* ```
|
|
11015
|
+
*/
|
|
11016
|
+
async getAll(options) {
|
|
11017
|
+
const transformJobResponse = (job) => transformData(pascalToCamelCaseKeys(job), JobMap);
|
|
11018
|
+
return PaginationHelpers.getAll({
|
|
11019
|
+
serviceAccess: this.createPaginationServiceAccess(),
|
|
11020
|
+
getEndpoint: () => JOB_ENDPOINTS.GET_ALL,
|
|
11021
|
+
getByFolderEndpoint: JOB_ENDPOINTS.GET_ALL,
|
|
11022
|
+
transformFn: transformJobResponse,
|
|
11023
|
+
pagination: {
|
|
11024
|
+
paginationType: PaginationType.OFFSET,
|
|
11025
|
+
itemsField: ODATA_PAGINATION.ITEMS_FIELD,
|
|
11026
|
+
totalCountField: ODATA_PAGINATION.TOTAL_COUNT_FIELD,
|
|
11027
|
+
paginationParams: {
|
|
11028
|
+
pageSizeParam: ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM,
|
|
11029
|
+
offsetParam: ODATA_OFFSET_PARAMS.OFFSET_PARAM,
|
|
11030
|
+
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM,
|
|
11031
|
+
},
|
|
11032
|
+
},
|
|
11033
|
+
}, options);
|
|
11034
|
+
}
|
|
11035
|
+
}
|
|
11036
|
+
__decorate([
|
|
11037
|
+
track('Jobs.GetAll')
|
|
11038
|
+
], JobService.prototype, "getAll", null);
|
|
11039
|
+
|
|
11040
|
+
/**
|
|
11041
|
+
* Enum for job sub-state
|
|
11042
|
+
*/
|
|
11043
|
+
exports.JobSubState = void 0;
|
|
11044
|
+
(function (JobSubState) {
|
|
11045
|
+
JobSubState["WithFaults"] = "WITH_FAULTS";
|
|
11046
|
+
JobSubState["Manually"] = "MANUALLY";
|
|
11047
|
+
})(exports.JobSubState || (exports.JobSubState = {}));
|
|
11048
|
+
/**
|
|
11049
|
+
* Enum for serverless job type
|
|
11050
|
+
*/
|
|
11051
|
+
exports.ServerlessJobType = void 0;
|
|
11052
|
+
(function (ServerlessJobType) {
|
|
11053
|
+
ServerlessJobType["RobotJob"] = "RobotJob";
|
|
11054
|
+
ServerlessJobType["WebApp"] = "WebApp";
|
|
11055
|
+
ServerlessJobType["LoadTest"] = "LoadTest";
|
|
11056
|
+
ServerlessJobType["StudioWebDesigner"] = "StudioWebDesigner";
|
|
11057
|
+
ServerlessJobType["PublishStudioProject"] = "PublishStudioProject";
|
|
11058
|
+
ServerlessJobType["JsApi"] = "JsApi";
|
|
11059
|
+
ServerlessJobType["PythonCodedAgent"] = "PythonCodedAgent";
|
|
11060
|
+
ServerlessJobType["MCPServer"] = "MCPServer";
|
|
11061
|
+
ServerlessJobType["PythonCodedSystemAgent"] = "PythonCodedSystemAgent";
|
|
11062
|
+
ServerlessJobType["PythonAgent"] = "PythonAgent";
|
|
11063
|
+
})(exports.ServerlessJobType || (exports.ServerlessJobType = {}));
|
|
11064
|
+
|
|
10856
11065
|
/**
|
|
10857
11066
|
* Maps fields for Process entities to ensure consistent naming
|
|
10858
11067
|
*/
|
|
@@ -11035,6 +11244,9 @@ exports.PackageType = void 0;
|
|
|
11035
11244
|
PackageType["Api"] = "Api";
|
|
11036
11245
|
PackageType["MCPServer"] = "MCPServer";
|
|
11037
11246
|
PackageType["BusinessRules"] = "BusinessRules";
|
|
11247
|
+
PackageType["CaseManagement"] = "CaseManagement";
|
|
11248
|
+
PackageType["Flow"] = "Flow";
|
|
11249
|
+
PackageType["Function"] = "Function";
|
|
11038
11250
|
})(exports.PackageType || (exports.PackageType = {}));
|
|
11039
11251
|
/**
|
|
11040
11252
|
* Enum for job priority
|
|
@@ -11113,6 +11325,36 @@ exports.PackageSourceType = void 0;
|
|
|
11113
11325
|
PackageSourceType["AgentHub"] = "AgentHub";
|
|
11114
11326
|
PackageSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
11115
11327
|
})(exports.PackageSourceType || (exports.PackageSourceType = {}));
|
|
11328
|
+
/**
|
|
11329
|
+
* Enum for job source type
|
|
11330
|
+
*/
|
|
11331
|
+
exports.JobSourceType = void 0;
|
|
11332
|
+
(function (JobSourceType) {
|
|
11333
|
+
JobSourceType["Manual"] = "Manual";
|
|
11334
|
+
JobSourceType["Schedule"] = "Schedule";
|
|
11335
|
+
JobSourceType["Agent"] = "Agent";
|
|
11336
|
+
JobSourceType["Queue"] = "Queue";
|
|
11337
|
+
JobSourceType["StudioWeb"] = "StudioWeb";
|
|
11338
|
+
JobSourceType["IntegrationTrigger"] = "IntegrationTrigger";
|
|
11339
|
+
JobSourceType["StudioDesktop"] = "StudioDesktop";
|
|
11340
|
+
JobSourceType["AutomationOpsPipelines"] = "AutomationOpsPipelines";
|
|
11341
|
+
JobSourceType["Apps"] = "Apps";
|
|
11342
|
+
JobSourceType["SAP"] = "SAP";
|
|
11343
|
+
JobSourceType["HttpTrigger"] = "HttpTrigger";
|
|
11344
|
+
JobSourceType["HttpTriggerCallback"] = "HttpTriggerCallback";
|
|
11345
|
+
JobSourceType["RobotAPI"] = "RobotAPI";
|
|
11346
|
+
JobSourceType["CommandLine"] = "CommandLine";
|
|
11347
|
+
JobSourceType["RobotNetAPI"] = "RobotNetAPI";
|
|
11348
|
+
JobSourceType["Autopilot"] = "Autopilot";
|
|
11349
|
+
JobSourceType["TestManager"] = "TestManager";
|
|
11350
|
+
JobSourceType["AgentService"] = "AgentService";
|
|
11351
|
+
JobSourceType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11352
|
+
JobSourceType["PluginEcosystem"] = "PluginEcosystem";
|
|
11353
|
+
JobSourceType["PerformanceTesting"] = "PerformanceTesting";
|
|
11354
|
+
JobSourceType["AgentHub"] = "AgentHub";
|
|
11355
|
+
JobSourceType["ApiWorkflow"] = "ApiWorkflow";
|
|
11356
|
+
JobSourceType["CaseManagement"] = "CaseManagement";
|
|
11357
|
+
})(exports.JobSourceType || (exports.JobSourceType = {}));
|
|
11116
11358
|
/**
|
|
11117
11359
|
* Enum for stop strategy
|
|
11118
11360
|
*/
|
|
@@ -11121,6 +11363,39 @@ exports.StopStrategy = void 0;
|
|
|
11121
11363
|
StopStrategy["SoftStop"] = "SoftStop";
|
|
11122
11364
|
StopStrategy["Kill"] = "Kill";
|
|
11123
11365
|
})(exports.StopStrategy || (exports.StopStrategy = {}));
|
|
11366
|
+
/**
|
|
11367
|
+
* Enum for runtime type
|
|
11368
|
+
*/
|
|
11369
|
+
exports.RuntimeType = void 0;
|
|
11370
|
+
(function (RuntimeType) {
|
|
11371
|
+
RuntimeType["NonProduction"] = "NonProduction";
|
|
11372
|
+
RuntimeType["Attended"] = "Attended";
|
|
11373
|
+
RuntimeType["Unattended"] = "Unattended";
|
|
11374
|
+
RuntimeType["Development"] = "Development";
|
|
11375
|
+
RuntimeType["Studio"] = "Studio";
|
|
11376
|
+
RuntimeType["RpaDeveloper"] = "RpaDeveloper";
|
|
11377
|
+
RuntimeType["StudioX"] = "StudioX";
|
|
11378
|
+
RuntimeType["CitizenDeveloper"] = "CitizenDeveloper";
|
|
11379
|
+
RuntimeType["Headless"] = "Headless";
|
|
11380
|
+
RuntimeType["StudioPro"] = "StudioPro";
|
|
11381
|
+
RuntimeType["RpaDeveloperPro"] = "RpaDeveloperPro";
|
|
11382
|
+
RuntimeType["TestAutomation"] = "TestAutomation";
|
|
11383
|
+
RuntimeType["AutomationCloud"] = "AutomationCloud";
|
|
11384
|
+
RuntimeType["Serverless"] = "Serverless";
|
|
11385
|
+
RuntimeType["AutomationKit"] = "AutomationKit";
|
|
11386
|
+
RuntimeType["ServerlessTestAutomation"] = "ServerlessTestAutomation";
|
|
11387
|
+
RuntimeType["AutomationCloudTestAutomation"] = "AutomationCloudTestAutomation";
|
|
11388
|
+
RuntimeType["AttendedStudioWeb"] = "AttendedStudioWeb";
|
|
11389
|
+
RuntimeType["Hosting"] = "Hosting";
|
|
11390
|
+
RuntimeType["AssistantWeb"] = "AssistantWeb";
|
|
11391
|
+
RuntimeType["ProcessOrchestration"] = "ProcessOrchestration";
|
|
11392
|
+
RuntimeType["AgentService"] = "AgentService";
|
|
11393
|
+
RuntimeType["AppTest"] = "AppTest";
|
|
11394
|
+
RuntimeType["PerformanceTest"] = "PerformanceTest";
|
|
11395
|
+
RuntimeType["BusinessRule"] = "BusinessRule";
|
|
11396
|
+
RuntimeType["CaseManagement"] = "CaseManagement";
|
|
11397
|
+
RuntimeType["Flow"] = "Flow";
|
|
11398
|
+
})(exports.RuntimeType || (exports.RuntimeType = {}));
|
|
11124
11399
|
/**
|
|
11125
11400
|
* Enum for job type
|
|
11126
11401
|
*/
|
|
@@ -11243,6 +11518,49 @@ __decorate([
|
|
|
11243
11518
|
track('Queues.GetById')
|
|
11244
11519
|
], QueueService.prototype, "getById", null);
|
|
11245
11520
|
|
|
11521
|
+
/**
|
|
11522
|
+
* Maps fields for Attachment entities to ensure consistent naming
|
|
11523
|
+
*/
|
|
11524
|
+
const AttachmentsMap = {
|
|
11525
|
+
creationTime: 'createdTime',
|
|
11526
|
+
lastModificationTime: 'lastModifiedTime'
|
|
11527
|
+
};
|
|
11528
|
+
|
|
11529
|
+
class AttachmentService extends BaseService {
|
|
11530
|
+
/**
|
|
11531
|
+
* Gets an attachment by ID
|
|
11532
|
+
* @param id - The UUID of the attachment to retrieve
|
|
11533
|
+
* @param options - Optional query parameters (expand, select)
|
|
11534
|
+
* @returns Promise resolving to the attachment
|
|
11535
|
+
*
|
|
11536
|
+
* @example
|
|
11537
|
+
* ```typescript
|
|
11538
|
+
* import { Attachments } from '@uipath/uipath-typescript/attachments';
|
|
11539
|
+
*
|
|
11540
|
+
* const attachments = new Attachments(sdk);
|
|
11541
|
+
* const attachment = await attachments.getById('12345678-1234-1234-1234-123456789abc');
|
|
11542
|
+
* ```
|
|
11543
|
+
*/
|
|
11544
|
+
async getById(id, options = {}) {
|
|
11545
|
+
if (!id) {
|
|
11546
|
+
throw new ValidationError({ message: 'id is required for getById' });
|
|
11547
|
+
}
|
|
11548
|
+
// Prefix all keys in options with $ for OData
|
|
11549
|
+
const keysToPrefix = Object.keys(options);
|
|
11550
|
+
const apiOptions = addPrefixToKeys(options, ODATA_PREFIX, keysToPrefix);
|
|
11551
|
+
const response = await this.get(ORCHESTRATOR_ATTACHMENT_ENDPOINTS.GET_BY_ID(id), {
|
|
11552
|
+
params: apiOptions,
|
|
11553
|
+
});
|
|
11554
|
+
// Transform response from PascalCase to camelCase, then apply field maps
|
|
11555
|
+
const camelCased = pascalToCamelCaseKeys(response.data);
|
|
11556
|
+
camelCased.blobFileAccess = transformData(camelCased.blobFileAccess, BucketMap);
|
|
11557
|
+
return transformData(camelCased, AttachmentsMap);
|
|
11558
|
+
}
|
|
11559
|
+
}
|
|
11560
|
+
__decorate([
|
|
11561
|
+
track('Attachments.GetById')
|
|
11562
|
+
], AttachmentService.prototype, "getById", null);
|
|
11563
|
+
|
|
11246
11564
|
/**
|
|
11247
11565
|
* UiPath SDK - Legacy class providing all services through property getters.
|
|
11248
11566
|
*
|