@uipath/uipath-typescript 1.0.0-beta.18 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -40
- package/dist/assets/index.cjs +2090 -0
- package/dist/assets/index.d.ts +513 -0
- package/dist/assets/index.mjs +2087 -0
- package/dist/buckets/index.cjs +2364 -0
- package/dist/buckets/index.d.ts +819 -0
- package/dist/buckets/index.mjs +2361 -0
- package/dist/cases/index.cjs +3493 -0
- package/dist/cases/index.d.ts +1397 -0
- package/dist/cases/index.mjs +3487 -0
- package/dist/core/index.cjs +5267 -0
- package/dist/core/index.d.ts +406 -0
- package/dist/core/index.mjs +5241 -0
- package/dist/entities/index.cjs +2749 -0
- package/dist/entities/index.d.ts +1513 -0
- package/dist/entities/index.mjs +2743 -0
- package/dist/index.cjs +3571 -3181
- package/dist/index.d.ts +964 -542
- package/dist/index.mjs +3571 -3181
- package/dist/index.umd.js +8561 -12013
- package/dist/maestro-processes/index.cjs +2609 -0
- package/dist/maestro-processes/index.d.ts +1127 -0
- package/dist/maestro-processes/index.mjs +2600 -0
- package/dist/processes/index.cjs +2233 -0
- package/dist/processes/index.d.ts +800 -0
- package/dist/processes/index.mjs +2230 -0
- package/dist/queues/index.cjs +2075 -0
- package/dist/queues/index.d.ts +504 -0
- package/dist/queues/index.mjs +2072 -0
- package/dist/tasks/index.cjs +2675 -0
- package/dist/tasks/index.d.ts +1122 -0
- package/dist/tasks/index.mjs +2671 -0
- package/package.json +100 -6
- package/dist/index.d.cts +0 -5463
- package/dist/index.d.mts +0 -5463
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));
|
|
2
19
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
}
|
|
60
|
+
|
|
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;
|
|
319
|
+
interface ApiResponse<T> {
|
|
320
|
+
data: T;
|
|
254
321
|
}
|
|
255
322
|
/**
|
|
256
|
-
*
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* - For OAuth tokens: Uses session storage with client ID-based keys
|
|
270
|
-
* - For Secret tokens: Stores only in memory, allowing multiple instances
|
|
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;
|
|
337
|
+
declare class BaseService {
|
|
338
|
+
#private;
|
|
327
339
|
/**
|
|
328
|
-
*
|
|
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
|
+
* ```
|
|
329
366
|
*/
|
|
330
|
-
|
|
367
|
+
constructor(instance: IUiPath);
|
|
331
368
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
* @returns
|
|
336
|
-
* @throws
|
|
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
|
|
337
374
|
*/
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Internal method to perform the actual token refresh
|
|
341
|
-
*/
|
|
342
|
-
private _doRefreshToken;
|
|
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
|
*/
|
|
@@ -458,26 +467,46 @@ interface EntityOperationOptions {
|
|
|
458
467
|
}
|
|
459
468
|
/**
|
|
460
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.
|
|
461
471
|
*/
|
|
462
472
|
interface EntityInsertOptions {
|
|
463
473
|
/** Level of entity expansion (default: 0) */
|
|
464
474
|
expansionLevel?: number;
|
|
465
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Options for inserting a single record into an entity
|
|
478
|
+
*/
|
|
479
|
+
type EntityInsertRecordOptions = EntityInsertOptions;
|
|
466
480
|
/**
|
|
467
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.
|
|
468
483
|
*/
|
|
469
484
|
type EntityBatchInsertOptions = EntityOperationOptions;
|
|
485
|
+
/**
|
|
486
|
+
* Options for inserting multiple records into an entity
|
|
487
|
+
*/
|
|
488
|
+
type EntityInsertRecordsOptions = EntityOperationOptions;
|
|
470
489
|
/**
|
|
471
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.
|
|
472
492
|
*/
|
|
473
493
|
type EntityUpdateOptions = EntityOperationOptions;
|
|
494
|
+
/**
|
|
495
|
+
* Options for updating data in an entity
|
|
496
|
+
*/
|
|
497
|
+
type EntityUpdateRecordsOptions = EntityOperationOptions;
|
|
474
498
|
/**
|
|
475
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.
|
|
476
501
|
*/
|
|
477
502
|
interface EntityDeleteOptions {
|
|
478
503
|
/** Whether to fail on first error (default: false) */
|
|
479
504
|
failOnFirst?: boolean;
|
|
480
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Options for deleting records in an entity
|
|
508
|
+
*/
|
|
509
|
+
type EntityDeleteRecordsOptions = EntityDeleteOptions;
|
|
481
510
|
/**
|
|
482
511
|
* Options for downloading an attachment from an entity record
|
|
483
512
|
*/
|
|
@@ -701,6 +730,16 @@ interface RawEntityGetResponse {
|
|
|
701
730
|
*
|
|
702
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)
|
|
703
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
|
+
* ```
|
|
704
743
|
*/
|
|
705
744
|
interface EntityServiceModel {
|
|
706
745
|
/**
|
|
@@ -711,27 +750,27 @@ interface EntityServiceModel {
|
|
|
711
750
|
* @example
|
|
712
751
|
* ```typescript
|
|
713
752
|
* // Get all entities
|
|
714
|
-
* const
|
|
753
|
+
* const allEntities = await entities.getAll();
|
|
715
754
|
*
|
|
716
755
|
* // Iterate through entities
|
|
717
|
-
*
|
|
756
|
+
* allEntities.forEach(entity => {
|
|
718
757
|
* console.log(`Entity: ${entity.displayName} (${entity.name})`);
|
|
719
758
|
* console.log(`Type: ${entity.entityType}`);
|
|
720
759
|
* });
|
|
721
760
|
*
|
|
722
761
|
* // Find a specific entity by name
|
|
723
|
-
* const customerEntity =
|
|
762
|
+
* const customerEntity = allEntities.find(e => e.name === 'Customer');
|
|
724
763
|
*
|
|
725
764
|
* // Use entity methods directly
|
|
726
765
|
* if (customerEntity) {
|
|
727
|
-
* const records = await customerEntity.
|
|
766
|
+
* const records = await customerEntity.getAllRecords();
|
|
728
767
|
* console.log(`Customer records: ${records.items.length}`);
|
|
729
768
|
*
|
|
730
769
|
* // Insert a single record
|
|
731
|
-
* const insertResult = await customerEntity.
|
|
770
|
+
* const insertResult = await customerEntity.insertRecord({ name: "John", age: 30 });
|
|
732
771
|
*
|
|
733
772
|
* // Or batch insert multiple records
|
|
734
|
-
* const batchResult = await customerEntity.
|
|
773
|
+
* const batchResult = await customerEntity.insertRecords([
|
|
735
774
|
* { name: "Jane", age: 25 },
|
|
736
775
|
* { name: "Bob", age: 35 }
|
|
737
776
|
* ]);
|
|
@@ -747,23 +786,28 @@ interface EntityServiceModel {
|
|
|
747
786
|
* {@link EntityGetResponse}
|
|
748
787
|
* @example
|
|
749
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
|
+
*
|
|
750
794
|
* // Get entity metadata with methods
|
|
751
|
-
* const entity = await
|
|
795
|
+
* const entity = await entities.getById(<entityId>);
|
|
752
796
|
*
|
|
753
797
|
* // Call operations directly on the entity
|
|
754
|
-
* const records = await entity.
|
|
798
|
+
* const records = await entity.getAllRecords();
|
|
755
799
|
*
|
|
756
800
|
* // If a field references a ChoiceSet, get the choiceSetId from records.fields
|
|
757
801
|
* const choiceSetId = records.fields[0].referenceChoiceSet?.id;
|
|
758
802
|
* if (choiceSetId) {
|
|
759
|
-
* const choiceSetValues = await
|
|
803
|
+
* const choiceSetValues = await choicesets.getById(choiceSetId);
|
|
760
804
|
* }
|
|
761
805
|
*
|
|
762
806
|
* // Insert a single record
|
|
763
|
-
* const insertResult = await entity.
|
|
807
|
+
* const insertResult = await entity.insertRecord({ name: "John", age: 30 });
|
|
764
808
|
*
|
|
765
809
|
* // Or batch insert multiple records
|
|
766
|
-
* const batchResult = await entity.
|
|
810
|
+
* const batchResult = await entity.insertRecords([
|
|
767
811
|
* { name: "Jane", age: 25 },
|
|
768
812
|
* { name: "Bob", age: 35 }
|
|
769
813
|
* ]);
|
|
@@ -780,31 +824,60 @@ interface EntityServiceModel {
|
|
|
780
824
|
* @example
|
|
781
825
|
* ```typescript
|
|
782
826
|
* // Basic usage (non-paginated)
|
|
783
|
-
* const records = await
|
|
827
|
+
* const records = await entities.getAllRecords(<entityId>);
|
|
784
828
|
*
|
|
785
829
|
* // With expansion level
|
|
786
|
-
* const records = await
|
|
830
|
+
* const records = await entities.getAllRecords(<entityId>, {
|
|
787
831
|
* expansionLevel: 1
|
|
788
832
|
* });
|
|
789
833
|
*
|
|
790
834
|
* // With pagination
|
|
791
|
-
* const paginatedResponse = await
|
|
835
|
+
* const paginatedResponse = await entities.getAllRecords(<entityId>, {
|
|
792
836
|
* pageSize: 50,
|
|
793
837
|
* expansionLevel: 1
|
|
794
838
|
* });
|
|
795
839
|
*
|
|
796
840
|
* // Navigate to next page
|
|
797
|
-
* const nextPage = await
|
|
841
|
+
* const nextPage = await entities.getAllRecords(<entityId>, {
|
|
798
842
|
* cursor: paginatedResponse.nextCursor,
|
|
799
843
|
* expansionLevel: 1
|
|
800
844
|
* });
|
|
801
845
|
* ```
|
|
802
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
|
+
*/
|
|
803
852
|
getRecordsById<T extends EntityGetRecordsByIdOptions = EntityGetRecordsByIdOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
853
|
+
/**
|
|
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>;
|
|
804
877
|
/**
|
|
805
878
|
* Inserts a single record into an entity by entity ID
|
|
806
879
|
*
|
|
807
|
-
* Note: Data Fabric supports trigger events only on individual inserts, not on
|
|
880
|
+
* Note: Data Fabric supports trigger events only on individual inserts, not on inserting multiple records.
|
|
808
881
|
* Use this method if you need trigger events to fire for the inserted record.
|
|
809
882
|
*
|
|
810
883
|
* @param id - UUID of the entity
|
|
@@ -815,19 +888,24 @@ interface EntityServiceModel {
|
|
|
815
888
|
* @example
|
|
816
889
|
* ```typescript
|
|
817
890
|
* // Basic usage
|
|
818
|
-
* const result = await
|
|
891
|
+
* const result = await entities.insertRecordById(<entityId>, { name: "John", age: 30 });
|
|
819
892
|
*
|
|
820
893
|
* // With options
|
|
821
|
-
* const result = await
|
|
894
|
+
* const result = await entities.insertRecordById(<entityId>, { name: "John", age: 30 }, {
|
|
822
895
|
* expansionLevel: 1
|
|
823
896
|
* });
|
|
824
897
|
* ```
|
|
825
898
|
*/
|
|
899
|
+
insertRecordById(id: string, data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
900
|
+
/**
|
|
901
|
+
* @deprecated Use {@link insertRecordById} instead.
|
|
902
|
+
* @hidden
|
|
903
|
+
*/
|
|
826
904
|
insertById(id: string, data: Record<string, any>, options?: EntityInsertOptions): Promise<EntityInsertResponse>;
|
|
827
905
|
/**
|
|
828
|
-
* Inserts one or more records into an entity by entity ID
|
|
906
|
+
* Inserts one or more records into an entity by entity ID
|
|
829
907
|
*
|
|
830
|
-
* Note:
|
|
908
|
+
* Note: Records inserted using insertRecordsById will not trigger Data Fabric trigger events. Use {@link insertRecordById} if you need
|
|
831
909
|
* trigger events to fire for each inserted record.
|
|
832
910
|
*
|
|
833
911
|
* @param id - UUID of the entity
|
|
@@ -838,13 +916,13 @@ interface EntityServiceModel {
|
|
|
838
916
|
* @example
|
|
839
917
|
* ```typescript
|
|
840
918
|
* // Basic usage
|
|
841
|
-
* const result = await
|
|
919
|
+
* const result = await entities.insertRecordsById(<entityId>, [
|
|
842
920
|
* { name: "John", age: 30 },
|
|
843
921
|
* { name: "Jane", age: 25 }
|
|
844
922
|
* ]);
|
|
845
923
|
*
|
|
846
924
|
* // With options
|
|
847
|
-
* const result = await
|
|
925
|
+
* const result = await entities.insertRecordsById(<entityId>, [
|
|
848
926
|
* { name: "John", age: 30 },
|
|
849
927
|
* { name: "Jane", age: 25 }
|
|
850
928
|
* ], {
|
|
@@ -853,6 +931,11 @@ interface EntityServiceModel {
|
|
|
853
931
|
* });
|
|
854
932
|
* ```
|
|
855
933
|
*/
|
|
934
|
+
insertRecordsById(id: string, data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
935
|
+
/**
|
|
936
|
+
* @deprecated Use {@link insertRecordsById} instead.
|
|
937
|
+
* @hidden
|
|
938
|
+
*/
|
|
856
939
|
batchInsertById(id: string, data: Record<string, any>[], options?: EntityBatchInsertOptions): Promise<EntityBatchInsertResponse>;
|
|
857
940
|
/**
|
|
858
941
|
* Updates data in an entity by entity ID
|
|
@@ -865,13 +948,13 @@ interface EntityServiceModel {
|
|
|
865
948
|
* @example
|
|
866
949
|
* ```typescript
|
|
867
950
|
* // Basic usage
|
|
868
|
-
* const result = await
|
|
951
|
+
* const result = await entities.updateRecordsById(<entityId>, [
|
|
869
952
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
870
953
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
871
954
|
* ]);
|
|
872
955
|
*
|
|
873
956
|
* // With options
|
|
874
|
-
* const result = await
|
|
957
|
+
* const result = await entities.updateRecordsById(<entityId>, [
|
|
875
958
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
876
959
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
877
960
|
* ], {
|
|
@@ -880,6 +963,11 @@ interface EntityServiceModel {
|
|
|
880
963
|
* });
|
|
881
964
|
* ```
|
|
882
965
|
*/
|
|
966
|
+
updateRecordsById(id: string, data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
967
|
+
/**
|
|
968
|
+
* @deprecated Use {@link updateRecordsById} instead.
|
|
969
|
+
* @hidden
|
|
970
|
+
*/
|
|
883
971
|
updateById(id: string, data: EntityRecord[], options?: EntityUpdateOptions): Promise<EntityUpdateResponse>;
|
|
884
972
|
/**
|
|
885
973
|
* Deletes data from an entity by entity ID
|
|
@@ -892,11 +980,16 @@ interface EntityServiceModel {
|
|
|
892
980
|
* @example
|
|
893
981
|
* ```typescript
|
|
894
982
|
* // Basic usage
|
|
895
|
-
* const result = await
|
|
983
|
+
* const result = await entities.deleteRecordsById(<entityId>, [
|
|
896
984
|
* <recordId-1>, <recordId-2>
|
|
897
985
|
* ]);
|
|
898
986
|
* ```
|
|
899
987
|
*/
|
|
988
|
+
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
989
|
+
/**
|
|
990
|
+
* @deprecated Use {@link deleteRecordsById} instead.
|
|
991
|
+
* @hidden
|
|
992
|
+
*/
|
|
900
993
|
deleteById(id: string, recordIds: string[], options?: EntityDeleteOptions): Promise<EntityDeleteResponse>;
|
|
901
994
|
/**
|
|
902
995
|
* Downloads an attachment stored in a File-type field of an entity record.
|
|
@@ -905,21 +998,25 @@ interface EntityServiceModel {
|
|
|
905
998
|
* @returns Promise resolving to Blob containing the file content
|
|
906
999
|
* @example
|
|
907
1000
|
* ```typescript
|
|
1001
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1002
|
+
*
|
|
1003
|
+
* const entities = new Entities(sdk);
|
|
1004
|
+
*
|
|
908
1005
|
* // First, get records to obtain the record ID
|
|
909
|
-
* const records = await
|
|
1006
|
+
* const records = await entities.getAllRecords("<entityId>");
|
|
910
1007
|
* // Get the recordId for the record that contains the attachment
|
|
911
1008
|
* const recordId = records.items[0].id;
|
|
912
1009
|
*
|
|
913
|
-
* // Download attachment using
|
|
914
|
-
* const response = await
|
|
1010
|
+
* // Download attachment using service method
|
|
1011
|
+
* const response = await entities.downloadAttachment({
|
|
915
1012
|
* entityName: 'Invoice',
|
|
916
1013
|
* recordId: recordId,
|
|
917
1014
|
* fieldName: 'Documents'
|
|
918
1015
|
* });
|
|
919
1016
|
*
|
|
920
1017
|
* // Or download using entity method
|
|
921
|
-
* const entity = await
|
|
922
|
-
* const
|
|
1018
|
+
* const entity = await entities.getById("<entityId>");
|
|
1019
|
+
* const blob = await entity.downloadAttachment(recordId, 'Documents');
|
|
923
1020
|
*
|
|
924
1021
|
* // Browser: Display Image
|
|
925
1022
|
* const url = URL.createObjectURL(response);
|
|
@@ -949,25 +1046,25 @@ interface EntityMethods {
|
|
|
949
1046
|
/**
|
|
950
1047
|
* Insert a single record into this entity
|
|
951
1048
|
*
|
|
952
|
-
* Note: Data Fabric supports trigger events only on individual inserts, not on
|
|
1049
|
+
* Note: Data Fabric supports trigger events only on individual inserts, not on inserting multiple records.
|
|
953
1050
|
* Use this method if you need trigger events to fire for the inserted record.
|
|
954
1051
|
*
|
|
955
1052
|
* @param data - Record to insert
|
|
956
1053
|
* @param options - Insert options
|
|
957
1054
|
* @returns Promise resolving to the inserted record with generated record ID
|
|
958
1055
|
*/
|
|
959
|
-
|
|
1056
|
+
insertRecord(data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
960
1057
|
/**
|
|
961
|
-
* Insert multiple records into this entity using
|
|
1058
|
+
* Insert multiple records into this entity using insertRecords
|
|
962
1059
|
*
|
|
963
|
-
* Note:
|
|
1060
|
+
* Note: Inserting multiple records do not trigger Data Fabric trigger events. Use {@link insertRecord} if you need
|
|
964
1061
|
* trigger events to fire for each inserted record.
|
|
965
1062
|
*
|
|
966
1063
|
* @param data - Array of records to insert
|
|
967
1064
|
* @param options - Insert options
|
|
968
1065
|
* @returns Promise resolving to batch insert response
|
|
969
1066
|
*/
|
|
970
|
-
|
|
1067
|
+
insertRecords(data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
971
1068
|
/**
|
|
972
1069
|
* Update data in this entity
|
|
973
1070
|
*
|
|
@@ -976,7 +1073,7 @@ interface EntityMethods {
|
|
|
976
1073
|
* @param options - Update options
|
|
977
1074
|
* @returns Promise resolving to update response
|
|
978
1075
|
*/
|
|
979
|
-
|
|
1076
|
+
updateRecords(data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
980
1077
|
/**
|
|
981
1078
|
* Delete data from this entity
|
|
982
1079
|
*
|
|
@@ -984,14 +1081,22 @@ interface EntityMethods {
|
|
|
984
1081
|
* @param options - Delete options
|
|
985
1082
|
* @returns Promise resolving to delete response
|
|
986
1083
|
*/
|
|
987
|
-
|
|
1084
|
+
deleteRecords(recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
988
1085
|
/**
|
|
989
|
-
* Get records from this entity
|
|
1086
|
+
* Get all records from this entity
|
|
990
1087
|
*
|
|
991
1088
|
* @param options - Query options
|
|
992
1089
|
* @returns Promise resolving to query response
|
|
993
1090
|
*/
|
|
994
|
-
|
|
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>;
|
|
995
1100
|
/**
|
|
996
1101
|
* Downloads an attachment stored in a File-type field of an entity record
|
|
997
1102
|
*
|
|
@@ -1000,6 +1105,31 @@ interface EntityMethods {
|
|
|
1000
1105
|
* @returns Promise resolving to Blob containing the file content
|
|
1001
1106
|
*/
|
|
1002
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>>;
|
|
1003
1133
|
}
|
|
1004
1134
|
/**
|
|
1005
1135
|
* Entity with methods combining metadata with operation methods
|
|
@@ -1018,10 +1148,6 @@ declare function createEntityWithMethods(entityData: RawEntityGetResponse, servi
|
|
|
1018
1148
|
* Service for interacting with the Data Fabric Entity API
|
|
1019
1149
|
*/
|
|
1020
1150
|
declare class EntityService extends BaseService implements EntityServiceModel {
|
|
1021
|
-
/**
|
|
1022
|
-
* @hideconstructor
|
|
1023
|
-
*/
|
|
1024
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
1025
1151
|
/**
|
|
1026
1152
|
* Gets entity metadata by entity ID with attached operation methods
|
|
1027
1153
|
*
|
|
@@ -1030,17 +1156,19 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1030
1156
|
*
|
|
1031
1157
|
* @example
|
|
1032
1158
|
* ```typescript
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1159
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1160
|
+
*
|
|
1161
|
+
* const entities = new Entities(sdk);
|
|
1162
|
+
* const entity = await entities.getById("<entityId>");
|
|
1035
1163
|
*
|
|
1036
1164
|
* // Call operations directly on the entity
|
|
1037
|
-
* const records = await entity.
|
|
1165
|
+
* const records = await entity.getAllRecords();
|
|
1038
1166
|
*
|
|
1039
1167
|
* // Insert a single record
|
|
1040
|
-
* const insertResult = await entity.
|
|
1168
|
+
* const insertResult = await entity.insertRecord({ name: "John", age: 30 });
|
|
1041
1169
|
*
|
|
1042
1170
|
* // Or batch insert multiple records
|
|
1043
|
-
* const batchResult = await entity.
|
|
1171
|
+
* const batchResult = await entity.insertRecords([
|
|
1044
1172
|
* { name: "Jane", age: 25 },
|
|
1045
1173
|
* { name: "Bob", age: 35 }
|
|
1046
1174
|
* ]);
|
|
@@ -1056,28 +1184,52 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1056
1184
|
*
|
|
1057
1185
|
* @example
|
|
1058
1186
|
* ```typescript
|
|
1187
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1188
|
+
*
|
|
1189
|
+
* const entities = new Entities(sdk);
|
|
1190
|
+
*
|
|
1059
1191
|
* // Basic usage (non-paginated)
|
|
1060
|
-
* const records = await
|
|
1192
|
+
* const records = await entities.getAllRecords("<entityId>");
|
|
1061
1193
|
*
|
|
1062
1194
|
* // With expansion level
|
|
1063
|
-
* const records = await
|
|
1195
|
+
* const records = await entities.getAllRecords("<entityId>", {
|
|
1064
1196
|
* expansionLevel: 1
|
|
1065
1197
|
* });
|
|
1066
1198
|
*
|
|
1067
1199
|
* // With pagination
|
|
1068
|
-
* const paginatedResponse = await
|
|
1200
|
+
* const paginatedResponse = await entities.getAllRecords("<entityId>", {
|
|
1069
1201
|
* pageSize: 50,
|
|
1070
1202
|
* expansionLevel: 1
|
|
1071
1203
|
* });
|
|
1072
1204
|
*
|
|
1073
1205
|
* // Navigate to next page
|
|
1074
|
-
* const nextPage = await
|
|
1206
|
+
* const nextPage = await entities.getAllRecords("<entityId>", {
|
|
1075
1207
|
* cursor: paginatedResponse.nextCursor,
|
|
1076
1208
|
* expansionLevel: 1
|
|
1077
1209
|
* });
|
|
1078
1210
|
* ```
|
|
1079
1211
|
*/
|
|
1080
|
-
|
|
1212
|
+
getAllRecords<T extends EntityGetAllRecordsOptions = EntityGetAllRecordsOptions>(entityId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<EntityRecord> : NonPaginatedResponse<EntityRecord>>;
|
|
1213
|
+
/**
|
|
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>;
|
|
1081
1233
|
/**
|
|
1082
1234
|
* Inserts a single record into an entity by entity ID
|
|
1083
1235
|
*
|
|
@@ -1088,16 +1240,20 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1088
1240
|
*
|
|
1089
1241
|
* @example
|
|
1090
1242
|
* ```typescript
|
|
1243
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1244
|
+
*
|
|
1245
|
+
* const entities = new Entities(sdk);
|
|
1246
|
+
*
|
|
1091
1247
|
* // Basic usage
|
|
1092
|
-
* const result = await
|
|
1248
|
+
* const result = await entities.insertRecordById("<entityId>", { name: "John", age: 30 });
|
|
1093
1249
|
*
|
|
1094
1250
|
* // With options
|
|
1095
|
-
* const result = await
|
|
1251
|
+
* const result = await entities.insertRecordById("<entityId>", { name: "John", age: 30 }, {
|
|
1096
1252
|
* expansionLevel: 1
|
|
1097
1253
|
* });
|
|
1098
1254
|
* ```
|
|
1099
1255
|
*/
|
|
1100
|
-
|
|
1256
|
+
insertRecordById(id: string, data: Record<string, any>, options?: EntityInsertRecordOptions): Promise<EntityInsertResponse>;
|
|
1101
1257
|
/**
|
|
1102
1258
|
* Inserts data into an entity by entity ID using batch insert
|
|
1103
1259
|
*
|
|
@@ -1108,14 +1264,18 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1108
1264
|
*
|
|
1109
1265
|
* @example
|
|
1110
1266
|
* ```typescript
|
|
1267
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1268
|
+
*
|
|
1269
|
+
* const entities = new Entities(sdk);
|
|
1270
|
+
*
|
|
1111
1271
|
* // Basic usage
|
|
1112
|
-
* const result = await
|
|
1272
|
+
* const result = await entities.insertRecordsById("<entityId>", [
|
|
1113
1273
|
* { name: "John", age: 30 },
|
|
1114
1274
|
* { name: "Jane", age: 25 }
|
|
1115
1275
|
* ]);
|
|
1116
1276
|
*
|
|
1117
1277
|
* // With options
|
|
1118
|
-
* const result = await
|
|
1278
|
+
* const result = await entities.insertRecordsById("<entityId>", [
|
|
1119
1279
|
* { name: "John", age: 30 },
|
|
1120
1280
|
* { name: "Jane", age: 25 }
|
|
1121
1281
|
* ], {
|
|
@@ -1124,7 +1284,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1124
1284
|
* });
|
|
1125
1285
|
* ```
|
|
1126
1286
|
*/
|
|
1127
|
-
|
|
1287
|
+
insertRecordsById(id: string, data: Record<string, any>[], options?: EntityInsertRecordsOptions): Promise<EntityBatchInsertResponse>;
|
|
1128
1288
|
/**
|
|
1129
1289
|
* Updates data in an entity by entity ID
|
|
1130
1290
|
*
|
|
@@ -1136,14 +1296,18 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1136
1296
|
*
|
|
1137
1297
|
* @example
|
|
1138
1298
|
* ```typescript
|
|
1299
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1300
|
+
*
|
|
1301
|
+
* const entities = new Entities(sdk);
|
|
1302
|
+
*
|
|
1139
1303
|
* // Basic usage
|
|
1140
|
-
* const result = await
|
|
1304
|
+
* const result = await entities.updateRecordsById("<entityId>", [
|
|
1141
1305
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
1142
1306
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
1143
1307
|
* ]);
|
|
1144
1308
|
*
|
|
1145
1309
|
* // With options
|
|
1146
|
-
* const result = await
|
|
1310
|
+
* const result = await entities.updateRecordsById("<entityId>", [
|
|
1147
1311
|
* { Id: "123", name: "John Updated", age: 31 },
|
|
1148
1312
|
* { Id: "456", name: "Jane Updated", age: 26 }
|
|
1149
1313
|
* ], {
|
|
@@ -1152,7 +1316,7 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1152
1316
|
* });
|
|
1153
1317
|
* ```
|
|
1154
1318
|
*/
|
|
1155
|
-
|
|
1319
|
+
updateRecordsById(id: string, data: EntityRecord[], options?: EntityUpdateRecordsOptions): Promise<EntityUpdateResponse>;
|
|
1156
1320
|
/**
|
|
1157
1321
|
* Deletes data from an entity by entity ID
|
|
1158
1322
|
*
|
|
@@ -1163,13 +1327,17 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1163
1327
|
*
|
|
1164
1328
|
* @example
|
|
1165
1329
|
* ```typescript
|
|
1330
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1331
|
+
*
|
|
1332
|
+
* const entities = new Entities(sdk);
|
|
1333
|
+
*
|
|
1166
1334
|
* // Basic usage
|
|
1167
|
-
* const result = await
|
|
1168
|
-
* <recordId-1
|
|
1335
|
+
* const result = await entities.deleteRecordsById("<entityId>", [
|
|
1336
|
+
* "<recordId-1>", "<recordId-2>"
|
|
1169
1337
|
* ]);
|
|
1170
1338
|
* ```
|
|
1171
1339
|
*/
|
|
1172
|
-
|
|
1340
|
+
deleteRecordsById(id: string, recordIds: string[], options?: EntityDeleteRecordsOptions): Promise<EntityDeleteResponse>;
|
|
1173
1341
|
/**
|
|
1174
1342
|
* Gets all entities in the system
|
|
1175
1343
|
*
|
|
@@ -1177,11 +1345,15 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1177
1345
|
*
|
|
1178
1346
|
* @example
|
|
1179
1347
|
* ```typescript
|
|
1348
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1349
|
+
*
|
|
1350
|
+
* const entities = new Entities(sdk);
|
|
1351
|
+
*
|
|
1180
1352
|
* // Get all entities
|
|
1181
|
-
* const
|
|
1353
|
+
* const allEntities = await entities.getAll();
|
|
1182
1354
|
*
|
|
1183
1355
|
* // Call operations on an entity
|
|
1184
|
-
* const records = await
|
|
1356
|
+
* const records = await allEntities[0].getAllRecords();
|
|
1185
1357
|
* ```
|
|
1186
1358
|
*/
|
|
1187
1359
|
getAll(): Promise<EntityGetResponse[]>;
|
|
@@ -1193,14 +1365,43 @@ declare class EntityService extends BaseService implements EntityServiceModel {
|
|
|
1193
1365
|
*
|
|
1194
1366
|
* @example
|
|
1195
1367
|
* ```typescript
|
|
1368
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
1369
|
+
*
|
|
1370
|
+
* const entities = new Entities(sdk);
|
|
1371
|
+
*
|
|
1196
1372
|
* // Download attachment for a specific record and field
|
|
1197
|
-
* const blob = await
|
|
1373
|
+
* const blob = await entities.downloadAttachment({
|
|
1198
1374
|
* entityName: 'Invoice',
|
|
1199
1375
|
* recordId: '<record-uuid>',
|
|
1200
1376
|
* fieldName: 'Documents'
|
|
1201
1377
|
* });
|
|
1202
1378
|
*/
|
|
1203
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>;
|
|
1204
1405
|
/**
|
|
1205
1406
|
* Orchestrates all field mapping transformations
|
|
1206
1407
|
*
|
|
@@ -1282,6 +1483,17 @@ type ChoiceSetGetByIdOptions = PaginationOptions;
|
|
|
1282
1483
|
* Service for managing UiPath Data Fabric Choice Sets
|
|
1283
1484
|
*
|
|
1284
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
|
+
* ```
|
|
1285
1497
|
*/
|
|
1286
1498
|
interface ChoiceSetServiceModel {
|
|
1287
1499
|
/**
|
|
@@ -1292,17 +1504,17 @@ interface ChoiceSetServiceModel {
|
|
|
1292
1504
|
* @example
|
|
1293
1505
|
* ```typescript
|
|
1294
1506
|
* // Get all choice sets
|
|
1295
|
-
* const
|
|
1507
|
+
* const allChoiceSets = await choicesets.getAll();
|
|
1296
1508
|
*
|
|
1297
1509
|
* // Iterate through choice sets
|
|
1298
|
-
*
|
|
1510
|
+
* allChoiceSets.forEach(choiceSet => {
|
|
1299
1511
|
* console.log(`ChoiceSet: ${choiceSet.displayName} (${choiceSet.name})`);
|
|
1300
1512
|
* console.log(`Description: ${choiceSet.description}`);
|
|
1301
1513
|
* console.log(`Created by: ${choiceSet.createdBy}`);
|
|
1302
1514
|
* });
|
|
1303
1515
|
*
|
|
1304
1516
|
* // Find a specific choice set by name
|
|
1305
|
-
* const expenseTypes =
|
|
1517
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1306
1518
|
*
|
|
1307
1519
|
* // Check choice set details
|
|
1308
1520
|
* if (expenseTypes) {
|
|
@@ -1326,12 +1538,12 @@ interface ChoiceSetServiceModel {
|
|
|
1326
1538
|
* @example
|
|
1327
1539
|
* ```typescript
|
|
1328
1540
|
* // First, get the choice set ID using getAll()
|
|
1329
|
-
* const
|
|
1330
|
-
* const expenseTypes =
|
|
1541
|
+
* const allChoiceSets = await choicesets.getAll();
|
|
1542
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1331
1543
|
* const choiceSetId = expenseTypes.id;
|
|
1332
1544
|
*
|
|
1333
1545
|
* // Get all values (non-paginated)
|
|
1334
|
-
* const values = await
|
|
1546
|
+
* const values = await choicesets.getById(choiceSetId);
|
|
1335
1547
|
*
|
|
1336
1548
|
* // Iterate through choice set values
|
|
1337
1549
|
* for (const value of values.items) {
|
|
@@ -1339,11 +1551,11 @@ interface ChoiceSetServiceModel {
|
|
|
1339
1551
|
* }
|
|
1340
1552
|
*
|
|
1341
1553
|
* // First page with pagination
|
|
1342
|
-
* const page1 = await
|
|
1554
|
+
* const page1 = await choicesets.getById(choiceSetId, { pageSize: 10 });
|
|
1343
1555
|
*
|
|
1344
1556
|
* // Navigate using cursor
|
|
1345
1557
|
* if (page1.hasNextPage) {
|
|
1346
|
-
* const page2 = await
|
|
1558
|
+
* const page2 = await choicesets.getById(choiceSetId, { cursor: page1.nextCursor });
|
|
1347
1559
|
* }
|
|
1348
1560
|
* ```
|
|
1349
1561
|
*/
|
|
@@ -1351,10 +1563,6 @@ interface ChoiceSetServiceModel {
|
|
|
1351
1563
|
}
|
|
1352
1564
|
|
|
1353
1565
|
declare class ChoiceSetService extends BaseService implements ChoiceSetServiceModel {
|
|
1354
|
-
/**
|
|
1355
|
-
* @hideconstructor
|
|
1356
|
-
*/
|
|
1357
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
1358
1566
|
/**
|
|
1359
1567
|
* Gets all choice sets in the system
|
|
1360
1568
|
*
|
|
@@ -1362,11 +1570,15 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1362
1570
|
*
|
|
1363
1571
|
* @example
|
|
1364
1572
|
* ```typescript
|
|
1573
|
+
* import { ChoiceSets } from '@uipath/uipath-typescript/entities';
|
|
1574
|
+
*
|
|
1575
|
+
* const choiceSets = new ChoiceSets(sdk);
|
|
1576
|
+
*
|
|
1365
1577
|
* // Get all choice sets
|
|
1366
|
-
* const
|
|
1578
|
+
* const allChoiceSets = await choiceSets.getAll();
|
|
1367
1579
|
*
|
|
1368
1580
|
* // Iterate through choice sets
|
|
1369
|
-
*
|
|
1581
|
+
* allChoiceSets.forEach(choiceSet => {
|
|
1370
1582
|
* console.log(`ChoiceSet: ${choiceSet.displayName} (${choiceSet.name})`);
|
|
1371
1583
|
* console.log(`Description: ${choiceSet.description}`);
|
|
1372
1584
|
* });
|
|
@@ -1386,13 +1598,17 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1386
1598
|
*
|
|
1387
1599
|
* @example
|
|
1388
1600
|
* ```typescript
|
|
1601
|
+
* import { ChoiceSets } from '@uipath/uipath-typescript/choicesets';
|
|
1602
|
+
*
|
|
1603
|
+
* const choiceSets = new ChoiceSets(sdk);
|
|
1604
|
+
*
|
|
1389
1605
|
* // First, get the choice set ID using getAll()
|
|
1390
|
-
* const
|
|
1391
|
-
* const expenseTypes =
|
|
1606
|
+
* const allChoiceSets = await choiceSets.getAll();
|
|
1607
|
+
* const expenseTypes = allChoiceSets.find(cs => cs.name === 'ExpenseTypes');
|
|
1392
1608
|
* const choiceSetId = expenseTypes.id;
|
|
1393
1609
|
*
|
|
1394
1610
|
* // Get all values (non-paginated)
|
|
1395
|
-
* const values = await
|
|
1611
|
+
* const values = await choiceSets.getById(choiceSetId);
|
|
1396
1612
|
*
|
|
1397
1613
|
* // Iterate through choice set values
|
|
1398
1614
|
* for (const value of values.items) {
|
|
@@ -1400,11 +1616,11 @@ declare class ChoiceSetService extends BaseService implements ChoiceSetServiceMo
|
|
|
1400
1616
|
* }
|
|
1401
1617
|
*
|
|
1402
1618
|
* // First page with pagination
|
|
1403
|
-
* const page1 = await
|
|
1619
|
+
* const page1 = await choiceSets.getById(choiceSetId, { pageSize: 10 });
|
|
1404
1620
|
*
|
|
1405
1621
|
* // Navigate using cursor
|
|
1406
1622
|
* if (page1.hasNextPage) {
|
|
1407
|
-
* const page2 = await
|
|
1623
|
+
* const page2 = await choiceSets.getById(choiceSetId, { cursor: page1.nextCursor });
|
|
1408
1624
|
* }
|
|
1409
1625
|
* ```
|
|
1410
1626
|
*/
|
|
@@ -1526,6 +1742,17 @@ interface ProcessIncidentGetAllResponse {
|
|
|
1526
1742
|
* Service for managing UiPath Maestro Processes
|
|
1527
1743
|
*
|
|
1528
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
|
+
* ```
|
|
1529
1756
|
*/
|
|
1530
1757
|
interface MaestroProcessesServiceModel {
|
|
1531
1758
|
/**
|
|
@@ -1534,10 +1761,10 @@ interface MaestroProcessesServiceModel {
|
|
|
1534
1761
|
* @example
|
|
1535
1762
|
* ```typescript
|
|
1536
1763
|
* // Get all processes
|
|
1537
|
-
* const
|
|
1764
|
+
* const allProcesses = await maestroProcesses.getAll();
|
|
1538
1765
|
*
|
|
1539
1766
|
* // Access process information and incidents
|
|
1540
|
-
* for (const process of
|
|
1767
|
+
* for (const process of allProcesses) {
|
|
1541
1768
|
* console.log(`Process: ${process.processKey}`);
|
|
1542
1769
|
* console.log(`Running instances: ${process.runningCount}`);
|
|
1543
1770
|
* console.log(`Faulted instances: ${process.faultedCount}`);
|
|
@@ -1546,7 +1773,6 @@ interface MaestroProcessesServiceModel {
|
|
|
1546
1773
|
* const incidents = await process.getIncidents();
|
|
1547
1774
|
* console.log(`Incidents: ${incidents.length}`);
|
|
1548
1775
|
* }
|
|
1549
|
-
*
|
|
1550
1776
|
* ```
|
|
1551
1777
|
*/
|
|
1552
1778
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
@@ -1560,7 +1786,7 @@ interface MaestroProcessesServiceModel {
|
|
|
1560
1786
|
* @example
|
|
1561
1787
|
* ```typescript
|
|
1562
1788
|
* // Get incidents for a specific process
|
|
1563
|
-
* const incidents = await
|
|
1789
|
+
* const incidents = await maestroProcesses.getIncidents('<processKey>', '<folderKey>');
|
|
1564
1790
|
*
|
|
1565
1791
|
* // Access incident details
|
|
1566
1792
|
* for (const incident of incidents) {
|
|
@@ -1775,6 +2001,17 @@ interface RequestOptions extends BaseOptions {
|
|
|
1775
2001
|
* Service for managing UiPath Maestro Process instances
|
|
1776
2002
|
*
|
|
1777
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
|
+
* ```
|
|
1778
2015
|
*/
|
|
1779
2016
|
interface ProcessInstancesServiceModel {
|
|
1780
2017
|
/**
|
|
@@ -1790,7 +2027,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1790
2027
|
* @example
|
|
1791
2028
|
* ```typescript
|
|
1792
2029
|
* // Get all instances (non-paginated)
|
|
1793
|
-
* const instances = await
|
|
2030
|
+
* const instances = await processInstances.getAll();
|
|
1794
2031
|
*
|
|
1795
2032
|
* // Cancel faulted instances using methods directly on instances
|
|
1796
2033
|
* for (const instance of instances.items) {
|
|
@@ -1800,16 +2037,16 @@ interface ProcessInstancesServiceModel {
|
|
|
1800
2037
|
* }
|
|
1801
2038
|
*
|
|
1802
2039
|
* // With filtering
|
|
1803
|
-
* const
|
|
2040
|
+
* const filteredInstances = await processInstances.getAll({
|
|
1804
2041
|
* processKey: 'MyProcess'
|
|
1805
2042
|
* });
|
|
1806
2043
|
*
|
|
1807
2044
|
* // First page with pagination
|
|
1808
|
-
* const page1 = await
|
|
2045
|
+
* const page1 = await processInstances.getAll({ pageSize: 10 });
|
|
1809
2046
|
*
|
|
1810
2047
|
* // Navigate using cursor
|
|
1811
2048
|
* if (page1.hasNextPage) {
|
|
1812
|
-
* const page2 = await
|
|
2049
|
+
* const page2 = await processInstances.getAll({ cursor: page1.nextCursor });
|
|
1813
2050
|
* }
|
|
1814
2051
|
* ```
|
|
1815
2052
|
*/
|
|
@@ -1823,14 +2060,13 @@ interface ProcessInstancesServiceModel {
|
|
|
1823
2060
|
* @example
|
|
1824
2061
|
* ```typescript
|
|
1825
2062
|
* // Get a specific process instance
|
|
1826
|
-
* const instance = await
|
|
2063
|
+
* const instance = await processInstances.getById(
|
|
1827
2064
|
* <instanceId>,
|
|
1828
2065
|
* <folderKey>
|
|
1829
2066
|
* );
|
|
1830
2067
|
*
|
|
1831
2068
|
* // Access instance properties
|
|
1832
2069
|
* console.log(`Status: ${instance.latestRunStatus}`);
|
|
1833
|
-
*
|
|
1834
2070
|
* ```
|
|
1835
2071
|
*/
|
|
1836
2072
|
getById(id: string, folderKey: string): Promise<ProcessInstanceGetResponse>;
|
|
@@ -1842,7 +2078,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1842
2078
|
* @example
|
|
1843
2079
|
* ```typescript
|
|
1844
2080
|
* // Get execution history for a process instance
|
|
1845
|
-
* const history = await
|
|
2081
|
+
* const history = await processInstances.getExecutionHistory(
|
|
1846
2082
|
* <instanceId>
|
|
1847
2083
|
* );
|
|
1848
2084
|
*
|
|
@@ -1852,7 +2088,6 @@ interface ProcessInstancesServiceModel {
|
|
|
1852
2088
|
* console.log(`Start: ${span.startTime}`);
|
|
1853
2089
|
* console.log(`Duration: ${span.duration}ms`);
|
|
1854
2090
|
* });
|
|
1855
|
-
*
|
|
1856
2091
|
* ```
|
|
1857
2092
|
*/
|
|
1858
2093
|
getExecutionHistory(instanceId: string): Promise<ProcessInstanceExecutionHistoryResponse[]>;
|
|
@@ -1865,7 +2100,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1865
2100
|
* @example
|
|
1866
2101
|
* ```typescript
|
|
1867
2102
|
* // Get BPMN XML for a process instance
|
|
1868
|
-
* const bpmnXml = await
|
|
2103
|
+
* const bpmnXml = await processInstances.getBpmn(
|
|
1869
2104
|
* <instanceId>,
|
|
1870
2105
|
* <folderKey>
|
|
1871
2106
|
* );
|
|
@@ -1893,14 +2128,13 @@ interface ProcessInstancesServiceModel {
|
|
|
1893
2128
|
* @example
|
|
1894
2129
|
* ```typescript
|
|
1895
2130
|
* // Cancel a process instance
|
|
1896
|
-
* const result = await
|
|
2131
|
+
* const result = await processInstances.cancel(
|
|
1897
2132
|
* <instanceId>,
|
|
1898
2133
|
* <folderKey>
|
|
1899
2134
|
* );
|
|
1900
2135
|
*
|
|
1901
|
-
*
|
|
1902
|
-
*
|
|
1903
|
-
* const instance = await sdk.maestro.processes.instances.getById(
|
|
2136
|
+
* // Or using instance method
|
|
2137
|
+
* const instance = await processInstances.getById(
|
|
1904
2138
|
* <instanceId>,
|
|
1905
2139
|
* <folderKey>
|
|
1906
2140
|
* );
|
|
@@ -1909,12 +2143,12 @@ interface ProcessInstancesServiceModel {
|
|
|
1909
2143
|
* console.log(`Cancelled: ${result.success}`);
|
|
1910
2144
|
*
|
|
1911
2145
|
* // Cancel with a comment
|
|
1912
|
-
* const
|
|
2146
|
+
* const resultWithComment = await instance.cancel({
|
|
1913
2147
|
* comment: 'Cancelling due to invalid input data'
|
|
1914
2148
|
* });
|
|
1915
2149
|
*
|
|
1916
|
-
* if (
|
|
1917
|
-
* console.log(`Instance ${
|
|
2150
|
+
* if (resultWithComment.success) {
|
|
2151
|
+
* console.log(`Instance ${resultWithComment.data.instanceId} status: ${resultWithComment.data.status}`);
|
|
1918
2152
|
* }
|
|
1919
2153
|
* ```
|
|
1920
2154
|
*/
|
|
@@ -1946,7 +2180,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1946
2180
|
* @example
|
|
1947
2181
|
* ```typescript
|
|
1948
2182
|
* // Get all variables for a process instance
|
|
1949
|
-
* const variables = await
|
|
2183
|
+
* const variables = await processInstances.getVariables(
|
|
1950
2184
|
* <instanceId>,
|
|
1951
2185
|
* <folderKey>
|
|
1952
2186
|
* );
|
|
@@ -1963,7 +2197,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1963
2197
|
* });
|
|
1964
2198
|
*
|
|
1965
2199
|
* // Get variables for a specific parent element
|
|
1966
|
-
* const
|
|
2200
|
+
* const elementVariables = await processInstances.getVariables(
|
|
1967
2201
|
* <instanceId>,
|
|
1968
2202
|
* <folderKey>,
|
|
1969
2203
|
* { parentElementId: <parentElementId> }
|
|
@@ -1981,7 +2215,7 @@ interface ProcessInstancesServiceModel {
|
|
|
1981
2215
|
* @example
|
|
1982
2216
|
* ```typescript
|
|
1983
2217
|
* // Get incidents for a specific instance
|
|
1984
|
-
* const incidents = await
|
|
2218
|
+
* const incidents = await processInstances.getIncidents('<instanceId>', '<folderKey>');
|
|
1985
2219
|
*
|
|
1986
2220
|
* // Access process incident details
|
|
1987
2221
|
* for (const incident of incidents) {
|
|
@@ -2064,8 +2298,12 @@ interface ProcessIncidentsServiceModel {
|
|
|
2064
2298
|
* {@link ProcessIncidentGetAllResponse}
|
|
2065
2299
|
* @example
|
|
2066
2300
|
* ```typescript
|
|
2301
|
+
* import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
|
|
2302
|
+
*
|
|
2303
|
+
* const processIncidents = new ProcessIncidents(sdk);
|
|
2304
|
+
*
|
|
2067
2305
|
* // Get all process incidents across all folders
|
|
2068
|
-
* const incidents = await
|
|
2306
|
+
* const incidents = await processIncidents.getAll();
|
|
2069
2307
|
*
|
|
2070
2308
|
* // Access process incident information
|
|
2071
2309
|
* for (const incident of incidents) {
|
|
@@ -2132,6 +2370,17 @@ interface CaseGetAllResponse {
|
|
|
2132
2370
|
* Service for managing UiPath Maestro Cases
|
|
2133
2371
|
*
|
|
2134
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
|
+
* ```
|
|
2135
2384
|
*/
|
|
2136
2385
|
interface CasesServiceModel {
|
|
2137
2386
|
/**
|
|
@@ -2140,15 +2389,14 @@ interface CasesServiceModel {
|
|
|
2140
2389
|
* @example
|
|
2141
2390
|
* ```typescript
|
|
2142
2391
|
* // Get all case management processes
|
|
2143
|
-
* const
|
|
2392
|
+
* const allCases = await cases.getAll();
|
|
2144
2393
|
*
|
|
2145
2394
|
* // Access case information
|
|
2146
|
-
* for (const caseProcess of
|
|
2395
|
+
* for (const caseProcess of allCases) {
|
|
2147
2396
|
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
2148
2397
|
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
2149
2398
|
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
2150
2399
|
* }
|
|
2151
|
-
*
|
|
2152
2400
|
* ```
|
|
2153
2401
|
*/
|
|
2154
2402
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
@@ -2218,6 +2466,15 @@ interface CaseInstanceOperationResponse {
|
|
|
2218
2466
|
instanceId: string;
|
|
2219
2467
|
status: string;
|
|
2220
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
|
+
}
|
|
2221
2478
|
/**
|
|
2222
2479
|
* Case App Configuration Overview
|
|
2223
2480
|
*/
|
|
@@ -2613,7 +2870,17 @@ type TaskGetUsersOptions = RequestOptions & PaginationOptions;
|
|
|
2613
2870
|
*
|
|
2614
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)
|
|
2615
2872
|
*
|
|
2616
|
-
|
|
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
|
+
*/
|
|
2617
2884
|
interface TaskServiceModel {
|
|
2618
2885
|
/**
|
|
2619
2886
|
* Gets all tasks across folders with optional filtering
|
|
@@ -2624,35 +2891,35 @@ interface TaskServiceModel {
|
|
|
2624
2891
|
* @example
|
|
2625
2892
|
* ```typescript
|
|
2626
2893
|
* // Standard array return
|
|
2627
|
-
* const
|
|
2894
|
+
* const allTasks = await tasks.getAll();
|
|
2628
2895
|
*
|
|
2629
2896
|
* // Get tasks within a specific folder
|
|
2630
|
-
* const
|
|
2897
|
+
* const folderTasks = await tasks.getAll({
|
|
2631
2898
|
* folderId: 123
|
|
2632
2899
|
* });
|
|
2633
2900
|
*
|
|
2634
2901
|
* // Get tasks with admin permissions
|
|
2635
2902
|
* // This fetches tasks across folders where the user has Task.View, Task.Edit and TaskAssignment.Create permissions
|
|
2636
|
-
* const
|
|
2903
|
+
* const adminTasks = await tasks.getAll({
|
|
2637
2904
|
* asTaskAdmin: true
|
|
2638
2905
|
* });
|
|
2639
2906
|
*
|
|
2640
2907
|
* // Get tasks without admin permissions (default)
|
|
2641
2908
|
* // This fetches tasks across folders where the user has Task.View and Task.Edit permissions
|
|
2642
|
-
* const
|
|
2909
|
+
* const userTasks = await tasks.getAll({
|
|
2643
2910
|
* asTaskAdmin: false
|
|
2644
2911
|
* });
|
|
2645
2912
|
*
|
|
2646
2913
|
* // First page with pagination
|
|
2647
|
-
* const page1 = await
|
|
2914
|
+
* const page1 = await tasks.getAll({ pageSize: 10 });
|
|
2648
2915
|
*
|
|
2649
2916
|
* // Navigate using cursor
|
|
2650
2917
|
* if (page1.hasNextPage) {
|
|
2651
|
-
* const page2 = await
|
|
2918
|
+
* const page2 = await tasks.getAll({ cursor: page1.nextCursor });
|
|
2652
2919
|
* }
|
|
2653
2920
|
*
|
|
2654
2921
|
* // Jump to specific page
|
|
2655
|
-
* const page5 = await
|
|
2922
|
+
* const page5 = await tasks.getAll({
|
|
2656
2923
|
* jumpToPage: 5,
|
|
2657
2924
|
* pageSize: 10
|
|
2658
2925
|
* });
|
|
@@ -2670,10 +2937,10 @@ interface TaskServiceModel {
|
|
|
2670
2937
|
* @example
|
|
2671
2938
|
* ```typescript
|
|
2672
2939
|
* // Get a task by ID
|
|
2673
|
-
* const task = await
|
|
2940
|
+
* const task = await tasks.getById(<taskId>);
|
|
2674
2941
|
*
|
|
2675
2942
|
* // Get a form task by ID
|
|
2676
|
-
* const formTask = await
|
|
2943
|
+
* const formTask = await tasks.getById(<taskId>, <folderId>);
|
|
2677
2944
|
*
|
|
2678
2945
|
* // Access form task properties
|
|
2679
2946
|
* console.log(formTask.formLayout);
|
|
@@ -2690,7 +2957,7 @@ interface TaskServiceModel {
|
|
|
2690
2957
|
* @example
|
|
2691
2958
|
* ```typescript
|
|
2692
2959
|
* import { TaskPriority } from '@uipath/uipath-typescript';
|
|
2693
|
-
* const task = await
|
|
2960
|
+
* const task = await tasks.create({
|
|
2694
2961
|
* title: "My Task",
|
|
2695
2962
|
* priority: TaskPriority.Medium
|
|
2696
2963
|
* }, <folderId>); // folderId is required
|
|
@@ -2706,26 +2973,25 @@ interface TaskServiceModel {
|
|
|
2706
2973
|
* @example
|
|
2707
2974
|
* ```typescript
|
|
2708
2975
|
* // Assign a single task to a user by ID
|
|
2709
|
-
* const result = await
|
|
2976
|
+
* const result = await tasks.assign({
|
|
2710
2977
|
* taskId: <taskId>,
|
|
2711
2978
|
* userId: <userId>
|
|
2712
2979
|
* });
|
|
2713
2980
|
*
|
|
2714
|
-
*
|
|
2715
|
-
*
|
|
2716
|
-
* const task = await sdk.tasks.getById(<taskId>);
|
|
2981
|
+
* // Or using instance method
|
|
2982
|
+
* const task = await tasks.getById(<taskId>);
|
|
2717
2983
|
* const result = await task.assign({
|
|
2718
2984
|
* userId: <userId>
|
|
2719
2985
|
* });
|
|
2720
2986
|
*
|
|
2721
2987
|
* // Assign a single task to a user by email
|
|
2722
|
-
* const result = await
|
|
2988
|
+
* const result = await tasks.assign({
|
|
2723
2989
|
* taskId: <taskId>,
|
|
2724
2990
|
* userNameOrEmail: "user@example.com"
|
|
2725
2991
|
* });
|
|
2726
2992
|
*
|
|
2727
2993
|
* // Assign multiple tasks
|
|
2728
|
-
* const result = await
|
|
2994
|
+
* const result = await tasks.assign([
|
|
2729
2995
|
* { taskId: <taskId1>, userId: <userId> },
|
|
2730
2996
|
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2731
2997
|
* ]);
|
|
@@ -2741,26 +3007,25 @@ interface TaskServiceModel {
|
|
|
2741
3007
|
* @example
|
|
2742
3008
|
* ```typescript
|
|
2743
3009
|
* // Reassign a single task to a user by ID
|
|
2744
|
-
* const result = await
|
|
3010
|
+
* const result = await tasks.reassign({
|
|
2745
3011
|
* taskId: <taskId>,
|
|
2746
3012
|
* userId: <userId>
|
|
2747
3013
|
* });
|
|
2748
3014
|
*
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2751
|
-
* const task = await sdk.tasks.getById(<taskId>);
|
|
3015
|
+
* // Or using instance method
|
|
3016
|
+
* const task = await tasks.getById(<taskId>);
|
|
2752
3017
|
* const result = await task.reassign({
|
|
2753
3018
|
* userId: <userId>
|
|
2754
3019
|
* });
|
|
2755
3020
|
*
|
|
2756
3021
|
* // Reassign a single task to a user by email
|
|
2757
|
-
* const result = await
|
|
3022
|
+
* const result = await tasks.reassign({
|
|
2758
3023
|
* taskId: <taskId>,
|
|
2759
3024
|
* userNameOrEmail: "user@example.com"
|
|
2760
3025
|
* });
|
|
2761
3026
|
*
|
|
2762
3027
|
* // Reassign multiple tasks
|
|
2763
|
-
* const result = await
|
|
3028
|
+
* const result = await tasks.reassign([
|
|
2764
3029
|
* { taskId: <taskId1>, userId: <userId> },
|
|
2765
3030
|
* { taskId: <taskId2>, userNameOrEmail: "user@example.com" }
|
|
2766
3031
|
* ]);
|
|
@@ -2776,15 +3041,14 @@ interface TaskServiceModel {
|
|
|
2776
3041
|
* @example
|
|
2777
3042
|
* ```typescript
|
|
2778
3043
|
* // Unassign a single task
|
|
2779
|
-
* const result = await
|
|
2780
|
-
*
|
|
2781
|
-
* or
|
|
3044
|
+
* const result = await tasks.unassign(<taskId>);
|
|
2782
3045
|
*
|
|
2783
|
-
*
|
|
3046
|
+
* // Or using instance method
|
|
3047
|
+
* const task = await tasks.getById(<taskId>);
|
|
2784
3048
|
* const result = await task.unassign();
|
|
2785
3049
|
*
|
|
2786
3050
|
* // Unassign multiple tasks
|
|
2787
|
-
* const result = await
|
|
3051
|
+
* const result = await tasks.unassign([<taskId1>, <taskId2>, <taskId3>]);
|
|
2788
3052
|
* ```
|
|
2789
3053
|
*/
|
|
2790
3054
|
unassign(taskId: number | number[]): Promise<OperationResponse<{
|
|
@@ -2800,7 +3064,7 @@ interface TaskServiceModel {
|
|
|
2800
3064
|
* @example
|
|
2801
3065
|
* ```typescript
|
|
2802
3066
|
* // Complete an app task
|
|
2803
|
-
* await
|
|
3067
|
+
* await tasks.complete({
|
|
2804
3068
|
* type: TaskType.App,
|
|
2805
3069
|
* taskId: <taskId>,
|
|
2806
3070
|
* data: {},
|
|
@@ -2808,7 +3072,7 @@ interface TaskServiceModel {
|
|
|
2808
3072
|
* }, <folderId>); // folderId is required
|
|
2809
3073
|
*
|
|
2810
3074
|
* // Complete an external task
|
|
2811
|
-
* await
|
|
3075
|
+
* await tasks.complete({
|
|
2812
3076
|
* type: TaskType.External,
|
|
2813
3077
|
* taskId: <taskId>
|
|
2814
3078
|
* }, <folderId>); // folderId is required
|
|
@@ -2827,7 +3091,7 @@ interface TaskServiceModel {
|
|
|
2827
3091
|
* @example
|
|
2828
3092
|
* ```typescript
|
|
2829
3093
|
* // Get users from a folder
|
|
2830
|
-
* const users = await
|
|
3094
|
+
* const users = await tasks.getUsers(<folderId>);
|
|
2831
3095
|
*
|
|
2832
3096
|
* // Access user properties
|
|
2833
3097
|
* console.log(users.items[0].name);
|
|
@@ -2882,6 +3146,17 @@ declare function createTaskWithMethods(taskData: RawTaskGetResponse | RawTaskCre
|
|
|
2882
3146
|
* Service model for managing Maestro Case Instances
|
|
2883
3147
|
*
|
|
2884
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
|
+
* ```
|
|
2885
3160
|
*/
|
|
2886
3161
|
interface CaseInstancesServiceModel {
|
|
2887
3162
|
/**
|
|
@@ -2893,7 +3168,7 @@ interface CaseInstancesServiceModel {
|
|
|
2893
3168
|
* @example
|
|
2894
3169
|
* ```typescript
|
|
2895
3170
|
* // Get all case instances (non-paginated)
|
|
2896
|
-
* const instances = await
|
|
3171
|
+
* const instances = await caseInstances.getAll();
|
|
2897
3172
|
*
|
|
2898
3173
|
* // Cancel/Close faulted instances using methods directly on instances
|
|
2899
3174
|
* for (const instance of instances.items) {
|
|
@@ -2903,16 +3178,16 @@ interface CaseInstancesServiceModel {
|
|
|
2903
3178
|
* }
|
|
2904
3179
|
*
|
|
2905
3180
|
* // With filtering
|
|
2906
|
-
* const
|
|
3181
|
+
* const filteredInstances = await caseInstances.getAll({
|
|
2907
3182
|
* processKey: 'MyCaseProcess'
|
|
2908
3183
|
* });
|
|
2909
3184
|
*
|
|
2910
3185
|
* // First page with pagination
|
|
2911
|
-
* const page1 = await
|
|
3186
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
2912
3187
|
*
|
|
2913
3188
|
* // Navigate using cursor
|
|
2914
3189
|
* if (page1.hasNextPage) {
|
|
2915
|
-
* const page2 = await
|
|
3190
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
2916
3191
|
* }
|
|
2917
3192
|
* ```
|
|
2918
3193
|
*/
|
|
@@ -2926,14 +3201,13 @@ interface CaseInstancesServiceModel {
|
|
|
2926
3201
|
* @example
|
|
2927
3202
|
* ```typescript
|
|
2928
3203
|
* // Get a specific case instance
|
|
2929
|
-
* const instance = await
|
|
3204
|
+
* const instance = await caseInstances.getById(
|
|
2930
3205
|
* <instanceId>,
|
|
2931
3206
|
* <folderKey>
|
|
2932
3207
|
* );
|
|
2933
3208
|
*
|
|
2934
3209
|
* // Access instance properties
|
|
2935
3210
|
* console.log(`Status: ${instance.latestRunStatus}`);
|
|
2936
|
-
*
|
|
2937
3211
|
* ```
|
|
2938
3212
|
*/
|
|
2939
3213
|
getById(instanceId: string, folderKey: string): Promise<CaseInstanceGetResponse>;
|
|
@@ -2946,14 +3220,13 @@ interface CaseInstancesServiceModel {
|
|
|
2946
3220
|
* @example
|
|
2947
3221
|
* ```typescript
|
|
2948
3222
|
* // Close a case instance
|
|
2949
|
-
* const result = await
|
|
3223
|
+
* const result = await caseInstances.close(
|
|
2950
3224
|
* <instanceId>,
|
|
2951
3225
|
* <folderKey>
|
|
2952
3226
|
* );
|
|
2953
3227
|
*
|
|
2954
|
-
*
|
|
2955
|
-
*
|
|
2956
|
-
* const instance = await sdk.maestro.cases.instances.getById(
|
|
3228
|
+
* // Or using instance method
|
|
3229
|
+
* const instance = await caseInstances.getById(
|
|
2957
3230
|
* <instanceId>,
|
|
2958
3231
|
* <folderKey>
|
|
2959
3232
|
* );
|
|
@@ -2962,12 +3235,12 @@ interface CaseInstancesServiceModel {
|
|
|
2962
3235
|
* console.log(`Closed: ${result.success}`);
|
|
2963
3236
|
*
|
|
2964
3237
|
* // Close with a comment
|
|
2965
|
-
* const
|
|
3238
|
+
* const resultWithComment = await instance.close({
|
|
2966
3239
|
* comment: 'Closing due to invalid input data'
|
|
2967
3240
|
* });
|
|
2968
3241
|
*
|
|
2969
|
-
* if (
|
|
2970
|
-
* console.log(`Instance ${
|
|
3242
|
+
* if (resultWithComment.success) {
|
|
3243
|
+
* console.log(`Instance ${resultWithComment.data.instanceId} status: ${resultWithComment.data.status}`);
|
|
2971
3244
|
* }
|
|
2972
3245
|
* ```
|
|
2973
3246
|
*/
|
|
@@ -2980,6 +3253,44 @@ interface CaseInstancesServiceModel {
|
|
|
2980
3253
|
* @returns Promise resolving to operation result with instance data
|
|
2981
3254
|
*/
|
|
2982
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>>;
|
|
2983
3294
|
/**
|
|
2984
3295
|
* Resume a case instance
|
|
2985
3296
|
* @param instanceId - The ID of the instance to resume
|
|
@@ -2997,7 +3308,7 @@ interface CaseInstancesServiceModel {
|
|
|
2997
3308
|
* @example
|
|
2998
3309
|
* ```typescript
|
|
2999
3310
|
* // Get execution history for a case instance
|
|
3000
|
-
* const history = await
|
|
3311
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
3001
3312
|
* <instanceId>,
|
|
3002
3313
|
* <folderKey>
|
|
3003
3314
|
* );
|
|
@@ -3019,7 +3330,7 @@ interface CaseInstancesServiceModel {
|
|
|
3019
3330
|
* @example
|
|
3020
3331
|
* ```typescript
|
|
3021
3332
|
* // Get stages for a case instance
|
|
3022
|
-
* const stages = await
|
|
3333
|
+
* const stages = await caseInstances.getStages(
|
|
3023
3334
|
* <caseInstanceId>,
|
|
3024
3335
|
* <folderKey>
|
|
3025
3336
|
* );
|
|
@@ -3051,12 +3362,12 @@ interface CaseInstancesServiceModel {
|
|
|
3051
3362
|
* @example
|
|
3052
3363
|
* ```typescript
|
|
3053
3364
|
* // Get all tasks for a case instance (non-paginated)
|
|
3054
|
-
* const
|
|
3365
|
+
* const actionTasks = await caseInstances.getActionTasks(
|
|
3055
3366
|
* <caseInstanceId>,
|
|
3056
3367
|
* );
|
|
3057
3368
|
*
|
|
3058
3369
|
* // First page with pagination
|
|
3059
|
-
* const page1 = await
|
|
3370
|
+
* const page1 = await caseInstances.getActionTasks(
|
|
3060
3371
|
* <caseInstanceId>,
|
|
3061
3372
|
* { pageSize: 10 }
|
|
3062
3373
|
* );
|
|
@@ -3067,7 +3378,7 @@ interface CaseInstancesServiceModel {
|
|
|
3067
3378
|
* }
|
|
3068
3379
|
*
|
|
3069
3380
|
* // Jump to specific page
|
|
3070
|
-
* const page5 = await
|
|
3381
|
+
* const page5 = await caseInstances.getActionTasks(
|
|
3071
3382
|
* <caseInstanceId>,
|
|
3072
3383
|
* {
|
|
3073
3384
|
* jumpToPage: 5,
|
|
@@ -3093,6 +3404,13 @@ interface CaseInstanceMethods {
|
|
|
3093
3404
|
* @returns Promise resolving to operation result
|
|
3094
3405
|
*/
|
|
3095
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>>;
|
|
3096
3414
|
/**
|
|
3097
3415
|
* Resumes this case instance
|
|
3098
3416
|
*
|
|
@@ -3136,17 +3454,21 @@ declare function createCaseInstanceWithMethods(instanceData: RawCaseInstanceGetR
|
|
|
3136
3454
|
declare class MaestroProcessesService extends BaseService implements MaestroProcessesServiceModel {
|
|
3137
3455
|
private processInstancesService;
|
|
3138
3456
|
/**
|
|
3139
|
-
*
|
|
3457
|
+
* Creates an instance of the Maestro Processes service.
|
|
3458
|
+
*
|
|
3459
|
+
* @param instance - UiPath SDK instance providing authentication and configuration
|
|
3140
3460
|
*/
|
|
3141
|
-
constructor(
|
|
3461
|
+
constructor(instance: IUiPath);
|
|
3142
3462
|
/**
|
|
3143
3463
|
* Get all processes with their instance statistics
|
|
3144
3464
|
* @returns Promise resolving to array of MaestroProcess objects
|
|
3145
3465
|
*
|
|
3146
3466
|
* @example
|
|
3147
3467
|
* ```typescript
|
|
3148
|
-
*
|
|
3149
|
-
*
|
|
3468
|
+
* import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
|
|
3469
|
+
*
|
|
3470
|
+
* const maestroProcesses = new MaestroProcesses(sdk);
|
|
3471
|
+
* const processes = await maestroProcesses.getAll();
|
|
3150
3472
|
*
|
|
3151
3473
|
* // Access process information
|
|
3152
3474
|
* for (const process of processes) {
|
|
@@ -3154,7 +3476,6 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
|
|
|
3154
3476
|
* console.log(`Running instances: ${process.runningCount}`);
|
|
3155
3477
|
* console.log(`Faulted instances: ${process.faultedCount}`);
|
|
3156
3478
|
* }
|
|
3157
|
-
*
|
|
3158
3479
|
* ```
|
|
3159
3480
|
*/
|
|
3160
3481
|
getAll(): Promise<MaestroProcessGetAllResponse[]>;
|
|
@@ -3165,10 +3486,6 @@ declare class MaestroProcessesService extends BaseService implements MaestroProc
|
|
|
3165
3486
|
}
|
|
3166
3487
|
|
|
3167
3488
|
declare class ProcessInstancesService extends BaseService implements ProcessInstancesServiceModel {
|
|
3168
|
-
/**
|
|
3169
|
-
* @hideconstructor
|
|
3170
|
-
*/
|
|
3171
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3172
3489
|
/**
|
|
3173
3490
|
* Get all process instances with optional filtering and pagination
|
|
3174
3491
|
*
|
|
@@ -3181,8 +3498,12 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
|
|
|
3181
3498
|
*
|
|
3182
3499
|
* @example
|
|
3183
3500
|
* ```typescript
|
|
3501
|
+
* import { ProcessInstances } from '@uipath/uipath-typescript/maestro-processes';
|
|
3502
|
+
*
|
|
3503
|
+
* const processInstances = new ProcessInstances(sdk);
|
|
3504
|
+
*
|
|
3184
3505
|
* // Get all instances (non-paginated)
|
|
3185
|
-
* const instances = await
|
|
3506
|
+
* const instances = await processInstances.getAll();
|
|
3186
3507
|
*
|
|
3187
3508
|
* // Cancel faulted instances using methods directly on instances
|
|
3188
3509
|
* for (const instance of instances.items) {
|
|
@@ -3192,16 +3513,16 @@ declare class ProcessInstancesService extends BaseService implements ProcessInst
|
|
|
3192
3513
|
* }
|
|
3193
3514
|
*
|
|
3194
3515
|
* // With filtering
|
|
3195
|
-
* const
|
|
3516
|
+
* const filtered = await processInstances.getAll({
|
|
3196
3517
|
* processKey: 'MyProcess'
|
|
3197
3518
|
* });
|
|
3198
3519
|
*
|
|
3199
3520
|
* // First page with pagination
|
|
3200
|
-
* const page1 = await
|
|
3521
|
+
* const page1 = await processInstances.getAll({ pageSize: 10 });
|
|
3201
3522
|
*
|
|
3202
3523
|
* // Navigate using cursor
|
|
3203
3524
|
* if (page1.hasNextPage) {
|
|
3204
|
-
* const page2 = await
|
|
3525
|
+
* const page2 = await processInstances.getAll({ cursor: page1.nextCursor });
|
|
3205
3526
|
* }
|
|
3206
3527
|
* ```
|
|
3207
3528
|
*/
|
|
@@ -3300,8 +3621,10 @@ declare class ProcessIncidentsService extends BaseService implements ProcessInci
|
|
|
3300
3621
|
* {@link ProcessIncidentGetAllResponse}
|
|
3301
3622
|
* @example
|
|
3302
3623
|
* ```typescript
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
3624
|
+
* import { ProcessIncidents } from '@uipath/uipath-typescript/maestro-processes';
|
|
3625
|
+
*
|
|
3626
|
+
* const processIncidents = new ProcessIncidents(sdk);
|
|
3627
|
+
* const incidents = await processIncidents.getAll();
|
|
3305
3628
|
*
|
|
3306
3629
|
* // Access process incident information
|
|
3307
3630
|
* for (const incident of incidents) {
|
|
@@ -3319,26 +3642,23 @@ declare class ProcessIncidentsService extends BaseService implements ProcessInci
|
|
|
3319
3642
|
* Service for interacting with UiPath Maestro Cases
|
|
3320
3643
|
*/
|
|
3321
3644
|
declare class CasesService extends BaseService implements CasesServiceModel {
|
|
3322
|
-
/**
|
|
3323
|
-
* @hideconstructor
|
|
3324
|
-
*/
|
|
3325
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3326
3645
|
/**
|
|
3327
3646
|
* Get all case management processes with their instance statistics
|
|
3328
3647
|
* @returns Promise resolving to array of Case objects
|
|
3329
3648
|
*
|
|
3330
3649
|
* @example
|
|
3331
3650
|
* ```typescript
|
|
3332
|
-
*
|
|
3333
|
-
*
|
|
3651
|
+
* import { Cases } from '@uipath/uipath-typescript/cases';
|
|
3652
|
+
*
|
|
3653
|
+
* const cases = new Cases(sdk);
|
|
3654
|
+
* const allCases = await cases.getAll();
|
|
3334
3655
|
*
|
|
3335
3656
|
* // Access case information
|
|
3336
|
-
* for (const caseProcess of
|
|
3657
|
+
* for (const caseProcess of allCases) {
|
|
3337
3658
|
* console.log(`Case Process: ${caseProcess.processKey}`);
|
|
3338
3659
|
* console.log(`Running instances: ${caseProcess.runningCount}`);
|
|
3339
3660
|
* console.log(`Completed instances: ${caseProcess.completedCount}`);
|
|
3340
3661
|
* }
|
|
3341
|
-
*
|
|
3342
3662
|
* ```
|
|
3343
3663
|
*/
|
|
3344
3664
|
getAll(): Promise<CaseGetAllResponse[]>;
|
|
@@ -3354,9 +3674,11 @@ declare class CasesService extends BaseService implements CasesServiceModel {
|
|
|
3354
3674
|
declare class CaseInstancesService extends BaseService implements CaseInstancesServiceModel {
|
|
3355
3675
|
private taskService;
|
|
3356
3676
|
/**
|
|
3357
|
-
*
|
|
3677
|
+
* Creates an instance of the Case Instances service.
|
|
3678
|
+
*
|
|
3679
|
+
* @param instance - UiPath SDK instance providing authentication and configuration
|
|
3358
3680
|
*/
|
|
3359
|
-
constructor(
|
|
3681
|
+
constructor(instance: IUiPath);
|
|
3360
3682
|
/**
|
|
3361
3683
|
* Get all case instances with optional filtering and pagination
|
|
3362
3684
|
*
|
|
@@ -3369,8 +3691,12 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3369
3691
|
*
|
|
3370
3692
|
* @example
|
|
3371
3693
|
* ```typescript
|
|
3694
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3695
|
+
*
|
|
3696
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3697
|
+
*
|
|
3372
3698
|
* // Get all case instances (non-paginated)
|
|
3373
|
-
* const instances = await
|
|
3699
|
+
* const instances = await caseInstances.getAll();
|
|
3374
3700
|
*
|
|
3375
3701
|
* // Close faulted instances using methods directly on instances
|
|
3376
3702
|
* for (const instance of instances.items) {
|
|
@@ -3380,22 +3706,22 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3380
3706
|
* }
|
|
3381
3707
|
*
|
|
3382
3708
|
* // With filtering
|
|
3383
|
-
* const
|
|
3709
|
+
* const filtered = await caseInstances.getAll({
|
|
3384
3710
|
* processKey: 'MyCaseProcess'
|
|
3385
3711
|
* });
|
|
3386
3712
|
*
|
|
3387
3713
|
* // First page with pagination
|
|
3388
|
-
* const page1 = await
|
|
3714
|
+
* const page1 = await caseInstances.getAll({ pageSize: 10 });
|
|
3389
3715
|
*
|
|
3390
3716
|
* // Navigate using cursor
|
|
3391
3717
|
* if (page1.hasNextPage) {
|
|
3392
|
-
* const page2 = await
|
|
3718
|
+
* const page2 = await caseInstances.getAll({ cursor: page1.nextCursor });
|
|
3393
3719
|
* }
|
|
3394
3720
|
* ```
|
|
3395
3721
|
*/
|
|
3396
3722
|
getAll<T extends CaseInstanceGetAllWithPaginationOptions = CaseInstanceGetAllWithPaginationOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<CaseInstanceGetResponse> : NonPaginatedResponse<CaseInstanceGetResponse>>;
|
|
3397
3723
|
/**
|
|
3398
|
-
* 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)
|
|
3399
3725
|
* @param instanceId - The ID of the instance to retrieve
|
|
3400
3726
|
* @param folderKey - Required folder key
|
|
3401
3727
|
* @returns Promise<CaseInstanceGetResponse>
|
|
@@ -3439,6 +3765,14 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3439
3765
|
* @returns Promise resolving to operation result with updated instance data
|
|
3440
3766
|
*/
|
|
3441
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>>;
|
|
3442
3776
|
/**
|
|
3443
3777
|
* Resume a case instance
|
|
3444
3778
|
* @param instanceId - The ID of the instance to resume
|
|
@@ -3454,8 +3788,10 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3454
3788
|
* @returns Promise resolving to instance execution history
|
|
3455
3789
|
* @example
|
|
3456
3790
|
* ```typescript
|
|
3457
|
-
*
|
|
3458
|
-
*
|
|
3791
|
+
* import { CaseInstances } from '@uipath/uipath-typescript/cases';
|
|
3792
|
+
*
|
|
3793
|
+
* const caseInstances = new CaseInstances(sdk);
|
|
3794
|
+
* const history = await caseInstances.getExecutionHistory(
|
|
3459
3795
|
* 'instance-id',
|
|
3460
3796
|
* 'folder-key'
|
|
3461
3797
|
* );
|
|
@@ -3519,10 +3855,16 @@ declare class CaseInstancesService extends BaseService implements CaseInstancesS
|
|
|
3519
3855
|
}
|
|
3520
3856
|
|
|
3521
3857
|
/**
|
|
3522
|
-
* 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.
|
|
3523
3866
|
*/
|
|
3524
3867
|
declare class FolderScopedService extends BaseService {
|
|
3525
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3526
3868
|
/**
|
|
3527
3869
|
* Gets resources in a folder with optional query parameters
|
|
3528
3870
|
*
|
|
@@ -3602,6 +3944,17 @@ type AssetGetByIdOptions = BaseOptions;
|
|
|
3602
3944
|
* Service for managing UiPath Assets.
|
|
3603
3945
|
*
|
|
3604
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
|
+
* ```
|
|
3605
3958
|
*/
|
|
3606
3959
|
interface AssetServiceModel {
|
|
3607
3960
|
/**
|
|
@@ -3613,21 +3966,19 @@ interface AssetServiceModel {
|
|
|
3613
3966
|
* @example
|
|
3614
3967
|
* ```typescript
|
|
3615
3968
|
* // Standard array return
|
|
3616
|
-
* const assets = await sdk.assets.getAll();
|
|
3617
|
-
*
|
|
3618
3969
|
* // With folder
|
|
3619
|
-
* const folderAssets = await
|
|
3970
|
+
* const folderAssets = await assets.getAll({ folderId: <folderId> });
|
|
3620
3971
|
*
|
|
3621
3972
|
* // First page with pagination
|
|
3622
|
-
* const page1 = await
|
|
3973
|
+
* const page1 = await assets.getAll({ pageSize: 10 });
|
|
3623
3974
|
*
|
|
3624
3975
|
* // Navigate using cursor
|
|
3625
3976
|
* if (page1.hasNextPage) {
|
|
3626
|
-
* const page2 = await
|
|
3977
|
+
* const page2 = await assets.getAll({ cursor: page1.nextCursor });
|
|
3627
3978
|
* }
|
|
3628
3979
|
*
|
|
3629
3980
|
* // Jump to specific page
|
|
3630
|
-
* const page5 = await
|
|
3981
|
+
* const page5 = await assets.getAll({
|
|
3631
3982
|
* jumpToPage: 5,
|
|
3632
3983
|
* pageSize: 10
|
|
3633
3984
|
* });
|
|
@@ -3645,7 +3996,7 @@ interface AssetServiceModel {
|
|
|
3645
3996
|
* @example
|
|
3646
3997
|
* ```typescript
|
|
3647
3998
|
* // Get asset by ID
|
|
3648
|
-
* const asset = await
|
|
3999
|
+
* const asset = await assets.getById(<assetId>, <folderId>);
|
|
3649
4000
|
* ```
|
|
3650
4001
|
*/
|
|
3651
4002
|
getById(id: number, folderId: number, options?: AssetGetByIdOptions): Promise<AssetGetResponse>;
|
|
@@ -3655,10 +4006,6 @@ interface AssetServiceModel {
|
|
|
3655
4006
|
* Service for interacting with UiPath Orchestrator Assets API
|
|
3656
4007
|
*/
|
|
3657
4008
|
declare class AssetService extends FolderScopedService implements AssetServiceModel {
|
|
3658
|
-
/**
|
|
3659
|
-
* @hideconstructor
|
|
3660
|
-
*/
|
|
3661
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
3662
4009
|
/**
|
|
3663
4010
|
* Gets all assets across folders with optional filtering and folder scoping
|
|
3664
4011
|
*
|
|
@@ -3668,22 +4015,26 @@ declare class AssetService extends FolderScopedService implements AssetServiceMo
|
|
|
3668
4015
|
*
|
|
3669
4016
|
* @example
|
|
3670
4017
|
* ```typescript
|
|
4018
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
4019
|
+
*
|
|
4020
|
+
* const assets = new Assets(sdk);
|
|
4021
|
+
*
|
|
3671
4022
|
* // Standard array return
|
|
3672
|
-
* const
|
|
4023
|
+
* const allAssets = await assets.getAll();
|
|
3673
4024
|
*
|
|
3674
4025
|
* // With folder
|
|
3675
|
-
* const folderAssets = await
|
|
4026
|
+
* const folderAssets = await assets.getAll({ folderId: 123 });
|
|
3676
4027
|
*
|
|
3677
4028
|
* // First page with pagination
|
|
3678
|
-
* const page1 = await
|
|
4029
|
+
* const page1 = await assets.getAll({ pageSize: 10 });
|
|
3679
4030
|
*
|
|
3680
4031
|
* // Navigate using cursor
|
|
3681
4032
|
* if (page1.hasNextPage) {
|
|
3682
|
-
* const page2 = await
|
|
4033
|
+
* const page2 = await assets.getAll({ cursor: page1.nextCursor });
|
|
3683
4034
|
* }
|
|
3684
4035
|
*
|
|
3685
4036
|
* // Jump to specific page
|
|
3686
|
-
* const page5 = await
|
|
4037
|
+
* const page5 = await assets.getAll({
|
|
3687
4038
|
* jumpToPage: 5,
|
|
3688
4039
|
* pageSize: 10
|
|
3689
4040
|
* });
|
|
@@ -3700,8 +4051,12 @@ declare class AssetService extends FolderScopedService implements AssetServiceMo
|
|
|
3700
4051
|
*
|
|
3701
4052
|
* @example
|
|
3702
4053
|
* ```typescript
|
|
4054
|
+
* import { Assets } from '@uipath/uipath-typescript/assets';
|
|
4055
|
+
*
|
|
4056
|
+
* const assets = new Assets(sdk);
|
|
4057
|
+
*
|
|
3703
4058
|
* // Get asset by ID
|
|
3704
|
-
* const asset = await
|
|
4059
|
+
* const asset = await assets.getById(123, 456);
|
|
3705
4060
|
* ```
|
|
3706
4061
|
*/
|
|
3707
4062
|
getById(id: number, folderId: number, options?: AssetGetByIdOptions): Promise<AssetGetResponse>;
|
|
@@ -3851,7 +4206,7 @@ interface BucketUploadFileOptions {
|
|
|
3851
4206
|
/**
|
|
3852
4207
|
* File content to upload
|
|
3853
4208
|
*/
|
|
3854
|
-
content: Blob |
|
|
4209
|
+
content: Blob | Uint8Array<ArrayBuffer> | File;
|
|
3855
4210
|
}
|
|
3856
4211
|
/**
|
|
3857
4212
|
* Response from file upload operations
|
|
@@ -3871,6 +4226,17 @@ interface BucketUploadResponse {
|
|
|
3871
4226
|
* Service for managing UiPath storage Buckets.
|
|
3872
4227
|
*
|
|
3873
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
|
+
* ```
|
|
3874
4240
|
*/
|
|
3875
4241
|
interface BucketServiceModel {
|
|
3876
4242
|
/**
|
|
@@ -3886,28 +4252,28 @@ interface BucketServiceModel {
|
|
|
3886
4252
|
* @example
|
|
3887
4253
|
* ```typescript
|
|
3888
4254
|
* // Get all buckets across folders
|
|
3889
|
-
* const
|
|
4255
|
+
* const allBuckets = await buckets.getAll();
|
|
3890
4256
|
*
|
|
3891
4257
|
* // Get buckets within a specific folder
|
|
3892
|
-
* const
|
|
4258
|
+
* const folderBuckets = await buckets.getAll({
|
|
3893
4259
|
* folderId: <folderId>
|
|
3894
4260
|
* });
|
|
3895
4261
|
*
|
|
3896
4262
|
* // Get buckets with filtering
|
|
3897
|
-
* const
|
|
4263
|
+
* const filteredBuckets = await buckets.getAll({
|
|
3898
4264
|
* filter: "name eq 'MyBucket'"
|
|
3899
4265
|
* });
|
|
3900
4266
|
*
|
|
3901
4267
|
* // First page with pagination
|
|
3902
|
-
* const page1 = await
|
|
4268
|
+
* const page1 = await buckets.getAll({ pageSize: 10 });
|
|
3903
4269
|
*
|
|
3904
4270
|
* // Navigate using cursor
|
|
3905
4271
|
* if (page1.hasNextPage) {
|
|
3906
|
-
* const page2 = await
|
|
4272
|
+
* const page2 = await buckets.getAll({ cursor: page1.nextCursor });
|
|
3907
4273
|
* }
|
|
3908
4274
|
*
|
|
3909
4275
|
* // Jump to specific page
|
|
3910
|
-
* const page5 = await
|
|
4276
|
+
* const page5 = await buckets.getAll({
|
|
3911
4277
|
* jumpToPage: 5,
|
|
3912
4278
|
* pageSize: 10
|
|
3913
4279
|
* });
|
|
@@ -3925,7 +4291,7 @@ interface BucketServiceModel {
|
|
|
3925
4291
|
* @example
|
|
3926
4292
|
* ```typescript
|
|
3927
4293
|
* // Get bucket by ID
|
|
3928
|
-
* const bucket = await
|
|
4294
|
+
* const bucket = await buckets.getById(<bucketId>, <folderId>);
|
|
3929
4295
|
* ```
|
|
3930
4296
|
*/
|
|
3931
4297
|
getById(bucketId: number, folderId: number, options?: BucketGetByIdOptions): Promise<BucketGetResponse>;
|
|
@@ -3944,19 +4310,19 @@ interface BucketServiceModel {
|
|
|
3944
4310
|
* @example
|
|
3945
4311
|
* ```typescript
|
|
3946
4312
|
* // Get metadata for all files in a bucket
|
|
3947
|
-
* const fileMetadata = await
|
|
4313
|
+
* const fileMetadata = await buckets.getFileMetaData(<bucketId>, <folderId>);
|
|
3948
4314
|
*
|
|
3949
4315
|
* // Get file metadata with a specific prefix
|
|
3950
|
-
* const
|
|
4316
|
+
* const prefixMetadata = await buckets.getFileMetaData(<bucketId>, <folderId>, {
|
|
3951
4317
|
* prefix: '/folder1'
|
|
3952
4318
|
* });
|
|
3953
4319
|
*
|
|
3954
4320
|
* // First page with pagination
|
|
3955
|
-
* const page1 = await
|
|
4321
|
+
* const page1 = await buckets.getFileMetaData(<bucketId>, <folderId>, { pageSize: 10 });
|
|
3956
4322
|
*
|
|
3957
4323
|
* // Navigate using cursor
|
|
3958
4324
|
* if (page1.hasNextPage) {
|
|
3959
|
-
* const page2 = await
|
|
4325
|
+
* const page2 = await buckets.getFileMetaData(<bucketId>, <folderId>, { cursor: page1.nextCursor });
|
|
3960
4326
|
* }
|
|
3961
4327
|
* ```
|
|
3962
4328
|
*/
|
|
@@ -3970,7 +4336,7 @@ interface BucketServiceModel {
|
|
|
3970
4336
|
* @example
|
|
3971
4337
|
* ```typescript
|
|
3972
4338
|
* // Get download URL for a file
|
|
3973
|
-
* const fileAccess = await
|
|
4339
|
+
* const fileAccess = await buckets.getReadUri({
|
|
3974
4340
|
* bucketId: <bucketId>,
|
|
3975
4341
|
* folderId: <folderId>,
|
|
3976
4342
|
* path: '/folder/file.pdf'
|
|
@@ -3988,20 +4354,20 @@ interface BucketServiceModel {
|
|
|
3988
4354
|
* ```typescript
|
|
3989
4355
|
* // Upload a file from browser
|
|
3990
4356
|
* const file = new File(['file content'], 'example.txt');
|
|
3991
|
-
* const result = await
|
|
4357
|
+
* const result = await buckets.uploadFile({
|
|
3992
4358
|
* bucketId: <bucketId>,
|
|
3993
4359
|
* folderId: <folderId>,
|
|
3994
4360
|
* path: '/folder/example.txt',
|
|
3995
4361
|
* content: file
|
|
3996
4362
|
* });
|
|
3997
4363
|
*
|
|
3998
|
-
* // In Node env with Buffer
|
|
3999
|
-
* const
|
|
4000
|
-
* 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({
|
|
4001
4367
|
* bucketId: <bucketId>,
|
|
4002
4368
|
* folderId: <folderId>,
|
|
4003
4369
|
* path: '/folder/example.txt',
|
|
4004
|
-
* content
|
|
4370
|
+
* content,
|
|
4005
4371
|
* });
|
|
4006
4372
|
* ```
|
|
4007
4373
|
*/
|
|
@@ -4009,11 +4375,6 @@ interface BucketServiceModel {
|
|
|
4009
4375
|
}
|
|
4010
4376
|
|
|
4011
4377
|
declare class BucketService extends FolderScopedService implements BucketServiceModel {
|
|
4012
|
-
protected readonly tokenManager: TokenManager;
|
|
4013
|
-
/**
|
|
4014
|
-
* @hideconstructor
|
|
4015
|
-
*/
|
|
4016
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4017
4378
|
/**
|
|
4018
4379
|
* Gets a bucket by ID
|
|
4019
4380
|
* @param bucketId - The ID of the bucket to retrieve
|
|
@@ -4023,8 +4384,12 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4023
4384
|
*
|
|
4024
4385
|
* @example
|
|
4025
4386
|
* ```typescript
|
|
4387
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4388
|
+
*
|
|
4389
|
+
* const buckets = new Buckets(sdk);
|
|
4390
|
+
*
|
|
4026
4391
|
* // Get bucket by ID
|
|
4027
|
-
* const bucket = await
|
|
4392
|
+
* const bucket = await buckets.getById(123, 456);
|
|
4028
4393
|
* ```
|
|
4029
4394
|
*/
|
|
4030
4395
|
getById(id: number, folderId: number, options?: BucketGetByIdOptions): Promise<BucketGetResponse>;
|
|
@@ -4040,29 +4405,33 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4040
4405
|
*
|
|
4041
4406
|
* @example
|
|
4042
4407
|
* ```typescript
|
|
4408
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4409
|
+
*
|
|
4410
|
+
* const buckets = new Buckets(sdk);
|
|
4411
|
+
*
|
|
4043
4412
|
* // Get all buckets across folders
|
|
4044
|
-
* const
|
|
4413
|
+
* const allBuckets = await buckets.getAll();
|
|
4045
4414
|
*
|
|
4046
4415
|
* // Get buckets within a specific folder
|
|
4047
|
-
* const
|
|
4416
|
+
* const folderBuckets = await buckets.getAll({
|
|
4048
4417
|
* folderId: 123
|
|
4049
4418
|
* });
|
|
4050
4419
|
*
|
|
4051
4420
|
* // Get buckets with filtering
|
|
4052
|
-
* const
|
|
4421
|
+
* const filteredBuckets = await buckets.getAll({
|
|
4053
4422
|
* filter: "name eq 'MyBucket'"
|
|
4054
4423
|
* });
|
|
4055
4424
|
*
|
|
4056
4425
|
* // First page with pagination
|
|
4057
|
-
* const page1 = await
|
|
4426
|
+
* const page1 = await buckets.getAll({ pageSize: 10 });
|
|
4058
4427
|
*
|
|
4059
4428
|
* // Navigate using cursor
|
|
4060
4429
|
* if (page1.hasNextPage) {
|
|
4061
|
-
* const page2 = await
|
|
4430
|
+
* const page2 = await buckets.getAll({ cursor: page1.nextCursor });
|
|
4062
4431
|
* }
|
|
4063
4432
|
*
|
|
4064
4433
|
* // Jump to specific page
|
|
4065
|
-
* const page5 = await
|
|
4434
|
+
* const page5 = await buckets.getAll({
|
|
4066
4435
|
* jumpToPage: 5,
|
|
4067
4436
|
* pageSize: 10
|
|
4068
4437
|
* });
|
|
@@ -4083,20 +4452,24 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4083
4452
|
*
|
|
4084
4453
|
* @example
|
|
4085
4454
|
* ```typescript
|
|
4455
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4456
|
+
*
|
|
4457
|
+
* const buckets = new Buckets(sdk);
|
|
4458
|
+
*
|
|
4086
4459
|
* // Get metadata for all files in a bucket
|
|
4087
|
-
* const fileMetadata = await
|
|
4460
|
+
* const fileMetadata = await buckets.getFileMetaData(123, 456);
|
|
4088
4461
|
*
|
|
4089
4462
|
* // Get file metadata with a specific prefix
|
|
4090
|
-
* const fileMetadata = await
|
|
4463
|
+
* const fileMetadata = await buckets.getFileMetaData(123, 456, {
|
|
4091
4464
|
* prefix: '/folder1'
|
|
4092
4465
|
* });
|
|
4093
4466
|
*
|
|
4094
4467
|
* // First page with pagination
|
|
4095
|
-
* const page1 = await
|
|
4468
|
+
* const page1 = await buckets.getFileMetaData(123, 456, { pageSize: 10 });
|
|
4096
4469
|
*
|
|
4097
4470
|
* // Navigate using cursor
|
|
4098
4471
|
* if (page1.hasNextPage) {
|
|
4099
|
-
* const page2 = await
|
|
4472
|
+
* const page2 = await buckets.getFileMetaData(123, 456, { cursor: page1.nextCursor });
|
|
4100
4473
|
* }
|
|
4101
4474
|
* ```
|
|
4102
4475
|
*/
|
|
@@ -4109,9 +4482,13 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4109
4482
|
*
|
|
4110
4483
|
* @example
|
|
4111
4484
|
* ```typescript
|
|
4485
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4486
|
+
*
|
|
4487
|
+
* const buckets = new Buckets(sdk);
|
|
4488
|
+
*
|
|
4112
4489
|
* // Upload a file from browser
|
|
4113
4490
|
* const file = new File(['file content'], 'example.txt');
|
|
4114
|
-
* const result = await
|
|
4491
|
+
* const result = await buckets.uploadFile({
|
|
4115
4492
|
* bucketId: 123,
|
|
4116
4493
|
* folderId: 456,
|
|
4117
4494
|
* path: '/folder/example.txt',
|
|
@@ -4120,7 +4497,7 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4120
4497
|
*
|
|
4121
4498
|
* // In Node env with Buffer
|
|
4122
4499
|
* const buffer = Buffer.from('file content');
|
|
4123
|
-
* const result = await
|
|
4500
|
+
* const result = await buckets.uploadFile({
|
|
4124
4501
|
* bucketId: 123,
|
|
4125
4502
|
* folderId: 456,
|
|
4126
4503
|
* path: '/folder/example.txt',
|
|
@@ -4137,8 +4514,12 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
4137
4514
|
*
|
|
4138
4515
|
* @example
|
|
4139
4516
|
* ```typescript
|
|
4517
|
+
* import { Buckets } from '@uipath/uipath-typescript/buckets';
|
|
4518
|
+
*
|
|
4519
|
+
* const buckets = new Buckets(sdk);
|
|
4520
|
+
*
|
|
4140
4521
|
* // Get download URL for a file
|
|
4141
|
-
* const fileAccess = await
|
|
4522
|
+
* const fileAccess = await buckets.getReadUri({
|
|
4142
4523
|
* bucketId: 123,
|
|
4143
4524
|
* folderId: 456,
|
|
4144
4525
|
* path: '/folder/file.pdf'
|
|
@@ -4466,6 +4847,17 @@ type ProcessGetByIdOptions = BaseOptions;
|
|
|
4466
4847
|
* Service for managing and executing UiPath Automation Processes.
|
|
4467
4848
|
*
|
|
4468
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
|
+
* ```
|
|
4469
4861
|
*/
|
|
4470
4862
|
interface ProcessServiceModel {
|
|
4471
4863
|
/**
|
|
@@ -4479,28 +4871,28 @@ interface ProcessServiceModel {
|
|
|
4479
4871
|
* @example
|
|
4480
4872
|
* ```typescript
|
|
4481
4873
|
* // Standard array return
|
|
4482
|
-
* const
|
|
4874
|
+
* const allProcesses = await processes.getAll();
|
|
4483
4875
|
*
|
|
4484
4876
|
* // Get processes within a specific folder
|
|
4485
|
-
* const
|
|
4877
|
+
* const folderProcesses = await processes.getAll({
|
|
4486
4878
|
* folderId: <folderId>
|
|
4487
4879
|
* });
|
|
4488
4880
|
*
|
|
4489
4881
|
* // Get processes with filtering
|
|
4490
|
-
* const
|
|
4882
|
+
* const filteredProcesses = await processes.getAll({
|
|
4491
4883
|
* filter: "name eq 'MyProcess'"
|
|
4492
4884
|
* });
|
|
4493
4885
|
*
|
|
4494
4886
|
* // First page with pagination
|
|
4495
|
-
* const page1 = await
|
|
4887
|
+
* const page1 = await processes.getAll({ pageSize: 10 });
|
|
4496
4888
|
*
|
|
4497
4889
|
* // Navigate using cursor
|
|
4498
4890
|
* if (page1.hasNextPage) {
|
|
4499
|
-
* const page2 = await
|
|
4891
|
+
* const page2 = await processes.getAll({ cursor: page1.nextCursor });
|
|
4500
4892
|
* }
|
|
4501
4893
|
*
|
|
4502
4894
|
* // Jump to specific page
|
|
4503
|
-
* const page5 = await
|
|
4895
|
+
* const page5 = await processes.getAll({
|
|
4504
4896
|
* jumpToPage: 5,
|
|
4505
4897
|
* pageSize: 10
|
|
4506
4898
|
* });
|
|
@@ -4518,7 +4910,7 @@ interface ProcessServiceModel {
|
|
|
4518
4910
|
* @example
|
|
4519
4911
|
* ```typescript
|
|
4520
4912
|
* // Get process by ID
|
|
4521
|
-
* const process = await
|
|
4913
|
+
* const process = await processes.getById(<processId>, <folderId>);
|
|
4522
4914
|
* ```
|
|
4523
4915
|
*/
|
|
4524
4916
|
getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
|
|
@@ -4533,12 +4925,12 @@ interface ProcessServiceModel {
|
|
|
4533
4925
|
* @example
|
|
4534
4926
|
* ```typescript
|
|
4535
4927
|
* // Start a process by process key
|
|
4536
|
-
* const
|
|
4928
|
+
* const result = await processes.start({
|
|
4537
4929
|
* processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
4538
4930
|
* }, <folderId>); // folderId is required
|
|
4539
4931
|
*
|
|
4540
4932
|
* // Start a process by name with specific robots
|
|
4541
|
-
* const
|
|
4933
|
+
* const result = await processes.start({
|
|
4542
4934
|
* processName: "MyProcess"
|
|
4543
4935
|
* }, <folderId>); // folderId is required
|
|
4544
4936
|
* ```
|
|
@@ -4550,10 +4942,6 @@ interface ProcessServiceModel {
|
|
|
4550
4942
|
* Service for interacting with UiPath Orchestrator Processes API
|
|
4551
4943
|
*/
|
|
4552
4944
|
declare class ProcessService extends BaseService implements ProcessServiceModel {
|
|
4553
|
-
/**
|
|
4554
|
-
* @hideconstructor
|
|
4555
|
-
*/
|
|
4556
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4557
4945
|
/**
|
|
4558
4946
|
* Gets all processes across folders with optional filtering and folder scoping
|
|
4559
4947
|
*
|
|
@@ -4566,29 +4954,33 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4566
4954
|
*
|
|
4567
4955
|
* @example
|
|
4568
4956
|
* ```typescript
|
|
4957
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
4958
|
+
*
|
|
4959
|
+
* const processes = new Processes(sdk);
|
|
4960
|
+
*
|
|
4569
4961
|
* // Standard array return
|
|
4570
|
-
* const
|
|
4962
|
+
* const allProcesses = await processes.getAll();
|
|
4571
4963
|
*
|
|
4572
4964
|
* // Get processes within a specific folder
|
|
4573
|
-
* const
|
|
4965
|
+
* const folderProcesses = await processes.getAll({
|
|
4574
4966
|
* folderId: 123
|
|
4575
4967
|
* });
|
|
4576
4968
|
*
|
|
4577
4969
|
* // Get processes with filtering
|
|
4578
|
-
* const
|
|
4970
|
+
* const filteredProcesses = await processes.getAll({
|
|
4579
4971
|
* filter: "name eq 'MyProcess'"
|
|
4580
4972
|
* });
|
|
4581
4973
|
*
|
|
4582
4974
|
* // First page with pagination
|
|
4583
|
-
* const page1 = await
|
|
4975
|
+
* const page1 = await processes.getAll({ pageSize: 10 });
|
|
4584
4976
|
*
|
|
4585
4977
|
* // Navigate using cursor
|
|
4586
4978
|
* if (page1.hasNextPage) {
|
|
4587
|
-
* const page2 = await
|
|
4979
|
+
* const page2 = await processes.getAll({ cursor: page1.nextCursor });
|
|
4588
4980
|
* }
|
|
4589
4981
|
*
|
|
4590
4982
|
* // Jump to specific page
|
|
4591
|
-
* const page5 = await
|
|
4983
|
+
* const page5 = await processes.getAll({
|
|
4592
4984
|
* jumpToPage: 5,
|
|
4593
4985
|
* pageSize: 10
|
|
4594
4986
|
* });
|
|
@@ -4605,13 +4997,17 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4605
4997
|
*
|
|
4606
4998
|
* @example
|
|
4607
4999
|
* ```typescript
|
|
5000
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
5001
|
+
*
|
|
5002
|
+
* const processes = new Processes(sdk);
|
|
5003
|
+
*
|
|
4608
5004
|
* // Start a process by process key
|
|
4609
|
-
* const jobs = await
|
|
5005
|
+
* const jobs = await processes.start({
|
|
4610
5006
|
* processKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
4611
5007
|
* }, 123); // folderId is required
|
|
4612
5008
|
*
|
|
4613
5009
|
* // Start a process by name with specific robots
|
|
4614
|
-
* const jobs = await
|
|
5010
|
+
* const jobs = await processes.start({
|
|
4615
5011
|
* processName: "MyProcess"
|
|
4616
5012
|
* }, 123); // folderId is required
|
|
4617
5013
|
* ```
|
|
@@ -4627,8 +5023,12 @@ declare class ProcessService extends BaseService implements ProcessServiceModel
|
|
|
4627
5023
|
*
|
|
4628
5024
|
* @example
|
|
4629
5025
|
* ```typescript
|
|
5026
|
+
* import { Processes } from '@uipath/uipath-typescript/processes';
|
|
5027
|
+
*
|
|
5028
|
+
* const processes = new Processes(sdk);
|
|
5029
|
+
*
|
|
4630
5030
|
* // Get process by ID
|
|
4631
|
-
* const process = await
|
|
5031
|
+
* const process = await processes.getById(123, 456);
|
|
4632
5032
|
* ```
|
|
4633
5033
|
*/
|
|
4634
5034
|
getById(id: number, folderId: number, options?: ProcessGetByIdOptions): Promise<ProcessGetResponse>;
|
|
@@ -4675,6 +5075,17 @@ type QueueGetByIdOptions = BaseOptions;
|
|
|
4675
5075
|
* Service for managing UiPath Queues
|
|
4676
5076
|
*
|
|
4677
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
|
+
* ```
|
|
4678
5089
|
*/
|
|
4679
5090
|
interface QueueServiceModel {
|
|
4680
5091
|
/**
|
|
@@ -4687,28 +5098,28 @@ interface QueueServiceModel {
|
|
|
4687
5098
|
* @example
|
|
4688
5099
|
* ```typescript
|
|
4689
5100
|
* // Standard array return
|
|
4690
|
-
* const
|
|
5101
|
+
* const allQueues = await queues.getAll();
|
|
4691
5102
|
*
|
|
4692
5103
|
* // Get queues within a specific folder
|
|
4693
|
-
* const
|
|
5104
|
+
* const folderQueues = await queues.getAll({
|
|
4694
5105
|
* folderId: <folderId>
|
|
4695
5106
|
* });
|
|
4696
5107
|
*
|
|
4697
5108
|
* // Get queues with filtering
|
|
4698
|
-
* const
|
|
5109
|
+
* const filteredQueues = await queues.getAll({
|
|
4699
5110
|
* filter: "name eq 'MyQueue'"
|
|
4700
5111
|
* });
|
|
4701
5112
|
*
|
|
4702
5113
|
* // First page with pagination
|
|
4703
|
-
* const page1 = await
|
|
5114
|
+
* const page1 = await queues.getAll({ pageSize: 10 });
|
|
4704
5115
|
*
|
|
4705
5116
|
* // Navigate using cursor
|
|
4706
5117
|
* if (page1.hasNextPage) {
|
|
4707
|
-
* const page2 = await
|
|
5118
|
+
* const page2 = await queues.getAll({ cursor: page1.nextCursor });
|
|
4708
5119
|
* }
|
|
4709
5120
|
*
|
|
4710
5121
|
* // Jump to specific page
|
|
4711
|
-
* const page5 = await
|
|
5122
|
+
* const page5 = await queues.getAll({
|
|
4712
5123
|
* jumpToPage: 5,
|
|
4713
5124
|
* pageSize: 10
|
|
4714
5125
|
* });
|
|
@@ -4724,7 +5135,7 @@ interface QueueServiceModel {
|
|
|
4724
5135
|
* @example
|
|
4725
5136
|
* ```typescript
|
|
4726
5137
|
* // Get queue by ID
|
|
4727
|
-
* const queue = await
|
|
5138
|
+
* const queue = await queues.getById(<queueId>, <folderId>);
|
|
4728
5139
|
* ```
|
|
4729
5140
|
*/
|
|
4730
5141
|
getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
|
|
@@ -4734,10 +5145,6 @@ interface QueueServiceModel {
|
|
|
4734
5145
|
* Service for interacting with UiPath Orchestrator Queues API
|
|
4735
5146
|
*/
|
|
4736
5147
|
declare class QueueService extends FolderScopedService implements QueueServiceModel {
|
|
4737
|
-
/**
|
|
4738
|
-
* @hideconstructor
|
|
4739
|
-
*/
|
|
4740
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4741
5148
|
/**
|
|
4742
5149
|
* Gets all queues across folders with optional filtering and folder scoping
|
|
4743
5150
|
*
|
|
@@ -4750,29 +5157,33 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4750
5157
|
*
|
|
4751
5158
|
* @example
|
|
4752
5159
|
* ```typescript
|
|
5160
|
+
* import { Queues } from '@uipath/uipath-typescript/queues';
|
|
5161
|
+
*
|
|
5162
|
+
* const queues = new Queues(sdk);
|
|
5163
|
+
*
|
|
4753
5164
|
* // Standard array return
|
|
4754
|
-
* const
|
|
5165
|
+
* const allQueues = await queues.getAll();
|
|
4755
5166
|
*
|
|
4756
5167
|
* // Get queues within a specific folder
|
|
4757
|
-
* const
|
|
5168
|
+
* const folderQueues = await queues.getAll({
|
|
4758
5169
|
* folderId: 123
|
|
4759
5170
|
* });
|
|
4760
5171
|
*
|
|
4761
5172
|
* // Get queues with filtering
|
|
4762
|
-
* const
|
|
5173
|
+
* const filteredQueues = await queues.getAll({
|
|
4763
5174
|
* filter: "name eq 'MyQueue'"
|
|
4764
5175
|
* });
|
|
4765
5176
|
*
|
|
4766
5177
|
* // First page with pagination
|
|
4767
|
-
* const page1 = await
|
|
5178
|
+
* const page1 = await queues.getAll({ pageSize: 10 });
|
|
4768
5179
|
*
|
|
4769
5180
|
* // Navigate using cursor
|
|
4770
5181
|
* if (page1.hasNextPage) {
|
|
4771
|
-
* const page2 = await
|
|
5182
|
+
* const page2 = await queues.getAll({ cursor: page1.nextCursor });
|
|
4772
5183
|
* }
|
|
4773
5184
|
*
|
|
4774
5185
|
* // Jump to specific page
|
|
4775
|
-
* const page5 = await
|
|
5186
|
+
* const page5 = await queues.getAll({
|
|
4776
5187
|
* jumpToPage: 5,
|
|
4777
5188
|
* pageSize: 10
|
|
4778
5189
|
* });
|
|
@@ -4788,8 +5199,12 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4788
5199
|
*
|
|
4789
5200
|
* @example
|
|
4790
5201
|
* ```typescript
|
|
5202
|
+
* import { Queues } from '@uipath/uipath-typescript/queues';
|
|
5203
|
+
*
|
|
5204
|
+
* const queues = new Queues(sdk);
|
|
5205
|
+
*
|
|
4791
5206
|
* // Get queue by ID
|
|
4792
|
-
* const queue = await
|
|
5207
|
+
* const queue = await queues.getById(123, 456);
|
|
4793
5208
|
* ```
|
|
4794
5209
|
*/
|
|
4795
5210
|
getById(id: number, folderId: number, options?: QueueGetByIdOptions): Promise<QueueGetResponse>;
|
|
@@ -4799,10 +5214,6 @@ declare class QueueService extends FolderScopedService implements QueueServiceMo
|
|
|
4799
5214
|
* Service for interacting with UiPath Tasks API
|
|
4800
5215
|
*/
|
|
4801
5216
|
declare class TaskService extends BaseService implements TaskServiceModel {
|
|
4802
|
-
/**
|
|
4803
|
-
* @hideconstructor
|
|
4804
|
-
*/
|
|
4805
|
-
constructor(config: Config, executionContext: ExecutionContext, tokenManager: TokenManager);
|
|
4806
5217
|
/**
|
|
4807
5218
|
* Creates a new task
|
|
4808
5219
|
* @param task - The task to be created
|
|
@@ -4811,7 +5222,10 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4811
5222
|
*
|
|
4812
5223
|
* @example
|
|
4813
5224
|
* ```typescript
|
|
4814
|
-
*
|
|
5225
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5226
|
+
*
|
|
5227
|
+
* const tasks = new Tasks(sdk);
|
|
5228
|
+
* const task = await tasks.create({
|
|
4815
5229
|
* title: "My Task",
|
|
4816
5230
|
* priority: TaskPriority.Medium,
|
|
4817
5231
|
* data: { key: "value" }
|
|
@@ -4832,24 +5246,28 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4832
5246
|
*
|
|
4833
5247
|
* @example
|
|
4834
5248
|
* ```typescript
|
|
5249
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5250
|
+
*
|
|
5251
|
+
* const tasks = new Tasks(sdk);
|
|
5252
|
+
*
|
|
4835
5253
|
* // Standard array return
|
|
4836
|
-
* const users = await
|
|
5254
|
+
* const users = await tasks.getUsers(123);
|
|
4837
5255
|
*
|
|
4838
5256
|
* // Get users with filtering
|
|
4839
|
-
* const users = await
|
|
5257
|
+
* const users = await tasks.getUsers(123, {
|
|
4840
5258
|
* filter: "name eq 'abc'"
|
|
4841
5259
|
* });
|
|
4842
5260
|
*
|
|
4843
5261
|
* // First page with pagination
|
|
4844
|
-
* const page1 = await
|
|
5262
|
+
* const page1 = await tasks.getUsers(123, { pageSize: 10 });
|
|
4845
5263
|
*
|
|
4846
5264
|
* // Navigate using cursor
|
|
4847
5265
|
* if (page1.hasNextPage) {
|
|
4848
|
-
* const page2 = await
|
|
5266
|
+
* const page2 = await tasks.getUsers(123, { cursor: page1.nextCursor });
|
|
4849
5267
|
* }
|
|
4850
5268
|
*
|
|
4851
5269
|
* // Jump to specific page
|
|
4852
|
-
* const page5 = await
|
|
5270
|
+
* const page5 = await tasks.getUsers(123, {
|
|
4853
5271
|
* jumpToPage: 5,
|
|
4854
5272
|
* pageSize: 10
|
|
4855
5273
|
* });
|
|
@@ -4868,29 +5286,33 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4868
5286
|
*
|
|
4869
5287
|
* @example
|
|
4870
5288
|
* ```typescript
|
|
5289
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5290
|
+
*
|
|
5291
|
+
* const tasks = new Tasks(sdk);
|
|
5292
|
+
*
|
|
4871
5293
|
* // Standard array return
|
|
4872
|
-
* const
|
|
5294
|
+
* const allTasks = await tasks.getAll();
|
|
4873
5295
|
*
|
|
4874
5296
|
* // Get tasks within a specific folder
|
|
4875
|
-
* const
|
|
5297
|
+
* const folderTasks = await tasks.getAll({
|
|
4876
5298
|
* folderId: 123
|
|
4877
5299
|
* });
|
|
4878
5300
|
*
|
|
4879
5301
|
* // Get tasks with admin permissions
|
|
4880
|
-
* const
|
|
5302
|
+
* const adminTasks = await tasks.getAll({
|
|
4881
5303
|
* asTaskAdmin: true
|
|
4882
5304
|
* });
|
|
4883
5305
|
*
|
|
4884
5306
|
* // First page with pagination
|
|
4885
|
-
* const page1 = await
|
|
5307
|
+
* const page1 = await tasks.getAll({ pageSize: 10 });
|
|
4886
5308
|
*
|
|
4887
5309
|
* // Navigate using cursor
|
|
4888
5310
|
* if (page1.hasNextPage) {
|
|
4889
|
-
* const page2 = await
|
|
5311
|
+
* const page2 = await tasks.getAll({ cursor: page1.nextCursor });
|
|
4890
5312
|
* }
|
|
4891
5313
|
*
|
|
4892
5314
|
* // Jump to specific page
|
|
4893
|
-
* const page5 = await
|
|
5315
|
+
* const page5 = await tasks.getAll({
|
|
4894
5316
|
* jumpToPage: 5,
|
|
4895
5317
|
* pageSize: 10
|
|
4896
5318
|
* });
|
|
@@ -4908,8 +5330,12 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4908
5330
|
*
|
|
4909
5331
|
* @example
|
|
4910
5332
|
* ```typescript
|
|
5333
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5334
|
+
*
|
|
5335
|
+
* const tasks = new Tasks(sdk);
|
|
5336
|
+
*
|
|
4911
5337
|
* // Get task by ID
|
|
4912
|
-
* const task = await
|
|
5338
|
+
* const task = await tasks.getById(123);
|
|
4913
5339
|
*
|
|
4914
5340
|
* // If the task is a form task, it will automatically return form-specific data
|
|
4915
5341
|
* ```
|
|
@@ -4923,20 +5349,24 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4923
5349
|
*
|
|
4924
5350
|
* @example
|
|
4925
5351
|
* ```typescript
|
|
5352
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5353
|
+
*
|
|
5354
|
+
* const tasks = new Tasks(sdk);
|
|
5355
|
+
*
|
|
4926
5356
|
* // Assign a single task to a user by ID
|
|
4927
|
-
* const result = await
|
|
5357
|
+
* const result = await tasks.assign({
|
|
4928
5358
|
* taskId: 123,
|
|
4929
5359
|
* userId: 456
|
|
4930
5360
|
* });
|
|
4931
5361
|
*
|
|
4932
5362
|
* // Assign a single task to a user by email
|
|
4933
|
-
* const result = await
|
|
5363
|
+
* const result = await tasks.assign({
|
|
4934
5364
|
* taskId: 123,
|
|
4935
5365
|
* userNameOrEmail: "user@example.com"
|
|
4936
5366
|
* });
|
|
4937
5367
|
*
|
|
4938
5368
|
* // Assign multiple tasks
|
|
4939
|
-
* const result = await
|
|
5369
|
+
* const result = await tasks.assign([
|
|
4940
5370
|
* {
|
|
4941
5371
|
* taskId: 123,
|
|
4942
5372
|
* userId: 456
|
|
@@ -4957,20 +5387,24 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4957
5387
|
*
|
|
4958
5388
|
* @example
|
|
4959
5389
|
* ```typescript
|
|
5390
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5391
|
+
*
|
|
5392
|
+
* const tasks = new Tasks(sdk);
|
|
5393
|
+
*
|
|
4960
5394
|
* // Reassign a single task to a user by ID
|
|
4961
|
-
* const result = await
|
|
5395
|
+
* const result = await tasks.reassign({
|
|
4962
5396
|
* taskId: 123,
|
|
4963
5397
|
* userId: 456
|
|
4964
5398
|
* });
|
|
4965
5399
|
*
|
|
4966
5400
|
* // Reassign a single task to a user by email
|
|
4967
|
-
* const result = await
|
|
5401
|
+
* const result = await tasks.reassign({
|
|
4968
5402
|
* taskId: 123,
|
|
4969
5403
|
* userNameOrEmail: "user@example.com"
|
|
4970
5404
|
* });
|
|
4971
5405
|
*
|
|
4972
5406
|
* // Reassign multiple tasks
|
|
4973
|
-
* const result = await
|
|
5407
|
+
* const result = await tasks.reassign([
|
|
4974
5408
|
* {
|
|
4975
5409
|
* taskId: 123,
|
|
4976
5410
|
* userId: 456
|
|
@@ -4991,11 +5425,15 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
4991
5425
|
*
|
|
4992
5426
|
* @example
|
|
4993
5427
|
* ```typescript
|
|
5428
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5429
|
+
*
|
|
5430
|
+
* const tasks = new Tasks(sdk);
|
|
5431
|
+
*
|
|
4994
5432
|
* // Unassign a single task
|
|
4995
|
-
* const result = await
|
|
5433
|
+
* const result = await tasks.unassign(123);
|
|
4996
5434
|
*
|
|
4997
5435
|
* // Unassign multiple tasks
|
|
4998
|
-
* const result = await
|
|
5436
|
+
* const result = await tasks.unassign([123, 456, 789]);
|
|
4999
5437
|
* ```
|
|
5000
5438
|
*/
|
|
5001
5439
|
unassign(taskIds: number | number[]): Promise<OperationResponse<{
|
|
@@ -5010,8 +5448,12 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
5010
5448
|
*
|
|
5011
5449
|
* @example
|
|
5012
5450
|
* ```typescript
|
|
5451
|
+
* import { Tasks } from '@uipath/uipath-typescript/tasks';
|
|
5452
|
+
*
|
|
5453
|
+
* const tasks = new Tasks(sdk);
|
|
5454
|
+
*
|
|
5013
5455
|
* // Complete an app task
|
|
5014
|
-
* await
|
|
5456
|
+
* await tasks.complete({
|
|
5015
5457
|
* type: TaskType.App,
|
|
5016
5458
|
* taskId: 456,
|
|
5017
5459
|
* data: {},
|
|
@@ -5019,7 +5461,7 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
5019
5461
|
* }, 123); // folderId is required
|
|
5020
5462
|
*
|
|
5021
5463
|
* // Complete an external task
|
|
5022
|
-
* await
|
|
5464
|
+
* await tasks.complete({
|
|
5023
5465
|
* type: TaskType.External,
|
|
5024
5466
|
* taskId: 789
|
|
5025
5467
|
* }, 123); // folderId is required
|
|
@@ -5052,58 +5494,38 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
5052
5494
|
private addDefaultExpand;
|
|
5053
5495
|
}
|
|
5054
5496
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
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 {
|
|
5079
5528
|
private readonly _services;
|
|
5080
|
-
constructor(config: UiPathSDKConfig);
|
|
5081
|
-
/**
|
|
5082
|
-
* Initialize the SDK based on the provided configuration.
|
|
5083
|
-
* This method handles both OAuth flow initiation and completion automatically.
|
|
5084
|
-
* For secret-based authentication, initialization is automatic.
|
|
5085
|
-
*/
|
|
5086
|
-
initialize(): Promise<void>;
|
|
5087
|
-
/**
|
|
5088
|
-
* Check if the SDK has been initialized
|
|
5089
|
-
*/
|
|
5090
|
-
isInitialized(): boolean;
|
|
5091
|
-
/**
|
|
5092
|
-
* Check if we're in an OAuth callback state
|
|
5093
|
-
*/
|
|
5094
|
-
isInOAuthCallback(): boolean;
|
|
5095
|
-
/**
|
|
5096
|
-
* Complete OAuth authentication flow (only call if isInOAuthCallback() is true)
|
|
5097
|
-
*/
|
|
5098
|
-
completeOAuth(): Promise<boolean>;
|
|
5099
|
-
/**
|
|
5100
|
-
* Check if the user is authenticated (has valid token)
|
|
5101
|
-
*/
|
|
5102
|
-
isAuthenticated(): boolean;
|
|
5103
|
-
/**
|
|
5104
|
-
* Get the current authentication token
|
|
5105
|
-
*/
|
|
5106
|
-
getToken(): string | undefined;
|
|
5107
5529
|
private getService;
|
|
5108
5530
|
/**
|
|
5109
5531
|
* Access to Maestro services
|
|
@@ -5444,7 +5866,7 @@ declare const telemetryClient: TelemetryClient;
|
|
|
5444
5866
|
* SDK Telemetry constants
|
|
5445
5867
|
*/
|
|
5446
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";
|
|
5447
|
-
declare const SDK_VERSION = "1.0.0
|
|
5869
|
+
declare const SDK_VERSION = "1.0.0";
|
|
5448
5870
|
declare const VERSION = "Version";
|
|
5449
5871
|
declare const SERVICE = "Service";
|
|
5450
5872
|
declare const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -5460,4 +5882,4 @@ declare const SDK_RUN_EVENT = "Sdk.Run";
|
|
|
5460
5882
|
declare const UNKNOWN = "";
|
|
5461
5883
|
|
|
5462
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 };
|
|
5463
|
-
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, EntityBatchInsertOptions, EntityBatchInsertResponse, 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 };
|