@uipath/uipath-typescript 1.0.0-beta.17 → 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 +3611 -3176
- package/dist/index.d.ts +1049 -540
- package/dist/index.mjs +3611 -3176
- package/dist/index.umd.js +8492 -11899
- 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 -5376
- package/dist/index.d.mts +0 -5376
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,122 @@
|
|
|
1
|
-
|
|
1
|
+
interface BaseConfig {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
orgName: string;
|
|
4
|
+
tenantName: string;
|
|
5
|
+
}
|
|
6
|
+
interface OAuthFields {
|
|
7
|
+
clientId: string;
|
|
8
|
+
redirectUri: string;
|
|
9
|
+
scope: string;
|
|
10
|
+
}
|
|
11
|
+
type UiPathSDKConfig = BaseConfig & ({
|
|
12
|
+
secret: string;
|
|
13
|
+
clientId?: never;
|
|
14
|
+
redirectUri?: never;
|
|
15
|
+
scope?: never;
|
|
16
|
+
} | ({
|
|
17
|
+
secret?: never;
|
|
18
|
+
} & OAuthFields));
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* IUiPath - Interface for UiPath SDK instance
|
|
22
|
+
*
|
|
23
|
+
* This interface defines the public contract for the UiPath SDK.
|
|
24
|
+
* Services depend on this interface rather than the concrete UiPath class,
|
|
25
|
+
* enabling proper type sharing across modular imports without #private field issues.
|
|
26
|
+
*
|
|
27
|
+
* @internal This interface is for internal SDK use only
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
interface IUiPath {
|
|
31
|
+
/** Read-only configuration for the SDK instance */
|
|
32
|
+
readonly config: Readonly<BaseConfig>;
|
|
33
|
+
/**
|
|
34
|
+
* Initialize the SDK based on the provided configuration.
|
|
35
|
+
* For secret-based auth, this returns immediately.
|
|
36
|
+
* For OAuth, this handles the authentication flow.
|
|
37
|
+
*/
|
|
38
|
+
initialize(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Check if the SDK has been initialized
|
|
41
|
+
*/
|
|
42
|
+
isInitialized(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Check if we're in an OAuth callback state
|
|
45
|
+
*/
|
|
46
|
+
isInOAuthCallback(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Complete OAuth authentication flow
|
|
49
|
+
*/
|
|
50
|
+
completeOAuth(): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Check if the user is authenticated (has valid token)
|
|
53
|
+
*/
|
|
54
|
+
isAuthenticated(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Get the current authentication token
|
|
57
|
+
*/
|
|
58
|
+
getToken(): string | undefined;
|
|
59
|
+
}
|
|
2
60
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
61
|
+
/**
|
|
62
|
+
* UiPath - Core SDK class for authentication and configuration management.
|
|
63
|
+
*
|
|
64
|
+
* Handles authentication, configuration, and provides access to SDK internals
|
|
65
|
+
* for service instantiation in the modular pattern.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* // Modular pattern
|
|
70
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
71
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
72
|
+
*
|
|
73
|
+
* const sdk = new UiPath({
|
|
74
|
+
* baseUrl: 'https://cloud.uipath.com',
|
|
75
|
+
* orgName: 'myorg',
|
|
76
|
+
* tenantName: 'mytenant',
|
|
77
|
+
* clientId: 'xxx',
|
|
78
|
+
* redirectUri: 'http://localhost:3000/callback',
|
|
79
|
+
* scope: 'OR.Users OR.Robots'
|
|
80
|
+
* });
|
|
81
|
+
*
|
|
82
|
+
* await sdk.initialize();
|
|
83
|
+
*
|
|
84
|
+
* const entitiesService = new Entities(sdk);
|
|
85
|
+
* const allEntities = await entitiesService.getAll();
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
declare class UiPath$1 implements IUiPath {
|
|
89
|
+
#private;
|
|
90
|
+
/** Read-only config for user convenience */
|
|
91
|
+
readonly config: Readonly<BaseConfig>;
|
|
92
|
+
constructor(config: UiPathSDKConfig);
|
|
93
|
+
/**
|
|
94
|
+
* Initialize the SDK based on the provided configuration.
|
|
95
|
+
* This method handles both OAuth flow initiation and completion automatically.
|
|
96
|
+
* For secret-based authentication, initialization is automatic and this returns immediately.
|
|
97
|
+
*/
|
|
98
|
+
initialize(): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Check if the SDK has been initialized
|
|
101
|
+
*/
|
|
102
|
+
isInitialized(): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Check if we're in an OAuth callback state
|
|
105
|
+
*/
|
|
106
|
+
isInOAuthCallback(): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Complete OAuth authentication flow (only call if isInOAuthCallback() is true)
|
|
109
|
+
*/
|
|
110
|
+
completeOAuth(): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Check if the user is authenticated (has valid token)
|
|
113
|
+
*/
|
|
114
|
+
isAuthenticated(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Get the current authentication token
|
|
117
|
+
*/
|
|
118
|
+
getToken(): string | undefined;
|
|
119
|
+
}
|
|
13
120
|
|
|
14
121
|
/**
|
|
15
122
|
* Simplified universal pagination cursor
|
|
@@ -209,173 +316,63 @@ interface RequestSpec {
|
|
|
209
316
|
pagination?: PaginationMetadata;
|
|
210
317
|
}
|
|
211
318
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
* It provides a way to share context across service calls and maintain
|
|
215
|
-
* execution state throughout the lifecycle of operations.
|
|
216
|
-
*/
|
|
217
|
-
declare class ExecutionContext {
|
|
218
|
-
private context;
|
|
219
|
-
private headers;
|
|
220
|
-
/**
|
|
221
|
-
* Set a context value that will be available throughout the execution
|
|
222
|
-
*/
|
|
223
|
-
set<T>(key: string, value: T): void;
|
|
224
|
-
/**
|
|
225
|
-
* Get a previously set context value
|
|
226
|
-
*/
|
|
227
|
-
get<T>(key: string): T | undefined;
|
|
228
|
-
/**
|
|
229
|
-
* Set custom headers that will be included in all API requests
|
|
230
|
-
*/
|
|
231
|
-
setHeaders(headers: Record<string, string>): void;
|
|
232
|
-
/**
|
|
233
|
-
* Get all custom headers
|
|
234
|
-
*/
|
|
235
|
-
getHeaders(): Record<string, string>;
|
|
236
|
-
/**
|
|
237
|
-
* Clear all context and headers
|
|
238
|
-
*/
|
|
239
|
-
clear(): void;
|
|
240
|
-
/**
|
|
241
|
-
* Create a request spec for an API call
|
|
242
|
-
*/
|
|
243
|
-
createRequestSpec(spec?: Partial<RequestSpec>): RequestSpec;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Authentication token information
|
|
248
|
-
*/
|
|
249
|
-
interface TokenInfo {
|
|
250
|
-
token: string;
|
|
251
|
-
type: 'secret' | 'oauth';
|
|
252
|
-
expiresAt?: Date;
|
|
253
|
-
refreshToken?: string;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* OAuth token response
|
|
257
|
-
*/
|
|
258
|
-
interface AuthToken {
|
|
259
|
-
access_token: string;
|
|
260
|
-
token_type: string;
|
|
261
|
-
expires_in: number;
|
|
262
|
-
scope: string;
|
|
263
|
-
refresh_token?: string;
|
|
319
|
+
interface ApiResponse<T> {
|
|
320
|
+
data: T;
|
|
264
321
|
}
|
|
265
|
-
|
|
266
322
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
323
|
+
* Base class for all UiPath SDK services.
|
|
324
|
+
*
|
|
325
|
+
* Provides common functionality for authentication, configuration, and API communication.
|
|
326
|
+
* All service classes extend this base to inherit dependency injection and HTTP client access.
|
|
327
|
+
*
|
|
328
|
+
* This class implements the dependency injection pattern where services receive a configured
|
|
329
|
+
* UiPath instance. The ApiClient is created internally and handles all HTTP operations
|
|
330
|
+
* including authentication token management.
|
|
331
|
+
*
|
|
332
|
+
* @remarks
|
|
333
|
+
* Service classes should extend this base and call `super(uiPath)` in their constructor.
|
|
334
|
+
* Protected HTTP methods (get, post, put, patch, delete) are available to all subclasses.
|
|
335
|
+
*
|
|
271
336
|
*/
|
|
272
|
-
declare class
|
|
273
|
-
private
|
|
274
|
-
private config;
|
|
275
|
-
private isOAuth;
|
|
276
|
-
private currentToken?;
|
|
277
|
-
private readonly STORAGE_KEY_PREFIX;
|
|
278
|
-
private refreshPromise;
|
|
279
|
-
/**
|
|
280
|
-
* Creates a new TokenManager instance
|
|
281
|
-
* @param executionContext The execution context
|
|
282
|
-
* @param config The SDK configuration
|
|
283
|
-
* @param isOAuth Whether this is an OAuth-based authentication
|
|
284
|
-
*/
|
|
285
|
-
constructor(executionContext: ExecutionContext, config: Config, isOAuth?: boolean);
|
|
286
|
-
/**
|
|
287
|
-
* Checks if a token is expired
|
|
288
|
-
* @param tokenInfo The token info to check
|
|
289
|
-
* @returns true if the token is expired, false otherwise
|
|
290
|
-
*/
|
|
291
|
-
isTokenExpired(tokenInfo?: TokenInfo): boolean;
|
|
292
|
-
/**
|
|
293
|
-
* Gets the storage key for this TokenManager instance
|
|
294
|
-
*/
|
|
295
|
-
private _getStorageKey;
|
|
296
|
-
/**
|
|
297
|
-
* Loads token from session storage if available
|
|
298
|
-
* @returns true if a valid token was loaded, false otherwise
|
|
299
|
-
*/
|
|
300
|
-
loadFromStorage(): boolean;
|
|
301
|
-
/**
|
|
302
|
-
* Parse and validate token info from storage
|
|
303
|
-
* @param storedToken JSON string from storage
|
|
304
|
-
* @returns Valid TokenInfo or undefined if invalid
|
|
305
|
-
*/
|
|
306
|
-
private _parseTokenInfo;
|
|
307
|
-
/**
|
|
308
|
-
* Sets a new token and updates all necessary contexts
|
|
309
|
-
*/
|
|
310
|
-
setToken(tokenInfo: TokenInfo): void;
|
|
311
|
-
/**
|
|
312
|
-
* Gets the current token information
|
|
313
|
-
*/
|
|
314
|
-
getTokenInfo(): TokenInfo | undefined;
|
|
315
|
-
/**
|
|
316
|
-
* Gets just the token string
|
|
317
|
-
*/
|
|
318
|
-
getToken(): string | undefined;
|
|
319
|
-
/**
|
|
320
|
-
* Checks if we have a valid token
|
|
321
|
-
*/
|
|
322
|
-
hasValidToken(): boolean;
|
|
323
|
-
/**
|
|
324
|
-
* Clears the current token
|
|
325
|
-
*/
|
|
326
|
-
clearToken(): void;
|
|
327
|
-
/**
|
|
328
|
-
* Updates execution context with token information
|
|
329
|
-
*/
|
|
330
|
-
private _updateExecutionContext;
|
|
337
|
+
declare class BaseService {
|
|
338
|
+
#private;
|
|
331
339
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
340
|
+
* Creates a base service instance with dependency injection.
|
|
341
|
+
*
|
|
342
|
+
* Extracts configuration, execution context, and token manager from the UiPath instance
|
|
343
|
+
* to initialize an authenticated API client. The ApiClient handles all HTTP operations
|
|
344
|
+
* and token management internally.
|
|
345
|
+
*
|
|
346
|
+
* @param instance - UiPath SDK instance providing authentication and configuration.
|
|
347
|
+
* Services receive this via dependency injection in the modular pattern.
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```typescript
|
|
351
|
+
* // Services automatically call this via super()
|
|
352
|
+
* export class EntityService extends BaseService {
|
|
353
|
+
* constructor(instance: IUiPath) {
|
|
354
|
+
* super(instance); // Initializes the internal ApiClient
|
|
355
|
+
* }
|
|
356
|
+
* }
|
|
357
|
+
*
|
|
358
|
+
* // Usage in modular pattern
|
|
359
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
360
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
361
|
+
*
|
|
362
|
+
* const sdk = new UiPath(config);
|
|
363
|
+
* await sdk.initialize();
|
|
364
|
+
* const entities = new Entities(sdk);
|
|
365
|
+
* ```
|
|
337
366
|
*/
|
|
338
|
-
|
|
367
|
+
constructor(instance: IUiPath);
|
|
339
368
|
/**
|
|
340
|
-
*
|
|
369
|
+
* Gets a valid authentication token, refreshing if necessary.
|
|
370
|
+
* Use this when you need to manually add Authorization headers (e.g., direct uploads).
|
|
371
|
+
*
|
|
372
|
+
* @returns Promise resolving to a valid access token string
|
|
373
|
+
* @throws AuthenticationError if no token is available or refresh fails
|
|
341
374
|
*/
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
interface ApiClientConfig {
|
|
346
|
-
headers?: Record<string, string>;
|
|
347
|
-
}
|
|
348
|
-
declare class ApiClient {
|
|
349
|
-
private readonly config;
|
|
350
|
-
private readonly executionContext;
|
|
351
|
-
private readonly clientConfig;
|
|
352
|
-
private defaultHeaders;
|
|
353
|
-
private tokenManager;
|
|
354
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager, clientConfig?: ApiClientConfig);
|
|
355
|
-
setDefaultHeaders(headers: Record<string, string>): void;
|
|
356
|
-
/**
|
|
357
|
-
* Checks if the current token needs refresh and refreshes it if necessary
|
|
358
|
-
* @returns The valid token
|
|
359
|
-
* @throws Error if token refresh fails
|
|
360
|
-
*/
|
|
361
|
-
private ensureValidToken;
|
|
362
|
-
private getDefaultHeaders;
|
|
363
|
-
private request;
|
|
364
|
-
get<T>(path: string, options?: RequestSpec): Promise<T>;
|
|
365
|
-
post<T>(path: string, data?: unknown, options?: RequestSpec): Promise<T>;
|
|
366
|
-
put<T>(path: string, data?: unknown, options?: RequestSpec): Promise<T>;
|
|
367
|
-
patch<T>(path: string, data?: unknown, options?: RequestSpec): Promise<T>;
|
|
368
|
-
delete<T>(path: string, options?: RequestSpec): Promise<T>;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
interface ApiResponse<T> {
|
|
372
|
-
data: T;
|
|
373
|
-
}
|
|
374
|
-
declare class BaseService {
|
|
375
|
-
protected readonly config: Config;
|
|
376
|
-
protected readonly executionContext: ExecutionContext;
|
|
377
|
-
protected readonly apiClient: ApiClient;
|
|
378
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
375
|
+
protected getValidAuthToken(): Promise<string>;
|
|
379
376
|
/**
|
|
380
377
|
* Creates a service accessor for pagination helpers
|
|
381
378
|
* This allows pagination helpers to access protected methods without making them public
|
|
@@ -442,11 +439,23 @@ interface EntityRecord {
|
|
|
442
439
|
}
|
|
443
440
|
/**
|
|
444
441
|
* Options for getting an entity by Id
|
|
442
|
+
* @deprecated Use {@link EntityGetRecordByIdOptions} instead for better clarity on getting all records of an entity. This type will be removed in future versions.
|
|
445
443
|
*/
|
|
446
444
|
type EntityGetRecordsByIdOptions = {
|
|
447
445
|
/** Level of entity expansion (default: 0) */
|
|
448
446
|
expansionLevel?: number;
|
|
449
447
|
} & PaginationOptions;
|
|
448
|
+
/**
|
|
449
|
+
* Options for getting all records of an entity
|
|
450
|
+
*/
|
|
451
|
+
type EntityGetAllRecordsOptions = EntityGetRecordsByIdOptions;
|
|
452
|
+
/**
|
|
453
|
+
* Options for getting a single entity record by entity ID and record ID
|
|
454
|
+
*/
|
|
455
|
+
interface EntityGetRecordByIdOptions {
|
|
456
|
+
/** Level of entity expansion (default: 0) */
|
|
457
|
+
expansionLevel?: number;
|
|
458
|
+
}
|
|
450
459
|
/**
|
|
451
460
|
* Common options for entity operations that modify multiple records
|
|
452
461
|
*/
|
|
@@ -457,20 +466,47 @@ interface EntityOperationOptions {
|
|
|
457
466
|
failOnFirst?: boolean;
|
|
458
467
|
}
|
|
459
468
|
/**
|
|
460
|
-
* Options for inserting
|
|
469
|
+
* Options for inserting a single record into an entity
|
|
470
|
+
* @deprecated Use {@link EntityInsertRecordOptions} instead for better clarity on inserting a single record into an entity. This type will be removed in future versions.
|
|
471
|
+
*/
|
|
472
|
+
interface EntityInsertOptions {
|
|
473
|
+
/** Level of entity expansion (default: 0) */
|
|
474
|
+
expansionLevel?: number;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Options for inserting a single record into an entity
|
|
478
|
+
*/
|
|
479
|
+
type EntityInsertRecordOptions = EntityInsertOptions;
|
|
480
|
+
/**
|
|
481
|
+
* Options for batch inserting data into an entity
|
|
482
|
+
* @deprecated Use {@link EntityInsertRecordsOptions} instead for better clarity on inserting multiple records into an entity. This type will be removed in future versions.
|
|
461
483
|
*/
|
|
462
|
-
type
|
|
484
|
+
type EntityBatchInsertOptions = EntityOperationOptions;
|
|
485
|
+
/**
|
|
486
|
+
* Options for inserting multiple records into an entity
|
|
487
|
+
*/
|
|
488
|
+
type EntityInsertRecordsOptions = EntityOperationOptions;
|
|
463
489
|
/**
|
|
464
490
|
* Options for updating data in an entity
|
|
491
|
+
* @deprecated Use {@link EntityUpdateRecordOptions} instead for better clarity on updating records in an entity. This type will be removed in future versions.
|
|
465
492
|
*/
|
|
466
493
|
type EntityUpdateOptions = EntityOperationOptions;
|
|
494
|
+
/**
|
|
495
|
+
* Options for updating data in an entity
|
|
496
|
+
*/
|
|
497
|
+
type EntityUpdateRecordsOptions = EntityOperationOptions;
|
|
467
498
|
/**
|
|
468
499
|
* Options for deleting data from an entity
|
|
500
|
+
* @deprecated Use {@link EntityDeleteRecordsOptions} instead for better clarity on deleting records from an entity. This type will be removed in future versions.
|
|
469
501
|
*/
|
|
470
502
|
interface EntityDeleteOptions {
|
|
471
503
|
/** Whether to fail on first error (default: false) */
|
|
472
504
|
failOnFirst?: boolean;
|
|
473
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Options for deleting records in an entity
|
|
508
|
+
*/
|
|
509
|
+
type EntityDeleteRecordsOptions = EntityDeleteOptions;
|
|
474
510
|
/**
|
|
475
511
|
* Options for downloading an attachment from an entity record
|
|
476
512
|
*/
|
|
@@ -501,9 +537,14 @@ interface EntityOperationResponse {
|
|
|
501
537
|
failureRecords: FailureRecord[];
|
|
502
538
|
}
|
|
503
539
|
/**
|
|
504
|
-
* Response from inserting
|
|
540
|
+
* Response from inserting a single record into an entity
|
|
541
|
+
* Returns the inserted record with its generated record ID and other fields
|
|
505
542
|
*/
|
|
506
|
-
type EntityInsertResponse =
|
|
543
|
+
type EntityInsertResponse = EntityRecord;
|
|
544
|
+
/**
|
|
545
|
+
* Response from batch inserting data into an entity
|
|
546
|
+
*/
|
|
547
|
+
type EntityBatchInsertResponse = EntityOperationResponse;
|
|
507
548
|
/**
|
|
508
549
|
* Response from updating data in an entity
|
|
509
550
|
*/
|
|
@@ -689,6 +730,16 @@ interface RawEntityGetResponse {
|
|
|
689
730
|
*
|
|
690
731
|
* Entities are collections of records that can be used to store and manage data in the Data Fabric. [UiPath Data Fabric Guide](https://docs.uipath.com/data-service/automation-cloud/latest/user-guide/introduction)
|
|
691
732
|
*
|
|
733
|
+
* ### Usage
|
|
734
|
+
*
|
|
735
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
736
|
+
*
|
|
737
|
+
* ```typescript
|
|
738
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
739
|
+
*
|
|
740
|
+
* const entities = new Entities(sdk);
|
|
741
|
+
* const allEntities = await entities.getAll();
|
|
742
|
+
* ```
|
|
692
743
|
*/
|
|
693
744
|
interface EntityServiceModel {
|
|
694
745
|
/**
|
|
@@ -699,24 +750,29 @@ interface EntityServiceModel {
|
|
|
699
750
|
* @example
|
|
700
751
|
* ```typescript
|
|
701
752
|
* // Get all entities
|
|
702
|
-
* const
|
|
753
|
+
* const allEntities = await entities.getAll();
|
|
703
754
|
*
|
|
704
755
|
* // Iterate through entities
|
|
705
|
-
*
|
|
756
|
+
* allEntities.forEach(entity => {
|
|
706
757
|
* console.log(`Entity: ${entity.displayName} (${entity.name})`);
|
|
707
758
|
* console.log(`Type: ${entity.entityType}`);
|
|
708
759
|
* });
|
|
709
760
|
*
|
|
710
761
|
* // Find a specific entity by name
|
|
711
|
-
* const customerEntity =
|
|
762
|
+
* const customerEntity = allEntities.find(e => e.name === 'Customer');
|
|
712
763
|
*
|
|
713
764
|
* // Use entity methods directly
|
|
714
765
|
* if (customerEntity) {
|
|
715
|
-
* const records = await customerEntity.
|
|
766
|
+
* const records = await customerEntity.getAllRecords();
|
|
716
767
|
* console.log(`Customer records: ${records.items.length}`);
|
|
717
768
|
*
|
|
718
|
-
*
|
|
719
|
-
*
|
|
769
|
+
* // Insert a single record
|
|
770
|
+
* const insertResult = await customerEntity.insertRecord({ name: "John", age: 30 });
|
|
771
|
+
*
|
|
772
|
+
* // Or batch insert multiple records
|
|
773
|
+
* const batchResult = await customerEntity.insertRecords([
|
|
774
|
+
* { name: "Jane", age: 25 },
|
|
775
|
+
* { name: "Bob", age: 35 }
|
|
720
776
|
* ]);
|
|
721
777
|
* }
|
|
722
778
|
* ```
|
|
@@ -730,20 +786,30 @@ interface EntityServiceModel {
|
|
|
730
786
|
* {@link EntityGetResponse}
|
|
731
787
|
* @example
|
|
732
788
|
* ```typescript
|
|
789
|
+
* import { Entities, ChoiceSets } from '@uipath/uipath-typescript/entities';
|
|
790
|
+
*
|
|
791
|
+
* const entities = new Entities(sdk);
|
|
792
|
+
* const choicesets = new ChoiceSets(sdk);
|
|
793
|
+
*
|
|
733
794
|
* // Get entity metadata with methods
|
|
734
|
-
* const entity = await
|
|
795
|
+
* const entity = await entities.getById(<entityId>);
|
|
735
796
|
*
|
|
736
797
|
* // Call operations directly on the entity
|
|
737
|
-
* const records = await entity.
|
|
798
|
+
* const records = await entity.getAllRecords();
|
|
738
799
|
*
|
|
739
800
|
* // If a field references a ChoiceSet, get the choiceSetId from records.fields
|
|
740
801
|
* const choiceSetId = records.fields[0].referenceChoiceSet?.id;
|
|
741
802
|
* if (choiceSetId) {
|
|
742
|
-
* const choiceSetValues = await
|
|
803
|
+
* const choiceSetValues = await choicesets.getById(choiceSetId);
|
|
743
804
|
* }
|
|
744
805
|
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
806
|
+
* // Insert a single record
|
|
807
|
+
* const insertResult = await entity.insertRecord({ name: "John", age: 30 });
|
|
808
|
+
*
|
|
809
|
+
* // Or batch insert multiple records
|
|
810
|
+
* const batchResult = await entity.insertRecords([
|
|
811
|
+
* { name: "Jane", age: 25 },
|
|
812
|
+
* { name: "Bob", age: 35 }
|
|
747
813
|
* ]);
|
|
748
814
|
* ```
|
|
749
815
|
*/
|
|
@@ -758,45 +824,105 @@ interface EntityServiceModel {
|
|
|
758
824
|
* @example
|
|
759
825
|
* ```typescript
|
|
760
826
|
* // Basic usage (non-paginated)
|
|
761
|
-
* const records = await
|
|
827
|
+
* const records = await entities.getAllRecords(<entityId>);
|
|
762
828
|
*
|
|
763
829
|
* // With expansion level
|
|
764
|
-
* const records = await
|
|
830
|
+
* const records = await entities.getAllRecords(<entityId>, {
|
|
765
831
|
* expansionLevel: 1
|
|
766
832
|
* });
|
|
767
833
|
*
|
|
768
834
|
* // With pagination
|
|
769
|
-
* const paginatedResponse = await
|
|
835
|
+
* const paginatedResponse = await entities.getAllRecords(<entityId>, {
|
|
770
836
|
* pageSize: 50,
|
|
771
837
|
* expansionLevel: 1
|
|
772
838
|
* });
|
|
773
839
|
*
|
|
774
840
|
* // Navigate to next page
|
|
775
|
-
* const nextPage = await
|
|
841
|
+
* const nextPage = await entities.getAllRecords(<entityId>, {
|
|
776
842
|
* cursor: paginatedResponse.nextCursor,
|
|
777
843
|
* expansionLevel: 1
|
|
778
844
|
* });
|
|
779
845
|
* ```
|
|
780
846
|
*/
|
|
847
|
+
getAllRecords<T extends EntityGetAllRecordsOptions = EntityGetAllRecordsOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
848
|
+
/**
|
|
849
|
+
* @deprecated Use {@link getAllRecords} instead.
|
|
850
|
+
* @hidden
|
|
851
|
+
*/
|
|
781
852
|
getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
782
853
|
/**
|
|
783
|
-
*
|
|
854
|
+
* Gets a single entity record by entity ID and record ID
|
|
855
|
+
*
|
|
856
|
+
* @param entityId - UUID of the entity
|
|
857
|
+
* @param recordId - UUID of the record
|
|
858
|
+
* @param options - Query options
|
|
859
|
+
* @returns Promise resolving to a single entity record
|
|
860
|
+
* {@link EntityRecord}
|
|
861
|
+
* @example
|
|
862
|
+
* ```typescript
|
|
863
|
+
* // First, get records to obtain the record ID
|
|
864
|
+
* const records = await entities.getAllRecords(<entityId>);
|
|
865
|
+
* // Get the recordId for the record
|
|
866
|
+
* const recordId = records.items[0].id;
|
|
867
|
+
* // Get the record
|
|
868
|
+
* const record = await entities.getRecordById(<entityId>, recordId);
|
|
869
|
+
*
|
|
870
|
+
* // With expansion level
|
|
871
|
+
* const record = await entities.getRecordById(<entityId>, recordId, {
|
|
872
|
+
* expansionLevel: 1
|
|
873
|
+
* });
|
|
874
|
+
* ```
|
|
875
|
+
*/
|
|
876
|
+
getRecordById(entityId: string, recordId: string, options?: EntityGetRecordByIdOptions): Promise<EntityRecord>;
|
|
877
|
+
/**
|
|
878
|
+
* Inserts a single record into an entity by entity ID
|
|
879
|
+
*
|
|
880
|
+
* Note: Data Fabric supports trigger events only on individual inserts, not on inserting multiple records.
|
|
881
|
+
* Use this method if you need trigger events to fire for the inserted record.
|
|
882
|
+
*
|
|
883
|
+
* @param id - UUID of the entity
|
|
884
|
+
* @param data - Record to insert
|
|
885
|
+
* @param options - Insert options
|
|
886
|
+
* @returns Promise resolving to the inserted record with generated record ID
|
|
887
|
+
* {@link EntityInsertResponse}
|
|
888
|
+
* @example
|
|
889
|
+
* ```typescript
|
|
890
|
+
* // Basic usage
|
|
891
|
+
* const result = await entities.insertRecordById(<entityId>, { name: "John", age: 30 });
|
|
892
|
+
*
|
|
893
|
+
* // With options
|
|
894
|
+
* const result = await entities.insertRecordById(<entityId>, { name: "John", age: 30 }, {
|
|
895
|
+
* expansionLevel: 1
|
|
896
|
+
* });
|
|
897
|
+
* ```
|
|
898
|
+
*/
|
|
899
|
+
insertRecordById(id: string, data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
900
|
+
/**
|
|
901
|
+
* @deprecated Use {@link insertRecordById} instead.
|
|
902
|
+
* @hidden
|
|
903
|
+
*/
|
|
904
|
+
insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
|
|
905
|
+
/**
|
|
906
|
+
* Inserts one or more records into an entity by entity ID
|
|
907
|
+
*
|
|
908
|
+
* Note: Records inserted using insertRecordsById will not trigger Data Fabric trigger events. Use {@link insertRecordById} if you need
|
|
909
|
+
* trigger events to fire for each inserted record.
|
|
784
910
|
*
|
|
785
911
|
* @param id - UUID of the entity
|
|
786
912
|
* @param data - Array of records to insert
|
|
787
913
|
* @param options - Insert options
|
|
788
914
|
* @returns Promise resolving to insert response
|
|
789
|
-
* {@link
|
|
915
|
+
* {@link EntityBatchInsertResponse}
|
|
790
916
|
* @example
|
|
791
917
|
* ```typescript
|
|
792
918
|
* // Basic usage
|
|
793
|
-
* const result = await
|
|
919
|
+
* const result = await entities.insertRecordsById(<entityId>, [
|
|
794
920
|
* { name: "John", age: 30 },
|
|
795
921
|
* { name: "Jane", age: 25 }
|
|
796
922
|
* ]);
|
|
797
923
|
*
|
|
798
924
|
* // With options
|
|
799
|
-
* const result = await
|
|
925
|
+
* const result = await entities.insertRecordsById(<entityId>, [
|
|
800
926
|
* { name: "John", age: 30 },
|
|
801
927
|
* { name: "Jane", age: 25 }
|
|
802
928
|
* ], {
|
|
@@ -805,7 +931,12 @@ interface EntityServiceModel {
|
|
|
805
931
|
* });
|
|
806
932
|
* ```
|
|
807
933
|
*/
|
|
808
|
-
|
|
934
|
+
insertRecordsById(id: string, data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
935
|
+
/**
|
|
936
|
+
* @deprecated Use {@link insertRecordsById} instead.
|
|
937
|
+
* @hidden
|
|
938
|
+
*/
|
|
939
|
+
batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
|
|
809
940
|
/**
|
|
810
941
|
* Updates data in an entity by entity ID
|
|
811
942
|
*
|
|
@@ -817,13 +948,13 @@ interface EntityServiceModel {
|
|
|
817
948
|
* @example
|
|
818
949
|
* ```typescript
|
|
819
950
|
* // Basic usage
|
|
820
|
-
* const result = await
|
|
951
|
+
* const result = await entities.updateRecordsById(<entityId>, [
|
|
821
952
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
822
953
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
823
954
|
* ]);
|
|
824
955
|
*
|
|
825
956
|
* // With options
|
|
826
|
-
* const result = await
|
|
957
|
+
* const result = await entities.updateRecordsById(<entityId>, [
|
|
827
958
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
828
959
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
829
960
|
* ], {
|
|
@@ -832,6 +963,11 @@ interface EntityServiceModel {
|
|
|
832
963
|
* });
|
|
833
964
|
* ```
|
|
834
965
|
*/
|
|
966
|
+
updateRecordsById(id: string, data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
967
|
+
/**
|
|
968
|
+
* @deprecated Use {@link updateRecordsById} instead.
|
|
969
|
+
* @hidden
|
|
970
|
+
*/
|
|
835
971
|
updateById(id: string, data: EntityRecord[], options?: EntityUpdateOptions): Promise<EntityUpdateResponse>;
|
|
836
972
|
/**
|
|
837
973
|
* Deletes data from an entity by entity ID
|
|
@@ -844,11 +980,16 @@ interface EntityServiceModel {
|
|
|
844
980
|
* @example
|
|
845
981
|
* ```typescript
|
|
846
982
|
* // Basic usage
|
|
847
|
-
* const result = await
|
|
983
|
+
* const result = await entities.deleteRecordsById(<entityId>, [
|
|
848
984
|
* <recordId-1>, <recordId-2>
|
|
849
985
|
* ]);
|
|
850
986
|
* ```
|
|
851
987
|
*/
|
|
988
|
+
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
989
|
+
/**
|
|
990
|
+
* @deprecated Use {@link deleteRecordsById} instead.
|
|
991
|
+
* @hidden
|
|
992
|
+
*/
|
|
852
993
|
deleteById(id: string, recordIds: string[], options?: EntityDeleteOptions): Promise<EntityDeleteResponse>;
|
|
853
994
|
/**
|
|
854
995
|
* Downloads an attachment stored in a File-type field of an entity record.
|
|
@@ -857,21 +998,25 @@ interface EntityServiceModel {
|
|
|
857
998
|
* @returns Promise resolving to Blob containing the file content
|
|
858
999
|
* @example
|
|
859
1000
|
* ```typescript
|
|
1001
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1002
|
+
*
|
|
1003
|
+
* const entities = new Entities(sdk);
|
|
1004
|
+
*
|
|
860
1005
|
* // First, get records to obtain the record ID
|
|
861
|
-
* const records = await
|
|
1006
|
+
* const records = await entities.getAllRecords("<entityId>");
|
|
862
1007
|
* // Get the recordId for the record that contains the attachment
|
|
863
1008
|
* const recordId = records.items[0].id;
|
|
864
1009
|
*
|
|
865
|
-
* // Download attachment using
|
|
866
|
-
* const response = await
|
|
1010
|
+
* // Download attachment using service method
|
|
1011
|
+
* const response = await entities.downloadAttachment({
|
|
867
1012
|
* entityName: 'Invoice',
|
|
868
1013
|
* recordId: recordId,
|
|
869
1014
|
* fieldName: 'Documents'
|
|
870
1015
|
* });
|
|
871
1016
|
*
|
|
872
1017
|
* // Or download using entity method
|
|
873
|
-
* const entity = await
|
|
874
|
-
* const
|
|
1018
|
+
* const entity = await entities.getById("<entityId>");
|
|
1019
|
+
* const blob = await entity.downloadAttachment(recordId, 'Documents');
|
|
875
1020
|
*
|
|
876
1021
|
* // Browser: Display Image
|
|
877
1022
|
* const url = URL.createObjectURL(response);
|
|
@@ -899,13 +1044,27 @@ interface EntityServiceModel {
|
|
|
899
1044
|
*/
|
|
900
1045
|
interface EntityMethods {
|
|
901
1046
|
/**
|
|
902
|
-
* Insert
|
|
1047
|
+
* Insert a single record into this entity
|
|
1048
|
+
*
|
|
1049
|
+
* Note: Data Fabric supports trigger events only on individual inserts, not on inserting multiple records.
|
|
1050
|
+
* Use this method if you need trigger events to fire for the inserted record.
|
|
1051
|
+
*
|
|
1052
|
+
* @param data - Record to insert
|
|
1053
|
+
* @param options - Insert options
|
|
1054
|
+
* @returns Promise resolving to the inserted record with generated record ID
|
|
1055
|
+
*/
|
|
1056
|
+
insertRecord(data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Insert multiple records into this entity using insertRecords
|
|
1059
|
+
*
|
|
1060
|
+
* Note: Inserting multiple records do not trigger Data Fabric trigger events. Use {@link insertRecord} if you need
|
|
1061
|
+
* trigger events to fire for each inserted record.
|
|
903
1062
|
*
|
|
904
1063
|
* @param data - Array of records to insert
|
|
905
1064
|
* @param options - Insert options
|
|
906
|
-
* @returns Promise resolving to insert response
|
|
1065
|
+
* @returns Promise resolving to batch insert response
|
|
907
1066
|
*/
|
|
908
|
-
|
|
1067
|
+
insertRecords(data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
909
1068
|
/**
|
|
910
1069
|
* Update data in this entity
|
|
911
1070
|
*
|
|
@@ -914,7 +1073,7 @@ interface EntityMethods {
|
|
|
914
1073
|
* @param options - Update options
|
|
915
1074
|
* @returns Promise resolving to update response
|
|
916
1075
|
*/
|
|
917
|
-
|
|
1076
|
+
updateRecords(data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
918
1077
|
/**
|
|
919
1078
|
* Delete data from this entity
|
|
920
1079
|
*
|
|
@@ -922,14 +1081,22 @@ interface EntityMethods {
|
|
|
922
1081
|
* @param options - Delete options
|
|
923
1082
|
* @returns Promise resolving to delete response
|
|
924
1083
|
*/
|
|
925
|
-
|
|
1084
|
+
deleteRecords(recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
926
1085
|
/**
|
|
927
|
-
* Get records from this entity
|
|
1086
|
+
* Get all records from this entity
|
|
928
1087
|
*
|
|
929
1088
|
* @param options - Query options
|
|
930
1089
|
* @returns Promise resolving to query response
|
|
931
1090
|
*/
|
|
932
|
-
|
|
1091
|
+
getAllRecords<T extends EntityGetAllRecordsOptions = EntityGetAllRecordsOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Gets a single record from this entity by record ID
|
|
1094
|
+
*
|
|
1095
|
+
* @param recordId - UUID of the record
|
|
1096
|
+
* @param options - Query options including expansionLevel
|
|
1097
|
+
* @returns Promise resolving to the entity record
|
|
1098
|
+
*/
|
|
1099
|
+
getRecord(recordId: string, options?: EntityGetRecordByIdOptions): Promise<EntityRecord>;
|
|
933
1100
|
/**
|
|
934
1101
|
* Downloads an attachment stored in a File-type field of an entity record
|
|
935
1102
|
*
|
|
@@ -938,6 +1105,31 @@ interface EntityMethods {
|
|
|
938
1105
|
* @returns Promise resolving to Blob containing the file content
|
|
939
1106
|
*/
|
|
940
1107
|
downloadAttachment(recordId: string, fieldName: string): Promise<Blob>;
|
|
1108
|
+
/**
|
|
1109
|
+
* @deprecated Use {@link insertRecord} instead.
|
|
1110
|
+
* @hidden
|
|
1111
|
+
*/
|
|
1112
|
+
insert(data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
|
|
1113
|
+
/**
|
|
1114
|
+
* @deprecated Use {@link insertRecords} instead.
|
|
1115
|
+
* @hidden
|
|
1116
|
+
*/
|
|
1117
|
+
batchInsert(data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
|
|
1118
|
+
/**
|
|
1119
|
+
* @deprecated Use {@link updateRecords} instead.
|
|
1120
|
+
* @hidden
|
|
1121
|
+
*/
|
|
1122
|
+
update(data: EntityRecord[], options?: EntityUpdateOptions): Promise<EntityUpdateResponse>;
|
|
1123
|
+
/**
|
|
1124
|
+
* @deprecated Use {@link deleteRecords} instead.
|
|
1125
|
+
* @hidden
|
|
1126
|
+
*/
|
|
1127
|
+
delete(recordIds: string[], options?: EntityDeleteOptions): Promise<EntityDeleteResponse>;
|
|
1128
|
+
/**
|
|
1129
|
+
* @deprecated Use {@link getAllRecords} instead.
|
|
1130
|
+
* @hidden
|
|
1131
|
+
*/
|
|
1132
|
+
getRecords<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
941
1133
|
}
|
|
942
1134
|
/**
|
|
943
1135
|
* Entity with methods combining metadata with operation methods
|
|
@@ -956,10 +1148,6 @@ declare function createEntityWithMethods(entityData: RawEntityGetResponse, servi
|
|
|
956
1148
|
* Service for interacting with the Data Fabric Entity API
|
|
957
1149
|
*/
|
|
958
1150
|
declare class EntityService extends BaseService implements EntityServiceModel {
|
|
959
|
-
/**
|
|
960
|
-
* @hideconstructor
|
|
961
|
-
*/
|
|
962
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
963
1151
|
/**
|
|
964
1152
|
* Gets entity metadata by entity ID with attached operation methods
|
|
965
1153
|
*
|
|
@@ -968,14 +1156,21 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
968
1156
|
*
|
|
969
1157
|
* @example
|
|
970
1158
|
* ```typescript
|
|
971
|
-
*
|
|
972
|
-
*
|
|
1159
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1160
|
+
*
|
|
1161
|
+
* const entities = new Entities(sdk);
|
|
1162
|
+
* const entity = await entities.getById("<entityId>");
|
|
973
1163
|
*
|
|
974
1164
|
* // Call operations directly on the entity
|
|
975
|
-
* const records = await entity.
|
|
1165
|
+
* const records = await entity.getAllRecords();
|
|
976
1166
|
*
|
|
977
|
-
*
|
|
978
|
-
*
|
|
1167
|
+
* // Insert a single record
|
|
1168
|
+
* const insertResult = await entity.insertRecord({ name: "John", age: 30 });
|
|
1169
|
+
*
|
|
1170
|
+
* // Or batch insert multiple records
|
|
1171
|
+
* const batchResult = await entity.insertRecords([
|
|
1172
|
+
* { name: "Jane", age: 25 },
|
|
1173
|
+
* { name: "Bob", age: 35 }
|
|
979
1174
|
* ]);
|
|
980
1175
|
* ```
|
|
981
1176
|
*/
|
|
@@ -989,30 +1184,78 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
989
1184
|
*
|
|
990
1185
|
* @example
|
|
991
1186
|
* ```typescript
|
|
1187
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1188
|
+
*
|
|
1189
|
+
* const entities = new Entities(sdk);
|
|
1190
|
+
*
|
|
992
1191
|
* // Basic usage (non-paginated)
|
|
993
|
-
* const records = await
|
|
1192
|
+
* const records = await entities.getAllRecords("<entityId>");
|
|
994
1193
|
*
|
|
995
1194
|
* // With expansion level
|
|
996
|
-
* const records = await
|
|
1195
|
+
* const records = await entities.getAllRecords("<entityId>", {
|
|
997
1196
|
* expansionLevel: 1
|
|
998
1197
|
* });
|
|
999
1198
|
*
|
|
1000
1199
|
* // With pagination
|
|
1001
|
-
* const paginatedResponse = await
|
|
1200
|
+
* const paginatedResponse = await entities.getAllRecords("<entityId>", {
|
|
1002
1201
|
* pageSize: 50,
|
|
1003
1202
|
* expansionLevel: 1
|
|
1004
1203
|
* });
|
|
1005
1204
|
*
|
|
1006
1205
|
* // Navigate to next page
|
|
1007
|
-
* const nextPage = await
|
|
1206
|
+
* const nextPage = await entities.getAllRecords("<entityId>", {
|
|
1008
1207
|
* cursor: paginatedResponse.nextCursor,
|
|
1009
1208
|
* expansionLevel: 1
|
|
1010
1209
|
* });
|
|
1011
1210
|
* ```
|
|
1012
1211
|
*/
|
|
1013
|
-
|
|
1212
|
+
getAllRecords<T extends EntityGetAllRecordsOptions = EntityGetAllRecordsOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
1014
1213
|
/**
|
|
1015
|
-
*
|
|
1214
|
+
* Gets a single entity record by entity ID and record ID
|
|
1215
|
+
*
|
|
1216
|
+
* @param entityId - UUID of the entity
|
|
1217
|
+
* @param recordId - UUID of the record
|
|
1218
|
+
* @param options - Query options including expansionLevel
|
|
1219
|
+
* @returns Promise resolving to the entity record
|
|
1220
|
+
*
|
|
1221
|
+
* @example
|
|
1222
|
+
* ```typescript
|
|
1223
|
+
* // Basic usage
|
|
1224
|
+
* const record = await sdk.entities.getRecordById(<entityId>, <recordId>);
|
|
1225
|
+
*
|
|
1226
|
+
* // With expansion level
|
|
1227
|
+
* const record = await sdk.entities.getRecordById(<entityId>, <recordId>, {
|
|
1228
|
+
* expansionLevel: 1
|
|
1229
|
+
* });
|
|
1230
|
+
* ```
|
|
1231
|
+
*/
|
|
1232
|
+
getRecordById(entityId: string, recordId: string, options?: EntityGetRecordByIdOptions): Promise<EntityRecord>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Inserts a single record into an entity by entity ID
|
|
1235
|
+
*
|
|
1236
|
+
* @param entityId - UUID of the entity
|
|
1237
|
+
* @param data - Record to insert
|
|
1238
|
+
* @param options - Insert options
|
|
1239
|
+
* @returns Promise resolving to the inserted record with generated record ID
|
|
1240
|
+
*
|
|
1241
|
+
* @example
|
|
1242
|
+
* ```typescript
|
|
1243
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1244
|
+
*
|
|
1245
|
+
* const entities = new Entities(sdk);
|
|
1246
|
+
*
|
|
1247
|
+
* // Basic usage
|
|
1248
|
+
* const result = await entities.insertRecordById("<entityId>", { name: "John", age: 30 });
|
|
1249
|
+
*
|
|
1250
|
+
* // With options
|
|
1251
|
+
* const result = await entities.insertRecordById("<entityId>", { name: "John", age: 30 }, {
|
|
1252
|
+
* expansionLevel: 1
|
|
1253
|
+
* });
|
|
1254
|
+
* ```
|
|
1255
|
+
*/
|
|
1256
|
+
insertRecordById(id: string, data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Inserts data into an entity by entity ID using batch insert
|
|
1016
1259
|
*
|
|
1017
1260
|
* @param entityId - UUID of the entity
|
|
1018
1261
|
* @param data - Array of records to insert
|
|
@@ -1021,14 +1264,18 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1021
1264
|
*
|
|
1022
1265
|
* @example
|
|
1023
1266
|
* ```typescript
|
|
1267
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1268
|
+
*
|
|
1269
|
+
* const entities = new Entities(sdk);
|
|
1270
|
+
*
|
|
1024
1271
|
* // Basic usage
|
|
1025
|
-
* const result = await
|
|
1272
|
+
* const result = await entities.insertRecordsById("<entityId>", [
|
|
1026
1273
|
* { name: "John", age: 30 },
|
|
1027
1274
|
* { name: "Jane", age: 25 }
|
|
1028
1275
|
* ]);
|
|
1029
1276
|
*
|
|
1030
1277
|
* // With options
|
|
1031
|
-
* const result = await
|
|
1278
|
+
* const result = await entities.insertRecordsById("<entityId>", [
|
|
1032
1279
|
* { name: "John", age: 30 },
|
|
1033
1280
|
* { name: "Jane", age: 25 }
|
|
1034
1281
|
* ], {
|
|
@@ -1037,7 +1284,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1037
1284
|
* });
|
|
1038
1285
|
* ```
|
|
1039
1286
|
*/
|
|
1040
|
-
|
|
1287
|
+
insertRecordsById(id: string, data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
1041
1288
|
/**
|
|
1042
1289
|
* Updates data in an entity by entity ID
|
|
1043
1290
|
*
|
|
@@ -1049,14 +1296,18 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1049
1296
|
*
|
|
1050
1297
|
* @example
|
|
1051
1298
|
* ```typescript
|
|
1299
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1300
|
+
*
|
|
1301
|
+
* const entities = new Entities(sdk);
|
|
1302
|
+
*
|
|
1052
1303
|
* // Basic usage
|
|
1053
|
-
* const result = await
|
|
1304
|
+
* const result = await entities.updateRecordsById("<entityId>", [
|
|
1054
1305
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
1055
1306
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
1056
1307
|
* ]);
|
|
1057
1308
|
*
|
|
1058
1309
|
* // With options
|
|
1059
|
-
* const result = await
|
|
1310
|
+
* const result = await entities.updateRecordsById("<entityId>", [
|
|
1060
1311
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
1061
1312
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
1062
1313
|
* ], {
|
|
@@ -1065,7 +1316,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1065
1316
|
* });
|
|
1066
1317
|
* ```
|
|
1067
1318
|
*/
|
|
1068
|
-
|
|
1319
|
+
updateRecordsById(id: string, data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
1069
1320
|
/**
|
|
1070
1321
|
* Deletes data from an entity by entity ID
|
|
1071
1322
|
*
|
|
@@ -1076,13 +1327,17 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1076
1327
|
*
|
|
1077
1328
|
* @example
|
|
1078
1329
|
* ```typescript
|
|
1330
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1331
|
+
*
|
|
1332
|
+
* const entities = new Entities(sdk);
|
|
1333
|
+
*
|
|
1079
1334
|
* // Basic usage
|
|
1080
|
-
* const result = await
|
|
1081
|
-
* <recordId-1
|
|
1335
|
+
* const result = await entities.deleteRecordsById("<entityId>", [
|
|
1336
|
+
* "<recordId-1>", "<recordId-2>"
|
|
1082
1337
|
* ]);
|
|
1083
1338
|
* ```
|
|
1084
1339
|
*/
|
|
1085
|
-
|
|
1340
|
+
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
1086
1341
|
/**
|
|
1087
1342
|
* Gets all entities in the system
|
|
1088
1343
|
*
|
|
@@ -1090,11 +1345,15 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1090
1345
|
*
|
|
1091
1346
|
* @example
|
|
1092
1347
|
* ```typescript
|
|
1348
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1349
|
+
*
|
|
1350
|
+
* const entities = new Entities(sdk);
|
|
1351
|
+
*
|
|
1093
1352
|
* // Get all entities
|
|
1094
|
-
* const
|
|
1353
|
+
* const allEntities = await entities.getAll();
|
|
1095
1354
|
*
|
|
1096
1355
|
* // Call operations on an entity
|
|
1097
|
-
* const records = await
|
|
1356
|
+
* const records = await allEntities[0].getAllRecords();
|
|
1098
1357
|
* ```
|
|
1099
1358
|
*/
|
|
1100
1359
|
getAll(): Promise<EntityGetResponse[]>;
|
|
@@ -1106,14 +1365,43 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1106
1365
|
*
|
|
1107
1366
|
* @example
|
|
1108
1367
|
* ```typescript
|
|
1368
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1369
|
+
*
|
|
1370
|
+
* const entities = new Entities(sdk);
|
|
1371
|
+
*
|
|
1109
1372
|
* // Download attachment for a specific record and field
|
|
1110
|
-
* const blob = await
|
|
1373
|
+
* const blob = await entities.downloadAttachment({
|
|
1111
1374
|
* entityName: 'Invoice',
|
|
1112
1375
|
* recordId: '<record-uuid>',
|
|
1113
1376
|
* fieldName: 'Documents'
|
|
1114
1377
|
* });
|
|
1115
1378
|
*/
|
|
1116
1379
|
downloadAttachment(options: EntityDownloadAttachmentOptions): Promise<Blob>;
|
|
1380
|
+
/**
|
|
1381
|
+
* @hidden
|
|
1382
|
+
* @deprecated Use {@link getAllRecords} instead.
|
|
1383
|
+
*/
|
|
1384
|
+
getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
1385
|
+
/**
|
|
1386
|
+
* @hidden
|
|
1387
|
+
* @deprecated Use {@link insertRecordById} instead.
|
|
1388
|
+
*/
|
|
1389
|
+
insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
|
|
1390
|
+
/**
|
|
1391
|
+
* @hidden
|
|
1392
|
+
* @deprecated Use {@link insertRecordsById} instead.
|
|
1393
|
+
*/
|
|
1394
|
+
batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
|
|
1395
|
+
/**
|
|
1396
|
+
* @hidden
|
|
1397
|
+
* @deprecated Use {@link updateRecordsById} instead.
|
|
1398
|
+
*/
|
|
1399
|
+
updateById(id: string, data: EntityRecord[], options?: EntityUpdateOptions): Promise<EntityUpdateResponse>;
|
|
1400
|
+
/**
|
|
1401
|
+
* @hidden
|
|
1402
|
+
* @deprecated Use {@link deleteRecordsById} instead.
|
|
1403
|
+
*/
|
|
1404
|
+
deleteById(id: string, recordIds: string[], options?: EntityDeleteOptions): Promise<EntityDeleteResponse>;
|
|
1117
1405
|
/**
|
|
1118
1406
|
* Orchestrates all field mapping transformations
|
|
1119
1407
|
*
|
|
@@ -1195,6 +1483,17 @@ type ChoiceSetGetByIdOptions = PaginationOptions;
|
|
|
1195
1483
|
* Service for managing UiPath Data Fabric Choice Sets
|
|
1196
1484
|
*
|
|
1197
1485
|
* Choice Sets are enumerated lists of values that can be used as field types in entities. They enable single-select or multi-select fields, such as expense types, categories, or status values. [UiPath Choice Sets Guide](https://docs.uipath.com/data-service/automation-cloud/latest/user-guide/choice-sets)
|
|
1486
|
+
*
|
|
1487
|
+
* ### Usage
|
|
1488
|
+
*
|
|
1489
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
1490
|
+
*
|
|
1491
|
+
* ```typescript
|
|
1492
|
+
* import { ChoiceSets } from '@uipath/uipath-typescript/entities';
|
|
1493
|
+
*
|
|
1494
|
+
* const choicesets = new ChoiceSets(sdk);
|
|
1495
|
+
* const allChoiceSets = await choicesets.getAll();
|
|
1496
|
+
* ```
|
|
1198
1497
|
*/
|
|
1199
1498
|
interface ChoiceSetServiceModel {
|
|
1200
1499
|
/**
|
|
@@ -1205,17 +1504,17 @@ interface ChoiceSetServiceModel {
|
|
|
1205
1504
|
* @example
|
|
1206
1505
|
* ```typescript
|
|
1207
1506
|
* // Get all choice sets
|
|
1208
|
-
* const
|
|
1507
|
+
* const allChoiceSets = await choicesets.getAll();
|
|
1209
1508
|
*
|
|
1210
1509
|
* // Iterate through choice sets
|
|
1211
|
-
*
|
|
1510
|
+
* allChoiceSets.forEach(choiceSet => {
|
|
1212
1511
|
* console.log(`ChoiceSet: ${choiceSet.displayName} (${choiceSet.name})`);
|
|
1213
1512
|
* console.log(`Description: ${choiceSet.description}`);
|
|
1214
1513
|
* console.log(`Created by: ${choiceSet.createdBy}`);
|
|
1215
1514
|
* });
|
|
1216
1515
|
*
|
|
1217
1516
|
* // Find a specific choice set by name
|
|
1218
|
-
* const expenseTypes =
|
|
1517
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1219
1518
|
*
|
|
1220
1519
|
* // Check choice set details
|
|
1221
1520
|
* if (expenseTypes) {
|
|
@@ -1239,12 +1538,12 @@ interface ChoiceSetServiceModel {
|
|
|
1239
1538
|
* @example
|
|
1240
1539
|
* ```typescript
|
|
1241
1540
|
* // First, get the choice set ID using getAll()
|
|
1242
|
-
* const
|
|
1243
|
-
* const expenseTypes =
|
|
1541
|
+
* const allChoiceSets = await choicesets.getAll();
|
|
1542
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1244
1543
|
* const choiceSetId = expenseTypes.id;
|
|
1245
1544
|
*
|
|
1246
1545
|
* // Get all values (non-paginated)
|
|
1247
|
-
* const values = await
|
|
1546
|
+
* const values = await choicesets.getById(choiceSetId);
|
|
1248
1547
|
*
|
|
1249
1548
|
* // Iterate through choice set values
|
|
1250
1549
|
* for (const value of values.items) {
|
|
@@ -1252,11 +1551,11 @@ interface ChoiceSetServiceModel {
|
|
|
1252
1551
|
* }
|
|
1253
1552
|
*
|
|
1254
1553
|
* // First page with pagination
|
|
1255
|
-
* const page1 = await
|
|
1554
|
+
* const page1 = await choicesets.getById(choiceSetId, { pageSize: 10 });
|
|
1256
1555
|
*
|
|
1257
1556
|
* // Navigate using cursor
|
|
1258
1557
|
* if (page1.hasNextPage) {
|
|
1259
|
-
* const page2 = await
|
|
1558
|
+
* const page2 = await choicesets.getById(choiceSetId, { cursor: page1.nextCursor });
|
|
1260
1559
|
* }
|
|
1261
1560
|
* ```
|
|
1262
1561
|
*/
|
|
@@ -1264,10 +1563,6 @@ interface ChoiceSetServiceModel {
|
|
|
1264
1563
|
}
|
|
1265
1564
|
|
|
1266
1565
|
declare class ChoiceSetService extends BaseService implements ChoiceSetServiceModel {
|
|
1267
|
-
/**
|
|
1268
|
-
* @hideconstructor
|
|
1269
|
-
*/
|
|
1270
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
1271
1566
|
/**
|
|
1272
1567
|
* Gets all choice sets in the system
|
|
1273
1568
|
*
|
|
@@ -1275,11 +1570,15 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1275
1570
|
*
|
|
1276
1571
|
* @example
|
|
1277
1572
|
* ```typescript
|
|
1573
|
+
* import { ChoiceSets } from '@uipath/uipath-typescript/entities';
|
|
1574
|
+
*
|
|
1575
|
+
* const choiceSets = new ChoiceSets(sdk);
|
|
1576
|
+
*
|
|
1278
1577
|
* // Get all choice sets
|
|
1279
|
-
* const
|
|
1578
|
+
* const allChoiceSets = await choiceSets.getAll();
|
|
1280
1579
|
*
|
|
1281
1580
|
* // Iterate through choice sets
|
|
1282
|
-
*
|
|
1581
|
+
* allChoiceSets.forEach(choiceSet => {
|
|
1283
1582
|
* console.log(`ChoiceSet: ${choiceSet.displayName} (${choiceSet.name})`);
|
|
1284
1583
|
* console.log(`Description: ${choiceSet.description}`);
|
|
1285
1584
|
* });
|
|
@@ -1299,13 +1598,17 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1299
1598
|
*
|
|
1300
1599
|
* @example
|
|
1301
1600
|
* ```typescript
|
|
1601
|
+
* import { ChoiceSets } from '@uipath/uipath-typescript/choicesets';
|
|
1602
|
+
*
|
|
1603
|
+
* const choiceSets = new ChoiceSets(sdk);
|
|
1604
|
+
*
|
|
1302
1605
|
* // First, get the choice set ID using getAll()
|
|
1303
|
-
* const
|
|
1304
|
-
* const expenseTypes =
|
|
1606
|
+
* const allChoiceSets = await choiceSets.getAll();
|
|
1607
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1305
1608
|
* const choiceSetId = expenseTypes.id;
|
|
1306
1609
|
*
|
|
1307
1610
|
* // Get all values (non-paginated)
|
|
1308
|
-
* const values = await
|
|
1611
|
+
* const values = await choiceSets.getById(choiceSetId);
|
|
1309
1612
|
*
|
|
1310
1613
|
* // Iterate through choice set values
|
|
1311
1614
|
* for (const value of values.items) {
|
|
@@ -1313,11 +1616,11 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1313
1616
|
* }
|
|
1314
1617
|
*
|
|
1315
1618
|
* // First page with pagination
|
|
1316
|
-
* const page1 = await
|
|
1619
|
+
* const page1 = await choiceSets.getById(choiceSetId, { pageSize: 10 });
|
|
1317
1620
|
*
|
|
1318
1621
|
* // Navigate using cursor
|
|
1319
1622
|
* if (page1.hasNextPage) {
|
|
1320
|
-
* const page2 = await
|
|
1623
|
+
* const page2 = await choiceSets.getById(choiceSetId, { cursor: page1.nextCursor });
|
|
1321
1624
|
* }
|
|
1322
1625
|
* ```
|
|
1323
1626
|
*/
|
|
@@ -1439,6 +1742,17 @@ interface ProcessIncidentGetAllResponse {
|
|
|
1439
1742
|
* Service for managing UiPath Maestro Processes
|
|
1440
1743
|
*
|
|
1441
1744
|
* UiPath Maestro is a cloud-native orchestration layer that coordinates bots, AI agents, and humans for seamless, intelligent automation of complex workflows. [UiPath Maestro Guide](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/introduction-to-maestro)
|
|
1745
|
+
*
|
|
1746
|
+
* ### Usage
|
|
1747
|
+
*
|
|
1748
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
1749
|
+
*
|
|
1750
|
+
* ```typescript
|
|
1751
|
+
* import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
|
|
1752
|
+
*
|
|
1753
|
+
* const maestroProcesses = new MaestroProcesses(sdk);
|
|
1754
|
+
* const allProcesses = await maestroProcesses.getAll();
|
|
1755
|
+
* ```
|
|
1442
1756
|
*/
|
|
1443
1757
|
interface MaestroProcessesServiceModel {
|
|
1444
1758
|
/**
|
|
@@ -1447,10 +1761,10 @@ interface MaestroProcessesServiceModel {
|
|
|
1447
1761
|
* @example
|
|
1448
1762
|
* ```typescript
|
|
1449
1763
|
* // Get all processes
|
|
1450
|
-
* const
|
|
1764
|
+
* const allProcesses = await maestroProcesses.getAll();
|
|
1451
1765
|
*
|
|
1452
1766
|
* // Access process information and incidents
|
|
1453
|
-
* for (const process of
|
|
1767
|
+
* for (const process of allProcesses) {
|
|
1454
1768
|
* console.log(`Process: ${process.processKey}`);
|
|
1455
1769
|
* console.log(`Running instances: ${process.runningCount}`);
|
|
1456
1770
|
* console.log(`Faulted instances: ${process.faultedCount}`);
|
|
@@ -1459,7 +1773,6 @@ interface MaestroProcessesServiceModel {
|
|
|
1459
1773
|
* const incidents = await process.getIncidents();
|
|
1460
1774
|
* console.log(`Incidents: ${incidents.length}`);
|
|
1461
1775
|
* }
|
|
1462
|
-
*
|
|
1463
1776
|
* ```
|
|
1464
1777
|
*/
|
|
1465
1778
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
@@ -1473,7 +1786,7 @@ interface MaestroProcessesServiceModel {
|
|
|
1473
1786
|
* @example
|
|
1474
1787
|
* ```typescript
|
|
1475
1788
|
* // Get incidents for a specific process
|
|
1476
|
-
* const incidents = await
|
|
1789
|
+
* const incidents = await maestroProcesses.getIncidents('<processKey>', '<folderKey>');
|
|
1477
1790
|
*
|
|
1478
1791
|
* // Access incident details
|
|
1479
1792
|
* for (const incident of incidents) {
|
|
@@ -1688,6 +2001,17 @@ interface RequestOptions extends BaseOptions {
|
|
|
1688
2001
|
* Service for managing UiPath Maestro Process instances
|
|
1689
2002
|
*
|
|
1690
2003
|
* Maestro process instances are the running instances of Maestro processes. [UiPath Maestro Process Instances Guide](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/all-instances-view)
|
|
2004
|
+
*
|
|
2005
|
+
* ### Usage
|
|
2006
|
+
*
|
|
2007
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
2008
|
+
*
|
|
2009
|
+
* ```typescript
|
|
2010
|
+
* import { ProcessInstances } from '@uipath/uipath-typescript/maestro-processes';
|
|
2011
|
+
*
|
|
2012
|
+
* const processInstances = new ProcessInstances(sdk);
|
|
2013
|
+
* const allInstances = await processInstances.getAll();
|
|
2014
|
+
* ```
|
|
1691
2015
|
*/
|
|
1692
2016
|
interface ProcessInstancesServiceModel {
|
|
1693
2017
|
/**
|
|
@@ -1703,7 +2027,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1703
2027
|
* @example
|
|
1704
2028
|
* ```typescript
|
|
1705
2029
|
* // Get all instances (non-paginated)
|
|
1706
|
-
* const instances = await
|
|
2030
|
+
* const instances = await processInstances.getAll();
|
|
1707
2031
|
*
|
|
1708
2032
|
* // Cancel faulted instances using methods directly on instances
|
|
1709
2033
|
* for (const instance of instances.items) {
|
|
@@ -1713,16 +2037,16 @@ interface ProcessInstancesServiceModel {
|
|
|
1713
2037
|
* }
|
|
1714
2038
|
*
|
|
1715
2039
|
* // With filtering
|
|
1716
|
-
* const
|
|
2040
|
+
* const filteredInstances = await processInstances.getAll({
|
|
1717
2041
|
* processKey: 'MyProcess'
|
|
1718
2042
|
* });
|
|
1719
2043
|
*
|
|
1720
2044
|
* // First page with pagination
|
|
1721
|
-
* const page1 = await
|
|
2045
|
+
* const page1 = await processInstances.getAll({ pageSize: 10 });
|
|
1722
2046
|
*
|
|
1723
2047
|
* // Navigate using cursor
|
|
1724
2048
|
* if (page1.hasNextPage) {
|
|
1725
|
-
* const page2 = await
|
|
2049
|
+
* const page2 = await processInstances.getAll({ cursor: page1.nextCursor });
|
|
1726
2050
|
* }
|
|
1727
2051
|
* ```
|
|
1728
2052
|
*/
|
|
@@ -1736,14 +2060,13 @@ interface ProcessInstancesServiceModel {
|
|
|
1736
2060
|
* @example
|
|
1737
2061
|
* ```typescript
|
|
1738
2062
|
* // Get a specific process instance
|
|
1739
|
-
* const instance = await
|
|
2063
|
+
* const instance = await processInstances.getById(
|
|
1740
2064
|
* <instanceId>,
|
|
1741
2065
|
* <folderKey>
|
|
1742
2066
|
* );
|
|
1743
2067
|
*
|
|
1744
2068
|
* // Access instance properties
|
|
1745
2069
|
* console.log(`Status: ${instance.latestRunStatus}`);
|
|
1746
|
-
*
|
|
1747
2070
|
* ```
|
|
1748
2071
|
*/
|
|
1749
2072
|
getById(id: string, folderKey: string): Promise<ProcessInstanceGetResponse>;
|
|
@@ -1755,7 +2078,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1755
2078
|
* @example
|
|
1756
2079
|
* ```typescript
|
|
1757
2080
|
* // Get execution history for a process instance
|
|
1758
|
-
* const history = await
|
|
2081
|
+
* const history = await processInstances.getExecutionHistory(
|
|
1759
2082
|
* <instanceId>
|
|
1760
2083
|
* );
|
|
1761
2084
|
*
|
|
@@ -1765,7 +2088,6 @@ interface ProcessInstancesServiceModel {
|
|
|
1765
2088
|
* console.log(`Start: ${span.startTime}`);
|
|
1766
2089
|
* console.log(`Duration: ${span.duration}ms`);
|
|
1767
2090
|
* });
|
|
1768
|
-
*
|
|
1769
2091
|
* ```
|
|
1770
2092
|
*/
|
|
1771
2093
|
getExecutionHistory(instanceId: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
|
|
@@ -1778,7 +2100,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1778
2100
|
* @example
|
|
1779
2101
|
* ```typescript
|
|
1780
2102
|
* // Get BPMN XML for a process instance
|
|
1781
|
-
* const bpmnXml = await
|
|
2103
|
+
* const bpmnXml = await processInstances.getBpmn(
|
|
1782
2104
|
* <instanceId>,
|
|
1783
2105
|
* <folderKey>
|
|
1784
2106
|
* );
|
|
@@ -1806,14 +2128,13 @@ interface ProcessInstancesServiceModel {
|
|
|
1806
2128
|
* @example
|
|
1807
2129
|
* ```typescript
|
|
1808
2130
|
* // Cancel a process instance
|
|
1809
|
-
* const result = await
|
|
2131
|
+
* const result = await processInstances.cancel(
|
|
1810
2132
|
* <instanceId>,
|
|
1811
2133
|
* <folderKey>
|
|
1812
2134
|
* );
|
|
1813
2135
|
*
|
|
1814
|
-
*
|
|
1815
|
-
*
|
|
1816
|
-
* const instance = await sdk.maestro.processes.instances.getById(
|
|
2136
|
+
* // Or using instance method
|
|
2137
|
+
* const instance = await processInstances.getById(
|
|
1817
2138
|
* <instanceId>,
|
|
1818
2139
|
* <folderKey>
|
|
1819
2140
|
* );
|
|
@@ -1822,12 +2143,12 @@ interface ProcessInstancesServiceModel {
|
|
|
1822
2143
|
* console.log(`Cancelled: ${result.success}`);
|
|
1823
2144
|
*
|
|
1824
2145
|
* // Cancel with a comment
|
|
1825
|
-
* const
|
|
2146
|
+
* const resultWithComment = await instance.cancel({
|
|
1826
2147
|
* comment: 'Cancelling due to invalid input data'
|
|
1827
2148
|
* });
|
|
1828
2149
|
*
|
|
1829
|
-
* if (
|
|
1830
|
-
* console.log(`Instance ${
|
|
2150
|
+
* if (resultWithComment.success) {
|
|
2151
|
+
* console.log(`Instance ${resultWithComment.data.instanceId} status: ${resultWithComment.data.status}`);
|
|
1831
2152
|
* }
|
|
1832
2153
|
* ```
|
|
1833
2154
|
*/
|
|
@@ -1859,7 +2180,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1859
2180
|
* @example
|
|
1860
2181
|
* ```typescript
|
|
1861
2182
|
* // Get all variables for a process instance
|
|
1862
|
-
* const variables = await
|
|
2183
|
+
* const variables = await processInstances.getVariables(
|
|
1863
2184
|
* <instanceId>,
|
|
1864
2185
|
* <folderKey>
|
|
1865
2186
|
* );
|
|
@@ -1876,7 +2197,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1876
2197
|
* });
|
|
1877
2198
|
*
|
|
1878
2199
|
* // Get variables for a specific parent element
|
|
1879
|
-
* const
|
|
2200
|
+
* const elementVariables = await processInstances.getVariables(
|
|
1880
2201
|
* <instanceId>,
|
|
1881
2202
|
* <folderKey>,
|
|
1882
2203
|
* { parentElementId: <parentElementId> }
|
|
@@ -1894,7 +2215,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1894
2215
|
* @example
|
|
1895
2216
|
* ```typescript
|
|
1896
2217
|
* // Get incidents for a specific instance
|
|
1897
|
-
* const incidents = await
|
|
2218
|
+
* const incidents = await processInstances.getIncidents('<instanceId>', '<folderKey>');
|
|
1898
2219
|
*
|
|
1899
2220
|
* // Access process incident details
|
|
1900
2221
|
* for (const incident of incidents) {
|
|
@@ -1977,8 +2298,12 @@ interface ProcessIncidentsServiceModel {
|
|
|
1977
2298
|
* {@link ProcessIncidentGetAllResponse}
|
|
1978
2299
|
* @example
|
|
1979
2300
|
* ```typescript
|
|
2301
|
+
* import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
|
|
2302
|
+
*
|
|
2303
|
+
* const processIncidents = new ProcessIncidents(sdk);
|
|
2304
|
+
*
|
|
1980
2305
|
* // Get all process incidents across all folders
|
|
1981
|
-
* const incidents = await
|
|
2306
|
+
* const incidents = await processIncidents.getAll();
|
|
1982
2307
|
*
|
|
1983
2308
|
* // Access process incident information
|
|
1984
2309
|
* for (const incident of incidents) {
|
|
@@ -2045,6 +2370,17 @@ interface CaseGetAllResponse {
|
|
|
2045
2370
|
* Service for managing UiPath Maestro Cases
|
|
2046
2371
|
*
|
|
2047
2372
|
* UiPath Maestro Case Management describes solutions that help manage and automate the full flow of complex E2E scenarios.
|
|
2373
|
+
*
|
|
2374
|
+
* ### Usage
|
|
2375
|
+
*
|
|
2376
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
2377
|
+
*
|
|
2378
|
+
* ```typescript
|
|
2379
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
2380
|
+
*
|
|
2381
|
+
* const cases = new Cases(sdk);
|
|
2382
|
+
* const allCases = await cases.getAll();
|
|
2383
|
+
* ```
|
|
2048
2384
|
*/
|
|
2049
2385
|
interface CasesServiceModel {
|
|
2050
2386
|
/**
|
|
@@ -2053,15 +2389,14 @@ interface CasesServiceModel {
|
|
|
2053
2389
|
* @example
|
|
2054
2390
|
* ```typescript
|
|
2055
2391
|
* // Get all case management processes
|
|
2056
|
-
* const
|
|
2392
|
+
* const allCases = await cases.getAll();
|
|
2057
2393
|
*
|
|
2058
2394
|
* // Access case information
|
|
2059
|
-
* for (const caseProcess of
|
|
2395
|
+
* for (const caseProcess of allCases) {
|
|
2060
2396
|
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
2061
2397
|
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
2062
2398
|
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
2063
2399
|
* }
|
|
2064
|
-
*
|
|
2065
2400
|
* ```
|
|
2066
2401
|
*/
|
|
2067
2402
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
@@ -2131,6 +2466,15 @@ interface CaseInstanceOperationResponse {
|
|
|
2131
2466
|
instanceId: string;
|
|
2132
2467
|
status: string;
|
|
2133
2468
|
}
|
|
2469
|
+
/**
|
|
2470
|
+
* Options for reopening a case instance.
|
|
2471
|
+
*/
|
|
2472
|
+
interface CaseInstanceReopenOptions extends CaseInstanceOperationOptions {
|
|
2473
|
+
/**
|
|
2474
|
+
* The stage ID from which the case instance should be reopened.
|
|
2475
|
+
*/
|
|
2476
|
+
stageId: string;
|
|
2477
|
+
}
|
|
2134
2478
|
/**
|
|
2135
2479
|
* Case App Configuration Overview
|
|
2136
2480
|
*/
|
|
@@ -2526,7 +2870,17 @@ type TaskGetUsersOptions = RequestOptions & PaginationOptions;
|
|
|
2526
2870
|
*
|
|
2527
2871
|
* 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)
|
|
2528
2872
|
*
|
|
2529
|
-
|
|
2873
|
+
* ### Usage
|
|
2874
|
+
*
|
|
2875
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
2876
|
+
*
|
|
2877
|
+
* ```typescript
|
|
2878
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
2879
|
+
*
|
|
2880
|
+
* const tasks = new Tasks(sdk);
|
|
2881
|
+
* const allTasks = await tasks.getAll();
|
|
2882
|
+
* ```
|
|
2883
|
+
*/
|
|
2530
2884
|
interface TaskServiceModel {
|
|
2531
2885
|
/**
|
|
2532
2886
|
* Gets all tasks across folders with optional filtering
|
|
@@ -2537,35 +2891,35 @@ interface TaskServiceModel {
|
|
|
2537
2891
|
* @example
|
|
2538
2892
|
* ```typescript
|
|
2539
2893
|
* // Standard array return
|
|
2540
|
-
* const
|
|
2894
|
+
* const allTasks = await tasks.getAll();
|
|
2541
2895
|
*
|
|
2542
2896
|
* // Get tasks within a specific folder
|
|
2543
|
-
* const
|
|
2897
|
+
* const folderTasks = await tasks.getAll({
|
|
2544
2898
|
* folderId: 123
|
|
2545
2899
|
* });
|
|
2546
2900
|
*
|
|
2547
2901
|
* // Get tasks with admin permissions
|
|
2548
2902
|
* // This fetches tasks across folders where the user has Task.View, Task.Edit and TaskAssignment.Create permissions
|
|
2549
|
-
* const
|
|
2903
|
+
* const adminTasks = await tasks.getAll({
|
|
2550
2904
|
* asTaskAdmin: true
|
|
2551
2905
|
* });
|
|
2552
2906
|
*
|
|
2553
2907
|
* // Get tasks without admin permissions (default)
|
|
2554
2908
|
* // This fetches tasks across folders where the user has Task.View and Task.Edit permissions
|
|
2555
|
-
* const
|
|
2909
|
+
* const userTasks = await tasks.getAll({
|
|
2556
2910
|
* asTaskAdmin: false
|
|
2557
2911
|
* });
|
|
2558
2912
|
*
|
|
2559
2913
|
* // First page with pagination
|
|
2560
|
-
* const page1 = await
|
|
2914
|
+
* const page1 = await tasks.getAll({ pageSize: 10 });
|
|
2561
2915
|
*
|
|
2562
2916
|
* // Navigate using cursor
|
|
2563
2917
|
* if (page1.hasNextPage) {
|
|
2564
|
-
* const page2 = await
|
|
2918
|
+
* const page2 = await tasks.getAll({ cursor: page1.nextCursor });
|
|
2565
2919
|
* }
|
|
2566
2920
|
*
|
|
2567
2921
|
* // Jump to specific page
|
|
2568
|
-
* const page5 = await
|
|
2922
|
+
* const page5 = await tasks.getAll({
|
|
2569
2923
|
* jumpToPage: 5,
|
|
2570
2924
|
* pageSize: 10
|
|
2571
2925
|
* });
|
|
@@ -2583,10 +2937,10 @@ interface TaskServiceModel {
|
|
|
2583
2937
|
* @example
|
|
2584
2938
|
* ```typescript
|
|
2585
2939
|
* // Get a task by ID
|
|
2586
|
-
* const task = await
|
|
2940
|
+
* const task = await tasks.getById(<taskId>);
|
|
2587
2941
|
*
|
|
2588
2942
|
* // Get a form task by ID
|
|
2589
|
-
* const formTask = await
|
|
2943
|
+
* const formTask = await tasks.getById(<taskId>, <folderId>);
|
|
2590
2944
|
*
|
|
2591
2945
|
* // Access form task properties
|
|
2592
2946
|
* console.log(formTask.formLayout);
|
|
@@ -2603,7 +2957,7 @@ interface TaskServiceModel {
|
|
|
2603
2957
|
* @example
|
|
2604
2958
|
* ```typescript
|
|
2605
2959
|
* import { TaskPriority } from '@uipath/uipath-typescript';
|
|
2606
|
-
* const task = await
|
|
2960
|
+
* const task = await tasks.create({
|
|
2607
2961
|
* title: "My Task",
|
|
2608
2962
|
* priority: TaskPriority.Medium
|
|
2609
2963
|
* }, <folderId>); // folderId is required
|
|
@@ -2619,26 +2973,25 @@ interface TaskServiceModel {
|
|
|
2619
2973
|
* @example
|
|
2620
2974
|
* ```typescript
|
|
2621
2975
|
* // Assign a single task to a user by ID
|
|
2622
|
-
* const result = await
|
|
2976
|
+
* const result = await tasks.assign({
|
|
2623
2977
|
* taskId: <taskId>,
|
|
2624
2978
|
* userId: <userId>
|
|
2625
2979
|
* });
|
|
2626
2980
|
*
|
|
2627
|
-
*
|
|
2628
|
-
*
|
|
2629
|
-
* const task = await sdk.tasks.getById(<taskId>);
|
|
2981
|
+
* // Or using instance method
|
|
2982
|
+
* const task = await tasks.getById(<taskId>);
|
|
2630
2983
|
* const result = await task.assign({
|
|
2631
2984
|
* userId: <userId>
|
|
2632
2985
|
* });
|
|
2633
2986
|
*
|
|
2634
2987
|
* // Assign a single task to a user by email
|
|
2635
|
-
* const result = await
|
|
2988
|
+
* const result = await tasks.assign({
|
|
2636
2989
|
* taskId: <taskId>,
|
|
2637
2990
|
* userNameOrEmail: "user@example.com"
|
|
2638
2991
|
* });
|
|
2639
2992
|
*
|
|
2640
2993
|
* // Assign multiple tasks
|
|
2641
|
-
* const result = await
|
|
2994
|
+
* const result = await tasks.assign([
|
|
2642
2995
|
* { taskId: <taskId1>, userId: <userId> },
|
|
2643
2996
|
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2644
2997
|
* ]);
|
|
@@ -2654,26 +3007,25 @@ interface TaskServiceModel {
|
|
|
2654
3007
|
* @example
|
|
2655
3008
|
* ```typescript
|
|
2656
3009
|
* // Reassign a single task to a user by ID
|
|
2657
|
-
* const result = await
|
|
3010
|
+
* const result = await tasks.reassign({
|
|
2658
3011
|
* taskId: <taskId>,
|
|
2659
3012
|
* userId: <userId>
|
|
2660
3013
|
* });
|
|
2661
3014
|
*
|
|
2662
|
-
*
|
|
2663
|
-
*
|
|
2664
|
-
* const task = await sdk.tasks.getById(<taskId>);
|
|
3015
|
+
* // Or using instance method
|
|
3016
|
+
* const task = await tasks.getById(<taskId>);
|
|
2665
3017
|
* const result = await task.reassign({
|
|
2666
3018
|
* userId: <userId>
|
|
2667
3019
|
* });
|
|
2668
3020
|
*
|
|
2669
3021
|
* // Reassign a single task to a user by email
|
|
2670
|
-
* const result = await
|
|
3022
|
+
* const result = await tasks.reassign({
|
|
2671
3023
|
* taskId: <taskId>,
|
|
2672
3024
|
* userNameOrEmail: "user@example.com"
|
|
2673
3025
|
* });
|
|
2674
3026
|
*
|
|
2675
3027
|
* // Reassign multiple tasks
|
|
2676
|
-
* const result = await
|
|
3028
|
+
* const result = await tasks.reassign([
|
|
2677
3029
|
* { taskId: <taskId1>, userId: <userId> },
|
|
2678
3030
|
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2679
3031
|
* ]);
|
|
@@ -2689,15 +3041,14 @@ interface TaskServiceModel {
|
|
|
2689
3041
|
* @example
|
|
2690
3042
|
* ```typescript
|
|
2691
3043
|
* // Unassign a single task
|
|
2692
|
-
* const result = await
|
|
2693
|
-
*
|
|
2694
|
-
* or
|
|
3044
|
+
* const result = await tasks.unassign(<taskId>);
|
|
2695
3045
|
*
|
|
2696
|
-
*
|
|
3046
|
+
* // Or using instance method
|
|
3047
|
+
* const task = await tasks.getById(<taskId>);
|
|
2697
3048
|
* const result = await task.unassign();
|
|
2698
3049
|
*
|
|
2699
3050
|
* // Unassign multiple tasks
|
|
2700
|
-
* const result = await
|
|
3051
|
+
* const result = await tasks.unassign([<taskId1>, <taskId2>, <taskId3>]);
|
|
2701
3052
|
* ```
|
|
2702
3053
|
*/
|
|
2703
3054
|
unassign(taskId: number | number[]): Promise<OperationResponse<{
|
|
@@ -2713,7 +3064,7 @@ interface TaskServiceModel {
|
|
|
2713
3064
|
* @example
|
|
2714
3065
|
* ```typescript
|
|
2715
3066
|
* // Complete an app task
|
|
2716
|
-
* await
|
|
3067
|
+
* await tasks.complete({
|
|
2717
3068
|
* type: TaskType.App,
|
|
2718
3069
|
* taskId: <taskId>,
|
|
2719
3070
|
* data: {},
|
|
@@ -2721,7 +3072,7 @@ interface TaskServiceModel {
|
|
|
2721
3072
|
* }, <folderId>); // folderId is required
|
|
2722
3073
|
*
|
|
2723
3074
|
* // Complete an external task
|
|
2724
|
-
* await
|
|
3075
|
+
* await tasks.complete({
|
|
2725
3076
|
* type: TaskType.External,
|
|
2726
3077
|
* taskId: <taskId>
|
|
2727
3078
|
* }, <folderId>); // folderId is required
|
|
@@ -2740,7 +3091,7 @@ interface TaskServiceModel {
|
|
|
2740
3091
|
* @example
|
|
2741
3092
|
* ```typescript
|
|
2742
3093
|
* // Get users from a folder
|
|
2743
|
-
* const users = await
|
|
3094
|
+
* const users = await tasks.getUsers(<folderId>);
|
|
2744
3095
|
*
|
|
2745
3096
|
* // Access user properties
|
|
2746
3097
|
* console.log(users.items[0].name);
|
|
@@ -2795,6 +3146,17 @@ declare function createTaskWithMethods(taskData: RawTaskGetResponse | RawTaskCre
|
|
|
2795
3146
|
* Service model for managing Maestro Case Instances
|
|
2796
3147
|
*
|
|
2797
3148
|
* Maestro case instances are the running instances of Maestro cases.
|
|
3149
|
+
*
|
|
3150
|
+
* ### Usage
|
|
3151
|
+
*
|
|
3152
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
3153
|
+
*
|
|
3154
|
+
* ```typescript
|
|
3155
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3156
|
+
*
|
|
3157
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3158
|
+
* const allInstances = await caseInstances.getAll();
|
|
3159
|
+
* ```
|
|
2798
3160
|
*/
|
|
2799
3161
|
interface CaseInstancesServiceModel {
|
|
2800
3162
|
/**
|
|
@@ -2806,7 +3168,7 @@ interface CaseInstancesServiceModel {
|
|
|
2806
3168
|
* @example
|
|
2807
3169
|
* ```typescript
|
|
2808
3170
|
* // Get all case instances (non-paginated)
|
|
2809
|
-
* const instances = await
|
|
3171
|
+
* const instances = await caseInstances.getAll();
|
|
2810
3172
|
*
|
|
2811
3173
|
* // Cancel/Close faulted instances using methods directly on instances
|
|
2812
3174
|
* for (const instance of instances.items) {
|
|
@@ -2816,16 +3178,16 @@ interface CaseInstancesServiceModel {
|
|
|
2816
3178
|
* }
|
|
2817
3179
|
*
|
|
2818
3180
|
* // With filtering
|
|
2819
|
-
* const
|
|
3181
|
+
* const filteredInstances = await caseInstances.getAll({
|
|
2820
3182
|
* processKey: 'MyCaseProcess'
|
|
2821
3183
|
* });
|
|
2822
3184
|
*
|
|
2823
3185
|
* // First page with pagination
|
|
2824
|
-
* const page1 = await
|
|
3186
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
2825
3187
|
*
|
|
2826
3188
|
* // Navigate using cursor
|
|
2827
3189
|
* if (page1.hasNextPage) {
|
|
2828
|
-
* const page2 = await
|
|
3190
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
2829
3191
|
* }
|
|
2830
3192
|
* ```
|
|
2831
3193
|
*/
|
|
@@ -2839,14 +3201,13 @@ interface CaseInstancesServiceModel {
|
|
|
2839
3201
|
* @example
|
|
2840
3202
|
* ```typescript
|
|
2841
3203
|
* // Get a specific case instance
|
|
2842
|
-
* const instance = await
|
|
3204
|
+
* const instance = await caseInstances.getById(
|
|
2843
3205
|
* <instanceId>,
|
|
2844
3206
|
* <folderKey>
|
|
2845
3207
|
* );
|
|
2846
3208
|
*
|
|
2847
3209
|
* // Access instance properties
|
|
2848
3210
|
* console.log(`Status: ${instance.latestRunStatus}`);
|
|
2849
|
-
*
|
|
2850
3211
|
* ```
|
|
2851
3212
|
*/
|
|
2852
3213
|
getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
|
|
@@ -2859,14 +3220,13 @@ interface CaseInstancesServiceModel {
|
|
|
2859
3220
|
* @example
|
|
2860
3221
|
* ```typescript
|
|
2861
3222
|
* // Close a case instance
|
|
2862
|
-
* const result = await
|
|
3223
|
+
* const result = await caseInstances.close(
|
|
2863
3224
|
* <instanceId>,
|
|
2864
3225
|
* <folderKey>
|
|
2865
3226
|
* );
|
|
2866
3227
|
*
|
|
2867
|
-
*
|
|
2868
|
-
*
|
|
2869
|
-
* const instance = await sdk.maestro.cases.instances.getById(
|
|
3228
|
+
* // Or using instance method
|
|
3229
|
+
* const instance = await caseInstances.getById(
|
|
2870
3230
|
* <instanceId>,
|
|
2871
3231
|
* <folderKey>
|
|
2872
3232
|
* );
|
|
@@ -2875,12 +3235,12 @@ interface CaseInstancesServiceModel {
|
|
|
2875
3235
|
* console.log(`Closed: ${result.success}`);
|
|
2876
3236
|
*
|
|
2877
3237
|
* // Close with a comment
|
|
2878
|
-
* const
|
|
3238
|
+
* const resultWithComment = await instance.close({
|
|
2879
3239
|
* comment: 'Closing due to invalid input data'
|
|
2880
3240
|
* });
|
|
2881
3241
|
*
|
|
2882
|
-
* if (
|
|
2883
|
-
* console.log(`Instance ${
|
|
3242
|
+
* if (resultWithComment.success) {
|
|
3243
|
+
* console.log(`Instance ${resultWithComment.data.instanceId} status: ${resultWithComment.data.status}`);
|
|
2884
3244
|
* }
|
|
2885
3245
|
* ```
|
|
2886
3246
|
*/
|
|
@@ -2893,6 +3253,44 @@ interface CaseInstancesServiceModel {
|
|
|
2893
3253
|
* @returns Promise resolving to operation result with instance data
|
|
2894
3254
|
*/
|
|
2895
3255
|
pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
3256
|
+
/**
|
|
3257
|
+
* Reopen a case instance from a specified element
|
|
3258
|
+
* @param instanceId - The ID of the case instance
|
|
3259
|
+
* @param folderKey - Required folder key
|
|
3260
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
3261
|
+
* @returns Promise resolving to operation result with instance data
|
|
3262
|
+
* {@link CaseInstanceOperationResponse}
|
|
3263
|
+
* @example
|
|
3264
|
+
* ```typescript
|
|
3265
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3266
|
+
*
|
|
3267
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3268
|
+
*
|
|
3269
|
+
* // First, get the available stages for the case instance
|
|
3270
|
+
* const stages = await caseInstances.getStages('<instanceId>', '<folderKey>');
|
|
3271
|
+
* const stageId = stages[0].id; // Select the stage to reopen from
|
|
3272
|
+
*
|
|
3273
|
+
* // Reopen a case instance from a specific stage
|
|
3274
|
+
* const result = await caseInstances.reopen(
|
|
3275
|
+
* '<instanceId>',
|
|
3276
|
+
* '<folderKey>',
|
|
3277
|
+
* { stageId }
|
|
3278
|
+
* );
|
|
3279
|
+
*
|
|
3280
|
+
* // Reopen with a comment
|
|
3281
|
+
* const result = await caseInstances.reopen(
|
|
3282
|
+
* '<instanceId>',
|
|
3283
|
+
* '<folderKey>',
|
|
3284
|
+
* { stageId, comment: 'Reopening to retry failed stage' }
|
|
3285
|
+
* );
|
|
3286
|
+
*
|
|
3287
|
+
* // Or using instance method
|
|
3288
|
+
* const instance = await caseInstances.getById('<instanceId>', '<folderKey>');
|
|
3289
|
+
* const stages = await instance.getStages();
|
|
3290
|
+
* const result = await instance.reopen({ stageId: stages[0].id });
|
|
3291
|
+
* ```
|
|
3292
|
+
*/
|
|
3293
|
+
reopen(instanceId: string, folderKey: string, options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
2896
3294
|
/**
|
|
2897
3295
|
* Resume a case instance
|
|
2898
3296
|
* @param instanceId - The ID of the instance to resume
|
|
@@ -2910,7 +3308,7 @@ interface CaseInstancesServiceModel {
|
|
|
2910
3308
|
* @example
|
|
2911
3309
|
* ```typescript
|
|
2912
3310
|
* // Get execution history for a case instance
|
|
2913
|
-
* const history = await
|
|
3311
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
2914
3312
|
* <instanceId>,
|
|
2915
3313
|
* <folderKey>
|
|
2916
3314
|
* );
|
|
@@ -2932,7 +3330,7 @@ interface CaseInstancesServiceModel {
|
|
|
2932
3330
|
* @example
|
|
2933
3331
|
* ```typescript
|
|
2934
3332
|
* // Get stages for a case instance
|
|
2935
|
-
* const stages = await
|
|
3333
|
+
* const stages = await caseInstances.getStages(
|
|
2936
3334
|
* <caseInstanceId>,
|
|
2937
3335
|
* <folderKey>
|
|
2938
3336
|
* );
|
|
@@ -2964,12 +3362,12 @@ interface CaseInstancesServiceModel {
|
|
|
2964
3362
|
* @example
|
|
2965
3363
|
* ```typescript
|
|
2966
3364
|
* // Get all tasks for a case instance (non-paginated)
|
|
2967
|
-
* const
|
|
3365
|
+
* const actionTasks = await caseInstances.getActionTasks(
|
|
2968
3366
|
* <caseInstanceId>,
|
|
2969
3367
|
* );
|
|
2970
3368
|
*
|
|
2971
3369
|
* // First page with pagination
|
|
2972
|
-
* const page1 = await
|
|
3370
|
+
* const page1 = await caseInstances.getActionTasks(
|
|
2973
3371
|
* <caseInstanceId>,
|
|
2974
3372
|
* { pageSize: 10 }
|
|
2975
3373
|
* );
|
|
@@ -2980,7 +3378,7 @@ interface CaseInstancesServiceModel {
|
|
|
2980
3378
|
* }
|
|
2981
3379
|
*
|
|
2982
3380
|
* // Jump to specific page
|
|
2983
|
-
* const page5 = await
|
|
3381
|
+
* const page5 = await caseInstances.getActionTasks(
|
|
2984
3382
|
* <caseInstanceId>,
|
|
2985
3383
|
* {
|
|
2986
3384
|
* jumpToPage: 5,
|
|
@@ -3006,6 +3404,13 @@ interface CaseInstanceMethods {
|
|
|
3006
3404
|
* @returns Promise resolving to operation result
|
|
3007
3405
|
*/
|
|
3008
3406
|
pause(options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
3407
|
+
/**
|
|
3408
|
+
* Reopens this case instance from a specified element
|
|
3409
|
+
*
|
|
3410
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
3411
|
+
* @returns Promise resolving to operation result
|
|
3412
|
+
*/
|
|
3413
|
+
reopen(options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
3009
3414
|
/**
|
|
3010
3415
|
* Resumes this case instance
|
|
3011
3416
|
*
|
|
@@ -3049,17 +3454,21 @@ declare function createCaseInstanceWithMethods(instanceData: RawCaseInstanceGetR
|
|
|
3049
3454
|
declare class MaestroProcessesService extends BaseService implements MaestroProcessesServiceModel {
|
|
3050
3455
|
private processInstancesService;
|
|
3051
3456
|
/**
|
|
3052
|
-
*
|
|
3457
|
+
* Creates an instance of the Maestro Processes service.
|
|
3458
|
+
*
|
|
3459
|
+
* @param instance - UiPath SDK instance providing authentication and configuration
|
|
3053
3460
|
*/
|
|
3054
|
-
constructor(
|
|
3461
|
+
constructor(instance: IUiPath);
|
|
3055
3462
|
/**
|
|
3056
3463
|
* Get all processes with their instance statistics
|
|
3057
3464
|
* @returns Promise resolving to array of MaestroProcess objects
|
|
3058
3465
|
*
|
|
3059
3466
|
* @example
|
|
3060
3467
|
* ```typescript
|
|
3061
|
-
*
|
|
3062
|
-
*
|
|
3468
|
+
* import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
|
|
3469
|
+
*
|
|
3470
|
+
* const maestroProcesses = new MaestroProcesses(sdk);
|
|
3471
|
+
* const processes = await maestroProcesses.getAll();
|
|
3063
3472
|
*
|
|
3064
3473
|
* // Access process information
|
|
3065
3474
|
* for (const process of processes) {
|
|
@@ -3067,7 +3476,6 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
|
|
|
3067
3476
|
* console.log(`Running instances: ${process.runningCount}`);
|
|
3068
3477
|
* console.log(`Faulted instances: ${process.faultedCount}`);
|
|
3069
3478
|
* }
|
|
3070
|
-
*
|
|
3071
3479
|
* ```
|
|
3072
3480
|
*/
|
|
3073
3481
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
@@ -3078,10 +3486,6 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
|
|
|
3078
3486
|
}
|
|
3079
3487
|
|
|
3080
3488
|
declare class ProcessInstancesService extends BaseService implements ProcessInstancesServiceModel {
|
|
3081
|
-
/**
|
|
3082
|
-
* @hideconstructor
|
|
3083
|
-
*/
|
|
3084
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3085
3489
|
/**
|
|
3086
3490
|
* Get all process instances with optional filtering and pagination
|
|
3087
3491
|
*
|
|
@@ -3094,8 +3498,12 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
|
|
|
3094
3498
|
*
|
|
3095
3499
|
* @example
|
|
3096
3500
|
* ```typescript
|
|
3501
|
+
* import { ProcessInstances } from '@uipath/uipath-typescript/maestro-processes';
|
|
3502
|
+
*
|
|
3503
|
+
* const processInstances = new ProcessInstances(sdk);
|
|
3504
|
+
*
|
|
3097
3505
|
* // Get all instances (non-paginated)
|
|
3098
|
-
* const instances = await
|
|
3506
|
+
* const instances = await processInstances.getAll();
|
|
3099
3507
|
*
|
|
3100
3508
|
* // Cancel faulted instances using methods directly on instances
|
|
3101
3509
|
* for (const instance of instances.items) {
|
|
@@ -3105,16 +3513,16 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
|
|
|
3105
3513
|
* }
|
|
3106
3514
|
*
|
|
3107
3515
|
* // With filtering
|
|
3108
|
-
* const
|
|
3516
|
+
* const filtered = await processInstances.getAll({
|
|
3109
3517
|
* processKey: 'MyProcess'
|
|
3110
3518
|
* });
|
|
3111
3519
|
*
|
|
3112
3520
|
* // First page with pagination
|
|
3113
|
-
* const page1 = await
|
|
3521
|
+
* const page1 = await processInstances.getAll({ pageSize: 10 });
|
|
3114
3522
|
*
|
|
3115
3523
|
* // Navigate using cursor
|
|
3116
3524
|
* if (page1.hasNextPage) {
|
|
3117
|
-
* const page2 = await
|
|
3525
|
+
* const page2 = await processInstances.getAll({ cursor: page1.nextCursor });
|
|
3118
3526
|
* }
|
|
3119
3527
|
* ```
|
|
3120
3528
|
*/
|
|
@@ -3213,8 +3621,10 @@ declare class ProcessIncidentsService extends BaseService implements ProcessInci
|
|
|
3213
3621
|
* {@link ProcessIncidentGetAllResponse}
|
|
3214
3622
|
* @example
|
|
3215
3623
|
* ```typescript
|
|
3216
|
-
*
|
|
3217
|
-
*
|
|
3624
|
+
* import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
|
|
3625
|
+
*
|
|
3626
|
+
* const processIncidents = new ProcessIncidents(sdk);
|
|
3627
|
+
* const incidents = await processIncidents.getAll();
|
|
3218
3628
|
*
|
|
3219
3629
|
* // Access process incident information
|
|
3220
3630
|
* for (const incident of incidents) {
|
|
@@ -3232,26 +3642,23 @@ declare class ProcessIncidentsService extends BaseService implements ProcessInci
|
|
|
3232
3642
|
* Service for interacting with UiPath Maestro Cases
|
|
3233
3643
|
*/
|
|
3234
3644
|
declare class CasesService extends BaseService implements CasesServiceModel {
|
|
3235
|
-
/**
|
|
3236
|
-
* @hideconstructor
|
|
3237
|
-
*/
|
|
3238
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3239
3645
|
/**
|
|
3240
3646
|
* Get all case management processes with their instance statistics
|
|
3241
3647
|
* @returns Promise resolving to array of Case objects
|
|
3242
3648
|
*
|
|
3243
3649
|
* @example
|
|
3244
3650
|
* ```typescript
|
|
3245
|
-
*
|
|
3246
|
-
*
|
|
3651
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
3652
|
+
*
|
|
3653
|
+
* const cases = new Cases(sdk);
|
|
3654
|
+
* const allCases = await cases.getAll();
|
|
3247
3655
|
*
|
|
3248
3656
|
* // Access case information
|
|
3249
|
-
* for (const caseProcess of
|
|
3657
|
+
* for (const caseProcess of allCases) {
|
|
3250
3658
|
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
3251
3659
|
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
3252
3660
|
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
3253
3661
|
* }
|
|
3254
|
-
*
|
|
3255
3662
|
* ```
|
|
3256
3663
|
*/
|
|
3257
3664
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
@@ -3267,9 +3674,11 @@ declare class CasesService extends BaseService implements CasesServiceModel {
|
|
|
3267
3674
|
declare class CaseInstancesService extends BaseService implements CaseInstancesServiceModel {
|
|
3268
3675
|
private taskService;
|
|
3269
3676
|
/**
|
|
3270
|
-
*
|
|
3677
|
+
* Creates an instance of the Case Instances service.
|
|
3678
|
+
*
|
|
3679
|
+
* @param instance - UiPath SDK instance providing authentication and configuration
|
|
3271
3680
|
*/
|
|
3272
|
-
constructor(
|
|
3681
|
+
constructor(instance: IUiPath);
|
|
3273
3682
|
/**
|
|
3274
3683
|
* Get all case instances with optional filtering and pagination
|
|
3275
3684
|
*
|
|
@@ -3282,8 +3691,12 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3282
3691
|
*
|
|
3283
3692
|
* @example
|
|
3284
3693
|
* ```typescript
|
|
3694
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3695
|
+
*
|
|
3696
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3697
|
+
*
|
|
3285
3698
|
* // Get all case instances (non-paginated)
|
|
3286
|
-
* const instances = await
|
|
3699
|
+
* const instances = await caseInstances.getAll();
|
|
3287
3700
|
*
|
|
3288
3701
|
* // Close faulted instances using methods directly on instances
|
|
3289
3702
|
* for (const instance of instances.items) {
|
|
@@ -3293,22 +3706,22 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3293
3706
|
* }
|
|
3294
3707
|
*
|
|
3295
3708
|
* // With filtering
|
|
3296
|
-
* const
|
|
3709
|
+
* const filtered = await caseInstances.getAll({
|
|
3297
3710
|
* processKey: 'MyCaseProcess'
|
|
3298
3711
|
* });
|
|
3299
3712
|
*
|
|
3300
3713
|
* // First page with pagination
|
|
3301
|
-
* const page1 = await
|
|
3714
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
3302
3715
|
*
|
|
3303
3716
|
* // Navigate using cursor
|
|
3304
3717
|
* if (page1.hasNextPage) {
|
|
3305
|
-
* const page2 = await
|
|
3718
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
3306
3719
|
* }
|
|
3307
3720
|
* ```
|
|
3308
3721
|
*/
|
|
3309
3722
|
getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
|
|
3310
3723
|
/**
|
|
3311
|
-
* Get a case instance by ID with operation methods (close, pause, resume)
|
|
3724
|
+
* Get a case instance by ID with operation methods (close, pause, resume, reopen)
|
|
3312
3725
|
* @param instanceId - The ID of the instance to retrieve
|
|
3313
3726
|
* @param folderKey - Required folder key
|
|
3314
3727
|
* @returns Promise<CaseInstanceGetResponse>
|
|
@@ -3352,6 +3765,14 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3352
3765
|
* @returns Promise resolving to operation result with updated instance data
|
|
3353
3766
|
*/
|
|
3354
3767
|
pause(instanceId: string, folderKey: string, options?: CaseInstanceOperationOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
3768
|
+
/**
|
|
3769
|
+
* Reopen a case instance from a specified element
|
|
3770
|
+
* @param instanceId - The ID of the case instance to reopen
|
|
3771
|
+
* @param folderKey - Required folder key
|
|
3772
|
+
* @param options - Reopen options containing stageId (the stage ID to resume from) and an optional comment
|
|
3773
|
+
* @returns Promise resolving to operation result with updated instance data
|
|
3774
|
+
*/
|
|
3775
|
+
reopen(instanceId: string, folderKey: string, options: CaseInstanceReopenOptions): Promise<OperationResponse<CaseInstanceOperationResponse>>;
|
|
3355
3776
|
/**
|
|
3356
3777
|
* Resume a case instance
|
|
3357
3778
|
* @param instanceId - The ID of the instance to resume
|
|
@@ -3367,8 +3788,10 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3367
3788
|
* @returns Promise resolving to instance execution history
|
|
3368
3789
|
* @example
|
|
3369
3790
|
* ```typescript
|
|
3370
|
-
*
|
|
3371
|
-
*
|
|
3791
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3792
|
+
*
|
|
3793
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3794
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
3372
3795
|
* 'instance-id',
|
|
3373
3796
|
* 'folder-key'
|
|
3374
3797
|
* );
|
|
@@ -3432,10 +3855,16 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3432
3855
|
}
|
|
3433
3856
|
|
|
3434
3857
|
/**
|
|
3435
|
-
* Base service for services that need folder-specific functionality
|
|
3858
|
+
* Base service for services that need folder-specific functionality.
|
|
3859
|
+
*
|
|
3860
|
+
* Extends BaseService with additional methods for working with folder-scoped resources
|
|
3861
|
+
* in UiPath Orchestrator. Services that work with folders (Assets, Queues) extend this class.
|
|
3862
|
+
*
|
|
3863
|
+
* @remarks
|
|
3864
|
+
* This class provides helper methods for making folder-scoped API calls, handling folder IDs
|
|
3865
|
+
* in request headers, and managing cross-folder queries.
|
|
3436
3866
|
*/
|
|
3437
3867
|
declare class FolderScopedService extends BaseService {
|
|
3438
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3439
3868
|
/**
|
|
3440
3869
|
* Gets resources in a folder with optional query parameters
|
|
3441
3870
|
*
|
|
@@ -3515,6 +3944,17 @@ type AssetGetByIdOptions = BaseOptions;
|
|
|
3515
3944
|
* Service for managing UiPath Assets.
|
|
3516
3945
|
*
|
|
3517
3946
|
* Assets are key-value pairs that can be used to store configuration data, credentials, and other settings used by automation processes. [UiPath Assets Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-assets)
|
|
3947
|
+
*
|
|
3948
|
+
* ### Usage
|
|
3949
|
+
*
|
|
3950
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
3951
|
+
*
|
|
3952
|
+
* ```typescript
|
|
3953
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
3954
|
+
*
|
|
3955
|
+
* const assets = new Assets(sdk);
|
|
3956
|
+
* const allAssets = await assets.getAll();
|
|
3957
|
+
* ```
|
|
3518
3958
|
*/
|
|
3519
3959
|
interface AssetServiceModel {
|
|
3520
3960
|
/**
|
|
@@ -3526,21 +3966,19 @@ interface AssetServiceModel {
|
|
|
3526
3966
|
* @example
|
|
3527
3967
|
* ```typescript
|
|
3528
3968
|
* // Standard array return
|
|
3529
|
-
* const assets = await sdk.assets.getAll();
|
|
3530
|
-
*
|
|
3531
3969
|
* // With folder
|
|
3532
|
-
* const folderAssets = await
|
|
3970
|
+
* const folderAssets = await assets.getAll({ folderId: <folderId> });
|
|
3533
3971
|
*
|
|
3534
3972
|
* // First page with pagination
|
|
3535
|
-
* const page1 = await
|
|
3973
|
+
* const page1 = await assets.getAll({ pageSize: 10 });
|
|
3536
3974
|
*
|
|
3537
3975
|
* // Navigate using cursor
|
|
3538
3976
|
* if (page1.hasNextPage) {
|
|
3539
|
-
* const page2 = await
|
|
3977
|
+
* const page2 = await assets.getAll({ cursor: page1.nextCursor });
|
|
3540
3978
|
* }
|
|
3541
3979
|
*
|
|
3542
3980
|
* // Jump to specific page
|
|
3543
|
-
* const page5 = await
|
|
3981
|
+
* const page5 = await assets.getAll({
|
|
3544
3982
|
* jumpToPage: 5,
|
|
3545
3983
|
* pageSize: 10
|
|
3546
3984
|
* });
|
|
@@ -3558,7 +3996,7 @@ interface AssetServiceModel {
|
|
|
3558
3996
|
* @example
|
|
3559
3997
|
* ```typescript
|
|
3560
3998
|
* // Get asset by ID
|
|
3561
|
-
* const asset = await
|
|
3999
|
+
* const asset = await assets.getById(<assetId>, <folderId>);
|
|
3562
4000
|
* ```
|
|
3563
4001
|
*/
|
|
3564
4002
|
getById(id: number, folderId: number, options?: AssetGetByIdOptions): Promise<AssetGetResponse>;
|
|
@@ -3568,10 +4006,6 @@ interface AssetServiceModel {
|
|
|
3568
4006
|
* Service for interacting with UiPath Orchestrator Assets API
|
|
3569
4007
|
*/
|
|
3570
4008
|
declare class AssetService extends FolderScopedService implements AssetServiceModel {
|
|
3571
|
-
/**
|
|
3572
|
-
* @hideconstructor
|
|
3573
|
-
*/
|
|
3574
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3575
4009
|
/**
|
|
3576
4010
|
* Gets all assets across folders with optional filtering and folder scoping
|
|
3577
4011
|
*
|
|
@@ -3581,22 +4015,26 @@ declare class AssetService extends FolderScopedService implements AssetServiceMo
|
|
|
3581
4015
|
*
|
|
3582
4016
|
* @example
|
|
3583
4017
|
* ```typescript
|
|
4018
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
4019
|
+
*
|
|
4020
|
+
* const assets = new Assets(sdk);
|
|
4021
|
+
*
|
|
3584
4022
|
* // Standard array return
|
|
3585
|
-
* const
|
|
4023
|
+
* const allAssets = await assets.getAll();
|
|
3586
4024
|
*
|
|
3587
4025
|
* // With folder
|
|
3588
|
-
* const folderAssets = await
|
|
4026
|
+
* const folderAssets = await assets.getAll({ folderId: 123 });
|
|
3589
4027
|
*
|
|
3590
4028
|
* // First page with pagination
|
|
3591
|
-
* const page1 = await
|
|
4029
|
+
* const page1 = await assets.getAll({ pageSize: 10 });
|
|
3592
4030
|
*
|
|
3593
4031
|
* // Navigate using cursor
|
|
3594
4032
|
* if (page1.hasNextPage) {
|
|
3595
|
-
* const page2 = await
|
|
4033
|
+
* const page2 = await assets.getAll({ cursor: page1.nextCursor });
|
|
3596
4034
|
* }
|
|
3597
4035
|
*
|
|
3598
4036
|
* // Jump to specific page
|
|
3599
|
-
* const page5 = await
|
|
4037
|
+
* const page5 = await assets.getAll({
|
|
3600
4038
|
* jumpToPage: 5,
|
|
3601
4039
|
* pageSize: 10
|
|
3602
4040
|
* });
|
|
@@ -3613,8 +4051,12 @@ declare class AssetService extends FolderScopedService implements AssetServiceMo
|
|
|
3613
4051
|
*
|
|
3614
4052
|
* @example
|
|
3615
4053
|
* ```typescript
|
|
4054
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
4055
|
+
*
|
|
4056
|
+
* const assets = new Assets(sdk);
|
|
4057
|
+
*
|
|
3616
4058
|
* // Get asset by ID
|
|
3617
|
-
* const asset = await
|
|
4059
|
+
* const asset = await assets.getById(123, 456);
|
|
3618
4060
|
* ```
|
|
3619
4061
|
*/
|
|
3620
4062
|
getById(id: number, folderId: number, options?: AssetGetByIdOptions): Promise<AssetGetResponse>;
|
|
@@ -3764,7 +4206,7 @@ interface BucketUploadFileOptions {
|
|
|
3764
4206
|
/**
|
|
3765
4207
|
* File content to upload
|
|
3766
4208
|
*/
|
|
3767
|
-
content: Blob |
|
|
4209
|
+
content: Blob | Uint8Array<ArrayBuffer> | File;
|
|
3768
4210
|
}
|
|
3769
4211
|
/**
|
|
3770
4212
|
* Response from file upload operations
|
|
@@ -3784,6 +4226,17 @@ interface BucketUploadResponse {
|
|
|
3784
4226
|
* Service for managing UiPath storage Buckets.
|
|
3785
4227
|
*
|
|
3786
4228
|
* Buckets are cloud storage containers that can be used to store and manage files used by automation processes. [UiPath Buckets Guide](https://docs.uipath.com/orchestrator/automation-cloud/latest/user-guide/about-storage-buckets)
|
|
4229
|
+
*
|
|
4230
|
+
* ### Usage
|
|
4231
|
+
*
|
|
4232
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
4233
|
+
*
|
|
4234
|
+
* ```typescript
|
|
4235
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4236
|
+
*
|
|
4237
|
+
* const buckets = new Buckets(sdk);
|
|
4238
|
+
* const allBuckets = await buckets.getAll();
|
|
4239
|
+
* ```
|
|
3787
4240
|
*/
|
|
3788
4241
|
interface BucketServiceModel {
|
|
3789
4242
|
/**
|
|
@@ -3799,28 +4252,28 @@ interface BucketServiceModel {
|
|
|
3799
4252
|
* @example
|
|
3800
4253
|
* ```typescript
|
|
3801
4254
|
* // Get all buckets across folders
|
|
3802
|
-
* const
|
|
4255
|
+
* const allBuckets = await buckets.getAll();
|
|
3803
4256
|
*
|
|
3804
4257
|
* // Get buckets within a specific folder
|
|
3805
|
-
* const
|
|
4258
|
+
* const folderBuckets = await buckets.getAll({
|
|
3806
4259
|
* folderId: <folderId>
|
|
3807
4260
|
* });
|
|
3808
4261
|
*
|
|
3809
4262
|
* // Get buckets with filtering
|
|
3810
|
-
* const
|
|
4263
|
+
* const filteredBuckets = await buckets.getAll({
|
|
3811
4264
|
* filter: "name eq 'MyBucket'"
|
|
3812
4265
|
* });
|
|
3813
4266
|
*
|
|
3814
4267
|
* // First page with pagination
|
|
3815
|
-
* const page1 = await
|
|
4268
|
+
* const page1 = await buckets.getAll({ pageSize: 10 });
|
|
3816
4269
|
*
|
|
3817
4270
|
* // Navigate using cursor
|
|
3818
4271
|
* if (page1.hasNextPage) {
|
|
3819
|
-
* const page2 = await
|
|
4272
|
+
* const page2 = await buckets.getAll({ cursor: page1.nextCursor });
|
|
3820
4273
|
* }
|
|
3821
4274
|
*
|
|
3822
4275
|
* // Jump to specific page
|
|
3823
|
-
* const page5 = await
|
|
4276
|
+
* const page5 = await buckets.getAll({
|
|
3824
4277
|
* jumpToPage: 5,
|
|
3825
4278
|
* pageSize: 10
|
|
3826
4279
|
* });
|
|
@@ -3838,7 +4291,7 @@ interface BucketServiceModel {
|
|
|
3838
4291
|
* @example
|
|
3839
4292
|
* ```typescript
|
|
3840
4293
|
* // Get bucket by ID
|
|
3841
|
-
* const bucket = await
|
|
4294
|
+
* const bucket = await buckets.getById(<bucketId>, <folderId>);
|
|
3842
4295
|
* ```
|
|
3843
4296
|
*/
|
|
3844
4297
|
getById(bucketId: number, folderId: number, options?: BucketGetByIdOptions): Promise<BucketGetResponse>;
|
|
@@ -3857,19 +4310,19 @@ interface BucketServiceModel {
|
|
|
3857
4310
|
* @example
|
|
3858
4311
|
* ```typescript
|
|
3859
4312
|
* // Get metadata for all files in a bucket
|
|
3860
|
-
* const fileMetadata = await
|
|
4313
|
+
* const fileMetadata = await buckets.getFileMetaData(<bucketId>, <folderId>);
|
|
3861
4314
|
*
|
|
3862
4315
|
* // Get file metadata with a specific prefix
|
|
3863
|
-
* const
|
|
4316
|
+
* const prefixMetadata = await buckets.getFileMetaData(<bucketId>, <folderId>, {
|
|
3864
4317
|
* prefix: '/folder1'
|
|
3865
4318
|
* });
|
|
3866
4319
|
*
|
|
3867
4320
|
* // First page with pagination
|
|
3868
|
-
* const page1 = await
|
|
4321
|
+
* const page1 = await buckets.getFileMetaData(<bucketId>, <folderId>, { pageSize: 10 });
|
|
3869
4322
|
*
|
|
3870
4323
|
* // Navigate using cursor
|
|
3871
4324
|
* if (page1.hasNextPage) {
|
|
3872
|
-
* const page2 = await
|
|
4325
|
+
* const page2 = await buckets.getFileMetaData(<bucketId>, <folderId>, { cursor: page1.nextCursor });
|
|
3873
4326
|
* }
|
|
3874
4327
|
* ```
|
|
3875
4328
|
*/
|
|
@@ -3883,7 +4336,7 @@ interface BucketServiceModel {
|
|
|
3883
4336
|
* @example
|
|
3884
4337
|
* ```typescript
|
|
3885
4338
|
* // Get download URL for a file
|
|
3886
|
-
* const fileAccess = await
|
|
4339
|
+
* const fileAccess = await buckets.getReadUri({
|
|
3887
4340
|
* bucketId: <bucketId>,
|
|
3888
4341
|
* folderId: <folderId>,
|
|
3889
4342
|
* path: '/folder/file.pdf'
|
|
@@ -3901,20 +4354,20 @@ interface BucketServiceModel {
|
|
|
3901
4354
|
* ```typescript
|
|
3902
4355
|
* // Upload a file from browser
|
|
3903
4356
|
* const file = new File(['file content'], 'example.txt');
|
|
3904
|
-
* const result = await
|
|
4357
|
+
* const result = await buckets.uploadFile({
|
|
3905
4358
|
* bucketId: <bucketId>,
|
|
3906
4359
|
* folderId: <folderId>,
|
|
3907
4360
|
* path: '/folder/example.txt',
|
|
3908
4361
|
* content: file
|
|
3909
4362
|
* });
|
|
3910
4363
|
*
|
|
3911
|
-
* // In Node env with Buffer
|
|
3912
|
-
* const
|
|
3913
|
-
* const result = await
|
|
4364
|
+
* // In Node env with Uint8Array or Buffer
|
|
4365
|
+
* const content = new TextEncoder().encode('file content');
|
|
4366
|
+
* const result = await buckets.uploadFile({
|
|
3914
4367
|
* bucketId: <bucketId>,
|
|
3915
4368
|
* folderId: <folderId>,
|
|
3916
4369
|
* path: '/folder/example.txt',
|
|
3917
|
-
* content
|
|
4370
|
+
* content,
|
|
3918
4371
|
* });
|
|
3919
4372
|
* ```
|
|
3920
4373
|
*/
|
|
@@ -3922,11 +4375,6 @@ interface BucketServiceModel {
|
|
|
3922
4375
|
}
|
|
3923
4376
|
|
|
3924
4377
|
declare class BucketService extends FolderScopedService implements BucketServiceModel {
|
|
3925
|
-
protected readonly tokenManager: TokenManager;
|
|
3926
|
-
/**
|
|
3927
|
-
* @hideconstructor
|
|
3928
|
-
*/
|
|
3929
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3930
4378
|
/**
|
|
3931
4379
|
* Gets a bucket by ID
|
|
3932
4380
|
* @param bucketId - The ID of the bucket to retrieve
|
|
@@ -3936,8 +4384,12 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
3936
4384
|
*
|
|
3937
4385
|
* @example
|
|
3938
4386
|
* ```typescript
|
|
4387
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4388
|
+
*
|
|
4389
|
+
* const buckets = new Buckets(sdk);
|
|
4390
|
+
*
|
|
3939
4391
|
* // Get bucket by ID
|
|
3940
|
-
* const bucket = await
|
|
4392
|
+
* const bucket = await buckets.getById(123, 456);
|
|
3941
4393
|
* ```
|
|
3942
4394
|
*/
|
|
3943
4395
|
getById(id: number, folderId: number, options?: BucketGetByIdOptions): Promise<BucketGetResponse>;
|
|
@@ -3953,29 +4405,33 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
3953
4405
|
*
|
|
3954
4406
|
* @example
|
|
3955
4407
|
* ```typescript
|
|
4408
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4409
|
+
*
|
|
4410
|
+
* const buckets = new Buckets(sdk);
|
|
4411
|
+
*
|
|
3956
4412
|
* // Get all buckets across folders
|
|
3957
|
-
* const
|
|
4413
|
+
* const allBuckets = await buckets.getAll();
|
|
3958
4414
|
*
|
|
3959
4415
|
* // Get buckets within a specific folder
|
|
3960
|
-
* const
|
|
4416
|
+
* const folderBuckets = await buckets.getAll({
|
|
3961
4417
|
* folderId: 123
|
|
3962
4418
|
* });
|
|
3963
4419
|
*
|
|
3964
4420
|
* // Get buckets with filtering
|
|
3965
|
-
* const
|
|
4421
|
+
* const filteredBuckets = await buckets.getAll({
|
|
3966
4422
|
* filter: "name eq 'MyBucket'"
|
|
3967
4423
|
* });
|
|
3968
4424
|
*
|
|
3969
4425
|
* // First page with pagination
|
|
3970
|
-
* const page1 = await
|
|
4426
|
+
* const page1 = await buckets.getAll({ pageSize: 10 });
|
|
3971
4427
|
*
|
|
3972
4428
|
* // Navigate using cursor
|
|
3973
4429
|
* if (page1.hasNextPage) {
|
|
3974
|
-
* const page2 = await
|
|
4430
|
+
* const page2 = await buckets.getAll({ cursor: page1.nextCursor });
|
|
3975
4431
|
* }
|
|
3976
4432
|
*
|
|
3977
4433
|
* // Jump to specific page
|
|
3978
|
-
* const page5 = await
|
|
4434
|
+
* const page5 = await buckets.getAll({
|
|
3979
4435
|
* jumpToPage: 5,
|
|
3980
4436
|
* pageSize: 10
|
|
3981
4437
|
* });
|
|
@@ -3996,20 +4452,24 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
3996
4452
|
*
|
|
3997
4453
|
* @example
|
|
3998
4454
|
* ```typescript
|
|
4455
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4456
|
+
*
|
|
4457
|
+
* const buckets = new Buckets(sdk);
|
|
4458
|
+
*
|
|
3999
4459
|
* // Get metadata for all files in a bucket
|
|
4000
|
-
* const fileMetadata = await
|
|
4460
|
+
* const fileMetadata = await buckets.getFileMetaData(123, 456);
|
|
4001
4461
|
*
|
|
4002
4462
|
* // Get file metadata with a specific prefix
|
|
4003
|
-
* const fileMetadata = await
|
|
4463
|
+
* const fileMetadata = await buckets.getFileMetaData(123, 456, {
|
|
4004
4464
|
* prefix: '/folder1'
|
|
4005
4465
|
* });
|
|
4006
4466
|
*
|
|
4007
4467
|
* // First page with pagination
|
|
4008
|
-
* const page1 = await
|
|
4468
|
+
* const page1 = await buckets.getFileMetaData(123, 456, { pageSize: 10 });
|
|
4009
4469
|
*
|
|
4010
4470
|
* // Navigate using cursor
|
|
4011
4471
|
* if (page1.hasNextPage) {
|
|
4012
|
-
* const page2 = await
|
|
4472
|
+
* const page2 = await buckets.getFileMetaData(123, 456, { cursor: page1.nextCursor });
|
|
4013
4473
|
* }
|
|
4014
4474
|
* ```
|
|
4015
4475
|
*/
|
|
@@ -4022,9 +4482,13 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4022
4482
|
*
|
|
4023
4483
|
* @example
|
|
4024
4484
|
* ```typescript
|
|
4485
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4486
|
+
*
|
|
4487
|
+
* const buckets = new Buckets(sdk);
|
|
4488
|
+
*
|
|
4025
4489
|
* // Upload a file from browser
|
|
4026
4490
|
* const file = new File(['file content'], 'example.txt');
|
|
4027
|
-
* const result = await
|
|
4491
|
+
* const result = await buckets.uploadFile({
|
|
4028
4492
|
* bucketId: 123,
|
|
4029
4493
|
* folderId: 456,
|
|
4030
4494
|
* path: '/folder/example.txt',
|
|
@@ -4033,7 +4497,7 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4033
4497
|
*
|
|
4034
4498
|
* // In Node env with Buffer
|
|
4035
4499
|
* const buffer = Buffer.from('file content');
|
|
4036
|
-
* const result = await
|
|
4500
|
+
* const result = await buckets.uploadFile({
|
|
4037
4501
|
* bucketId: 123,
|
|
4038
4502
|
* folderId: 456,
|
|
4039
4503
|
* path: '/folder/example.txt',
|
|
@@ -4050,8 +4514,12 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4050
4514
|
*
|
|
4051
4515
|
* @example
|
|
4052
4516
|
* ```typescript
|
|
4517
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4518
|
+
*
|
|
4519
|
+
* const buckets = new Buckets(sdk);
|
|
4520
|
+
*
|
|
4053
4521
|
* // Get download URL for a file
|
|
4054
|
-
* const fileAccess = await
|
|
4522
|
+
* const fileAccess = await buckets.getReadUri({
|
|
4055
4523
|
* bucketId: 123,
|
|
4056
4524
|
* folderId: 456,
|
|
4057
4525
|
* path: '/folder/file.pdf'
|
|
@@ -4379,6 +4847,17 @@ type ProcessGetByIdOptions = BaseOptions;
|
|
|
4379
4847
|
* Service for managing and executing UiPath Automation Processes.
|
|
4380
4848
|
*
|
|
4381
4849
|
* 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)
|
|
4850
|
+
*
|
|
4851
|
+
* ### Usage
|
|
4852
|
+
*
|
|
4853
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
4854
|
+
*
|
|
4855
|
+
* ```typescript
|
|
4856
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
4857
|
+
*
|
|
4858
|
+
* const processes = new Processes(sdk);
|
|
4859
|
+
* const allProcesses = await processes.getAll();
|
|
4860
|
+
* ```
|
|
4382
4861
|
*/
|
|
4383
4862
|
interface ProcessServiceModel {
|
|
4384
4863
|
/**
|
|
@@ -4392,28 +4871,28 @@ interface ProcessServiceModel {
|
|
|
4392
4871
|
* @example
|
|
4393
4872
|
* ```typescript
|
|
4394
4873
|
* // Standard array return
|
|
4395
|
-
* const
|
|
4874
|
+
* const allProcesses = await processes.getAll();
|
|
4396
4875
|
*
|
|
4397
4876
|
* // Get processes within a specific folder
|
|
4398
|
-
* const
|
|
4877
|
+
* const folderProcesses = await processes.getAll({
|
|
4399
4878
|
* folderId: <folderId>
|
|
4400
4879
|
* });
|
|
4401
4880
|
*
|
|
4402
4881
|
* // Get processes with filtering
|
|
4403
|
-
* const
|
|
4882
|
+
* const filteredProcesses = await processes.getAll({
|
|
4404
4883
|
* filter: "name eq 'MyProcess'"
|
|
4405
4884
|
* });
|
|
4406
4885
|
*
|
|
4407
4886
|
* // First page with pagination
|
|
4408
|
-
* const page1 = await
|
|
4887
|
+
* const page1 = await processes.getAll({ pageSize: 10 });
|
|
4409
4888
|
*
|
|
4410
4889
|
* // Navigate using cursor
|
|
4411
4890
|
* if (page1.hasNextPage) {
|
|
4412
|
-
* const page2 = await
|
|
4891
|
+
* const page2 = await processes.getAll({ cursor: page1.nextCursor });
|
|
4413
4892
|
* }
|
|
4414
4893
|
*
|
|
4415
4894
|
* // Jump to specific page
|
|
4416
|
-
* const page5 = await
|
|
4895
|
+
* const page5 = await processes.getAll({
|
|
4417
4896
|
* jumpToPage: 5,
|
|
4418
4897
|
* pageSize: 10
|
|
4419
4898
|
* });
|
|
@@ -4431,7 +4910,7 @@ interface ProcessServiceModel {
|
|
|
4431
4910
|
* @example
|
|
4432
4911
|
* ```typescript
|
|
4433
4912
|
* // Get process by ID
|
|
4434
|
-
* const process = await
|
|
4913
|
+
* const process = await processes.getById(<processId>, <folderId>);
|
|
4435
4914
|
* ```
|
|
4436
4915
|
*/
|
|
4437
4916
|
getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
|
|
@@ -4446,12 +4925,12 @@ interface ProcessServiceModel {
|
|
|
4446
4925
|
* @example
|
|
4447
4926
|
* ```typescript
|
|
4448
4927
|
* // Start a process by process key
|
|
4449
|
-
* const
|
|
4928
|
+
* const result = await processes.start({
|
|
4450
4929
|
* processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
4451
4930
|
* }, <folderId>); // folderId is required
|
|
4452
4931
|
*
|
|
4453
4932
|
* // Start a process by name with specific robots
|
|
4454
|
-
* const
|
|
4933
|
+
* const result = await processes.start({
|
|
4455
4934
|
* processName: "MyProcess"
|
|
4456
4935
|
* }, <folderId>); // folderId is required
|
|
4457
4936
|
* ```
|
|
@@ -4463,10 +4942,6 @@ interface ProcessServiceModel {
|
|
|
4463
4942
|
* Service for interacting with UiPath Orchestrator Processes API
|
|
4464
4943
|
*/
|
|
4465
4944
|
declare class ProcessService extends BaseService implements ProcessServiceModel {
|
|
4466
|
-
/**
|
|
4467
|
-
* @hideconstructor
|
|
4468
|
-
*/
|
|
4469
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4470
4945
|
/**
|
|
4471
4946
|
* Gets all processes across folders with optional filtering and folder scoping
|
|
4472
4947
|
*
|
|
@@ -4479,29 +4954,33 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4479
4954
|
*
|
|
4480
4955
|
* @example
|
|
4481
4956
|
* ```typescript
|
|
4957
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
4958
|
+
*
|
|
4959
|
+
* const processes = new Processes(sdk);
|
|
4960
|
+
*
|
|
4482
4961
|
* // Standard array return
|
|
4483
|
-
* const
|
|
4962
|
+
* const allProcesses = await processes.getAll();
|
|
4484
4963
|
*
|
|
4485
4964
|
* // Get processes within a specific folder
|
|
4486
|
-
* const
|
|
4965
|
+
* const folderProcesses = await processes.getAll({
|
|
4487
4966
|
* folderId: 123
|
|
4488
4967
|
* });
|
|
4489
4968
|
*
|
|
4490
4969
|
* // Get processes with filtering
|
|
4491
|
-
* const
|
|
4970
|
+
* const filteredProcesses = await processes.getAll({
|
|
4492
4971
|
* filter: "name eq 'MyProcess'"
|
|
4493
4972
|
* });
|
|
4494
4973
|
*
|
|
4495
4974
|
* // First page with pagination
|
|
4496
|
-
* const page1 = await
|
|
4975
|
+
* const page1 = await processes.getAll({ pageSize: 10 });
|
|
4497
4976
|
*
|
|
4498
4977
|
* // Navigate using cursor
|
|
4499
4978
|
* if (page1.hasNextPage) {
|
|
4500
|
-
* const page2 = await
|
|
4979
|
+
* const page2 = await processes.getAll({ cursor: page1.nextCursor });
|
|
4501
4980
|
* }
|
|
4502
4981
|
*
|
|
4503
4982
|
* // Jump to specific page
|
|
4504
|
-
* const page5 = await
|
|
4983
|
+
* const page5 = await processes.getAll({
|
|
4505
4984
|
* jumpToPage: 5,
|
|
4506
4985
|
* pageSize: 10
|
|
4507
4986
|
* });
|
|
@@ -4518,13 +4997,17 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4518
4997
|
*
|
|
4519
4998
|
* @example
|
|
4520
4999
|
* ```typescript
|
|
5000
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
5001
|
+
*
|
|
5002
|
+
* const processes = new Processes(sdk);
|
|
5003
|
+
*
|
|
4521
5004
|
* // Start a process by process key
|
|
4522
|
-
* const jobs = await
|
|
5005
|
+
* const jobs = await processes.start({
|
|
4523
5006
|
* processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
4524
5007
|
* }, 123); // folderId is required
|
|
4525
5008
|
*
|
|
4526
5009
|
* // Start a process by name with specific robots
|
|
4527
|
-
* const jobs = await
|
|
5010
|
+
* const jobs = await processes.start({
|
|
4528
5011
|
* processName: "MyProcess"
|
|
4529
5012
|
* }, 123); // folderId is required
|
|
4530
5013
|
* ```
|
|
@@ -4540,8 +5023,12 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4540
5023
|
*
|
|
4541
5024
|
* @example
|
|
4542
5025
|
* ```typescript
|
|
5026
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
5027
|
+
*
|
|
5028
|
+
* const processes = new Processes(sdk);
|
|
5029
|
+
*
|
|
4543
5030
|
* // Get process by ID
|
|
4544
|
-
* const process = await
|
|
5031
|
+
* const process = await processes.getById(123, 456);
|
|
4545
5032
|
* ```
|
|
4546
5033
|
*/
|
|
4547
5034
|
getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
|
|
@@ -4588,6 +5075,17 @@ type QueueGetByIdOptions = BaseOptions;
|
|
|
4588
5075
|
* Service for managing UiPath Queues
|
|
4589
5076
|
*
|
|
4590
5077
|
* 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)
|
|
5078
|
+
*
|
|
5079
|
+
* ### Usage
|
|
5080
|
+
*
|
|
5081
|
+
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
|
|
5082
|
+
*
|
|
5083
|
+
* ```typescript
|
|
5084
|
+
* import { Queues } from '@uipath/uipath-typescript/queues';
|
|
5085
|
+
*
|
|
5086
|
+
* const queues = new Queues(sdk);
|
|
5087
|
+
* const allQueues = await queues.getAll();
|
|
5088
|
+
* ```
|
|
4591
5089
|
*/
|
|
4592
5090
|
interface QueueServiceModel {
|
|
4593
5091
|
/**
|
|
@@ -4600,28 +5098,28 @@ interface QueueServiceModel {
|
|
|
4600
5098
|
* @example
|
|
4601
5099
|
* ```typescript
|
|
4602
5100
|
* // Standard array return
|
|
4603
|
-
* const
|
|
5101
|
+
* const allQueues = await queues.getAll();
|
|
4604
5102
|
*
|
|
4605
5103
|
* // Get queues within a specific folder
|
|
4606
|
-
* const
|
|
5104
|
+
* const folderQueues = await queues.getAll({
|
|
4607
5105
|
* folderId: <folderId>
|
|
4608
5106
|
* });
|
|
4609
5107
|
*
|
|
4610
5108
|
* // Get queues with filtering
|
|
4611
|
-
* const
|
|
5109
|
+
* const filteredQueues = await queues.getAll({
|
|
4612
5110
|
* filter: "name eq 'MyQueue'"
|
|
4613
5111
|
* });
|
|
4614
5112
|
*
|
|
4615
5113
|
* // First page with pagination
|
|
4616
|
-
* const page1 = await
|
|
5114
|
+
* const page1 = await queues.getAll({ pageSize: 10 });
|
|
4617
5115
|
*
|
|
4618
5116
|
* // Navigate using cursor
|
|
4619
5117
|
* if (page1.hasNextPage) {
|
|
4620
|
-
* const page2 = await
|
|
5118
|
+
* const page2 = await queues.getAll({ cursor: page1.nextCursor });
|
|
4621
5119
|
* }
|
|
4622
5120
|
*
|
|
4623
5121
|
* // Jump to specific page
|
|
4624
|
-
* const page5 = await
|
|
5122
|
+
* const page5 = await queues.getAll({
|
|
4625
5123
|
* jumpToPage: 5,
|
|
4626
5124
|
* pageSize: 10
|
|
4627
5125
|
* });
|
|
@@ -4637,7 +5135,7 @@ interface QueueServiceModel {
|
|
|
4637
5135
|
* @example
|
|
4638
5136
|
* ```typescript
|
|
4639
5137
|
* // Get queue by ID
|
|
4640
|
-
* const queue = await
|
|
5138
|
+
* const queue = await queues.getById(<queueId>, <folderId>);
|
|
4641
5139
|
* ```
|
|
4642
5140
|
*/
|
|
4643
5141
|
getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
|
|
@@ -4647,10 +5145,6 @@ interface QueueServiceModel {
|
|
|
4647
5145
|
* Service for interacting with UiPath Orchestrator Queues API
|
|
4648
5146
|
*/
|
|
4649
5147
|
declare class QueueService extends FolderScopedService implements QueueServiceModel {
|
|
4650
|
-
/**
|
|
4651
|
-
* @hideconstructor
|
|
4652
|
-
*/
|
|
4653
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4654
5148
|
/**
|
|
4655
5149
|
* Gets all queues across folders with optional filtering and folder scoping
|
|
4656
5150
|
*
|
|
@@ -4663,29 +5157,33 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4663
5157
|
*
|
|
4664
5158
|
* @example
|
|
4665
5159
|
* ```typescript
|
|
5160
|
+
* import { Queues } from '@uipath/uipath-typescript/queues';
|
|
5161
|
+
*
|
|
5162
|
+
* const queues = new Queues(sdk);
|
|
5163
|
+
*
|
|
4666
5164
|
* // Standard array return
|
|
4667
|
-
* const
|
|
5165
|
+
* const allQueues = await queues.getAll();
|
|
4668
5166
|
*
|
|
4669
5167
|
* // Get queues within a specific folder
|
|
4670
|
-
* const
|
|
5168
|
+
* const folderQueues = await queues.getAll({
|
|
4671
5169
|
* folderId: 123
|
|
4672
5170
|
* });
|
|
4673
5171
|
*
|
|
4674
5172
|
* // Get queues with filtering
|
|
4675
|
-
* const
|
|
5173
|
+
* const filteredQueues = await queues.getAll({
|
|
4676
5174
|
* filter: "name eq 'MyQueue'"
|
|
4677
5175
|
* });
|
|
4678
5176
|
*
|
|
4679
5177
|
* // First page with pagination
|
|
4680
|
-
* const page1 = await
|
|
5178
|
+
* const page1 = await queues.getAll({ pageSize: 10 });
|
|
4681
5179
|
*
|
|
4682
5180
|
* // Navigate using cursor
|
|
4683
5181
|
* if (page1.hasNextPage) {
|
|
4684
|
-
* const page2 = await
|
|
5182
|
+
* const page2 = await queues.getAll({ cursor: page1.nextCursor });
|
|
4685
5183
|
* }
|
|
4686
5184
|
*
|
|
4687
5185
|
* // Jump to specific page
|
|
4688
|
-
* const page5 = await
|
|
5186
|
+
* const page5 = await queues.getAll({
|
|
4689
5187
|
* jumpToPage: 5,
|
|
4690
5188
|
* pageSize: 10
|
|
4691
5189
|
* });
|
|
@@ -4701,8 +5199,12 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4701
5199
|
*
|
|
4702
5200
|
* @example
|
|
4703
5201
|
* ```typescript
|
|
5202
|
+
* import { Queues } from '@uipath/uipath-typescript/queues';
|
|
5203
|
+
*
|
|
5204
|
+
* const queues = new Queues(sdk);
|
|
5205
|
+
*
|
|
4704
5206
|
* // Get queue by ID
|
|
4705
|
-
* const queue = await
|
|
5207
|
+
* const queue = await queues.getById(123, 456);
|
|
4706
5208
|
* ```
|
|
4707
5209
|
*/
|
|
4708
5210
|
getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
|
|
@@ -4712,10 +5214,6 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4712
5214
|
* Service for interacting with UiPath Tasks API
|
|
4713
5215
|
*/
|
|
4714
5216
|
declare class TaskService extends BaseService implements TaskServiceModel {
|
|
4715
|
-
/**
|
|
4716
|
-
* @hideconstructor
|
|
4717
|
-
*/
|
|
4718
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4719
5217
|
/**
|
|
4720
5218
|
* Creates a new task
|
|
4721
5219
|
* @param task - The task to be created
|
|
@@ -4724,7 +5222,10 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4724
5222
|
*
|
|
4725
5223
|
* @example
|
|
4726
5224
|
* ```typescript
|
|
4727
|
-
*
|
|
5225
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5226
|
+
*
|
|
5227
|
+
* const tasks = new Tasks(sdk);
|
|
5228
|
+
* const task = await tasks.create({
|
|
4728
5229
|
* title: "My Task",
|
|
4729
5230
|
* priority: TaskPriority.Medium,
|
|
4730
5231
|
* data: { key: "value" }
|
|
@@ -4745,24 +5246,28 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4745
5246
|
*
|
|
4746
5247
|
* @example
|
|
4747
5248
|
* ```typescript
|
|
5249
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5250
|
+
*
|
|
5251
|
+
* const tasks = new Tasks(sdk);
|
|
5252
|
+
*
|
|
4748
5253
|
* // Standard array return
|
|
4749
|
-
* const users = await
|
|
5254
|
+
* const users = await tasks.getUsers(123);
|
|
4750
5255
|
*
|
|
4751
5256
|
* // Get users with filtering
|
|
4752
|
-
* const users = await
|
|
5257
|
+
* const users = await tasks.getUsers(123, {
|
|
4753
5258
|
* filter: "name eq 'abc'"
|
|
4754
5259
|
* });
|
|
4755
5260
|
*
|
|
4756
5261
|
* // First page with pagination
|
|
4757
|
-
* const page1 = await
|
|
5262
|
+
* const page1 = await tasks.getUsers(123, { pageSize: 10 });
|
|
4758
5263
|
*
|
|
4759
5264
|
* // Navigate using cursor
|
|
4760
5265
|
* if (page1.hasNextPage) {
|
|
4761
|
-
* const page2 = await
|
|
5266
|
+
* const page2 = await tasks.getUsers(123, { cursor: page1.nextCursor });
|
|
4762
5267
|
* }
|
|
4763
5268
|
*
|
|
4764
5269
|
* // Jump to specific page
|
|
4765
|
-
* const page5 = await
|
|
5270
|
+
* const page5 = await tasks.getUsers(123, {
|
|
4766
5271
|
* jumpToPage: 5,
|
|
4767
5272
|
* pageSize: 10
|
|
4768
5273
|
* });
|
|
@@ -4781,29 +5286,33 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4781
5286
|
*
|
|
4782
5287
|
* @example
|
|
4783
5288
|
* ```typescript
|
|
5289
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5290
|
+
*
|
|
5291
|
+
* const tasks = new Tasks(sdk);
|
|
5292
|
+
*
|
|
4784
5293
|
* // Standard array return
|
|
4785
|
-
* const
|
|
5294
|
+
* const allTasks = await tasks.getAll();
|
|
4786
5295
|
*
|
|
4787
5296
|
* // Get tasks within a specific folder
|
|
4788
|
-
* const
|
|
5297
|
+
* const folderTasks = await tasks.getAll({
|
|
4789
5298
|
* folderId: 123
|
|
4790
5299
|
* });
|
|
4791
5300
|
*
|
|
4792
5301
|
* // Get tasks with admin permissions
|
|
4793
|
-
* const
|
|
5302
|
+
* const adminTasks = await tasks.getAll({
|
|
4794
5303
|
* asTaskAdmin: true
|
|
4795
5304
|
* });
|
|
4796
5305
|
*
|
|
4797
5306
|
* // First page with pagination
|
|
4798
|
-
* const page1 = await
|
|
5307
|
+
* const page1 = await tasks.getAll({ pageSize: 10 });
|
|
4799
5308
|
*
|
|
4800
5309
|
* // Navigate using cursor
|
|
4801
5310
|
* if (page1.hasNextPage) {
|
|
4802
|
-
* const page2 = await
|
|
5311
|
+
* const page2 = await tasks.getAll({ cursor: page1.nextCursor });
|
|
4803
5312
|
* }
|
|
4804
5313
|
*
|
|
4805
5314
|
* // Jump to specific page
|
|
4806
|
-
* const page5 = await
|
|
5315
|
+
* const page5 = await tasks.getAll({
|
|
4807
5316
|
* jumpToPage: 5,
|
|
4808
5317
|
* pageSize: 10
|
|
4809
5318
|
* });
|
|
@@ -4821,8 +5330,12 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4821
5330
|
*
|
|
4822
5331
|
* @example
|
|
4823
5332
|
* ```typescript
|
|
5333
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5334
|
+
*
|
|
5335
|
+
* const tasks = new Tasks(sdk);
|
|
5336
|
+
*
|
|
4824
5337
|
* // Get task by ID
|
|
4825
|
-
* const task = await
|
|
5338
|
+
* const task = await tasks.getById(123);
|
|
4826
5339
|
*
|
|
4827
5340
|
* // If the task is a form task, it will automatically return form-specific data
|
|
4828
5341
|
* ```
|
|
@@ -4836,20 +5349,24 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4836
5349
|
*
|
|
4837
5350
|
* @example
|
|
4838
5351
|
* ```typescript
|
|
5352
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5353
|
+
*
|
|
5354
|
+
* const tasks = new Tasks(sdk);
|
|
5355
|
+
*
|
|
4839
5356
|
* // Assign a single task to a user by ID
|
|
4840
|
-
* const result = await
|
|
5357
|
+
* const result = await tasks.assign({
|
|
4841
5358
|
* taskId: 123,
|
|
4842
5359
|
* userId: 456
|
|
4843
5360
|
* });
|
|
4844
5361
|
*
|
|
4845
5362
|
* // Assign a single task to a user by email
|
|
4846
|
-
* const result = await
|
|
5363
|
+
* const result = await tasks.assign({
|
|
4847
5364
|
* taskId: 123,
|
|
4848
5365
|
* userNameOrEmail: "user@example.com"
|
|
4849
5366
|
* });
|
|
4850
5367
|
*
|
|
4851
5368
|
* // Assign multiple tasks
|
|
4852
|
-
* const result = await
|
|
5369
|
+
* const result = await tasks.assign([
|
|
4853
5370
|
* {
|
|
4854
5371
|
* taskId: 123,
|
|
4855
5372
|
* userId: 456
|
|
@@ -4870,20 +5387,24 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4870
5387
|
*
|
|
4871
5388
|
* @example
|
|
4872
5389
|
* ```typescript
|
|
5390
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5391
|
+
*
|
|
5392
|
+
* const tasks = new Tasks(sdk);
|
|
5393
|
+
*
|
|
4873
5394
|
* // Reassign a single task to a user by ID
|
|
4874
|
-
* const result = await
|
|
5395
|
+
* const result = await tasks.reassign({
|
|
4875
5396
|
* taskId: 123,
|
|
4876
5397
|
* userId: 456
|
|
4877
5398
|
* });
|
|
4878
5399
|
*
|
|
4879
5400
|
* // Reassign a single task to a user by email
|
|
4880
|
-
* const result = await
|
|
5401
|
+
* const result = await tasks.reassign({
|
|
4881
5402
|
* taskId: 123,
|
|
4882
5403
|
* userNameOrEmail: "user@example.com"
|
|
4883
5404
|
* });
|
|
4884
5405
|
*
|
|
4885
5406
|
* // Reassign multiple tasks
|
|
4886
|
-
* const result = await
|
|
5407
|
+
* const result = await tasks.reassign([
|
|
4887
5408
|
* {
|
|
4888
5409
|
* taskId: 123,
|
|
4889
5410
|
* userId: 456
|
|
@@ -4904,11 +5425,15 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4904
5425
|
*
|
|
4905
5426
|
* @example
|
|
4906
5427
|
* ```typescript
|
|
5428
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5429
|
+
*
|
|
5430
|
+
* const tasks = new Tasks(sdk);
|
|
5431
|
+
*
|
|
4907
5432
|
* // Unassign a single task
|
|
4908
|
-
* const result = await
|
|
5433
|
+
* const result = await tasks.unassign(123);
|
|
4909
5434
|
*
|
|
4910
5435
|
* // Unassign multiple tasks
|
|
4911
|
-
* const result = await
|
|
5436
|
+
* const result = await tasks.unassign([123, 456, 789]);
|
|
4912
5437
|
* ```
|
|
4913
5438
|
*/
|
|
4914
5439
|
unassign(taskIds: number | number[]): Promise<OperationResponse<{
|
|
@@ -4923,8 +5448,12 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4923
5448
|
*
|
|
4924
5449
|
* @example
|
|
4925
5450
|
* ```typescript
|
|
5451
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5452
|
+
*
|
|
5453
|
+
* const tasks = new Tasks(sdk);
|
|
5454
|
+
*
|
|
4926
5455
|
* // Complete an app task
|
|
4927
|
-
* await
|
|
5456
|
+
* await tasks.complete({
|
|
4928
5457
|
* type: TaskType.App,
|
|
4929
5458
|
* taskId: 456,
|
|
4930
5459
|
* data: {},
|
|
@@ -4932,7 +5461,7 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4932
5461
|
* }, 123); // folderId is required
|
|
4933
5462
|
*
|
|
4934
5463
|
* // Complete an external task
|
|
4935
|
-
* await
|
|
5464
|
+
* await tasks.complete({
|
|
4936
5465
|
* type: TaskType.External,
|
|
4937
5466
|
* taskId: 789
|
|
4938
5467
|
* }, 123); // folderId is required
|
|
@@ -4965,58 +5494,38 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4965
5494
|
private addDefaultExpand;
|
|
4966
5495
|
}
|
|
4967
5496
|
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
5497
|
+
/**
|
|
5498
|
+
* UiPath SDK - Legacy class providing all services through property getters.
|
|
5499
|
+
*
|
|
5500
|
+
* Extends core UiPath. For modular usage, import from specific service modules.
|
|
5501
|
+
*
|
|
5502
|
+
* @deprecated This class is provided for backward compatibility only.
|
|
5503
|
+
* Use the modular pattern with `@uipath/uipath-typescript/core` instead.
|
|
5504
|
+
*
|
|
5505
|
+
* @example
|
|
5506
|
+
* ```typescript
|
|
5507
|
+
* // Legacy pattern (deprecated)
|
|
5508
|
+
* import { UiPath } from '@uipath/uipath-typescript';
|
|
5509
|
+
*
|
|
5510
|
+
* const sdk = new UiPath(config);
|
|
5511
|
+
* await sdk.initialize();
|
|
5512
|
+
* const data = await sdk.entities.getAll();
|
|
5513
|
+
* ```
|
|
5514
|
+
*
|
|
5515
|
+
* @example
|
|
5516
|
+
* ```typescript
|
|
5517
|
+
* // New modular pattern (recommended)
|
|
5518
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
5519
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
5520
|
+
*
|
|
5521
|
+
* const sdk = new UiPath(config);
|
|
5522
|
+
* await sdk.initialize();
|
|
5523
|
+
* const entitiesService = new Entities(sdk);
|
|
5524
|
+
* const data = await entitiesService.getAll();
|
|
5525
|
+
* ```
|
|
5526
|
+
*/
|
|
5527
|
+
declare class UiPath extends UiPath$1 {
|
|
4992
5528
|
private readonly _services;
|
|
4993
|
-
constructor(config: UiPathSDKConfig);
|
|
4994
|
-
/**
|
|
4995
|
-
* Initialize the SDK based on the provided configuration.
|
|
4996
|
-
* This method handles both OAuth flow initiation and completion automatically.
|
|
4997
|
-
* For secret-based authentication, initialization is automatic.
|
|
4998
|
-
*/
|
|
4999
|
-
initialize(): Promise<void>;
|
|
5000
|
-
/**
|
|
5001
|
-
* Check if the SDK has been initialized
|
|
5002
|
-
*/
|
|
5003
|
-
isInitialized(): boolean;
|
|
5004
|
-
/**
|
|
5005
|
-
* Check if we're in an OAuth callback state
|
|
5006
|
-
*/
|
|
5007
|
-
isInOAuthCallback(): boolean;
|
|
5008
|
-
/**
|
|
5009
|
-
* Complete OAuth authentication flow (only call if isInOAuthCallback() is true)
|
|
5010
|
-
*/
|
|
5011
|
-
completeOAuth(): Promise<boolean>;
|
|
5012
|
-
/**
|
|
5013
|
-
* Check if the user is authenticated (has valid token)
|
|
5014
|
-
*/
|
|
5015
|
-
isAuthenticated(): boolean;
|
|
5016
|
-
/**
|
|
5017
|
-
* Get the current authentication token
|
|
5018
|
-
*/
|
|
5019
|
-
getToken(): string | undefined;
|
|
5020
5529
|
private getService;
|
|
5021
5530
|
/**
|
|
5022
5531
|
* Access to Maestro services
|
|
@@ -5357,7 +5866,7 @@ declare const telemetryClient: TelemetryClient;
|
|
|
5357
5866
|
* SDK Telemetry constants
|
|
5358
5867
|
*/
|
|
5359
5868
|
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";
|
|
5360
|
-
declare const SDK_VERSION = "1.0.0
|
|
5869
|
+
declare const SDK_VERSION = "1.0.0";
|
|
5361
5870
|
declare const VERSION = "Version";
|
|
5362
5871
|
declare const SERVICE = "Service";
|
|
5363
5872
|
declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -5373,4 +5882,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
|
|
|
5373
5882
|
declare const UNKNOWN = "";
|
|
5374
5883
|
|
|
5375
5884
|
export { APP_NAME, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, FieldDisplayType, HttpStatus, JobPriority, JobState, JobType, JoinType, MAX_PAGE_SIZE, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, UNKNOWN, UiPath, UiPathError, VERSION, ValidationError, createCaseInstanceWithMethods, createEntityWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, telemetryClient, track, trackEvent };
|
|
5376
|
-
export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityDeleteOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
|
|
5885
|
+
export type { ArgumentMetadata, AssetGetAllOptions, AssetGetByIdOptions, AssetGetResponse, AssetServiceModel, BaseConfig, BaseOptions, BlobItem, BodyOptions, BpmnXmlString, BucketGetAllOptions, BucketGetByIdOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, CaseAppConfig, CaseAppOverview, CaseGetAllResponse, CaseGetStageResponse, CaseInstanceExecutionHistoryResponse, CaseInstanceGetAllOptions, CaseInstanceGetAllWithPaginationOptions, CaseInstanceGetResponse, CaseInstanceMethods, CaseInstanceOperationOptions, CaseInstanceOperationResponse, CaseInstanceReopenOptions, CaseInstanceRun, CaseInstancesServiceModel, CasesServiceModel, ChoiceSetGetAllResponse, ChoiceSetGetByIdOptions, ChoiceSetGetResponse, ChoiceSetServiceModel, CollectionResponse, CustomKeyValuePair, ElementExecutionMetadata, ElementMetaData, ElementRunMetadata, EntityBatchInsertOptions, EntityBatchInsertResponse, EntityDeleteOptions, EntityDeleteRecordsOptions, EntityDeleteResponse, EntityDownloadAttachmentOptions, EntityGetAllRecordsOptions, EntityGetRecordByIdOptions, EntityGetRecordsByIdOptions, EntityGetResponse, EntityInsertOptions, EntityInsertRecordOptions, EntityInsertRecordsOptions, EntityInsertResponse, EntityMethods, EntityOperationOptions, EntityOperationResponse, EntityRecord, EntityServiceModel, EntityUpdateOptions, EntityUpdateRecordsOptions, EntityUpdateResponse, EscalationAction, EscalationRecipient, EscalationRule, EscalationTriggerMetadata, ExternalConnection, ExternalField, ExternalFieldMapping, ExternalObject, ExternalSourceFields, FailureRecord, Field, FieldDataType, FieldMetaData, FolderProperties, GlobalVariableMetaData, HasPaginationOptions, Headers, HttpMethod, JobAttachment, JobError, Machine, MaestroProcessGetAllResponse, MaestroProcessesServiceModel, NonPaginatedResponse, OAuthFields, OperationResponse, PaginatedResponse, PaginationCursor, PaginationMetadata, PaginationMethodUnion, PaginationOptions, ProcessGetAllOptions, ProcessGetByIdOptions, ProcessGetResponse, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessIncidentsServiceModel, ProcessInstanceExecutionHistoryResponse, ProcessInstanceGetAllOptions, ProcessInstanceGetAllWithPaginationOptions, ProcessInstanceGetResponse, ProcessInstanceGetVariablesOptions, ProcessInstanceGetVariablesResponse, ProcessInstanceMethods, ProcessInstanceOperationOptions, ProcessInstanceOperationResponse, ProcessInstanceRun, ProcessInstancesServiceModel, ProcessMethods, ProcessProperties, ProcessServiceModel, ProcessStartRequest, ProcessStartResponse, QueryParams, QueueGetAllOptions, QueueGetByIdOptions, QueueGetResponse, QueueServiceModel, RawCaseInstanceGetResponse, RawEntityGetResponse, RawMaestroProcessGetAllResponse, RawProcessInstanceGetResponse, RawTaskCreateResponse, RawTaskGetResponse, RequestOptions, RequestSpec, ResponseDictionary, ResponseType, RetryOptions, RobotMetadata, SourceJoinCriteria, StageSLA, StageTask, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, TimeoutOptions, UiPathSDKConfig, UserLoginInfo };
|