@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
package/dist/index.mjs CHANGED
@@ -4478,6 +4478,7 @@ const ORCHESTRATOR_BASE = 'orchestrator_';
4478
4478
  const PIMS_BASE = 'pims_';
4479
4479
  const DATAFABRIC_BASE = 'datafabric_';
4480
4480
  const IDENTITY_BASE = 'identity_';
4481
+ const INSIGHTS_RTM_BASE = 'insightsrtm_';
4481
4482
 
4482
4483
  /**
4483
4484
  * Orchestrator Service Endpoints
@@ -4584,6 +4585,10 @@ const MAESTRO_ENDPOINTS = {
4584
4585
  GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
4585
4586
  REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
4586
4587
  },
4588
+ INSIGHTS: {
4589
+ /** SLA summary for case instances */
4590
+ SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
4591
+ },
4587
4592
  };
4588
4593
 
4589
4594
  /**
@@ -5462,7 +5467,7 @@ function normalizeBaseUrl(url) {
5462
5467
  // Connection string placeholder that will be replaced during build
5463
5468
  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";
5464
5469
  // SDK Version placeholder
5465
- const SDK_VERSION = "1.3.7";
5470
+ const SDK_VERSION = "1.3.8";
5466
5471
  const VERSION = "Version";
5467
5472
  const SERVICE = "Service";
5468
5473
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -6468,6 +6473,27 @@ var PaginationType;
6468
6473
  /**
6469
6474
  * Collection of utility functions for working with objects
6470
6475
  */
6476
+ /**
6477
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
6478
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
6479
+ * Direct key match takes priority over nested traversal.
6480
+ */
6481
+ function resolveNestedField(data, fieldPath) {
6482
+ if (!data) {
6483
+ return undefined;
6484
+ }
6485
+ if (fieldPath in data) {
6486
+ return data[fieldPath];
6487
+ }
6488
+ if (!fieldPath.includes('.')) {
6489
+ return undefined;
6490
+ }
6491
+ let value = data;
6492
+ for (const part of fieldPath.split('.')) {
6493
+ value = value?.[part];
6494
+ }
6495
+ return value;
6496
+ }
6471
6497
  /**
6472
6498
  * Filters out undefined values from an object
6473
6499
  * @param obj The source object
@@ -6727,6 +6753,26 @@ const BUCKET_PAGINATION = {
6727
6753
  /** Field name for continuation token in bucket file metadata response */
6728
6754
  CONTINUATION_TOKEN_FIELD: 'continuationToken'
6729
6755
  };
6756
+ /**
6757
+ * SLA Summary pagination constants for page-number-based pagination
6758
+ */
6759
+ const SLA_SUMMARY_PAGINATION = {
6760
+ /** Field name for items in SLA summary response */
6761
+ ITEMS_FIELD: 'data',
6762
+ /** Dot-notation path for total count in nested pagination object */
6763
+ TOTAL_COUNT_FIELD: 'pagination.totalCount'
6764
+ };
6765
+ /**
6766
+ * SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
6767
+ */
6768
+ const SLA_SUMMARY_OFFSET_PARAMS = {
6769
+ /** Page size parameter name */
6770
+ PAGE_SIZE_PARAM: 'PageSize',
6771
+ /** Page number parameter name (sent directly, not converted to skip) */
6772
+ OFFSET_PARAM: 'PageNumber',
6773
+ /** No count param needed */
6774
+ COUNT_PARAM: undefined
6775
+ };
6730
6776
  /**
6731
6777
  * Process Instance pagination constants for token-based pagination
6732
6778
  */
@@ -6777,6 +6823,14 @@ const PROCESS_INSTANCE_TOKEN_PARAMS = {
6777
6823
  TOKEN_PARAM: 'nextPage'
6778
6824
  };
6779
6825
 
