@uipath/uipath-typescript 1.3.5 → 1.3.7

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 +1 -1
  2. package/dist/assets/index.cjs +204 -2
  3. package/dist/assets/index.d.ts +112 -13
  4. package/dist/assets/index.mjs +204 -2
  5. package/dist/attachments/index.cjs +3 -2
  6. package/dist/attachments/index.d.ts +7 -0
  7. package/dist/attachments/index.mjs +3 -2
  8. package/dist/buckets/index.cjs +172 -2
  9. package/dist/buckets/index.d.ts +56 -12
  10. package/dist/buckets/index.mjs +172 -2
  11. package/dist/cases/index.cjs +3 -2
  12. package/dist/cases/index.d.ts +7 -0
  13. package/dist/cases/index.mjs +3 -2
  14. package/dist/conversational-agent/index.cjs +196 -81
  15. package/dist/conversational-agent/index.d.ts +326 -80
  16. package/dist/conversational-agent/index.mjs +195 -80
  17. package/dist/core/index.cjs +44 -7
  18. package/dist/core/index.d.ts +11 -1
  19. package/dist/core/index.mjs +44 -7
  20. package/dist/entities/index.cjs +35 -6
  21. package/dist/entities/index.d.ts +101 -11
  22. package/dist/entities/index.mjs +36 -7
  23. package/dist/feedback/index.cjs +40 -5
  24. package/dist/feedback/index.d.ts +59 -1
  25. package/dist/feedback/index.mjs +40 -5
  26. package/dist/index.cjs +312 -14
  27. package/dist/index.d.ts +515 -32
  28. package/dist/index.mjs +313 -15
  29. package/dist/index.umd.js +312 -14
  30. package/dist/jobs/index.cjs +172 -2
  31. package/dist/jobs/index.d.ts +67 -23
  32. package/dist/jobs/index.mjs +172 -2
  33. package/dist/maestro-processes/index.cjs +3 -2
  34. package/dist/maestro-processes/index.d.ts +7 -0
  35. package/dist/maestro-processes/index.mjs +3 -2
  36. package/dist/processes/index.cjs +240 -3
  37. package/dist/processes/index.d.ts +124 -2
  38. package/dist/processes/index.mjs +240 -3
  39. package/dist/queues/index.cjs +172 -2
  40. package/dist/queues/index.d.ts +56 -12
  41. package/dist/queues/index.mjs +172 -2
  42. package/dist/tasks/index.cjs +3 -2
  43. package/dist/tasks/index.d.ts +7 -0
  44. package/dist/tasks/index.mjs +3 -2
  45. package/package.json +1 -1
