@uipath/uipath-typescript 1.4.0 → 1.4.1

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 (48) hide show
  1. package/dist/agent-memory/index.cjs +16 -9
  2. package/dist/agent-memory/index.mjs +16 -9
  3. package/dist/agents/index.cjs +278 -9
  4. package/dist/agents/index.d.ts +465 -6
  5. package/dist/agents/index.mjs +279 -10
  6. package/dist/assets/index.cjs +16 -9
  7. package/dist/assets/index.mjs +16 -9
  8. package/dist/attachments/index.cjs +16 -9
  9. package/dist/attachments/index.mjs +16 -9
  10. package/dist/buckets/index.cjs +114 -124
  11. package/dist/buckets/index.d.ts +197 -84
  12. package/dist/buckets/index.mjs +114 -124
  13. package/dist/cases/index.cjs +79 -13
  14. package/dist/cases/index.d.ts +30 -3
  15. package/dist/cases/index.mjs +79 -13
  16. package/dist/conversational-agent/index.cjs +16 -9
  17. package/dist/conversational-agent/index.mjs +16 -9
  18. package/dist/core/index.cjs +35 -6
  19. package/dist/core/index.mjs +35 -6
  20. package/dist/entities/index.cjs +253 -69
  21. package/dist/entities/index.d.ts +343 -116
  22. package/dist/entities/index.mjs +253 -69
  23. package/dist/feedback/index.cjs +16 -9
  24. package/dist/feedback/index.mjs +16 -9
  25. package/dist/governance/index.cjs +16 -9
  26. package/dist/governance/index.mjs +16 -9
  27. package/dist/index.cjs +529 -193
  28. package/dist/index.d.ts +2141 -750
  29. package/dist/index.mjs +529 -194
  30. package/dist/index.umd.js +529 -193
  31. package/dist/jobs/index.cjs +16 -9
  32. package/dist/jobs/index.mjs +16 -9
  33. package/dist/maestro-processes/index.cjs +16 -9
  34. package/dist/maestro-processes/index.mjs +16 -9
  35. package/dist/orchestrator-du-module/index.cjs +1788 -0
  36. package/dist/orchestrator-du-module/index.d.ts +757 -0
  37. package/dist/orchestrator-du-module/index.mjs +1785 -0
  38. package/dist/processes/index.cjs +16 -9
  39. package/dist/processes/index.mjs +16 -9
  40. package/dist/queues/index.cjs +16 -9
  41. package/dist/queues/index.mjs +16 -9
  42. package/dist/tasks/index.cjs +79 -13
  43. package/dist/tasks/index.d.ts +109 -4
  44. package/dist/tasks/index.mjs +80 -14
  45. package/dist/traces/index.cjs +303 -9
  46. package/dist/traces/index.d.ts +482 -2
  47. package/dist/traces/index.mjs +302 -10
  48. package/package.json +11 -1
@@ -937,6 +937,17 @@ const AGENTS_OFFSET_PARAMS = {
937
937
  /** No count param needed */
938
938
  COUNT_PARAM: undefined
939
939
  };
940
+ /**
941
+ * Agents incidents pagination constants — the items array is the `data` field
942
+ * itself, total count is nested under the response envelope. Reuses
943
+ * AGENTS_OFFSET_PARAMS for request params (same 0-based page-number style).
944
+ */
945
+ const AGENTS_INCIDENTS_PAGINATION = {
946
+ /** Dotted path to the items array in the incidents response envelope */
947
+ ITEMS_FIELD: 'data',
948
+ /** Total count path — same envelope location as the agents list. */
949
+ TOTAL_COUNT_FIELD: AGENTS_PAGINATION.TOTAL_COUNT_FIELD
950
+ };
940
951
  /**
941
952
  * OData OFFSET pagination parameter names (ODATA-style)
942
953
  */