6826
+ /**
6827
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
6828
+ * Returns the original value if parsing fails.
6829
+ */
6830
+ function toISOUtc(value) {
6831
+ const date = new Date(value + ' UTC');
6832
+ return isNaN(date.getTime()) ? value : date.toISOString();
6833
+ }
6780
6834
  /**
6781
6835
  * Transforms data by mapping fields according to the provided field mapping
6782
6836
  * @param data The source data to transform
@@ -7333,7 +7387,8 @@ class PaginationHelpers {
7333
7387
  // Extract and transform items from response
7334
7388
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7335
7389
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
7336
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
7390
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
7391
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
7337
7392
  // Parse items - automatically handle JSON string responses
7338
7393
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
7339
7394
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -7575,9 +7630,17 @@ class BaseService {
7575
7630
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
7576
7631
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
7577
7632
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
7633
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
7634
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
7635
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
7578
7636
  requestParams[pageSizeParam] = limitedPageSize;
7579
- if (params.pageNumber && params.pageNumber > 1) {
7580
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
7637
+ if (convertToSkip) {
7638
+ if (params.pageNumber && params.pageNumber > 1) {
7639
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
7640
+ }
7641
+ }
7642
+ else {
7643
+ requestParams[offsetParam] = params.pageNumber || 1;
7581
7644
  }
7582
7645
  {
7583
7646
  requestParams[countParam] = true;
@@ -7608,7 +7671,8 @@ class BaseService {
7608
7671
  // Extract items and metadata
7609
7672
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
7610
7673
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
7611
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
7674
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
7675
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
7612
7676
  const continuationToken = response.data[continuationTokenField];
7613
7677
  // Determine if there are more pages
7614
7678
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -9495,6 +9559,41 @@ var DebugMode;
9495
9559
  * Case Instance Types
9496
9560
  * Types and interfaces for Maestro case instance management
9497
9561
  */
9562
+ /**
9563
+ * SLA status for a case instance
9564
+ */
9565
+ var SlaSummaryStatus;
9566
+ (function (SlaSummaryStatus) {
9567
+ /** Case is within SLA deadline */
9568
+ SlaSummaryStatus["ON_TRACK"] = "On Track";
9569
+ /** Case is approaching SLA deadline based on at-risk percentage threshold */
9570
+ SlaSummaryStatus["AT_RISK"] = "At Risk";
9571
+ /** Case has exceeded SLA deadline */
9572
+ SlaSummaryStatus["OVERDUE"] = "Overdue";
9573
+ /** Case instance has completed */
9574
+ SlaSummaryStatus["COMPLETED"] = "Completed";
9575
+ /** SLA status cannot be determined (no SLA deadline defined) */
9576
+ SlaSummaryStatus["UNKNOWN"] = "Unknown";
9577
+ })(SlaSummaryStatus || (SlaSummaryStatus = {}));
9578
+ /**
9579
+ * Instance status values for case instances and process instances
9580
+ */
9581
+ var InstanceStatus;
9582
+ (function (InstanceStatus) {
9583
+ /** Instance status not yet populated by the backend */
9584
+ InstanceStatus["UNKNOWN"] = "";
9585
+ InstanceStatus["CANCELLED"] = "Cancelled";
9586
+ InstanceStatus["CANCELING"] = "Canceling";
9587
+ InstanceStatus["COMPLETED"] = "Completed";
9588
+ InstanceStatus["FAULTED"] = "Faulted";
9589
+ InstanceStatus["PAUSED"] = "Paused";
9590
+ InstanceStatus["PAUSING"] = "Pausing";
9591
+ InstanceStatus["PENDING"] = "Pending";
9592
+ InstanceStatus["RESUMING"] = "Resuming";
9593
+ InstanceStatus["RETRYING"] = "Retrying";
9594
+ InstanceStatus["RUNNING"] = "Running";
9595
+ InstanceStatus["UPGRADING"] = "Upgrading";
9596
+ })(InstanceStatus || (InstanceStatus = {}));
9498
9597
  /**
9499
9598
  * Case stage task type
9500
9599
  */
