@uipath/uipath-typescript 1.0.0-beta.18 → 1.0.0
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 +98 -40
- package/dist/assets/index.cjs +2090 -0
- package/dist/assets/index.d.ts +513 -0
- package/dist/assets/index.mjs +2087 -0
- package/dist/buckets/index.cjs +2364 -0
- package/dist/buckets/index.d.ts +819 -0
- package/dist/buckets/index.mjs +2361 -0
- package/dist/cases/index.cjs +3493 -0
- package/dist/cases/index.d.ts +1397 -0
- package/dist/cases/index.mjs +3487 -0
- package/dist/core/index.cjs +5267 -0
- package/dist/core/index.d.ts +406 -0
- package/dist/core/index.mjs +5241 -0
- package/dist/entities/index.cjs +2749 -0
- package/dist/entities/index.d.ts +1513 -0
- package/dist/entities/index.mjs +2743 -0
- package/dist/index.cjs +3571 -3181
- package/dist/index.d.ts +964 -542
- package/dist/index.mjs +3571 -3181
- package/dist/index.umd.js +8561 -12013
- package/dist/maestro-processes/index.cjs +2609 -0
- package/dist/maestro-processes/index.d.ts +1127 -0
- package/dist/maestro-processes/index.mjs +2600 -0
- package/dist/processes/index.cjs +2233 -0
- package/dist/processes/index.d.ts +800 -0
- package/dist/processes/index.mjs +2230 -0
- package/dist/queues/index.cjs +2075 -0
- package/dist/queues/index.d.ts +504 -0
- package/dist/queues/index.mjs +2072 -0
- package/dist/tasks/index.cjs +2675 -0
- package/dist/tasks/index.d.ts +1122 -0
- package/dist/tasks/index.mjs +2671 -0
- package/package.json +100 -6
- package/dist/index.d.cts +0 -5463
- package/dist/index.d.mts +0 -5463
|
@@ -0,0 +1,1397 @@
|
|
|
1
|
+
import { IUiPath } from '../core/index';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simplified universal pagination cursor
|
|
5
|
+
* Used to fetch next/previous pages
|
|
6
|
+
*/
|
|
7
|
+
interface PaginationCursor {
|
|
8
|
+
/** Opaque string containing all information needed to fetch next page */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Discriminated union for pagination methods - ensures cursor and jumpToPage are mutually exclusive
|
|
13
|
+
*/
|
|
14
|
+
type PaginationMethodUnion = {
|
|
15
|
+
cursor?: PaginationCursor;
|
|
16
|
+
jumpToPage?: never;
|
|
17
|
+
} | {
|
|
18
|
+
cursor?: never;
|
|
19
|
+
jumpToPage?: number;
|
|
20
|
+
} | {
|
|
21
|
+
cursor?: never;
|
|
22
|
+
jumpToPage?: never;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Pagination options. Users cannot specify both cursor and jumpToPage.
|
|
26
|
+
*/
|
|
27
|
+
type PaginationOptions = {
|
|
28
|
+
/** Size of the page to fetch (items per page) */
|
|
29
|
+
pageSize?: number;
|
|
30
|
+
} & PaginationMethodUnion;
|
|
31
|
+
/**
|
|
32
|
+
* Paginated response containing items and navigation information
|
|
33
|
+
*/
|
|
34
|
+
interface PaginatedResponse<T> {
|
|
35
|
+
/** The items in the current page */
|
|
36
|
+
items: T[];
|
|
37
|
+
/** Total count of items across all pages (if available) */
|
|
38
|
+
totalCount?: number;
|
|
39
|
+
/** Whether more pages are available */
|
|
40
|
+
hasNextPage: boolean;
|
|
41
|
+
/** Cursor to fetch the next page (if available) */
|
|
42
|
+
nextCursor?: PaginationCursor;
|
|
43
|
+
/** Cursor to fetch the previous page (if available) */
|
|
44
|
+
previousCursor?: PaginationCursor;
|
|
45
|
+
/** Current page number (1-based, if available) */
|
|
46
|
+
currentPage?: number;
|
|
47
|
+
/** Total number of pages (if available) */
|
|
48
|
+
totalPages?: number;
|
|
49
|
+
/** Whether this pagination type supports jumping to arbitrary pages */
|
|
50
|
+
supportsPageJump: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Response for non-paginated calls that includes both data and total count
|
|
54
|
+
*/
|
|
55
|
+
interface NonPaginatedResponse<T> {
|
|
56
|
+
items: T[];
|
|
57
|
+
totalCount?: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Helper type for defining paginated method overloads
|
|
61
|
+
* Creates a union type of all ways pagination can be triggered
|
|
62
|
+
*/
|
|
63
|
+
type HasPaginationOptions<T> = (T & {
|
|
64
|
+
pageSize: number;
|
|
65
|
+
}) | (T & {
|
|
66
|
+
cursor: PaginationCursor;
|
|
67
|
+
}) | (T & {
|
|
68
|
+
jumpToPage: number;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Standardized result interface for all operation methods (pause, cancel, complete, update, upload, etc.)
|
|
73
|
+
* Success responses include data from the request context or API response
|
|
74
|
+
*/
|
|
75
|
+
interface OperationResponse<TData> {
|
|
76
|
+
/**
|
|
77
|
+
* Whether the operation was successful
|
|
78
|
+
*/
|
|
79
|
+
success: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Response data (can contain error details in case of failure)
|
|
82
|
+
*/
|
|
83
|
+
data: TData;
|
|
84
|
+
}
|
|
85
|
+
interface BaseOptions {
|
|
86
|
+
expand?: string;
|
|
87
|
+
select?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Common request options interface used across services for querying data
|
|
91
|
+
*/
|
|
92
|
+
interface RequestOptions extends BaseOptions {
|
|
93
|
+
filter?: string;
|
|
94
|
+
orderby?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Maestro Cases Types
|
|
99
|
+
* Types and interfaces for Maestro case management
|
|
100
|
+
*/
|
|
101
|
+
/**
|
|
102
|
+
* Case information with instance statistics
|
|
103
|
+
*/
|
|
104
|
+
interface CaseGetAllResponse {
|
|
105
|
+
/** Unique key identifying the case process */
|
|
106
|
+
processKey: string;
|
|
107
|
+
/** Package identifier */
|
|
108
|
+
packageId: string;
|
|
109
|
+
/** Case name */
|
|
110
|
+
name: string;
|
|
111
|
+
/** Folder key of the folder where case process is located */
|
|
112
|
+
folderKey: string;
|
|
113
|
+
/** Name of the folder where case process is located */
|
|
114
|
+
folderName: string;
|
|
115
|
+
/** Available package versions */
|
|
116
|
+
packageVersions: string[];
|
|
117
|
+
/** Total number of versions */
|
|
118
|
+
versionCount: number;
|
|
119
|
+
/** Case instance count - pending */
|
|
120
|
+
pendingCount: number;
|
|
121
|
+
/** Case instance count - running */
|
|
122
|
+
runningCount: number;
|
|
123
|
+
/** Case instance count - completed */
|
|
124
|
+
completedCount: number;
|
|
125
|
+
/** Case instance count - paused */
|
|
126
|
+
pausedCount: number;
|
|
127
|
+
/** Case instance count - cancelled */
|
|
128
|
+
cancelledCount: number;
|
|
129
|
+
/** Case instance count - faulted */
|
|
130
|
+
faultedCount: number;
|
|
131
|
+
/** Case instance count - retrying */
|
|
132
|
+
retryingCount: number;
|
|
133
|
+
/** Case instance count - resuming */
|
|
134
|
+
resumingCount: number;
|
|
135
|
+
/** Case instance count - pausing */
|
|
136
|
+
pausingCount: number;
|
|
137
|
+
/** Case instance count - canceling */
|
|
138
|
+
cancelingCount: number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Maestro Cases Models
|
|
143
|
+
* Model classes for Maestro cases
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Service for managing UiPath Maestro Cases
|
|
148
|
+
*
|
|
149
|
+
* UiPath Maestro Case Management describes solutions that help manage and automate the full flow of complex E2E scenarios.
|
|
150
|
+
*
|
|
151
|
+
* ### Usage
|
|
152
|
+
*
|
|
153
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
154
|
+
*
|
|
155
|
+
* ```typescript
|
|
156
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
157
|
+
*
|
|
158
|
+
* const cases = new Cases(sdk);
|
|
159
|
+
* const allCases = await cases.getAll();
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
interface CasesServiceModel {
|
|
163
|
+
/**
|
|
164
|
+
* @returns Promise resolving to array of Case objects
|
|
165
|
+
* {@link CaseGetAllResponse}
|
|
166
|
+
* @example
|
|
167
|
+
* ```typescript
|
|
168
|
+
* // Get all case management processes
|
|
169
|
+
* const allCases = await cases.getAll();
|
|
170
|
+
*
|
|
171
|
+
* // Access case information
|
|
172
|
+
* for (const caseProcess of allCases) {
|
|
173
|
+
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
174
|
+
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
175
|
+
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
176
|
+
* }
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
getAll(): Promise<CaseGetAllResponse[]>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Case Instance Types
|
|
184
|
+
* Types and interfaces for Maestro case instance management
|
|
185
|
+
*/
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Response for getting a single case instance
|
|
189
|
+
*/
|
|
190
|
+
interface RawCaseInstanceGetResponse {
|
|
191
|
+
instanceId: string;
|
|
192
|
+
packageKey: string;
|
|
193
|
+
packageId: string;
|
|
194
|
+
packageVersion: string;
|
|
195
|
+
latestRunId: string;
|
|
196
|
+
latestRunStatus: string;
|
|
197
|
+
processKey: string;
|
|
198
|
+
folderKey: string;
|
|
199
|
+
userId: number;
|
|
200
|
+
instanceDisplayName: string;
|
|
201
|
+
startedByUser: string;
|
|
202
|
+
source: string;
|
|
203
|
+
creatorUserKey: string;
|
|
204
|
+
startedTime: string;
|
|
205
|
+
completedTime: string;
|
|
206
|
+
instanceRuns: CaseInstanceRun[];
|
|
207
|
+
caseAppConfig?: CaseAppConfig;
|
|
208
|
+
caseType?: string;
|
|
209
|
+
caseTitle?: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Case instance run information
|
|
213
|
+
*/
|
|
214
|
+
interface CaseInstanceRun {
|
|
215
|
+
runId: string;
|
|
216
|
+
status: string;
|
|
217
|
+
startedTime: string;
|
|
218
|
+
completedTime: string;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Query options for getting case instances
|
|
222
|
+
*/
|
|
223
|
+
interface CaseInstanceGetAllOptions {
|
|
224
|
+
packageId?: string;
|
|
225
|
+
packageVersion?: string;
|
|
226
|
+
processKey?: string;
|
|
227
|
+
errorCode?: string;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Query options for getting case instances with pagination support
|
|
231
|
+
*/
|
|
232
|
+
type CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllOptions & PaginationOptions;
|
|
233
|
+
/**
|
|
234
|
+
* Request for case instance operations (close, pause, resume)
|
|
235
|
+
*/
|
|
236
|
+
interface CaseInstanceOperationOptions {
|
|
237
|
+
comment?: string;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Response for case instance operations (close, pause, resume)
|
|
241
|
+
*/
|
|
242
|
+
interface CaseInstanceOperationResponse {
|
|
243
|
+
instanceId: string;
|
|
244
|
+
status: string;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Options for reopening a case instance.
|
|
248
|
+
*/
|
|
249
|
+
interface CaseInstanceReopenOptions extends CaseInstanceOperationOptions {
|
|
250
|
+
/**
|
|
251
|
+
* The stage ID from which the case instance should be reopened.
|
|
252
|
+
*/
|
|
253
|
+
stageId: string;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Case App Configuration Overview
|
|
257
|
+
*/
|
|
258
|
+
interface CaseAppOverview {
|
|
259
|
+
title: string;
|
|
260
|
+
details: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Case App Configuration from case JSON
|
|
264
|
+
*/
|
|
265
|
+
interface CaseAppConfig {
|
|
266
|
+
caseSummary?: string;
|
|
267
|
+
overview?: CaseAppOverview[];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Case stage task type
|
|
271
|
+
*/
|
|
272
|
+
declare enum StageTaskType {
|
|
273
|
+
EXTERNAL_AGENT = "external-agent",
|
|
274
|
+
RPA = "rpa",
|
|
275
|
+
AGENTIC_PROCESS = "process",
|
|
276
|
+
AGENT = "agent",
|
|
277
|
+
ACTION = "action",
|
|
278
|
+
API_WORKFLOW = "api-workflow"
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Stage task information
|
|
282
|
+
*/
|
|
283
|
+
interface StageTask {
|
|
284
|
+
id: string;
|
|
285
|
+
name: string;
|
|
286
|
+
completedTime: string;
|
|
287
|
+
startedTime: string;
|
|
288
|
+
status: string;
|
|
289
|
+
type: StageTaskType;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Escalation recipient scope
|
|
293
|
+
*/
|
|
294
|
+
declare enum EscalationRecipientScope {
|
|
295
|
+
USER = "user",
|
|
296
|
+
USER_GROUP = "usergroup"
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Escalation rule recipient information
|
|
300
|
+
*/
|
|
301
|
+
interface EscalationRecipient {
|
|
302
|
+
/** Type of recipient (user or usergroup) */
|
|
303
|
+
scope: EscalationRecipientScope;
|
|
304
|
+
/** Identifier for a user/usergroup */
|
|
305
|
+
target: string;
|
|
306
|
+
/** The email id of the user/usergroup */
|
|
307
|
+
value: string;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Escalation action type
|
|
311
|
+
*/
|
|
312
|
+
declare enum EscalationActionType {
|
|
313
|
+
NOTIFICATION = "notification"
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Escalation rule action configuration
|
|
317
|
+
*/
|
|
318
|
+
interface EscalationAction {
|
|
319
|
+
type: EscalationActionType;
|
|
320
|
+
recipients: EscalationRecipient[];
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Escalation rule trigger type
|
|
324
|
+
*/
|
|
325
|
+
declare enum EscalationTriggerType {
|
|
326
|
+
SLA_BREACHED = "sla-breached",
|
|
327
|
+
AT_RISK = "at-risk"
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Escalation rule trigger metadata
|
|
331
|
+
*/
|
|
332
|
+
interface EscalationTriggerMetadata {
|
|
333
|
+
type?: EscalationTriggerType;
|
|
334
|
+
atRiskPercentage?: number;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Escalation rule configuration
|
|
338
|
+
*/
|
|
339
|
+
interface EscalationRule {
|
|
340
|
+
triggerInfo: EscalationTriggerMetadata;
|
|
341
|
+
action?: EscalationAction;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* SLA duration unit
|
|
345
|
+
*/
|
|
346
|
+
declare enum SLADurationUnit {
|
|
347
|
+
HOURS = "h",
|
|
348
|
+
DAYS = "d",
|
|
349
|
+
WEEKS = "w",
|
|
350
|
+
MONTHS = "m"
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* SLA configuration for stages
|
|
354
|
+
*/
|
|
355
|
+
interface StageSLA {
|
|
356
|
+
length?: number;
|
|
357
|
+
duration?: SLADurationUnit;
|
|
358
|
+
escalationRule?: EscalationRule[];
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Stage information from case instances
|
|
362
|
+
*/
|
|
363
|
+
interface CaseGetStageResponse {
|
|
364
|
+
id: string;
|
|
365
|
+
name: string;
|
|
366
|
+
sla?: StageSLA;
|
|
367
|
+
status: string;
|
|
368
|
+
tasks: StageTask[][];
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Case element execution metadata
|
|
372
|
+
*/
|
|
373
|
+
interface ElementExecutionMetadata {
|
|
374
|
+
completedTime: string | null;
|
|
375
|
+
elementId: string;
|
|
376
|
+
elementName: string;
|
|
377
|
+
parentElementId: string | null;
|
|
378
|
+
startedTime: string;
|
|
379
|
+
/** Element status (e.g., "Completed", "Faulted", "Running") */
|
|
380
|
+
status: string;
|
|
381
|
+
processKey: string;
|
|
382
|
+
/** External reference link, eg link to the HITL task in Action Center */
|
|
383
|
+
externalLink: string;
|
|
384
|
+
/** List of element runs for the element */
|
|
385
|
+
elementRuns: ElementRunMetadata[];
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Response for getting case instance element executions
|
|
389
|
+
*/
|
|
390
|
+
interface CaseInstanceExecutionHistoryResponse {
|
|
391
|
+
creationUserKey: string | null;
|
|
392
|
+
folderKey: string;
|
|
393
|
+
instanceDisplayName: string;
|
|
394
|
+
instanceId: string;
|
|
395
|
+
packageId: string;
|
|
396
|
+
packageKey: string;
|
|
397
|
+
packageVersion: string;
|
|
398
|
+
processKey: string;
|
|
399
|
+
source: string;
|
|
400
|
+
/** Element status (e.g., "Completed", "Faulted", "Running", "Pausing", "Canceling") */
|
|
401
|
+
status: string;
|
|
402
|
+
startedTime: string;
|
|
403
|
+
completedTime: string | null;
|
|
404
|
+
elementExecutions: ElementExecutionMetadata[];
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Element run metadata
|
|
408
|
+
*/
|
|
409
|
+
interface ElementRunMetadata {
|
|
410
|
+
status: string;
|
|
411
|
+
startedTime: string;
|
|
412
|
+
completedTime: string | null;
|
|
413
|
+
elementRunId: string;
|
|
414
|
+
parentElementRunId: string | null;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
interface UserLoginInfo {
|
|
418
|
+
name: string;
|
|
419
|
+
surname: string;
|
|
420
|
+
userName: string;
|
|
421
|
+
emailAddress: string;
|
|
422
|
+
displayName: string;
|
|
423
|
+
id: number;
|
|
424
|
+
}
|
|
425
|
+
declare enum TaskType {
|
|
426
|
+
Form = "FormTask",
|
|
427
|
+
External = "ExternalTask",
|
|
428
|
+
App = "AppTask"
|
|
429
|
+
}
|
|
430
|
+
declare enum TaskPriority {
|
|
431
|
+
Low = "Low",
|
|
432
|
+
Medium = "Medium",
|
|
433
|
+
High = "High",
|
|
434
|
+
Critical = "Critical"
|
|
435
|
+
}
|
|
436
|
+
declare enum TaskStatus {
|
|
437
|
+
Unassigned = "Unassigned",
|
|
438
|
+
Pending = "Pending",
|
|
439
|
+
Completed = "Completed"
|
|
440
|
+
}
|
|
441
|
+
declare enum TaskSlaCriteria {
|
|
442
|
+
TaskCreated = "TaskCreated",
|
|
443
|
+
TaskAssigned = "TaskAssigned",
|
|
444
|
+
TaskCompleted = "TaskCompleted"
|
|
445
|
+
}
|
|
446
|
+
declare enum TaskSlaStatus {
|
|
447
|
+
OverdueLater = "OverdueLater",
|
|
448
|
+
OverdueSoon = "OverdueSoon",
|
|
449
|
+
Overdue = "Overdue",
|
|
450
|
+
CompletedInTime = "CompletedInTime"
|
|
451
|
+
}
|
|
452
|
+
declare enum TaskSourceName {
|
|
453
|
+
Agent = "Agent",
|
|
454
|
+
Workflow = "Workflow",
|
|
455
|
+
Maestro = "Maestro",
|
|
456
|
+
Default = "Default"
|
|
457
|
+
}
|
|
458
|
+
interface TaskSource {
|
|
459
|
+
sourceName: TaskSourceName;
|
|
460
|
+
sourceId: string;
|
|
461
|
+
taskSourceMetadata: Record<string, unknown>;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Task activity types
|
|
465
|
+
*/
|
|
466
|
+
declare enum TaskActivityType {
|
|
467
|
+
Created = "Created",
|
|
468
|
+
Assigned = "Assigned",
|
|
469
|
+
Reassigned = "Reassigned",
|
|
470
|
+
Unassigned = "Unassigned",
|
|
471
|
+
Saved = "Saved",
|
|
472
|
+
Forwarded = "Forwarded",
|
|
473
|
+
Completed = "Completed",
|
|
474
|
+
Commented = "Commented",
|
|
475
|
+
Deleted = "Deleted",
|
|
476
|
+
BulkSaved = "BulkSaved",
|
|
477
|
+
BulkCompleted = "BulkCompleted",
|
|
478
|
+
FirstOpened = "FirstOpened"
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Tag information for tasks
|
|
482
|
+
*/
|
|
483
|
+
interface Tag {
|
|
484
|
+
name: string;
|
|
485
|
+
displayName: string;
|
|
486
|
+
displayValue: string;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Task activity information
|
|
490
|
+
*/
|
|
491
|
+
interface TaskActivity {
|
|
492
|
+
task?: RawTaskGetResponse;
|
|
493
|
+
organizationUnitId: number;
|
|
494
|
+
taskId: number;
|
|
495
|
+
taskKey: string;
|
|
496
|
+
activityType: TaskActivityType;
|
|
497
|
+
creatorUserId: number;
|
|
498
|
+
targetUserId: number | null;
|
|
499
|
+
createdTime: string;
|
|
500
|
+
}
|
|
501
|
+
interface TaskSlaDetail {
|
|
502
|
+
expiryTime?: string;
|
|
503
|
+
startCriteria?: TaskSlaCriteria;
|
|
504
|
+
endCriteria?: TaskSlaCriteria;
|
|
505
|
+
status?: TaskSlaStatus;
|
|
506
|
+
}
|
|
507
|
+
interface TaskAssignment {
|
|
508
|
+
assignee?: UserLoginInfo;
|
|
509
|
+
task?: RawTaskGetResponse;
|
|
510
|
+
id?: number;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Base interface containing common fields shared across all task response types
|
|
514
|
+
*/
|
|
515
|
+
interface TaskBaseResponse {
|
|
516
|
+
status: TaskStatus;
|
|
517
|
+
title: string;
|
|
518
|
+
type: TaskType;
|
|
519
|
+
priority: TaskPriority;
|
|
520
|
+
folderId: number;
|
|
521
|
+
key: string;
|
|
522
|
+
isDeleted: boolean;
|
|
523
|
+
createdTime: string;
|
|
524
|
+
id: number;
|
|
525
|
+
action: string | null;
|
|
526
|
+
externalTag: string | null;
|
|
527
|
+
lastAssignedTime: string | null;
|
|
528
|
+
completedTime: string | null;
|
|
529
|
+
parentOperationId: string | null;
|
|
530
|
+
deleterUserId: number | null;
|
|
531
|
+
deletedTime: string | null;
|
|
532
|
+
lastModifiedTime: string | null;
|
|
533
|
+
}
|
|
534
|
+
interface RawTaskGetResponse extends TaskBaseResponse {
|
|
535
|
+
isCompleted: boolean;
|
|
536
|
+
encrypted: boolean;
|
|
537
|
+
bulkFormLayoutId: number | null;
|
|
538
|
+
formLayoutId: number | null;
|
|
539
|
+
taskSlaDetail: TaskSlaDetail | null;
|
|
540
|
+
taskAssigneeName: string | null;
|
|
541
|
+
lastModifierUserId: number | null;
|
|
542
|
+
assignedToUser: UserLoginInfo | null;
|
|
543
|
+
creatorUser?: UserLoginInfo;
|
|
544
|
+
lastModifierUser?: UserLoginInfo;
|
|
545
|
+
taskAssignments?: TaskAssignment[];
|
|
546
|
+
activities?: TaskActivity[];
|
|
547
|
+
tags?: Tag[];
|
|
548
|
+
formLayout?: Record<string, unknown>;
|
|
549
|
+
actionLabel?: string | null;
|
|
550
|
+
taskSlaDetails?: TaskSlaDetail[] | null;
|
|
551
|
+
completedByUser?: UserLoginInfo | null;
|
|
552
|
+
taskAssignmentCriteria?: string;
|
|
553
|
+
taskAssignees?: UserLoginInfo[] | null;
|
|
554
|
+
taskSource?: TaskSource | null;
|
|
555
|
+
processingTime?: number | null;
|
|
556
|
+
data?: Record<string, unknown> | null;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Options for task assignment operations when called from a task instance
|
|
560
|
+
* Requires either userId or userNameOrEmail, but not both
|
|
561
|
+
*/
|
|
562
|
+
type TaskAssignOptions = {
|
|
563
|
+
userId: number;
|
|
564
|
+
userNameOrEmail?: never;
|
|
565
|
+
} | {
|
|
566
|
+
userId?: never;
|
|
567
|
+
userNameOrEmail: string;
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* Options for task assignment operations when called from the service
|
|
571
|
+
* Extends TaskAssignOptions with the required taskId field
|
|
572
|
+
*/
|
|
573
|
+
type TaskAssignmentOptions = {
|
|
574
|
+
taskId: number;
|
|
575
|
+
} & TaskAssignOptions;
|
|
576
|
+
interface TaskAssignmentResponse {
|
|
577
|
+
taskId?: number;
|
|
578
|
+
userId?: number;
|
|
579
|
+
errorCode?: number;
|
|
580
|
+
errorMessage?: string;
|
|
581
|
+
userNameOrEmail?: string;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Options for completing a task
|
|
585
|
+
*/
|
|
586
|
+
type TaskCompleteOptions = {
|
|
587
|
+
type: TaskType.External;
|
|
588
|
+
data?: any;
|
|
589
|
+
action?: string;
|
|
590
|
+
} | {
|
|
591
|
+
type: Exclude<TaskType, TaskType.External>;
|
|
592
|
+
data: any;
|
|
593
|
+
action: string;
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* Options for completing a task when called from the service
|
|
597
|
+
* Extends TaskCompleteOptions with the required taskId field
|
|
598
|
+
*/
|
|
599
|
+
type TaskCompletionOptions = TaskCompleteOptions & {
|
|
600
|
+
taskId: number;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* Options for getting tasks across folders
|
|
604
|
+
*/
|
|
605
|
+
type TaskGetAllOptions = RequestOptions & PaginationOptions & {
|
|
606
|
+
/**
|
|
607
|
+
* Optional folder ID to filter tasks by folder
|
|
608
|
+
*/
|
|
609
|
+
folderId?: number;
|
|
610
|
+
/**
|
|
611
|
+
* Optional flag to fetch tasks using admin permissions
|
|
612
|
+
* When true, fetches tasks across folders
|
|
613
|
+
* where the user has at least Task.View, Task.Edit and TaskAssignment.Create permissions
|
|
614
|
+
* When false or omitted, fetches tasks across folders
|
|
615
|
+
* where the user has at least Task.View and Task.Edit permissions
|
|
616
|
+
*/
|
|
617
|
+
asTaskAdmin?: boolean;
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
interface TaskMethods {
|
|
621
|
+
/**
|
|
622
|
+
* Assigns this task to a user or users
|
|
623
|
+
*
|
|
624
|
+
* @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
|
|
625
|
+
* @returns Promise resolving to task assignment results
|
|
626
|
+
*/
|
|
627
|
+
assign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
628
|
+
/**
|
|
629
|
+
* Reassigns this task to a new user
|
|
630
|
+
*
|
|
631
|
+
* @param options - Assignment options (requires at least one of: userId, userNameOrEmail)
|
|
632
|
+
* @returns Promise resolving to task assignment results
|
|
633
|
+
*/
|
|
634
|
+
reassign(options: TaskAssignOptions): Promise<OperationResponse<TaskAssignmentOptions[] | TaskAssignmentResponse[]>>;
|
|
635
|
+
/**
|
|
636
|
+
* Unassigns this task (removes current assignee)
|
|
637
|
+
*
|
|
638
|
+
* @returns Promise resolving to task assignment results
|
|
639
|
+
*/
|
|
640
|
+
unassign(): Promise<OperationResponse<{
|
|
641
|
+
taskId: number;
|
|
642
|
+
}[] | TaskAssignmentResponse[]>>;
|
|
643
|
+
/**
|
|
644
|
+
* Completes this task with optional data and action
|
|
645
|
+
*
|
|
646
|
+
* @param options - Completion options
|
|
647
|
+
* @returns Promise resolving to completion result
|
|
648
|
+
*/
|
|
649
|
+
complete(options: TaskCompleteOptions): Promise<OperationResponse<TaskCompletionOptions>>;
|
|
650
|
+
}
|
|
651
|
+
type TaskGetResponse = RawTaskGetResponse & TaskMethods;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Service model for managing Maestro Case Instances
|
|
655
|
+
*
|
|
656
|
+
* Maestro case instances are the running instances of Maestro cases.
|
|
657
|
+
*
|
|
658
|
+
* ### Usage
|
|
659
|
+
*
|
|
660
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
661
|
+
*
|
|
662
|
+
* ```typescript
|
|
663
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
664
|
+
*
|
|
665
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
666
|
+
* const allInstances = await caseInstances.getAll();
|
|
667
|
+
* ```
|
|
668
|
+
*/
|
|
669
|
+
interface CaseInstancesServiceModel {
|
|
670
|
+
/**
|
|
671
|
+
* Get all case instances with optional filtering and pagination
|
|
672
|
+
*
|
|
673
|
+
* @param options Query parameters for filtering instances and pagination
|
|
674
|
+
* @returns Promise resolving to either an array of case instances NonPaginatedResponse<CaseInstanceGetResponse> or a PaginatedResponse<CaseInstanceGetResponse> when pagination options are used.
|
|
675
|
+
* {@link CaseInstanceGetResponse}
|
|
676
|
+
* @example
|
|
677
|
+
* ```typescript
|
|
678
|
+
* // Get all case instances (non-paginated)
|
|
679
|
+
* const instances = await caseInstances.getAll();
|
|
680
|
+
*
|
|
681
|
+
* // Cancel/Close faulted instances using methods directly on instances
|
|
682
|
+
* for (const instance of instances.items) {
|
|
683
|
+
* if (instance.latestRunStatus === 'Faulted') {
|
|
684
|
+
* await instance.close({ comment: 'Closing faulted case instance' });
|
|
685
|
+
* }
|
|
686
|
+
* }
|
|
687
|
+
*
|
|
688
|
+
* // With filtering
|
|
689
|
+
* const filteredInstances = await caseInstances.getAll({
|
|
690
|
+
* processKey: 'MyCaseProcess'
|
|
691
|
+
* });
|
|
692
|
+
*
|
|
693
|
+
* // First page with pagination
|
|
694
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
695
|
+
*
|
|
696
|
+
* // Navigate using cursor
|
|
697
|
+
* if (page1.hasNextPage) {
|
|
698
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
699
|
+
* }
|
|
700
|
+
* ```
|
|
701
|
+
*/
|
|
702
|
+
getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
|
|
703
|
+
/**
|
|
704
|
+
* Get a specific case instance by ID
|
|
705
|
+
* @param instanceId - The case instance ID
|
|
706
|
+
* @param folderKey - Required folder key
|
|
707
|
+
* @returns Promise resolving to case instance with methods
|
|
708
|
+
* {@link CaseInstanceGetResponse}
|
|
709
|
+
* @example
|
|
710
|
+
* ```typescript
|
|
711
|
+
* // Get a specific case instance
|
|
712
|
+
* const instance = await caseInstances.getById(
|
|
713
|
+
* <instanceId>,
|
|
714
|
+
* <folderKey>
|
|
715
|
+
* );
|
|
716
|
+
*
|
|
717
|
+
* // Access instance properties
|
|
718
|
+
* console.log(`Status: ${instance.latestRunStatus}`);
|
|
719
|
+
* ```
|
|
720
|
+
*/
|
|
721
|
+
getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
|
|
722
|
+
/**
|
|
723
|
+
* Close/Cancel a case instance
|
|
724
|
+
* @param instanceId - The ID of the instance to cancel
|
|
725
|
+
* @param folderKey - Required folder key
|
|
726
|
+
* @param options - Optional close options with comment
|
|
727
|
+
* @returns Promise resolving to operation result with instance data
|
|
728
|
+
* @example
|
|
729
|
+
* ```typescript
|
|
730
|
+
* // Close a case instance
|
|
731
|
+
* const result = await caseInstances.close(
|
|
732
|
+
* <instanceId>,
|
|
733
|
+
* <folderKey>
|
|
734
|
+
* );
|
|
735
|
+
*
|
|
736
|
+
* // Or using instance method
|
|
737
|
+
* const instance = await caseInstances.getById(
|
|
738
|
+
* <instanceId>,
|
|
739
|
+
* <folderKey>
|
|
740
|
+
* );
|
|
741
|
+
* const result = await instance.close();
|
|
742
|
+
*
|
|
743
|
+
* console.log(`Closed: ${result.success}`);
|
|
744
|
+
*
|
|
745
|
+
* // Close with a comment
|
|
746
|
+
* const resultWithComment = await instance.close({
|
|
747
|
+
* comment: 'Closing due to invalid input data'
|
|
748
|
+
* });
|
|
749
|
+
*
|
|
750
|
+
* if (resultWithComment.success) {
|
|
751
|
+
* console.log(`Instance ${resultWithComment.data.instanceId} status: ${resultWithComment.data.status}`);
|
|
752
|
+
* }
|
|
753
|
+
* ```
|
|
754
|
+
*/
|
|
755
|
+
close(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
756
|
+
/**
|
|
757
|
+
* Pause a case instance
|
|
758
|
+
* @param instanceId - The ID of the instance to pause
|
|
759
|
+
* @param folderKey - Required folder key
|
|
760
|
+
* @param options - Optional pause options with comment
|
|
761
|
+
* @returns Promise resolving to operation result with instance data
|
|
762
|
+
*/
|
|
763
|
+
pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
764
|
+
/**
|
|
765
|
+
* Reopen a case instance from a specified element
|
|
766
|
+
* @param instanceId - The ID of the case instance
|
|
767
|
+
* @param folderKey - Required folder key
|
|
768
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
769
|
+
* @returns Promise resolving to operation result with instance data
|
|
770
|
+
* {@link CaseInstanceOperationResponse}
|
|
771
|
+
* @example
|
|
772
|
+
* ```typescript
|
|
773
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
774
|
+
*
|
|
775
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
776
|
+
*
|
|
777
|
+
* // First, get the available stages for the case instance
|
|
778
|
+
* const stages = await caseInstances.getStages('<instanceId>', '<folderKey>');
|
|
779
|
+
* const stageId = stages[0].id; // Select the stage to reopen from
|
|
780
|
+
*
|
|
781
|
+
* // Reopen a case instance from a specific stage
|
|
782
|
+
* const result = await caseInstances.reopen(
|
|
783
|
+
* '<instanceId>',
|
|
784
|
+
* '<folderKey>',
|
|
785
|
+
* { stageId }
|
|
786
|
+
* );
|
|
787
|
+
*
|
|
788
|
+
* // Reopen with a comment
|
|
789
|
+
* const result = await caseInstances.reopen(
|
|
790
|
+
* '<instanceId>',
|
|
791
|
+
* '<folderKey>',
|
|
792
|
+
* { stageId, comment: 'Reopening to retry failed stage' }
|
|
793
|
+
* );
|
|
794
|
+
*
|
|
795
|
+
* // Or using instance method
|
|
796
|
+
* const instance = await caseInstances.getById('<instanceId>', '<folderKey>');
|
|
797
|
+
* const stages = await instance.getStages();
|
|
798
|
+
* const result = await instance.reopen({ stageId: stages[0].id });
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
reopen(instanceId: string, folderKey: string, options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
802
|
+
/**
|
|
803
|
+
* Resume a case instance
|
|
804
|
+
* @param instanceId - The ID of the instance to resume
|
|
805
|
+
* @param folderKey - Required folder key
|
|
806
|
+
* @param options - Optional resume options with comment
|
|
807
|
+
* @returns Promise resolving to operation result with instance data
|
|
808
|
+
*/
|
|
809
|
+
resume(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
810
|
+
/**
|
|
811
|
+
* Get execution history for a case instance
|
|
812
|
+
* @param instanceId - The ID of the case instance
|
|
813
|
+
* @param folderKey - Required folder key
|
|
814
|
+
* @returns Promise resolving to instance execution history
|
|
815
|
+
* {@link CaseInstanceExecutionHistoryResponse}
|
|
816
|
+
* @example
|
|
817
|
+
* ```typescript
|
|
818
|
+
* // Get execution history for a case instance
|
|
819
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
820
|
+
* <instanceId>,
|
|
821
|
+
* <folderKey>
|
|
822
|
+
* );
|
|
823
|
+
*
|
|
824
|
+
* // Access element executions
|
|
825
|
+
* if (history.elementExecutions) {
|
|
826
|
+
* for (const execution of history.elementExecutions) {
|
|
827
|
+
* console.log(`Element: ${execution.elementName} - Status: ${execution.status}`);
|
|
828
|
+
* }
|
|
829
|
+
* }
|
|
830
|
+
* ```
|
|
831
|
+
*/
|
|
832
|
+
getExecutionHistory(instanceId: string, folderKey: string): Promise<CaseInstanceExecutionHistoryResponse>;
|
|
833
|
+
/**
|
|
834
|
+
* Get stages and its associated tasks information for a case instance
|
|
835
|
+
* @param caseInstanceId - The ID of the case instance
|
|
836
|
+
* @param folderKey - Required folder key
|
|
837
|
+
* @returns Promise resolving to an array of case stages with their tasks and status
|
|
838
|
+
* @example
|
|
839
|
+
* ```typescript
|
|
840
|
+
* // Get stages for a case instance
|
|
841
|
+
* const stages = await caseInstances.getStages(
|
|
842
|
+
* <caseInstanceId>,
|
|
843
|
+
* <folderKey>
|
|
844
|
+
* );
|
|
845
|
+
*
|
|
846
|
+
* // Iterate through stages
|
|
847
|
+
* for (const stage of stages) {
|
|
848
|
+
* console.log(`Stage: ${stage.name} - Status: ${stage.status}`);
|
|
849
|
+
*
|
|
850
|
+
* // Check tasks in the stage
|
|
851
|
+
* for (const taskGroup of stage.tasks) {
|
|
852
|
+
* for (const task of taskGroup) {
|
|
853
|
+
* console.log(` Task: ${task.name} - Status: ${task.status}`);
|
|
854
|
+
* }
|
|
855
|
+
* }
|
|
856
|
+
* }
|
|
857
|
+
* ```
|
|
858
|
+
*/
|
|
859
|
+
getStages(caseInstanceId: string, folderKey: string): Promise<CaseGetStageResponse[]>;
|
|
860
|
+
/**
|
|
861
|
+
* Get human in the loop tasks associated with a case instance
|
|
862
|
+
*
|
|
863
|
+
* The method returns either:
|
|
864
|
+
* - An array of tasks (when no pagination parameters are provided)
|
|
865
|
+
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
866
|
+
*
|
|
867
|
+
* @param caseInstanceId - The ID of the case instance
|
|
868
|
+
* @param options - Optional filtering and pagination options
|
|
869
|
+
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
870
|
+
* @example
|
|
871
|
+
* ```typescript
|
|
872
|
+
* // Get all tasks for a case instance (non-paginated)
|
|
873
|
+
* const actionTasks = await caseInstances.getActionTasks(
|
|
874
|
+
* <caseInstanceId>,
|
|
875
|
+
* );
|
|
876
|
+
*
|
|
877
|
+
* // First page with pagination
|
|
878
|
+
* const page1 = await caseInstances.getActionTasks(
|
|
879
|
+
* <caseInstanceId>,
|
|
880
|
+
* { pageSize: 10 }
|
|
881
|
+
* );
|
|
882
|
+
* // Iterate through tasks
|
|
883
|
+
* for (const task of page1.items) {
|
|
884
|
+
* console.log(`Task: ${task.title}`);
|
|
885
|
+
* console.log(`Task: ${task.status}`);
|
|
886
|
+
* }
|
|
887
|
+
*
|
|
888
|
+
* // Jump to specific page
|
|
889
|
+
* const page5 = await caseInstances.getActionTasks(
|
|
890
|
+
* <caseInstanceId>,
|
|
891
|
+
* {
|
|
892
|
+
* jumpToPage: 5,
|
|
893
|
+
* pageSize: 10
|
|
894
|
+
* }
|
|
895
|
+
* );
|
|
896
|
+
* ```
|
|
897
|
+
*/
|
|
898
|
+
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
899
|
+
}
|
|
900
|
+
interface CaseInstanceMethods {
|
|
901
|
+
/**
|
|
902
|
+
* Closes/cancels this case instance
|
|
903
|
+
*
|
|
904
|
+
* @param options - Optional close options with comment
|
|
905
|
+
* @returns Promise resolving to operation result
|
|
906
|
+
*/
|
|
907
|
+
close(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
908
|
+
/**
|
|
909
|
+
* Pauses this case instance
|
|
910
|
+
*
|
|
911
|
+
* @param options - Optional pause options with comment
|
|
912
|
+
* @returns Promise resolving to operation result
|
|
913
|
+
*/
|
|
914
|
+
pause(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
915
|
+
/**
|
|
916
|
+
* Reopens this case instance from a specified element
|
|
917
|
+
*
|
|
918
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
919
|
+
* @returns Promise resolving to operation result
|
|
920
|
+
*/
|
|
921
|
+
reopen(options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
922
|
+
/**
|
|
923
|
+
* Resumes this case instance
|
|
924
|
+
*
|
|
925
|
+
* @param options - Optional resume options with comment
|
|
926
|
+
* @returns Promise resolving to operation result
|
|
927
|
+
*/
|
|
928
|
+
resume(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
929
|
+
/**
|
|
930
|
+
* Gets execution history for this case instance
|
|
931
|
+
*
|
|
932
|
+
* @returns Promise resolving to instance execution history
|
|
933
|
+
*/
|
|
934
|
+
getExecutionHistory(): Promise<CaseInstanceExecutionHistoryResponse>;
|
|
935
|
+
/**
|
|
936
|
+
* Gets stages and their associated tasks for this case instance
|
|
937
|
+
*
|
|
938
|
+
* @returns Promise resolving to an array of case stages with their tasks and status
|
|
939
|
+
*/
|
|
940
|
+
getStages(): Promise<CaseGetStageResponse[]>;
|
|
941
|
+
/**
|
|
942
|
+
* Gets human in the loop tasks associated with this case instance
|
|
943
|
+
*
|
|
944
|
+
* @param options - Optional filtering and pagination options
|
|
945
|
+
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
946
|
+
*/
|
|
947
|
+
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
948
|
+
}
|
|
949
|
+
type CaseInstanceGetResponse = RawCaseInstanceGetResponse & CaseInstanceMethods;
|
|
950
|
+
/**
|
|
951
|
+
* Creates an actionable case instance by combining API case instance data with operational methods.
|
|
952
|
+
*
|
|
953
|
+
* @param instanceData - The case instance data from API
|
|
954
|
+
* @param service - The case instance service instance
|
|
955
|
+
* @returns A case instance object with added methods
|
|
956
|
+
*/
|
|
957
|
+
declare function createCaseInstanceWithMethods(instanceData: RawCaseInstanceGetResponse, service: CaseInstancesServiceModel): CaseInstanceGetResponse;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Pagination types supported by the SDK
|
|
961
|
+
*/
|
|
962
|
+
declare enum PaginationType {
|
|
963
|
+
OFFSET = "offset",
|
|
964
|
+
TOKEN = "token"
|
|
965
|
+
}
|
|
966
|
+
/**
|
|
967
|
+
* Interface for service access methods needed by pagination helpers
|
|
968
|
+
*/
|
|
969
|
+
interface PaginationServiceAccess {
|
|
970
|
+
get<T>(path: string, options?: any): Promise<{
|
|
971
|
+
data: T;
|
|
972
|
+
}>;
|
|
973
|
+
post<T>(path: string, body?: any, options?: any): Promise<{
|
|
974
|
+
data: T;
|
|
975
|
+
}>;
|
|
976
|
+
requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Field names for extracting data from paginated responses.
|
|
980
|
+
*/
|
|
981
|
+
interface PaginationFieldNames {
|
|
982
|
+
itemsField?: string;
|
|
983
|
+
totalCountField?: string;
|
|
984
|
+
continuationTokenField?: string;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Options for the requestWithPagination method in BaseService.
|
|
988
|
+
*/
|
|
989
|
+
interface RequestWithPaginationOptions extends RequestSpec {
|
|
990
|
+
pagination: PaginationFieldNames & {
|
|
991
|
+
paginationType: PaginationType;
|
|
992
|
+
paginationParams?: {
|
|
993
|
+
pageSizeParam?: string;
|
|
994
|
+
offsetParam?: string;
|
|
995
|
+
tokenParam?: string;
|
|
996
|
+
countParam?: string;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* HTTP methods supported by the API client
|
|
1003
|
+
*/
|
|
1004
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
1005
|
+
/**
|
|
1006
|
+
* Supported response types for API requests
|
|
1007
|
+
*/
|
|
1008
|
+
type ResponseType = 'json' | 'text' | 'blob' | 'arraybuffer' | 'stream';
|
|
1009
|
+
/**
|
|
1010
|
+
* Query parameters type with support for arrays and nested objects
|
|
1011
|
+
*/
|
|
1012
|
+
type QueryParams = Record<string, string | number | boolean | Array<string | number | boolean> | null | undefined>;
|
|
1013
|
+
/**
|
|
1014
|
+
* Standard HTTP headers type
|
|
1015
|
+
*/
|
|
1016
|
+
type Headers = Record<string, string>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Options for request retries
|
|
1019
|
+
*/
|
|
1020
|
+
interface RetryOptions {
|
|
1021
|
+
/** Maximum number of retry attempts */
|
|
1022
|
+
maxRetries?: number;
|
|
1023
|
+
/** Base delay between retries in milliseconds */
|
|
1024
|
+
retryDelay?: number;
|
|
1025
|
+
/** Whether to use exponential backoff */
|
|
1026
|
+
useExponentialBackoff?: boolean;
|
|
1027
|
+
/** Status codes that should trigger a retry */
|
|
1028
|
+
retryableStatusCodes?: number[];
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Options for request timeouts
|
|
1032
|
+
*/
|
|
1033
|
+
interface TimeoutOptions {
|
|
1034
|
+
/** Request timeout in milliseconds */
|
|
1035
|
+
timeout?: number;
|
|
1036
|
+
/** Whether to abort the request on timeout */
|
|
1037
|
+
abortOnTimeout?: boolean;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Options for request body transformation
|
|
1041
|
+
*/
|
|
1042
|
+
interface BodyOptions {
|
|
1043
|
+
/** Whether to stringify the body */
|
|
1044
|
+
stringify?: boolean;
|
|
1045
|
+
/** Content type override */
|
|
1046
|
+
contentType?: string;
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Pagination metadata for API requests
|
|
1050
|
+
*/
|
|
1051
|
+
interface PaginationMetadata {
|
|
1052
|
+
/** Type of pagination used by the API endpoint */
|
|
1053
|
+
paginationType: PaginationType;
|
|
1054
|
+
/** Response field containing items array (defaults to 'value') */
|
|
1055
|
+
itemsField?: string;
|
|
1056
|
+
/** Response field containing total count (defaults to '@odata.count') */
|
|
1057
|
+
totalCountField?: string;
|
|
1058
|
+
/** Response field containing continuation token (defaults to 'continuationToken') */
|
|
1059
|
+
continuationTokenField?: string;
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* Base interface for all API requests
|
|
1063
|
+
*/
|
|
1064
|
+
interface RequestSpec {
|
|
1065
|
+
/** HTTP method for the request */
|
|
1066
|
+
method?: HttpMethod;
|
|
1067
|
+
/** URL endpoint for the request */
|
|
1068
|
+
url?: string;
|
|
1069
|
+
/** Query parameters to be appended to the URL */
|
|
1070
|
+
params?: QueryParams;
|
|
1071
|
+
/** HTTP headers to include with the request */
|
|
1072
|
+
headers?: Headers;
|
|
1073
|
+
/** Raw body content (takes precedence over data) */
|
|
1074
|
+
body?: unknown;
|
|
1075
|
+
/** Expected response type */
|
|
1076
|
+
responseType?: ResponseType;
|
|
1077
|
+
/** Request timeout options */
|
|
1078
|
+
timeoutOptions?: TimeoutOptions;
|
|
1079
|
+
/** Retry behavior options */
|
|
1080
|
+
retryOptions?: RetryOptions;
|
|
1081
|
+
/** Body transformation options */
|
|
1082
|
+
bodyOptions?: BodyOptions;
|
|
1083
|
+
/** AbortSignal for cancelling the request */
|
|
1084
|
+
signal?: AbortSignal;
|
|
1085
|
+
/** Pagination metadata for the request */
|
|
1086
|
+
pagination?: PaginationMetadata;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
interface ApiResponse<T> {
|
|
1090
|
+
data: T;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Base class for all UiPath SDK services.
|
|
1094
|
+
*
|
|
1095
|
+
* Provides common functionality for authentication, configuration, and API communication.
|
|
1096
|
+
* All service classes extend this base to inherit dependency injection and HTTP client access.
|
|
1097
|
+
*
|
|
1098
|
+
* This class implements the dependency injection pattern where services receive a configured
|
|
1099
|
+
* UiPath instance. The ApiClient is created internally and handles all HTTP operations
|
|
1100
|
+
* including authentication token management.
|
|
1101
|
+
*
|
|
1102
|
+
* @remarks
|
|
1103
|
+
* Service classes should extend this base and call `super(uiPath)` in their constructor.
|
|
1104
|
+
* Protected HTTP methods (get, post, put, patch, delete) are available to all subclasses.
|
|
1105
|
+
*
|
|
1106
|
+
*/
|
|
1107
|
+
declare class BaseService {
|
|
1108
|
+
#private;
|
|
1109
|
+
/**
|
|
1110
|
+
* Creates a base service instance with dependency injection.
|
|
1111
|
+
*
|
|
1112
|
+
* Extracts configuration, execution context, and token manager from the UiPath instance
|
|
1113
|
+
* to initialize an authenticated API client. The ApiClient handles all HTTP operations
|
|
1114
|
+
* and token management internally.
|
|
1115
|
+
*
|
|
1116
|
+
* @param instance - UiPath SDK instance providing authentication and configuration.
|
|
1117
|
+
* Services receive this via dependency injection in the modular pattern.
|
|
1118
|
+
*
|
|
1119
|
+
* @example
|
|
1120
|
+
* ```typescript
|
|
1121
|
+
* // Services automatically call this via super()
|
|
1122
|
+
* export class EntityService extends BaseService {
|
|
1123
|
+
* constructor(instance: IUiPath) {
|
|
1124
|
+
* super(instance); // Initializes the internal ApiClient
|
|
1125
|
+
* }
|
|
1126
|
+
* }
|
|
1127
|
+
*
|
|
1128
|
+
* // Usage in modular pattern
|
|
1129
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
1130
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1131
|
+
*
|
|
1132
|
+
* const sdk = new UiPath(config);
|
|
1133
|
+
* await sdk.initialize();
|
|
1134
|
+
* const entities = new Entities(sdk);
|
|
1135
|
+
* ```
|
|
1136
|
+
*/
|
|
1137
|
+
constructor(instance: IUiPath);
|
|
1138
|
+
/**
|
|
1139
|
+
* Gets a valid authentication token, refreshing if necessary.
|
|
1140
|
+
* Use this when you need to manually add Authorization headers (e.g., direct uploads).
|
|
1141
|
+
*
|
|
1142
|
+
* @returns Promise resolving to a valid access token string
|
|
1143
|
+
* @throws AuthenticationError if no token is available or refresh fails
|
|
1144
|
+
*/
|
|
1145
|
+
protected getValidAuthToken(): Promise<string>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Creates a service accessor for pagination helpers
|
|
1148
|
+
* This allows pagination helpers to access protected methods without making them public
|
|
1149
|
+
*/
|
|
1150
|
+
protected createPaginationServiceAccess(): PaginationServiceAccess;
|
|
1151
|
+
protected request<T>(method: string, path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1152
|
+
protected requestWithSpec<T>(spec: RequestSpec): Promise<ApiResponse<T>>;
|
|
1153
|
+
protected get<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1154
|
+
protected post<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1155
|
+
protected put<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1156
|
+
protected patch<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1157
|
+
protected delete<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Execute a request with cursor-based pagination
|
|
1160
|
+
*/
|
|
1161
|
+
protected requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Validates and prepares pagination parameters from options
|
|
1164
|
+
*/
|
|
1165
|
+
private validateAndPreparePaginationParams;
|
|
1166
|
+
/**
|
|
1167
|
+
* Prepares request parameters for pagination based on pagination type
|
|
1168
|
+
*/
|
|
1169
|
+
private preparePaginationRequestParams;
|
|
1170
|
+
/**
|
|
1171
|
+
* Creates a paginated response from API response
|
|
1172
|
+
*/
|
|
1173
|
+
private createPaginatedResponseFromResponse;
|
|
1174
|
+
/**
|
|
1175
|
+
* Determines if there are more pages based on pagination type and metadata
|
|
1176
|
+
*/
|
|
1177
|
+
private determineHasMorePages;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Service for interacting with UiPath Maestro Cases
|
|
1182
|
+
*/
|
|
1183
|
+
declare class CasesService extends BaseService implements CasesServiceModel {
|
|
1184
|
+
/**
|
|
1185
|
+
* Get all case management processes with their instance statistics
|
|
1186
|
+
* @returns Promise resolving to array of Case objects
|
|
1187
|
+
*
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```typescript
|
|
1190
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
1191
|
+
*
|
|
1192
|
+
* const cases = new Cases(sdk);
|
|
1193
|
+
* const allCases = await cases.getAll();
|
|
1194
|
+
*
|
|
1195
|
+
* // Access case information
|
|
1196
|
+
* for (const caseProcess of allCases) {
|
|
1197
|
+
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
1198
|
+
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
1199
|
+
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
1200
|
+
* }
|
|
1201
|
+
* ```
|
|
1202
|
+
*/
|
|
1203
|
+
getAll(): Promise<CaseGetAllResponse[]>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Extract a readable case name from the packageId
|
|
1206
|
+
* @param packageId - The full package identifier
|
|
1207
|
+
* @returns A human-readable case name
|
|
1208
|
+
* @private
|
|
1209
|
+
*/
|
|
1210
|
+
private extractCaseName;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
declare class CaseInstancesService extends BaseService implements CaseInstancesServiceModel {
|
|
1214
|
+
private taskService;
|
|
1215
|
+
/**
|
|
1216
|
+
* Creates an instance of the Case Instances service.
|
|
1217
|
+
*
|
|
1218
|
+
* @param instance - UiPath SDK instance providing authentication and configuration
|
|
1219
|
+
*/
|
|
1220
|
+
constructor(instance: IUiPath);
|
|
1221
|
+
/**
|
|
1222
|
+
* Get all case instances with optional filtering and pagination
|
|
1223
|
+
*
|
|
1224
|
+
* The method returns either:
|
|
1225
|
+
* - A NonPaginatedResponse with items array (when no pagination parameters are provided)
|
|
1226
|
+
* - A PaginatedResponse with navigation cursors (when any pagination parameter is provided)
|
|
1227
|
+
*
|
|
1228
|
+
* @param options -Query parameters for filtering instances and pagination
|
|
1229
|
+
* @returns Promise resolving to case instances or paginated result
|
|
1230
|
+
*
|
|
1231
|
+
* @example
|
|
1232
|
+
* ```typescript
|
|
1233
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
1234
|
+
*
|
|
1235
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
1236
|
+
*
|
|
1237
|
+
* // Get all case instances (non-paginated)
|
|
1238
|
+
* const instances = await caseInstances.getAll();
|
|
1239
|
+
*
|
|
1240
|
+
* // Close faulted instances using methods directly on instances
|
|
1241
|
+
* for (const instance of instances.items) {
|
|
1242
|
+
* if (instance.latestRunStatus === 'Faulted') {
|
|
1243
|
+
* await instance.close({ comment: 'Closing faulted case instance' });
|
|
1244
|
+
* }
|
|
1245
|
+
* }
|
|
1246
|
+
*
|
|
1247
|
+
* // With filtering
|
|
1248
|
+
* const filtered = await caseInstances.getAll({
|
|
1249
|
+
* processKey: 'MyCaseProcess'
|
|
1250
|
+
* });
|
|
1251
|
+
*
|
|
1252
|
+
* // First page with pagination
|
|
1253
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
1254
|
+
*
|
|
1255
|
+
* // Navigate using cursor
|
|
1256
|
+
* if (page1.hasNextPage) {
|
|
1257
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
1258
|
+
* }
|
|
1259
|
+
* ```
|
|
1260
|
+
*/
|
|
1261
|
+
getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
|
|
1262
|
+
/**
|
|
1263
|
+
* Get a case instance by ID with operation methods (close, pause, resume, reopen)
|
|
1264
|
+
* @param instanceId - The ID of the instance to retrieve
|
|
1265
|
+
* @param folderKey - Required folder key
|
|
1266
|
+
* @returns Promise<CaseInstanceGetResponse>
|
|
1267
|
+
*/
|
|
1268
|
+
getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Enhance a single case instance with case JSON data
|
|
1271
|
+
* @param instance - The case instance to enhance
|
|
1272
|
+
* @returns Promise resolving to enhanced instance
|
|
1273
|
+
* @private
|
|
1274
|
+
*/
|
|
1275
|
+
private enhanceInstanceWithCaseJson;
|
|
1276
|
+
/**
|
|
1277
|
+
* Enhance multiple case instances with case JSON data
|
|
1278
|
+
* @param instances - Array of case instances to enhance
|
|
1279
|
+
* @returns Promise resolving to array of enhanced instances
|
|
1280
|
+
* @private
|
|
1281
|
+
*/
|
|
1282
|
+
private enhanceInstancesWithCaseJson;
|
|
1283
|
+
/**
|
|
1284
|
+
* Get case JSON for a specific instance
|
|
1285
|
+
* @param instanceId - The case instance ID
|
|
1286
|
+
* @param folderKey - Required folder key
|
|
1287
|
+
* @returns Promise resolving to case JSON data
|
|
1288
|
+
* @private
|
|
1289
|
+
*/
|
|
1290
|
+
private getCaseJson;
|
|
1291
|
+
/**
|
|
1292
|
+
* Close a case instance
|
|
1293
|
+
* @param instanceId - The ID of the instance to cancel
|
|
1294
|
+
* @param folderKey - Required folder key
|
|
1295
|
+
* @param options - Optional cancellation options with comment
|
|
1296
|
+
* @returns Promise resolving to operation result with updated instance data
|
|
1297
|
+
*/
|
|
1298
|
+
close(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Pause a case instance
|
|
1301
|
+
* @param instanceId - The ID of the instance to pause
|
|
1302
|
+
* @param folderKey - Required folder key
|
|
1303
|
+
* @param options - Optional pause options with comment
|
|
1304
|
+
* @returns Promise resolving to operation result with updated instance data
|
|
1305
|
+
*/
|
|
1306
|
+
pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Reopen a case instance from a specified element
|
|
1309
|
+
* @param instanceId - The ID of the case instance to reopen
|
|
1310
|
+
* @param folderKey - Required folder key
|
|
1311
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
1312
|
+
* @returns Promise resolving to operation result with updated instance data
|
|
1313
|
+
*/
|
|
1314
|
+
reopen(instanceId: string, folderKey: string, options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
1315
|
+
/**
|
|
1316
|
+
* Resume a case instance
|
|
1317
|
+
* @param instanceId - The ID of the instance to resume
|
|
1318
|
+
* @param folderKey - Required folder key
|
|
1319
|
+
* @param options - Optional resume options with comment
|
|
1320
|
+
* @returns Promise resolving to operation result with updated instance data
|
|
1321
|
+
*/
|
|
1322
|
+
resume(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
1323
|
+
/**
|
|
1324
|
+
* Get execution history for a case instance
|
|
1325
|
+
* @param instanceId - The ID of the case instance
|
|
1326
|
+
* @param folderKey - Required folder key
|
|
1327
|
+
* @returns Promise resolving to instance execution history
|
|
1328
|
+
* @example
|
|
1329
|
+
* ```typescript
|
|
1330
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
1331
|
+
*
|
|
1332
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
1333
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
1334
|
+
* 'instance-id',
|
|
1335
|
+
* 'folder-key'
|
|
1336
|
+
* );
|
|
1337
|
+
* ```
|
|
1338
|
+
*/
|
|
1339
|
+
getExecutionHistory(instanceId: string, folderKey: string): Promise<CaseInstanceExecutionHistoryResponse>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Get case stages with their associated tasks and execution status
|
|
1342
|
+
* @param caseInstanceId - The ID of the case instance
|
|
1343
|
+
* @param folderKey - Required folder key
|
|
1344
|
+
* @returns Promise resolving to an array of case stages, each containing their tasks with execution details
|
|
1345
|
+
*/
|
|
1346
|
+
getStages(caseInstanceId: string, folderKey: string): Promise<CaseGetStageResponse[]>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Create a map of element ID to execution data
|
|
1349
|
+
* @param executionHistory - The execution history response
|
|
1350
|
+
* @returns Map of elementId to execution metadata
|
|
1351
|
+
* @private
|
|
1352
|
+
*/
|
|
1353
|
+
private createExecutionMap;
|
|
1354
|
+
/**
|
|
1355
|
+
* Create a map of binding IDs to their values
|
|
1356
|
+
* @param caseJsonResponse - The case JSON response
|
|
1357
|
+
* @returns Map of binding ID to binding object
|
|
1358
|
+
* @private
|
|
1359
|
+
*/
|
|
1360
|
+
private createBindingsMap;
|
|
1361
|
+
/**
|
|
1362
|
+
* Resolve binding values from binding expressions
|
|
1363
|
+
* @param value - The value that may contain binding references
|
|
1364
|
+
* @param bindingsMap - Map of binding IDs to binding objects
|
|
1365
|
+
* @returns Resolved value
|
|
1366
|
+
* @private
|
|
1367
|
+
*/
|
|
1368
|
+
private resolveBinding;
|
|
1369
|
+
/**
|
|
1370
|
+
* Process tasks for a stage node
|
|
1371
|
+
* @param node - The stage node containing tasks
|
|
1372
|
+
* @param executionMap - Map of element IDs to execution data
|
|
1373
|
+
* @param bindingsMap - Map of binding IDs to binding objects
|
|
1374
|
+
* @returns Processed tasks array
|
|
1375
|
+
* @private
|
|
1376
|
+
*/
|
|
1377
|
+
private processTasks;
|
|
1378
|
+
/**
|
|
1379
|
+
* Create a stage from a case node
|
|
1380
|
+
* @param node - The case node to process
|
|
1381
|
+
* @param executionMap - Map of element IDs to execution data
|
|
1382
|
+
* @param bindingsMap - Map of binding IDs to binding objects
|
|
1383
|
+
* @returns CaseGetStageResponse object
|
|
1384
|
+
* @private
|
|
1385
|
+
*/
|
|
1386
|
+
private createStageFromNode;
|
|
1387
|
+
/**
|
|
1388
|
+
* Get human in the loop tasks associated with a case instance
|
|
1389
|
+
* @param caseInstanceId - The ID of the case instance
|
|
1390
|
+
* @param options - Optional filtering and pagination options
|
|
1391
|
+
* @returns Promise resolving to human in the loop tasks associated with the case instance
|
|
1392
|
+
*/
|
|
1393
|
+
getActionTasks<T extends TaskGetAllOptions = TaskGetAllOptions>(caseInstanceId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<TaskGetResponse> : NonPaginatedResponse<TaskGetResponse>>;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
export { CaseInstancesService as CaseInstances, CaseInstancesService, CasesService as Cases, CasesService, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, SLADurationUnit, StageTaskType, createCaseInstanceWithMethods };
|
|
1397
|
+
export type { CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ElementExecutionMetadata, ElementRunMetadata, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, RawCaseInstanceGetResponse, StageSLA, StageTask };
|