@uipath/uipath-typescript 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/assets/index.cjs +40 -5
  2. package/dist/assets/index.d.ts +1 -0
  3. package/dist/assets/index.mjs +40 -5
  4. package/dist/attachments/index.cjs +40 -5
  5. package/dist/attachments/index.d.ts +1 -0
  6. package/dist/attachments/index.mjs +40 -5
  7. package/dist/buckets/index.cjs +40 -5
  8. package/dist/buckets/index.d.ts +1 -0
  9. package/dist/buckets/index.mjs +40 -5
  10. package/dist/cases/index.cjs +178 -5
  11. package/dist/cases/index.d.ts +158 -3
  12. package/dist/cases/index.mjs +179 -6
  13. package/dist/conversational-agent/index.cjs +40 -5
  14. package/dist/conversational-agent/index.d.ts +1 -0
  15. package/dist/conversational-agent/index.mjs +40 -5
  16. package/dist/core/index.cjs +1 -1
  17. package/dist/core/index.d.ts +1 -1
  18. package/dist/core/index.mjs +1 -1
  19. package/dist/entities/index.cjs +40 -5
  20. package/dist/entities/index.d.ts +1 -0
  21. package/dist/entities/index.mjs +40 -5
  22. package/dist/feedback/index.cjs +291 -9
  23. package/dist/feedback/index.d.ts +418 -12
  24. package/dist/feedback/index.mjs +291 -9
  25. package/dist/index.cjs +178 -5
  26. package/dist/index.d.ts +413 -10
  27. package/dist/index.mjs +179 -6
  28. package/dist/index.umd.js +178 -5
  29. package/dist/jobs/index.cjs +40 -5
  30. package/dist/jobs/index.d.ts +1 -0
  31. package/dist/jobs/index.mjs +40 -5
  32. package/dist/maestro-processes/index.cjs +77 -5
  33. package/dist/maestro-processes/index.d.ts +1 -0
  34. package/dist/maestro-processes/index.mjs +77 -5
  35. package/dist/processes/index.cjs +40 -5
  36. package/dist/processes/index.d.ts +1 -0
  37. package/dist/processes/index.mjs +40 -5
  38. package/dist/queues/index.cjs +40 -5
  39. package/dist/queues/index.d.ts +1 -0
  40. package/dist/queues/index.mjs +40 -5
  41. package/dist/tasks/index.cjs +40 -5
  42. package/dist/tasks/index.d.ts +1 -0
  43. package/dist/tasks/index.mjs +40 -5
  44. package/package.json +1 -1
@@ -651,6 +651,27 @@ var PaginationType;
651
651
  /**
652
652
  * Collection of utility functions for working with objects
653
653
  */
654
+ /**
655
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
656
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
657
+ * Direct key match takes priority over nested traversal.
658
+ */
659
+ function resolveNestedField(data, fieldPath) {
660
+ if (!data) {
661
+ return undefined;
662
+ }
663
+ if (fieldPath in data) {
664
+ return data[fieldPath];
665
+ }
666
+ if (!fieldPath.includes('.')) {
667
+ return undefined;
668
+ }
669
+ let value = data;
670
+ for (const part of fieldPath.split('.')) {
671
+ value = value?.[part];
672
+ }
673
+ return value;
674
+ }
654
675
  /**
655
676
  * Filters out undefined values from an object
656
677
  * @param obj The source object
@@ -891,6 +912,10 @@ const BUCKET_TOKEN_PARAMS = {
891
912
  TOKEN_PARAM: 'continuationToken'
892
913
  };
893
914
 
915
+ /**
916
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
917
+ * Returns the original value if parsing fails.
918
+ */
894
919
  /**
895
920
  * Transforms data by mapping fields according to the provided field mapping
896
921
  * @param data The source data to transform
@@ -1245,7 +1270,8 @@ class PaginationHelpers {
1245
1270
  // Extract and transform items from response
1246
1271
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1247
1272
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1248
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1273
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1274
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1249
1275
  // Parse items - automatically handle JSON string responses
1250
1276
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1251
1277
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1542,9 +1568,17 @@ class BaseService {
1542
1568
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1543
1569
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1544
1570
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1571
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1572
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1573
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1545
1574
  requestParams[pageSizeParam] = limitedPageSize;
1546
- if (params.pageNumber && params.pageNumber > 1) {
1547
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1575
+ if (convertToSkip) {
1576
+ if (params.pageNumber && params.pageNumber > 1) {
1577
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1578
+ }
1579
+ }
1580
+ else {
1581
+ requestParams[offsetParam] = params.pageNumber || 1;
1548
1582
  }
1549
1583
  {
1550
1584
  requestParams[countParam] = true;
@@ -1575,7 +1609,8 @@ class BaseService {
1575
1609
  // Extract items and metadata
1576
1610
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1577
1611
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1578
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1612
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1613
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1579
1614
  const continuationToken = response.data[continuationTokenField];
1580
1615
  // Determine if there are more pages
1581
1616
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1921,7 +1956,7 @@ const JobMap = {
1921
1956
  // Connection string placeholder that will be replaced during build
1922
1957
  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";
1923
1958
  // SDK Version placeholder
1924
- const SDK_VERSION = "1.3.7";
1959
+ const SDK_VERSION = "1.3.8";
1925
1960
  const VERSION = "Version";
1926
1961
  const SERVICE = "Service";
1927
1962
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -652,6 +652,27 @@ var PaginationType;
652
652
  /**
653
653
  * Collection of utility functions for working with objects
654
654
  */
