@uipath/uipath-typescript 1.4.0 → 1.4.2
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/agent-memory/index.cjs +16 -9
- package/dist/agent-memory/index.mjs +16 -9
- package/dist/agents/index.cjs +278 -9
- package/dist/agents/index.d.ts +465 -6
- package/dist/agents/index.mjs +279 -10
- package/dist/assets/index.cjs +16 -9
- package/dist/assets/index.mjs +16 -9
- package/dist/attachments/index.cjs +16 -9
- package/dist/attachments/index.mjs +16 -9
- package/dist/buckets/index.cjs +114 -124
- package/dist/buckets/index.d.ts +197 -84
- package/dist/buckets/index.mjs +114 -124
- package/dist/cases/index.cjs +79 -13
- package/dist/cases/index.d.ts +30 -3
- package/dist/cases/index.mjs +79 -13
- package/dist/conversational-agent/index.cjs +16 -9
- package/dist/conversational-agent/index.mjs +16 -9
- package/dist/core/index.cjs +35 -6
- package/dist/core/index.mjs +35 -6
- package/dist/document-understanding/index.cjs +84 -84
- package/dist/document-understanding/index.d.ts +2 -1
- package/dist/document-understanding/index.mjs +1 -1
- package/dist/entities/index.cjs +253 -69
- package/dist/entities/index.d.ts +343 -116
- package/dist/entities/index.mjs +253 -69
- package/dist/feedback/index.cjs +16 -9
- package/dist/feedback/index.mjs +16 -9
- package/dist/governance/index.cjs +16 -9
- package/dist/governance/index.mjs +16 -9
- package/dist/index.cjs +529 -193
- package/dist/index.d.ts +2141 -750
- package/dist/index.mjs +529 -194
- package/dist/index.umd.js +529 -193
- package/dist/jobs/index.cjs +16 -9
- package/dist/jobs/index.mjs +16 -9
- package/dist/maestro-processes/index.cjs +16 -9
- package/dist/maestro-processes/index.mjs +16 -9
- package/dist/orchestrator-du-module/index.cjs +1788 -0
- package/dist/orchestrator-du-module/index.d.ts +757 -0
- package/dist/orchestrator-du-module/index.mjs +1785 -0
- package/dist/processes/index.cjs +16 -9
- package/dist/processes/index.mjs +16 -9
- package/dist/queues/index.cjs +16 -9
- package/dist/queues/index.mjs +16 -9
- package/dist/tasks/index.cjs +79 -13
- package/dist/tasks/index.d.ts +109 -4
- package/dist/tasks/index.mjs +80 -14
- package/dist/traces/index.cjs +303 -9
- package/dist/traces/index.d.ts +482 -2
- package/dist/traces/index.mjs +302 -10
- package/package.json +11 -1
package/dist/jobs/index.cjs
CHANGED
|
@@ -1258,12 +1258,18 @@ class PaginationHelpers {
|
|
|
1258
1258
|
* @returns Promise resolving to a paginated result
|
|
1259
1259
|
*/
|
|
1260
1260
|
static async getAllPaginated(params) {
|
|
1261
|
-
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1261
|
+
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1262
1262
|
const endpoint = getEndpoint(folderId);
|
|
1263
1263
|
const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
|
|
1264
|
+
// On POST, the caller's options go in the body; queryParams stays in the URL.
|
|
1265
|
+
// On GET, everything is URL — queryParams merges with additionalParams.
|
|
1266
|
+
const isPost = method === HTTP_METHODS.POST;
|
|
1267
|
+
const requestSpec = isPost
|
|
1268
|
+
? { body: additionalParams, params: queryParams }
|
|
1269
|
+
: { params: { ...additionalParams, ...queryParams } };
|
|
1264
1270
|
const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
|
|
1265
1271
|
headers,
|
|
1266
|
-
|
|
1272
|
+
...requestSpec,
|
|
1267
1273
|
pagination: {
|
|
1268
1274
|
paginationType: options.paginationType || PaginationType.OFFSET,
|
|
1269
1275
|
itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
|
|
@@ -1288,7 +1294,7 @@ class PaginationHelpers {
|
|
|
1288
1294
|
* @returns Promise resolving to an object with data and totalCount
|
|
1289
1295
|
*/
|
|
1290
1296
|
static async getAllNonPaginated(params) {
|
|
1291
|
-
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1297
|
+
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1292
1298
|
// Set default field names
|
|
1293
1299
|
const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
|
|
1294
1300
|
const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -1298,11 +1304,11 @@ class PaginationHelpers {
|
|
|
1298
1304
|
// Make the API call based on method
|
|
1299
1305
|
let response;
|
|
1300
1306
|
if (method === HTTP_METHODS.POST) {
|
|
1301
|
-
response = await serviceAccess.post(endpoint, additionalParams, { headers });
|
|
1307
|
+
response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
|
|
1302
1308
|
}
|
|
1303
1309
|
else {
|
|
1304
1310
|
response = await serviceAccess.get(endpoint, {
|
|
1305
|
-
params: additionalParams,
|
|
1311
|
+
params: { ...additionalParams, ...queryParams },
|
|
1306
1312
|
headers
|
|
1307
1313
|
});
|
|
1308
1314
|
}
|
|
@@ -1357,6 +1363,7 @@ class PaginationHelpers {
|
|
|
1357
1363
|
headers: config.headers,
|
|
1358
1364
|
paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
|
|
1359
1365
|
additionalParams: prefixedOptions,
|
|
1366
|
+
queryParams: config.queryParams,
|
|
1360
1367
|
transformFn: config.transformFn,
|
|
1361
1368
|
method: config.method,
|
|
1362
1369
|
options: {
|
|
@@ -1374,6 +1381,7 @@ class PaginationHelpers {
|
|
|
1374
1381
|
folderId,
|
|
1375
1382
|
headers: config.headers,
|
|
1376
1383
|
additionalParams: prefixedOptions,
|
|
1384
|
+
queryParams: config.queryParams,
|
|
1377
1385
|
transformFn: config.transformFn,
|
|
1378
1386
|
method: config.method,
|
|
1379
1387
|
options: {
|
|
@@ -1565,18 +1573,17 @@ class BaseService {
|
|
|
1565
1573
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1566
1574
|
// Prepare request parameters based on pagination type
|
|
1567
1575
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1568
|
-
//
|
|
1576
|
+
// Route pagination state to wherever the API expects it (body for POST, URL for GET).
|
|
1577
|
+
// Caller-supplied options.body / options.params are respected as-is — the api-client
|
|
1578
|
+
// already handles params (URL) and body (request body) independently for every method.
|
|
1569
1579
|
if (method.toUpperCase() === 'POST') {
|
|
1570
1580
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1571
1581
|
options.body = {
|
|
1572
1582
|
...existingBody,
|
|
1573
|
-
...options.params,
|
|
1574
1583
|
...requestParams
|
|
1575
1584
|
};
|
|
1576
|
-
options.params = undefined;
|
|
1577
1585
|
}
|
|
1578
1586
|
else {
|
|
1579
|
-
// Merge pagination parameters with existing parameters
|
|
1580
1587
|
options.params = {
|
|
1581
1588
|
...options.params,
|
|
1582
1589
|
...requestParams
|
package/dist/jobs/index.mjs
CHANGED
|
@@ -1256,12 +1256,18 @@ class PaginationHelpers {
|
|
|
1256
1256
|
* @returns Promise resolving to a paginated result
|
|
1257
1257
|
*/
|
|
1258
1258
|
static async getAllPaginated(params) {
|
|
1259
|
-
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1259
|
+
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1260
1260
|
const endpoint = getEndpoint(folderId);
|
|
1261
1261
|
const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
|
|
1262
|
+
// On POST, the caller's options go in the body; queryParams stays in the URL.
|
|
1263
|
+
// On GET, everything is URL — queryParams merges with additionalParams.
|
|
1264
|
+
const isPost = method === HTTP_METHODS.POST;
|
|
1265
|
+
const requestSpec = isPost
|
|
1266
|
+
? { body: additionalParams, params: queryParams }
|
|
1267
|
+
: { params: { ...additionalParams, ...queryParams } };
|
|
1262
1268
|
const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
|
|
1263
1269
|
headers,
|
|
1264
|
-
|
|
1270
|
+
...requestSpec,
|
|
1265
1271
|
pagination: {
|
|
1266
1272
|
paginationType: options.paginationType || PaginationType.OFFSET,
|
|
1267
1273
|
itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
|
|
@@ -1286,7 +1292,7 @@ class PaginationHelpers {
|
|
|
1286
1292
|
* @returns Promise resolving to an object with data and totalCount
|
|
1287
1293
|
*/
|
|
1288
1294
|
static async getAllNonPaginated(params) {
|
|
1289
|
-
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1295
|
+
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1290
1296
|
// Set default field names
|
|
1291
1297
|
const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
|
|
1292
1298
|
const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -1296,11 +1302,11 @@ class PaginationHelpers {
|
|
|
1296
1302
|
// Make the API call based on method
|
|
1297
1303
|
let response;
|
|
1298
1304
|
if (method === HTTP_METHODS.POST) {
|
|
1299
|
-
response = await serviceAccess.post(endpoint, additionalParams, { headers });
|
|
1305
|
+
response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
|
|
1300
1306
|
}
|
|
1301
1307
|
else {
|
|
1302
1308
|
response = await serviceAccess.get(endpoint, {
|
|
1303
|
-
params: additionalParams,
|
|
1309
|
+
params: { ...additionalParams, ...queryParams },
|
|
1304
1310
|
headers
|
|
1305
1311
|
});
|
|
1306
1312
|
}
|
|
@@ -1355,6 +1361,7 @@ class PaginationHelpers {
|
|
|
1355
1361
|
headers: config.headers,
|
|
1356
1362
|
paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
|
|
1357
1363
|
additionalParams: prefixedOptions,
|
|
1364
|
+
queryParams: config.queryParams,
|
|
1358
1365
|
transformFn: config.transformFn,
|
|
1359
1366
|
method: config.method,
|
|
1360
1367
|
options: {
|
|
@@ -1372,6 +1379,7 @@ class PaginationHelpers {
|
|
|
1372
1379
|
folderId,
|
|
1373
1380
|
headers: config.headers,
|
|
1374
1381
|
additionalParams: prefixedOptions,
|
|
1382
|
+
queryParams: config.queryParams,
|
|
1375
1383
|
transformFn: config.transformFn,
|
|
1376
1384
|
method: config.method,
|
|
1377
1385
|
options: {
|
|
@@ -1563,18 +1571,17 @@ class BaseService {
|
|
|
1563
1571
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1564
1572
|
// Prepare request parameters based on pagination type
|
|
1565
1573
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1566
|
-
//
|
|
1574
|
+
// Route pagination state to wherever the API expects it (body for POST, URL for GET).
|
|
1575
|
+
// Caller-supplied options.body / options.params are respected as-is — the api-client
|
|
1576
|
+
// already handles params (URL) and body (request body) independently for every method.
|
|
1567
1577
|
if (method.toUpperCase() === 'POST') {
|
|
1568
1578
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1569
1579
|
options.body = {
|
|
1570
1580
|
...existingBody,
|
|
1571
|
-
...options.params,
|
|
1572
1581
|
...requestParams
|
|
1573
1582
|
};
|
|
1574
|
-
options.params = undefined;
|
|
1575
1583
|
}
|
|
1576
1584
|
else {
|
|
1577
|
-
// Merge pagination parameters with existing parameters
|
|
1578
1585
|
options.params = {
|
|
1579
1586
|
...options.params,
|
|
1580
1587
|
...requestParams
|
|
@@ -1498,12 +1498,18 @@ class PaginationHelpers {
|
|
|
1498
1498
|
* @returns Promise resolving to a paginated result
|
|
1499
1499
|
*/
|
|
1500
1500
|
static async getAllPaginated(params) {
|
|
1501
|
-
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1501
|
+
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1502
1502
|
const endpoint = getEndpoint(folderId);
|
|
1503
1503
|
const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
|
|
1504
|
+
// On POST, the caller's options go in the body; queryParams stays in the URL.
|
|
1505
|
+
// On GET, everything is URL — queryParams merges with additionalParams.
|
|
1506
|
+
const isPost = method === HTTP_METHODS.POST;
|
|
1507
|
+
const requestSpec = isPost
|
|
1508
|
+
? { body: additionalParams, params: queryParams }
|
|
1509
|
+
: { params: { ...additionalParams, ...queryParams } };
|
|
1504
1510
|
const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
|
|
1505
1511
|
headers,
|
|
1506
|
-
|
|
1512
|
+
...requestSpec,
|
|
1507
1513
|
pagination: {
|
|
1508
1514
|
paginationType: options.paginationType || PaginationType.OFFSET,
|
|
1509
1515
|
itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
|
|
@@ -1528,7 +1534,7 @@ class PaginationHelpers {
|
|
|
1528
1534
|
* @returns Promise resolving to an object with data and totalCount
|
|
1529
1535
|
*/
|
|
1530
1536
|
static async getAllNonPaginated(params) {
|
|
1531
|
-
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1537
|
+
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1532
1538
|
// Set default field names
|
|
1533
1539
|
const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
|
|
1534
1540
|
const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -1538,11 +1544,11 @@ class PaginationHelpers {
|
|
|
1538
1544
|
// Make the API call based on method
|
|
1539
1545
|
let response;
|
|
1540
1546
|
if (method === HTTP_METHODS.POST) {
|
|
1541
|
-
response = await serviceAccess.post(endpoint, additionalParams, { headers });
|
|
1547
|
+
response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
|
|
1542
1548
|
}
|
|
1543
1549
|
else {
|
|
1544
1550
|
response = await serviceAccess.get(endpoint, {
|
|
1545
|
-
params: additionalParams,
|
|
1551
|
+
params: { ...additionalParams, ...queryParams },
|
|
1546
1552
|
headers
|
|
1547
1553
|
});
|
|
1548
1554
|
}
|
|
@@ -1597,6 +1603,7 @@ class PaginationHelpers {
|
|
|
1597
1603
|
headers: config.headers,
|
|
1598
1604
|
paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
|
|
1599
1605
|
additionalParams: prefixedOptions,
|
|
1606
|
+
queryParams: config.queryParams,
|
|
1600
1607
|
transformFn: config.transformFn,
|
|
1601
1608
|
method: config.method,
|
|
1602
1609
|
options: {
|
|
@@ -1614,6 +1621,7 @@ class PaginationHelpers {
|
|
|
1614
1621
|
folderId,
|
|
1615
1622
|
headers: config.headers,
|
|
1616
1623
|
additionalParams: prefixedOptions,
|
|
1624
|
+
queryParams: config.queryParams,
|
|
1617
1625
|
transformFn: config.transformFn,
|
|
1618
1626
|
method: config.method,
|
|
1619
1627
|
options: {
|
|
@@ -1805,18 +1813,17 @@ class BaseService {
|
|
|
1805
1813
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1806
1814
|
// Prepare request parameters based on pagination type
|
|
1807
1815
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1808
|
-
//
|
|
1816
|
+
// Route pagination state to wherever the API expects it (body for POST, URL for GET).
|
|
1817
|
+
// Caller-supplied options.body / options.params are respected as-is — the api-client
|
|
1818
|
+
// already handles params (URL) and body (request body) independently for every method.
|
|
1809
1819
|
if (method.toUpperCase() === 'POST') {
|
|
1810
1820
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1811
1821
|
options.body = {
|
|
1812
1822
|
...existingBody,
|
|
1813
|
-
...options.params,
|
|
1814
1823
|
...requestParams
|
|
1815
1824
|
};
|
|
1816
|
-
options.params = undefined;
|
|
1817
1825
|
}
|
|
1818
1826
|
else {
|
|
1819
|
-
// Merge pagination parameters with existing parameters
|
|
1820
1827
|
options.params = {
|
|
1821
1828
|
...options.params,
|
|
1822
1829
|
...requestParams
|
|
@@ -1496,12 +1496,18 @@ class PaginationHelpers {
|
|
|
1496
1496
|
* @returns Promise resolving to a paginated result
|
|
1497
1497
|
*/
|
|
1498
1498
|
static async getAllPaginated(params) {
|
|
1499
|
-
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1499
|
+
const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1500
1500
|
const endpoint = getEndpoint(folderId);
|
|
1501
1501
|
const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
|
|
1502
|
+
// On POST, the caller's options go in the body; queryParams stays in the URL.
|
|
1503
|
+
// On GET, everything is URL — queryParams merges with additionalParams.
|
|
1504
|
+
const isPost = method === HTTP_METHODS.POST;
|
|
1505
|
+
const requestSpec = isPost
|
|
1506
|
+
? { body: additionalParams, params: queryParams }
|
|
1507
|
+
: { params: { ...additionalParams, ...queryParams } };
|
|
1502
1508
|
const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
|
|
1503
1509
|
headers,
|
|
1504
|
-
|
|
1510
|
+
...requestSpec,
|
|
1505
1511
|
pagination: {
|
|
1506
1512
|
paginationType: options.paginationType || PaginationType.OFFSET,
|
|
1507
1513
|
itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
|
|
@@ -1526,7 +1532,7 @@ class PaginationHelpers {
|
|
|
1526
1532
|
* @returns Promise resolving to an object with data and totalCount
|
|
1527
1533
|
*/
|
|
1528
1534
|
static async getAllNonPaginated(params) {
|
|
1529
|
-
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1535
|
+
const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
|
|
1530
1536
|
// Set default field names
|
|
1531
1537
|
const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
|
|
1532
1538
|
const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
|
|
@@ -1536,11 +1542,11 @@ class PaginationHelpers {
|
|
|
1536
1542
|
// Make the API call based on method
|
|
1537
1543
|
let response;
|
|
1538
1544
|
if (method === HTTP_METHODS.POST) {
|
|
1539
|
-
response = await serviceAccess.post(endpoint, additionalParams, { headers });
|
|
1545
|
+
response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
|
|
1540
1546
|
}
|
|
1541
1547
|
else {
|
|
1542
1548
|
response = await serviceAccess.get(endpoint, {
|
|
1543
|
-
params: additionalParams,
|
|
1549
|
+
params: { ...additionalParams, ...queryParams },
|
|
1544
1550
|
headers
|
|
1545
1551
|
});
|
|
1546
1552
|
}
|
|
@@ -1595,6 +1601,7 @@ class PaginationHelpers {
|
|
|
1595
1601
|
headers: config.headers,
|
|
1596
1602
|
paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
|
|
1597
1603
|
additionalParams: prefixedOptions,
|
|
1604
|
+
queryParams: config.queryParams,
|
|
1598
1605
|
transformFn: config.transformFn,
|
|
1599
1606
|
method: config.method,
|
|
1600
1607
|
options: {
|
|
@@ -1612,6 +1619,7 @@ class PaginationHelpers {
|
|
|
1612
1619
|
folderId,
|
|
1613
1620
|
headers: config.headers,
|
|
1614
1621
|
additionalParams: prefixedOptions,
|
|
1622
|
+
queryParams: config.queryParams,
|
|
1615
1623
|
transformFn: config.transformFn,
|
|
1616
1624
|
method: config.method,
|
|
1617
1625
|
options: {
|
|
@@ -1803,18 +1811,17 @@ class BaseService {
|
|
|
1803
1811
|
const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
|
|
1804
1812
|
// Prepare request parameters based on pagination type
|
|
1805
1813
|
const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
|
|
1806
|
-
//
|
|
1814
|
+
// Route pagination state to wherever the API expects it (body for POST, URL for GET).
|
|
1815
|
+
// Caller-supplied options.body / options.params are respected as-is — the api-client
|
|
1816
|
+
// already handles params (URL) and body (request body) independently for every method.
|
|
1807
1817
|
if (method.toUpperCase() === 'POST') {
|
|
1808
1818
|
const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
|
|
1809
1819
|
options.body = {
|
|
1810
1820
|
...existingBody,
|
|
1811
|
-
...options.params,
|
|
1812
1821
|
...requestParams
|
|
1813
1822
|
};
|
|
1814
|
-
options.params = undefined;
|
|
1815
1823
|
}
|
|
1816
1824
|
else {
|
|
1817
|
-
// Merge pagination parameters with existing parameters
|
|
1818
1825
|
options.params = {
|
|
1819
1826
|
...options.params,
|
|
1820
1827
|
...requestParams
|