@@ -9529,6 +9628,8 @@ var EscalationTriggerType;
9529
9628
  (function (EscalationTriggerType) {
9530
9629
  EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
9531
9630
  EscalationTriggerType["AT_RISK"] = "at-risk";
9631
+ /** Default value when no escalation rule is defined */
9632
+ EscalationTriggerType["NONE"] = "None";
9532
9633
  })(EscalationTriggerType || (EscalationTriggerType = {}));
9533
9634
  /**
9534
9635
  * SLA duration unit
@@ -9596,6 +9697,11 @@ function createCaseInstanceMethods(instanceData, service) {
9596
9697
  if (!instanceData.instanceId)
9597
9698
  throw new Error('Case instance ID is undefined');
9598
9699
  return service.getActionTasks(instanceData.instanceId, options);
9700
+ },
9701
+ async getSlaSummary(options) {
9702
+ if (!instanceData.instanceId)
9703
+ throw new Error('Case instance ID is undefined');
9704
+ return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
9599
9705
  }
9600
9706
  };
9601
9707
  }
@@ -11150,6 +11256,70 @@ class CaseInstancesService extends BaseService {
11150
11256
  };
11151
11257
  return await this.taskService.getAll(enhancedOptions);
11152
11258
  }
11259
+ /**
11260
+ * Get SLA summary for all case instances across folders.
11261
+ *
11262
+ * Returns SLA status, due times, escalation info, and instance metadata for each case instance.
11263
+ * The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
11264
+ *
11265
+ * @param options - Optional filtering and pagination options
11266
+ * @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
11267
+ * @example
11268
+ * ```typescript
11269
+ * // Non-paginated (returns top 50 items by default)
11270
+ * const summary = await caseInstances.getSlaSummary();
11271
+ * console.log(`Found ${summary.totalCount} cases`);
11272
+ *
11273
+ * // Filter by case instance ID
11274
+ * const filtered = await caseInstances.getSlaSummary({
11275
+ * caseInstanceId: '<caseInstanceId>'
11276
+ * });
11277
+ *
11278
+ * // Filter by time range
11279
+ * const timeFiltered = await caseInstances.getSlaSummary({
11280
+ * startTimeUtc: new Date('2026-01-01'),
11281
+ * endTimeUtc: new Date('2026-01-31')
11282
+ * });
11283
+ *
11284
+ * // With pagination
11285
+ * const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
11286
+ * if (page1.hasNextPage) {
11287
+ * const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
11288
+ * }
11289
+ *
11290
+ * // Jump to specific page
11291
+ * const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
11292
+ * ```
11293
+ */
11294
+ async getSlaSummary(options) {
11295
+ const apiOptions = options ? {
11296
+ ...options,
11297
+ startTimeUtc: options.startTimeUtc?.toISOString(),
11298
+ endTimeUtc: options.endTimeUtc?.toISOString()
11299
+ } : undefined;
11300
+ return PaginationHelpers.getAll({
11301
+ serviceAccess: this.createPaginationServiceAccess(),
11302
+ getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
11303
+ method: HTTP_METHODS.POST,
11304
+ excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
11305
+ transformFn: (item) => ({
11306
+ ...item,
11307
+ slaDueTime: toISOUtc(item.slaDueTime),
11308
+ lastModifiedTime: toISOUtc(item.lastModifiedTime)
11309
+ }),
11310
+ pagination: {
11311
+ paginationType: PaginationType.OFFSET,
11312
+ itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
11313
+ totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
11314
+ paginationParams: {
11315
+ pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
11316
+ offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
11317
+ countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
11318
+ convertToSkip: false
11319
+ }
11320
+ }
11321
+ }, apiOptions);
11322
+ }
11153
11323
  }
