@uipath/uipath-typescript 1.5.0 → 1.5.1

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.
Files changed (45) hide show
  1. package/README.md +7 -1
  2. package/dist/assets/index.cjs +107 -6
  3. package/dist/assets/index.d.ts +12 -1
  4. package/dist/assets/index.mjs +107 -6
  5. package/dist/attachments/index.cjs +95 -3
  6. package/dist/attachments/index.mjs +95 -3
  7. package/dist/buckets/index.cjs +111 -6
  8. package/dist/buckets/index.d.ts +12 -1
  9. package/dist/buckets/index.mjs +111 -6
  10. package/dist/cases/index.cjs +434 -266
  11. package/dist/cases/index.d.ts +140 -3
  12. package/dist/cases/index.mjs +434 -266
  13. package/dist/conversational-agent/index.cjs +23 -1
  14. package/dist/conversational-agent/index.d.ts +117 -6
  15. package/dist/conversational-agent/index.mjs +23 -1
  16. package/dist/core/index.cjs +1 -1
  17. package/dist/core/index.mjs +1 -1
  18. package/dist/entities/index.cjs +423 -0
  19. package/dist/entities/index.d.ts +441 -1
  20. package/dist/entities/index.mjs +422 -1
  21. package/dist/index.cjs +974 -293
  22. package/dist/index.d.ts +1150 -43
  23. package/dist/index.mjs +975 -294
  24. package/dist/index.umd.js +974 -293
  25. package/dist/jobs/index.cjs +12 -5
  26. package/dist/jobs/index.d.ts +12 -1
  27. package/dist/jobs/index.mjs +12 -5
  28. package/dist/maestro-processes/index.cjs +344 -243
  29. package/dist/maestro-processes/index.d.ts +189 -5
  30. package/dist/maestro-processes/index.mjs +344 -243
  31. package/dist/notifications/index.cjs +2012 -0
  32. package/dist/notifications/index.d.ts +615 -0
  33. package/dist/notifications/index.mjs +2010 -0
  34. package/dist/processes/index.cjs +93 -9
  35. package/dist/processes/index.d.ts +12 -1
  36. package/dist/processes/index.mjs +93 -9
  37. package/dist/queues/index.cjs +106 -5
  38. package/dist/queues/index.d.ts +12 -1
  39. package/dist/queues/index.mjs +106 -5
  40. package/dist/tasks/index.cjs +100 -4
  41. package/dist/tasks/index.mjs +100 -4
  42. package/dist/traces/index.cjs +218 -4
  43. package/dist/traces/index.d.ts +357 -22
  44. package/dist/traces/index.mjs +219 -5
  45. package/package.json +14 -4
