@uipath/uipath-typescript 1.0.0-beta.14 → 1.0.0-beta.16
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/README.md +201 -132
- package/dist/{index.js → index.cjs} +540 -273
- package/dist/index.d.cts +5092 -0
- package/dist/index.d.mts +5092 -0
- package/dist/index.d.ts +548 -166
- package/dist/{index.esm.js → index.mjs} +540 -255
- package/dist/index.umd.js +17791 -0
- package/package.json +28 -24
package/dist/index.d.ts
CHANGED
|
@@ -925,31 +925,6 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
925
925
|
* ```
|
|
926
926
|
*/
|
|
927
927
|
getById(id: string): Promise<EntityGetResponse>;
|
|
928
|
-
/**
|
|
929
|
-
* Orchestrates all field mapping transformations
|
|
930
|
-
*
|
|
931
|
-
* @param metadata - Entity metadata to transform
|
|
932
|
-
* @private
|
|
933
|
-
*/
|
|
934
|
-
private applyFieldMappings;
|
|
935
|
-
/**
|
|
936
|
-
* Maps SQL field types to friendly EntityFieldTypes
|
|
937
|
-
*
|
|
938
|
-
* @param metadata - Entity metadata with fields
|
|
939
|
-
* @private
|
|
940
|
-
*/
|
|
941
|
-
private mapFieldTypes;
|
|
942
|
-
/**
|
|
943
|
-
* Transforms nested reference objects in field metadata
|
|
944
|
-
*/
|
|
945
|
-
private transformNestedReferences;
|
|
946
|
-
/**
|
|
947
|
-
* Maps external field names to consistent naming
|
|
948
|
-
*
|
|
949
|
-
* @param metadata - Entity metadata with externalFields
|
|
950
|
-
* @private
|
|
951
|
-
*/
|
|
952
|
-
private mapExternalFields;
|
|
953
928
|
/**
|
|
954
929
|
* Gets entity records by entity ID
|
|
955
930
|
*
|
|
@@ -1068,6 +1043,31 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1068
1043
|
* ```
|
|
1069
1044
|
*/
|
|
1070
1045
|
getAll(): Promise<EntityGetResponse[]>;
|
|
1046
|
+
/**
|
|
1047
|
+
* Orchestrates all field mapping transformations
|
|
1048
|
+
*
|
|
1049
|
+
* @param metadata - Entity metadata to transform
|
|
1050
|
+
* @private
|
|
1051
|
+
*/
|
|
1052
|
+
private applyFieldMappings;
|
|
1053
|
+
/**
|
|
1054
|
+
* Maps SQL field types to friendly EntityFieldTypes
|
|
1055
|
+
*
|
|
1056
|
+
* @param metadata - Entity metadata with fields
|
|
1057
|
+
* @private
|
|
1058
|
+
*/
|
|
1059
|
+
private mapFieldTypes;
|
|
1060
|
+
/**
|
|
1061
|
+
* Transforms nested reference objects in field metadata
|
|
1062
|
+
*/
|
|
1063
|
+
private transformNestedReferences;
|
|
1064
|
+
/**
|
|
1065
|
+
* Maps external field names to consistent naming
|
|
1066
|
+
*
|
|
1067
|
+
* @param metadata - Entity metadata with externalFields
|
|
1068
|
+
* @private
|
|
1069
|
+
*/
|
|
1070
|
+
private mapExternalFields;
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
/**
|
|
@@ -1077,7 +1077,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1077
1077
|
/**
|
|
1078
1078
|
* Process information with instance statistics
|
|
1079
1079
|
*/
|
|
1080
|
-
interface
|
|
1080
|
+
interface RawMaestroProcessGetAllResponse {
|
|
1081
1081
|
/** Unique key identifying the process */
|
|
1082
1082
|
processKey: string;
|
|
1083
1083
|
/** Package identifier */
|
|
@@ -1114,6 +1114,68 @@ interface MaestroProcessGetAllResponse {
|
|
|
1114
1114
|
cancelingCount: number;
|
|
1115
1115
|
}
|
|
1116
1116
|
|
|
1117
|
+
/**
|
|
1118
|
+
* Process Incident Status
|
|
1119
|
+
*/
|
|
1120
|
+
declare enum ProcessIncidentStatus {
|
|
1121
|
+
Open = "Open",
|
|
1122
|
+
Closed = "Closed"
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Process Incident Type
|
|
1126
|
+
*/
|
|
1127
|
+
declare enum ProcessIncidentType {
|
|
1128
|
+
System = "System",
|
|
1129
|
+
User = "User",
|
|
1130
|
+
Deployment = "Deployment"
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Process Incident Severity
|
|
1134
|
+
*/
|
|
1135
|
+
declare enum ProcessIncidentSeverity {
|
|
1136
|
+
Error = "Error",
|
|
1137
|
+
Warning = "Warning"
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Process Incident Debug Mode
|
|
1141
|
+
*/
|
|
1142
|
+
declare enum DebugMode {
|
|
1143
|
+
None = "None",
|
|
1144
|
+
Default = "Default",
|
|
1145
|
+
StepByStep = "StepByStep",
|
|
1146
|
+
SingleStep = "SingleStep"
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Process Incident Get Response
|
|
1150
|
+
*/
|
|
1151
|
+
interface ProcessIncidentGetResponse {
|
|
1152
|
+
instanceId: string;
|
|
1153
|
+
elementId: string;
|
|
1154
|
+
folderKey: string;
|
|
1155
|
+
processKey: string;
|
|
1156
|
+
incidentId: string;
|
|
1157
|
+
incidentStatus: ProcessIncidentStatus;
|
|
1158
|
+
incidentType: ProcessIncidentType | null;
|
|
1159
|
+
errorCode: string;
|
|
1160
|
+
errorMessage: string;
|
|
1161
|
+
errorTime: string;
|
|
1162
|
+
errorDetails: string;
|
|
1163
|
+
debugMode: DebugMode;
|
|
1164
|
+
incidentSeverity: ProcessIncidentSeverity | null;
|
|
1165
|
+
incidentElementActivityType: string;
|
|
1166
|
+
incidentElementActivityName: string;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Process Incident Summary Get Response
|
|
1170
|
+
*/
|
|
1171
|
+
interface ProcessIncidentGetAllResponse {
|
|
1172
|
+
count: number;
|
|
1173
|
+
errorMessage: string;
|
|
1174
|
+
errorCode: string;
|
|
1175
|
+
firstOccuranceTime: string;
|
|
1176
|
+
processKey: string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1117
1179
|
/**
|
|
1118
1180
|
* Maestro Process Models
|
|
1119
1181
|
* Model classes for Maestro processes
|
|
@@ -1126,24 +1188,66 @@ interface MaestroProcessGetAllResponse {
|
|
|
1126
1188
|
*/
|
|
1127
1189
|
interface MaestroProcessesServiceModel {
|
|
1128
1190
|
/**
|
|
1129
|
-
* @returns Promise resolving to array of MaestroProcess objects
|
|
1191
|
+
* @returns Promise resolving to array of MaestroProcess objects with methods
|
|
1130
1192
|
* {@link MaestroProcessGetAllResponse}
|
|
1131
1193
|
* @example
|
|
1132
1194
|
* ```typescript
|
|
1133
1195
|
* // Get all processes
|
|
1134
1196
|
* const processes = await sdk.maestro.processes.getAll();
|
|
1135
1197
|
*
|
|
1136
|
-
* // Access process information
|
|
1198
|
+
* // Access process information and incidents
|
|
1137
1199
|
* for (const process of processes) {
|
|
1138
1200
|
* console.log(`Process: ${process.processKey}`);
|
|
1139
1201
|
* console.log(`Running instances: ${process.runningCount}`);
|
|
1140
1202
|
* console.log(`Faulted instances: ${process.faultedCount}`);
|
|
1203
|
+
*
|
|
1204
|
+
* // Get incidents for this process
|
|
1205
|
+
* const incidents = await process.getIncidents();
|
|
1206
|
+
* console.log(`Incidents: ${incidents.length}`);
|
|
1141
1207
|
* }
|
|
1142
1208
|
*
|
|
1143
1209
|
* ```
|
|
1144
1210
|
*/
|
|
1145
1211
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Get incidents for a specific process
|
|
1214
|
+
*
|
|
1215
|
+
* @param processKey The key of the process to get incidents for
|
|
1216
|
+
* @param folderKey The folder key for authorization
|
|
1217
|
+
* @returns Promise resolving to array of incidents for the process
|
|
1218
|
+
* {@link ProcessIncidentGetResponse}
|
|
1219
|
+
* @example
|
|
1220
|
+
* ```typescript
|
|
1221
|
+
* // Get incidents for a specific process
|
|
1222
|
+
* const incidents = await sdk.maestro.processes.getIncidents('<processKey>', '<folderKey>');
|
|
1223
|
+
*
|
|
1224
|
+
* // Access incident details
|
|
1225
|
+
* for (const incident of incidents) {
|
|
1226
|
+
* console.log(`Element: ${incident.incidentElementActivityName} (${incident.incidentElementActivityType})`);
|
|
1227
|
+
* console.log(`Status: ${incident.incidentStatus}`);
|
|
1228
|
+
* console.log(`Error: ${incident.errorMessage}`);
|
|
1229
|
+
* }
|
|
1230
|
+
* ```
|
|
1231
|
+
*/
|
|
1232
|
+
getIncidents(processKey: string, folderKey: string): Promise<ProcessIncidentGetResponse[]>;
|
|
1233
|
+
}
|
|
1234
|
+
interface ProcessMethods {
|
|
1235
|
+
/**
|
|
1236
|
+
* Gets incidents for this process
|
|
1237
|
+
*
|
|
1238
|
+
* @returns Promise resolving to array of process incidents
|
|
1239
|
+
*/
|
|
1240
|
+
getIncidents(): Promise<ProcessIncidentGetResponse[]>;
|
|
1146
1241
|
}
|
|
1242
|
+
type MaestroProcessGetAllResponse = RawMaestroProcessGetAllResponse & ProcessMethods;
|
|
1243
|
+
/**
|
|
1244
|
+
* Creates an actionable process by combining API process data with operational methods.
|
|
1245
|
+
*
|
|
1246
|
+
* @param processData - The process data from API
|
|
1247
|
+
* @param service - The process service instance
|
|
1248
|
+
* @returns A process object with added methods
|
|
1249
|
+
*/
|
|
1250
|
+
declare function createProcessWithMethods(processData: MaestroProcessGetAllResponse, service: MaestroProcessesServiceModel): MaestroProcessGetAllResponse;
|
|
1147
1251
|
|
|
1148
1252
|
/**
|
|
1149
1253
|
* Constants used throughout the pagination system
|
|
@@ -1453,32 +1557,23 @@ interface ProcessInstancesServiceModel {
|
|
|
1453
1557
|
* <folderKey>
|
|
1454
1558
|
* );
|
|
1455
1559
|
*
|
|
1456
|
-
*
|
|
1457
|
-
* console.log(`Instance ${result.data.instanceId} now has status: ${result.data.status}`);
|
|
1458
|
-
* }
|
|
1560
|
+
* or
|
|
1459
1561
|
*
|
|
1460
|
-
*
|
|
1461
|
-
* const result = await sdk.maestro.processes.instances.cancel(
|
|
1562
|
+
* const instance = await sdk.maestro.processes.instances.getById(
|
|
1462
1563
|
* <instanceId>,
|
|
1463
|
-
* <folderKey
|
|
1464
|
-
* { comment: <comment> }
|
|
1564
|
+
* <folderKey>
|
|
1465
1565
|
* );
|
|
1566
|
+
* const result = await instance.cancel();
|
|
1466
1567
|
*
|
|
1467
|
-
*
|
|
1468
|
-
*
|
|
1469
|
-
*
|
|
1568
|
+
* console.log(`Cancelled: ${result.success}`);
|
|
1569
|
+
*
|
|
1570
|
+
* // Cancel with a comment
|
|
1571
|
+
* const result = await instance.cancel({
|
|
1572
|
+
* comment: 'Cancelling due to invalid input data'
|
|
1470
1573
|
* });
|
|
1471
1574
|
*
|
|
1472
|
-
*
|
|
1473
|
-
*
|
|
1474
|
-
* instance.instanceId,
|
|
1475
|
-
* instance.folderKey,
|
|
1476
|
-
* { comment: <comment> }
|
|
1477
|
-
* );
|
|
1478
|
-
*
|
|
1479
|
-
* if (result.success) {
|
|
1480
|
-
* console.log(`Cancelled instance: ${result.data.instanceId}`);
|
|
1481
|
-
* }
|
|
1575
|
+
* if (result.success) {
|
|
1576
|
+
* console.log(`Instance ${result.data.instanceId} status: ${result.data.status}`);
|
|
1482
1577
|
* }
|
|
1483
1578
|
* ```
|
|
1484
1579
|
*/
|
|
@@ -1535,6 +1630,27 @@ interface ProcessInstancesServiceModel {
|
|
|
1535
1630
|
* ```
|
|
1536
1631
|
*/
|
|
1537
1632
|
getVariables(instanceId: string, folderKey: string, options?: ProcessInstanceGetVariablesOptions): Promise<ProcessInstanceGetVariablesResponse>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Get incidents for a process instance
|
|
1635
|
+
*
|
|
1636
|
+
* @param instanceId The ID of the instance to get incidents for
|
|
1637
|
+
* @param folderKey The folder key for authorization
|
|
1638
|
+
* @returns Promise resolving to array of incidents for the processinstance
|
|
1639
|
+
* {@link ProcessIncidentGetResponse}
|
|
1640
|
+
* @example
|
|
1641
|
+
* ```typescript
|
|
1642
|
+
* // Get incidents for a specific instance
|
|
1643
|
+
* const incidents = await sdk.maestro.processes.instances.getIncidents('<instanceId>', '<folderKey>');
|
|
1644
|
+
*
|
|
1645
|
+
* // Access process incident details
|
|
1646
|
+
* for (const incident of incidents) {
|
|
1647
|
+
* console.log(`Element: ${incident.incidentElementActivityName} (${incident.incidentElementActivityType})`);
|
|
1648
|
+
* console.log(`Severity: ${incident.incidentSeverity}`);
|
|
1649
|
+
* console.log(`Error: ${incident.errorMessage}`);
|
|
1650
|
+
* }
|
|
1651
|
+
* ```
|
|
1652
|
+
*/
|
|
1653
|
+
getIncidents(instanceId: string, folderKey: string): Promise<ProcessIncidentGetResponse[]>;
|
|
1538
1654
|
}
|
|
1539
1655
|
interface ProcessInstanceMethods {
|
|
1540
1656
|
/**
|
|
@@ -1558,6 +1674,31 @@ interface ProcessInstanceMethods {
|
|
|
1558
1674
|
* @returns Promise resolving to operation result
|
|
1559
1675
|
*/
|
|
1560
1676
|
resume(options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Gets incidents for this process instance
|
|
1679
|
+
*
|
|
1680
|
+
* @returns Promise resolving to array of incidents for this instance
|
|
1681
|
+
*/
|
|
1682
|
+
getIncidents(): Promise<ProcessIncidentGetResponse[]>;
|
|
1683
|
+
/**
|
|
1684
|
+
* Gets execution history (spans) for this process instance
|
|
1685
|
+
*
|
|
1686
|
+
* @returns Promise resolving to execution history
|
|
1687
|
+
*/
|
|
1688
|
+
getExecutionHistory(): Promise<ProcessInstanceExecutionHistoryResponse[]>;
|
|
1689
|
+
/**
|
|
1690
|
+
* Gets BPMN XML file for this process instance
|
|
1691
|
+
*
|
|
1692
|
+
* @returns Promise resolving to BPMN XML file
|
|
1693
|
+
*/
|
|
1694
|
+
getBpmn(): Promise<BpmnXmlString>;
|
|
1695
|
+
/**
|
|
1696
|
+
* Gets global variables for this process instance
|
|
1697
|
+
*
|
|
1698
|
+
* @param options - Optional options including parentElementId to filter by parent element
|
|
1699
|
+
* @returns Promise resolving to variables response with elements and globals
|
|
1700
|
+
*/
|
|
1701
|
+
getVariables(options?: ProcessInstanceGetVariablesOptions): Promise<ProcessInstanceGetVariablesResponse>;
|
|
1561
1702
|
}
|
|
1562
1703
|
type ProcessInstanceGetResponse = RawProcessInstanceGetResponse & ProcessInstanceMethods;
|
|
1563
1704
|
/**
|
|
@@ -1569,6 +1710,34 @@ type ProcessInstanceGetResponse = RawProcessInstanceGetResponse & ProcessInstanc
|
|
|
1569
1710
|
*/
|
|
1570
1711
|
declare function createProcessInstanceWithMethods(instanceData: RawProcessInstanceGetResponse, service: ProcessInstancesServiceModel): ProcessInstanceGetResponse;
|
|
1571
1712
|
|
|
1713
|
+
/**
|
|
1714
|
+
* Service for managing UiPath Maestro Process incidents
|
|
1715
|
+
*
|
|
1716
|
+
* Maestro Process incidents helps you identify, investigate, and resolve errors that occur during process execution. [UiPath Maestro Process Incidents Guide](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/all-incidents-view)
|
|
1717
|
+
*/
|
|
1718
|
+
interface ProcessIncidentsServiceModel {
|
|
1719
|
+
/**
|
|
1720
|
+
* Get all process incidents across all folders
|
|
1721
|
+
*
|
|
1722
|
+
* @returns Promise resolving to array of process incident
|
|
1723
|
+
* {@link ProcessIncidentGetAllResponse}
|
|
1724
|
+
* @example
|
|
1725
|
+
* ```typescript
|
|
1726
|
+
* // Get all process incidents across all folders
|
|
1727
|
+
* const incidents = await sdk.maestro.processes.incidents.getAll();
|
|
1728
|
+
*
|
|
1729
|
+
* // Access process incident information
|
|
1730
|
+
* for (const incident of incidents) {
|
|
1731
|
+
* console.log(`Process: ${incident.processKey}`);
|
|
1732
|
+
* console.log(`Error: ${incident.errorMessage}`);
|
|
1733
|
+
* console.log(`Count: ${incident.count}`);
|
|
1734
|
+
* console.log(`First occurrence: ${incident.firstOccuranceTime}`);
|
|
1735
|
+
* }
|
|
1736
|
+
* ```
|
|
1737
|
+
*/
|
|
1738
|
+
getAll(): Promise<ProcessIncidentGetAllResponse[]>;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1572
1741
|
/**
|
|
1573
1742
|
* Maestro Cases Types
|
|
1574
1743
|
* Types and interfaces for Maestro case management
|
|
@@ -1952,7 +2121,7 @@ interface TaskActivity {
|
|
|
1952
2121
|
activityType: TaskActivityType;
|
|
1953
2122
|
creatorUserId: number;
|
|
1954
2123
|
targetUserId: number | null;
|
|
1955
|
-
|
|
2124
|
+
createdTime: string;
|
|
1956
2125
|
}
|
|
1957
2126
|
interface TaskSlaDetail {
|
|
1958
2127
|
expiryTime?: string;
|
|
@@ -1973,24 +2142,23 @@ interface TaskBaseResponse {
|
|
|
1973
2142
|
title: string;
|
|
1974
2143
|
type: TaskType;
|
|
1975
2144
|
priority: TaskPriority;
|
|
1976
|
-
|
|
2145
|
+
folderId: number;
|
|
1977
2146
|
key: string;
|
|
1978
2147
|
isDeleted: boolean;
|
|
1979
|
-
|
|
1980
|
-
creatorUserId: number;
|
|
2148
|
+
createdTime: string;
|
|
1981
2149
|
id: number;
|
|
1982
2150
|
action: string | null;
|
|
1983
|
-
assignedToUserId: number | null;
|
|
1984
2151
|
externalTag: string | null;
|
|
1985
2152
|
lastAssignedTime: string | null;
|
|
1986
|
-
|
|
2153
|
+
completedTime: string | null;
|
|
1987
2154
|
parentOperationId: string | null;
|
|
1988
2155
|
deleterUserId: number | null;
|
|
1989
|
-
|
|
1990
|
-
|
|
2156
|
+
deletedTime: string | null;
|
|
2157
|
+
lastModifiedTime: string | null;
|
|
1991
2158
|
}
|
|
1992
2159
|
interface TaskCreateOptions {
|
|
1993
2160
|
title: string;
|
|
2161
|
+
data?: Record<string, unknown>;
|
|
1994
2162
|
priority?: TaskPriority;
|
|
1995
2163
|
}
|
|
1996
2164
|
interface RawTaskCreateResponse extends TaskBaseResponse {
|
|
@@ -2010,7 +2178,7 @@ interface RawTaskGetResponse extends TaskBaseResponse {
|
|
|
2010
2178
|
taskSlaDetail: TaskSlaDetail | null;
|
|
2011
2179
|
taskAssigneeName: string | null;
|
|
2012
2180
|
lastModifierUserId: number | null;
|
|
2013
|
-
assignedToUser
|
|
2181
|
+
assignedToUser: UserLoginInfo | null;
|
|
2014
2182
|
creatorUser?: UserLoginInfo;
|
|
2015
2183
|
lastModifierUser?: UserLoginInfo;
|
|
2016
2184
|
taskAssignments?: TaskAssignment[];
|
|
@@ -2026,11 +2194,24 @@ interface RawTaskGetResponse extends TaskBaseResponse {
|
|
|
2026
2194
|
processingTime?: number | null;
|
|
2027
2195
|
data?: Record<string, unknown> | null;
|
|
2028
2196
|
}
|
|
2029
|
-
|
|
2030
|
-
|
|
2197
|
+
/**
|
|
2198
|
+
* Options for task assignment operations when called from a task instance
|
|
2199
|
+
* Requires either userId or userNameOrEmail, but not both
|
|
2200
|
+
*/
|
|
2201
|
+
type TaskAssignOptions = {
|
|
2031
2202
|
userId: number;
|
|
2032
|
-
userNameOrEmail?:
|
|
2033
|
-
}
|
|
2203
|
+
userNameOrEmail?: never;
|
|
2204
|
+
} | {
|
|
2205
|
+
userId?: never;
|
|
2206
|
+
userNameOrEmail: string;
|
|
2207
|
+
};
|
|
2208
|
+
/**
|
|
2209
|
+
* Options for task assignment operations when called from the service
|
|
2210
|
+
* Extends TaskAssignOptions with the required taskId field
|
|
2211
|
+
*/
|
|
2212
|
+
type TaskAssignmentOptions = {
|
|
2213
|
+
taskId: number;
|
|
2214
|
+
} & TaskAssignOptions;
|
|
2034
2215
|
interface TasksUnassignOptions {
|
|
2035
2216
|
taskIds: number[];
|
|
2036
2217
|
}
|
|
@@ -2041,22 +2222,6 @@ interface TaskAssignmentResponse {
|
|
|
2041
2222
|
errorMessage?: string;
|
|
2042
2223
|
userNameOrEmail?: string;
|
|
2043
2224
|
}
|
|
2044
|
-
interface TaskCompletionOptions {
|
|
2045
|
-
taskId: number;
|
|
2046
|
-
data?: any;
|
|
2047
|
-
action?: string;
|
|
2048
|
-
}
|
|
2049
|
-
/**
|
|
2050
|
-
* Options for task assignment operations in the Task class
|
|
2051
|
-
* At least one identification parameter is required
|
|
2052
|
-
*/
|
|
2053
|
-
type TaskAssignOptions = {
|
|
2054
|
-
userId: number;
|
|
2055
|
-
userNameOrEmail?: string;
|
|
2056
|
-
} | {
|
|
2057
|
-
userId?: number;
|
|
2058
|
-
userNameOrEmail: string;
|
|
2059
|
-
};
|
|
2060
2225
|
/**
|
|
2061
2226
|
* Options for completing a task
|
|
2062
2227
|
*/
|
|
@@ -2069,6 +2234,13 @@ type TaskCompleteOptions = {
|
|
|
2069
2234
|
data: any;
|
|
2070
2235
|
action: string;
|
|
2071
2236
|
};
|
|
2237
|
+
/**
|
|
2238
|
+
* Options for completing a task when called from the service
|
|
2239
|
+
* Extends TaskCompleteOptions with the required taskId field
|
|
2240
|
+
*/
|
|
2241
|
+
type TaskCompletionOptions = TaskCompleteOptions & {
|
|
2242
|
+
taskId: number;
|
|
2243
|
+
};
|
|
2072
2244
|
/**
|
|
2073
2245
|
* Options for getting tasks across folders
|
|
2074
2246
|
*/
|
|
@@ -2100,16 +2272,188 @@ interface TaskServiceModel {
|
|
|
2100
2272
|
* @param options - Query options including optional folderId and pagination options
|
|
2101
2273
|
* @returns Promise resolving to either an array of tasks NonPaginatedResponse<TaskGetResponse> or a PaginatedResponse<TaskGetResponse> when pagination options are used.
|
|
2102
2274
|
* {@link TaskGetResponse}
|
|
2275
|
+
* @example
|
|
2276
|
+
* ```typescript
|
|
2277
|
+
* // Standard array return
|
|
2278
|
+
* const tasks = await sdk.tasks.getAll();
|
|
2279
|
+
*
|
|
2280
|
+
* // Get tasks within a specific folder
|
|
2281
|
+
* const tasks = await sdk.tasks.getAll({
|
|
2282
|
+
* folderId: 123
|
|
2283
|
+
* });
|
|
2284
|
+
*
|
|
2285
|
+
* // First page with pagination
|
|
2286
|
+
* const page1 = await sdk.tasks.getAll({ pageSize: 10 });
|
|
2287
|
+
*
|
|
2288
|
+
* // Navigate using cursor
|
|
2289
|
+
* if (page1.hasNextPage) {
|
|
2290
|
+
* const page2 = await sdk.tasks.getAll({ cursor: page1.nextCursor });
|
|
2291
|
+
* }
|
|
2292
|
+
*
|
|
2293
|
+
* // Jump to specific page
|
|
2294
|
+
* const page5 = await sdk.tasks.getAll({
|
|
2295
|
+
* jumpToPage: 5,
|
|
2296
|
+
* pageSize: 10
|
|
2297
|
+
* });
|
|
2298
|
+
* ```
|
|
2103
2299
|
*/
|
|
2104
2300
|
getAll<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
2301
|
+
/**
|
|
2302
|
+
* Gets a task by ID
|
|
2303
|
+
* IMPORTANT: For form tasks, folderId must be provided.
|
|
2304
|
+
* @param id - The ID of the task to retrieve
|
|
2305
|
+
* @param options - Optional query parameters
|
|
2306
|
+
* @param folderId - Optional folder ID (REQUIRED for form tasks)
|
|
2307
|
+
* @returns Promise resolving to the task
|
|
2308
|
+
* {@link TaskGetResponse}
|
|
2309
|
+
* @example
|
|
2310
|
+
* ```typescript
|
|
2311
|
+
* // Get a task by ID
|
|
2312
|
+
* const task = await sdk.tasks.getById(<taskId>);
|
|
2313
|
+
*
|
|
2314
|
+
* // Get a form task by ID
|
|
2315
|
+
* const formTask = await sdk.tasks.getById(<taskId>, <folderId>);
|
|
2316
|
+
*
|
|
2317
|
+
* // Access form task properties
|
|
2318
|
+
* console.log(formTask.formLayout);
|
|
2319
|
+
* ```
|
|
2320
|
+
*/
|
|
2105
2321
|
getById(id: number, options?: TaskGetByIdOptions, folderId?: number): Promise<TaskGetResponse>;
|
|
2322
|
+
/**
|
|
2323
|
+
* Creates a new task
|
|
2324
|
+
*
|
|
2325
|
+
* @param options - The task to be created
|
|
2326
|
+
* @param folderId - Required folder ID
|
|
2327
|
+
* @returns Promise resolving to the created task
|
|
2328
|
+
* {@link TaskCreateResponse}
|
|
2329
|
+
* @example
|
|
2330
|
+
* ```typescript
|
|
2331
|
+
* import { TaskPriority } from '@uipath/uipath-typescript';
|
|
2332
|
+
* const task = await sdk.tasks.create({
|
|
2333
|
+
* title: "My Task",
|
|
2334
|
+
* priority: TaskPriority.Medium
|
|
2335
|
+
* }, <folderId>); // folderId is required
|
|
2336
|
+
* ```
|
|
2337
|
+
*/
|
|
2106
2338
|
create(options: TaskCreateOptions, folderId: number): Promise<TaskCreateResponse>;
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2339
|
+
/**
|
|
2340
|
+
* Assigns tasks to users
|
|
2341
|
+
*
|
|
2342
|
+
* @param options - Single task assignment or array of task assignments
|
|
2343
|
+
* @returns Promise resolving to array of task assignment results
|
|
2344
|
+
* {@link TaskAssignmentResponse}
|
|
2345
|
+
* @example
|
|
2346
|
+
* ```typescript
|
|
2347
|
+
* // Assign a single task to a user by ID
|
|
2348
|
+
* const result = await sdk.tasks.assign({
|
|
2349
|
+
* taskId: <taskId>,
|
|
2350
|
+
* userId: <userId>
|
|
2351
|
+
* });
|
|
2352
|
+
*
|
|
2353
|
+
* or
|
|
2354
|
+
*
|
|
2355
|
+
* const task = await sdk.tasks.getById(<taskId>);
|
|
2356
|
+
* const result = await task.assign({
|
|
2357
|
+
* userId: <userId>
|
|
2358
|
+
* });
|
|
2359
|
+
*
|
|
2360
|
+
* // Assign a single task to a user by email
|
|
2361
|
+
* const result = await sdk.tasks.assign({
|
|
2362
|
+
* taskId: <taskId>,
|
|
2363
|
+
* userNameOrEmail: "user@example.com"
|
|
2364
|
+
* });
|
|
2365
|
+
*
|
|
2366
|
+
* // Assign multiple tasks
|
|
2367
|
+
* const result = await sdk.tasks.assign([
|
|
2368
|
+
* { taskId: <taskId1>, userId: <userId> },
|
|
2369
|
+
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2370
|
+
* ]);
|
|
2371
|
+
* ```
|
|
2372
|
+
*/
|
|
2373
|
+
assign(options: TaskAssignmentOptions | TaskAssignmentOptions[]): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
2374
|
+
/**
|
|
2375
|
+
* Reassigns tasks to new users
|
|
2376
|
+
*
|
|
2377
|
+
* @param options - Single task assignment or array of task assignments
|
|
2378
|
+
* @returns Promise resolving to array of task assignment results
|
|
2379
|
+
* {@link TaskAssignmentResponse}
|
|
2380
|
+
* @example
|
|
2381
|
+
* ```typescript
|
|
2382
|
+
* // Reassign a single task to a user by ID
|
|
2383
|
+
* const result = await sdk.tasks.reassign({
|
|
2384
|
+
* taskId: <taskId>,
|
|
2385
|
+
* userId: <userId>
|
|
2386
|
+
* });
|
|
2387
|
+
*
|
|
2388
|
+
* or
|
|
2389
|
+
*
|
|
2390
|
+
* const task = await sdk.tasks.getById(<taskId>);
|
|
2391
|
+
* const result = await task.reassign({
|
|
2392
|
+
* userId: <userId>
|
|
2393
|
+
* });
|
|
2394
|
+
*
|
|
2395
|
+
* // Reassign a single task to a user by email
|
|
2396
|
+
* const result = await sdk.tasks.reassign({
|
|
2397
|
+
* taskId: <taskId>,
|
|
2398
|
+
* userNameOrEmail: "user@example.com"
|
|
2399
|
+
* });
|
|
2400
|
+
*
|
|
2401
|
+
* // Reassign multiple tasks
|
|
2402
|
+
* const result = await sdk.tasks.reassign([
|
|
2403
|
+
* { taskId: <taskId1>, userId: <userId> },
|
|
2404
|
+
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2405
|
+
* ]);
|
|
2406
|
+
* ```
|
|
2407
|
+
*/
|
|
2408
|
+
reassign(options: TaskAssignmentOptions | TaskAssignmentOptions[]): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Unassigns tasks (removes current assignees)
|
|
2411
|
+
*
|
|
2412
|
+
* @param taskId - Single task ID or array of task IDs to unassign
|
|
2413
|
+
* @returns Promise resolving to array of task assignment results
|
|
2414
|
+
* {@link TaskAssignmentResponse}
|
|
2415
|
+
* @example
|
|
2416
|
+
* ```typescript
|
|
2417
|
+
* // Unassign a single task
|
|
2418
|
+
* const result = await sdk.tasks.unassign(<taskId>);
|
|
2419
|
+
*
|
|
2420
|
+
* or
|
|
2421
|
+
*
|
|
2422
|
+
* const task = await sdk.tasks.getById(<taskId>);
|
|
2423
|
+
* const result = await task.unassign();
|
|
2424
|
+
*
|
|
2425
|
+
* // Unassign multiple tasks
|
|
2426
|
+
* const result = await sdk.tasks.unassign([<taskId1>, <taskId2>, <taskId3>]);
|
|
2427
|
+
* ```
|
|
2428
|
+
*/
|
|
2429
|
+
unassign(taskId: number | number[]): Promise<OperationResponse<{
|
|
2110
2430
|
taskId: number;
|
|
2111
2431
|
}[] | TaskAssignmentResponse[]>>;
|
|
2112
|
-
|
|
2432
|
+
/**
|
|
2433
|
+
* Completes a task with the specified type and data
|
|
2434
|
+
*
|
|
2435
|
+
* @param options - The completion options including task type, taskId, data, and action
|
|
2436
|
+
* @param folderId - Required folder ID
|
|
2437
|
+
* @returns Promise resolving to completion result
|
|
2438
|
+
* {@link TaskCompleteOptions}
|
|
2439
|
+
* @example
|
|
2440
|
+
* ```typescript
|
|
2441
|
+
* // Complete an app task
|
|
2442
|
+
* await sdk.tasks.complete({
|
|
2443
|
+
* type: TaskType.App,
|
|
2444
|
+
* taskId: <taskId>,
|
|
2445
|
+
* data: {},
|
|
2446
|
+
* action: "submit"
|
|
2447
|
+
* }, <folderId>); // folderId is required
|
|
2448
|
+
*
|
|
2449
|
+
* // Complete an external task
|
|
2450
|
+
* await sdk.tasks.complete({
|
|
2451
|
+
* type: TaskType.External,
|
|
2452
|
+
* taskId: <taskId>
|
|
2453
|
+
* }, <folderId>); // folderId is required
|
|
2454
|
+
* ```
|
|
2455
|
+
*/
|
|
2456
|
+
complete(options: TaskCompletionOptions, folderId: number): Promise<OperationResponse<TaskCompletionOptions>>;
|
|
2113
2457
|
/**
|
|
2114
2458
|
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
2115
2459
|
* Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
|
|
@@ -2117,7 +2461,17 @@ interface TaskServiceModel {
|
|
|
2117
2461
|
*
|
|
2118
2462
|
* @param folderId - The folder ID to get users from
|
|
2119
2463
|
* @param options - Optional query and pagination parameters
|
|
2120
|
-
* @returns Promise resolving to NonPaginatedResponse or a
|
|
2464
|
+
* @returns Promise resolving to either an array of users NonPaginatedResponse<UserLoginInfo> or a PaginatedResponse<UserLoginInfo> when pagination options are used.
|
|
2465
|
+
* {@link UserLoginInfo}
|
|
2466
|
+
* @example
|
|
2467
|
+
* ```typescript
|
|
2468
|
+
* // Get users from a folder
|
|
2469
|
+
* const users = await sdk.tasks.getUsers(<folderId>);
|
|
2470
|
+
*
|
|
2471
|
+
* // Access user properties
|
|
2472
|
+
* console.log(users.items[0].name);
|
|
2473
|
+
* console.log(users.items[0].emailAddress);
|
|
2474
|
+
* ```
|
|
2121
2475
|
*/
|
|
2122
2476
|
getUsers<T extends TaskGetUsersOptions = TaskGetUsersOptions>(folderId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<UserLoginInfo> : NonPaginatedResponse<UserLoginInfo>>;
|
|
2123
2477
|
}
|
|
@@ -2236,32 +2590,23 @@ interface CaseInstancesServiceModel {
|
|
|
2236
2590
|
* <folderKey>
|
|
2237
2591
|
* );
|
|
2238
2592
|
*
|
|
2239
|
-
*
|
|
2240
|
-
* console.log(`Instance ${result.data.instanceId} now has status: ${result.data.status}`);
|
|
2241
|
-
* }
|
|
2593
|
+
* or
|
|
2242
2594
|
*
|
|
2243
|
-
*
|
|
2244
|
-
* const result = await sdk.maestro.cases.instances.close(
|
|
2595
|
+
* const instance = await sdk.maestro.cases.instances.getById(
|
|
2245
2596
|
* <instanceId>,
|
|
2246
|
-
* <folderKey
|
|
2247
|
-
* { comment: <comment> }
|
|
2597
|
+
* <folderKey>
|
|
2248
2598
|
* );
|
|
2599
|
+
* const result = await instance.close();
|
|
2249
2600
|
*
|
|
2250
|
-
*
|
|
2251
|
-
*
|
|
2252
|
-
*
|
|
2601
|
+
* console.log(`Closed: ${result.success}`);
|
|
2602
|
+
*
|
|
2603
|
+
* // Close with a comment
|
|
2604
|
+
* const result = await instance.close({
|
|
2605
|
+
* comment: 'Closing due to invalid input data'
|
|
2253
2606
|
* });
|
|
2254
2607
|
*
|
|
2255
|
-
*
|
|
2256
|
-
*
|
|
2257
|
-
* instance.instanceId,
|
|
2258
|
-
* instance.folderKey,
|
|
2259
|
-
* { comment: <comment> }
|
|
2260
|
-
* );
|
|
2261
|
-
*
|
|
2262
|
-
* if (result.success) {
|
|
2263
|
-
* console.log(`Closed instance: ${result.data.instanceId}`);
|
|
2264
|
-
* }
|
|
2608
|
+
* if (result.success) {
|
|
2609
|
+
* console.log(`Instance ${result.data.instanceId} status: ${result.data.status}`);
|
|
2265
2610
|
* }
|
|
2266
2611
|
* ```
|
|
2267
2612
|
*/
|
|
@@ -2394,6 +2739,25 @@ interface CaseInstanceMethods {
|
|
|
2394
2739
|
* @returns Promise resolving to operation result
|
|
2395
2740
|
*/
|
|
2396
2741
|
resume(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
2742
|
+
/**
|
|
2743
|
+
* Gets execution history for this case instance
|
|
2744
|
+
*
|
|
2745
|
+
* @returns Promise resolving to instance execution history
|
|
2746
|
+
*/
|
|
2747
|
+
getExecutionHistory(): Promise<CaseInstanceExecutionHistoryResponse>;
|
|
2748
|
+
/**
|
|
2749
|
+
* Gets stages and their associated tasks for this case instance
|
|
2750
|
+
*
|
|
2751
|
+
* @returns Promise resolving to an array of case stages with their tasks and status
|
|
2752
|
+
*/
|
|
2753
|
+
getStages(): Promise<CaseGetStageResponse[]>;
|
|
2754
|
+
/**
|
|
2755
|
+
* Gets human in the loop tasks associated with this case instance
|
|
2756
|
+
*
|
|
2757
|
+
* @param options - Optional filtering and pagination options
|
|
2758
|
+
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
2759
|
+
*/
|
|
2760
|
+
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
2397
2761
|
}
|
|
2398
2762
|
type CaseInstanceGetResponse = RawCaseInstanceGetResponse & CaseInstanceMethods;
|
|
2399
2763
|
/**
|
|
@@ -2409,6 +2773,7 @@ declare function createCaseInstanceWithMethods(instanceData: RawCaseInstanceGetR
|
|
|
2409
2773
|
* Service for interacting with Maestro Processes
|
|
2410
2774
|
*/
|
|
2411
2775
|
declare class MaestroProcessesService extends BaseService implements MaestroProcessesServiceModel {
|
|
2776
|
+
private processInstancesService;
|
|
2412
2777
|
/**
|
|
2413
2778
|
* @hideconstructor
|
|
2414
2779
|
*/
|
|
@@ -2432,6 +2797,10 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
|
|
|
2432
2797
|
* ```
|
|
2433
2798
|
*/
|
|
2434
2799
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
2800
|
+
/**
|
|
2801
|
+
* Get incidents for a specific process
|
|
2802
|
+
*/
|
|
2803
|
+
getIncidents(processKey: string, folderKey: string): Promise<ProcessIncidentGetResponse[]>;
|
|
2435
2804
|
}
|
|
2436
2805
|
|
|
2437
2806
|
declare class ProcessInstancesService extends BaseService implements ProcessInstancesServiceModel {
|
|
@@ -2550,6 +2919,39 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
|
|
|
2550
2919
|
* @returns Promise<ProcessInstanceGetVariablesResponse>
|
|
2551
2920
|
*/
|
|
2552
2921
|
getVariables(instanceId: string, folderKey: string, options?: ProcessInstanceGetVariablesOptions): Promise<ProcessInstanceGetVariablesResponse>;
|
|
2922
|
+
/**
|
|
2923
|
+
* Get incidents for a process instance
|
|
2924
|
+
* @param instanceId The ID of the instance to get incidents for
|
|
2925
|
+
* @param folderKey The folder key for authorization
|
|
2926
|
+
* @returns Promise<ProcessIncidentGetResponse[]>
|
|
2927
|
+
*/
|
|
2928
|
+
getIncidents(instanceId: string, folderKey: string): Promise<ProcessIncidentGetResponse[]>;
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* Service class for Maestro Process Incidents
|
|
2933
|
+
*/
|
|
2934
|
+
declare class ProcessIncidentsService extends BaseService implements ProcessIncidentsServiceModel {
|
|
2935
|
+
/**
|
|
2936
|
+
* Get all process incidents across all folders
|
|
2937
|
+
*
|
|
2938
|
+
* @returns Promise resolving to array of process incident
|
|
2939
|
+
* {@link ProcessIncidentGetAllResponse}
|
|
2940
|
+
* @example
|
|
2941
|
+
* ```typescript
|
|
2942
|
+
* // Get all process incidents across all folders
|
|
2943
|
+
* const incidents = await sdk.maestro.processes.incidents.getAll();
|
|
2944
|
+
*
|
|
2945
|
+
* // Access process incident information
|
|
2946
|
+
* for (const incident of incidents) {
|
|
2947
|
+
* console.log(`Process: ${incident.processKey}`);
|
|
2948
|
+
* console.log(`Error: ${incident.errorMessage}`);
|
|
2949
|
+
* console.log(`Count: ${incident.count}`);
|
|
2950
|
+
* console.log(`First occurrence: ${incident.firstOccuranceTime}`);
|
|
2951
|
+
* }
|
|
2952
|
+
* ```
|
|
2953
|
+
*/
|
|
2954
|
+
getAll(): Promise<ProcessIncidentGetAllResponse[]>;
|
|
2553
2955
|
}
|
|
2554
2956
|
|
|
2555
2957
|
/**
|
|
@@ -3022,15 +3424,6 @@ interface BucketGetUriOptions extends BaseOptions {
|
|
|
3022
3424
|
* Request options for getting a read URI for a file in a bucket
|
|
3023
3425
|
*/
|
|
3024
3426
|
type BucketGetReadUriOptions = BucketGetUriOptions;
|
|
3025
|
-
/**
|
|
3026
|
-
* Request options for getting a write URI for a file in a bucket
|
|
3027
|
-
*/
|
|
3028
|
-
interface BucketGetWriteUriOptions extends BucketGetUriOptions {
|
|
3029
|
-
/**
|
|
3030
|
-
* ContentType for S3 access policy
|
|
3031
|
-
*/
|
|
3032
|
-
contentType?: string;
|
|
3033
|
-
}
|
|
3034
3427
|
/**
|
|
3035
3428
|
* Request options for getting files in a bucket
|
|
3036
3429
|
*/
|
|
@@ -3098,11 +3491,6 @@ interface BucketUploadFileOptions {
|
|
|
3098
3491
|
* File content to upload
|
|
3099
3492
|
*/
|
|
3100
3493
|
content: Blob | Buffer | File;
|
|
3101
|
-
/**
|
|
3102
|
-
* Optional MIME type of the file
|
|
3103
|
-
* If not provided, it will be auto-detected
|
|
3104
|
-
*/
|
|
3105
|
-
contentType?: string;
|
|
3106
3494
|
}
|
|
3107
3495
|
/**
|
|
3108
3496
|
* Response from file upload operations
|
|
@@ -3246,14 +3634,13 @@ interface BucketServiceModel {
|
|
|
3246
3634
|
* content: file
|
|
3247
3635
|
* });
|
|
3248
3636
|
*
|
|
3249
|
-
* // In Node env with
|
|
3637
|
+
* // In Node env with Buffer
|
|
3250
3638
|
* const buffer = Buffer.from('file content');
|
|
3251
3639
|
* const result = await sdk.buckets.uploadFile({
|
|
3252
3640
|
* bucketId: <bucketId>,
|
|
3253
3641
|
* folderId: <folderId>,
|
|
3254
3642
|
* path: '/folder/example.txt',
|
|
3255
3643
|
* content: buffer,
|
|
3256
|
-
* contentType: 'text/plain'
|
|
3257
3644
|
* });
|
|
3258
3645
|
* ```
|
|
3259
3646
|
*/
|
|
@@ -3370,36 +3757,38 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
3370
3757
|
* content: file
|
|
3371
3758
|
* });
|
|
3372
3759
|
*
|
|
3373
|
-
* // In Node env with
|
|
3760
|
+
* // In Node env with Buffer
|
|
3374
3761
|
* const buffer = Buffer.from('file content');
|
|
3375
3762
|
* const result = await sdk.buckets.uploadFile({
|
|
3376
3763
|
* bucketId: 123,
|
|
3377
3764
|
* folderId: 456,
|
|
3378
3765
|
* path: '/folder/example.txt',
|
|
3379
|
-
* content: buffer
|
|
3380
|
-
* contentType: 'text/plain'
|
|
3766
|
+
* content: buffer
|
|
3381
3767
|
* });
|
|
3382
3768
|
* ```
|
|
3383
3769
|
*/
|
|
3384
3770
|
uploadFile(options: BucketUploadFileOptions): Promise<BucketUploadResponse>;
|
|
3385
3771
|
/**
|
|
3386
|
-
*
|
|
3387
|
-
* Uses a hybrid approach:
|
|
3388
|
-
* 1. Checks Blob/File type if available (browser)
|
|
3389
|
-
* 2. Uses content-based detection with file-type (primarily Node.js)
|
|
3390
|
-
* 3. Falls back to extension-based detection with mime-types
|
|
3391
|
-
* 4. Finally defaults to application/octet-stream
|
|
3772
|
+
* Gets a direct download URL for a file in the bucket
|
|
3392
3773
|
*
|
|
3393
|
-
* @param
|
|
3394
|
-
* @
|
|
3395
|
-
*
|
|
3774
|
+
* @param options - Contains bucketId, folderId, file path and optional expiry time
|
|
3775
|
+
* @returns Promise resolving to blob file access information
|
|
3776
|
+
*
|
|
3777
|
+
* @example
|
|
3778
|
+
* ```typescript
|
|
3779
|
+
* // Get download URL for a file
|
|
3780
|
+
* const fileAccess = await sdk.buckets.getReadUri({
|
|
3781
|
+
* bucketId: 123,
|
|
3782
|
+
* folderId: 456,
|
|
3783
|
+
* path: '/folder/file.pdf'
|
|
3784
|
+
* });
|
|
3785
|
+
* ```
|
|
3396
3786
|
*/
|
|
3397
|
-
|
|
3787
|
+
getReadUri(options: BucketGetReadUriOptions): Promise<BucketGetUriResponse>;
|
|
3398
3788
|
/**
|
|
3399
3789
|
* Uploads content to the provided URI
|
|
3400
3790
|
* @param uriResponse - Response from getWriteUri containing URL and headers
|
|
3401
3791
|
* @param content - The content to upload
|
|
3402
|
-
* @param contentType - The content type of the file
|
|
3403
3792
|
* @returns The response from the upload request with status info
|
|
3404
3793
|
*/
|
|
3405
3794
|
private _uploadToUri;
|
|
@@ -3413,27 +3802,10 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
3413
3802
|
* @returns Promise resolving to blob file access information
|
|
3414
3803
|
*/
|
|
3415
3804
|
private _getUri;
|
|
3416
|
-
/**
|
|
3417
|
-
* Gets a direct download URL for a file in the bucket
|
|
3418
|
-
*
|
|
3419
|
-
* @param options - Contains bucketId, folderId, file path and optional expiry time
|
|
3420
|
-
* @returns Promise resolving to blob file access information
|
|
3421
|
-
*
|
|
3422
|
-
* @example
|
|
3423
|
-
* ```typescript
|
|
3424
|
-
* // Get download URL for a file
|
|
3425
|
-
* const fileAccess = await sdk.buckets.getReadUri({
|
|
3426
|
-
* bucketId: 123,
|
|
3427
|
-
* folderId: 456,
|
|
3428
|
-
* path: '/folder/file.pdf'
|
|
3429
|
-
* });
|
|
3430
|
-
* ```
|
|
3431
|
-
*/
|
|
3432
|
-
getReadUri(options: BucketGetReadUriOptions): Promise<BucketGetUriResponse>;
|
|
3433
3805
|
/**
|
|
3434
3806
|
* Gets a direct upload URL for a file in the bucket
|
|
3435
3807
|
*
|
|
3436
|
-
* @param options - Contains bucketId, folderId, file path, optional expiry time
|
|
3808
|
+
* @param options - Contains bucketId, folderId, file path, optional expiry time
|
|
3437
3809
|
* @returns Promise resolving to blob file access information
|
|
3438
3810
|
*/
|
|
3439
3811
|
private _getWriteUri;
|
|
@@ -4161,10 +4533,11 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4161
4533
|
getAll<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
4162
4534
|
/**
|
|
4163
4535
|
* Gets a task by ID
|
|
4536
|
+
* IMPORTANT: For form tasks, folderId must be provided.
|
|
4164
4537
|
*
|
|
4165
4538
|
* @param id - The ID of the task to retrieve
|
|
4166
4539
|
* @param options - Optional query parameters
|
|
4167
|
-
* @param folderId - Optional folder ID
|
|
4540
|
+
* @param folderId - Optional folder ID (REQUIRED for form tasks)
|
|
4168
4541
|
* @returns Promise resolving to the task (form tasks will return form-specific data)
|
|
4169
4542
|
*
|
|
4170
4543
|
* @example
|
|
@@ -4180,7 +4553,6 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4180
4553
|
* Assigns tasks to users
|
|
4181
4554
|
*
|
|
4182
4555
|
* @param taskAssignments - Single task assignment or array of task assignments
|
|
4183
|
-
* @param folderId - Optional folder ID
|
|
4184
4556
|
* @returns Promise resolving to array of task assignment results
|
|
4185
4557
|
*
|
|
4186
4558
|
* @example
|
|
@@ -4210,12 +4582,11 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4210
4582
|
* ]);
|
|
4211
4583
|
* ```
|
|
4212
4584
|
*/
|
|
4213
|
-
assign(taskAssignments: TaskAssignmentOptions | TaskAssignmentOptions[]
|
|
4585
|
+
assign(taskAssignments: TaskAssignmentOptions | TaskAssignmentOptions[]): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
4214
4586
|
/**
|
|
4215
4587
|
* Reassigns tasks to new users
|
|
4216
4588
|
*
|
|
4217
4589
|
* @param taskAssignments - Single task assignment or array of task assignments
|
|
4218
|
-
* @param folderId - Optional folder ID
|
|
4219
4590
|
* @returns Promise resolving to array of task assignment results
|
|
4220
4591
|
*
|
|
4221
4592
|
* @example
|
|
@@ -4245,12 +4616,11 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4245
4616
|
* ]);
|
|
4246
4617
|
* ```
|
|
4247
4618
|
*/
|
|
4248
|
-
reassign(taskAssignments: TaskAssignmentOptions | TaskAssignmentOptions[]
|
|
4619
|
+
reassign(taskAssignments: TaskAssignmentOptions | TaskAssignmentOptions[]): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
4249
4620
|
/**
|
|
4250
4621
|
* Unassigns tasks (removes current assignees)
|
|
4251
4622
|
*
|
|
4252
4623
|
* @param taskIds - Single task ID or array of task IDs to unassign
|
|
4253
|
-
* @param folderId - Optional folder ID
|
|
4254
4624
|
* @returns Promise resolving to array of task assignment results
|
|
4255
4625
|
*
|
|
4256
4626
|
* @example
|
|
@@ -4262,33 +4632,34 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4262
4632
|
* const result = await sdk.tasks.unassign([123, 456, 789]);
|
|
4263
4633
|
* ```
|
|
4264
4634
|
*/
|
|
4265
|
-
unassign(taskIds: number | number[]
|
|
4635
|
+
unassign(taskIds: number | number[]): Promise<OperationResponse<{
|
|
4266
4636
|
taskId: number;
|
|
4267
4637
|
}[] | TaskAssignmentResponse[]>>;
|
|
4268
4638
|
/**
|
|
4269
4639
|
* Completes a task with the specified type and data
|
|
4270
4640
|
*
|
|
4271
|
-
* @param
|
|
4272
|
-
* @param options - The completion options
|
|
4641
|
+
* @param options - The completion options including task type, taskId, data, and action
|
|
4273
4642
|
* @param folderId - Required folder ID
|
|
4274
|
-
* @returns Promise resolving to
|
|
4643
|
+
* @returns Promise resolving to completion result
|
|
4275
4644
|
*
|
|
4276
4645
|
* @example
|
|
4277
4646
|
* ```typescript
|
|
4278
4647
|
* // Complete an app task
|
|
4279
|
-
* await sdk.tasks.complete(
|
|
4648
|
+
* await sdk.tasks.complete({
|
|
4649
|
+
* type: TaskType.App,
|
|
4280
4650
|
* taskId: 456,
|
|
4281
4651
|
* data: {},
|
|
4282
4652
|
* action: "submit"
|
|
4283
4653
|
* }, 123); // folderId is required
|
|
4284
4654
|
*
|
|
4285
4655
|
* // Complete an external task
|
|
4286
|
-
* await sdk.tasks.complete(
|
|
4656
|
+
* await sdk.tasks.complete({
|
|
4657
|
+
* type: TaskType.External,
|
|
4287
4658
|
* taskId: 789
|
|
4288
4659
|
* }, 123); // folderId is required
|
|
4289
4660
|
* ```
|
|
4290
4661
|
*/
|
|
4291
|
-
complete(
|
|
4662
|
+
complete(options: TaskCompletionOptions, folderId: number): Promise<OperationResponse<TaskCompletionOptions>>;
|
|
4292
4663
|
/**
|
|
4293
4664
|
* Gets a form task by ID (private method)
|
|
4294
4665
|
*
|
|
@@ -4306,6 +4677,13 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4306
4677
|
* @private
|
|
4307
4678
|
*/
|
|
4308
4679
|
private processTaskParameters;
|
|
4680
|
+
/**
|
|
4681
|
+
* Adds default expand parameters to options
|
|
4682
|
+
* @param options - The options object to add default expand to
|
|
4683
|
+
* @returns Options with default expand parameters added
|
|
4684
|
+
* @private
|
|
4685
|
+
*/
|
|
4686
|
+
private addDefaultExpand;
|
|
4309
4687
|
}
|
|
4310
4688
|
|
|
4311
4689
|
interface BaseConfig {
|
|
@@ -4373,6 +4751,10 @@ declare class UiPath {
|
|
|
4373
4751
|
* Access to Process Instances service
|
|
4374
4752
|
*/
|
|
4375
4753
|
instances: ProcessInstancesService;
|
|
4754
|
+
/**
|
|
4755
|
+
* Access to Process Incidents service
|
|
4756
|
+
*/
|
|
4757
|
+
incidents: ProcessIncidentsService;
|
|
4376
4758
|
};
|
|
4377
4759
|
/**
|
|
4378
4760
|
* Access to Maestro Cases service
|
|
@@ -4691,7 +5073,7 @@ declare const telemetryClient: TelemetryClient;
|
|
|
4691
5073
|
* SDK Telemetry constants
|
|
4692
5074
|
*/
|
|
4693
5075
|
declare 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";
|
|
4694
|
-
declare const SDK_VERSION = "1.0.0-beta.
|
|
5076
|
+
declare const SDK_VERSION = "1.0.0-beta.16";
|
|
4695
5077
|
declare const VERSION = "Version";
|
|
4696
5078
|
declare const SERVICE = "Service";
|
|
4697
5079
|
declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -4706,5 +5088,5 @@ declare const SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
|
4706
5088
|
declare const SDK_RUN_EVENT = "Sdk.Run";
|
|
4707
5089
|
declare const UNKNOWN = "";
|
|
4708
5090
|
|
|
4709
|
-
export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
|
|
4710
|
-
export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse,
|
|
5091
|
+
export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
|
|
5092
|
+
export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityDeleteOptions, EntityDeleteResponse, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
|