@@ -218,6 +218,13 @@ interface ApiResponse<T> {
218
218
  */
219
219
  declare class BaseService {
220
220
  #private;
221
+ /**
222
+ * SDK configuration (read-only). Available to subclasses so they can
223
+ * fall back to init-time defaults like `folderKey`.
224
+ */
225
+ protected readonly config: {
226
+ folderKey?: string;
227
+ };
221
228
  /**
222
229
  * Creates a base service instance with dependency injection.
223
230
  *
@@ -342,6 +349,8 @@ interface FeedbackGetResponse {
342
349
  isPositive: boolean;
343
350
  /** Categories associated with this feedback entry */
344
351
  feedbackCategories: FeedbackCategory[];
352
+ /** Folder key (GUID) of the folder the feedback belongs to */
353
+ folderKey?: string;
345
354
  /** Email address of the user who submitted the feedback */
346
355
  userEmail?: string;
347
356
  /** Current status of the feedback in the review workflow */
@@ -351,6 +360,13 @@ interface FeedbackGetResponse {
351
360
  /** Timestamp when the feedback was last updated */
352
361
  updatedTime: string;
353
362
  }
363
+ /**
364
+ * Options shared across feedback operations
365
+ */
366
+ interface FeedbackOptions {
367
+ /** Folder key for authorization */
368
+ folderKey: string;
369
+ }
354
370
  /**
355
371
  * Options for retrieving multiple feedback entries
356
372
  */
@@ -425,6 +441,27 @@ interface FeedbackServiceModel {
425
441
  * ```
426
442
  */
427
443
  getAll<T extends FeedbackGetAllOptions = FeedbackGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<FeedbackGetResponse> : NonPaginatedResponse<FeedbackGetResponse>>;
444
+ /**
445
+ * Gets a single feedback entry by its feedback ID.
446
+ *
447
+ * @param id - Feedback ID (GUID) of the feedback entry
448
+ * @param options - Required options including folderKey for folder-level authorization {@link FeedbackOptions}
449
+ * @returns Promise resolving to {@link FeedbackGetResponse}
450
+ * @example
451
+ * ```typescript
452
+ * import { Feedback } from '@uipath/uipath-typescript/feedback';
453
+ *
454
+ * const feedback = new Feedback(sdk);
455
+ *
456
+ * // First, get feedback entries to obtain the ID and folder key
457
+ * const allFeedback = await feedback.getAll({ pageSize: 10 });
458
+ * const feedbackId = allFeedback.items[0].id;
459
+ * const folderKey = allFeedback.items[0].folderKey;
460
+ * const item = await feedback.getById(feedbackId, { folderKey });
461
+ * console.log(item.isPositive, item.comment, item.status);
462
+ * ```
463
+ */
464
+ getById(id: string, options: FeedbackOptions): Promise<FeedbackGetResponse>;
428
465
  }
429
466
 
430
467
  /**
@@ -469,7 +506,28 @@ declare class FeedbackService extends BaseService implements FeedbackServiceMode
469
506
  * ```
470
507
  */
471
508
  getAll<T extends FeedbackGetAllOptions = FeedbackGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<FeedbackGetResponse> : NonPaginatedResponse<FeedbackGetResponse>>;
509
+ /**
510
+ * Gets a single feedback entry by its feedback ID.
511
+ *
512
+ * @param id - Feedback ID (GUID) of the feedback entry
513
+ * @param options - Required options including folderKey for folder-level authorization {@link FeedbackOptions}
514
+ * @returns Promise resolving to {@link FeedbackGetResponse}
515
+ * @example
516
+ * ```typescript
517
+ * import { Feedback } from '@uipath/uipath-typescript/feedback';
518
+ *
519
+ * const feedback = new Feedback(sdk);
520
+ *
521
+ * // First, get feedback entries to obtain the ID and folder key
522
+ * const allFeedback = await feedback.getAll({ pageSize: 10 });
523
+ * const feedbackId = allFeedback.items[0].id;
524
+ * const folderKey = allFeedback.items[0].folderKey;
525
+ * const item = await feedback.getById(feedbackId, { folderKey });
526
+ * console.log(item.isPositive, item.comment, item.status);
527
+ * ```
528
+ */
529
+ getById(id: string, options: FeedbackOptions): Promise<FeedbackGetResponse>;
472
530
  }
473
531
 
474
532
  export { FeedbackService as Feedback, FeedbackStatus };
475
- export type { FeedbackCategory, FeedbackGetAllOptions, FeedbackGetResponse, FeedbackServiceModel };
533
+ export type { FeedbackCategory, FeedbackGetAllOptions, FeedbackGetResponse, FeedbackOptions, FeedbackServiceModel };
@@ -503,6 +503,7 @@ class ErrorFactory {
503
503
  }
504
504
  }
505
505
 
506
+ const FOLDER_KEY = 'X-UIPATH-FolderKey';
506
507
  const FOLDER_ID = 'X-UIPATH-OrganizationUnitId';
507
508
  const TRACEPARENT = 'traceparent';
508
509
  const UIPATH_TRACEPARENT_ID = 'x-uipath-traceparent-id';
@@ -1339,8 +1340,9 @@ class BaseService {
1339
1340
  constructor(instance, headers) {
1340
1341
  // Private field - not visible via Object.keys() or any reflection
1341
1342
  _BaseService_apiClient.set(this, void 0);
1342
- const { config, context, tokenManager } = SDKInternalsRegistry.get(instance);
1343
+ const { config, context, tokenManager, folderKey } = SDKInternalsRegistry.get(instance);
1343
1344
  __classPrivateFieldSet(this, _BaseService_apiClient, new ApiClient(config, context, tokenManager, headers ? { headers } : {}), "f");
1345
+ this.config = { folderKey };
1344
1346
  }
1345
1347
  /**
1346
1348
  * Gets a valid authentication token, refreshing if necessary.
@@ -1555,6 +1557,7 @@ const LLMOPS_BASE = 'llmopstenant_';
1555
1557
  */
1556
1558
  const FEEDBACK_ENDPOINTS = {
1557
1559
  GET_ALL: `${LLMOPS_BASE}/api/Feedback`,
1560
+ GET_BY_ID: (id) => `${LLMOPS_BASE}/api/Feedback/${id}`,
1558
1561
  };
1559
1562
 
1560
1563
  /**
@@ -1563,7 +1566,7 @@ const FEEDBACK_ENDPOINTS = {
1563
1566
  // Connection string placeholder that will be replaced during build
1564
1567
  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";
1565
1568
  // SDK Version placeholder
1566
- const SDK_VERSION = "1.3.5";
1569
+ const SDK_VERSION = "1.3.7";
1567
1570
  const VERSION = "Version";
1568
1571
  const SERVICE = "Service";
1569
1572
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -1789,8 +1792,9 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
1789
1792
  // Track the event if enabled
1790
1793
  if (shouldTrack) {
1791
1794
  // Use the full name provided in the decorator (e.g., "Queue.GetAll")
1792
- const serviceMethod = nameOrOptions
1793
- ;
1795
+ const serviceMethod = typeof nameOrOptions === 'string'
1796
+ ? nameOrOptions
1797
+ : fallbackName;
1794
1798
  // Use 'Sdk.Run' as the name and serviceMethod as the service
1795
1799
  telemetryClient.track(serviceMethod, SDK_RUN_EVENT, opts.attributes);
1796
1800
  }
@@ -1819,7 +1823,7 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
1819
1823
  */
1820
1824
  function track(nameOrOptions, options) {
1821
1825
  return function decorator(_target, propertyKey, descriptor) {
1822
- const opts = {};
1826
+ const opts = typeof nameOrOptions === 'object' ? nameOrOptions : {};
1823
1827
  if (descriptor && typeof descriptor.value === 'function') {
1824
1828
  // Method decorator
1825
1829
  descriptor.value = createTrackedFunction(descriptor.value, nameOrOptions, propertyKey || 'unknown_method', opts);
@@ -1888,10 +1892,41 @@ class FeedbackService extends BaseService {
1888
1892
  excludeFromPrefix: Object.keys(options || {}),
1889
1893
  }, options);
1890
1894
  }
1895
+ /**
1896
+ * Gets a single feedback entry by its feedback ID.
1897
+ *
1898
+ * @param id - Feedback ID (GUID) of the feedback entry
1899
+ * @param options - Required options including folderKey for folder-level authorization {@link FeedbackOptions}
1900
+ * @returns Promise resolving to {@link FeedbackGetResponse}
1901
+ * @example
1902
+ * ```typescript
1903
+ * import { Feedback } from '@uipath/uipath-typescript/feedback';
1904
+ *
1905
+ * const feedback = new Feedback(sdk);
1906
+ *
1907
+ * // First, get feedback entries to obtain the ID and folder key
1908
+ * const allFeedback = await feedback.getAll({ pageSize: 10 });
1909
+ * const feedbackId = allFeedback.items[0].id;
1910
+ * const folderKey = allFeedback.items[0].folderKey;
1911
+ * const item = await feedback.getById(feedbackId, { folderKey });
1912
+ * console.log(item.isPositive, item.comment, item.status);
1913
+ * ```
1914
+ */
1915
+ async getById(id, options) {
1916
+ if (!id)
1917
+ throw new ValidationError({ message: 'Feedback ID is required for getById' });
1918
+ if (!options?.folderKey)
1919
+ throw new ValidationError({ message: 'folderKey is required for getById' });
1920
+ const response = await this.get(FEEDBACK_ENDPOINTS.GET_BY_ID(id), { headers: createHeaders({ [FOLDER_KEY]: options?.folderKey }) });
1921
+ return transformData(response.data, FeedbackMap);
1922
+ }
1891
1923
  }
1892
1924
  __decorate([
1893
1925
  track('Feedback.GetAll')
1894
1926
  ], FeedbackService.prototype, "getAll", null);
1927
+ __decorate([
1928
+ track('Feedback.GetById')
1929
+ ], FeedbackService.prototype, "getById", null);
1895
1930
 
1896
1931
  /**
1897
1932
  * Status of a feedback entry in the review workflow