@uipath/uipath-typescript 1.0.0-beta.13 → 1.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1569,6 +1569,842 @@ type ProcessInstanceGetResponse = RawProcessInstanceGetResponse & ProcessInstanc
1569
1569
  */
1570
1570
  declare function createProcessInstanceWithMethods(instanceData: RawProcessInstanceGetResponse, service: ProcessInstancesServiceModel): ProcessInstanceGetResponse;
1571
1571
 
1572
+ /**
1573
+ * Maestro Cases Types
1574
+ * Types and interfaces for Maestro case management
1575
+ */
1576
+ /**
1577
+ * Case information with instance statistics
1578
+ */
1579
+ interface CaseGetAllResponse {
1580
+ /** Unique key identifying the case process */
1581
+ processKey: string;
1582
+ /** Package identifier */
1583
+ packageId: string;
1584
+ /** Case name */
1585
+ name: string;
1586
+ /** Folder key of the folder where case process is located */
1587
+ folderKey: string;
1588
+ /** Name of the folder where case process is located */
1589
+ folderName: string;
1590
+ /** Available package versions */
1591
+ packageVersions: string[];
1592
+ /** Total number of versions */
1593
+ versionCount: number;
1594
+ /** Case instance count - pending */
1595
+ pendingCount: number;
1596
+ /** Case instance count - running */
1597
+ runningCount: number;
1598
+ /** Case instance count - completed */
1599
+ completedCount: number;
1600
+ /** Case instance count - paused */
1601
+ pausedCount: number;
1602
+ /** Case instance count - cancelled */
1603
+ cancelledCount: number;
1604
+ /** Case instance count - faulted */
1605
+ faultedCount: number;
1606
+ /** Case instance count - retrying */
1607
+ retryingCount: number;
1608
+ /** Case instance count - resuming */
1609
+ resumingCount: number;
1610
+ /** Case instance count - pausing */
1611
+ pausingCount: number;
1612
+ /** Case instance count - canceling */
1613
+ cancelingCount: number;
1614
+ }
1615
+
1616
+ /**
1617
+ * Maestro Cases Models
1618
+ * Model classes for Maestro cases
1619
+ */
1620
+
1621
+ /**
1622
+ * Service for managing UiPath Maestro Cases
1623
+ *
1624
+ * UiPath Maestro Case Management describes solutions that help manage and automate the full flow of complex E2E scenarios.
1625
+ */
1626
+ interface CasesServiceModel {
1627
+ /**
1628
+ * @returns Promise resolving to array of Case objects
1629
+ * {@link CaseGetAllResponse}
1630
+ * @example
1631
+ * ```typescript
1632
+ * // Get all case management processes
1633
+ * const cases = await sdk.maestro.cases.getAll();
1634
+ *
1635
+ * // Access case information
1636
+ * for (const caseProcess of cases) {
1637
+ * console.log(`Case Process: ${caseProcess.processKey}`);
1638
+ * console.log(`Running instances: ${caseProcess.runningCount}`);
1639
+ * console.log(`Completed instances: ${caseProcess.completedCount}`);
1640
+ * }
1641
+ *
1642
+ * ```
1643
+ */
1644
+ getAll(): Promise<CaseGetAllResponse[]>;
1645
+ }
1646
+
1647
+ /**
1648
+ * Case Instance Types
1649
+ * Types and interfaces for Maestro case instance management
1650
+ */
1651
+
1652
+ /**
1653
+ * Response for getting a single case instance
1654
+ */
1655
+ interface RawCaseInstanceGetResponse {
1656
+ instanceId: string;
1657
+ packageKey: string;
1658
+ packageId: string;
1659
+ packageVersion: string;
1660
+ latestRunId: string;
1661
+ latestRunStatus: string;
1662
+ processKey: string;
1663
+ folderKey: string;
1664
+ userId: number;
1665
+ instanceDisplayName: string;
1666
+ startedByUser: string;
1667
+ source: string;
1668
+ creatorUserKey: string;
1669
+ startedTime: string;
1670
+ completedTime: string;
1671
+ instanceRuns: CaseInstanceRun[];
1672
+ caseAppConfig?: CaseAppConfig;
1673
+ caseType?: string;
1674
+ caseTitle?: string;
1675
+ }
1676
+ /**
1677
+ * Case instance run information
1678
+ */
1679
+ interface CaseInstanceRun {
1680
+ runId: string;
1681
+ status: string;
1682
+ startedTime: string;
1683
+ completedTime: string;
1684
+ }
1685
+ /**
1686
+ * Query options for getting case instances
1687
+ */
1688
+ interface CaseInstanceGetAllOptions {
1689
+ packageId?: string;
1690
+ packageVersion?: string;
1691
+ processKey?: string;
1692
+ errorCode?: string;
1693
+ }
1694
+ /**
1695
+ * Query options for getting case instances with pagination support
1696
+ */
1697
+ type CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllOptions & PaginationOptions;
1698
+ /**
1699
+ * Request for case instance operations (close, pause, resume)
1700
+ */
1701
+ interface CaseInstanceOperationOptions {
1702
+ comment?: string;
1703
+ }
1704
+ /**
1705
+ * Response for case instance operations (close, pause, resume)
1706
+ */
1707
+ interface CaseInstanceOperationResponse {
1708
+ instanceId: string;
1709
+ status: string;
1710
+ }
1711
+ /**
1712
+ * Case App Configuration Overview
1713
+ */
1714
+ interface CaseAppOverview {
1715
+ title: string;
1716
+ details: string;
1717
+ }
1718
+ /**
1719
+ * Case App Configuration from case JSON
1720
+ */
1721
+ interface CaseAppConfig {
1722
+ caseSummary?: string;
1723
+ overview?: CaseAppOverview[];
1724
+ }
1725
+ /**
1726
+ * Case stage task type
1727
+ */
1728
+ declare enum StageTaskType {
1729
+ EXTERNAL_AGENT = "external-agent",
1730
+ RPA = "rpa",
1731
+ AGENTIC_PROCESS = "process",
1732
+ AGENT = "agent",
1733
+ ACTION = "action",
1734
+ API_WORKFLOW = "api-workflow"
1735
+ }
1736
+ /**
1737
+ * Stage task information
1738
+ */
1739
+ interface StageTask {
1740
+ id: string;
1741
+ name: string;
1742
+ completedTime: string;
1743
+ startedTime: string;
1744
+ status: string;
1745
+ type: StageTaskType;
1746
+ }
1747
+ /**
1748
+ * Escalation recipient scope
1749
+ */
1750
+ declare enum EscalationRecipientScope {
1751
+ USER = "user",
1752
+ USER_GROUP = "usergroup"
1753
+ }
1754
+ /**
1755
+ * Escalation rule recipient information
1756
+ */
1757
+ interface EscalationRecipient {
1758
+ /** Type of recipient (user or usergroup) */
1759
+ scope: EscalationRecipientScope;
1760
+ /** Identifier for a user/usergroup */
1761
+ target: string;
1762
+ /** The email id of the user/usergroup */
1763
+ value: string;
1764
+ }
1765
+ /**
1766
+ * Escalation action type
1767
+ */
1768
+ declare enum EscalationActionType {
1769
+ NOTIFICATION = "notification"
1770
+ }
1771
+ /**
1772
+ * Escalation rule action configuration
1773
+ */
1774
+ interface EscalationAction {
1775
+ type: EscalationActionType;
1776
+ recipients: EscalationRecipient[];
1777
+ }
1778
+ /**
1779
+ * Escalation rule trigger type
1780
+ */
1781
+ declare enum EscalationTriggerType {
1782
+ SLA_BREACHED = "sla-breached",
1783
+ AT_RISK = "at-risk"
1784
+ }
1785
+ /**
1786
+ * Escalation rule trigger metadata
1787
+ */
1788
+ interface EscalationTriggerMetadata {
1789
+ type?: EscalationTriggerType;
1790
+ atRiskPercentage?: number;
1791
+ }
1792
+ /**
1793
+ * Escalation rule configuration
1794
+ */
1795
+ interface EscalationRule {
1796
+ triggerInfo: EscalationTriggerMetadata;
1797
+ action?: EscalationAction;
1798
+ }
1799
+ /**
1800
+ * SLA duration unit
1801
+ */
1802
+ declare enum SLADurationUnit {
1803
+ HOURS = "h",
1804
+ DAYS = "d",
1805
+ WEEKS = "w",
1806
+ MONTHS = "m"
1807
+ }
1808
+ /**
1809
+ * SLA configuration for stages
1810
+ */
1811
+ interface StageSLA {
1812
+ length?: number;
1813
+ duration?: SLADurationUnit;
1814
+ escalationRule?: EscalationRule[];
1815
+ }
1816
+ /**
1817
+ * Stage information from case instances
1818
+ */
1819
+ interface CaseGetStageResponse {
1820
+ id: string;
1821
+ name: string;
1822
+ sla?: StageSLA;
1823
+ status: string;
1824
+ tasks: StageTask[][];
1825
+ }
1826
+ /**
1827
+ * Case element execution metadata
1828
+ */
1829
+ interface ElementExecutionMetadata {
1830
+ completedTime: string | null;
1831
+ elementId: string;
1832
+ elementName: string;
1833
+ parentElementId: string | null;
1834
+ startedTime: string;
1835
+ /** Element status (e.g., "Completed", "Faulted", "Running") */
1836
+ status: string;
1837
+ processKey: string;
1838
+ /** External reference link, eg link to the HITL task in Action Center */
1839
+ externalLink: string;
1840
+ /** List of element runs for the element */
1841
+ elementRuns: ElementRunMetadata[];
1842
+ }
1843
+ /**
1844
+ * Response for getting case instance element executions
1845
+ */
1846
+ interface CaseInstanceExecutionHistoryResponse {
1847
+ creationUserKey: string | null;
1848
+ folderKey: string;
1849
+ instanceDisplayName: string;
1850
+ instanceId: string;
1851
+ packageId: string;
1852
+ packageKey: string;
1853
+ packageVersion: string;
1854
+ processKey: string;
1855
+ source: string;
1856
+ /** Element status (e.g., "Completed", "Faulted", "Running", "Pausing", "Canceling") */
1857
+ status: string;
1858
+ startedTime: string;
1859
+ completedTime: string | null;
1860
+ elementExecutions: ElementExecutionMetadata[];
1861
+ }
1862
+ /**
1863
+ * Element run metadata
1864
+ */
1865
+ interface ElementRunMetadata {
1866
+ status: string;
1867
+ startedTime: string;
1868
+ completedTime: string | null;
1869
+ elementRunId: string;
1870
+ parentElementRunId: string | null;
1871
+ }
1872
+
1873
+ interface UserLoginInfo {
1874
+ name: string;
1875
+ surname: string;
1876
+ userName: string;
1877
+ emailAddress: string;
1878
+ displayName: string;
1879
+ id: number;
1880
+ }
1881
+ declare enum TaskType {
1882
+ Form = "FormTask",
1883
+ External = "ExternalTask",
1884
+ App = "AppTask"
1885
+ }
1886
+ declare enum TaskPriority {
1887
+ Low = "Low",
1888
+ Medium = "Medium",
1889
+ High = "High",
1890
+ Critical = "Critical"
1891
+ }
1892
+ declare enum TaskStatus {
1893
+ Unassigned = "Unassigned",
1894
+ Pending = "Pending",
1895
+ Completed = "Completed"
1896
+ }
1897
+ declare enum TaskSlaCriteria {
1898
+ TaskCreated = "TaskCreated",
1899
+ TaskAssigned = "TaskAssigned",
1900
+ TaskCompleted = "TaskCompleted"
1901
+ }
1902
+ declare enum TaskSlaStatus {
1903
+ OverdueLater = "OverdueLater",
1904
+ OverdueSoon = "OverdueSoon",
1905
+ Overdue = "Overdue",
1906
+ CompletedInTime = "CompletedInTime"
1907
+ }
1908
+ declare enum TaskSourceName {
1909
+ Agent = "Agent",
1910
+ Workflow = "Workflow",
1911
+ Maestro = "Maestro",
1912
+ Default = "Default"
1913
+ }
1914
+ interface TaskSource {
1915
+ sourceName: TaskSourceName;
1916
+ sourceId: string;
1917
+ taskSourceMetadata: Record<string, unknown>;
1918
+ }
1919
+ /**
1920
+ * Task activity types
1921
+ */
1922
+ declare enum TaskActivityType {
1923
+ Created = "Created",
1924
+ Assigned = "Assigned",
1925
+ Reassigned = "Reassigned",
1926
+ Unassigned = "Unassigned",
1927
+ Saved = "Saved",
1928
+ Forwarded = "Forwarded",
1929
+ Completed = "Completed",
1930
+ Commented = "Commented",
1931
+ Deleted = "Deleted",
1932
+ BulkSaved = "BulkSaved",
1933
+ BulkCompleted = "BulkCompleted",
1934
+ FirstOpened = "FirstOpened"
1935
+ }
1936
+ /**
1937
+ * Tag information for tasks
1938
+ */
1939
+ interface Tag {
1940
+ name: string;
1941
+ displayName: string;
1942
+ displayValue: string;
1943
+ }
1944
+ /**
1945
+ * Task activity information
1946
+ */
1947
+ interface TaskActivity {
1948
+ task?: RawTaskGetResponse;
1949
+ organizationUnitId: number;
1950
+ taskId: number;
1951
+ taskKey: string;
1952
+ activityType: TaskActivityType;
1953
+ creatorUserId: number;
1954
+ targetUserId: number | null;
1955
+ creationTime: string;
1956
+ }
1957
+ interface TaskSlaDetail {
1958
+ expiryTime?: string;
1959
+ startCriteria?: TaskSlaCriteria;
1960
+ endCriteria?: TaskSlaCriteria;
1961
+ status?: TaskSlaStatus;
1962
+ }
1963
+ interface TaskAssignment {
1964
+ assignee?: UserLoginInfo;
1965
+ task?: RawTaskGetResponse;
1966
+ id?: number;
1967
+ }
1968
+ /**
1969
+ * Base interface containing common fields shared across all task response types
1970
+ */
1971
+ interface TaskBaseResponse {
1972
+ status: TaskStatus;
1973
+ title: string;
1974
+ type: TaskType;
1975
+ priority: TaskPriority;
1976
+ organizationUnitId: number;
1977
+ key: string;
1978
+ isDeleted: boolean;
1979
+ creationTime: string;
1980
+ creatorUserId: number;
1981
+ id: number;
1982
+ action: string | null;
1983
+ assignedToUserId: number | null;
1984
+ externalTag: string | null;
1985
+ lastAssignedTime: string | null;
1986
+ completionTime: string | null;
1987
+ parentOperationId: string | null;
1988
+ deleterUserId: number | null;
1989
+ deletionTime: string | null;
1990
+ lastModificationTime: string | null;
1991
+ }
1992
+ interface TaskCreateOptions {
1993
+ title: string;
1994
+ priority?: TaskPriority;
1995
+ }
1996
+ interface RawTaskCreateResponse extends TaskBaseResponse {
1997
+ waitJobState: JobState | null;
1998
+ assignedToUser: UserLoginInfo | null;
1999
+ taskSlaDetails: TaskSlaDetail[] | null;
2000
+ completedByUser: UserLoginInfo | null;
2001
+ taskAssignees: UserLoginInfo[] | null;
2002
+ processingTime: number | null;
2003
+ data: Record<string, unknown> | null;
2004
+ }
2005
+ interface RawTaskGetResponse extends TaskBaseResponse {
2006
+ isCompleted: boolean;
2007
+ encrypted: boolean;
2008
+ bulkFormLayoutId: number | null;
2009
+ formLayoutId: number | null;
2010
+ taskSlaDetail: TaskSlaDetail | null;
2011
+ taskAssigneeName: string | null;
2012
+ lastModifierUserId: number | null;
2013
+ assignedToUser?: UserLoginInfo;
2014
+ creatorUser?: UserLoginInfo;
2015
+ lastModifierUser?: UserLoginInfo;
2016
+ taskAssignments?: TaskAssignment[];
2017
+ activities?: TaskActivity[];
2018
+ tags?: Tag[];
2019
+ formLayout?: Record<string, unknown>;
2020
+ actionLabel?: string | null;
2021
+ taskSlaDetails?: TaskSlaDetail[] | null;
2022
+ completedByUser?: UserLoginInfo | null;
2023
+ taskAssignmentCriteria?: string;
2024
+ taskAssignees?: UserLoginInfo[] | null;
2025
+ taskSource?: TaskSource | null;
2026
+ processingTime?: number | null;
2027
+ data?: Record<string, unknown> | null;
2028
+ }
2029
+ interface TaskAssignmentOptions {
2030
+ taskId: number;
2031
+ userId: number;
2032
+ userNameOrEmail?: string;
2033
+ }
2034
+ interface TasksUnassignOptions {
2035
+ taskIds: number[];
2036
+ }
2037
+ interface TaskAssignmentResponse {
2038
+ taskId?: number;
2039
+ userId?: number;
2040
+ errorCode?: number;
2041
+ errorMessage?: string;
2042
+ userNameOrEmail?: string;
2043
+ }
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
+ /**
2061
+ * Options for completing a task
2062
+ */
2063
+ type TaskCompleteOptions = {
2064
+ type: TaskType.External;
2065
+ data?: any;
2066
+ action?: string;
2067
+ } | {
2068
+ type: Exclude<TaskType, TaskType.External>;
2069
+ data: any;
2070
+ action: string;
2071
+ };
2072
+ /**
2073
+ * Options for getting tasks across folders
2074
+ */
2075
+ type TaskGetAllOptions = RequestOptions & PaginationOptions & {
2076
+ /**
2077
+ * Optional folder ID to filter tasks by folder
2078
+ */
2079
+ folderId?: number;
2080
+ };
2081
+ /**
2082
+ * Query options for getting a task by ID
2083
+ */
2084
+ type TaskGetByIdOptions = BaseOptions;
2085
+ /**
2086
+ * Options for getting users with task permissions
2087
+ */
2088
+ type TaskGetUsersOptions = RequestOptions & PaginationOptions;
2089
+
2090
+ /**
2091
+ * Service for managing UiPath Action Center
2092
+ *
2093
+ * Tasks are task-based automation components that can be integrated into applications and processes. They represent discrete units of work that can be triggered and monitored through the UiPath API. [UiPath Action Center Guide](https://docs.uipath.com/automation-cloud/docs/actions)
2094
+ *
2095
+ */
2096
+ interface TaskServiceModel {
2097
+ /**
2098
+ * Gets all tasks across folders with optional filtering
2099
+ *
2100
+ * @param options - Query options including optional folderId and pagination options
2101
+ * @returns Promise resolving to either an array of tasks NonPaginatedResponse<TaskGetResponse> or a PaginatedResponse<TaskGetResponse> when pagination options are used.
2102
+ * {@link TaskGetResponse}
2103
+ */
2104
+ getAll<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
2105
+ getById(id: number, options?: TaskGetByIdOptions, folderId?: number): Promise<TaskGetResponse>;
2106
+ create(options: TaskCreateOptions, folderId: number): Promise<TaskCreateResponse>;
2107
+ assign(options: TaskAssignmentOptions | TaskAssignmentOptions[], folderId?: number): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
2108
+ reassign(options: TaskAssignmentOptions | TaskAssignmentOptions[], folderId?: number): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
2109
+ unassign(taskId: number | number[], folderId?: number): Promise<OperationResponse<{
2110
+ taskId: number;
2111
+ }[] | TaskAssignmentResponse[]>>;
2112
+ complete(taskType: TaskType, options: TaskCompletionOptions, folderId: number): Promise<OperationResponse<TaskCompletionOptions>>;
2113
+ /**
2114
+ * Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
2115
+ * Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
2116
+ * or a PaginatedResponse when any pagination parameter is provided
2117
+ *
2118
+ * @param folderId - The folder ID to get users from
2119
+ * @param options - Optional query and pagination parameters
2120
+ * @returns Promise resolving to NonPaginatedResponse or a paginated result
2121
+ */
2122
+ getUsers<T extends TaskGetUsersOptions = TaskGetUsersOptions>(folderId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<UserLoginInfo> : NonPaginatedResponse<UserLoginInfo>>;
2123
+ }
2124
+ interface TaskMethods {
2125
+ /**
2126
+ * Assigns this task to a user or users
2127
+ *
2128
+ * @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
2129
+ * @returns Promise resolving to task assignment results
2130
+ */
2131
+ assign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
2132
+ /**
2133
+ * Reassigns this task to a new user
2134
+ *
2135
+ * @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
2136
+ * @returns Promise resolving to task assignment results
2137
+ */
2138
+ reassign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
2139
+ /**
2140
+ * Unassigns this task (removes current assignee)
2141
+ *
2142
+ * @returns Promise resolving to task assignment results
2143
+ */
2144
+ unassign(): Promise<OperationResponse<{
2145
+ taskId: number;
2146
+ }[] | TaskAssignmentResponse[]>>;
2147
+ /**
2148
+ * Completes this task with optional data and action
2149
+ *
2150
+ * @param options - Completion options
2151
+ * @returns Promise resolving to completion result
2152
+ */
2153
+ complete(options: TaskCompleteOptions): Promise<OperationResponse<TaskCompletionOptions>>;
2154
+ }
2155
+ type TaskGetResponse = RawTaskGetResponse & TaskMethods;
2156
+ type TaskCreateResponse = RawTaskCreateResponse & TaskMethods;
2157
+ /**
2158
+ * Creates an actionable task by combining API task data with operational methods.
2159
+ *
2160
+ * @param taskData - The task data from API
2161
+ * @param service - The task service instance
2162
+ * @returns A task object with added methods
2163
+ */
2164
+ declare function createTaskWithMethods(taskData: RawTaskGetResponse | RawTaskCreateResponse, service: TaskServiceModel): TaskGetResponse | TaskCreateResponse;
2165
+
2166
+ /**
2167
+ * Service model for managing Maestro Case Instances
2168
+ *
2169
+ * Maestro case instances are the running instances of Maestro cases.
2170
+ */
2171
+ interface CaseInstancesServiceModel {
2172
+ /**
2173
+ * Get all case instances with optional filtering and pagination
2174
+ *
2175
+ * @param options Query parameters for filtering instances and pagination
2176
+ * @returns Promise resolving to either an array of case instances NonPaginatedResponse<CaseInstanceGetResponse> or a PaginatedResponse<CaseInstanceGetResponse> when pagination options are used.
2177
+ * {@link CaseInstanceGetResponse}
2178
+ * @example
2179
+ * ```typescript
2180
+ * // Get all case instances (non-paginated)
2181
+ * const instances = await sdk.maestro.cases.instances.getAll();
2182
+ *
2183
+ * // Cancel/Close faulted instances using methods directly on instances
2184
+ * for (const instance of instances.items) {
2185
+ * if (instance.latestRunStatus === 'Faulted') {
2186
+ * await instance.close({ comment: 'Closing faulted case instance' });
2187
+ * }
2188
+ * }
2189
+ *
2190
+ * // With filtering
2191
+ * const instances = await sdk.maestro.cases.instances.getAll({
2192
+ * processKey: 'MyCaseProcess'
2193
+ * });
2194
+ *
2195
+ * // First page with pagination
2196
+ * const page1 = await sdk.maestro.cases.instances.getAll({ pageSize: 10 });
2197
+ *
2198
+ * // Navigate using cursor
2199
+ * if (page1.hasNextPage) {
2200
+ * const page2 = await sdk.maestro.cases.instances.getAll({ cursor: page1.nextCursor });
2201
+ * }
2202
+ * ```
2203
+ */
2204
+ getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
2205
+ /**
2206
+ * Get a specific case instance by ID
2207
+ * @param instanceId - The case instance ID
2208
+ * @param folderKey - Required folder key
2209
+ * @returns Promise resolving to case instance with methods
2210
+ * {@link CaseInstanceGetResponse}
2211
+ * @example
2212
+ * ```typescript
2213
+ * // Get a specific case instance
2214
+ * const instance = await sdk.maestro.cases.instances.getById(
2215
+ * <instanceId>,
2216
+ * <folderKey>
2217
+ * );
2218
+ *
2219
+ * // Access instance properties
2220
+ * console.log(`Status: ${instance.latestRunStatus}`);
2221
+ *
2222
+ * ```
2223
+ */
2224
+ getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
2225
+ /**
2226
+ * Close/Cancel a case instance
2227
+ * @param instanceId - The ID of the instance to cancel
2228
+ * @param folderKey - Required folder key
2229
+ * @param options - Optional close options with comment
2230
+ * @returns Promise resolving to operation result with instance data
2231
+ * @example
2232
+ * ```typescript
2233
+ * // Close a case instance
2234
+ * const result = await sdk.maestro.cases.instances.close(
2235
+ * <instanceId>,
2236
+ * <folderKey>
2237
+ * );
2238
+ *
2239
+ * if (result.success) {
2240
+ * console.log(`Instance ${result.data.instanceId} now has status: ${result.data.status}`);
2241
+ * }
2242
+ *
2243
+ * // Close with a comment
2244
+ * const result = await sdk.maestro.cases.instances.close(
2245
+ * <instanceId>,
2246
+ * <folderKey>,
2247
+ * { comment: <comment> }
2248
+ * );
2249
+ *
2250
+ * // Close multiple faulted instances
2251
+ * const instances = await sdk.maestro.cases.instances.getAll({
2252
+ * latestRunStatus: "Faulted"
2253
+ * });
2254
+ *
2255
+ * for (const instance of instances.items) {
2256
+ * const result = await sdk.maestro.cases.instances.close(
2257
+ * instance.instanceId,
2258
+ * instance.folderKey,
2259
+ * { comment: <comment> }
2260
+ * );
2261
+ *
2262
+ * if (result.success) {
2263
+ * console.log(`Closed instance: ${result.data.instanceId}`);
2264
+ * }
2265
+ * }
2266
+ * ```
2267
+ */
2268
+ close(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2269
+ /**
2270
+ * Pause a case instance
2271
+ * @param instanceId - The ID of the instance to pause
2272
+ * @param folderKey - Required folder key
2273
+ * @param options - Optional pause options with comment
2274
+ * @returns Promise resolving to operation result with instance data
2275
+ */
2276
+ pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2277
+ /**
2278
+ * Resume a case instance
2279
+ * @param instanceId - The ID of the instance to resume
2280
+ * @param folderKey - Required folder key
2281
+ * @param options - Optional resume options with comment
2282
+ * @returns Promise resolving to operation result with instance data
2283
+ */
2284
+ resume(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2285
+ /**
2286
+ * Get execution history for a case instance
2287
+ * @param instanceId - The ID of the case instance
2288
+ * @param folderKey - Required folder key
2289
+ * @returns Promise resolving to instance execution history
2290
+ * {@link CaseInstanceExecutionHistoryResponse}
2291
+ * @example
2292
+ * ```typescript
2293
+ * // Get execution history for a case instance
2294
+ * const history = await sdk.maestro.cases.instances.getExecutionHistory(
2295
+ * <instanceId>,
2296
+ * <folderKey>
2297
+ * );
2298
+ *
2299
+ * // Access element executions
2300
+ * if (history.elementExecutions) {
2301
+ * for (const execution of history.elementExecutions) {
2302
+ * console.log(`Element: ${execution.elementName} - Status: ${execution.status}`);
2303
+ * }
2304
+ * }
2305
+ * ```
2306
+ */
2307
+ getExecutionHistory(instanceId: string, folderKey: string): Promise<CaseInstanceExecutionHistoryResponse>;
2308
+ /**
2309
+ * Get stages and its associated tasks information for a case instance
2310
+ * @param caseInstanceId - The ID of the case instance
2311
+ * @param folderKey - Required folder key
2312
+ * @returns Promise resolving to an array of case stages with their tasks and status
2313
+ * @example
2314
+ * ```typescript
2315
+ * // Get stages for a case instance
2316
+ * const stages = await sdk.maestro.cases.instances.getStages(
2317
+ * <caseInstanceId>,
2318
+ * <folderKey>
2319
+ * );
2320
+ *
2321
+ * // Iterate through stages
2322
+ * for (const stage of stages) {
2323
+ * console.log(`Stage: ${stage.name} - Status: ${stage.status}`);
2324
+ *
2325
+ * // Check tasks in the stage
2326
+ * for (const taskGroup of stage.tasks) {
2327
+ * for (const task of taskGroup) {
2328
+ * console.log(` Task: ${task.name} - Status: ${task.status}`);
2329
+ * }
2330
+ * }
2331
+ * }
2332
+ * ```
2333
+ */
2334
+ getStages(caseInstanceId: string, folderKey: string): Promise<CaseGetStageResponse[]>;
2335
+ /**
2336
+ * Get human in the loop tasks associated with a case instance
2337
+ *
2338
+ * The method returns either:
2339
+ * - An array of tasks (when no pagination parameters are provided)
2340
+ * - A paginated result with navigation cursors (when any pagination parameter is provided)
2341
+ *
2342
+ * @param caseInstanceId - The ID of the case instance
2343
+ * @param options - Optional filtering and pagination options
2344
+ * @returns Promise resolving to human in the loop tasks associated with the case instance
2345
+ * @example
2346
+ * ```typescript
2347
+ * // Get all tasks for a case instance (non-paginated)
2348
+ * const tasks = await sdk.maestro.cases.instances.getActionTasks(
2349
+ * <caseInstanceId>,
2350
+ * );
2351
+ *
2352
+ * // First page with pagination
2353
+ * const page1 = await sdk.maestro.cases.instances.getActionTasks(
2354
+ * <caseInstanceId>,
2355
+ * { pageSize: 10 }
2356
+ * );
2357
+ * // Iterate through tasks
2358
+ * for (const task of page1.items) {
2359
+ * console.log(`Task: ${task.title}`);
2360
+ * console.log(`Task: ${task.status}`);
2361
+ * }
2362
+ *
2363
+ * // Jump to specific page
2364
+ * const page5 = await sdk.maestro.cases.instances.getActionTasks(
2365
+ * <caseInstanceId>,
2366
+ * {
2367
+ * jumpToPage: 5,
2368
+ * pageSize: 10
2369
+ * }
2370
+ * );
2371
+ * ```
2372
+ */
2373
+ getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
2374
+ }
2375
+ interface CaseInstanceMethods {
2376
+ /**
2377
+ * Closes/cancels this case instance
2378
+ *
2379
+ * @param options - Optional close options with comment
2380
+ * @returns Promise resolving to operation result
2381
+ */
2382
+ close(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2383
+ /**
2384
+ * Pauses this case instance
2385
+ *
2386
+ * @param options - Optional pause options with comment
2387
+ * @returns Promise resolving to operation result
2388
+ */
2389
+ pause(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2390
+ /**
2391
+ * Resumes this case instance
2392
+ *
2393
+ * @param options - Optional resume options with comment
2394
+ * @returns Promise resolving to operation result
2395
+ */
2396
+ resume(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
2397
+ }
2398
+ type CaseInstanceGetResponse = RawCaseInstanceGetResponse & CaseInstanceMethods;
2399
+ /**
2400
+ * Creates an actionable case instance by combining API case instance data with operational methods.
2401
+ *
2402
+ * @param instanceData - The case instance data from API
2403
+ * @param service - The case instance service instance
2404
+ * @returns A case instance object with added methods
2405
+ */
2406
+ declare function createCaseInstanceWithMethods(instanceData: RawCaseInstanceGetResponse, service: CaseInstancesServiceModel): CaseInstanceGetResponse;
2407
+
1572
2408
  /**
1573
2409
  * Service for interacting with Maestro Processes
1574
2410
  */
@@ -1667,53 +2503,256 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
1667
2503
  * @param options Optional cancellation options with comment
1668
2504
  * @returns Promise resolving to operation result with updated instance data
1669
2505
  */
1670
- cancel(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2506
+ cancel(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2507
+ /**
2508
+ * Pause a process instance
2509
+ * @param instanceId The ID of the instance to pause
2510
+ * @param folderKey The folder key for authorization
2511
+ * @param options Optional pause options with comment
2512
+ * @returns Promise resolving to operation result with updated instance data
2513
+ */
2514
+ pause(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2515
+ /**
2516
+ * Resume a process instance
2517
+ * @param instanceId The ID of the instance to resume
2518
+ * @param folderKey The folder key for authorization
2519
+ * @param options Optional resume options with comment
2520
+ * @returns Promise resolving to operation result with updated instance data
2521
+ */
2522
+ resume(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2523
+ /**
2524
+ * Parses BPMN XML to extract variable metadata from uipath:inputOutput elements
2525
+ * @private
2526
+ * @param bpmnXml The BPMN XML string
2527
+ * @returns Map of variable ID to metadata
2528
+ */
2529
+ private parseBpmnVariables;
2530
+ /**
2531
+ * Extracts element names from BPMN XML and maps them to their element IDs
2532
+ * @private
2533
+ * @param bpmnXml The BPMN XML string
2534
+ * @returns Map of elementId to element name
2535
+ */
2536
+ private getVariableSource;
2537
+ /**
2538
+ * Enriches global variables with metadata from BPMN
2539
+ * @private
2540
+ * @param globals The raw globals object from API response
2541
+ * @param variableMetadata The parsed BPMN variable metadata
2542
+ * @returns Array of global variables
2543
+ */
2544
+ private transformGlobalVariables;
2545
+ /**
2546
+ * Get global variables for a process instance
2547
+ * @param instanceId The ID of the instance to get variables for
2548
+ * @param folderKey The folder key for authorization
2549
+ * @param options Optional options including parentElementId to filter by parent element
2550
+ * @returns Promise<ProcessInstanceGetVariablesResponse>
2551
+ */
2552
+ getVariables(instanceId: string, folderKey: string, options?: ProcessInstanceGetVariablesOptions): Promise<ProcessInstanceGetVariablesResponse>;
2553
+ }
2554
+
2555
+ /**
2556
+ * Service for interacting with UiPath Maestro Cases
2557
+ */
2558
+ declare class CasesService extends BaseService implements CasesServiceModel {
2559
+ /**
2560
+ * @hideconstructor
2561
+ */
2562
+ constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
2563
+ /**
2564
+ * Get all case management processes with their instance statistics
2565
+ * @returns Promise resolving to array of Case objects
2566
+ *
2567
+ * @example
2568
+ * ```typescript
2569
+ * // Get all case management processes
2570
+ * const cases = await sdk.maestro.cases.getAll();
2571
+ *
2572
+ * // Access case information
2573
+ * for (const caseProcess of cases) {
2574
+ * console.log(`Case Process: ${caseProcess.processKey}`);
2575
+ * console.log(`Running instances: ${caseProcess.runningCount}`);
2576
+ * console.log(`Completed instances: ${caseProcess.completedCount}`);
2577
+ * }
2578
+ *
2579
+ * ```
2580
+ */
2581
+ getAll(): Promise<CaseGetAllResponse[]>;
2582
+ /**
2583
+ * Extract a readable case name from the packageId
2584
+ * @param packageId - The full package identifier
2585
+ * @returns A human-readable case name
2586
+ * @private
2587
+ */
2588
+ private extractCaseName;
2589
+ }
2590
+
2591
+ declare class CaseInstancesService extends BaseService implements CaseInstancesServiceModel {
2592
+ private taskService;
2593
+ /**
2594
+ * @hideconstructor
2595
+ */
2596
+ constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
2597
+ /**
2598
+ * Get all case instances with optional filtering and pagination
2599
+ *
2600
+ * The method returns either:
2601
+ * - A NonPaginatedResponse with items array (when no pagination parameters are provided)
2602
+ * - A PaginatedResponse with navigation cursors (when any pagination parameter is provided)
2603
+ *
2604
+ * @param options -Query parameters for filtering instances and pagination
2605
+ * @returns Promise resolving to case instances or paginated result
2606
+ *
2607
+ * @example
2608
+ * ```typescript
2609
+ * // Get all case instances (non-paginated)
2610
+ * const instances = await sdk.maestro.cases.instances.getAll();
2611
+ *
2612
+ * // Close faulted instances using methods directly on instances
2613
+ * for (const instance of instances.items) {
2614
+ * if (instance.latestRunStatus === 'Faulted') {
2615
+ * await instance.close({ comment: 'Closing faulted case instance' });
2616
+ * }
2617
+ * }
2618
+ *
2619
+ * // With filtering
2620
+ * const instances = await sdk.maestro.cases.instances.getAll({
2621
+ * processKey: 'MyCaseProcess'
2622
+ * });
2623
+ *
2624
+ * // First page with pagination
2625
+ * const page1 = await sdk.maestro.cases.instances.getAll({ pageSize: 10 });
2626
+ *
2627
+ * // Navigate using cursor
2628
+ * if (page1.hasNextPage) {
2629
+ * const page2 = await sdk.maestro.cases.instances.getAll({ cursor: page1.nextCursor });
2630
+ * }
2631
+ * ```
2632
+ */
2633
+ getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
2634
+ /**
2635
+ * Get a case instance by ID with operation methods (close, pause, resume)
2636
+ * @param instanceId - The ID of the instance to retrieve
2637
+ * @param folderKey - Required folder key
2638
+ * @returns Promise<CaseInstanceGetResponse>
2639
+ */
2640
+ getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
2641
+ /**
2642
+ * Enhance a single case instance with case JSON data
2643
+ * @param instance - The case instance to enhance
2644
+ * @returns Promise resolving to enhanced instance
2645
+ * @private
2646
+ */
2647
+ private enhanceInstanceWithCaseJson;
2648
+ /**
2649
+ * Enhance multiple case instances with case JSON data
2650
+ * @param instances - Array of case instances to enhance
2651
+ * @returns Promise resolving to array of enhanced instances
2652
+ * @private
2653
+ */
2654
+ private enhanceInstancesWithCaseJson;
2655
+ /**
2656
+ * Get case JSON for a specific instance
2657
+ * @param instanceId - The case instance ID
2658
+ * @param folderKey - Required folder key
2659
+ * @returns Promise resolving to case JSON data
2660
+ * @private
2661
+ */
2662
+ private getCaseJson;
2663
+ /**
2664
+ * Close a case instance
2665
+ * @param instanceId - The ID of the instance to cancel
2666
+ * @param folderKey - Required folder key
2667
+ * @param options - Optional cancellation options with comment
2668
+ * @returns Promise resolving to operation result with updated instance data
2669
+ */
2670
+ close(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
1671
2671
  /**
1672
- * Pause a process instance
1673
- * @param instanceId The ID of the instance to pause
1674
- * @param folderKey The folder key for authorization
1675
- * @param options Optional pause options with comment
2672
+ * Pause a case instance
2673
+ * @param instanceId - The ID of the instance to pause
2674
+ * @param folderKey - Required folder key
2675
+ * @param options - Optional pause options with comment
1676
2676
  * @returns Promise resolving to operation result with updated instance data
1677
2677
  */
1678
- pause(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2678
+ pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
1679
2679
  /**
1680
- * Resume a process instance
1681
- * @param instanceId The ID of the instance to resume
1682
- * @param folderKey The folder key for authorization
1683
- * @param options Optional resume options with comment
2680
+ * Resume a case instance
2681
+ * @param instanceId - The ID of the instance to resume
2682
+ * @param folderKey - Required folder key
2683
+ * @param options - Optional resume options with comment
1684
2684
  * @returns Promise resolving to operation result with updated instance data
1685
2685
  */
1686
- resume(instanceId: string, folderKey: string, options?: ProcessInstanceOperationOptions): Promise<OperationResponse<ProcessInstanceOperationResponse>>;
2686
+ resume(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
1687
2687
  /**
1688
- * Parses BPMN XML to extract variable metadata from uipath:inputOutput elements
2688
+ * Get execution history for a case instance
2689
+ * @param instanceId - The ID of the case instance
2690
+ * @param folderKey - Required folder key
2691
+ * @returns Promise resolving to instance execution history
2692
+ * @example
2693
+ * ```typescript
2694
+ * // Get execution history for a case instance
2695
+ * const history = await sdk.maestro.cases.instances.getExecutionHistory(
2696
+ * 'instance-id',
2697
+ * 'folder-key'
2698
+ * );
2699
+ * ```
2700
+ */
2701
+ getExecutionHistory(instanceId: string, folderKey: string): Promise<CaseInstanceExecutionHistoryResponse>;
2702
+ /**
2703
+ * Get case stages with their associated tasks and execution status
2704
+ * @param caseInstanceId - The ID of the case instance
2705
+ * @param folderKey - Required folder key
2706
+ * @returns Promise resolving to an array of case stages, each containing their tasks with execution details
2707
+ */
2708
+ getStages(caseInstanceId: string, folderKey: string): Promise<CaseGetStageResponse[]>;
2709
+ /**
2710
+ * Create a map of element ID to execution data
2711
+ * @param executionHistory - The execution history response
2712
+ * @returns Map of elementId to execution metadata
1689
2713
  * @private
1690
- * @param bpmnXml The BPMN XML string
1691
- * @returns Map of variable ID to metadata
1692
2714
  */
1693
- private parseBpmnVariables;
2715
+ private createExecutionMap;
1694
2716
  /**
1695
- * Extracts element names from BPMN XML and maps them to their element IDs
2717
+ * Create a map of binding IDs to their values
2718
+ * @param caseJsonResponse - The case JSON response
2719
+ * @returns Map of binding ID to binding object
1696
2720
  * @private
1697
- * @param bpmnXml The BPMN XML string
1698
- * @returns Map of elementId to element name
1699
2721
  */
1700
- private getVariableSource;
2722
+ private createBindingsMap;
1701
2723
  /**
1702
- * Enriches global variables with metadata from BPMN
2724
+ * Resolve binding values from binding expressions
2725
+ * @param value - The value that may contain binding references
2726
+ * @param bindingsMap - Map of binding IDs to binding objects
2727
+ * @returns Resolved value
1703
2728
  * @private
1704
- * @param globals The raw globals object from API response
1705
- * @param variableMetadata The parsed BPMN variable metadata
1706
- * @returns Array of global variables
1707
2729
  */
1708
- private transformGlobalVariables;
2730
+ private resolveBinding;
1709
2731
  /**
1710
- * Get global variables for a process instance
1711
- * @param instanceId The ID of the instance to get variables for
1712
- * @param folderKey The folder key for authorization
1713
- * @param options Optional options including parentElementId to filter by parent element
1714
- * @returns Promise<ProcessInstanceGetVariablesResponse>
2732
+ * Process tasks for a stage node
2733
+ * @param node - The stage node containing tasks
2734
+ * @param executionMap - Map of element IDs to execution data
2735
+ * @param bindingsMap - Map of binding IDs to binding objects
2736
+ * @returns Processed tasks array
2737
+ * @private
1715
2738
  */
1716
- getVariables(instanceId: string, folderKey: string, options?: ProcessInstanceGetVariablesOptions): Promise<ProcessInstanceGetVariablesResponse>;
2739
+ private processTasks;
2740
+ /**
2741
+ * Create a stage from a case node
2742
+ * @param node - The case node to process
2743
+ * @param executionMap - Map of element IDs to execution data
2744
+ * @param bindingsMap - Map of binding IDs to binding objects
2745
+ * @returns CaseGetStageResponse object
2746
+ * @private
2747
+ */
2748
+ private createStageFromNode;
2749
+ /**
2750
+ * Get human in the loop tasks associated with a case instance
2751
+ * @param caseInstanceId - The ID of the case instance
2752
+ * @param options - Optional filtering and pagination options
2753
+ * @returns Promise resolving to human in the loop tasks associated with the case instance
2754
+ */
2755
+ getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
1717
2756
  }
1718
2757
 
1719
2758
  /**
@@ -2688,593 +3727,340 @@ type ProcessGetAllOptions = RequestOptions & PaginationOptions & {
2688
3727
  /**
2689
3728
  * Options for getting a single process by ID
2690
3729
  */
2691
- type ProcessGetByIdOptions = BaseOptions;
2692
-
2693
- /**
2694
- * Service for managing and executing UiPath Automation Processes.
2695
- *
2696
- * Processes (also known as automations or workflows) are the core units of automation in UiPath, representing sequences of activities that perform specific business tasks. [UiPath Processes Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-processes)
2697
- */
2698
- interface ProcessServiceModel {
2699
- /**
2700
- * Gets all processes across folders with optional filtering
2701
- * Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
2702
- * or a PaginatedResponse when any pagination parameter is provided
2703
- *
2704
- * @param options - Query options including optional folderId and pagination options
2705
- * @returns Promise resolving to either an array of processes NonPaginatedResponse<ProcessGetResponse> or a PaginatedResponse<ProcessGetResponse> when pagination options are used.
2706
- * {@link ProcessGetResponse}
2707
- * @example
2708
- * ```typescript
2709
- * // Standard array return
2710
- * const processes = await sdk.processes.getAll();
2711
- *
2712
- * // Get processes within a specific folder
2713
- * const processes = await sdk.processes.getAll({
2714
- * folderId: <folderId>
2715
- * });
2716
- *
2717
- * // Get processes with filtering
2718
- * const processes = await sdk.processes.getAll({
2719
- * filter: "name eq 'MyProcess'"
2720
- * });
2721
- *
2722
- * // First page with pagination
2723
- * const page1 = await sdk.processes.getAll({ pageSize: 10 });
2724
- *
2725
- * // Navigate using cursor
2726
- * if (page1.hasNextPage) {
2727
- * const page2 = await sdk.processes.getAll({ cursor: page1.nextCursor });
2728
- * }
2729
- *
2730
- * // Jump to specific page
2731
- * const page5 = await sdk.processes.getAll({
2732
- * jumpToPage: 5,
2733
- * pageSize: 10
2734
- * });
2735
- * ```
2736
- */
2737
- getAll<T extends ProcessGetAllOptions = ProcessGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<ProcessGetResponse> : NonPaginatedResponse<ProcessGetResponse>>;
2738
- /**
2739
- * Gets a single process by ID
2740
- *
2741
- * @param id - Process ID
2742
- * @param folderId - Required folder ID
2743
- * @param options - Optional query parameters
2744
- * @returns Promise resolving to a single process
2745
- * {@link ProcessGetResponse}
2746
- * @example
2747
- * ```typescript
2748
- * // Get process by ID
2749
- * const process = await sdk.processes.getById(<processId>, <folderId>);
2750
- * ```
2751
- */
2752
- getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
2753
- /**
2754
- * Starts a process with the specified configuration
2755
- *
2756
- * @param request - Process start configuration
2757
- * @param folderId - Required folder ID
2758
- * @param options - Optional request options
2759
- * @returns Promise resolving to array of started process instances
2760
- * {@link ProcessStartResponse}
2761
- * @example
2762
- * ```typescript
2763
- * // Start a process by process key
2764
- * const process = await sdk.processes.start({
2765
- * processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
2766
- * }, <folderId>); // folderId is required
2767
- *
2768
- * // Start a process by name with specific robots
2769
- * const process = await sdk.processes.start({
2770
- * processName: "MyProcess"
2771
- * }, <folderId>); // folderId is required
2772
- * ```
2773
- */
2774
- start(request: ProcessStartRequest, folderId: number, options?: RequestOptions): Promise<ProcessStartResponse[]>;
2775
- }
2776
-
2777
- /**
2778
- * Service for interacting with UiPath Orchestrator Processes API
2779
- */
2780
- declare class ProcessService extends BaseService implements ProcessServiceModel {
2781
- /**
2782
- * @hideconstructor
2783
- */
2784
- constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
2785
- /**
2786
- * Gets all processes across folders with optional filtering and folder scoping
2787
- *
2788
- * The method returns either:
2789
- * - An array of processes (when no pagination parameters are provided)
2790
- * - A paginated result with navigation cursors (when any pagination parameter is provided)
2791
- *
2792
- * @param options - Query options including optional folderId
2793
- * @returns Promise resolving to an array of processes or paginated result
2794
- *
2795
- * @example
2796
- * ```typescript
2797
- * // Standard array return
2798
- * const processes = await sdk.processes.getAll();
2799
- *
2800
- * // Get processes within a specific folder
2801
- * const processes = await sdk.processes.getAll({
2802
- * folderId: 123
2803
- * });
2804
- *
2805
- * // Get processes with filtering
2806
- * const processes = await sdk.processes.getAll({
2807
- * filter: "name eq 'MyProcess'"
2808
- * });
2809
- *
2810
- * // First page with pagination
2811
- * const page1 = await sdk.processes.getAll({ pageSize: 10 });
2812
- *
2813
- * // Navigate using cursor
2814
- * if (page1.hasNextPage) {
2815
- * const page2 = await sdk.processes.getAll({ cursor: page1.nextCursor });
2816
- * }
2817
- *
2818
- * // Jump to specific page
2819
- * const page5 = await sdk.processes.getAll({
2820
- * jumpToPage: 5,
2821
- * pageSize: 10
2822
- * });
2823
- * ```
2824
- */
2825
- getAll<T extends ProcessGetAllOptions = ProcessGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<ProcessGetResponse> : NonPaginatedResponse<ProcessGetResponse>>;
2826
- /**
2827
- * Starts a process execution (job)
2828
- *
2829
- * @param request - Process start request body
2830
- * @param folderId - Required folder ID
2831
- * @param options - Optional query parameters
2832
- * @returns Promise resolving to the created jobs
2833
- *
2834
- * @example
2835
- * ```typescript
2836
- * // Start a process by process key
2837
- * const jobs = await sdk.processes.start({
2838
- * processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
2839
- * }, 123); // folderId is required
2840
- *
2841
- * // Start a process by name with specific robots
2842
- * const jobs = await sdk.processes.start({
2843
- * processName: "MyProcess"
2844
- * }, 123); // folderId is required
2845
- * ```
2846
- */
2847
- start(request: ProcessStartRequest, folderId: number, options?: RequestOptions): Promise<ProcessStartResponse[]>;
2848
- /**
2849
- * Gets a single process by ID
2850
- *
2851
- * @param id - Process ID
2852
- * @param folderId - Required folder ID
2853
- * @param options - Optional query parameters
2854
- * @returns Promise resolving to a single process
2855
- *
2856
- * @example
2857
- * ```typescript
2858
- * // Get process by ID
2859
- * const process = await sdk.processes.getById(123, 456);
2860
- * ```
2861
- */
2862
- getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
2863
- }
2864
-
2865
- /**
2866
- * Interface for queue response
2867
- */
2868
- interface QueueGetResponse {
2869
- key: string;
2870
- name: string;
2871
- id: number;
2872
- description: string;
2873
- maxNumberOfRetries: number;
2874
- acceptAutomaticallyRetry: boolean;
2875
- retryAbandonedItems: boolean;
2876
- enforceUniqueReference: boolean;
2877
- encrypted: boolean;
2878
- specificDataJsonSchema: string | null;
2879
- outputDataJsonSchema: string | null;
2880
- analyticsDataJsonSchema: string | null;
2881
- createdTime: string;
2882
- processScheduleId: number | null;
2883
- slaInMinutes: number;
2884
- riskSlaInMinutes: number;
2885
- releaseId: number | null;
2886
- isProcessInCurrentFolder: boolean | null;
2887
- foldersCount: number;
2888
- folderId: number;
2889
- folderName: string;
2890
- }
2891
- /**
2892
- * Options for getting queues across folders
2893
- */
2894
- type QueueGetAllOptions = RequestOptions & PaginationOptions & {
2895
- /**
2896
- * Optional folder ID to filter queues by folder
2897
- */
2898
- folderId?: number;
2899
- };
2900
- type QueueGetByIdOptions = BaseOptions;
3730
+ type ProcessGetByIdOptions = BaseOptions;
2901
3731
 
2902
3732
  /**
2903
- * Service for managing UiPath Queues
3733
+ * Service for managing and executing UiPath Automation Processes.
2904
3734
  *
2905
- * Queues are a fundamental component of UiPath automation that enable distributed and scalable processing of work items. [UiPath Queues Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions)
3735
+ * Processes (also known as automations or workflows) are the core units of automation in UiPath, representing sequences of activities that perform specific business tasks. [UiPath Processes Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-processes)
2906
3736
  */
2907
- interface QueueServiceModel {
3737
+ interface ProcessServiceModel {
2908
3738
  /**
2909
- * Gets all queues across folders with optional filtering and folder scoping
3739
+ * Gets all processes across folders with optional filtering
3740
+ * Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
3741
+ * or a PaginatedResponse when any pagination parameter is provided
2910
3742
  *
2911
- * @signature getAll(options?) Promise&lt;QueueGetResponse[]&gt;
2912
- * @param options Query options including optional folderId and pagination options
2913
- * @returns Promise resolving to either an array of queues NonPaginatedResponse<QueueGetResponse> or a PaginatedResponse<QueueGetResponse> when pagination options are used.
2914
- * {@link QueueGetResponse}
3743
+ * @param options - Query options including optional folderId and pagination options
3744
+ * @returns Promise resolving to either an array of processes NonPaginatedResponse<ProcessGetResponse> or a PaginatedResponse<ProcessGetResponse> when pagination options are used.
3745
+ * {@link ProcessGetResponse}
2915
3746
  * @example
2916
3747
  * ```typescript
2917
3748
  * // Standard array return
2918
- * const queues = await sdk.queues.getAll();
3749
+ * const processes = await sdk.processes.getAll();
2919
3750
  *
2920
- * // Get queues within a specific folder
2921
- * const queues = await sdk.queues.getAll({
3751
+ * // Get processes within a specific folder
3752
+ * const processes = await sdk.processes.getAll({
2922
3753
  * folderId: <folderId>
2923
3754
  * });
2924
3755
  *
2925
- * // Get queues with filtering
2926
- * const queues = await sdk.queues.getAll({
2927
- * filter: "name eq 'MyQueue'"
3756
+ * // Get processes with filtering
3757
+ * const processes = await sdk.processes.getAll({
3758
+ * filter: "name eq 'MyProcess'"
2928
3759
  * });
2929
3760
  *
2930
3761
  * // First page with pagination
2931
- * const page1 = await sdk.queues.getAll({ pageSize: 10 });
3762
+ * const page1 = await sdk.processes.getAll({ pageSize: 10 });
2932
3763
  *
2933
3764
  * // Navigate using cursor
2934
3765
  * if (page1.hasNextPage) {
2935
- * const page2 = await sdk.queues.getAll({ cursor: page1.nextCursor });
3766
+ * const page2 = await sdk.processes.getAll({ cursor: page1.nextCursor });
2936
3767
  * }
2937
3768
  *
2938
3769
  * // Jump to specific page
2939
- * const page5 = await sdk.queues.getAll({
3770
+ * const page5 = await sdk.processes.getAll({
2940
3771
  * jumpToPage: 5,
2941
3772
  * pageSize: 10
2942
3773
  * });
2943
3774
  * ```
2944
3775
  */
2945
- getAll<T extends QueueGetAllOptions = QueueGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<QueueGetResponse> : NonPaginatedResponse<QueueGetResponse>>;
3776
+ getAll<T extends ProcessGetAllOptions = ProcessGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<ProcessGetResponse> : NonPaginatedResponse<ProcessGetResponse>>;
2946
3777
  /**
2947
- * Gets a single queue by ID
3778
+ * Gets a single process by ID
2948
3779
  *
2949
- * @param id - Queue ID
3780
+ * @param id - Process ID
2950
3781
  * @param folderId - Required folder ID
2951
- * @returns Promise resolving to a queue definition
3782
+ * @param options - Optional query parameters
3783
+ * @returns Promise resolving to a single process
3784
+ * {@link ProcessGetResponse}
2952
3785
  * @example
2953
3786
  * ```typescript
2954
- * // Get queue by ID
2955
- * const queue = await sdk.queues.getById(<queueId>, <folderId>);
3787
+ * // Get process by ID
3788
+ * const process = await sdk.processes.getById(<processId>, <folderId>);
2956
3789
  * ```
2957
3790
  */
2958
- getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
3791
+ getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
3792
+ /**
3793
+ * Starts a process with the specified configuration
3794
+ *
3795
+ * @param request - Process start configuration
3796
+ * @param folderId - Required folder ID
3797
+ * @param options - Optional request options
3798
+ * @returns Promise resolving to array of started process instances
3799
+ * {@link ProcessStartResponse}
3800
+ * @example
3801
+ * ```typescript
3802
+ * // Start a process by process key
3803
+ * const process = await sdk.processes.start({
3804
+ * processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3805
+ * }, <folderId>); // folderId is required
3806
+ *
3807
+ * // Start a process by name with specific robots
3808
+ * const process = await sdk.processes.start({
3809
+ * processName: "MyProcess"
3810
+ * }, <folderId>); // folderId is required
3811
+ * ```
3812
+ */
3813
+ start(request: ProcessStartRequest, folderId: number, options?: RequestOptions): Promise<ProcessStartResponse[]>;
2959
3814
  }
2960
3815
 
2961
3816
  /**
2962
- * Service for interacting with UiPath Orchestrator Queues API
3817
+ * Service for interacting with UiPath Orchestrator Processes API
2963
3818
  */
2964
- declare class QueueService extends FolderScopedService implements QueueServiceModel {
3819
+ declare class ProcessService extends BaseService implements ProcessServiceModel {
2965
3820
  /**
2966
3821
  * @hideconstructor
2967
3822
  */
2968
3823
  constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
2969
3824
  /**
2970
- * Gets all queues across folders with optional filtering and folder scoping
3825
+ * Gets all processes across folders with optional filtering and folder scoping
2971
3826
  *
2972
3827
  * The method returns either:
2973
- * - An array of queues (when no pagination parameters are provided)
3828
+ * - An array of processes (when no pagination parameters are provided)
2974
3829
  * - A paginated result with navigation cursors (when any pagination parameter is provided)
2975
3830
  *
2976
3831
  * @param options - Query options including optional folderId
2977
- * @returns Promise resolving to an array of queues or paginated result
3832
+ * @returns Promise resolving to an array of processes or paginated result
2978
3833
  *
2979
3834
  * @example
2980
3835
  * ```typescript
2981
3836
  * // Standard array return
2982
- * const queues = await sdk.queues.getAll();
3837
+ * const processes = await sdk.processes.getAll();
2983
3838
  *
2984
- * // Get queues within a specific folder
2985
- * const queues = await sdk.queues.getAll({
3839
+ * // Get processes within a specific folder
3840
+ * const processes = await sdk.processes.getAll({
2986
3841
  * folderId: 123
2987
3842
  * });
2988
3843
  *
2989
- * // Get queues with filtering
2990
- * const queues = await sdk.queues.getAll({
2991
- * filter: "name eq 'MyQueue'"
3844
+ * // Get processes with filtering
3845
+ * const processes = await sdk.processes.getAll({
3846
+ * filter: "name eq 'MyProcess'"
2992
3847
  * });
2993
3848
  *
2994
3849
  * // First page with pagination
2995
- * const page1 = await sdk.queues.getAll({ pageSize: 10 });
3850
+ * const page1 = await sdk.processes.getAll({ pageSize: 10 });
2996
3851
  *
2997
3852
  * // Navigate using cursor
2998
3853
  * if (page1.hasNextPage) {
2999
- * const page2 = await sdk.queues.getAll({ cursor: page1.nextCursor });
3854
+ * const page2 = await sdk.processes.getAll({ cursor: page1.nextCursor });
3000
3855
  * }
3001
3856
  *
3002
3857
  * // Jump to specific page
3003
- * const page5 = await sdk.queues.getAll({
3858
+ * const page5 = await sdk.processes.getAll({
3004
3859
  * jumpToPage: 5,
3005
3860
  * pageSize: 10
3006
3861
  * });
3007
3862
  * ```
3008
3863
  */
3009
- getAll<T extends QueueGetAllOptions = QueueGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<QueueGetResponse> : NonPaginatedResponse<QueueGetResponse>>;
3864
+ getAll<T extends ProcessGetAllOptions = ProcessGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<ProcessGetResponse> : NonPaginatedResponse<ProcessGetResponse>>;
3010
3865
  /**
3011
- * Gets a single queue by ID
3866
+ * Starts a process execution (job)
3012
3867
  *
3013
- * @param id - Queue ID
3868
+ * @param request - Process start request body
3014
3869
  * @param folderId - Required folder ID
3015
- * @returns Promise resolving to a queue definition
3870
+ * @param options - Optional query parameters
3871
+ * @returns Promise resolving to the created jobs
3016
3872
  *
3017
3873
  * @example
3018
3874
  * ```typescript
3019
- * // Get queue by ID
3020
- * const queue = await sdk.queues.getById(123, 456);
3021
- * ```
3022
- */
3023
- getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
3024
- }
3025
-
3026
- interface UserLoginInfo {
3027
- name: string;
3028
- surname: string;
3029
- userName: string;
3030
- emailAddress: string;
3031
- displayName: string;
3032
- id: number;
3033
- }
3034
- declare enum TaskType {
3035
- Form = "FormTask",
3036
- External = "ExternalTask",
3037
- App = "AppTask"
3038
- }
3039
- declare enum TaskPriority {
3040
- Low = "Low",
3041
- Medium = "Medium",
3042
- High = "High",
3043
- Critical = "Critical"
3044
- }
3045
- declare enum TaskStatus {
3046
- Unassigned = "Unassigned",
3047
- Pending = "Pending",
3048
- Completed = "Completed"
3049
- }
3050
- declare enum TaskSlaCriteria {
3051
- TaskCreated = "TaskCreated",
3052
- TaskAssigned = "TaskAssigned",
3053
- TaskCompleted = "TaskCompleted"
3054
- }
3055
- declare enum TaskSlaStatus {
3056
- OverdueLater = "OverdueLater",
3057
- OverdueSoon = "OverdueSoon",
3058
- Overdue = "Overdue",
3059
- CompletedInTime = "CompletedInTime"
3060
- }
3061
- declare enum TaskSourceName {
3062
- Agent = "Agent",
3063
- Workflow = "Workflow",
3064
- Maestro = "Maestro",
3065
- Default = "Default"
3066
- }
3067
- interface TaskSource {
3068
- sourceName: TaskSourceName;
3069
- sourceId: string;
3070
- taskSourceMetadata: Record<string, unknown>;
3071
- }
3072
- interface TaskSlaDetail {
3073
- expiryTime?: string;
3074
- startCriteria?: TaskSlaCriteria;
3075
- endCriteria?: TaskSlaCriteria;
3076
- status?: TaskSlaStatus;
3077
- }
3078
- interface TaskAssignment {
3079
- assignee?: UserLoginInfo;
3080
- task?: RawTaskGetResponse;
3081
- id?: number;
3082
- }
3083
- /**
3084
- * Base interface containing common fields shared across all task response types
3085
- */
3086
- interface TaskBaseResponse {
3087
- status: TaskStatus;
3088
- title: string;
3089
- type: TaskType;
3090
- priority: TaskPriority;
3091
- organizationUnitId: number;
3092
- key: string;
3093
- isDeleted: boolean;
3094
- creationTime: string;
3095
- creatorUserId: number;
3096
- id: number;
3097
- action: string | null;
3098
- assignedToUserId: number | null;
3099
- externalTag: string | null;
3100
- lastAssignedTime: string | null;
3101
- completionTime: string | null;
3102
- parentOperationId: string | null;
3103
- deleterUserId: number | null;
3104
- deletionTime: string | null;
3105
- lastModificationTime: string | null;
3106
- }
3107
- interface TaskCreateOptions {
3108
- title: string;
3109
- priority?: TaskPriority;
3110
- }
3111
- interface RawTaskCreateResponse extends TaskBaseResponse {
3112
- waitJobState: JobState | null;
3113
- assignedToUser: UserLoginInfo | null;
3114
- taskSlaDetails: TaskSlaDetail[] | null;
3115
- completedByUser: UserLoginInfo | null;
3116
- taskAssignees: UserLoginInfo[] | null;
3117
- processingTime: number | null;
3118
- data: Record<string, unknown> | null;
3119
- }
3120
- interface RawTaskGetResponse extends TaskBaseResponse {
3121
- isCompleted: boolean;
3122
- encrypted: boolean;
3123
- bulkFormLayoutId: number | null;
3124
- formLayoutId: number | null;
3125
- taskSlaDetail: TaskSlaDetail | null;
3126
- taskAssigneeName: string | null;
3127
- lastModifierUserId: number | null;
3128
- assignedToUser?: UserLoginInfo;
3129
- creatorUser?: UserLoginInfo;
3130
- lastModifierUser?: UserLoginInfo;
3131
- taskAssignments?: TaskAssignment[];
3132
- formLayout?: Record<string, unknown>;
3133
- actionLabel?: string | null;
3134
- taskSlaDetails?: TaskSlaDetail[] | null;
3135
- completedByUser?: UserLoginInfo | null;
3136
- taskAssignmentCriteria?: string;
3137
- taskAssignees?: UserLoginInfo[] | null;
3138
- taskSource?: TaskSource | null;
3139
- processingTime?: number | null;
3140
- data?: Record<string, unknown> | null;
3141
- }
3142
- interface TaskAssignmentOptions {
3143
- taskId: number;
3144
- userId: number;
3145
- userNameOrEmail?: string;
3146
- }
3147
- interface TasksUnassignOptions {
3148
- taskIds: number[];
3149
- }
3150
- interface TaskAssignmentResponse {
3151
- taskId?: number;
3152
- userId?: number;
3153
- errorCode?: number;
3154
- errorMessage?: string;
3155
- userNameOrEmail?: string;
3156
- }
3157
- interface TaskCompletionOptions {
3158
- taskId: number;
3159
- data?: any;
3160
- action?: string;
3875
+ * // Start a process by process key
3876
+ * const jobs = await sdk.processes.start({
3877
+ * processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
3878
+ * }, 123); // folderId is required
3879
+ *
3880
+ * // Start a process by name with specific robots
3881
+ * const jobs = await sdk.processes.start({
3882
+ * processName: "MyProcess"
3883
+ * }, 123); // folderId is required
3884
+ * ```
3885
+ */
3886
+ start(request: ProcessStartRequest, folderId: number, options?: RequestOptions): Promise<ProcessStartResponse[]>;
3887
+ /**
3888
+ * Gets a single process by ID
3889
+ *
3890
+ * @param id - Process ID
3891
+ * @param folderId - Required folder ID
3892
+ * @param options - Optional query parameters
3893
+ * @returns Promise resolving to a single process
3894
+ *
3895
+ * @example
3896
+ * ```typescript
3897
+ * // Get process by ID
3898
+ * const process = await sdk.processes.getById(123, 456);
3899
+ * ```
3900
+ */
3901
+ getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
3161
3902
  }
3903
+
3162
3904
  /**
3163
- * Options for task assignment operations in the Task class
3164
- * At least one identification parameter is required
3165
- */
3166
- type TaskAssignOptions = {
3167
- userId: number;
3168
- userNameOrEmail?: string;
3169
- } | {
3170
- userId?: number;
3171
- userNameOrEmail: string;
3172
- };
3173
- /**
3174
- * Options for completing a task
3905
+ * Interface for queue response
3175
3906
  */
3176
- type TaskCompleteOptions = {
3177
- type: TaskType.External;
3178
- data?: any;
3179
- action?: string;
3180
- } | {
3181
- type: Exclude<TaskType, TaskType.External>;
3182
- data: any;
3183
- action: string;
3184
- };
3907
+ interface QueueGetResponse {
3908
+ key: string;
3909
+ name: string;
3910
+ id: number;
3911
+ description: string;
3912
+ maxNumberOfRetries: number;
3913
+ acceptAutomaticallyRetry: boolean;
3914
+ retryAbandonedItems: boolean;
3915
+ enforceUniqueReference: boolean;
3916
+ encrypted: boolean;
3917
+ specificDataJsonSchema: string | null;
3918
+ outputDataJsonSchema: string | null;
3919
+ analyticsDataJsonSchema: string | null;
3920
+ createdTime: string;
3921
+ processScheduleId: number | null;
3922
+ slaInMinutes: number;
3923
+ riskSlaInMinutes: number;
3924
+ releaseId: number | null;
3925
+ isProcessInCurrentFolder: boolean | null;
3926
+ foldersCount: number;
3927
+ folderId: number;
3928
+ folderName: string;
3929
+ }
3185
3930
  /**
3186
- * Options for getting tasks across folders
3931
+ * Options for getting queues across folders
3187
3932
  */
3188
- type TaskGetAllOptions = RequestOptions & PaginationOptions & {
3933
+ type QueueGetAllOptions = RequestOptions & PaginationOptions & {
3189
3934
  /**
3190
- * Optional folder ID to filter tasks by folder
3935
+ * Optional folder ID to filter queues by folder
3191
3936
  */
3192
3937
  folderId?: number;
3193
3938
  };
3194
- /**
3195
- * Query options for getting a task by ID
3196
- */
3197
- type TaskGetByIdOptions = BaseOptions;
3198
- /**
3199
- * Options for getting users with task permissions
3200
- */
3201
- type TaskGetUsersOptions = RequestOptions & PaginationOptions;
3939
+ type QueueGetByIdOptions = BaseOptions;
3202
3940
 
3203
3941
  /**
3204
- * Service for managing UiPath Action Center
3205
- *
3206
- * Tasks are task-based automation components that can be integrated into applications and processes. They represent discrete units of work that can be triggered and monitored through the UiPath API. [UiPath Action Center Guide](https://docs.uipath.com/automation-cloud/docs/actions)
3942
+ * Service for managing UiPath Queues
3207
3943
  *
3208
- */
3209
- interface TaskServiceModel {
3944
+ * Queues are a fundamental component of UiPath automation that enable distributed and scalable processing of work items. [UiPath Queues Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-queues-and-transactions)
3945
+ */
3946
+ interface QueueServiceModel {
3210
3947
  /**
3211
- * Gets all tasks across folders with optional filtering
3948
+ * Gets all queues across folders with optional filtering and folder scoping
3212
3949
  *
3213
- * @param options - Query options including optional folderId and pagination options
3214
- * @returns Promise resolving to either an array of tasks NonPaginatedResponse<TaskGetResponse> or a PaginatedResponse<TaskGetResponse> when pagination options are used.
3215
- * {@link TaskGetResponse}
3950
+ * @signature getAll(options?) Promise&lt;QueueGetResponse[]&gt;
3951
+ * @param options Query options including optional folderId and pagination options
3952
+ * @returns Promise resolving to either an array of queues NonPaginatedResponse<QueueGetResponse> or a PaginatedResponse<QueueGetResponse> when pagination options are used.
3953
+ * {@link QueueGetResponse}
3954
+ * @example
3955
+ * ```typescript
3956
+ * // Standard array return
3957
+ * const queues = await sdk.queues.getAll();
3958
+ *
3959
+ * // Get queues within a specific folder
3960
+ * const queues = await sdk.queues.getAll({
3961
+ * folderId: <folderId>
3962
+ * });
3963
+ *
3964
+ * // Get queues with filtering
3965
+ * const queues = await sdk.queues.getAll({
3966
+ * filter: "name eq 'MyQueue'"
3967
+ * });
3968
+ *
3969
+ * // First page with pagination
3970
+ * const page1 = await sdk.queues.getAll({ pageSize: 10 });
3971
+ *
3972
+ * // Navigate using cursor
3973
+ * if (page1.hasNextPage) {
3974
+ * const page2 = await sdk.queues.getAll({ cursor: page1.nextCursor });
3975
+ * }
3976
+ *
3977
+ * // Jump to specific page
3978
+ * const page5 = await sdk.queues.getAll({
3979
+ * jumpToPage: 5,
3980
+ * pageSize: 10
3981
+ * });
3982
+ * ```
3216
3983
  */
3217
- getAll<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
3218
- getById(id: number, options?: TaskGetByIdOptions, folderId?: number): Promise<TaskGetResponse>;
3219
- create(options: TaskCreateOptions, folderId: number): Promise<TaskCreateResponse>;
3220
- assign(options: TaskAssignmentOptions | TaskAssignmentOptions[], folderId?: number): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
3221
- reassign(options: TaskAssignmentOptions | TaskAssignmentOptions[], folderId?: number): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
3222
- unassign(taskId: number | number[], folderId?: number): Promise<OperationResponse<{
3223
- taskId: number;
3224
- }[] | TaskAssignmentResponse[]>>;
3225
- complete(taskType: TaskType, options: TaskCompletionOptions, folderId: number): Promise<OperationResponse<TaskCompletionOptions>>;
3984
+ getAll<T extends QueueGetAllOptions = QueueGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<QueueGetResponse> : NonPaginatedResponse<QueueGetResponse>>;
3226
3985
  /**
3227
- * Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
3228
- * Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
3229
- * or a PaginatedResponse when any pagination parameter is provided
3986
+ * Gets a single queue by ID
3230
3987
  *
3231
- * @param folderId - The folder ID to get users from
3232
- * @param options - Optional query and pagination parameters
3233
- * @returns Promise resolving to NonPaginatedResponse or a paginated result
3988
+ * @param id - Queue ID
3989
+ * @param folderId - Required folder ID
3990
+ * @returns Promise resolving to a queue definition
3991
+ * @example
3992
+ * ```typescript
3993
+ * // Get queue by ID
3994
+ * const queue = await sdk.queues.getById(<queueId>, <folderId>);
3995
+ * ```
3234
3996
  */
3235
- getUsers<T extends TaskGetUsersOptions = TaskGetUsersOptions>(folderId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<UserLoginInfo> : NonPaginatedResponse<UserLoginInfo>>;
3997
+ getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
3236
3998
  }
3237
- interface TaskMethods {
3999
+
4000
+ /**
4001
+ * Service for interacting with UiPath Orchestrator Queues API
4002
+ */
4003
+ declare class QueueService extends FolderScopedService implements QueueServiceModel {
3238
4004
  /**
3239
- * Assigns this task to a user or users
3240
- *
3241
- * @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
3242
- * @returns Promise resolving to task assignment results
4005
+ * @hideconstructor
3243
4006
  */
3244
- assign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
4007
+ constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
3245
4008
  /**
3246
- * Reassigns this task to a new user
4009
+ * Gets all queues across folders with optional filtering and folder scoping
3247
4010
  *
3248
- * @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
3249
- * @returns Promise resolving to task assignment results
3250
- */
3251
- reassign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
3252
- /**
3253
- * Unassigns this task (removes current assignee)
4011
+ * The method returns either:
4012
+ * - An array of queues (when no pagination parameters are provided)
4013
+ * - A paginated result with navigation cursors (when any pagination parameter is provided)
3254
4014
  *
3255
- * @returns Promise resolving to task assignment results
4015
+ * @param options - Query options including optional folderId
4016
+ * @returns Promise resolving to an array of queues or paginated result
4017
+ *
4018
+ * @example
4019
+ * ```typescript
4020
+ * // Standard array return
4021
+ * const queues = await sdk.queues.getAll();
4022
+ *
4023
+ * // Get queues within a specific folder
4024
+ * const queues = await sdk.queues.getAll({
4025
+ * folderId: 123
4026
+ * });
4027
+ *
4028
+ * // Get queues with filtering
4029
+ * const queues = await sdk.queues.getAll({
4030
+ * filter: "name eq 'MyQueue'"
4031
+ * });
4032
+ *
4033
+ * // First page with pagination
4034
+ * const page1 = await sdk.queues.getAll({ pageSize: 10 });
4035
+ *
4036
+ * // Navigate using cursor
4037
+ * if (page1.hasNextPage) {
4038
+ * const page2 = await sdk.queues.getAll({ cursor: page1.nextCursor });
4039
+ * }
4040
+ *
4041
+ * // Jump to specific page
4042
+ * const page5 = await sdk.queues.getAll({
4043
+ * jumpToPage: 5,
4044
+ * pageSize: 10
4045
+ * });
4046
+ * ```
3256
4047
  */
3257
- unassign(): Promise<OperationResponse<{
3258
- taskId: number;
3259
- }[] | TaskAssignmentResponse[]>>;
4048
+ getAll<T extends QueueGetAllOptions = QueueGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<QueueGetResponse> : NonPaginatedResponse<QueueGetResponse>>;
3260
4049
  /**
3261
- * Completes this task with optional data and action
4050
+ * Gets a single queue by ID
3262
4051
  *
3263
- * @param options - Completion options
3264
- * @returns Promise resolving to completion result
4052
+ * @param id - Queue ID
4053
+ * @param folderId - Required folder ID
4054
+ * @returns Promise resolving to a queue definition
4055
+ *
4056
+ * @example
4057
+ * ```typescript
4058
+ * // Get queue by ID
4059
+ * const queue = await sdk.queues.getById(123, 456);
4060
+ * ```
3265
4061
  */
3266
- complete(options: TaskCompleteOptions): Promise<OperationResponse<TaskCompletionOptions>>;
4062
+ getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
3267
4063
  }
3268
- type TaskGetResponse = RawTaskGetResponse & TaskMethods;
3269
- type TaskCreateResponse = RawTaskCreateResponse & TaskMethods;
3270
- /**
3271
- * Creates an actionable task by combining API task data with operational methods.
3272
- *
3273
- * @param taskData - The task data from API
3274
- * @param service - The task service instance
3275
- * @returns A task object with added methods
3276
- */
3277
- declare function createTaskWithMethods(taskData: RawTaskGetResponse | RawTaskCreateResponse, service: TaskServiceModel): TaskGetResponse | TaskCreateResponse;
3278
4064
 
3279
4065
  /**
3280
4066
  * Service for interacting with UiPath Tasks API
@@ -3550,7 +4336,7 @@ declare class UiPath {
3550
4336
  constructor(config: UiPathSDKConfig);
3551
4337
  /**
3552
4338
  * Initialize the SDK based on the provided configuration.
3553
- * This method is only required for OAuth-based authentication.
4339
+ * This method handles both OAuth flow initiation and completion automatically.
3554
4340
  * For secret-based authentication, initialization is automatic.
3555
4341
  */
3556
4342
  initialize(): Promise<void>;
@@ -3558,6 +4344,18 @@ declare class UiPath {
3558
4344
  * Check if the SDK has been initialized
3559
4345
  */
3560
4346
  isInitialized(): boolean;
4347
+ /**
4348
+ * Check if we're in an OAuth callback state
4349
+ */
4350
+ isInOAuthCallback(): boolean;
4351
+ /**
4352
+ * Complete OAuth authentication flow (only call if isInOAuthCallback() is true)
4353
+ */
4354
+ completeOAuth(): Promise<boolean>;
4355
+ /**
4356
+ * Check if the user is authenticated (has valid token)
4357
+ */
4358
+ isAuthenticated(): boolean;
3561
4359
  /**
3562
4360
  * Get the current authentication token
3563
4361
  */
@@ -3576,6 +4374,15 @@ declare class UiPath {
3576
4374
  */
3577
4375
  instances: ProcessInstancesService;
3578
4376
  };
4377
+ /**
4378
+ * Access to Maestro Cases service
4379
+ */
4380
+ cases: CasesService & {
4381
+ /**
4382
+ * Access to Case Instances service
4383
+ */
4384
+ instances: CaseInstancesService;
4385
+ };
3579
4386
  };
3580
4387
  /**
3581
4388
  * Access to Entity service
@@ -3884,7 +4691,7 @@ declare const telemetryClient: TelemetryClient;
3884
4691
  * SDK Telemetry constants
3885
4692
  */
3886
4693
  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";
3887
- declare const SDK_VERSION = "1.0.0-beta.13";
4694
+ declare const SDK_VERSION = "1.0.0-beta.14";
3888
4695
  declare const VERSION = "Version";
3889
4696
  declare const SERVICE = "Service";
3890
4697
  declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -3899,5 +4706,5 @@ declare const SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
3899
4706
  declare const SDK_RUN_EVENT = "Sdk.Run";
3900
4707
  declare const UNKNOWN = "";
3901
4708
 
3902
- 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, 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, ServerError, StartStrategy, StopStrategy, TargetFramework, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createEntityWithMethods, createProcessInstanceWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
3903
- export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketGetWriteUriOptions, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CollectionResponse, Config, CustomKeyValuePair, ElementMetaData, EntityDeleteOptions, EntityDeleteResponse, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawEntityGetResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UserLoginInfo };
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, BucketGetWriteUriOptions, 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, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, 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 };