655
+ /**
656
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
657
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
658
+ * Direct key match takes priority over nested traversal.
659
+ */
660
+ function resolveNestedField(data, fieldPath) {
661
+ if (!data) {
662
+ return undefined;
663
+ }
664
+ if (fieldPath in data) {
665
+ return data[fieldPath];
666
+ }
667
+ if (!fieldPath.includes('.')) {
668
+ return undefined;
669
+ }
670
+ let value = data;
671
+ for (const part of fieldPath.split('.')) {
672
+ value = value?.[part];
673
+ }
674
+ return value;
675
+ }
655
676
  /**
656
677
  * Filters out undefined values from an object
657
678
  * @param obj The source object
@@ -903,6 +924,10 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
903
924
  TOKEN_PARAM: 'nextPage'
904
925
  };
905
926
 
927
+ /**
928
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
929
+ * Returns the original value if parsing fails.
930
+ */
906
931
  /**
907
932
  * Transforms data by mapping fields according to the provided field mapping
908
933
  * @param data The source data to transform
@@ -1175,7 +1200,8 @@ class PaginationHelpers {
1175
1200
  // Extract and transform items from response
1176
1201
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1177
1202
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1178
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1203
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1204
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1179
1205
  // Parse items - automatically handle JSON string responses
1180
1206
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1181
1207
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1472,9 +1498,17 @@ class BaseService {
1472
1498
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1473
1499
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1474
1500
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1501
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1502
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1503
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1475
1504
  requestParams[pageSizeParam] = limitedPageSize;
1476
- if (params.pageNumber && params.pageNumber > 1) {
1477
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1505
+ if (convertToSkip) {
1506
+ if (params.pageNumber && params.pageNumber > 1) {
1507
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1508
+ }
1509
+ }
1510
+ else {
1511
+ requestParams[offsetParam] = params.pageNumber || 1;
1478
1512
  }
1479
1513
  {
1480
1514
  requestParams[countParam] = true;
@@ -1505,7 +1539,8 @@ class BaseService {
1505
1539
  // Extract items and metadata
1506
1540
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1507
1541
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1508
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1542
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1543
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1509
1544
  const continuationToken = response.data[continuationTokenField];
1510
1545
  // Determine if there are more pages
1511
1546
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1743,7 +1778,7 @@ class BpmnHelpers {
1743
1778
  // Connection string placeholder that will be replaced during build
1744
1779
  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";
1745
1780
  // SDK Version placeholder
1746
- const SDK_VERSION = "1.3.7";
1781
+ const SDK_VERSION = "1.3.8";
1747
1782
  const VERSION = "Version";
1748
1783
  const SERVICE = "Service";
1749
1784
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -2121,6 +2156,41 @@ exports.DebugMode = void 0;
2121
2156
  * Case Instance Types
2122
2157
  * Types and interfaces for Maestro case instance management
2123
2158
  */