11154
11324
  __decorate([
11155
11325
  track('CaseInstances.GetAll')
@@ -11178,6 +11348,9 @@ __decorate([
11178
11348
  __decorate([
11179
11349
  track('CaseInstances.GetActionTasks')
11180
11350
  ], CaseInstancesService.prototype, "getActionTasks", null);
11351
+ __decorate([
11352
+ track('CaseInstances.GetSlaSummary')
11353
+ ], CaseInstancesService.prototype, "getSlaSummary", null);
11181
11354
 
11182
11355
  /**
11183
11356
  * Validates the `name` argument passed to a `getByName(name, ...)` method.
@@ -13625,4 +13798,4 @@ function getAppBase() {
13625
13798
  return getMetaTagContent(UiPathMetaTags.APP_BASE) || '/';
13626
13799
  }
13627
13800
 
13628
- export { APP_NAME, AgentMap, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, CitationErrorType, ConversationMap, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, index as DuFramework, EntityAggregateFunction, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, ExchangeMap, FeedbackRating, FeedbackStatus, FieldDisplayType, HttpStatus, InputStreamSpeechSensitivity, InterruptType, JobPriority, JobSourceType, JobState, JobSubState, JobType, JoinType, LogicalOperator$1 as LogicalOperator, MAX_PAGE_SIZE, MessageMap, MessageRole, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, QueryFilterOperator, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, RuntimeType, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, ServerlessJobType, SortOrder, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskUserType, UNKNOWN$1 as UNKNOWN, UiPath, UiPathError, UiPathMetaTags, UserSettingsMap, VERSION, ValidationError, createAgentWithMethods, createCaseInstanceWithMethods, createConversationWithMethods, createEntityWithMethods, createJobWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getAppBase, getAsset, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, loadFromMetaTags, telemetryClient, track, trackEvent };
13801
+ export { APP_NAME, AgentMap, AssetValueScope, AssetValueType, AuthenticationError, AuthorizationError, BucketOptions, CLOUD_CLIENT_ID, CLOUD_ORGANIZATION_NAME, CLOUD_REDIRECT_URI, CLOUD_ROLE_NAME, CLOUD_TENANT_NAME, CLOUD_URL, CONNECTION_STRING, CitationErrorType, ConversationMap, DEFAULT_ITEMS_FIELD, DEFAULT_PAGE_SIZE, DEFAULT_TOTAL_COUNT_FIELD, DataDirectionType, DebugMode, index as DuFramework, EntityAggregateFunction, EntityFieldDataType, EntityType, ErrorType, EscalationActionType, EscalationRecipientScope, EscalationTriggerType, ExchangeMap, FeedbackRating, FeedbackStatus, FieldDisplayType, HttpStatus, InputStreamSpeechSensitivity, InstanceStatus, InterruptType, JobPriority, JobSourceType, JobState, JobSubState, JobType, JoinType, LogicalOperator$1 as LogicalOperator, MAX_PAGE_SIZE, MessageMap, MessageRole, NetworkError, NotFoundError, PackageSourceType, PackageType, ProcessIncidentSeverity, ProcessIncidentStatus, ProcessIncidentType, QueryFilterOperator, RateLimitError, ReferenceType, RemoteControlAccess, RobotSize, RuntimeType, SDK_LOGGER_NAME, SDK_RUN_EVENT, SDK_SERVICE_NAME, SDK_VERSION, SERVICE, SLADurationUnit, ServerError, ServerlessJobType, SlaSummaryStatus, SortOrder, StageTaskType, StartStrategy, StopStrategy, TargetFramework, TaskActivityType, TaskPriority, TaskSlaCriteria, TaskSlaStatus, TaskSourceName, TaskStatus, TaskType, TaskUserType, UNKNOWN$1 as UNKNOWN, UiPath, UiPathError, UiPathMetaTags, UserSettingsMap, VERSION, ValidationError, createAgentWithMethods, createCaseInstanceWithMethods, createConversationWithMethods, createEntityWithMethods, createJobWithMethods, createProcessInstanceWithMethods, createProcessWithMethods, createTaskWithMethods, getAppBase, getAsset, getErrorDetails, getLimitedPageSize, isAuthenticationError, isAuthorizationError, isNetworkError, isNotFoundError, isRateLimitError, isServerError, isUiPathError, isValidationError, loadFromMetaTags, telemetryClient, track, trackEvent };
package/dist/index.umd.js CHANGED
@@ -4482,6 +4482,7 @@
4482
4482
  const PIMS_BASE = 'pims_';
4483
4483
  const DATAFABRIC_BASE = 'datafabric_';
4484
4484
  const IDENTITY_BASE = 'identity_';
4485
+ const INSIGHTS_RTM_BASE = 'insightsrtm_';
4485
4486
 
4486
4487
  /**
4487
4488
  * Orchestrator Service Endpoints
@@ -4588,6 +4589,10 @@
4588
4589
  GET_ELEMENT_EXECUTIONS: (instanceId) => `${PIMS_BASE}/api/v1/element-executions/case-instances/${instanceId}`,
4589
4590
  REOPEN: (instanceId) => `${PIMS_BASE}/api/v1/cases/${instanceId}/reopen`,
4590
4591
  },
4592
+ INSIGHTS: {
4593
+ /** SLA summary for case instances */
4594
+ SLA_SUMMARY: `${INSIGHTS_RTM_BASE}/caseManagement/slaSummary`,
4595
+ },
4591
4596
  };
4592
4597
 
4593
4598
  /**
@@ -9221,7 +9226,7 @@
9221
9226
  // Connection string placeholder that will be replaced during build
9222
9227
  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";
9223
9228
  // SDK Version placeholder
9224
- const SDK_VERSION = "1.3.7";
9229
+ const SDK_VERSION = "1.3.8";
9225
9230
  const VERSION = "Version";
9226
9231
  const SERVICE = "Service";
9227
9232
  const CLOUD_ORGANIZATION_NAME = "CloudOrganizationName";
@@ -10227,6 +10232,27 @@
10227
10232
  /**
10228
10233
  * Collection of utility functions for working with objects
10229
10234
  */
10235
+ /**
10236
+ * Resolves a field value from an object, supporting both direct keys (e.g., '@odata.count')
10237
+ * and dot-separated nested paths (e.g., 'pagination.totalCount').
10238
+ * Direct key match takes priority over nested traversal.
10239
+ */
10240
+ function resolveNestedField(data, fieldPath) {
10241
+ if (!data) {
10242
+ return undefined;
10243
+ }
10244
+ if (fieldPath in data) {
10245
+ return data[fieldPath];
10246
+ }
10247
+ if (!fieldPath.includes('.')) {
10248
+ return undefined;
10249
+ }
10250
+ let value = data;
10251
+ for (const part of fieldPath.split('.')) {
10252
+ value = value?.[part];
10253
+ }
10254
+ return value;
10255
+ }
10230
10256
  /**
10231
10257
  * Filters out undefined values from an object
10232
10258
  * @param obj The source object
@@ -10486,6 +10512,26 @@
10486
10512
  /** Field name for continuation token in bucket file metadata response */
10487
10513
  CONTINUATION_TOKEN_FIELD: 'continuationToken'
10488
10514
  };
10515
+ /**
10516
+ * SLA Summary pagination constants for page-number-based pagination
10517
+ */
10518
+ const SLA_SUMMARY_PAGINATION = {
10519
+ /** Field name for items in SLA summary response */
10520
+ ITEMS_FIELD: 'data',
10521
+ /** Dot-notation path for total count in nested pagination object */
10522
+ TOTAL_COUNT_FIELD: 'pagination.totalCount'
10523
+ };
10524
+ /**
10525
+ * SLA Summary OFFSET pagination parameter names (page-number style, no skip conversion)
10526
+ */
10527
+ const SLA_SUMMARY_OFFSET_PARAMS = {
10528
+ /** Page size parameter name */
10529
+ PAGE_SIZE_PARAM: 'PageSize',
10530
+ /** Page number parameter name (sent directly, not converted to skip) */
10531
+ OFFSET_PARAM: 'PageNumber',
10532
+ /** No count param needed */
10533
+ COUNT_PARAM: undefined
10534
+ };
10489
10535
  /**
10490
10536
  * Process Instance pagination constants for token-based pagination
10491
10537
  */
@@ -10536,6 +10582,14 @@
10536
10582
  TOKEN_PARAM: 'nextPage'
10537
10583
  };
