@uipath/uipath-typescript 1.3.10 → 1.4.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/dist/agent-memory/index.cjs +1765 -0
- package/dist/agent-memory/index.d.ts +588 -0
- package/dist/agent-memory/index.mjs +1763 -0
- package/dist/agents/index.cjs +1726 -0
- package/dist/agents/index.d.ts +502 -0
- package/dist/agents/index.mjs +1724 -0
- package/dist/assets/index.cjs +155 -30
- package/dist/assets/index.d.ts +84 -5
- package/dist/assets/index.mjs +155 -30
- package/dist/attachments/index.cjs +37 -6
- package/dist/attachments/index.d.ts +1 -0
- package/dist/attachments/index.mjs +37 -6
- package/dist/buckets/index.cjs +37 -6
- package/dist/buckets/index.d.ts +1 -0
- package/dist/buckets/index.mjs +37 -6
- package/dist/cases/index.cjs +192 -10
- package/dist/cases/index.d.ts +208 -7
- package/dist/cases/index.mjs +192 -11
- package/dist/conversational-agent/index.cjs +124 -57
- package/dist/conversational-agent/index.d.ts +190 -122
- package/dist/conversational-agent/index.mjs +124 -57
- package/dist/core/index.cjs +413 -105
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.mjs +413 -105
- package/dist/entities/index.cjs +135 -70
- package/dist/entities/index.d.ts +146 -45
- package/dist/entities/index.mjs +135 -70
- package/dist/feedback/index.cjs +37 -6
- package/dist/feedback/index.d.ts +1 -0
- package/dist/feedback/index.mjs +37 -6
- package/dist/governance/index.cjs +1782 -0
- package/dist/governance/index.d.ts +598 -0
- package/dist/governance/index.mjs +1780 -0
- package/dist/index.cjs +1050 -291
- package/dist/index.d.ts +1313 -134
- package/dist/index.mjs +1050 -292
- package/dist/index.umd.js +4546 -3770
- package/dist/jobs/index.cjs +37 -6
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.mjs +37 -6
- package/dist/maestro-processes/index.cjs +224 -18
- package/dist/maestro-processes/index.d.ts +221 -9
- package/dist/maestro-processes/index.mjs +224 -18
- package/dist/processes/index.cjs +37 -6
- package/dist/processes/index.d.ts +1 -0
- package/dist/processes/index.mjs +37 -6
- package/dist/queues/index.cjs +37 -6
- package/dist/queues/index.d.ts +1 -0
- package/dist/queues/index.mjs +37 -6
- package/dist/tasks/index.cjs +37 -6
- package/dist/tasks/index.d.ts +1 -0
- package/dist/tasks/index.mjs +37 -6
- package/dist/traces/index.cjs +1933 -0
- package/dist/traces/index.d.ts +566 -0
- package/dist/traces/index.mjs +1931 -0
- package/package.json +42 -2
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { IUiPath } from '../core/index';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simplified universal pagination cursor
|
|
5
|
+
* Used to fetch next/previous pages
|
|
6
|
+
*/
|
|
7
|
+
interface PaginationCursor {
|
|
8
|
+
/** Opaque string containing all information needed to fetch next page */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Discriminated union for pagination methods - ensures cursor and jumpToPage are mutually exclusive
|
|
13
|
+
*/
|
|
14
|
+
type PaginationMethodUnion = {
|
|
15
|
+
cursor?: PaginationCursor;
|
|
16
|
+
jumpToPage?: never;
|
|
17
|
+
} | {
|
|
18
|
+
cursor?: never;
|
|
19
|
+
jumpToPage?: number;
|
|
20
|
+
} | {
|
|
21
|
+
cursor?: never;
|
|
22
|
+
jumpToPage?: never;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Pagination options. Users cannot specify both cursor and jumpToPage.
|
|
26
|
+
*/
|
|
27
|
+
type PaginationOptions = {
|
|
28
|
+
/** Size of the page to fetch (items per page) */
|
|
29
|
+
pageSize?: number;
|
|
30
|
+
} & PaginationMethodUnion;
|
|
31
|
+
/**
|
|
32
|
+
* Paginated response containing items and navigation information
|
|
33
|
+
*/
|
|
34
|
+
interface PaginatedResponse<T> {
|
|
35
|
+
/** The items in the current page */
|
|
36
|
+
items: T[];
|
|
37
|
+
/** Total count of items across all pages (if available) */
|
|
38
|
+
totalCount?: number;
|
|
39
|
+
/** Whether more pages are available */
|
|
40
|
+
hasNextPage: boolean;
|
|
41
|
+
/** Cursor to fetch the next page (if available) */
|
|
42
|
+
nextCursor?: PaginationCursor;
|
|
43
|
+
/** Cursor to fetch the previous page (if available) */
|
|
44
|
+
previousCursor?: PaginationCursor;
|
|
45
|
+
/** Current page number (1-based, if available) */
|
|
46
|
+
currentPage?: number;
|
|
47
|
+
/** Total number of pages (if available) */
|
|
48
|
+
totalPages?: number;
|
|
49
|
+
/** Whether this pagination type supports jumping to arbitrary pages */
|
|
50
|
+
supportsPageJump: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Pagination types supported by the SDK
|
|
55
|
+
*/
|
|
56
|
+
declare enum PaginationType {
|
|
57
|
+
OFFSET = "offset",
|
|
58
|
+
TOKEN = "token"
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Interface for service access methods needed by pagination helpers
|
|
62
|
+
*/
|
|
63
|
+
interface PaginationServiceAccess {
|
|
64
|
+
get<T>(path: string, options?: any): Promise<{
|
|
65
|
+
data: T;
|
|
66
|
+
}>;
|
|
67
|
+
post<T>(path: string, body?: any, options?: any): Promise<{
|
|
68
|
+
data: T;
|
|
69
|
+
}>;
|
|
70
|
+
requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Field names for extracting data from paginated responses.
|
|
74
|
+
*/
|
|
75
|
+
interface PaginationFieldNames {
|
|
76
|
+
itemsField?: string;
|
|
77
|
+
totalCountField?: string;
|
|
78
|
+
continuationTokenField?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Options for the requestWithPagination method in BaseService.
|
|
82
|
+
*/
|
|
83
|
+
interface RequestWithPaginationOptions extends RequestSpec {
|
|
84
|
+
pagination: PaginationFieldNames & {
|
|
85
|
+
paginationType: PaginationType;
|
|
86
|
+
paginationParams?: {
|
|
87
|
+
pageSizeParam?: string;
|
|
88
|
+
offsetParam?: string;
|
|
89
|
+
tokenParam?: string;
|
|
90
|
+
countParam?: string;
|
|
91
|
+
convertToSkip?: boolean;
|
|
92
|
+
zeroBased?: boolean;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* HTTP methods supported by the API client
|
|
99
|
+
*/
|
|
100
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
101
|
+
/**
|
|
102
|
+
* Supported response types for API requests
|
|
103
|
+
*/
|
|
104
|
+
type ResponseType = 'json' | 'text' | 'blob' | 'arraybuffer' | 'stream';
|
|
105
|
+
/**
|
|
106
|
+
* Query parameters type with support for arrays and nested objects
|
|
107
|
+
*/
|
|
108
|
+
type QueryParams = Record<string, string | number | boolean | Array<string | number | boolean> | null | undefined>;
|
|
109
|
+
/**
|
|
110
|
+
* Standard HTTP headers type
|
|
111
|
+
*/
|
|
112
|
+
type Headers = Record<string, string>;
|
|
113
|
+
/**
|
|
114
|
+
* Options for request retries
|
|
115
|
+
*/
|
|
116
|
+
interface RetryOptions {
|
|
117
|
+
/** Maximum number of retry attempts */
|
|
118
|
+
maxRetries?: number;
|
|
119
|
+
/** Base delay between retries in milliseconds */
|
|
120
|
+
retryDelay?: number;
|
|
121
|
+
/** Whether to use exponential backoff */
|
|
122
|
+
useExponentialBackoff?: boolean;
|
|
123
|
+
/** Status codes that should trigger a retry */
|
|
124
|
+
retryableStatusCodes?: number[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Options for request timeouts
|
|
128
|
+
*/
|
|
129
|
+
interface TimeoutOptions {
|
|
130
|
+
/** Request timeout in milliseconds */
|
|
131
|
+
timeout?: number;
|
|
132
|
+
/** Whether to abort the request on timeout */
|
|
133
|
+
abortOnTimeout?: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Options for request body transformation
|
|
137
|
+
*/
|
|
138
|
+
interface BodyOptions {
|
|
139
|
+
/** Whether to stringify the body */
|
|
140
|
+
stringify?: boolean;
|
|
141
|
+
/** Content type override */
|
|
142
|
+
contentType?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Pagination metadata for API requests
|
|
146
|
+
*/
|
|
147
|
+
interface PaginationMetadata {
|
|
148
|
+
/** Type of pagination used by the API endpoint */
|
|
149
|
+
paginationType: PaginationType;
|
|
150
|
+
/** Response field containing items array (defaults to 'value') */
|
|
151
|
+
itemsField?: string;
|
|
152
|
+
/** Response field containing total count (defaults to '@odata.count') */
|
|
153
|
+
totalCountField?: string;
|
|
154
|
+
/** Response field containing continuation token (defaults to 'continuationToken') */
|
|
155
|
+
continuationTokenField?: string;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Base interface for all API requests
|
|
159
|
+
*/
|
|
160
|
+
interface RequestSpec {
|
|
161
|
+
/** HTTP method for the request */
|
|
162
|
+
method?: HttpMethod;
|
|
163
|
+
/** URL endpoint for the request */
|
|
164
|
+
url?: string;
|
|
165
|
+
/** Query parameters to be appended to the URL */
|
|
166
|
+
params?: QueryParams;
|
|
167
|
+
/** HTTP headers to include with the request */
|
|
168
|
+
headers?: Headers;
|
|
169
|
+
/** Raw body content (takes precedence over data) */
|
|
170
|
+
body?: unknown;
|
|
171
|
+
/** Expected response type */
|
|
172
|
+
responseType?: ResponseType;
|
|
173
|
+
/** Request timeout options */
|
|
174
|
+
timeoutOptions?: TimeoutOptions;
|
|
175
|
+
/** Retry behavior options */
|
|
176
|
+
retryOptions?: RetryOptions;
|
|
177
|
+
/** Body transformation options */
|
|
178
|
+
bodyOptions?: BodyOptions;
|
|
179
|
+
/** AbortSignal for cancelling the request */
|
|
180
|
+
signal?: AbortSignal;
|
|
181
|
+
/** Pagination metadata for the request */
|
|
182
|
+
pagination?: PaginationMetadata;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface ApiResponse<T> {
|
|
186
|
+
data: T;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Base class for all UiPath SDK services.
|
|
190
|
+
*
|
|
191
|
+
* Provides common functionality for authentication, configuration, and API communication.
|
|
192
|
+
* All service classes extend this base to inherit dependency injection and HTTP client access.
|
|
193
|
+
*
|
|
194
|
+
* This class implements the dependency injection pattern where services receive a configured
|
|
195
|
+
* UiPath instance. The ApiClient is created internally and handles all HTTP operations
|
|
196
|
+
* including authentication token management.
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* Service classes should extend this base and call `super(uiPath)` in their constructor.
|
|
200
|
+
* Protected HTTP methods (get, post, put, patch, delete) are available to all subclasses.
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
203
|
+
declare class BaseService {
|
|
204
|
+
#private;
|
|
205
|
+
/**
|
|
206
|
+
* SDK configuration (read-only). Available to subclasses so they can
|
|
207
|
+
* fall back to init-time defaults like `folderKey`.
|
|
208
|
+
*/
|
|
209
|
+
protected readonly config: {
|
|
210
|
+
folderKey?: string;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Creates a base service instance with dependency injection.
|
|
214
|
+
*
|
|
215
|
+
* Extracts configuration, execution context, and token manager from the UiPath instance
|
|
216
|
+
* to initialize an authenticated API client. The ApiClient handles all HTTP operations
|
|
217
|
+
* and token management internally.
|
|
218
|
+
*
|
|
219
|
+
* @param instance - UiPath SDK instance providing authentication and configuration.
|
|
220
|
+
* Services receive this via dependency injection in the modular pattern.
|
|
221
|
+
* @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
|
|
222
|
+
* CAS external-app auth)
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* // Services automatically call this via super()
|
|
227
|
+
* export class EntityService extends BaseService {
|
|
228
|
+
* constructor(instance: IUiPath) {
|
|
229
|
+
* super(instance); // Initializes the internal ApiClient
|
|
230
|
+
* }
|
|
231
|
+
* }
|
|
232
|
+
*
|
|
233
|
+
* // Usage in modular pattern
|
|
234
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
235
|
+
* import { Entities } from '@uipath/uipath-typescript/entities';
|
|
236
|
+
*
|
|
237
|
+
* const sdk = new UiPath(config);
|
|
238
|
+
* await sdk.initialize();
|
|
239
|
+
* const entities = new Entities(sdk);
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
constructor(instance: IUiPath, headers?: Record<string, string>);
|
|
243
|
+
/**
|
|
244
|
+
* Gets a valid authentication token, refreshing if necessary.
|
|
245
|
+
* Use this when you need to manually add Authorization headers (e.g., direct uploads).
|
|
246
|
+
*
|
|
247
|
+
* @returns Promise resolving to a valid access token string
|
|
248
|
+
* @throws AuthenticationError if no token is available or refresh fails
|
|
249
|
+
*/
|
|
250
|
+
protected getValidAuthToken(): Promise<string>;
|
|
251
|
+
/**
|
|
252
|
+
* Creates a service accessor for pagination helpers
|
|
253
|
+
* This allows pagination helpers to access protected methods without making them public
|
|
254
|
+
*/
|
|
255
|
+
protected createPaginationServiceAccess(): PaginationServiceAccess;
|
|
256
|
+
protected request<T>(method: string, path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
257
|
+
protected requestWithSpec<T>(spec: RequestSpec): Promise<ApiResponse<T>>;
|
|
258
|
+
protected get<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
259
|
+
protected post<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
260
|
+
protected put<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
261
|
+
protected patch<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
262
|
+
protected delete<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
|
|
263
|
+
/**
|
|
264
|
+
* Execute a request with cursor-based pagination
|
|
265
|
+
*/
|
|
266
|
+
protected requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
|
|
267
|
+
/**
|
|
268
|
+
* Validates and prepares pagination parameters from options
|
|
269
|
+
*/
|
|
270
|
+
private validateAndPreparePaginationParams;
|
|
271
|
+
/**
|
|
272
|
+
* Prepares request parameters for pagination based on pagination type
|
|
273
|
+
*/
|
|
274
|
+
private preparePaginationRequestParams;
|
|
275
|
+
/**
|
|
276
|
+
* Creates a paginated response from API response
|
|
277
|
+
*/
|
|
278
|
+
private createPaginatedResponseFromResponse;
|
|
279
|
+
/**
|
|
280
|
+
* Determines if there are more pages based on pagination type and metadata
|
|
281
|
+
*/
|
|
282
|
+
private determineHasMorePages;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Types for the Agent Memory metrics service.
|
|
287
|
+
*/
|
|
288
|
+
/**
|
|
289
|
+
* Execution kind to filter Agent Memory queries by. Omit to include both
|
|
290
|
+
* Debug and Runtime executions.
|
|
291
|
+
*/
|
|
292
|
+
declare enum AgentMemoryExecutionType {
|
|
293
|
+
/** Executions produced during agent debugging sessions. */
|
|
294
|
+
Debug = "Debug",
|
|
295
|
+
/** Executions produced during production runtime. */
|
|
296
|
+
Runtime = "Runtime"
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Common time-window and scope filters shared by Agent Memory queries.
|
|
300
|
+
*
|
|
301
|
+
* All fields are optional. When `startTime`/`endTime` are omitted, the query
|
|
302
|
+
* defaults to the last 24 hours, with `endTime` defaulting to now.
|
|
303
|
+
*/
|
|
304
|
+
interface AgentMemoryFilterOptions {
|
|
305
|
+
/** Inclusive lower bound for the query window. Defaults to 24 hours before `endTime` when omitted. */
|
|
306
|
+
startTime?: Date;
|
|
307
|
+
/** Exclusive upper bound for the query window. Defaults to now when omitted. */
|
|
308
|
+
endTime?: Date;
|
|
309
|
+
/** Filter to a single agent by ID. Obtain an `agentId` from the Agents service. */
|
|
310
|
+
agentId?: string;
|
|
311
|
+
/** Filter to a specific agent version. */
|
|
312
|
+
agentVersion?: string;
|
|
313
|
+
/** Folder keys to scope the query. Results are limited to folders you can access. */
|
|
314
|
+
folderKeys?: string[];
|
|
315
|
+
/** Filter to a specific execution kind. Omit to include both Debug and Runtime. */
|
|
316
|
+
executionType?: AgentMemoryExecutionType;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Options for retrieving the agent-memory state timeline.
|
|
320
|
+
*/
|
|
321
|
+
interface AgentMemoryGetTimelineOptions extends AgentMemoryFilterOptions {
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Options for retrieving the memory-calls timeline.
|
|
325
|
+
*/
|
|
326
|
+
interface AgentMemoryGetCallsTimelineOptions extends AgentMemoryFilterOptions {
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Options for retrieving the top memory spaces.
|
|
330
|
+
*/
|
|
331
|
+
interface AgentMemoryGetTopSpacesOptions extends AgentMemoryFilterOptions {
|
|
332
|
+
/** Maximum number of memory spaces to return, ranked by memory count. Defaults to 5 when omitted. */
|
|
333
|
+
limit?: number;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* One point on the agent-memory state timeline — memory-state counts for a
|
|
337
|
+
* single time bucket.
|
|
338
|
+
*/
|
|
339
|
+
interface AgentMemoryGetTimelineResponse {
|
|
340
|
+
/** Bucket timestamp. */
|
|
341
|
+
timeSlice: string;
|
|
342
|
+
/** Count of memory entries that were in-memory in this bucket. */
|
|
343
|
+
inMemoryCount: number;
|
|
344
|
+
/** Count of memory entries that were not in-memory in this bucket. */
|
|
345
|
+
notInMemoryCount: number;
|
|
346
|
+
/** Total memory entries in this bucket. */
|
|
347
|
+
totalCount: number;
|
|
348
|
+
/** Count of enabled memory entries in this bucket. */
|
|
349
|
+
enabledMemoryCount: number;
|
|
350
|
+
/** Count of disabled memory entries in this bucket. */
|
|
351
|
+
disabledMemoryCount: number;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* One point on the memory-calls timeline — the count of memory calls for a
|
|
355
|
+
* single time bucket.
|
|
356
|
+
*/
|
|
357
|
+
interface AgentMemoryGetCallsTimelineResponse {
|
|
358
|
+
/** Bucket timestamp. */
|
|
359
|
+
timeSlice: string;
|
|
360
|
+
/** Number of memory calls in this bucket. */
|
|
361
|
+
memoryCallsCount: number;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* A single memory space with its enabled/disabled memory-entry breakdown.
|
|
365
|
+
*/
|
|
366
|
+
interface AgentMemoryGetTopSpacesResponse {
|
|
367
|
+
/** Memory space identifier. */
|
|
368
|
+
memorySpaceId: string;
|
|
369
|
+
/** Memory space display name. */
|
|
370
|
+
memorySpaceName: string;
|
|
371
|
+
/** Total memory entries in this space over the requested window. */
|
|
372
|
+
memoryCount: number;
|
|
373
|
+
/** Count of enabled memory entries in this space. */
|
|
374
|
+
enabledMemoryCount: number;
|
|
375
|
+
/** Count of disabled memory entries in this space. */
|
|
376
|
+
disabledMemoryCount: number;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Service for managing UiPath Agent Memory.
|
|
381
|
+
*
|
|
382
|
+
* Agent Memory is a persistent store of information an agent
|
|
383
|
+
* retains across runs to improve runtime reliability.
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* ```typescript
|
|
387
|
+
* import { UiPath } from '@uipath/uipath-typescript/core';
|
|
388
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
389
|
+
*
|
|
390
|
+
* const sdk = new UiPath(config);
|
|
391
|
+
* await sdk.initialize();
|
|
392
|
+
*
|
|
393
|
+
* const memory = new AgentMemory(sdk);
|
|
394
|
+
* const timeline = await memory.getTimeline();
|
|
395
|
+
* ```
|
|
396
|
+
*/
|
|
397
|
+
interface AgentMemoryServiceModel {
|
|
398
|
+
/**
|
|
399
|
+
* Gets agent memory state over time, with optional filters.
|
|
400
|
+
*
|
|
401
|
+
* @param options - Optional time window and scope filters
|
|
402
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetTimelineResponse}, one per time bucket.
|
|
403
|
+
* @example
|
|
404
|
+
* ```typescript
|
|
405
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
406
|
+
*
|
|
407
|
+
* const memory = new AgentMemory(sdk);
|
|
408
|
+
*
|
|
409
|
+
* // Last 24 hours (default window)
|
|
410
|
+
* const timeline = await memory.getTimeline();
|
|
411
|
+
* console.log(timeline[0]?.inMemoryCount);
|
|
412
|
+
* ```
|
|
413
|
+
* @example
|
|
414
|
+
* ```typescript
|
|
415
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
416
|
+
*
|
|
417
|
+
* // Scoped to one agent in one folder, runtime executions only
|
|
418
|
+
* const scoped = await memory.getTimeline({
|
|
419
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
420
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
421
|
+
* agentId: '<agentId>',
|
|
422
|
+
* folderKeys: ['<folderKey>'],
|
|
423
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
424
|
+
* });
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
getTimeline(options?: AgentMemoryGetTimelineOptions): Promise<AgentMemoryGetTimelineResponse[]>;
|
|
428
|
+
/**
|
|
429
|
+
* Gets the number of agent memory calls (accesses to the memory store) over time, with optional filters.
|
|
430
|
+
*
|
|
431
|
+
* @param options - Optional time window and scope filters
|
|
432
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetCallsTimelineResponse}, one per time bucket.
|
|
433
|
+
* @example
|
|
434
|
+
* ```typescript
|
|
435
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
436
|
+
*
|
|
437
|
+
* const memory = new AgentMemory(sdk);
|
|
438
|
+
*
|
|
439
|
+
* // Last 24 hours (default window)
|
|
440
|
+
* const timeline = await memory.getCallsTimeline();
|
|
441
|
+
* console.log(timeline[0]?.memoryCallsCount);
|
|
442
|
+
* ```
|
|
443
|
+
* @example
|
|
444
|
+
* ```typescript
|
|
445
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
446
|
+
*
|
|
447
|
+
* // Scoped to one agent in one folder, runtime executions only
|
|
448
|
+
* const scoped = await memory.getCallsTimeline({
|
|
449
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
450
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
451
|
+
* agentId: '<agentId>',
|
|
452
|
+
* folderKeys: ['<folderKey>'],
|
|
453
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
454
|
+
* });
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
getCallsTimeline(options?: AgentMemoryGetCallsTimelineOptions): Promise<AgentMemoryGetCallsTimelineResponse[]>;
|
|
458
|
+
/**
|
|
459
|
+
* Gets the top memory spaces by memory count, with optional filters
|
|
460
|
+
*
|
|
461
|
+
* @param options - Optional limit, time window, and scope filters
|
|
462
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetTopSpacesResponse}, ranked by memory count.
|
|
463
|
+
* @example
|
|
464
|
+
* ```typescript
|
|
465
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
466
|
+
*
|
|
467
|
+
* const memory = new AgentMemory(sdk);
|
|
468
|
+
*
|
|
469
|
+
* // Top 5 memory spaces (default limit and window)
|
|
470
|
+
* const top = await memory.getTopSpaces();
|
|
471
|
+
* console.log(top[0]?.memorySpaceName, top[0]?.memoryCount);
|
|
472
|
+
* ```
|
|
473
|
+
* @example
|
|
474
|
+
* ```typescript
|
|
475
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
476
|
+
*
|
|
477
|
+
* // Top 10 spaces for one folder over an explicit window, runtime executions only
|
|
478
|
+
* const topScoped = await memory.getTopSpaces({
|
|
479
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
480
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
481
|
+
* folderKeys: ['<folderKey>'],
|
|
482
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
483
|
+
* limit: 10,
|
|
484
|
+
* });
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
getTopSpaces(options?: AgentMemoryGetTopSpacesOptions): Promise<AgentMemoryGetTopSpacesResponse[]>;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Service for managing UiPath Agent Memory.
|
|
492
|
+
*/
|
|
493
|
+
declare class MemoryService extends BaseService implements AgentMemoryServiceModel {
|
|
494
|
+
/**
|
|
495
|
+
* Gets agent memory state over time, with optional filters.
|
|
496
|
+
*
|
|
497
|
+
* @param options - Optional time window and scope filters
|
|
498
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetTimelineResponse}, one per time bucket.
|
|
499
|
+
* @example
|
|
500
|
+
* ```typescript
|
|
501
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
502
|
+
*
|
|
503
|
+
* const memory = new AgentMemory(sdk);
|
|
504
|
+
*
|
|
505
|
+
* // Last 24 hours (default window)
|
|
506
|
+
* const timeline = await memory.getTimeline();
|
|
507
|
+
* console.log(timeline[0]?.inMemoryCount);
|
|
508
|
+
* ```
|
|
509
|
+
* @example
|
|
510
|
+
* ```typescript
|
|
511
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
512
|
+
*
|
|
513
|
+
* // Scoped to one agent in one folder, runtime executions only
|
|
514
|
+
* const scoped = await memory.getTimeline({
|
|
515
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
516
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
517
|
+
* agentId: '<agentId>',
|
|
518
|
+
* folderKeys: ['<folderKey>'],
|
|
519
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
520
|
+
* });
|
|
521
|
+
* ```
|
|
522
|
+
*/
|
|
523
|
+
getTimeline(options?: AgentMemoryGetTimelineOptions): Promise<AgentMemoryGetTimelineResponse[]>;
|
|
524
|
+
/**
|
|
525
|
+
* Gets agent memory-access counts over time, with optional filters.
|
|
526
|
+
*
|
|
527
|
+
* @param options - Optional time window and scope filters
|
|
528
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetCallsTimelineResponse}, one per time bucket.
|
|
529
|
+
* @example
|
|
530
|
+
* ```typescript
|
|
531
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
532
|
+
*
|
|
533
|
+
* const memory = new AgentMemory(sdk);
|
|
534
|
+
*
|
|
535
|
+
* // Last 24 hours (default window)
|
|
536
|
+
* const timeline = await memory.getCallsTimeline();
|
|
537
|
+
* console.log(timeline[0]?.memoryCallsCount);
|
|
538
|
+
* ```
|
|
539
|
+
* @example
|
|
540
|
+
* ```typescript
|
|
541
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
542
|
+
*
|
|
543
|
+
* // Scoped to one agent in one folder, runtime executions only
|
|
544
|
+
* const scoped = await memory.getCallsTimeline({
|
|
545
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
546
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
547
|
+
* agentId: '<agentId>',
|
|
548
|
+
* folderKeys: ['<folderKey>'],
|
|
549
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
550
|
+
* });
|
|
551
|
+
* ```
|
|
552
|
+
*/
|
|
553
|
+
getCallsTimeline(options?: AgentMemoryGetCallsTimelineOptions): Promise<AgentMemoryGetCallsTimelineResponse[]>;
|
|
554
|
+
/**
|
|
555
|
+
* Gets the top memory spaces by memory count, with optional filters
|
|
556
|
+
*
|
|
557
|
+
* @param options - Optional limit, time window, and scope filters
|
|
558
|
+
* @returns Promise resolving to an array of {@link AgentMemoryGetTopSpacesResponse}, ranked by memory count.
|
|
559
|
+
* @example
|
|
560
|
+
* ```typescript
|
|
561
|
+
* import { AgentMemory } from '@uipath/uipath-typescript/agent-memory';
|
|
562
|
+
*
|
|
563
|
+
* const memory = new AgentMemory(sdk);
|
|
564
|
+
*
|
|
565
|
+
* // Top 5 memory spaces (default limit and window)
|
|
566
|
+
* const top = await memory.getTopSpaces();
|
|
567
|
+
* console.log(top[0]?.memorySpaceName, top[0]?.memoryCount);
|
|
568
|
+
* ```
|
|
569
|
+
* @example
|
|
570
|
+
* ```typescript
|
|
571
|
+
* import { AgentMemoryExecutionType } from '@uipath/uipath-typescript/agent-memory';
|
|
572
|
+
*
|
|
573
|
+
* // Top 10 spaces for one folder over an explicit window, runtime executions only
|
|
574
|
+
* const topScoped = await memory.getTopSpaces({
|
|
575
|
+
* startTime: new Date('2026-05-01T00:00:00Z'),
|
|
576
|
+
* endTime: new Date('2026-06-01T00:00:00Z'),
|
|
577
|
+
* folderKeys: ['<folderKey>'],
|
|
578
|
+
* executionType: AgentMemoryExecutionType.Runtime,
|
|
579
|
+
* limit: 10,
|
|
580
|
+
* });
|
|
581
|
+
* ```
|
|
582
|
+
*/
|
|
583
|
+
getTopSpaces(options?: AgentMemoryGetTopSpacesOptions): Promise<AgentMemoryGetTopSpacesResponse[]>;
|
|
584
|
+
private buildMemoryFilterBody;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export { MemoryService as AgentMemory, AgentMemoryExecutionType };
|
|
588
|
+
export type { AgentMemoryFilterOptions, AgentMemoryGetCallsTimelineOptions, AgentMemoryGetCallsTimelineResponse, AgentMemoryGetTimelineOptions, AgentMemoryGetTimelineResponse, AgentMemoryGetTopSpacesOptions, AgentMemoryGetTopSpacesResponse, AgentMemoryServiceModel };
|