2159
+ /**
2160
+ * SLA status for a case instance
2161
+ */
2162
+ var SlaSummaryStatus;
2163
+ (function (SlaSummaryStatus) {
2164
+ /** Case is within SLA deadline */
2165
+ SlaSummaryStatus["ON_TRACK"] = "On Track";
2166
+ /** Case is approaching SLA deadline based on at-risk percentage threshold */
2167
+ SlaSummaryStatus["AT_RISK"] = "At Risk";
2168
+ /** Case has exceeded SLA deadline */
2169
+ SlaSummaryStatus["OVERDUE"] = "Overdue";
2170
+ /** Case instance has completed */
2171
+ SlaSummaryStatus["COMPLETED"] = "Completed";
2172
+ /** SLA status cannot be determined (no SLA deadline defined) */
2173
+ SlaSummaryStatus["UNKNOWN"] = "Unknown";
2174
+ })(SlaSummaryStatus || (SlaSummaryStatus = {}));
2175
+ /**
2176
+ * Instance status values for case instances and process instances
2177
+ */
2178
+ var InstanceStatus;
2179
+ (function (InstanceStatus) {
2180
+ /** Instance status not yet populated by the backend */
2181
+ InstanceStatus["UNKNOWN"] = "";
2182
+ InstanceStatus["CANCELLED"] = "Cancelled";
2183
+ InstanceStatus["CANCELING"] = "Canceling";
2184
+ InstanceStatus["COMPLETED"] = "Completed";
2185
+ InstanceStatus["FAULTED"] = "Faulted";
2186
+ InstanceStatus["PAUSED"] = "Paused";
2187
+ InstanceStatus["PAUSING"] = "Pausing";
2188
+ InstanceStatus["PENDING"] = "Pending";
2189
+ InstanceStatus["RESUMING"] = "Resuming";
2190
+ InstanceStatus["RETRYING"] = "Retrying";
2191
+ InstanceStatus["RUNNING"] = "Running";
2192
+ InstanceStatus["UPGRADING"] = "Upgrading";
2193
+ })(InstanceStatus || (InstanceStatus = {}));
2124
2194
  /**
2125
2195
  * Case stage task type
2126
2196
  */
@@ -2155,6 +2225,8 @@ var EscalationTriggerType;
2155
2225
  (function (EscalationTriggerType) {
2156
2226
  EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
2157
2227
  EscalationTriggerType["AT_RISK"] = "at-risk";
2228
+ /** Default value when no escalation rule is defined */
2229
+ EscalationTriggerType["NONE"] = "None";
2158
2230
  })(EscalationTriggerType || (EscalationTriggerType = {}));
2159
2231
  /**
2160
2232
  * SLA duration unit
@@ -750,6 +750,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
750
750
  offsetParam?: string;
751
751
  tokenParam?: string;
752
752
  countParam?: string;
753
+ convertToSkip?: boolean;
753
754
  };
754
755
  };
755
756
  }
@@ -650,6 +650,27 @@ var PaginationType;
650
650
  /**
651
651
  * Collection of utility functions for working with objects
652
652
  */
653
+ /**
654
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
655
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
656
+ * Direct key match takes priority over nested traversal.
657
+ */
658
+ function resolveNestedField(data, fieldPath) {
659
+ if (!data) {
660
+ return undefined;
661
+ }
662
+ if (fieldPath in data) {
663
+ return data[fieldPath];
664
+ }
665
+ if (!fieldPath.includes('.')) {
666
+ return undefined;
667
+ }
668
+ let value = data;
669
+ for (const part of fieldPath.split('.')) {
670
+ value = value?.[part];
671
+ }
672
+ return value;
673
+ }
653
674
  /**
654
675
  * Filters out undefined values from an object
655
676
  * @param obj The source object
@@ -901,6 +922,10 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
901
922
  TOKEN_PARAM: 'nextPage'
902
923
  };
903
924
 
925
+ /**
926
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
927
+ * Returns the original value if parsing fails.
928
+ */
904
929
  /**
905
930
  * Transforms data by mapping fields according to the provided field mapping
906
931
  * @param data The source data to transform
@@ -1173,7 +1198,8 @@ class PaginationHelpers {
1173
1198
  // Extract and transform items from response
1174
1199
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1175
1200
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1176
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1201
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1202
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1177
1203
  // Parse items - automatically handle JSON string responses
1178
1204
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1179
1205
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1470,9 +1496,17 @@ class BaseService {
1470
1496
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1471
1497
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1472
1498
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1499
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1500
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1501
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1473
1502
  requestParams[pageSizeParam] = limitedPageSize;
1474
- if (params.pageNumber && params.pageNumber > 1) {
1475
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1503
+ if (convertToSkip) {
1504
+ if (params.pageNumber && params.pageNumber > 1) {
1505
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1506
+ }
1507
+ }
1508
+ else {
1509
+ requestParams[offsetParam] = params.pageNumber || 1;
1476
1510
  }
1477
1511
  {
1478
1512
  requestParams[countParam] = true;
@@ -1503,7 +1537,8 @@ class BaseService {
1503
1537
  // Extract items and metadata
1504
1538
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1505
1539
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1506
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1540
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1541
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1507
1542
  const continuationToken = response.data[continuationTokenField];
1508
1543
  // Determine if there are more pages
1509
1544
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1741,7 +1776,7 @@ class BpmnHelpers {
1741
1776
  // Connection string placeholder that will be replaced during build
1742
1777
  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";
1743
1778
  // SDK Version placeholder
1744
- const SDK_VERSION = "1.3.7";
1779
+ const SDK_VERSION = "1.3.8";
1745
1780
  const VERSION = "Version";
1746
1781
  const SERVICE = "Service";
1747
1782
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -2119,6 +2154,41 @@ var DebugMode;
2119
2154
  * Case Instance Types
2120
2155
  * Types and interfaces for Maestro case instance management
2121
2156
  */