@@ -0,0 +1,615 @@
1
+ import { IUiPath } from '../core/index';
2
+
3
+ /**
4
+ * Simplified universal pagination cursor
5
+ * Used to fetch next/previous pages
6
+ */
7
+ interface PaginationCursor {
8
+ /** Opaque string containing all information needed to fetch next page */
9
+ value: string;
10
+ }
11
+ /**
12
+ * Discriminated union for pagination methods - ensures cursor and jumpToPage are mutually exclusive
13
+ */
14
+ type PaginationMethodUnion = {
15
+ cursor?: PaginationCursor;
16
+ jumpToPage?: never;
17
+ } | {
18
+ cursor?: never;
19
+ jumpToPage?: number;
20
+ } | {
21
+ cursor?: never;
22
+ jumpToPage?: never;
23
+ };
24
+ /**
25
+ * Pagination options. Users cannot specify both cursor and jumpToPage.
26
+ */
27
+ type PaginationOptions = {
28
+ /** Size of the page to fetch (items per page) */
29
+ pageSize?: number;
30
+ } & PaginationMethodUnion;
31
+ /**
32
+ * Paginated response containing items and navigation information
33
+ */
34
+ interface PaginatedResponse<T> {
35
+ /** The items in the current page */
36
+ items: T[];
37
+ /** Total count of items across all pages (if available) */
38
+ totalCount?: number;
39
+ /** Whether more pages are available */
40
+ hasNextPage: boolean;
41
+ /** Cursor to fetch the next page (if available) */
42
+ nextCursor?: PaginationCursor;
43
+ /** Cursor to fetch the previous page (if available) */
44
+ previousCursor?: PaginationCursor;
45
+ /** Current page number (1-based, if available) */
46
+ currentPage?: number;
47
+ /** Total number of pages (if available) */
48
+ totalPages?: number;
49
+ /** Whether this pagination type supports jumping to arbitrary pages */
50
+ supportsPageJump: boolean;
51
+ }
52
+ /**
53
+ * Response for non-paginated calls that includes both data and total count
54
+ */
55
+ interface NonPaginatedResponse<T> {
56
+ items: T[];
57
+ totalCount?: number;
58
+ }
59
+ /**
60
+ * Helper type for defining paginated method overloads
61
+ * Creates a union type of all ways pagination can be triggered
62
+ */
63
+ type HasPaginationOptions<T> = (T & {
64
+ pageSize: number;
65
+ }) | (T & {
66
+ cursor: PaginationCursor;
67
+ }) | (T & {
68
+ jumpToPage: number;
69
+ });
70
+
71
+ /**
72
+ * Pagination types supported by the SDK
73
+ */
74
+ declare enum PaginationType {
75
+ OFFSET = "offset",
76
+ TOKEN = "token"
77
+ }
78
+ /**
79
+ * Interface for service access methods needed by pagination helpers
80
+ */
81
+ interface PaginationServiceAccess {
82
+ get<T>(path: string, options?: any): Promise<{
83
+ data: T;
84
+ }>;
85
+ post<T>(path: string, body?: any, options?: any): Promise<{
86
+ data: T;
87
+ }>;
88
+ requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
89
+ }
90
+ /**
91
+ * Field names for extracting data from paginated responses.
92
+ */
93
+ interface PaginationFieldNames {
94
+ itemsField?: string;
95
+ totalCountField?: string;
96
+ continuationTokenField?: string;
97
+ }
98
+ /**
99
+ * Options for the requestWithPagination method in BaseService.
100
+ */
101
+ interface RequestWithPaginationOptions extends RequestSpec {
102
+ pagination: PaginationFieldNames & {
103
+ paginationType: PaginationType;
104
+ paginationParams?: {
105
+ pageSizeParam?: string;
106
+ offsetParam?: string;
107
+ tokenParam?: string;
108
+ countParam?: string;
109
+ convertToSkip?: boolean;
110
+ zeroBased?: boolean;
111
+ };
112
+ };
113
+ }
114
+
115
+ /**
116
+ * HTTP methods supported by the API client
117
+ */
118
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
119
+ /**
120
+ * Supported response types for API requests
121
+ */
122
+ type ResponseType = 'json' | 'text' | 'blob' | 'arraybuffer' | 'stream';
123
+ /**
124
+ * Query parameters type with support for arrays and nested objects
125
+ */
126
+ type QueryParams = Record<string, string | number | boolean | Array<string | number | boolean> | null | undefined>;
127
+ /**
128
+ * Standard HTTP headers type
129
+ */
130
+ type Headers = Record<string, string>;
131
+ /**
132
+ * Options for request retries
133
+ */
134
+ interface RetryOptions {
135
+ /** Maximum number of retry attempts */
136
+ maxRetries?: number;
137
+ /** Base delay between retries in milliseconds */
138
+ retryDelay?: number;
139
+ /** Whether to use exponential backoff */
140
+ useExponentialBackoff?: boolean;
141
+ /** Status codes that should trigger a retry */
142
+ retryableStatusCodes?: number[];
143
+ }
144
+ /**
145
+ * Options for request timeouts
146
+ */
147
+ interface TimeoutOptions {
148
+ /** Request timeout in milliseconds */
149
+ timeout?: number;
150
+ /** Whether to abort the request on timeout */
151
+ abortOnTimeout?: boolean;
152
+ }
153
+ /**
154
+ * Options for request body transformation
155
+ */
156
+ interface BodyOptions {
157
+ /** Whether to stringify the body */
158
+ stringify?: boolean;
159
+ /** Content type override */
160
+ contentType?: string;
161
+ }
162
+ /**
163
+ * Pagination metadata for API requests
164
+ */
165
+ interface PaginationMetadata {
166
+ /** Type of pagination used by the API endpoint */
167
+ paginationType: PaginationType;
168
+ /** Response field containing items array (defaults to 'value') */
169
+ itemsField?: string;
170
+ /** Response field containing total count (defaults to '@odata.count') */
171
+ totalCountField?: string;
172
+ /** Response field containing continuation token (defaults to 'continuationToken') */
173
+ continuationTokenField?: string;
174
+ }
175
+ /**
176
+ * Base interface for all API requests
177
+ */
178
+ interface RequestSpec {
179
+ /** HTTP method for the request */
180
+ method?: HttpMethod;
181
+ /** URL endpoint for the request */
182
+ url?: string;
183
+ /** Query parameters to be appended to the URL */
184
+ params?: QueryParams;
185
+ /** HTTP headers to include with the request */
186
+ headers?: Headers;
187
+ /** Raw body content (takes precedence over data) */
188
+ body?: unknown;
189
+ /** Expected response type */
190
+ responseType?: ResponseType;
191
+ /** Request timeout options */
192
+ timeoutOptions?: TimeoutOptions;
193
+ /** Retry behavior options */
194
+ retryOptions?: RetryOptions;
195
+ /** Body transformation options */
196
+ bodyOptions?: BodyOptions;
197
+ /** AbortSignal for cancelling the request */
198
+ signal?: AbortSignal;
199
+ /** Pagination metadata for the request */
200
+ pagination?: PaginationMetadata;
201
+ }
202
+
203
+ interface ApiResponse<T> {
204
+ data: T;
205
+ }
206
+ /**
207
+ * Base class for all UiPath SDK services.
208
+ *
209
+ * Provides common functionality for authentication, configuration, and API communication.
210
+ * All service classes extend this base to inherit dependency injection and HTTP client access.
211
+ *
212
+ * This class implements the dependency injection pattern where services receive a configured
213
+ * UiPath instance. The ApiClient is created internally and handles all HTTP operations
214
+ * including authentication token management.
215
+ *
216
+ * @remarks
217
+ * Service classes should extend this base and call `super(uiPath)` in their constructor.
218
+ * Protected HTTP methods (get, post, put, patch, delete) are available to all subclasses.
219
+ *
220
+ */
221
+ declare class BaseService {
222
+ #private;
223
+ /**
224
+ * SDK configuration (read-only). Available to subclasses so they can
225
+ * fall back to init-time defaults like `folderKey`.
226
+ */
227
+ protected readonly config: {
228
+ folderKey?: string;
229
+ };
230
+ /**
231
+ * Creates a base service instance with dependency injection.
232
+ *
233
+ * Extracts configuration, execution context, and token manager from the UiPath instance
234
+ * to initialize an authenticated API client. The ApiClient handles all HTTP operations
235
+ * and token management internally.
236
+ *
237
+ * @param instance - UiPath SDK instance providing authentication and configuration.
238
+ * Services receive this via dependency injection in the modular pattern.
239
+ * @param headers - Optional default headers to include in every request (e.g. `x-uipath-external-user-id` for
240
+ * CAS external-app auth)
241
+ *
242
+ * @example
243
+ * ```typescript
244
+ * // Services automatically call this via super()
245
+ * export class EntityService extends BaseService {
246
+ * constructor(instance: IUiPath) {
247
+ * super(instance); // Initializes the internal ApiClient
248
+ * }
249
+ * }
250
+ *
251
+ * // Usage in modular pattern
252
+ * import { UiPath } from '@uipath/uipath-typescript/core';
253
+ * import { Entities } from '@uipath/uipath-typescript/entities';
254
+ *
255
+ * const sdk = new UiPath(config);
256
+ * await sdk.initialize();
257
+ * const entities = new Entities(sdk);
258
+ * ```
259
+ */
260
+ constructor(instance: IUiPath, headers?: Record<string, string>);
261
+ /**
262
+ * Gets a valid authentication token, refreshing if necessary.
263
+ * Use this when you need to manually add Authorization headers (e.g., direct uploads).
264
+ *
265
+ * @returns Promise resolving to a valid access token string
266
+ * @throws AuthenticationError if no token is available or refresh fails
267
+ */
268
+ protected getValidAuthToken(): Promise<string>;
269
+ /**
270
+ * Creates a service accessor for pagination helpers
271
+ * This allows pagination helpers to access protected methods without making them public
272
+ */
273
+ protected createPaginationServiceAccess(): PaginationServiceAccess;
274
+ protected request<T>(method: string, path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
275
+ protected requestWithSpec<T>(spec: RequestSpec): Promise<ApiResponse<T>>;
276
+ protected get<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
277
+ protected post<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
278
+ protected put<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
279
+ protected patch<T>(path: string, data?: unknown, options?: RequestSpec): Promise<ApiResponse<T>>;
280
+ protected delete<T>(path: string, options?: RequestSpec): Promise<ApiResponse<T>>;
281
+ /**
282
+ * Execute a request with cursor-based pagination
283
+ */
284
+ protected requestWithPagination<T>(method: string, path: string, paginationOptions: PaginationOptions, options: RequestWithPaginationOptions): Promise<PaginatedResponse<T>>;
285
+ /**
286
+ * Validates and prepares pagination parameters from options
287
+ */
288
+ private validateAndPreparePaginationParams;
289
+ /**
290
+ * Prepares request parameters for pagination based on pagination type
291
+ */
292
+ private preparePaginationRequestParams;
293
+ /**
294
+ * Creates a paginated response from API response
295
+ */
296
+ private createPaginatedResponseFromResponse;
297
+ /**
298
+ * Determines if there are more pages based on pagination type and metadata
299
+ */
300
+ private determineHasMorePages;
301
+ }
302
+
303
+ /**
304
+ * Standardized result interface for all operation methods (pause, cancel, complete, update, upload, etc.)
305
+ * Success responses include data from the request context or API response
306
+ */
307
+ interface OperationResponse<TData> {
308
+ /**
309
+ * Whether the operation was successful
310
+ */
311
+ success: boolean;
312
+ /**
313
+ * Response data (can contain error details in case of failure)
314
+ */
315
+ data: TData;
316
+ }
317
+
318
+ /**
319
+ * Notification inbox types — raw API shapes and request/response options.
320
+ */
321
+
322
+ /**
323
+ * Priority level assigned to a notification by the publisher.
324
+ */
325
+ declare enum NotificationPriority {
326
+ Low = "Low",
327
+ Medium = "Medium",
328
+ High = "High",
329
+ Critical = "Critical"
330
+ }
331
+ /**
332
+ * Severity classification of a notification topic.
333
+ */
334
+ declare enum NotificationCategory {
335
+ /** Informational — no action required. */
336
+ Info = "Info",
337
+ /** Successful operation completed. */
338
+ Success = "Success",
339
+ /** Warning — degraded behaviour or non-fatal issue. */
340
+ Warn = "Warn",
341
+ /** Error — operation failed but the system continues. */
342
+ Error = "Error",
343
+ /** Fatal — unrecoverable failure. */
344
+ Fatal = "Fatal"
345
+ }
346
+ /**
347
+ * Notification entry as returned by `GET /odata/v1/NotificationEntry`.
348
+ *
349
+ * Field selection: many internal/transport-layer fields (`partitionKey`, `correlationId`,
350
+ * `publicationId`, `messageVersion`, `messageTemplateKey`, `serviceRegistryName`,
351
+ * `entityOrgName`, `entityTenantName`) are returned by the API but dropped from the SDK
352
+ * because they have no use for an application developer.
353
+ */
354
+ interface NotificationGetResponse {
355
+ /** Notification GUID. */
356
+ id: string;
357
+ /** Resolved notification message text. */
358
+ message: string | null;
359
+ /** Whether the user has read this notification. */
360
+ hasRead: boolean;
361
+ /** Name of the publisher (e.g. `Orchestrator`, `Actions`). */
362
+ publisherName: string;
363
+ /** Publisher GUID. */
364
+ publisherId: string;
365
+ /** Human-readable topic name. */
366
+ topicName: string;
367
+ /** Stable topic identifier (e.g. `Process.JobExecution.Faulted`). */
368
+ topicKeyName: string;
369
+ /** Topic GUID. */
370
+ topicId: string;
371
+ /** GUID of the user this notification belongs to (returned uppercase by the API). */
372
+ userId: string;
373
+ /** Email of the user. Often `null`. */
374
+ userEmail: string | null;
375
+ /** Tenant GUID this notification belongs to. Often `null` for org-scoped notifications. */
376
+ tenantId: string | null;
377
+ /** Notification priority. */
378
+ priority: NotificationPriority;
379
+ /** Notification severity category. */
380
+ category: NotificationCategory;
381
+ /** JSON string of template parameters — parse with `JSON.parse()`. May be `null`. */
382
+ messageParam: string | null;
383
+ /** URL to navigate to when the notification is clicked. */
384
+ redirectionUrl: string | null;
385
+ /** Unix epoch **seconds** when the notification was published. */
386
+ publishedOn: number;
387
+ }
388
+ /**
389
+ * Options for `Notifications.getAll()`.
390
+ *
391
+ * Supports OData query options (`filter`, `orderby`) and SDK cursor pagination.
392
+ *
393
+ * Notes:
394
+ * - `$select` and `$expand` are not exposed because the API returns 500 on `$select`
395
+ * and there are no expandable relationships on this endpoint.
396
+ */
397
+ type NotificationGetAllOptions = PaginationOptions & {
398
+ filter?: string;
399
+ orderby?: string;
400
+ };
401
+ /**
402
+ * Response from `markAsRead()` / `markAsUnread()`.
403
+ *
404
+ * `notificationIds` echoes the IDs that were marked; `read` reflects the new state.
405
+ */
406
+ type NotificationUpdateReadResponse = OperationResponse<{
407
+ notificationIds: string[];
408
+ read: boolean;
409
+ }>;
410
+ /**
411
+ * Response from `markAllAsRead()`.
412
+ */
413
+ type NotificationMarkAllReadResponse = OperationResponse<{
414
+ all: true;
415
+ read: true;
416
+ }>;
417
+
418
+ /**
419
+ * Notification service model — public response shapes and the ServiceModel interface
420
+ * that drives generated API documentation.
421
+ */
422
+
423
+ /**
424
+ * Public surface of the Notifications service. JSDoc on this interface drives
425
+ * the generated API reference documentation.
426
+ *
427
+ * Every method takes the tenant GUID as the first argument — the notification
428
+ * API identifies the acting tenant via the `X-UIPATH-Internal-TenantId` header
429
+ * and the SDK forwards `tenantId` into that header on each call.
430
+ */
431
+ interface NotificationServiceModel {
432
+ /**
433
+ * Lists notifications from the current user's inbox.
434
+ *
435
+ * Returns the full list when no pagination params are provided, or a paginated cursor result
436
+ * when any of `pageSize`/`cursor`/`jumpToPage` is supplied. Supports OData `filter` and
437
+ * `orderby` query options.
438
+ *
439
+ * @param tenantId - Tenant GUID
440
+ * @param options - Optional OData query and pagination options
441
+ * @returns Promise resolving to either a {@link NonPaginatedResponse}<{@link NotificationGetResponse}> or a {@link PaginatedResponse}<{@link NotificationGetResponse}> when pagination options are used.
442
+ *
443
+ * @example Basic usage
444
+ * ```typescript
445
+ * import { Notifications } from '@uipath/uipath-typescript/notifications';
446
+ *
447
+ * const notifications = new Notifications(sdk);
448
+ * const all = await notifications.getAll('<tenantId>');
449
+ * ```
450
+ *
451
+ * @example Filter unread, most recent first
452
+ * ```typescript
453
+ * const unread = await notifications.getAll('<tenantId>', {
454
+ * filter: 'hasRead eq false',
455
+ * orderby: 'publishedOn desc',
456
+ * });
457
+ * ```
458
+ *
459
+ * @example First page with pagination
460
+ * ```typescript
461
+ * const page1 = await notifications.getAll('<tenantId>', { pageSize: 20 });
462
+ * if (page1.hasNextPage) {
463
+ * const page2 = await notifications.getAll('<tenantId>', { cursor: page1.nextCursor });
464
+ * }
465
+ * ```
466
+ * @internal
467
+ */
468
+ getAll<T extends NotificationGetAllOptions = NotificationGetAllOptions>(tenantId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<NotificationGetResponse> : NonPaginatedResponse<NotificationGetResponse>>;
469
+ /**
470
+ * Marks the given notifications as read.
471
+ *
472
+ * @param tenantId - Tenant GUID
473
+ * @param notificationIds - GUIDs of notifications to mark read
474
+ * @returns Operation result echoing the affected IDs and new read state
475
+ * {@link NotificationUpdateReadResponse}
476
+ *
477
+ * @example
478
+ * ```typescript
479
+ * await notifications.markAsRead('<tenantId>', ['<notificationId-1>', '<notificationId-2>']);
480
+ * ```
481
+ * @internal
482
+ */
483
+ markAsRead(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>;
484
+ /**
485
+ * Marks the given notifications as unread.
486
+ *
487
+ * @param tenantId - Tenant GUID
488
+ * @param notificationIds - GUIDs of notifications to mark unread
489
+ * @returns Operation result echoing the affected IDs and new read state
490
+ * {@link NotificationUpdateReadResponse}
491
+ *
492
+ * @example
493
+ * ```typescript
494
+ * await notifications.markAsUnread('<tenantId>', ['<notificationId>']);
495
+ * ```
496
+ * @internal
497
+ */
498
+ markAsUnread(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>;
499
+ /**
500
+ * Marks all notifications in the current user's inbox as read.
501
+ *
502
+ * @param tenantId - Tenant GUID
503
+ * @returns Operation result confirming the bulk update
504
+ * {@link NotificationMarkAllReadResponse}
505
+ *
506
+ * @example
507
+ * ```typescript
508
+ * await notifications.markAllAsRead('<tenantId>');
509
+ * ```
510
+ * @internal
511
+ */
512
+ markAllAsRead(tenantId: string): Promise<NotificationMarkAllReadResponse>;
513
+ }
514
+
515
+ /**
516
+ * NotificationService — manages the current user's notification inbox.
517
+ */
518
+
519
+ /**
520
+ * Service for interacting with the UiPath Notification inbox.
521
+ *
522
+ * Provides inbox operations against the current user's notifications (the
523
+ * `/odata/v1/NotificationEntry` API).
524
+ *
525
+ * Every public method takes the acting tenant GUID as the first argument — the
526
+ * notification API identifies the tenant via the `X-UIPATH-Internal-TenantId`
527
+ * header and the SDK forwards `tenantId` into that header on each call.
528
+ */
529
+ declare class NotificationService extends BaseService implements NotificationServiceModel {
530
+ /**
531
+ * Lists notifications from the current user's inbox.
532
+ *
533
+ * Returns the full list when no pagination params are provided, or a paginated cursor result
534
+ * when any of `pageSize`/`cursor`/`jumpToPage` is supplied. Supports OData `filter` and
535
+ * `orderby` query options.
536
+ *
537
+ * @param tenantId - Tenant GUID
538
+ * @param options - Optional OData query and pagination options
539
+ * @returns Promise resolving to either a {@link NonPaginatedResponse}<{@link NotificationGetResponse}> or a {@link PaginatedResponse}<{@link NotificationGetResponse}> when pagination options are used.
540
+ *
541
+ * @example Basic usage
542
+ * ```typescript
543
+ * import { Notifications } from '@uipath/uipath-typescript/notifications';
544
+ *
545
+ * const notifications = new Notifications(sdk);
546
+ * const all = await notifications.getAll('<tenantId>');
547
+ * ```
548
+ *
549
+ * @example Filter unread, most recent first
550
+ * ```typescript
551
+ * const unread = await notifications.getAll('<tenantId>', {
552
+ * filter: 'hasRead eq false',
553
+ * orderby: 'publishedOn desc',
554
+ * });
555
+ * ```
556
+ *
557
+ * @example First page with pagination
558
+ * ```typescript
559
+ * const page1 = await notifications.getAll('<tenantId>', { pageSize: 20 });
560
+ * if (page1.hasNextPage) {
561
+ * const page2 = await notifications.getAll('<tenantId>', { cursor: page1.nextCursor });
562
+ * }
563
+ * ```
564
+ * @internal
565
+ */
566
+ getAll<T extends NotificationGetAllOptions = NotificationGetAllOptions>(tenantId: string, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<NotificationGetResponse> : NonPaginatedResponse<NotificationGetResponse>>;
567
+ /**
568
+ * Marks the given notifications as read.
569
+ *
570
+ * @param tenantId - Tenant GUID
571
+ * @param notificationIds - GUIDs of notifications to mark read
572
+ * @returns Operation result echoing the affected IDs and new read state
573
+ * {@link NotificationUpdateReadResponse}
574
+ *
575
+ * @example
576
+ * ```typescript
577
+ * await notifications.markAsRead('<tenantId>', ['<notificationId-1>', '<notificationId-2>']);
578
+ * ```
579
+ * @internal
580
+ */
581
+ markAsRead(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>;
582
+ /**
583
+ * Marks the given notifications as unread.
584
+ *
585
+ * @param tenantId - Tenant GUID
586
+ * @param notificationIds - GUIDs of notifications to mark unread
587
+ * @returns Operation result echoing the affected IDs and new read state
588
+ * {@link NotificationUpdateReadResponse}
589
+ *
590
+ * @example
591
+ * ```typescript
592
+ * await notifications.markAsUnread('<tenantId>', ['<notificationId>']);
593
+ * ```
594
+ * @internal
595
+ */
596
+ markAsUnread(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>;
597
+ /**
598
+ * Marks all notifications in the current user's inbox as read.
599
+ *
600
+ * @param tenantId - Tenant GUID
601
+ * @returns Operation result confirming the bulk update
602
+ * {@link NotificationMarkAllReadResponse}
603
+ *
604
+ * @example
605
+ * ```typescript
606
+ * await notifications.markAllAsRead('<tenantId>');
607
+ * ```
608
+ * @internal
609
+ */
610
+ markAllAsRead(tenantId: string): Promise<NotificationMarkAllReadResponse>;
611
+ private updateRead;
612
+ }
613
+
614
+ export { NotificationCategory, NotificationPriority, NotificationService as Notifications };
615
+ export type { NotificationGetAllOptions, NotificationGetResponse, NotificationMarkAllReadResponse, NotificationServiceModel, NotificationUpdateReadResponse };