10538
10584
 
10585
+ /**
10586
+ * Converts a UTC timestamp string (e.g., "5/8/2026 11:20:17 AM") to ISO 8601 UTC format.
10587
+ * Returns the original value if parsing fails.
10588
+ */
10589
+ function toISOUtc(value) {
10590
+ const date = new Date(value + ' UTC');
10591
+ return isNaN(date.getTime()) ? value : date.toISOString();
10592
+ }
10539
10593
  /**
10540
10594
  * Transforms data by mapping fields according to the provided field mapping
10541
10595
  * @param data The source data to transform
@@ -11092,7 +11146,8 @@
11092
11146
  // Extract and transform items from response
11093
11147
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
11094
11148
  const rawItems = Array.isArray(response.data) ? response.data : response.data?.[itemsField];
11095
- const totalCount = Array.isArray(response.data) ? undefined : response.data?.[totalCountField];
11149
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
11150
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
11096
11151
  // Parse items - automatically handle JSON string responses
11097
11152
  const parsedItems = typeof rawItems === 'string' ? JSON.parse(rawItems) : (rawItems || []);
11098
11153
  const items = transformFn ? parsedItems.map(transformFn) : parsedItems;
@@ -11334,9 +11389,17 @@
11334
11389
  const pageSizeParam = paginationParams?.pageSizeParam || ODATA_OFFSET_PARAMS.PAGE_SIZE_PARAM;
11335
11390
  const offsetParam = paginationParams?.offsetParam || ODATA_OFFSET_PARAMS.OFFSET_PARAM;
11336
11391
  const countParam = paginationParams?.countParam || ODATA_OFFSET_PARAMS.COUNT_PARAM;
11392
+ // When true (default), converts pageNumber to a skip/offset value (e.g., page 3 with pageSize 10 → skip 20).
11393
+ // When false, passes pageNumber directly as the offset param — used by APIs that accept a page number instead of a record offset.
11394
+ const convertToSkip = paginationParams?.convertToSkip ?? true;
11337
11395
  requestParams[pageSizeParam] = limitedPageSize;
11338
- if (params.pageNumber && params.pageNumber > 1) {
11339
- requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
11396
+ if (convertToSkip) {
11397
+ if (params.pageNumber && params.pageNumber > 1) {
11398
+ requestParams[offsetParam] = (params.pageNumber - 1) * limitedPageSize;
11399
+ }
11400
+ }
11401
+ else {
11402
+ requestParams[offsetParam] = params.pageNumber || 1;
11340
11403
  }
11341
11404
  {
11342
11405
  requestParams[countParam] = true;
@@ -11367,7 +11430,8 @@
11367
11430
  // Extract items and metadata
11368
11431
  // Handle both plain array responses and envelope responses ({ value: [...], totalRecordCount: N })
11369
11432
  const items = Array.isArray(response.data) ? response.data : (response.data[itemsField] || []);
11370
- const totalCount = Array.isArray(response.data) ? undefined : response.data[totalCountField];
11433
+ const rawTotalCount = Array.isArray(response.data) ? undefined : resolveNestedField(response.data, totalCountField);
11434
+ const totalCount = typeof rawTotalCount === 'number' ? rawTotalCount : undefined;
11371
11435
  const continuationToken = response.data[continuationTokenField];
11372
11436
  // Determine if there are more pages
11373
11437
  const hasMore = this.determineHasMorePages(paginationType, {
@@ -13254,6 +13318,41 @@
13254
13318
  * Case Instance Types
13255
13319
  * Types and interfaces for Maestro case instance management
13256
13320
  */