2157
+ /**
2158
+ * SLA status for a case instance
2159
+ */
2160
+ var SlaSummaryStatus;
2161
+ (function (SlaSummaryStatus) {
2162
+ /** Case is within SLA deadline */
2163
+ SlaSummaryStatus["ON_TRACK"] = "On Track";
2164
+ /** Case is approaching SLA deadline based on at-risk percentage threshold */
2165
+ SlaSummaryStatus["AT_RISK"] = "At Risk";
2166
+ /** Case has exceeded SLA deadline */
2167
+ SlaSummaryStatus["OVERDUE"] = "Overdue";
2168
+ /** Case instance has completed */
2169
+ SlaSummaryStatus["COMPLETED"] = "Completed";
2170
+ /** SLA status cannot be determined (no SLA deadline defined) */
2171
+ SlaSummaryStatus["UNKNOWN"] = "Unknown";
2172
+ })(SlaSummaryStatus || (SlaSummaryStatus = {}));
2173
+ /**
2174
+ * Instance status values for case instances and process instances
2175
+ */
2176
+ var InstanceStatus;
2177
+ (function (InstanceStatus) {
2178
+ /** Instance status not yet populated by the backend */
2179
+ InstanceStatus["UNKNOWN"] = "";
2180
+ InstanceStatus["CANCELLED"] = "Cancelled";
2181
+ InstanceStatus["CANCELING"] = "Canceling";
2182
+ InstanceStatus["COMPLETED"] = "Completed";
2183
+ InstanceStatus["FAULTED"] = "Faulted";
2184
+ InstanceStatus["PAUSED"] = "Paused";
2185
+ InstanceStatus["PAUSING"] = "Pausing";
2186
+ InstanceStatus["PENDING"] = "Pending";
2187
+ InstanceStatus["RESUMING"] = "Resuming";
2188
+ InstanceStatus["RETRYING"] = "Retrying";
2189
+ InstanceStatus["RUNNING"] = "Running";
2190
+ InstanceStatus["UPGRADING"] = "Upgrading";
2191
+ })(InstanceStatus || (InstanceStatus = {}));
2122
2192
  /**
2123
2193
  * Case stage task type
2124
2194
  */
@@ -2153,6 +2223,8 @@ var EscalationTriggerType;
2153
2223
  (function (EscalationTriggerType) {
2154
2224
  EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
2155
2225
  EscalationTriggerType["AT_RISK"] = "at-risk";
2226
+ /** Default value when no escalation rule is defined */
2227
+ EscalationTriggerType["NONE"] = "None";
2156
2228
  })(EscalationTriggerType || (EscalationTriggerType = {}));
2157
2229
  /**
2158
2230
  * SLA duration unit
@@ -653,6 +653,27 @@ var PaginationType;
653
653
  /**
654
654
  * Collection of utility functions for working with objects
655
655
  */
