@oneuptime/common 14.0.106 → 14.0.108

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 (350) hide show
  1. package/Models/AnalyticsModels/AuditLog.js +1 -1
  2. package/Models/AnalyticsModels/Index.js +3 -0
  3. package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
  4. package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
  5. package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
  6. package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
  7. package/Models/DatabaseModels/CallLog.d.mts +4 -0
  8. package/Models/DatabaseModels/CallLog.d.ts +4 -0
  9. package/Models/DatabaseModels/CallLog.js +85 -0
  10. package/Models/DatabaseModels/DataBiConnection.d.mts +7 -0
  11. package/Models/DatabaseModels/DataBiConnection.d.ts +7 -0
  12. package/Models/DatabaseModels/DataBiConnection.js +105 -2
  13. package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
  14. package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
  15. package/Models/DatabaseModels/DataDashboard.js +129 -2
  16. package/Models/DatabaseModels/Index.js +8 -0
  17. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  18. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  19. package/Models/DatabaseModels/NetworkDevice.js +55 -0
  20. package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
  21. package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
  22. package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
  23. package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
  24. package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
  25. package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
  26. package/Models/DatabaseModels/NetworkSite.js +51 -0
  27. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
  28. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
  29. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
  30. package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
  31. package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
  32. package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
  33. package/Models/DatabaseModels/RumApplication.d.mts +2 -0
  34. package/Models/DatabaseModels/RumApplication.d.ts +2 -0
  35. package/Models/DatabaseModels/RumApplication.js +108 -0
  36. package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
  37. package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
  38. package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
  39. package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
  40. package/Models/DatabaseModels/Team.js +10 -2
  41. package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
  42. package/Models/DatabaseModels/TeamCustomRole.js +9 -1
  43. package/Models/DatabaseModels/TeamMember.js +15 -1
  44. package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
  45. package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
  46. package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
  47. package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
  48. package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
  49. package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
  50. package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
  51. package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
  52. package/Models/DatabaseModels/TeamPermission.js +12 -1
  53. package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
  54. package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
  55. package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
  56. package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
  57. package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
  58. package/Models/DatabaseModels/WhatsAppLog.js +62 -0
  59. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
  60. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
  61. package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
  62. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
  63. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
  64. package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
  65. package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
  66. package/Types/AI/AIActionWords.d.mts +1 -0
  67. package/Types/AI/AIActionWords.d.ts +1 -0
  68. package/Types/AI/AIActionWords.js +15 -4
  69. package/Types/AI/AIChatRecordSeen.d.mts +3 -0
  70. package/Types/AI/AIChatRecordSeen.d.ts +3 -0
  71. package/Types/AI/AIChatRecordSeen.js +28 -3
  72. package/Types/AI/AIChatRecordSeen.mjs +1 -0
  73. package/Types/AI/AIChatTypes.d.mts +2 -1
  74. package/Types/AI/AIChatTypes.d.ts +2 -1
  75. package/Types/AI/AIChatTypes.js +2 -0
  76. package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
  77. package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
  78. package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
  79. package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
  80. package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
  81. package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
  82. package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
  83. package/Types/AuditLog/AuditLogRetention.js +91 -0
  84. package/Types/AuditLog/AuditLogRetention.mjs +8 -0
  85. package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
  86. package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
  87. package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
  88. package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
  89. package/Types/CodeInSentence.d.mts +8 -0
  90. package/Types/CodeInSentence.d.ts +8 -0
  91. package/Types/CodeInSentence.js +875 -0
  92. package/Types/CodeInSentence.mjs +4 -0
  93. package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
  94. package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
  95. package/Types/CodeRepository/CodeFileSeen.js +61 -3
  96. package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
  97. package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
  98. package/Types/Dashboard/DashboardComponentType.js +7 -0
  99. package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
  100. package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
  101. package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
  102. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
  103. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
  104. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
  105. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
  106. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
  107. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
  108. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
  109. package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
  110. package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
  111. package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
  112. package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
  113. package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
  114. package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
  115. package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
  116. package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
  117. package/Types/DataObservability/DataDashboardActivity.js +119 -0
  118. package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
  119. package/Types/DataObservability/DataObservabilityApiTypes.d.mts +14 -0
  120. package/Types/DataObservability/DataObservabilityApiTypes.d.ts +14 -0
  121. package/Types/DataObservability/DataObservabilityApiTypes.js +14 -0
  122. package/Types/DataObservability/DataTableLineage.d.mts +108 -0
  123. package/Types/DataObservability/DataTableLineage.d.ts +108 -0
  124. package/Types/DataObservability/DataTableLineage.js +119 -0
  125. package/Types/DataObservability/DataTableLineage.mjs +21 -0
  126. package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
  127. package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
  128. package/Types/DataSecurity/DataStoreKind.js +3 -0
  129. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
  130. package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
  131. package/Types/Date.d.mts +4 -0
  132. package/Types/Date.d.ts +4 -0
  133. package/Types/Date.js +47 -2
  134. package/Types/Date.mjs +2 -0
  135. package/Types/DateLanguage.d.mts +9 -0
  136. package/Types/DateLanguage.d.ts +9 -0
  137. package/Types/DateLanguage.js +79 -1
  138. package/Types/DateLanguage.mjs +4 -0
  139. package/Types/HashedString.js +9 -2
  140. package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
  141. package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
  142. package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
  143. package/Types/Monitor/CriteriaFilterTerms.js +166 -0
  144. package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
  145. package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
  146. package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
  147. package/Types/Monitor/CriteriaFilterValues.js +324 -0
  148. package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
  149. package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
  150. package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
  151. package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
  152. package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
  153. package/Types/Monitor/EvaluationSentence.d.mts +37 -0
  154. package/Types/Monitor/EvaluationSentence.d.ts +37 -0
  155. package/Types/Monitor/EvaluationSentence.js +298 -0
  156. package/Types/Monitor/EvaluationSentence.mjs +12 -0
  157. package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
  158. package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
  159. package/Types/Monitor/MonitorCriteria.d.mts +2 -0
  160. package/Types/Monitor/MonitorCriteria.d.ts +2 -0
  161. package/Types/Monitor/MonitorCriteria.js +8 -0
  162. package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
  163. package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
  164. package/Types/Monitor/MonitorCriteriaInstance.js +265 -196
  165. package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
  166. package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
  167. package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
  168. package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
  169. package/Types/Monitor/MonitorStep.d.mts +2 -0
  170. package/Types/Monitor/MonitorStep.d.ts +2 -0
  171. package/Types/Monitor/MonitorStep.js +28 -11
  172. package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
  173. package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
  174. package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
  175. package/Types/Monitor/MonitorStepRollingTime.js +117 -0
  176. package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
  177. package/Types/Monitor/MonitorSteps.d.mts +2 -0
  178. package/Types/Monitor/MonitorSteps.d.ts +2 -0
  179. package/Types/Monitor/MonitorType.d.mts +1 -0
  180. package/Types/Monitor/MonitorType.d.ts +1 -0
  181. package/Types/Monitor/MonitorType.js +12 -0
  182. package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
  183. package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
  184. package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
  185. package/Types/Monitor/TelemetryAlertRule.js +7 -2
  186. package/Types/Monitor/TelemetryObservation.d.mts +15 -0
  187. package/Types/Monitor/TelemetryObservation.d.ts +15 -0
  188. package/Types/Monitor/TelemetryObservation.js +28 -0
  189. package/Types/Monitor/TelemetryObservation.mjs +2 -0
  190. package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
  191. package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
  192. package/Types/NetworkDevice/DeviceNaming.js +279 -0
  193. package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
  194. package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
  195. package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
  196. package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
  197. package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
  198. package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
  199. package/Types/NotificationRule/NotificationRepeat.js +51 -0
  200. package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
  201. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
  202. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
  203. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
  204. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
  205. package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
  206. package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
  207. package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
  208. package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
  209. package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
  210. package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
  211. package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
  212. package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
  213. package/Types/Permission.d.mts +5 -0
  214. package/Types/Permission.d.ts +5 -0
  215. package/Types/Permission.js +61 -5
  216. package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
  217. package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
  218. package/Types/ReadingDirection.d.mts +2 -0
  219. package/Types/ReadingDirection.d.ts +2 -0
  220. package/Types/ReadingDirection.js +221 -25
  221. package/Types/ReadingDirection.mjs +2 -0
  222. package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
  223. package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
  224. package/Types/RollingTime/RollingTimeUtil.js +240 -71
  225. package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
  226. package/Types/Rules/RuleCriteriaSubject.js +1 -0
  227. package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
  228. package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
  229. package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
  230. package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
  231. package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
  232. package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
  233. package/Types/Rum/ProductAnalyticsEvents.js +477 -0
  234. package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
  235. package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
  236. package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
  237. package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
  238. package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
  239. package/Types/Rum/SessionReplay.d.mts +4 -0
  240. package/Types/Rum/SessionReplay.d.ts +4 -0
  241. package/Types/Rum/SessionReplayHealth.js +1 -1
  242. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
  243. package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
  244. package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
  245. package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
  246. package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
  247. package/Types/Team/BuiltInTeam.d.mts +1 -0
  248. package/Types/Team/BuiltInTeam.d.ts +1 -0
  249. package/Types/Team/BuiltInTeam.js +14 -1
  250. package/Types/Team/BuiltInTeam.mjs +1 -0
  251. package/Types/Telemetry/ServiceType.d.mts +1 -0
  252. package/Types/Telemetry/ServiceType.d.ts +1 -0
  253. package/Types/Telemetry/ServiceType.js +6 -0
  254. package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
  255. package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
  256. package/Types/Telemetry/TelemetryUsage.js +24 -5
  257. package/Types/Telemetry/TelemetryUsage.mjs +3 -0
  258. package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
  259. package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
  260. package/Types/UserNotification/UserNotificationStatus.js +8 -0
  261. package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
  262. package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
  263. package/Types/Workspace/NotificationRules/EventType.js +8 -0
  264. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
  265. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
  266. package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
  267. package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
  268. package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
  269. package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
  270. package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
  271. package/Utils/AI/InvestigationReport.js +93 -21
  272. package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
  273. package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
  274. package/Utils/AI/InvestigationReportLanguages.js +603 -0
  275. package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
  276. package/Utils/Crypto.js +10 -3
  277. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
  278. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
  279. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
  280. package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
  281. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
  282. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
  283. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
  284. package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
  285. package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
  286. package/Utils/Dashboard/TableThresholds.js +5 -2
  287. package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
  288. package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
  289. package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
  290. package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
  291. package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
  292. package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
  293. package/Utils/Monitor/MonitorRootCauseWording.js +246 -0
  294. package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
  295. package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
  296. package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
  297. package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
  298. package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
  299. package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
  300. package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
  301. package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
  302. package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
  303. package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
  304. package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
  305. package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
  306. package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
  307. package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
  308. package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
  309. package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
  310. package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
  311. package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
  312. package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
  313. package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
  314. package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
  315. package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
  316. package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
  317. package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
  318. package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
  319. package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
  320. package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
  321. package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
  322. package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
  323. package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
  324. package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
  325. package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
  326. package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
  327. package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
  328. package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
  329. package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
  330. package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
  331. package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
  332. package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
  333. package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
  334. package/Utils/Slo/SloFeedMarkdown.js +64 -17
  335. package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
  336. package/Utils/Slo/SloProjection.d.mts +18 -0
  337. package/Utils/Slo/SloProjection.d.ts +18 -0
  338. package/Utils/Slo/SloProjection.js +53 -12
  339. package/Utils/Slo/SloProjection.mjs +2 -0
  340. package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
  341. package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
  342. package/Utils/StatusPage/ResourceExplorer.js +5 -32
  343. package/Utils/TotpSetupKey.d.mts +3 -0
  344. package/Utils/TotpSetupKey.d.ts +3 -0
  345. package/Utils/TotpSetupKey.js +72 -0
  346. package/Utils/TotpSetupKey.mjs +4 -0
  347. package/Utils/Workspace/WorkspaceChannelName.js +5 -1
  348. package/package.json +1 -1
  349. package/Utils/Rum/SessionReplayHealth.js +0 -558
  350. /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