13321
+ /**
13322
+ * SLA status for a case instance
13323
+ */
13324
+ exports.SlaSummaryStatus = void 0;
13325
+ (function (SlaSummaryStatus) {
13326
+ /** Case is within SLA deadline */
13327
+ SlaSummaryStatus["ON_TRACK"] = "On Track";
13328
+ /** Case is approaching SLA deadline based on at-risk percentage threshold */
13329
+ SlaSummaryStatus["AT_RISK"] = "At Risk";
13330
+ /** Case has exceeded SLA deadline */
13331
+ SlaSummaryStatus["OVERDUE"] = "Overdue";
13332
+ /** Case instance has completed */
13333
+ SlaSummaryStatus["COMPLETED"] = "Completed";
13334
+ /** SLA status cannot be determined (no SLA deadline defined) */
13335
+ SlaSummaryStatus["UNKNOWN"] = "Unknown";
13336
+ })(exports.SlaSummaryStatus || (exports.SlaSummaryStatus = {}));
13337
+ /**
13338
+ * Instance status values for case instances and process instances
13339
+ */
13340
+ exports.InstanceStatus = void 0;
13341
+ (function (InstanceStatus) {
13342
+ /** Instance status not yet populated by the backend */
13343
+ InstanceStatus["UNKNOWN"] = "";
13344
+ InstanceStatus["CANCELLED"] = "Cancelled";
13345
+ InstanceStatus["CANCELING"] = "Canceling";
13346
+ InstanceStatus["COMPLETED"] = "Completed";
13347
+ InstanceStatus["FAULTED"] = "Faulted";
13348
+ InstanceStatus["PAUSED"] = "Paused";
13349
+ InstanceStatus["PAUSING"] = "Pausing";
13350
+ InstanceStatus["PENDING"] = "Pending";
13351
+ InstanceStatus["RESUMING"] = "Resuming";
13352
+ InstanceStatus["RETRYING"] = "Retrying";
13353
+ InstanceStatus["RUNNING"] = "Running";
13354
+ InstanceStatus["UPGRADING"] = "Upgrading";
13355
+ })(exports.InstanceStatus || (exports.InstanceStatus = {}));
13257
13356
  /**
13258
13357
  * Case stage task type
13259
13358
  */