656
+ /**
657
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
658
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
659
+ * Direct key match takes priority over nested traversal.
660
+ */
661
+ function resolveNestedField(data, fieldPath) {
662
+ if (!data) {
663
+ return undefined;
664
+ }
665
+ if (fieldPath in data) {
666
+ return data[fieldPath];
667
+ }
668
+ if (!fieldPath.includes('.')) {
669
+ return undefined;
670
+ }
671
+ let value = data;
672
+ for (const part of fieldPath.split('.')) {
673
+ value = value?.[part];
674
+ }
675
+ return value;
676
+ }
656
677
  /**
657
678
  * Filters out undefined values from an object
658
679
  * @param obj The source object
@@ -893,6 +914,10 @@ const BUCKET_TOKEN_PARAMS = {
893
914
  TOKEN_PARAM: 'continuationToken'
894
915
  };
895
916
 
917
+ /**
918
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
919
+ * Returns the original value if parsing fails.
920
+ */
896
921
  /**
897
922
  * Transforms data by mapping fields according to the provided field mapping
898
923
  * @param data The source data to transform
@@ -1310,7 +1335,8 @@ class PaginationHelpers {
1310
1335
  // Extract and transform items from response
1311
1336
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1312
1337
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1313
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1338
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1339
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1314
1340
  // Parse items - automatically handle JSON string responses
1315
1341
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1316
1342
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1607,9 +1633,17 @@ class BaseService {
1607
1633
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1608
1634
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1609
1635
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1636
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1637
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1638
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1610
1639
  requestParams[pageSizeParam] = limitedPageSize;
1611
- if (params.pageNumber && params.pageNumber > 1) {
1612
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1640
+ if (convertToSkip) {
1641
+ if (params.pageNumber && params.pageNumber > 1) {
1642
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1643
+ }
1644
+ }
1645
+ else {
1646
+ requestParams[offsetParam] = params.pageNumber || 1;
1613
1647
  }
1614
1648
  {
1615
1649
  requestParams[countParam] = true;
@@ -1640,7 +1674,8 @@ class BaseService {
1640
1674
  // Extract items and metadata
1641
1675
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1642
1676
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1643
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1677
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1678
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1644
1679
  const continuationToken = response.data[continuationTokenField];
1645
1680
  // Determine if there are more pages
1646
1681
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1927,7 +1962,7 @@ const PROCESS_ENDPOINTS = {
1927
1962
  // Connection string placeholder that will be replaced during build
1928
1963
  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";
1929
1964
  // SDK Version placeholder
1930
- const SDK_VERSION = "1.3.7";
1965
+ const SDK_VERSION = "1.3.8";
1931
1966
  const VERSION = "Version";
1932
1967
  const SERVICE = "Service";
1933
1968
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -106,6 +106,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
106
106
  offsetParam?: string;
107
107
  tokenParam?: string;
108
108
  countParam?: string;
109
+ convertToSkip?: boolean;
109
110
  };
110
111
  };
111
112
  }
@@ -651,6 +651,27 @@ var PaginationType;
651
651
  /**
652
652
  * Collection of utility functions for working with objects
653
653
  */
654
+ /**
655
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
656
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
657
+ * Direct key match takes priority over nested traversal.
658
+ */
659
+ function resolveNestedField(data, fieldPath) {
660
+ if (!data) {
661
+ return undefined;
662
+ }
663
+ if (fieldPath in data) {
664
+ return data[fieldPath];
665
+ }
666
+ if (!fieldPath.includes('.')) {
667
+ return undefined;
668
+ }
669
+ let value = data;
670
+ for (const part of fieldPath.split('.')) {
671
+ value = value?.[part];
672
+ }
673
+ return value;
674
+ }
654
675
  /**
655
676
  * Filters out undefined values from an object
656
677
  * @param obj The source object
@@ -891,6 +912,10 @@ const BUCKET_TOKEN_PARAMS = {
891
912
  TOKEN_PARAM: 'continuationToken'
892
913
  };
893
914
 
915
+ /**
916
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
917
+ * Returns the original value if parsing fails.
918
+ */
894
919
  /**
895
920
  * Transforms data by mapping fields according to the provided field mapping
896
921
  * @param data The source data to transform
@@ -1308,7 +1333,8 @@ class PaginationHelpers {
1308
1333
  // Extract and transform items from response
1309
1334
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1310
1335
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1311
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1336
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1337
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1312
1338
  // Parse items - automatically handle JSON string responses
1313
1339
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1314
1340
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1605,9 +1631,17 @@ class BaseService {
1605
1631
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1606
1632
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1607
1633
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1634
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1635
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1636
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1608
1637
  requestParams[pageSizeParam] = limitedPageSize;
1609
- if (params.pageNumber && params.pageNumber > 1) {
1610
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1638
+ if (convertToSkip) {
1639
+ if (params.pageNumber && params.pageNumber > 1) {
1640
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1641
+ }
1642
+ }
1643
+ else {
1644
+ requestParams[offsetParam] = params.pageNumber || 1;
1611
1645
  }
1612
1646
  {
1613
1647
  requestParams[countParam] = true;
@@ -1638,7 +1672,8 @@ class BaseService {
1638
1672
  // Extract items and metadata
1639
1673
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1640
1674
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1641
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1675
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1676
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1642
1677
  const continuationToken = response.data[continuationTokenField];
1643
1678
  // Determine if there are more pages
1644
1679
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1925,7 +1960,7 @@ const PROCESS_ENDPOINTS = {
1925
1960
  // Connection string placeholder that will be replaced during build
1926
1961
  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";
1927
1962
  // SDK Version placeholder
1928
- const SDK_VERSION = "1.3.7";
1963
+ const SDK_VERSION = "1.3.8";
1929
1964
  const VERSION = "Version";
1930
1965
  const SERVICE = "Service";
1931
1966
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -653,6 +653,27 @@ var PaginationType;
653
653
  /**
654
654
  * Collection of utility functions for working with objects
655
655
  */