@@ -1141,12 +1152,18 @@ class PaginationHelpers {
1141
1152
  * @returns Promise resolving to a paginated result
1142
1153
  */
1143
1154
  static async getAllPaginated(params) {
1144
- const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1155
+ const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1145
1156
  const endpoint = getEndpoint(folderId);
1146
1157
  const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
1158
+ // On POST, the caller's options go in the body; queryParams stays in the URL.
1159
+ // On GET, everything is URL — queryParams merges with additionalParams.
1160
+ const isPost = method === HTTP_METHODS.POST;
1161
+ const requestSpec = isPost
1162
+ ? { body: additionalParams, params: queryParams }
1163
+ : { params: { ...additionalParams, ...queryParams } };
1147
1164
  const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
1148
1165
  headers,
1149
- params: additionalParams,
1166
+ ...requestSpec,
1150
1167
  pagination: {
1151
1168
  paginationType: options.paginationType || PaginationType.OFFSET,
1152
1169
  itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
@@ -1171,7 +1188,7 @@ class PaginationHelpers {
1171
1188
  * @returns Promise resolving to an object with data and totalCount
1172
1189
  */
1173
1190
  static async getAllNonPaginated(params) {
1174
- const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1191
+ const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1175
1192
  // Set default field names
1176
1193
  const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
1177
1194
  const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
@@ -1181,11 +1198,11 @@ class PaginationHelpers {
1181
1198
  // Make the API call based on method
1182
1199
  let response;
1183
1200
  if (method === HTTP_METHODS.POST) {
1184
- response = await serviceAccess.post(endpoint, additionalParams, { headers });
1201
+ response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
1185
1202
  }
1186
1203
  else {
1187
1204
  response = await serviceAccess.get(endpoint, {
1188
- params: additionalParams,
1205
+ params: { ...additionalParams, ...queryParams },
1189
1206
  headers
1190
1207
  });
1191
1208
  }
@@ -1240,6 +1257,7 @@ class PaginationHelpers {
1240
1257
  headers: config.headers,
1241
1258
  paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
1242
1259
  additionalParams: prefixedOptions,
1260
+ queryParams: config.queryParams,
1243
1261
  transformFn: config.transformFn,
1244
1262
  method: config.method,
1245
1263
  options: {
@@ -1257,6 +1275,7 @@ class PaginationHelpers {
1257
1275
  folderId,
1258
1276
  headers: config.headers,
1259
1277
  additionalParams: prefixedOptions,
1278
+ queryParams: config.queryParams,
1260
1279
  transformFn: config.transformFn,
1261
1280
  method: config.method,
1262
1281
  options: {
@@ -1448,18 +1467,17 @@ class BaseService {
1448
1467
  const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
1449
1468
  // Prepare request parameters based on pagination type
1450
1469
  const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
1451
- // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
1470
+ // Route pagination state to wherever the API expects it (body for POST, URL for GET).
1471
+ // Caller-supplied options.body / options.params are respected as-is — the api-client
1472
+ // already handles params (URL) and body (request body) independently for every method.
1452
1473
  if (method.toUpperCase() === 'POST') {
1453
1474
  const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
1454
1475
  options.body = {
1455
1476
  ...existingBody,
1456
- ...options.params,
1457
1477
  ...requestParams
1458
1478
  };
1459
- options.params = undefined;
1460
1479
  }
1461
1480
  else {
1462
- // Merge pagination parameters with existing parameters
1463
1481
  options.params = {
1464
1482
  ...options.params,
1465
1483
  ...requestParams
@@ -1595,6 +1613,14 @@ const INSIGHTS_RTM_BASE = 'insightsrtm_';
1595
1613
  const AGENTS_ENDPOINTS = {
1596
1614
  /** Paginated list of agents with consumption and health metadata. */
1597
1615
  GET_AGENTS: `${INSIGHTS_RTM_BASE}/Agents/agents`,
1616
+ /** Paginated list of agent incidents (errors) over the requested window. */
1617
+ GET_INCIDENTS: `${INSIGHTS_RTM_BASE}/Agents/incidents`,
1618
+ /** Time-series of error counts grouped by agent over the requested window. */
1619
+ GET_ERRORS_TIMELINE: `${INSIGHTS_RTM_BASE}/Agents/errors`,
1620
+ /** Time-series of AGU consumption over the requested window. */
1621
+ GET_CONSUMPTION_TIMELINE: `${INSIGHTS_RTM_BASE}/Agents/consumptionTimeline`,
1622
+ /** Time-series of agent latency (per-percentile) over the requested window. */
1623
+ GET_LATENCY_TIMELINE: `${INSIGHTS_RTM_BASE}/Agents/latencyTimeline`,
1598
1624
  };
1599
1625
 
1600
1626
  /**
@@ -1698,10 +1724,235 @@ class AgentService extends BaseService {
1698
1724
  },
1699
1725
  }, apiOptions);
1700
1726
  }
1727
+ /**
1728
+ * Retrieves agent errors (error-classes observed for agents) over the
1729
+ * requested window.
1730
+ *
1731
+ * Returns a {@link PaginatedResponse} when pagination options (`pageSize`,
1732
+ * `cursor`, or `jumpToPage`) are provided, otherwise a
1733
+ * {@link NonPaginatedResponse}.
1734
+ *
1735
+ * @param startTime - Inclusive lower bound for the query window
1736
+ * @param endTime - Exclusive upper bound for the query window
1737
+ * @param options - Optional pagination, sort/group, and filters
1738
+ * @returns Promise resolving to a paginated or non-paginated list of {@link AgentError}
1739
+ * @example
1740
+ * ```typescript
1741
+ * import { Agents, AgentErrorSortColumn } from '@uipath/uipath-typescript/agents';
1742
+ *
1743
+ * const agents = new Agents(sdk);
1744
+ *
1745
+ * // Non-paginated — errors in the window
1746
+ * const result = await agents.getErrors(
1747
+ * new Date('2025-05-01T00:00:00Z'),
1748
+ * new Date('2026-05-14T00:00:00Z'),
1749
+ * );
1750
+ * result.items.forEach((error) => {
1751
+ * console.log(`${error.type}: ${error.description} (count=${error.count})`);
1752
+ * });
1753
+ *
1754
+ * // Paginated — sorted by execution count descending
1755
+ * const page = await agents.getErrors(
1756
+ * new Date('2025-05-01T00:00:00Z'),
1757
+ * new Date('2026-05-14T00:00:00Z'),
1758
+ * {
1759
+ * pageSize: 25,
1760
+ * orderBy: { column: AgentErrorSortColumn.ExecutionCount, desc: true },
1761
+ * },
1762
+ * );
1763
+ *
1764
+ * if (page.hasNextPage && page.nextCursor) {
1765
+ * const next = await agents.getErrors(
1766
+ * new Date('2025-05-01T00:00:00Z'),
1767
+ * new Date('2026-05-14T00:00:00Z'),
1768
+ * { cursor: page.nextCursor },
1769
+ * );
1770
+ * }
1771
+ * ```
1772
+ */
1773
+ async getErrors(startTime, endTime, options) {
1774
+ const apiOptions = { ...options, startTime: startTime.toISOString(), endTime: endTime.toISOString() };
1775
+ return PaginationHelpers.getAll({
1776
+ serviceAccess: this.createPaginationServiceAccess(),
1777
+ getEndpoint: () => AGENTS_ENDPOINTS.GET_INCIDENTS,
1778
+ method: HTTP_METHODS.POST,
1779
+ excludeFromPrefix: Object.keys(apiOptions),
1780
+ pagination: {
1781
+ paginationType: PaginationType.OFFSET,
1782
+ itemsField: AGENTS_INCIDENTS_PAGINATION.ITEMS_FIELD,
1783
+ totalCountField: AGENTS_INCIDENTS_PAGINATION.TOTAL_COUNT_FIELD,
1784
+ paginationParams: {
1785
+ pageSizeParam: AGENTS_OFFSET_PARAMS.PAGE_SIZE_PARAM,
1786
+ offsetParam: AGENTS_OFFSET_PARAMS.OFFSET_PARAM,
1787
+ countParam: AGENTS_OFFSET_PARAMS.COUNT_PARAM,
1788
+ convertToSkip: false,
1789
+ zeroBased: true,
1790
+ },
1791
+ },
1792
+ }, apiOptions);
1793
+ }
1794
+ /**
1795
+ * Retrieves a time-series of error counts grouped by agent over the requested window.
1796
+ *
1797
+ * @param startTime - Inclusive lower bound for the query window
1798
+ * @param endTime - Exclusive upper bound for the query window
1799
+ * @param options - Optional filters
1800
+ * @returns Promise resolving to an array of {@link AgentGetErrorsTimelineResponse}
1801
+ * @example
1802
+ * ```typescript
1803
+ * import { Agents } from '@uipath/uipath-typescript/agents';
1804
+ *
1805
+ * const agents = new Agents(sdk);
1806
+ *
1807
+ * // All errors in May 2025
1808
+ * const result = await agents.getErrorsTimeline(
1809
+ * new Date('2025-05-01T00:00:00Z'),
1810
+ * new Date('2025-06-01T00:00:00Z'),
1811
+ * );
1812
+ * result.forEach((point) => {
1813
+ * console.log(`${point.date} ${point.name}: ${point.value} errors`);
1814
+ * });
1815
+ * ```
1816
+ * @example
1817
+ * ```typescript
1818
+ * // Scope to specific folders and top 5 agents
1819
+ * const result = await agents.getErrorsTimeline(
1820
+ * new Date('2025-05-01T00:00:00Z'),
1821
+ * new Date('2025-06-01T00:00:00Z'),
1822
+ * {
1823
+ * folderKeys: ['<folderKey1>'],
1824
+ * agentNames: ['JokeAgent', 'StoryAgent'],
1825
+ * limit: 5,
1826
+ * },
1827
+ * );
1828
+ * ```
1829
+ */
1830
+ async getErrorsTimeline(startTime, endTime, options) {
1831
+ const body = this.buildAgentFilterBody(startTime, endTime, options);
1832
+ const response = await this.post(AGENTS_ENDPOINTS.GET_ERRORS_TIMELINE, body);
1833
+ return response.data.data;
1834
+ }
1835
+ /**
1836
+ * Retrieves a time-series of AGU (Agent Units) consumption over the requested window.
1837
+ *
1838
+ * @param startTime - Inclusive lower bound for the query window
1839
+ * @param endTime - Exclusive upper bound for the query window
1840
+ * @param options - Optional filters
1841
+ * @returns Promise resolving to an array of {@link AgentGetConsumptionTimelineResponse}
1842
+ * @example
1843
+ * ```typescript
1844
+ * import { Agents } from '@uipath/uipath-typescript/agents';
1845
+ *
1846
+ * const agents = new Agents(sdk);
1847
+ *
1848
+ * // AGU consumption timeline in May 2025
1849
+ * const result = await agents.getConsumptionTimeline(
1850
+ * new Date('2025-05-01T00:00:00Z'),
1851
+ * new Date('2025-06-01T00:00:00Z'),
1852
+ * );
1853
+ * result.forEach((point) => {
1854
+ * console.log(`${point.timeSlice}: ${point.aguConsumption} AGU`);
1855
+ * });
1856
+ * ```
1857
+ * @example
1858
+ * ```typescript
1859
+ * // Scope to specific folders and agents
1860
+ * const result = await agents.getConsumptionTimeline(
1861
+ * new Date('2025-05-01T00:00:00Z'),
1862
+ * new Date('2025-06-01T00:00:00Z'),
1863
+ * {
1864
+ * folderKeys: ['<folderKey1>'],
1865
+ * agentNames: ['JokeAgent'],
1866
+ * },
1867
+ * );
1868
+ * ```
1869
+ */
1870
+ async getConsumptionTimeline(startTime, endTime, options) {
1871
+ const body = this.buildAgentFilterBody(startTime, endTime, options);
1872
+ const response = await this.post(AGENTS_ENDPOINTS.GET_CONSUMPTION_TIMELINE, body);
1873
+ return response.data.data;
1874
+ }
1875
+ /**
1876
+ * Retrieves a time-series of agent latency (milliseconds) over the requested
1877
+ * window.
1878
+ *
1879
+ * @param startTime - Inclusive lower bound for the query window
1880
+ * @param endTime - Exclusive upper bound for the query window
1881
+ * @param options - Optional filters
1882
+ * @returns Promise resolving to an array of {@link AgentGetLatencyTimelineResponse}
1883
+ * @example
1884
+ * ```typescript
1885
+ * import { Agents } from '@uipath/uipath-typescript/agents';
1886
+ *
1887
+ * const agents = new Agents(sdk);
1888
+ *
1889
+ * // Latency timeline in May 2025
1890
+ * const result = await agents.getLatencyTimeline(
1891
+ * new Date('2025-05-01T00:00:00Z'),
1892
+ * new Date('2025-06-01T00:00:00Z'),
1893
+ * );
1894
+ * result.forEach((point) => {
1895
+ * console.log(`${point.date} ${point.name}: ${point.value} ms`);
1896
+ * });
1897
+ * ```
1898
+ * @example
1899
+ * ```typescript
1900
+ * // Scope to specific folders and a single agent
1901
+ * const result = await agents.getLatencyTimeline(
1902
+ * new Date('2025-05-01T00:00:00Z'),
1903
+ * new Date('2025-06-01T00:00:00Z'),
1904
+ * {
1905
+ * folderKeys: ['<folderKey1>'],
1906
+ * agentId: '<agentId>',
1907
+ * },
1908
+ * );
1909
+ * ```
1910
+ */
1911
+ async getLatencyTimeline(startTime, endTime, options) {
1912
+ const body = this.buildAgentFilterBody(startTime, endTime, options);
1913
+ const response = await this.post(AGENTS_ENDPOINTS.GET_LATENCY_TIMELINE, body);
1914
+ return response.data.data;
1915
+ }
1916
+ /**
1917
+ * Builds the common POST request body shared by the agent filter endpoints —
1918
+ * the required time window plus any optional folder/agent/project/process
1919
+ * filters. Undefined options are omitted so the server applies its defaults.
1920
+ */
1921
+ buildAgentFilterBody(startTime, endTime, options) {
1922
+ const body = {
1923
+ startTime: startTime.toISOString(),
1924
+ endTime: endTime.toISOString(),
1925
+ };
1926
+ if (options?.folderKeys !== undefined)
1927
+ body.folderKeys = options.folderKeys;
1928
+ if (options?.agentNames !== undefined)
1929
+ body.agentNames = options.agentNames;
1930
+ if (options?.projectKeys !== undefined)
1931
+ body.projectKeys = options.projectKeys;
1932
+ if (options?.agentId !== undefined)
1933
+ body.agentId = options.agentId;
1934
+ if (options?.processVersion !== undefined)
1935
+ body.processVersion = options.processVersion;
1936
+ if (options?.limit !== undefined)
1937
+ body.limit = options.limit;
1938
+ return body;
1939
+ }
1701
1940
  }
1702
1941
  __decorate([
1703
1942
  track('Agents.GetAll')
1704
1943
  ], AgentService.prototype, "getAll", null);
1944
+ __decorate([
1945
+ track('Agents.GetErrors')
1946
+ ], AgentService.prototype, "getErrors", null);
1947
+ __decorate([
1948
+ track('Agents.GetErrorsTimeline')
1949
+ ], AgentService.prototype, "getErrorsTimeline", null);
1950
+ __decorate([
1951
+ track('Agents.GetConsumptionTimeline')
1952
+ ], AgentService.prototype, "getConsumptionTimeline", null);
1953
+ __decorate([
1954
+ track('Agents.GetLatencyTimeline')
1955
+ ], AgentService.prototype, "getLatencyTimeline", null);
1705
1956
 
1706
1957
  /**
1707
1958
  * Columns available for ordering results.
@@ -1720,5 +1971,23 @@ var AgentListSortColumn;
1720
1971
  AgentListSortColumn["QuantityPLTU"] = "QuantityPLTU";
1721
1972
  AgentListSortColumn["FolderPath"] = "FolderPath";
1722
1973
  })(AgentListSortColumn || (AgentListSortColumn = {}));
1974
+ /**
1975
+ * Columns available for ordering / grouping the agent errors list.
1976
+ */
1977
+ var AgentErrorSortColumn;
1978
+ (function (AgentErrorSortColumn) {
1979
+ AgentErrorSortColumn["AgentId"] = "AgentId";
1980
+ AgentErrorSortColumn["AgentName"] = "AgentName";
1981
+ AgentErrorSortColumn["ParentProcessName"] = "ParentProcessName";
1982
+ AgentErrorSortColumn["ErrorTitle"] = "ErrorTitle";
1983
+ AgentErrorSortColumn["FirstSeenStartTime"] = "FirstSeenStartTime";
1984
+ AgentErrorSortColumn["ExecutionCount"] = "ExecutionCount";
1985
+ AgentErrorSortColumn["Type"] = "Type";
1986
+ AgentErrorSortColumn["FirstSeenFolderName"] = "FirstSeenFolderName";
1987
+ AgentErrorSortColumn["FirstSeenFolderPath"] = "FirstSeenFolderPath";
1988
+ AgentErrorSortColumn["LastSeenStartTime"] = "LastSeenStartTime";
1989
+ AgentErrorSortColumn["LastSeenFolderName"] = "LastSeenFolderName";
1990
+ AgentErrorSortColumn["LastSeenFolderPath"] = "LastSeenFolderPath";
1991
+ })(AgentErrorSortColumn || (AgentErrorSortColumn = {}));
1723
1992
 
1724
- export { AgentListSortColumn, AgentService as Agents };
1993
+ export { AgentErrorSortColumn, AgentListSortColumn, AgentService as Agents };
@@ -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
- params: additionalParams,
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
- // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
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
@@ -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
- params: additionalParams,
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
- // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
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
@@ -1299,12 +1299,18 @@ class PaginationHelpers {
1299
1299
  * @returns Promise resolving to a paginated result
1300
1300
  */
1301
1301
  static async getAllPaginated(params) {
1302
- const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1302
+ const { serviceAccess, getEndpoint, folderId, headers: providedHeaders, paginationParams, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1303
1303
  const endpoint = getEndpoint(folderId);
1304
1304
  const headers = providedHeaders ?? (folderId ? createHeaders({ [FOLDER_ID]: folderId }) : {});
1305
+ // On POST, the caller's options go in the body; queryParams stays in the URL.
1306
+ // On GET, everything is URL — queryParams merges with additionalParams.
1307
+ const isPost = method === HTTP_METHODS.POST;
1308
+ const requestSpec = isPost
1309
+ ? { body: additionalParams, params: queryParams }
1310
+ : { params: { ...additionalParams, ...queryParams } };
1305
1311
  const paginatedResponse = await serviceAccess.requestWithPagination(method, endpoint, paginationParams, {
1306
1312
  headers,
1307
- params: additionalParams,
1313
+ ...requestSpec,
1308
1314
  pagination: {
1309
1315
  paginationType: options.paginationType || PaginationType.OFFSET,
1310
1316
  itemsField: options.itemsField || DEFAULT_ITEMS_FIELD,
@@ -1329,7 +1335,7 @@ class PaginationHelpers {
1329
1335
  * @returns Promise resolving to an object with data and totalCount
1330
1336
  */
1331
1337
  static async getAllNonPaginated(params) {
1332
- const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1338
+ const { serviceAccess, getAllEndpoint, getByFolderEndpoint, folderId, headers: providedHeaders, additionalParams, queryParams, transformFn, method = HTTP_METHODS.GET, options = {} } = params;
1333
1339
  // Set default field names
1334
1340
  const itemsField = options.itemsField || DEFAULT_ITEMS_FIELD;
1335
1341
  const totalCountField = options.totalCountField || DEFAULT_TOTAL_COUNT_FIELD;
@@ -1339,11 +1345,11 @@ class PaginationHelpers {
1339
1345
  // Make the API call based on method
1340
1346
  let response;
1341
1347
  if (method === HTTP_METHODS.POST) {
1342
- response = await serviceAccess.post(endpoint, additionalParams, { headers });
1348
+ response = await serviceAccess.post(endpoint, additionalParams, { headers, params: queryParams });
1343
1349
  }
1344
1350
  else {
1345
1351
  response = await serviceAccess.get(endpoint, {
1346
- params: additionalParams,
1352
+ params: { ...additionalParams, ...queryParams },
1347
1353
  headers
1348
1354
  });
1349
1355
  }
@@ -1398,6 +1404,7 @@ class PaginationHelpers {
1398
1404
  headers: config.headers,
1399
1405
  paginationParams: cursor ? { cursor, pageSize } : jumpToPage !== undefined ? { jumpToPage, pageSize } : { pageSize },
1400
1406
  additionalParams: prefixedOptions,
1407
+ queryParams: config.queryParams,
1401
1408
  transformFn: config.transformFn,
1402
1409
  method: config.method,
1403
1410
  options: {
@@ -1415,6 +1422,7 @@ class PaginationHelpers {
1415
1422
  folderId,
1416
1423
  headers: config.headers,
1417
1424
  additionalParams: prefixedOptions,
1425
+ queryParams: config.queryParams,
1418
1426
  transformFn: config.transformFn,
1419
1427
  method: config.method,
1420
1428
  options: {
@@ -1606,18 +1614,17 @@ class BaseService {
1606
1614
  const params = this.validateAndPreparePaginationParams(paginationType, paginationOptions);
1607
1615
  // Prepare request parameters based on pagination type
1608
1616
  const requestParams = this.preparePaginationRequestParams(paginationType, params, options.pagination);
1609
- // For POST requests, merge pagination params into body and set params to undefined; for GET, use query params
1617
+ // Route pagination state to wherever the API expects it (body for POST, URL for GET).
1618
+ // Caller-supplied options.body / options.params are respected as-is — the api-client
1619
+ // already handles params (URL) and body (request body) independently for every method.
1610
1620
  if (method.toUpperCase() === 'POST') {
1611
1621
  const existingBody = (options.body && typeof options.body === 'object') ? options.body : {};
1612
1622
  options.body = {
1613
1623
  ...existingBody,
1614
- ...options.params,
1615
1624
  ...requestParams
1616
1625
  };
1617
- options.params = undefined;
1618
1626
  }
1619
1627
  else {
1620
- // Merge pagination parameters with existing parameters
1621
1628
  options.params = {
1622
1629
  ...options.params,
1623
1630
  ...requestParams