@@ -13288,6 +13387,8 @@
13288
13387
  (function (EscalationTriggerType) {
13289
13388
  EscalationTriggerType["SLA_BREACHED"] = "sla-breached";
13290
13389
  EscalationTriggerType["AT_RISK"] = "at-risk";
13390
+ /** Default value when no escalation rule is defined */
13391
+ EscalationTriggerType["NONE"] = "None";
13291
13392
  })(exports.EscalationTriggerType || (exports.EscalationTriggerType = {}));
13292
13393
  /**
13293
13394
  * SLA duration unit
@@ -13355,6 +13456,11 @@
13355
13456
  if (!instanceData.instanceId)
13356
13457
  throw new Error('Case instance ID is undefined');
13357
13458
  return service.getActionTasks(instanceData.instanceId, options);
13459
+ },
13460
+ async getSlaSummary(options) {
13461
+ if (!instanceData.instanceId)
13462
+ throw new Error('Case instance ID is undefined');
13463
+ return service.getSlaSummary({ ...options, caseInstanceId: instanceData.instanceId });
13358
13464
  }
13359
13465
  };
13360
13466
  }
@@ -14909,6 +15015,70 @@
14909
15015
  };
14910
15016
  return await this.taskService.getAll(enhancedOptions);
14911
15017
  }
15018
+ /**
15019
+ * Get SLA summary for all case instances across folders.
15020
+ *
15021
+ * Returns SLA status, due times, escalation info, and instance metadata for each case instance.
15022
+ * The default page size is 50, so only the top 50 items are returned when no pagination options are provided.
15023
+ *
15024
+ * @param options - Optional filtering and pagination options
15025
+ * @returns Promise resolving to {@link SlaSummaryResponse}, paginated or non-paginated based on options
15026
+ * @example
15027
+ * ```typescript
15028
+ * // Non-paginated (returns top 50 items by default)
15029
+ * const summary = await caseInstances.getSlaSummary();
15030
+ * console.log(`Found ${summary.totalCount} cases`);
15031
+ *
15032
+ * // Filter by case instance ID
15033
+ * const filtered = await caseInstances.getSlaSummary({
15034
+ * caseInstanceId: '<caseInstanceId>'
15035
+ * });
15036
+ *
15037
+ * // Filter by time range
15038
+ * const timeFiltered = await caseInstances.getSlaSummary({
15039
+ * startTimeUtc: new Date('2026-01-01'),
15040
+ * endTimeUtc: new Date('2026-01-31')
15041
+ * });
15042
+ *
15043
+ * // With pagination
15044
+ * const page1 = await caseInstances.getSlaSummary({ pageSize: 25 });
15045
+ * if (page1.hasNextPage) {
15046
+ * const page2 = await caseInstances.getSlaSummary({ cursor: page1.nextCursor });
15047
+ * }
15048
+ *
15049
+ * // Jump to specific page
15050
+ * const page3 = await caseInstances.getSlaSummary({ jumpToPage: 3, pageSize: 25 });
15051
+ * ```
15052
+ */
15053
+ async getSlaSummary(options) {
15054
+ const apiOptions = options ? {
15055
+ ...options,
15056
+ startTimeUtc: options.startTimeUtc?.toISOString(),
15057
+ endTimeUtc: options.endTimeUtc?.toISOString()
15058
+ } : undefined;
15059
+ return PaginationHelpers.getAll({
15060
+ serviceAccess: this.createPaginationServiceAccess(),
15061
+ getEndpoint: () => MAESTRO_ENDPOINTS.INSIGHTS.SLA_SUMMARY,
15062
+ method: HTTP_METHODS.POST,
15063
+ excludeFromPrefix: ['caseInstanceId', 'startTimeUtc', 'endTimeUtc'],
15064
+ transformFn: (item) => ({
15065
+ ...item,
15066
+ slaDueTime: toISOUtc(item.slaDueTime),
15067
+ lastModifiedTime: toISOUtc(item.lastModifiedTime)
15068
+ }),
15069
+ pagination: {
15070
+ paginationType: PaginationType.OFFSET,
15071
+ itemsField: SLA_SUMMARY_PAGINATION.ITEMS_FIELD,
15072
+ totalCountField: SLA_SUMMARY_PAGINATION.TOTAL_COUNT_FIELD,
15073
+ paginationParams: {
15074
+ pageSizeParam: SLA_SUMMARY_OFFSET_PARAMS.PAGE_SIZE_PARAM,
15075
+ offsetParam: SLA_SUMMARY_OFFSET_PARAMS.OFFSET_PARAM,
15076
+ countParam: SLA_SUMMARY_OFFSET_PARAMS.COUNT_PARAM,
15077
+ convertToSkip: false
15078
+ }
15079
+ }
15080
+ }, apiOptions);
15081
+ }
14912
15082
  }
14913
15083
  __decorate([
14914
15084
  track('CaseInstances.GetAll')
@@ -14937,6 +15107,9 @@
14937
15107
  __decorate([
14938
15108
  track('CaseInstances.GetActionTasks')
14939
15109
  ], CaseInstancesService.prototype, "getActionTasks", null);
15110
+ __decorate([
15111
+ track('CaseInstances.GetSlaSummary')
15112
+ ], CaseInstancesService.prototype, "getSlaSummary", null);
14940
15113
 
14941
15114
  /**
14942
15115
  * Validates the `name` argument passed to a `getByName(name, ...)` method.
@@ -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, {
@@ -1923,7 +1958,7 @@ const JobMap = {
1923
1958
  // Connection string placeholder that will be replaced during build
1924
1959
  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";
1925
1960
  // SDK Version placeholder
1926
- const SDK_VERSION = "1.3.7";
1961
+ const SDK_VERSION = "1.3.8";
1927
1962
  const VERSION = "Version";
1928
1963
  const SERVICE = "Service";
1929
1964
  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
  }