@uipath/uipath-typescript 1.3.4 → 1.3.6
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 +1 -1
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.mjs +1 -1
- package/dist/attachments/index.cjs +1 -1
- package/dist/attachments/index.mjs +1 -1
- package/dist/buckets/index.cjs +1 -1
- package/dist/buckets/index.mjs +1 -1
- package/dist/cases/index.cjs +1 -1
- package/dist/cases/index.mjs +1 -1
- package/dist/conversational-agent/index.cjs +1 -1
- package/dist/conversational-agent/index.mjs +1 -1
- package/dist/core/index.cjs +29 -4
- package/dist/core/index.d.ts +11 -1
- package/dist/core/index.mjs +29 -4
- package/dist/document-understanding/index.cjs +257 -0
- package/dist/document-understanding/index.d.ts +1185 -0
- package/dist/document-understanding/index.mjs +255 -0
- package/dist/entities/index.cjs +236 -15
- package/dist/entities/index.d.ts +81 -0
- package/dist/entities/index.mjs +236 -15
- package/dist/feedback/index.cjs +38 -4
- package/dist/feedback/index.d.ts +52 -1
- package/dist/feedback/index.mjs +38 -4
- package/dist/index.cjs +519 -18
- package/dist/index.d.ts +1313 -8
- package/dist/index.mjs +521 -21
- package/dist/index.umd.js +519 -18
- package/dist/jobs/index.cjs +1 -1
- package/dist/jobs/index.mjs +1 -1
- package/dist/maestro-processes/index.cjs +1 -1
- package/dist/maestro-processes/index.mjs +1 -1
- package/dist/processes/index.cjs +1 -1
- package/dist/processes/index.mjs +1 -1
- package/dist/queues/index.cjs +1 -1
- package/dist/queues/index.mjs +1 -1
- package/dist/tasks/index.cjs +1 -1
- package/dist/tasks/index.mjs +1 -1
- package/package.json +11 -1
package/dist/feedback/index.mjs
CHANGED
|
@@ -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';
|
|
@@ -1555,6 +1556,7 @@ const LLMOPS_BASE = 'llmopstenant_';
|
|
|
1555
1556
|
*/
|
|
1556
1557
|
const FEEDBACK_ENDPOINTS = {
|
|
1557
1558
|
GET_ALL: `${LLMOPS_BASE}/api/Feedback`,
|
|
1559
|
+
GET_BY_ID: (id) => `${LLMOPS_BASE}/api/Feedback/${id}`,
|
|
1558
1560
|
};
|
|
1559
1561
|
|
|
1560
1562
|
/**
|
|
@@ -1563,7 +1565,7 @@ const FEEDBACK_ENDPOINTS = {
|
|
|
1563
1565
|
// Connection string placeholder that will be replaced during build
|
|
1564
1566
|
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
1567
|
// SDK Version placeholder
|
|
1566
|
-
const SDK_VERSION = "1.3.
|
|
1568
|
+
const SDK_VERSION = "1.3.6";
|
|
1567
1569
|
const VERSION = "Version";
|
|
1568
1570
|
const SERVICE = "Service";
|
|
1569
1571
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -1789,8 +1791,9 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
|
|
|
1789
1791
|
// Track the event if enabled
|
|
1790
1792
|
if (shouldTrack) {
|
|
1791
1793
|
// Use the full name provided in the decorator (e.g., "Queue.GetAll")
|
|
1792
|
-
const serviceMethod = nameOrOptions
|
|
1793
|
-
|
|
1794
|
+
const serviceMethod = typeof nameOrOptions === 'string'
|
|
1795
|
+
? nameOrOptions
|
|
1796
|
+
: fallbackName;
|
|
1794
1797
|
// Use 'Sdk.Run' as the name and serviceMethod as the service
|
|
1795
1798
|
telemetryClient.track(serviceMethod, SDK_RUN_EVENT, opts.attributes);
|
|
1796
1799
|
}
|
|
@@ -1819,7 +1822,7 @@ function createTrackedFunction(originalFunction, nameOrOptions, fallbackName, op
|
|
|
1819
1822
|
*/
|
|
1820
1823
|
function track(nameOrOptions, options) {
|
|
1821
1824
|
return function decorator(_target, propertyKey, descriptor) {
|
|
1822
|
-
const opts = {};
|
|
1825
|
+
const opts = typeof nameOrOptions === 'object' ? nameOrOptions : {};
|
|
1823
1826
|
if (descriptor && typeof descriptor.value === 'function') {
|
|
1824
1827
|
// Method decorator
|
|
1825
1828
|
descriptor.value = createTrackedFunction(descriptor.value, nameOrOptions, propertyKey || 'unknown_method', opts);
|
|
@@ -1888,10 +1891,41 @@ class FeedbackService extends BaseService {
|
|
|
1888
1891
|
excludeFromPrefix: Object.keys(options || {}),
|
|
1889
1892
|
}, options);
|
|
1890
1893
|
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Gets a single feedback entry by its feedback ID.
|
|
1896
|
+
*
|
|
1897
|
+
* @param id - Feedback ID (GUID) of the feedback entry
|
|
1898
|
+
* @param options - Required options including folderKey for folder-level authorization {@link FeedbackOptions}
|
|
1899
|
+
* @returns Promise resolving to {@link FeedbackGetResponse}
|
|
1900
|
+
* @example
|
|
1901
|
+
* ```typescript
|
|
1902
|
+
* import { Feedback } from '@uipath/uipath-typescript/feedback';
|
|
1903
|
+
*
|
|
1904
|
+
* const feedback = new Feedback(sdk);
|
|
1905
|
+
*
|
|
1906
|
+
* // First, get feedback entries to obtain the ID and folder key
|
|
1907
|
+
* const allFeedback = await feedback.getAll({ pageSize: 10 });
|
|
1908
|
+
* const feedbackId = allFeedback.items[0].id;
|
|
1909
|
+
* const folderKey = allFeedback.items[0].folderKey;
|
|
1910
|
+
* const item = await feedback.getById(feedbackId, { folderKey });
|
|
1911
|
+
* console.log(item.isPositive, item.comment, item.status);
|
|
1912
|
+
* ```
|
|
1913
|
+
*/
|
|
1914
|
+
async getById(id, options) {
|
|
1915
|
+
if (!id)
|
|
1916
|
+
throw new ValidationError({ message: 'Feedback ID is required for getById' });
|
|
1917
|
+
if (!options?.folderKey)
|
|
1918
|
+
throw new ValidationError({ message: 'folderKey is required for getById' });
|
|
1919
|
+
const response = await this.get(FEEDBACK_ENDPOINTS.GET_BY_ID(id), { headers: createHeaders({ [FOLDER_KEY]: options?.folderKey }) });
|
|
1920
|
+
return transformData(response.data, FeedbackMap);
|
|
1921
|
+
}
|
|
1891
1922
|
}
|
|
1892
1923
|
__decorate([
|
|
1893
1924
|
track('Feedback.GetAll')
|
|
1894
1925
|
], FeedbackService.prototype, "getAll", null);
|
|
1926
|
+
__decorate([
|
|
1927
|
+
track('Feedback.GetById')
|
|
1928
|
+
], FeedbackService.prototype, "getById", null);
|
|
1895
1929
|
|
|
1896
1930
|
/**
|
|
1897
1931
|
* Status of a feedback entry in the review workflow
|