@uipath/uipath-typescript 1.3.7 → 1.3.8
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/assets/index.cjs +40 -5
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.mjs +40 -5
- package/dist/attachments/index.cjs +40 -5
- package/dist/attachments/index.d.ts +1 -0
- package/dist/attachments/index.mjs +40 -5
- package/dist/buckets/index.cjs +40 -5
- package/dist/buckets/index.d.ts +1 -0
- package/dist/buckets/index.mjs +40 -5
- package/dist/cases/index.cjs +178 -5
- package/dist/cases/index.d.ts +158 -3
- package/dist/cases/index.mjs +179 -6
- package/dist/conversational-agent/index.cjs +40 -5
- package/dist/conversational-agent/index.d.ts +1 -0
- package/dist/conversational-agent/index.mjs +40 -5
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/entities/index.cjs +40 -5
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.mjs +40 -5
- package/dist/feedback/index.cjs +291 -9
- package/dist/feedback/index.d.ts +418 -12
- package/dist/feedback/index.mjs +291 -9
- package/dist/index.cjs +178 -5
- package/dist/index.d.ts +413 -10
- package/dist/index.mjs +179 -6
- package/dist/index.umd.js +178 -5
- package/dist/jobs/index.cjs +40 -5
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.mjs +40 -5
- package/dist/maestro-processes/index.cjs +77 -5
- package/dist/maestro-processes/index.d.ts +1 -0
- package/dist/maestro-processes/index.mjs +77 -5
- package/dist/processes/index.cjs +40 -5
- package/dist/processes/index.d.ts +1 -0
- package/dist/processes/index.mjs +40 -5
- package/dist/queues/index.cjs +40 -5
- package/dist/queues/index.d.ts +1 -0
- package/dist/queues/index.mjs +40 -5
- package/dist/tasks/index.cjs +40 -5
- package/dist/tasks/index.d.ts +1 -0
- package/dist/tasks/index.mjs +40 -5
- package/package.json +1 -1
package/dist/queues/index.mjs
CHANGED
|
@@ -651,6 +651,27 @@ var PaginationType;
|
|
|
651
651
|
/**
|
|
652
652
|
* Collection of utility functions for working with objects
|
|
653
653
|
*/
|
|
654
|
+
/**
|
|
655
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
656
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
657
|
+
* Direct key match takes priority over nested traversal.
|
|
658
|
+
*/
|
|
659
|
+
function resolveNestedField(data, fieldPath) {
|
|
660
|
+
if (!data) {
|
|
661
|
+
return undefined;
|
|
662
|
+
}
|
|
663
|
+
if (fieldPath in data) {
|
|
664
|
+
return data[fieldPath];
|
|
665
|
+
}
|
|
666
|
+
if (!fieldPath.includes('.')) {
|
|
667
|
+
return undefined;
|
|
668
|
+
}
|
|
669
|
+
let value = data;
|
|
670
|
+
for (const part of fieldPath.split('.')) {
|
|
671
|
+
value = value?.[part];
|
|
672
|
+
}
|
|
673
|
+
return value;
|
|
674
|
+
}
|
|
654
675
|
/**
|
|
655
676
|
* Filters out undefined values from an object
|
|
656
677
|
* @param obj The source object
|
|
@@ -891,6 +912,10 @@ const BUCKET_TOKEN_PARAMS = {
|
|
|
891
912
|
TOKEN_PARAM: 'continuationToken'
|
|
892
913
|
};
|
|
893
914
|
|
|
915
|
+
/**
|
|
916
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
917
|
+
* Returns the original value if parsing fails.
|
|
918
|
+
*/
|
|
894
919
|
/**
|
|
895
920
|
* Transforms data by mapping fields according to the provided field mapping
|
|
896
921
|
* @param data The source data to transform
|
|
@@ -1245,7 +1270,8 @@ class PaginationHelpers {
|
|
|
1245
1270
|
// Extract and transform items from response
|
|
1246
1271
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1247
1272
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1248
|
-
const
|
|
1273
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1274
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1249
1275
|
// Parse items - automatically handle JSON string responses
|
|
1250
1276
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1251
1277
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1542,9 +1568,17 @@ class BaseService {
|
|
|
1542
1568
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
1543
1569
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
1544
1570
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
1571
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
1572
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
1573
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
1545
1574
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1575
|
+
if (convertToSkip) {
|
|
1576
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
1577
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
else {
|
|
1581
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
1548
1582
|
}
|
|
1549
1583
|
{
|
|
1550
1584
|
requestParams[countParam] = true;
|
|
@@ -1575,7 +1609,8 @@ class BaseService {
|
|
|
1575
1609
|
// Extract items and metadata
|
|
1576
1610
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1577
1611
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1578
|
-
const
|
|
1612
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1613
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1579
1614
|
const continuationToken = response.data[continuationTokenField];
|
|
1580
1615
|
// Determine if there are more pages
|
|
1581
1616
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1854,7 +1889,7 @@ const QueueMap = {
|
|
|
1854
1889
|
// Connection string placeholder that will be replaced during build
|
|
1855
1890
|
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";
|
|
1856
1891
|
// SDK Version placeholder
|
|
1857
|
-
const SDK_VERSION = "1.3.
|
|
1892
|
+
const SDK_VERSION = "1.3.8";
|
|
1858
1893
|
const VERSION = "Version";
|
|
1859
1894
|
const SERVICE = "Service";
|
|
1860
1895
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/tasks/index.cjs
CHANGED
|
@@ -278,7 +278,7 @@ class NetworkError extends UiPathError {
|
|
|
278
278
|
// Connection string placeholder that will be replaced during build
|
|
279
279
|
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";
|
|
280
280
|
// SDK Version placeholder
|
|
281
|
-
const SDK_VERSION = "1.3.
|
|
281
|
+
const SDK_VERSION = "1.3.8";
|
|
282
282
|
const VERSION = "Version";
|
|
283
283
|
const SERVICE = "Service";
|
|
284
284
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -858,6 +858,27 @@ function createHeaders(headersObj) {
|
|
|
858
858
|
/**
|
|
859
859
|
* Collection of utility functions for working with objects
|
|
860
860
|
*/
|
|
861
|
+
/**
|
|
862
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
863
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
864
|
+
* Direct key match takes priority over nested traversal.
|
|
865
|
+
*/
|
|
866
|
+
function resolveNestedField(data, fieldPath) {
|
|
867
|
+
if (!data) {
|
|
868
|
+
return undefined;
|
|
869
|
+
}
|
|
870
|
+
if (fieldPath in data) {
|
|
871
|
+
return data[fieldPath];
|
|
872
|
+
}
|
|
873
|
+
if (!fieldPath.includes('.')) {
|
|
874
|
+
return undefined;
|
|
875
|
+
}
|
|
876
|
+
let value = data;
|
|
877
|
+
for (const part of fieldPath.split('.')) {
|
|
878
|
+
value = value?.[part];
|
|
879
|
+
}
|
|
880
|
+
return value;
|
|
881
|
+
}
|
|
861
882
|
/**
|
|
862
883
|
* Filters out undefined values from an object
|
|
863
884
|
* @param obj The source object
|
|
@@ -914,6 +935,10 @@ var PaginationType;
|
|
|
914
935
|
PaginationType["TOKEN"] = "token";
|
|
915
936
|
})(PaginationType || (PaginationType = {}));
|
|
916
937
|
|
|
938
|
+
/**
|
|
939
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
940
|
+
* Returns the original value if parsing fails.
|
|
941
|
+
*/
|
|
917
942
|
/**
|
|
918
943
|
* Transforms data by mapping fields according to the provided field mapping
|
|
919
944
|
* @param data The source data to transform
|
|
@@ -1430,7 +1455,8 @@ class PaginationHelpers {
|
|
|
1430
1455
|
// Extract and transform items from response
|
|
1431
1456
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1432
1457
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1433
|
-
const
|
|
1458
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1459
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1434
1460
|
// Parse items - automatically handle JSON string responses
|
|
1435
1461
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1436
1462
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -2147,9 +2173,17 @@ class BaseService {
|
|
|
2147
2173
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
2148
2174
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
2149
2175
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
2176
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
2177
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
2178
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
2150
2179
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
2151
|
-
if (
|
|
2152
|
-
|
|
2180
|
+
if (convertToSkip) {
|
|
2181
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
2182
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
else {
|
|
2186
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
2153
2187
|
}
|
|
2154
2188
|
{
|
|
2155
2189
|
requestParams[countParam] = true;
|
|
@@ -2180,7 +2214,8 @@ class BaseService {
|
|
|
2180
2214
|
// Extract items and metadata
|
|
2181
2215
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
2182
2216
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
2183
|
-
const
|
|
2217
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
2218
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
2184
2219
|
const continuationToken = response.data[continuationTokenField];
|
|
2185
2220
|
// Determine if there are more pages
|
|
2186
2221
|
const hasMore = this.determineHasMorePages(paginationType, {
|
package/dist/tasks/index.d.ts
CHANGED
package/dist/tasks/index.mjs
CHANGED
|
@@ -276,7 +276,7 @@ class NetworkError extends UiPathError {
|
|
|
276
276
|
// Connection string placeholder that will be replaced during build
|
|
277
277
|
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";
|
|
278
278
|
// SDK Version placeholder
|
|
279
|
-
const SDK_VERSION = "1.3.
|
|
279
|
+
const SDK_VERSION = "1.3.8";
|
|
280
280
|
const VERSION = "Version";
|
|
281
281
|
const SERVICE = "Service";
|
|
282
282
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -856,6 +856,27 @@ function createHeaders(headersObj) {
|
|
|
856
856
|
/**
|
|
857
857
|
* Collection of utility functions for working with objects
|
|
858
858
|
*/
|
|
859
|
+
/**
|
|
860
|
+
* Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
|
|
861
|
+
* and dot-separated nested paths (e.g., 'pagination.totalCount').
|
|
862
|
+
* Direct key match takes priority over nested traversal.
|
|
863
|
+
*/
|
|
864
|
+
function resolveNestedField(data, fieldPath) {
|
|
865
|
+
if (!data) {
|
|
866
|
+
return undefined;
|
|
867
|
+
}
|
|
868
|
+
if (fieldPath in data) {
|
|
869
|
+
return data[fieldPath];
|
|
870
|
+
}
|
|
871
|
+
if (!fieldPath.includes('.')) {
|
|
872
|
+
return undefined;
|
|
873
|
+
}
|
|
874
|
+
let value = data;
|
|
875
|
+
for (const part of fieldPath.split('.')) {
|
|
876
|
+
value = value?.[part];
|
|
877
|
+
}
|
|
878
|
+
return value;
|
|
879
|
+
}
|
|
859
880
|
/**
|
|
860
881
|
* Filters out undefined values from an object
|
|
861
882
|
* @param obj The source object
|
|
@@ -912,6 +933,10 @@ var PaginationType;
|
|
|
912
933
|
PaginationType["TOKEN"] = "token";
|
|
913
934
|
})(PaginationType || (PaginationType = {}));
|
|
914
935
|
|
|
936
|
+
/**
|
|
937
|
+
* Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
|
|
938
|
+
* Returns the original value if parsing fails.
|
|
939
|
+
*/
|
|
915
940
|
/**
|
|
916
941
|
* Transforms data by mapping fields according to the provided field mapping
|
|
917
942
|
* @param data The source data to transform
|
|
@@ -1428,7 +1453,8 @@ class PaginationHelpers {
|
|
|
1428
1453
|
// Extract and transform items from response
|
|
1429
1454
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1430
1455
|
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1431
|
-
const
|
|
1456
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
1457
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
1432
1458
|
// Parse items - automatically handle JSON string responses
|
|
1433
1459
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1434
1460
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -2145,9 +2171,17 @@ class BaseService {
|
|
|
2145
2171
|
const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
|
|
2146
2172
|
const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
|
|
2147
2173
|
const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
|
|
2174
|
+
// When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
|
|
2175
|
+
// When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
|
|
2176
|
+
const convertToSkip = paginationParams?.convertToSkip ?? true;
|
|
2148
2177
|
requestParams[pageSizeParam] = limitedPageSize;
|
|
2149
|
-
if (
|
|
2150
|
-
|
|
2178
|
+
if (convertToSkip) {
|
|
2179
|
+
if (params.pageNumber && params.pageNumber > 1) {
|
|
2180
|
+
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
else {
|
|
2184
|
+
requestParams[offsetParam] = params.pageNumber || 1;
|
|
2151
2185
|
}
|
|
2152
2186
|
{
|
|
2153
2187
|
requestParams[countParam] = true;
|
|
@@ -2178,7 +2212,8 @@ class BaseService {
|
|
|
2178
2212
|
// Extract items and metadata
|
|
2179
2213
|
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
2180
2214
|
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
2181
|
-
const
|
|
2215
|
+
const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
|
|
2216
|
+
const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
|
|
2182
2217
|
const continuationToken = response.data[continuationTokenField];
|
|
2183
2218
|
// Determine if there are more pages
|
|
2184
2219
|
const hasMore = this.determineHasMorePages(paginationType, {
|