656
+ /**
657
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
658
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
659
+ * Direct key match takes priority over nested traversal.
660
+ */
661
+ function resolveNestedField(data, fieldPath) {
662
+ if (!data) {
663
+ return undefined;
664
+ }
665
+ if (fieldPath in data) {
666
+ return data[fieldPath];
667
+ }
668
+ if (!fieldPath.includes('.')) {
669
+ return undefined;
670
+ }
671
+ let value = data;
672
+ for (const part of fieldPath.split('.')) {
673
+ value = value?.[part];
674
+ }
675
+ return value;
676
+ }
656
677
  /**
657
678
  * Filters out undefined values from an object
658
679
  * @param obj The source object
@@ -893,6 +914,10 @@ const BUCKET_TOKEN_PARAMS = {
893
914
  TOKEN_PARAM: 'continuationToken'
894
915
  };
895
916
 
917
+ /**
918
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
919
+ * Returns the original value if parsing fails.
920
+ */
896
921
  /**
897
922
  * Transforms data by mapping fields according to the provided field mapping
898
923
  * @param data The source data to transform
@@ -1247,7 +1272,8 @@ class PaginationHelpers {
1247
1272
  // Extract and transform items from response
1248
1273
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1249
1274
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
1250
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
1275
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1276
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1251
1277
  // Parse items - automatically handle JSON string responses
1252
1278
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
1253
1279
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -1544,9 +1570,17 @@ class BaseService {
1544
1570
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
1545
1571
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
1546
1572
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
1573
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
1574
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
1575
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
1547
1576
  requestParams[pageSizeParam] = limitedPageSize;
1548
- if (params.pageNumber && params.pageNumber > 1) {
1549
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1577
+ if (convertToSkip) {
1578
+ if (params.pageNumber && params.pageNumber > 1) {
1579
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
1580
+ }
1581
+ }
1582
+ else {
1583
+ requestParams[offsetParam] = params.pageNumber || 1;
1550
1584
  }
1551
1585
  {
1552
1586
  requestParams[countParam] = true;
@@ -1577,7 +1611,8 @@ class BaseService {
1577
1611
  // Extract items and metadata
1578
1612
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
1579
1613
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
1580
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
1614
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
1615
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
1581
1616
  const continuationToken = response.data[continuationTokenField];
1582
1617
  // Determine if there are more pages
1583
1618
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -1856,7 +1891,7 @@ const QueueMap = {
1856
1891
  // Connection string placeholder that will be replaced during build
1857
1892
  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";
1858
1893
  // SDK Version placeholder
1859
- const SDK_VERSION = "1.3.7";
1894
+ const SDK_VERSION = "1.3.8";
1860
1895
  const VERSION = "Version";
1861
1896
  const SERVICE = "Service";
1862
1897
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -106,6 +106,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
106
106
  offsetParam?: string;
107
107
  tokenParam?: string;
108
108
  countParam?: string;
109
+ convertToSkip?: boolean;
109
110
  };
110
111
  };
111
112
  }