@uipath/uipath-typescript 1.3.1 → 1.3.3
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 +14 -8
- package/dist/assets/index.mjs +14 -8
- package/dist/attachments/index.cjs +14 -8
- package/dist/attachments/index.mjs +14 -8
- package/dist/buckets/index.cjs +14 -8
- package/dist/buckets/index.mjs +14 -8
- package/dist/cases/index.cjs +34 -13
- package/dist/cases/index.d.ts +15 -0
- package/dist/cases/index.mjs +34 -13
- package/dist/conversational-agent/index.cjs +32 -8
- package/dist/conversational-agent/index.d.ts +26 -0
- package/dist/conversational-agent/index.mjs +32 -8
- package/dist/core/index.cjs +21 -4
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.mjs +21 -4
- package/dist/entities/index.cjs +14 -8
- package/dist/entities/index.mjs +14 -8
- package/dist/feedback/index.cjs +1904 -0
- package/dist/feedback/index.d.ts +475 -0
- package/dist/feedback/index.mjs +1902 -0
- package/dist/index.cjs +369 -192
- package/dist/index.d.ts +277 -12
- package/dist/index.mjs +370 -193
- package/dist/index.umd.js +369 -192
- package/dist/jobs/index.cjs +331 -8
- package/dist/jobs/index.d.ts +168 -2
- package/dist/jobs/index.mjs +332 -9
- package/dist/maestro-processes/index.cjs +14 -8
- package/dist/maestro-processes/index.mjs +14 -8
- package/dist/processes/index.cjs +14 -8
- package/dist/processes/index.mjs +14 -8
- package/dist/queues/index.cjs +14 -8
- package/dist/queues/index.mjs +14 -8
- package/dist/tasks/index.cjs +34 -13
- package/dist/tasks/index.d.ts +25 -10
- package/dist/tasks/index.mjs +35 -14
- package/package.json +12 -1
package/dist/processes/index.mjs
CHANGED
|
@@ -598,7 +598,11 @@ class ApiClient {
|
|
|
598
598
|
const text = await response.text();
|
|
599
599
|
return text;
|
|
600
600
|
}
|
|
601
|
-
|
|
601
|
+
const text = await response.text();
|
|
602
|
+
if (!text) {
|
|
603
|
+
return undefined;
|
|
604
|
+
}
|
|
605
|
+
return JSON.parse(text);
|
|
602
606
|
}
|
|
603
607
|
catch (error) {
|
|
604
608
|
// If it's already one of our errors, re-throw it
|
|
@@ -1293,8 +1297,9 @@ class PaginationHelpers {
|
|
|
1293
1297
|
});
|
|
1294
1298
|
}
|
|
1295
1299
|
// Extract and transform items from response
|
|
1296
|
-
|
|
1297
|
-
const
|
|
1300
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1301
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1302
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
1298
1303
|
// Parse items - automatically handle JSON string responses
|
|
1299
1304
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1300
1305
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1545,7 +1550,7 @@ class BaseService {
|
|
|
1545
1550
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1546
1551
|
// Prepare request parameters based on pagination type
|
|
1547
1552
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1548
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
1553
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
1549
1554
|
if (method.toUpperCase() === 'POST') {
|
|
1550
1555
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1551
1556
|
options.body = {
|
|
@@ -1553,6 +1558,7 @@ class BaseService {
|
|
|
1553
1558
|
...options.params,
|
|
1554
1559
|
...requestParams
|
|
1555
1560
|
};
|
|
1561
|
+
options.params = undefined;
|
|
1556
1562
|
}
|
|
1557
1563
|
else {
|
|
1558
1564
|
// Merge pagination parameters with existing parameters
|
|
@@ -1593,7 +1599,6 @@ class BaseService {
|
|
|
1593
1599
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
1594
1600
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1595
1601
|
}
|
|
1596
|
-
// Include total count for ODATA APIs
|
|
1597
1602
|
{
|
|
1598
1603
|
requestParams[countParam] = true;
|
|
1599
1604
|
}
|
|
@@ -1621,8 +1626,9 @@ class BaseService {
|
|
|
1621
1626
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
1622
1627
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
1623
1628
|
// Extract items and metadata
|
|
1624
|
-
|
|
1625
|
-
const
|
|
1629
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1630
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1631
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
1626
1632
|
const continuationToken = response.data[continuationTokenField];
|
|
1627
1633
|
// Determine if there are more pages
|
|
1628
1634
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1707,7 +1713,7 @@ const PROCESS_ENDPOINTS = {
|
|
|
1707
1713
|
// Connection string placeholder that will be replaced during build
|
|
1708
1714
|
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";
|
|
1709
1715
|
// SDK Version placeholder
|
|
1710
|
-
const SDK_VERSION = "1.3.
|
|
1716
|
+
const SDK_VERSION = "1.3.3";
|
|
1711
1717
|
const VERSION = "Version";
|
|
1712
1718
|
const SERVICE = "Service";
|
|
1713
1719
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/queues/index.cjs
CHANGED
|
@@ -600,7 +600,11 @@ class ApiClient {
|
|
|
600
600
|
const text = await response.text();
|
|
601
601
|
return text;
|
|
602
602
|
}
|
|
603
|
-
|
|
603
|
+
const text = await response.text();
|
|
604
|
+
if (!text) {
|
|
605
|
+
return undefined;
|
|
606
|
+
}
|
|
607
|
+
return JSON.parse(text);
|
|
604
608
|
}
|
|
605
609
|
catch (error) {
|
|
606
610
|
// If it's already one of our errors, re-throw it
|
|
@@ -1232,8 +1236,9 @@ class PaginationHelpers {
|
|
|
1232
1236
|
});
|
|
1233
1237
|
}
|
|
1234
1238
|
// Extract and transform items from response
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1239
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1240
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1241
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
1237
1242
|
// Parse items - automatically handle JSON string responses
|
|
1238
1243
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1239
1244
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1484,7 +1489,7 @@ class BaseService {
|
|
|
1484
1489
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1485
1490
|
// Prepare request parameters based on pagination type
|
|
1486
1491
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1487
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
1492
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
1488
1493
|
if (method.toUpperCase() === 'POST') {
|
|
1489
1494
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1490
1495
|
options.body = {
|
|
@@ -1492,6 +1497,7 @@ class BaseService {
|
|
|
1492
1497
|
...options.params,
|
|
1493
1498
|
...requestParams
|
|
1494
1499
|
};
|
|
1500
|
+
options.params = undefined;
|
|
1495
1501
|
}
|
|
1496
1502
|
else {
|
|
1497
1503
|
// Merge pagination parameters with existing parameters
|
|
@@ -1532,7 +1538,6 @@ class BaseService {
|
|
|
1532
1538
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
1533
1539
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1534
1540
|
}
|
|
1535
|
-
// Include total count for ODATA APIs
|
|
1536
1541
|
{
|
|
1537
1542
|
requestParams[countParam] = true;
|
|
1538
1543
|
}
|
|
@@ -1560,8 +1565,9 @@ class BaseService {
|
|
|
1560
1565
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
1561
1566
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
1562
1567
|
// Extract items and metadata
|
|
1563
|
-
|
|
1564
|
-
const
|
|
1568
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1569
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1570
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
1565
1571
|
const continuationToken = response.data[continuationTokenField];
|
|
1566
1572
|
// Determine if there are more pages
|
|
1567
1573
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1673,7 +1679,7 @@ const QueueMap = {
|
|
|
1673
1679
|
// Connection string placeholder that will be replaced during build
|
|
1674
1680
|
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";
|
|
1675
1681
|
// SDK Version placeholder
|
|
1676
|
-
const SDK_VERSION = "1.3.
|
|
1682
|
+
const SDK_VERSION = "1.3.3";
|
|
1677
1683
|
const VERSION = "Version";
|
|
1678
1684
|
const SERVICE = "Service";
|
|
1679
1685
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
package/dist/queues/index.mjs
CHANGED
|
@@ -598,7 +598,11 @@ class ApiClient {
|
|
|
598
598
|
const text = await response.text();
|
|
599
599
|
return text;
|
|
600
600
|
}
|
|
601
|
-
|
|
601
|
+
const text = await response.text();
|
|
602
|
+
if (!text) {
|
|
603
|
+
return undefined;
|
|
604
|
+
}
|
|
605
|
+
return JSON.parse(text);
|
|
602
606
|
}
|
|
603
607
|
catch (error) {
|
|
604
608
|
// If it's already one of our errors, re-throw it
|
|
@@ -1230,8 +1234,9 @@ class PaginationHelpers {
|
|
|
1230
1234
|
});
|
|
1231
1235
|
}
|
|
1232
1236
|
// Extract and transform items from response
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1237
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1238
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1239
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
1235
1240
|
// Parse items - automatically handle JSON string responses
|
|
1236
1241
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1237
1242
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1482,7 +1487,7 @@ class BaseService {
|
|
|
1482
1487
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1483
1488
|
// Prepare request parameters based on pagination type
|
|
1484
1489
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1485
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
1490
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
1486
1491
|
if (method.toUpperCase() === 'POST') {
|
|
1487
1492
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1488
1493
|
options.body = {
|
|
@@ -1490,6 +1495,7 @@ class BaseService {
|
|
|
1490
1495
|
...options.params,
|
|
1491
1496
|
...requestParams
|
|
1492
1497
|
};
|
|
1498
|
+
options.params = undefined;
|
|
1493
1499
|
}
|
|
1494
1500
|
else {
|
|
1495
1501
|
// Merge pagination parameters with existing parameters
|
|
@@ -1530,7 +1536,6 @@ class BaseService {
|
|
|
1530
1536
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
1531
1537
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
1532
1538
|
}
|
|
1533
|
-
// Include total count for ODATA APIs
|
|
1534
1539
|
{
|
|
1535
1540
|
requestParams[countParam] = true;
|
|
1536
1541
|
}
|
|
@@ -1558,8 +1563,9 @@ class BaseService {
|
|
|
1558
1563
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
1559
1564
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
1560
1565
|
// Extract items and metadata
|
|
1561
|
-
|
|
1562
|
-
const
|
|
1566
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1567
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
1568
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
1563
1569
|
const continuationToken = response.data[continuationTokenField];
|
|
1564
1570
|
// Determine if there are more pages
|
|
1565
1571
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -1671,7 +1677,7 @@ const QueueMap = {
|
|
|
1671
1677
|
// Connection string placeholder that will be replaced during build
|
|
1672
1678
|
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";
|
|
1673
1679
|
// SDK Version placeholder
|
|
1674
|
-
const SDK_VERSION = "1.3.
|
|
1680
|
+
const SDK_VERSION = "1.3.3";
|
|
1675
1681
|
const VERSION = "Version";
|
|
1676
1682
|
const SERVICE = "Service";
|
|
1677
1683
|
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.3";
|
|
282
282
|
const VERSION = "Version";
|
|
283
283
|
const SERVICE = "Service";
|
|
284
284
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -546,6 +546,21 @@ function track(nameOrOptions, options) {
|
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
exports.TaskUserType = void 0;
|
|
550
|
+
(function (TaskUserType) {
|
|
551
|
+
/** A user of this type is supposed to be used by a human. */
|
|
552
|
+
TaskUserType["User"] = "User";
|
|
553
|
+
/** A user of this type is automatically created when adding a robot, is associated with Robot role and it is used by a robot when communicating with Orchestrator. */
|
|
554
|
+
TaskUserType["Robot"] = "Robot";
|
|
555
|
+
/** A user of type Directory User */
|
|
556
|
+
TaskUserType["DirectoryUser"] = "DirectoryUser";
|
|
557
|
+
/** A user of type Directory Group */
|
|
558
|
+
TaskUserType["DirectoryGroup"] = "DirectoryGroup";
|
|
559
|
+
/** A user of type Directory Robot Account */
|
|
560
|
+
TaskUserType["DirectoryRobot"] = "DirectoryRobot";
|
|
561
|
+
/** A user of type Directory External Application */
|
|
562
|
+
TaskUserType["DirectoryExternalApplication"] = "DirectoryExternalApplication";
|
|
563
|
+
})(exports.TaskUserType || (exports.TaskUserType = {}));
|
|
549
564
|
/**
|
|
550
565
|
* Types of tasks available in Action Center.
|
|
551
566
|
* Each type determines the task's behavior, UI rendering, and completion requirements.
|
|
@@ -1411,8 +1426,9 @@ class PaginationHelpers {
|
|
|
1411
1426
|
});
|
|
1412
1427
|
}
|
|
1413
1428
|
// Extract and transform items from response
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1429
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1430
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1431
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
1416
1432
|
// Parse items - automatically handle JSON string responses
|
|
1417
1433
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1418
1434
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1792,7 +1808,11 @@ class ApiClient {
|
|
|
1792
1808
|
const text = await response.text();
|
|
1793
1809
|
return text;
|
|
1794
1810
|
}
|
|
1795
|
-
|
|
1811
|
+
const text = await response.text();
|
|
1812
|
+
if (!text) {
|
|
1813
|
+
return undefined;
|
|
1814
|
+
}
|
|
1815
|
+
return JSON.parse(text);
|
|
1796
1816
|
}
|
|
1797
1817
|
catch (error) {
|
|
1798
1818
|
// If it's already one of our errors, re-throw it
|
|
@@ -2074,7 +2094,7 @@ class BaseService {
|
|
|
2074
2094
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
2075
2095
|
// Prepare request parameters based on pagination type
|
|
2076
2096
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
2077
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
2097
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
2078
2098
|
if (method.toUpperCase() === 'POST') {
|
|
2079
2099
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
2080
2100
|
options.body = {
|
|
@@ -2082,6 +2102,7 @@ class BaseService {
|
|
|
2082
2102
|
...options.params,
|
|
2083
2103
|
...requestParams
|
|
2084
2104
|
};
|
|
2105
|
+
options.params = undefined;
|
|
2085
2106
|
}
|
|
2086
2107
|
else {
|
|
2087
2108
|
// Merge pagination parameters with existing parameters
|
|
@@ -2122,7 +2143,6 @@ class BaseService {
|
|
|
2122
2143
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
2123
2144
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
2124
2145
|
}
|
|
2125
|
-
// Include total count for ODATA APIs
|
|
2126
2146
|
{
|
|
2127
2147
|
requestParams[countParam] = true;
|
|
2128
2148
|
}
|
|
@@ -2150,8 +2170,9 @@ class BaseService {
|
|
|
2150
2170
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
2151
2171
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
2152
2172
|
// Extract items and metadata
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2173
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
2174
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
2175
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
2155
2176
|
const continuationToken = response.data[continuationTokenField];
|
|
2156
2177
|
// Determine if there are more pages
|
|
2157
2178
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -2255,15 +2276,15 @@ class TaskService extends BaseService {
|
|
|
2255
2276
|
return createTaskWithMethods(transformedData, this);
|
|
2256
2277
|
}
|
|
2257
2278
|
/**
|
|
2258
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
2279
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
2259
2280
|
*
|
|
2260
2281
|
* The method returns either:
|
|
2261
|
-
* - An array of users (when no pagination parameters are provided)
|
|
2282
|
+
* - An array of task users (when no pagination parameters are provided)
|
|
2262
2283
|
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
2263
2284
|
*
|
|
2264
|
-
* @param folderId - The folder ID to get users from
|
|
2285
|
+
* @param folderId - The folder ID to get task users from
|
|
2265
2286
|
* @param options - Optional query and pagination parameters
|
|
2266
|
-
* @returns Promise resolving to an array of users or paginated result
|
|
2287
|
+
* @returns Promise resolving to an array of task users or paginated result
|
|
2267
2288
|
*
|
|
2268
2289
|
* @example
|
|
2269
2290
|
* ```typescript
|
|
@@ -2274,7 +2295,7 @@ class TaskService extends BaseService {
|
|
|
2274
2295
|
* // Standard array return
|
|
2275
2296
|
* const users = await tasks.getUsers(123);
|
|
2276
2297
|
*
|
|
2277
|
-
* // Get users with filtering
|
|
2298
|
+
* // Get task users with filtering
|
|
2278
2299
|
* const users = await tasks.getUsers(123, {
|
|
2279
2300
|
* filter: "name eq 'abc'"
|
|
2280
2301
|
* });
|
package/dist/tasks/index.d.ts
CHANGED
|
@@ -108,6 +108,20 @@ type HasPaginationOptions<T> = (T & {
|
|
|
108
108
|
jumpToPage: number;
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
+
declare enum TaskUserType {
|
|
112
|
+
/** A user of this type is supposed to be used by a human. */
|
|
113
|
+
User = "User",
|
|
114
|
+
/** A user of this type is automatically created when adding a robot, is associated with Robot role and it is used by a robot when communicating with Orchestrator. */
|
|
115
|
+
Robot = "Robot",
|
|
116
|
+
/** A user of type Directory User */
|
|
117
|
+
DirectoryUser = "DirectoryUser",
|
|
118
|
+
/** A user of type Directory Group */
|
|
119
|
+
DirectoryGroup = "DirectoryGroup",
|
|
120
|
+
/** A user of type Directory Robot Account */
|
|
121
|
+
DirectoryRobot = "DirectoryRobot",
|
|
122
|
+
/** A user of type Directory External Application */
|
|
123
|
+
DirectoryExternalApplication = "DirectoryExternalApplication"
|
|
124
|
+
}
|
|
111
125
|
interface UserLoginInfo {
|
|
112
126
|
name: string;
|
|
113
127
|
surname: string;
|
|
@@ -115,6 +129,7 @@ interface UserLoginInfo {
|
|
|
115
129
|
emailAddress: string;
|
|
116
130
|
displayName: string;
|
|
117
131
|
id: number;
|
|
132
|
+
type: TaskUserType;
|
|
118
133
|
}
|
|
119
134
|
/**
|
|
120
135
|
* Types of tasks available in Action Center.
|
|
@@ -589,17 +604,17 @@ interface TaskServiceModel {
|
|
|
589
604
|
*/
|
|
590
605
|
complete(options: TaskCompletionOptions, folderId: number): Promise<OperationResponse<TaskCompletionOptions>>;
|
|
591
606
|
/**
|
|
592
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
607
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
593
608
|
* Returns a NonPaginatedResponse with data and totalCount when no pagination parameters are provided,
|
|
594
609
|
* or a PaginatedResponse when any pagination parameter is provided
|
|
595
610
|
*
|
|
596
|
-
* @param folderId - The folder ID to get users from
|
|
611
|
+
* @param folderId - The folder ID to get task users from
|
|
597
612
|
* @param options - Optional query and pagination parameters
|
|
598
|
-
* @returns Promise resolving to either an array of users NonPaginatedResponse<UserLoginInfo> or a PaginatedResponse<UserLoginInfo> when pagination options are used.
|
|
613
|
+
* @returns Promise resolving to either an array of task users NonPaginatedResponse<UserLoginInfo> or a PaginatedResponse<UserLoginInfo> when pagination options are used.
|
|
599
614
|
* {@link UserLoginInfo}
|
|
600
615
|
* @example
|
|
601
616
|
* ```typescript
|
|
602
|
-
* // Get users from a folder
|
|
617
|
+
* // Get task users from a folder
|
|
603
618
|
* const users = await tasks.getUsers(<folderId>);
|
|
604
619
|
*
|
|
605
620
|
* // Access user properties
|
|
@@ -898,15 +913,15 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
898
913
|
*/
|
|
899
914
|
create(task: TaskCreateOptions, folderId: number): Promise<TaskCreateResponse>;
|
|
900
915
|
/**
|
|
901
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
916
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
902
917
|
*
|
|
903
918
|
* The method returns either:
|
|
904
|
-
* - An array of users (when no pagination parameters are provided)
|
|
919
|
+
* - An array of task users (when no pagination parameters are provided)
|
|
905
920
|
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
906
921
|
*
|
|
907
|
-
* @param folderId - The folder ID to get users from
|
|
922
|
+
* @param folderId - The folder ID to get task users from
|
|
908
923
|
* @param options - Optional query and pagination parameters
|
|
909
|
-
* @returns Promise resolving to an array of users or paginated result
|
|
924
|
+
* @returns Promise resolving to an array of task users or paginated result
|
|
910
925
|
*
|
|
911
926
|
* @example
|
|
912
927
|
* ```typescript
|
|
@@ -917,7 +932,7 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
917
932
|
* // Standard array return
|
|
918
933
|
* const users = await tasks.getUsers(123);
|
|
919
934
|
*
|
|
920
|
-
* // Get users with filtering
|
|
935
|
+
* // Get task users with filtering
|
|
921
936
|
* const users = await tasks.getUsers(123, {
|
|
922
937
|
* filter: "name eq 'abc'"
|
|
923
938
|
* });
|
|
@@ -1164,5 +1179,5 @@ declare class TaskService extends BaseService implements TaskServiceModel {
|
|
|
1164
1179
|
private addDefaultExpand;
|
|
1165
1180
|
}
|
|
1166
1181
|
|
|
1167
|
-
export { TaskActivityType, TaskPriority, TaskService, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskService as Tasks, createTaskWithMethods };
|
|
1182
|
+
export { TaskActivityType, TaskPriority, TaskService, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskUserType, TaskService as Tasks, createTaskWithMethods };
|
|
1168
1183
|
export type { RawTaskCreateResponse, RawTaskGetResponse, Tag, TaskActivity, TaskAssignOptions, TaskAssignment, TaskAssignmentOptions, TaskAssignmentResponse, TaskBaseResponse, TaskCompleteOptions, TaskCompletionOptions, TaskCreateOptions, TaskCreateResponse, TaskGetAllOptions, TaskGetByIdOptions, TaskGetResponse, TaskGetUsersOptions, TaskMethods, TaskServiceModel, TaskSlaDetail, TaskSource, TasksUnassignOptions, UserLoginInfo };
|
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.3";
|
|
280
280
|
const VERSION = "Version";
|
|
281
281
|
const SERVICE = "Service";
|
|
282
282
|
const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
|
|
@@ -544,6 +544,21 @@ function track(nameOrOptions, options) {
|
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
+
var TaskUserType;
|
|
548
|
+
(function (TaskUserType) {
|
|
549
|
+
/** A user of this type is supposed to be used by a human. */
|
|
550
|
+
TaskUserType["User"] = "User";
|
|
551
|
+
/** A user of this type is automatically created when adding a robot, is associated with Robot role and it is used by a robot when communicating with Orchestrator. */
|
|
552
|
+
TaskUserType["Robot"] = "Robot";
|
|
553
|
+
/** A user of type Directory User */
|
|
554
|
+
TaskUserType["DirectoryUser"] = "DirectoryUser";
|
|
555
|
+
/** A user of type Directory Group */
|
|
556
|
+
TaskUserType["DirectoryGroup"] = "DirectoryGroup";
|
|
557
|
+
/** A user of type Directory Robot Account */
|
|
558
|
+
TaskUserType["DirectoryRobot"] = "DirectoryRobot";
|
|
559
|
+
/** A user of type Directory External Application */
|
|
560
|
+
TaskUserType["DirectoryExternalApplication"] = "DirectoryExternalApplication";
|
|
561
|
+
})(TaskUserType || (TaskUserType = {}));
|
|
547
562
|
/**
|
|
548
563
|
* Types of tasks available in Action Center.
|
|
549
564
|
* Each type determines the task's behavior, UI rendering, and completion requirements.
|
|
@@ -1409,8 +1424,9 @@ class PaginationHelpers {
|
|
|
1409
1424
|
});
|
|
1410
1425
|
}
|
|
1411
1426
|
// Extract and transform items from response
|
|
1412
|
-
|
|
1413
|
-
const
|
|
1427
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
1428
|
+
const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
|
|
1429
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
|
|
1414
1430
|
// Parse items - automatically handle JSON string responses
|
|
1415
1431
|
const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
|
|
1416
1432
|
const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
|
|
@@ -1790,7 +1806,11 @@ class ApiClient {
|
|
|
1790
1806
|
const text = await response.text();
|
|
1791
1807
|
return text;
|
|
1792
1808
|
}
|
|
1793
|
-
|
|
1809
|
+
const text = await response.text();
|
|
1810
|
+
if (!text) {
|
|
1811
|
+
return undefined;
|
|
1812
|
+
}
|
|
1813
|
+
return JSON.parse(text);
|
|
1794
1814
|
}
|
|
1795
1815
|
catch (error) {
|
|
1796
1816
|
// If it's already one of our errors, re-throw it
|
|
@@ -2072,7 +2092,7 @@ class BaseService {
|
|
|
2072
2092
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
2073
2093
|
// Prepare request parameters based on pagination type
|
|
2074
2094
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
2075
|
-
// For POST requests, merge pagination params into body; for GET, use query params
|
|
2095
|
+
// For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
|
|
2076
2096
|
if (method.toUpperCase() === 'POST') {
|
|
2077
2097
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
2078
2098
|
options.body = {
|
|
@@ -2080,6 +2100,7 @@ class BaseService {
|
|
|
2080
2100
|
...options.params,
|
|
2081
2101
|
...requestParams
|
|
2082
2102
|
};
|
|
2103
|
+
options.params = undefined;
|
|
2083
2104
|
}
|
|
2084
2105
|
else {
|
|
2085
2106
|
// Merge pagination parameters with existing parameters
|
|
@@ -2120,7 +2141,6 @@ class BaseService {
|
|
|
2120
2141
|
if (params.pageNumber && params.pageNumber > 1) {
|
|
2121
2142
|
requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
|
|
2122
2143
|
}
|
|
2123
|
-
// Include total count for ODATA APIs
|
|
2124
2144
|
{
|
|
2125
2145
|
requestParams[countParam] = true;
|
|
2126
2146
|
}
|
|
@@ -2148,8 +2168,9 @@ class BaseService {
|
|
|
2148
2168
|
const totalCountField = fields.totalCountField || 'totalRecordCount';
|
|
2149
2169
|
const continuationTokenField = fields.continuationTokenField || 'continuationToken';
|
|
2150
2170
|
// Extract items and metadata
|
|
2151
|
-
|
|
2152
|
-
const
|
|
2171
|
+
// Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
|
|
2172
|
+
const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
|
|
2173
|
+
const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
|
|
2153
2174
|
const continuationToken = response.data[continuationTokenField];
|
|
2154
2175
|
// Determine if there are more pages
|
|
2155
2176
|
const hasMore = this.determineHasMorePages(paginationType, {
|
|
@@ -2253,15 +2274,15 @@ class TaskService extends BaseService {
|
|
|
2253
2274
|
return createTaskWithMethods(transformedData, this);
|
|
2254
2275
|
}
|
|
2255
2276
|
/**
|
|
2256
|
-
* Gets users in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
2277
|
+
* Gets task users (users, robots, groups etc) in the given folder who have Tasks.View and Tasks.Edit permissions
|
|
2257
2278
|
*
|
|
2258
2279
|
* The method returns either:
|
|
2259
|
-
* - An array of users (when no pagination parameters are provided)
|
|
2280
|
+
* - An array of task users (when no pagination parameters are provided)
|
|
2260
2281
|
* - A paginated result with navigation cursors (when any pagination parameter is provided)
|
|
2261
2282
|
*
|
|
2262
|
-
* @param folderId - The folder ID to get users from
|
|
2283
|
+
* @param folderId - The folder ID to get task users from
|
|
2263
2284
|
* @param options - Optional query and pagination parameters
|
|
2264
|
-
* @returns Promise resolving to an array of users or paginated result
|
|
2285
|
+
* @returns Promise resolving to an array of task users or paginated result
|
|
2265
2286
|
*
|
|
2266
2287
|
* @example
|
|
2267
2288
|
* ```typescript
|
|
@@ -2272,7 +2293,7 @@ class TaskService extends BaseService {
|
|
|
2272
2293
|
* // Standard array return
|
|
2273
2294
|
* const users = await tasks.getUsers(123);
|
|
2274
2295
|
*
|
|
2275
|
-
* // Get users with filtering
|
|
2296
|
+
* // Get task users with filtering
|
|
2276
2297
|
* const users = await tasks.getUsers(123, {
|
|
2277
2298
|
* filter: "name eq 'abc'"
|
|
2278
2299
|
* });
|
|
@@ -2688,4 +2709,4 @@ __decorate([
|
|
|
2688
2709
|
track('Tasks.Complete')
|
|
2689
2710
|
], TaskService.prototype, "complete", null);
|
|
2690
2711
|
|
|
2691
|
-
export { TaskActivityType, TaskPriority, TaskService, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskService as Tasks, createTaskWithMethods };
|
|
2712
|
+
export { TaskActivityType, TaskPriority, TaskService, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskUserType, TaskService as Tasks, createTaskWithMethods };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/uipath-typescript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "UiPath TypeScript SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -145,6 +145,16 @@
|
|
|
145
145
|
"types": "./dist/conversational-agent/index.d.ts",
|
|
146
146
|
"default": "./dist/conversational-agent/index.cjs"
|
|
147
147
|
}
|
|
148
|
+
},
|
|
149
|
+
"./feedback": {
|
|
150
|
+
"import": {
|
|
151
|
+
"types": "./dist/feedback/index.d.ts",
|
|
152
|
+
"default": "./dist/feedback/index.mjs"
|
|
153
|
+
},
|
|
154
|
+
"require": {
|
|
155
|
+
"types": "./dist/feedback/index.d.ts",
|
|
156
|
+
"default": "./dist/feedback/index.cjs"
|
|
157
|
+
}
|
|
148
158
|
}
|
|
149
159
|
},
|
|
150
160
|
"files": [
|
|
@@ -197,6 +207,7 @@
|
|
|
197
207
|
"rimraf": "^6.0.1",
|
|
198
208
|
"rollup": "^4.59.1",
|
|
199
209
|
"rollup-plugin-dts": "^6.1.0",
|
|
210
|
+
"tslib": "^2.8.1",
|
|
200
211
|
"typedoc": "^0.28.13",
|
|
201
212
|
"typedoc-plugin-markdown": "^4.8.1",
|
|
202
213
|
"typescript": "^5.3.3",
|