@@ -0,0 +1,4 @@
1
+ import commonJsModule from "./CodeInSentence.js";
2
+ export const LEFT_TO_RIGHT_ISOLATE = commonJsModule.LEFT_TO_RIGHT_ISOLATE;
3
+ export const getCodeInSentence = commonJsModule.getCodeInSentence;
4
+ export const setCodeApartInSentence = commonJsModule.setCodeApartInSentence;
@@ -40,6 +40,7 @@ type CodeFileViewsFunction = (data: {
40
40
  records: ReadonlyArray<unknown> | null | undefined;
41
41
  repositoryId: string;
42
42
  filePath: string;
43
+ inHandOnly?: boolean | undefined;
43
44
  }) => Array<CodeFileView>;
44
45
  export declare const getCodeFileViews: CodeFileViewsFunction;
45
46
  export type CodeFileOnBranch = {
@@ -55,6 +56,7 @@ export declare enum CodeFileUnseen {
55
56
  ChangedSinceRead = "ChangedSinceRead",
56
57
  ReadOnAnotherBranch = "ReadOnAnotherBranch",
57
58
  NotRead = "NotRead",
59
+ ReadInEarlierAnswer = "ReadInEarlierAnswer",
58
60
  ReadInPart = "ReadInPart",
59
61
  NotChecked = "NotChecked",
60
62
  ValuesHidden = "ValuesHidden"
@@ -72,6 +74,7 @@ type FindCodeFileUnseenFunction = (data: {
72
74
  views: ReadonlyArray<CodeFileView>;
73
75
  branchName: string;
74
76
  now: CodeFileOnBranch;
77
+ viewsInHand?: ReadonlyArray<CodeFileView> | undefined;
75
78
  }) => Omit<CodeFileUnseenFinding, "filePath"> | null;
76
79
  export declare const findCodeFileUnseen: FindCodeFileUnseenFunction;
77
80
  type FindCodeFilesUnseenFunction = (data: {
@@ -40,6 +40,7 @@ type CodeFileViewsFunction = (data: {
40
40
  records: ReadonlyArray<unknown> | null | undefined;
41
41
  repositoryId: string;
42
42
  filePath: string;
43
+ inHandOnly?: boolean | undefined;
43
44
  }) => Array<CodeFileView>;
44
45
  export declare const getCodeFileViews: CodeFileViewsFunction;
45
46
  export type CodeFileOnBranch = {
@@ -55,6 +56,7 @@ export declare enum CodeFileUnseen {
55
56
  ChangedSinceRead = "ChangedSinceRead",
56
57
  ReadOnAnotherBranch = "ReadOnAnotherBranch",
57
58
  NotRead = "NotRead",
59
+ ReadInEarlierAnswer = "ReadInEarlierAnswer",
58
60
  ReadInPart = "ReadInPart",
59
61
  NotChecked = "NotChecked",
60
62
  ValuesHidden = "ValuesHidden"
@@ -72,6 +74,7 @@ type FindCodeFileUnseenFunction = (data: {
72
74
  views: ReadonlyArray<CodeFileView>;
73
75
  branchName: string;
74
76
  now: CodeFileOnBranch;
77
+ viewsInHand?: ReadonlyArray<CodeFileView> | undefined;
75
78
  }) => Omit<CodeFileUnseenFinding, "filePath"> | null;
76
79
  export declare const findCodeFileUnseen: FindCodeFileUnseenFunction;
77
80
  type FindCodeFilesUnseenFunction = (data: {
@@ -43,6 +43,14 @@ const CodeFileValuesHidden_1 = require("./CodeFileValuesHidden");
43
43
  * unseen. A commit of Ask AI's own wrote all of a file, and a citation
44
44
  * from before OneUptime kept lines reads as all of it.
45
45
  *
46
+ * And a version Ask AI saw is one it still has only in the turn that read
47
+ * it (issue #6365): a new turn replays the earlier turns' answers, never the
48
+ * files their tools read. A record from an earlier answer still says what
49
+ * Ask AI saw of the version - a change since is still a change since - but
50
+ * only this turn's reads and writes count as the lines in hand. With none
51
+ * of the version in hand, Ask AI writes it from memory; with some, it
52
+ * reads it in part, as above.
53
+ *
46
54
  * And a line Ask AI saw is not every value in it (issue #6364): what looks
47
55
  * like a secret or personal data reads as a placeholder, "[redacted-ip]",
48
56
  * so a version Ask AI writes whole puts the placeholder where the value
@@ -251,7 +259,8 @@ const getCodeFileViews = (data) => {
251
259
  const record = (0, AIChatRecordSeen_1.readAIChatRecordSeen)(value);
252
260
  if (!record ||
253
261
  record.recordType !== AIChatRecordSeen_1.AIChatRecordSeenType.CodeFile ||
254
- record.isPartial) {
262
+ record.isPartial ||
263
+ (data.inHandOnly && record.fromEarlierAnswer)) {
255
264
  continue;
256
265
  }
257
266
  const address = (0, exports.readCodeFileRecordId)(record.recordId);
@@ -289,6 +298,13 @@ var CodeFileUnseen;
289
298
  CodeFileUnseen["ReadOnAnotherBranch"] = "ReadOnAnotherBranch";
290
299
  // Ask AI never saw it, and the branch has it.
291
300
  CodeFileUnseen["NotRead"] = "NotRead";
301
+ /*
302
+ * Ask AI saw this version - read it, or wrote it itself - only in an
303
+ * earlier answer (issue #6365), and no longer has its text: a new turn
304
+ * replays the answers, never the files. The change writes all of it from
305
+ * memory.
306
+ */
307
+ CodeFileUnseen["ReadInEarlierAnswer"] = "ReadInEarlierAnswer";
292
308
  /*
293
309
  * Ask AI saw this version, but only some of its lines (issue #6330): the
294
310
  * change writes all of it, and drops what Ask AI never saw.
@@ -337,6 +353,33 @@ const findLinesNotRead = (data) => {
337
353
  linesNotRead: linesNotRead,
338
354
  };
339
355
  };
356
+ /*
357
+ * What Ask AI does not have in front of it of a version it saw, to write
358
+ * it whole (issue #6365): the lines its views of that version showed in
359
+ * this turn - a view from an earlier answer says only that it saw the
360
+ * version. None of it in hand: read in an earlier answer.
361
+ */
362
+ const findLinesNotInHand = (data) => {
363
+ if (!data.viewsInHand) {
364
+ return findLinesNotRead({
365
+ views: data.views,
366
+ fingerprint: data.fingerprint,
367
+ });
368
+ }
369
+ if (data.fingerprint === null) {
370
+ return null;
371
+ }
372
+ const fingerprint = data.fingerprint;
373
+ if (!data.viewsInHand.some((view) => {
374
+ return view.fingerprint === fingerprint;
375
+ })) {
376
+ return { unseen: CodeFileUnseen.ReadInEarlierAnswer };
377
+ }
378
+ return findLinesNotRead({
379
+ views: data.viewsInHand,
380
+ fingerprint: fingerprint,
381
+ });
382
+ };
340
383
  /*
341
384
  * What writing a file whole would undo that Ask AI never saw, or null for
342
385
  * nothing: the rules at the top of this file. Ask AI's last view of the
@@ -354,7 +397,11 @@ const findCodeFileUnseen = (data) => {
354
397
  });
355
398
  if (onBranch) {
356
399
  return onBranch.fingerprint === fingerprintNow
357
- ? findLinesNotRead({ views: data.views, fingerprint: fingerprintNow })
400
+ ? findLinesNotInHand({
401
+ views: data.views,
402
+ viewsInHand: data.viewsInHand,
403
+ fingerprint: fingerprintNow,
404
+ })
358
405
  : { unseen: CodeFileUnseen.ChangedSinceRead };
359
406
  }
360
407
  // Not on the branch: the change adds it, and undoes nothing.
@@ -367,7 +414,11 @@ const findCodeFileUnseen = (data) => {
367
414
  if (elsewhere.some((view) => {
368
415
  return view.fingerprint === fingerprintNow;
369
416
  })) {
370
- return findLinesNotRead({ views: data.views, fingerprint: fingerprintNow });
417
+ return findLinesNotInHand({
418
+ views: data.views,
419
+ viewsInHand: data.viewsInHand,
420
+ fingerprint: fingerprintNow,
421
+ });
371
422
  }
372
423
  let latestWithFile = null;
373
424
  for (const view of elsewhere) {
@@ -396,6 +447,13 @@ const findCodeFilesUnseen = (data) => {
396
447
  }),
397
448
  branchName: data.branchName,
398
449
  now: file.now,
450
+ // Only this turn's lines are in hand (issue #6365).
451
+ viewsInHand: (0, exports.getCodeFileViews)({
452
+ records: data.records,
453
+ repositoryId: data.repositoryId,
454
+ filePath: file.filePath,
455
+ inHandOnly: true,
456
+ }),
399
457
  });
400
458
  if (found) {
401
459
  findings.push(Object.assign({ filePath: file.filePath }, found));
@@ -13,6 +13,8 @@ declare enum DashboardComponentType {
13
13
  LogChart = "LogChart",
14
14
  SecurityEventsList = "SecurityEventsList",
15
15
  SecurityEventsFlow = "SecurityEventsFlow",
16
+ ProductAnalyticsFunnel = "ProductAnalyticsFunnel",
17
+ ProductAnalyticsRetention = "ProductAnalyticsRetention",
16
18
  TraceList = "TraceList",
17
19
  TraceChart = "TraceChart",
18
20
  TraceTable = "TraceTable",
@@ -13,6 +13,8 @@ declare enum DashboardComponentType {
13
13
  LogChart = "LogChart",
14
14
  SecurityEventsList = "SecurityEventsList",
15
15
  SecurityEventsFlow = "SecurityEventsFlow",
16
+ ProductAnalyticsFunnel = "ProductAnalyticsFunnel",
17
+ ProductAnalyticsRetention = "ProductAnalyticsRetention",
16
18
  TraceList = "TraceList",
17
19
  TraceChart = "TraceChart",
18
20
  TraceTable = "TraceTable",
@@ -27,6 +27,13 @@ var DashboardComponentType;
27
27
  DashboardComponentType["LogChart"] = "LogChart";
28
28
  DashboardComponentType["SecurityEventsList"] = "SecurityEventsList";
29
29
  DashboardComponentType["SecurityEventsFlow"] = "SecurityEventsFlow";
30
+ /*
31
+ * A funnel and a retention table saved from a RUM application's product
32
+ * analytics (issue #6630), read with the dashboard's time range. Not
33
+ * available on public dashboards.
34
+ */
35
+ DashboardComponentType["ProductAnalyticsFunnel"] = "ProductAnalyticsFunnel";
36
+ DashboardComponentType["ProductAnalyticsRetention"] = "ProductAnalyticsRetention";
30
37
  DashboardComponentType["TraceList"] = "TraceList";
31
38
  DashboardComponentType["TraceChart"] = "TraceChart";
32
39
  DashboardComponentType["TraceTable"] = "TraceTable";
@@ -40,7 +40,9 @@ export declare enum EntityFilterModelType {
40
40
  CephCluster = "CephCluster",
41
41
  StorageArray = "StorageArray",
42
42
  DockerSwarmCluster = "DockerSwarmCluster",
43
- NetworkSiteType = "NetworkSiteType"
43
+ NetworkSiteType = "NetworkSiteType",
44
+ ProductAnalyticsSavedFunnel = "ProductAnalyticsSavedFunnel",
45
+ ProductAnalyticsSavedRetention = "ProductAnalyticsSavedRetention"
44
46
  }
45
47
  export interface ComponentArgumentSection {
46
48
  name: string;
@@ -40,7 +40,9 @@ export declare enum EntityFilterModelType {
40
40
  CephCluster = "CephCluster",
41
41
  StorageArray = "StorageArray",
42
42
  DockerSwarmCluster = "DockerSwarmCluster",
43
- NetworkSiteType = "NetworkSiteType"
43
+ NetworkSiteType = "NetworkSiteType",
44
+ ProductAnalyticsSavedFunnel = "ProductAnalyticsSavedFunnel",
45
+ ProductAnalyticsSavedRetention = "ProductAnalyticsSavedRetention"
44
46
  }
45
47
  export interface ComponentArgumentSection {
46
48
  name: string;
@@ -49,4 +49,7 @@ var EntityFilterModelType;
49
49
  EntityFilterModelType["StorageArray"] = "StorageArray";
50
50
  EntityFilterModelType["DockerSwarmCluster"] = "DockerSwarmCluster";
51
51
  EntityFilterModelType["NetworkSiteType"] = "NetworkSiteType";
52
+ // Saved funnels and saved retention tables (RumProductAnalyticsSavedView).
53
+ EntityFilterModelType["ProductAnalyticsSavedFunnel"] = "ProductAnalyticsSavedFunnel";
54
+ EntityFilterModelType["ProductAnalyticsSavedRetention"] = "ProductAnalyticsSavedRetention";
52
55
  })(EntityFilterModelType || (exports.EntityFilterModelType = EntityFilterModelType = {}));
@@ -0,0 +1,11 @@
1
+ import ObjectID from "../../ObjectID.mjs";
2
+ import DashboardComponentType from "../DashboardComponentType.mjs";
3
+ import BaseComponent from "./DashboardBaseComponent.mjs";
4
+ export default interface DashboardProductAnalyticsFunnelComponent extends BaseComponent {
5
+ componentType: DashboardComponentType.ProductAnalyticsFunnel;
6
+ componentId: ObjectID;
7
+ arguments: {
8
+ savedViewId?: string | undefined;
9
+ title?: string | undefined;
10
+ };
11
+ }
@@ -0,0 +1,11 @@
1
+ import ObjectID from "../../ObjectID";
2
+ import DashboardComponentType from "../DashboardComponentType";
3
+ import BaseComponent from "./DashboardBaseComponent";
4
+ export default interface DashboardProductAnalyticsFunnelComponent extends BaseComponent {
5
+ componentType: DashboardComponentType.ProductAnalyticsFunnel;
6
+ componentId: ObjectID;
7
+ arguments: {
8
+ savedViewId?: string | undefined;
9
+ title?: string | undefined;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ import "./DashboardProductAnalyticsFunnelComponent.js";
@@ -0,0 +1,11 @@
1
+ import ObjectID from "../../ObjectID.mjs";
2
+ import DashboardComponentType from "../DashboardComponentType.mjs";
3
+ import BaseComponent from "./DashboardBaseComponent.mjs";
4
+ export default interface DashboardProductAnalyticsRetentionComponent extends BaseComponent {
5
+ componentType: DashboardComponentType.ProductAnalyticsRetention;
6
+ componentId: ObjectID;
7
+ arguments: {
8
+ savedViewId?: string | undefined;
9
+ title?: string | undefined;
10
+ };
11
+ }
@@ -0,0 +1,11 @@
1
+ import ObjectID from "../../ObjectID";
2
+ import DashboardComponentType from "../DashboardComponentType";
3
+ import BaseComponent from "./DashboardBaseComponent";
4
+ export default interface DashboardProductAnalyticsRetentionComponent extends BaseComponent {
5
+ componentType: DashboardComponentType.ProductAnalyticsRetention;
6
+ componentId: ObjectID;
7
+ arguments: {
8
+ savedViewId?: string | undefined;
9
+ title?: string | undefined;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ import "./DashboardProductAnalyticsRetentionComponent.js";
@@ -41,13 +41,13 @@ const DashboardWidgetSort_1 = require("./DashboardWidgetSort");
41
41
  */
42
42
  /*
43
43
  * The widgets a public dashboard cannot draw: its API reads no logs, no
44
- * traces and no security events. Each says so in its place, under its
45
- * title ("Log charts are not available on public dashboards."), and its
46
- * title is all it is served. The external Data Source widgets are not
47
- * among them: a public dashboard leaves them out altogether, because
48
- * their settings are the query itself (PublicDashboardViewConfig
49
- * .sanitize). The page lays out both kinds as the words they are
50
- * (PublicDashboardContext.isWidgetDrawnHere).
44
+ * traces, no security events and no product analytics. Each says so in its
45
+ * place, under its title ("Log charts are not available on public
46
+ * dashboards."), and its title is all it is served. The external Data
47
+ * Source widgets are not among them: a public dashboard leaves them out
48
+ * altogether, because their settings are the query itself
49
+ * (PublicDashboardViewConfig.sanitize). The page lays out both kinds as
50
+ * the words they are (PublicDashboardContext.isWidgetDrawnHere).
51
51
  */
52
52
  exports.PUBLIC_DASHBOARD_UNDRAWN_WIDGET_TYPES = [
53
53
  DashboardComponentType_1.default.LogChart,
@@ -55,6 +55,12 @@ exports.PUBLIC_DASHBOARD_UNDRAWN_WIDGET_TYPES = [
55
55
  DashboardComponentType_1.default.TraceTable,
56
56
  DashboardComponentType_1.default.SecurityEventsList,
57
57
  DashboardComponentType_1.default.SecurityEventsFlow,
58
+ /*
59
+ * A saved funnel's or retention table's people are an application's end
60
+ * users, read only by those who may list its sessions (issue #6630).
61
+ */
62
+ DashboardComponentType_1.default.ProductAnalyticsFunnel,
63
+ DashboardComponentType_1.default.ProductAnalyticsRetention,
58
64
  ];
59
65
  /*
60
66
  * Whether a stored widget type is one a public dashboard cannot draw.
@@ -184,6 +190,8 @@ exports.PUBLIC_DASHBOARD_WIDGET_SETTINGS = {
184
190
  "severityFilters",
185
191
  "maxEvents",
186
192
  ]),
193
+ [DashboardComponentType_1.default.ProductAnalyticsFunnel]: undrawn(["savedViewId"]),
194
+ [DashboardComponentType_1.default.ProductAnalyticsRetention]: undrawn(["savedViewId"]),
187
195
  [DashboardComponentType_1.default.TraceList]: drawn([
188
196
  "title",
189
197
  "statusFilter",
@@ -0,0 +1,44 @@
1
+ import { DataBiRefreshStatus, DataDashboardRefresh, DataDashboardRefreshHistory } from "./DataDashboardActivity.mjs";
2
+ export declare enum DataBiMetricName {
3
+ RefreshFailed = "oneuptime.data.bi.refresh_failed"
4
+ }
5
+ export declare const DataBiAttribute: {
6
+ readonly ConnectionId: string;
7
+ readonly ConnectionName: string;
8
+ readonly DatasetId: string;
9
+ readonly DatasetName: string;
10
+ readonly Workspace: string;
11
+ };
12
+ export interface DataBiMetricDefinition {
13
+ name: DataBiMetricName;
14
+ description: string;
15
+ unit: string;
16
+ }
17
+ export declare const DATA_BI_METRICS: ReadonlyArray<DataBiMetricDefinition>;
18
+ export declare const DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS: number;
19
+ export declare const MAX_DATA_BI_FAILED_REFRESHES: number;
20
+ export interface DataBiDatasetRead {
21
+ datasetId: string;
22
+ name: string;
23
+ workspace: string | null;
24
+ refresh: DataDashboardRefreshHistory | null | undefined;
25
+ }
26
+ export interface DataBiFailedRefresh {
27
+ datasetId: string;
28
+ datasetName: string;
29
+ workspace: string | null;
30
+ status: DataBiRefreshStatus;
31
+ failedAt: string | null;
32
+ error: string | null;
33
+ recoveredAt: string | null;
34
+ }
35
+ export declare function isDataBiRefreshFailure(status: DataBiRefreshStatus): boolean;
36
+ export declare function isDataBiRefreshFinished(status: DataBiRefreshStatus): boolean;
37
+ export declare function getLatestFinishedRefresh(history: DataDashboardRefreshHistory | null | undefined): DataDashboardRefresh | null;
38
+ export declare function getNextFailedRefreshes(data: {
39
+ previous: Array<DataBiFailedRefresh>;
40
+ datasets: Array<DataBiDatasetRead>;
41
+ now: Date;
42
+ }): Array<DataBiFailedRefresh>;
43
+ export declare function getDataBiRefreshFailedValue(refresh: DataBiFailedRefresh, now: Date): number | null;
44
+ export declare function readDataBiFailedRefreshes(value: unknown): Array<DataBiFailedRefresh>;
@@ -0,0 +1,44 @@
1
+ import { DataBiRefreshStatus, DataDashboardRefresh, DataDashboardRefreshHistory } from "./DataDashboardActivity";
2
+ export declare enum DataBiMetricName {
3
+ RefreshFailed = "oneuptime.data.bi.refresh_failed"
4
+ }
5
+ export declare const DataBiAttribute: {
6
+ readonly ConnectionId: string;
7
+ readonly ConnectionName: string;
8
+ readonly DatasetId: string;
9
+ readonly DatasetName: string;
10
+ readonly Workspace: string;
11
+ };
12
+ export interface DataBiMetricDefinition {
13
+ name: DataBiMetricName;
14
+ description: string;
15
+ unit: string;
16
+ }
17
+ export declare const DATA_BI_METRICS: ReadonlyArray<DataBiMetricDefinition>;
18
+ export declare const DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS: number;
19
+ export declare const MAX_DATA_BI_FAILED_REFRESHES: number;
20
+ export interface DataBiDatasetRead {
21
+ datasetId: string;
22
+ name: string;
23
+ workspace: string | null;
24
+ refresh: DataDashboardRefreshHistory | null | undefined;
25
+ }
26
+ export interface DataBiFailedRefresh {
27
+ datasetId: string;
28
+ datasetName: string;
29
+ workspace: string | null;
30
+ status: DataBiRefreshStatus;
31
+ failedAt: string | null;
32
+ error: string | null;
33
+ recoveredAt: string | null;
34
+ }
35
+ export declare function isDataBiRefreshFailure(status: DataBiRefreshStatus): boolean;
36
+ export declare function isDataBiRefreshFinished(status: DataBiRefreshStatus): boolean;
37
+ export declare function getLatestFinishedRefresh(history: DataDashboardRefreshHistory | null | undefined): DataDashboardRefresh | null;
38
+ export declare function getNextFailedRefreshes(data: {
39
+ previous: Array<DataBiFailedRefresh>;
40
+ datasets: Array<DataBiDatasetRead>;
41
+ now: Date;
42
+ }): Array<DataBiFailedRefresh>;
43
+ export declare function getDataBiRefreshFailedValue(refresh: DataBiFailedRefresh, now: Date): number | null;
44
+ export declare function readDataBiFailedRefreshes(value: unknown): Array<DataBiFailedRefresh>;
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_DATA_BI_FAILED_REFRESHES = exports.DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS = exports.DATA_BI_METRICS = exports.DataBiAttribute = exports.DataBiMetricName = void 0;
4
+ exports.isDataBiRefreshFailure = isDataBiRefreshFailure;
5
+ exports.isDataBiRefreshFinished = isDataBiRefreshFinished;
6
+ exports.getLatestFinishedRefresh = getLatestFinishedRefresh;
7
+ exports.getNextFailedRefreshes = getNextFailedRefreshes;
8
+ exports.getDataBiRefreshFailedValue = getDataBiRefreshFailedValue;
9
+ exports.readDataBiFailedRefreshes = readDataBiFailedRefreshes;
10
+ const DataDashboardActivity_1 = require("./DataDashboardActivity");
11
+ /*
12
+ * A POWER BI DATASET WHOSE REFRESH FAILED, UNTIL A LATER ONE COMPLETES.
13
+ *
14
+ * A refresh is not a pipeline run. A dataset whose refresh failed goes on
15
+ * showing the data of its last completed refresh until a later refresh
16
+ * completes, however long that takes: a failed refresh is a state, not an
17
+ * event. So it opens one alert, which stays open until a later refresh
18
+ * completes - not for an hour, as a failed run's does.
19
+ *
20
+ * - Each hourly read (DataBiSync) keeps on the BI tool the datasets whose
21
+ * latest finished refresh failed or was cancelled. A refresh still
22
+ * running, or a dataset whose refreshes were not read this time, changes
23
+ * nothing: the dataset stays as it was until a refresh finishes. One that
24
+ * completes is kept an hour more, as recovered. One gone from the tool,
25
+ * or with no refresh at all, is not kept.
26
+ * - Every five minutes (DataBiRefreshCheck), each dataset kept writes
27
+ * oneuptime.data.bi.refresh_failed - 1 while it is failing, 0 the hour
28
+ * after it recovered - which the tool's monitor reads
29
+ * (DataBiRefreshMonitorStep): one alert per dataset, resolved once a
30
+ * later refresh completes.
31
+ */
32
+ var DataBiMetricName;
33
+ (function (DataBiMetricName) {
34
+ // 1 while a dataset's latest finished refresh failed or was cancelled, 0 the hour after a later one completed.
35
+ DataBiMetricName["RefreshFailed"] = "oneuptime.data.bi.refresh_failed";
36
+ })(DataBiMetricName || (exports.DataBiMetricName = DataBiMetricName = {}));
37
+ exports.DataBiAttribute = {
38
+ ConnectionId: "oneuptime.data.bi.connection.id",
39
+ ConnectionName: "oneuptime.data.bi.connection.name",
40
+ DatasetId: "oneuptime.data.bi.dataset.id",
41
+ DatasetName: "oneuptime.data.bi.dataset.name",
42
+ Workspace: "oneuptime.data.bi.workspace.name",
43
+ };
44
+ exports.DATA_BI_METRICS = [
45
+ {
46
+ name: DataBiMetricName.RefreshFailed,
47
+ description: "1 while a Power BI dataset's last refresh failed or was cancelled, 0 for the hour after a later refresh completed.",
48
+ unit: "",
49
+ },
50
+ ];
51
+ // How long a dataset that recovered goes on writing 0, so its monitor sees it recover.
52
+ exports.DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS = 60 * 60 * 1000;
53
+ // The most datasets kept on one BI tool.
54
+ exports.MAX_DATA_BI_FAILED_REFRESHES = 2000;
55
+ const MAX_TEXT_LENGTH = 500;
56
+ const MAX_ID_LENGTH = 100;
57
+ function readObject(value) {
58
+ return value && typeof value === "object" && !Array.isArray(value)
59
+ ? value
60
+ : null;
61
+ }
62
+ function readText(value, maxLength = MAX_TEXT_LENGTH) {
63
+ return typeof value === "string" && value.trim()
64
+ ? value.trim().slice(0, maxLength)
65
+ : null;
66
+ }
67
+ function readTime(value) {
68
+ const text = readText(value);
69
+ return text && !Number.isNaN(Date.parse(text)) ? text : null;
70
+ }
71
+ // A refresh that ended without completing: it failed, or was cancelled.
72
+ function isDataBiRefreshFailure(status) {
73
+ return (status === DataDashboardActivity_1.DataBiRefreshStatus.Failed ||
74
+ status === DataDashboardActivity_1.DataBiRefreshStatus.Cancelled);
75
+ }
76
+ // A refresh that ended one way or the other: completed, failed or cancelled.
77
+ function isDataBiRefreshFinished(status) {
78
+ return (status === DataDashboardActivity_1.DataBiRefreshStatus.Completed || isDataBiRefreshFailure(status));
79
+ }
80
+ function refreshTime(refresh) {
81
+ const at = Date.parse((0, DataDashboardActivity_1.getDataDashboardRefreshTime)(refresh) || "");
82
+ return Number.isFinite(at) ? at : 0;
83
+ }
84
+ /*
85
+ * The dataset's latest refresh that finished - the one its data is as fresh
86
+ * as, or failed to be - or null when none did: one still running, or
87
+ * Disabled or Unknown, says nothing of how the last one went.
88
+ */
89
+ function getLatestFinishedRefresh(history) {
90
+ if (!history) {
91
+ return null;
92
+ }
93
+ const finished = [
94
+ ...(history.last ? [history.last] : []),
95
+ ...history.refreshes,
96
+ ].filter((refresh) => {
97
+ return isDataBiRefreshFinished(refresh.status);
98
+ });
99
+ return (finished.sort((a, b) => {
100
+ return refreshTime(b) - refreshTime(a);
101
+ })[0] || null);
102
+ }
103
+ /*
104
+ * The datasets kept after a read: each read with a finished refresh as that
105
+ * refresh says - failing, or recovered when one that was failing completed -
106
+ * and each not read, or with no refresh finished since, as it was. A dataset
107
+ * that recovered over an hour ago, one with no refresh, and one no longer
108
+ * behind the tool's dashboards are not kept.
109
+ */
110
+ function getNextFailedRefreshes(data) {
111
+ const previous = new Map(data.previous.map((refresh) => {
112
+ return [refresh.datasetId, refresh];
113
+ }));
114
+ const next = [];
115
+ const seen = new Set();
116
+ for (const dataset of data.datasets) {
117
+ const datasetId = dataset.datasetId.toLowerCase();
118
+ if (!datasetId || seen.has(datasetId)) {
119
+ continue;
120
+ }
121
+ seen.add(datasetId);
122
+ const kept = previous.get(datasetId);
123
+ // As it was, by the name and workspace it has now.
124
+ const asItWas = kept
125
+ ? Object.assign(Object.assign({}, kept), { datasetName: dataset.name || kept.datasetName, workspace: dataset.workspace || kept.workspace }) : null;
126
+ if (dataset.refresh === null) {
127
+ continue;
128
+ }
129
+ const finished = dataset.refresh === undefined
130
+ ? null
131
+ : getLatestFinishedRefresh(dataset.refresh);
132
+ if (!finished) {
133
+ if (asItWas) {
134
+ next.push(asItWas);
135
+ }
136
+ continue;
137
+ }
138
+ if (isDataBiRefreshFailure(finished.status)) {
139
+ next.push({
140
+ datasetId,
141
+ datasetName: dataset.name || datasetId,
142
+ workspace: dataset.workspace,
143
+ status: finished.status,
144
+ failedAt: (0, DataDashboardActivity_1.getDataDashboardRefreshTime)(finished),
145
+ error: finished.error,
146
+ recoveredAt: null,
147
+ });
148
+ continue;
149
+ }
150
+ // Completed: one that was failing has recovered, and is kept an hour more.
151
+ if (asItWas) {
152
+ next.push(Object.assign(Object.assign({}, asItWas), { recoveredAt: asItWas.recoveredAt || data.now.toISOString() }));
153
+ }
154
+ }
155
+ return next
156
+ .filter((refresh) => {
157
+ return getDataBiRefreshFailedValue(refresh, data.now) !== null;
158
+ })
159
+ .slice(0, exports.MAX_DATA_BI_FAILED_REFRESHES);
160
+ }
161
+ /*
162
+ * What a dataset kept writes now: 1 while it is failing, 0 for the hour after
163
+ * it recovered, and nothing after that.
164
+ */
165
+ function getDataBiRefreshFailedValue(refresh, now) {
166
+ if (!refresh.recoveredAt) {
167
+ return 1;
168
+ }
169
+ const sinceRecovery = now.getTime() - Date.parse(refresh.recoveredAt);
170
+ return Number.isFinite(sinceRecovery) &&
171
+ sinceRecovery < exports.DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS
172
+ ? 0
173
+ : null;
174
+ }
175
+ // The datasets kept on a BI tool, read strictly: anything that does not fit is left out.
176
+ function readDataBiFailedRefreshes(value) {
177
+ var _a;
178
+ if (!Array.isArray(value)) {
179
+ return [];
180
+ }
181
+ const refreshes = [];
182
+ const seen = new Set();
183
+ for (const item of value) {
184
+ const refresh = readObject(item);
185
+ const datasetId = (_a = readText(refresh === null || refresh === void 0 ? void 0 : refresh["datasetId"], MAX_ID_LENGTH)) === null || _a === void 0 ? void 0 : _a.toLowerCase();
186
+ const status = (0, DataDashboardActivity_1.readDataBiRefreshStatus)(refresh === null || refresh === void 0 ? void 0 : refresh["status"]);
187
+ if (!refresh ||
188
+ !datasetId ||
189
+ seen.has(datasetId) ||
190
+ !status ||
191
+ !isDataBiRefreshFailure(status)) {
192
+ continue;
193
+ }
194
+ seen.add(datasetId);
195
+ refreshes.push({
196
+ datasetId,
197
+ datasetName: readText(refresh["datasetName"]) || datasetId,
198
+ workspace: readText(refresh["workspace"]),
199
+ status,
200
+ failedAt: readTime(refresh["failedAt"]),
201
+ error: readText(refresh["error"]),
202
+ recoveredAt: readTime(refresh["recoveredAt"]),
203
+ });
204
+ }
205
+ return refreshes.slice(0, exports.MAX_DATA_BI_FAILED_REFRESHES);
206
+ }
@@ -0,0 +1,12 @@
1
+ import commonJsModule from "./DataBiRefreshAlert.js";
2
+ export const DATA_BI_METRICS = commonJsModule.DATA_BI_METRICS;
3
+ export const DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS = commonJsModule.DATA_BI_REFRESH_RECOVERY_WINDOW_IN_MS;
4
+ export const DataBiAttribute = commonJsModule.DataBiAttribute;
5
+ export const DataBiMetricName = commonJsModule.DataBiMetricName;
6
+ export const MAX_DATA_BI_FAILED_REFRESHES = commonJsModule.MAX_DATA_BI_FAILED_REFRESHES;
7
+ export const getDataBiRefreshFailedValue = commonJsModule.getDataBiRefreshFailedValue;
8
+ export const getLatestFinishedRefresh = commonJsModule.getLatestFinishedRefresh;
9
+ export const getNextFailedRefreshes = commonJsModule.getNextFailedRefreshes;
10
+ export const isDataBiRefreshFailure = commonJsModule.isDataBiRefreshFailure;
11
+ export const isDataBiRefreshFinished = commonJsModule.isDataBiRefreshFinished;
12
+ export const readDataBiFailedRefreshes = commonJsModule.readDataBiFailedRefreshes;