@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,212 @@
1
+ import MailTransportType from "../../../Types/Email/MailTransportType";
2
+ import { OnCallPageChannel } from "../../../Types/OnCallDutyPolicy/OnCallPageChannel";
3
+ import SmsStatus from "../../../Types/SmsStatus";
4
+ import WhatsAppStatus from "../../../Types/WhatsAppStatus";
5
+ export declare enum NotificationDeliveryChannel {
6
+ Email = "email",
7
+ SMS = "sms",
8
+ Call = "call",
9
+ WhatsApp = "whatsapp",
10
+ Telegram = "telegram",
11
+ Push = "push",
12
+ Webhook = "webhook",
13
+ Slack = "slack",
14
+ MicrosoftTeams = "microsoft_teams",
15
+ Mattermost = "mattermost",
16
+ CustomChannel = "custom_channel"
17
+ }
18
+ export declare enum NotificationDeliveryProvider {
19
+ None = "none",
20
+ Twilio = "twilio",
21
+ SmsAndCallGateway = "sms_and_call_gateway",
22
+ SMTP = "smtp",
23
+ SendGrid = "sendgrid",
24
+ AmazonSES = "amazon_ses",
25
+ Mailgun = "mailgun",
26
+ Postmark = "postmark",
27
+ Resend = "resend",
28
+ MicrosoftGraph = "microsoft_graph",
29
+ Expo = "expo",
30
+ PushRelay = "push_relay",
31
+ WebPush = "web_push",
32
+ MetaWhatsApp = "meta_whatsapp",
33
+ TelegramBotApi = "telegram_bot_api",
34
+ Slack = "slack",
35
+ MicrosoftTeams = "microsoft_teams",
36
+ Mattermost = "mattermost",
37
+ Webhook = "webhook",
38
+ CustomChannel = "custom_channel"
39
+ }
40
+ export declare enum NotificationDeliveryOutcome {
41
+ Success = "success",
42
+ Failure = "failure",
43
+ NotSent = "not_sent"
44
+ }
45
+ export declare enum NotificationProviderConfig {
46
+ Global = "global",
47
+ Project = "project"
48
+ }
49
+ export declare enum NotificationTriggerType {
50
+ Incident = "incident",
51
+ Alert = "alert",
52
+ IncidentEpisode = "incident_episode",
53
+ AlertEpisode = "alert_episode"
54
+ }
55
+ export declare enum NotificationTriggerSource {
56
+ Automatic = "automatic",
57
+ Manual = "manual"
58
+ }
59
+ export declare enum OnCallPageStart {
60
+ MonitorDataReceived = "monitor_data_received",
61
+ RecordCreated = "record_created",
62
+ PageStarted = "page_started"
63
+ }
64
+ export declare enum NotificationSchedule {
65
+ RuleWait = "rule_wait",
66
+ Repeat = "repeat",
67
+ Escalation = "escalation",
68
+ PolicyRepeat = "policy_repeat"
69
+ }
70
+ export declare enum NotificationDestination {
71
+ DirectMessage = "direct_message",
72
+ Channel = "channel",
73
+ IncomingWebhook = "incoming_webhook"
74
+ }
75
+ export declare enum NotificationDeliveryStatus {
76
+ Delivered = "delivered",
77
+ Undelivered = "undelivered",
78
+ Failed = "failed",
79
+ Answered = "answered",
80
+ NotAnswered = "not_answered"
81
+ }
82
+ export declare enum NotificationMetricAttribute {
83
+ Channel = "notification.channel",
84
+ Provider = "notification.provider",
85
+ ProviderConfig = "notification.provider.config",
86
+ Outcome = "outcome",
87
+ OnCallPage = "notification.on_call_page",
88
+ CustomChannelId = "notification.custom_channel.id",
89
+ CustomChannelName = "notification.custom_channel.name",
90
+ TriggerType = "notification.trigger.type",
91
+ TriggerSource = "notification.trigger.source",
92
+ MonitorType = "monitor.type",
93
+ PageStart = "notification.page.start",
94
+ Destination = "notification.destination",
95
+ Schedule = "notification.schedule"
96
+ }
97
+ export declare const MAX_CUSTOM_CHANNEL_NAME_LENGTH: number;
98
+ export interface NotificationCustomChannelIdentity {
99
+ id: string;
100
+ name?: string | undefined;
101
+ }
102
+ export interface NotificationDispatchStart {
103
+ channel: NotificationDeliveryChannel;
104
+ provider?: NotificationDeliveryProvider | undefined;
105
+ providerConfig?: NotificationProviderConfig | undefined;
106
+ isOnCallPage?: boolean | undefined;
107
+ customChannel?: NotificationCustomChannelIdentity | undefined;
108
+ destination?: NotificationDestination | undefined;
109
+ }
110
+ export interface NotificationDeliveryReport {
111
+ channel: NotificationDeliveryChannel;
112
+ provider: NotificationDeliveryProvider;
113
+ providerConfig?: NotificationProviderConfig | undefined;
114
+ isOnCallPage: boolean;
115
+ status: NotificationDeliveryStatus;
116
+ timeToStatusInMs?: number | undefined;
117
+ }
118
+ export type NotificationMetricAttributes = Record<string, string>;
119
+ export declare class NotificationDispatch {
120
+ private readonly channel;
121
+ private provider;
122
+ private providerConfig;
123
+ private isOnCallPage;
124
+ private customChannel;
125
+ private readonly destination;
126
+ private outcome;
127
+ private readonly startedAtInNs;
128
+ private isEnded;
129
+ constructor(start: NotificationDispatchStart);
130
+ setProvider(provider: NotificationDeliveryProvider, providerConfig?: NotificationProviderConfig | undefined): void;
131
+ setCustomChannel(customChannel: NotificationCustomChannelIdentity | undefined): void;
132
+ setIsOnCallPage(isOnCallPage: boolean): void;
133
+ markSucceeded(): void;
134
+ markFailed(): void;
135
+ markNotSent(): void;
136
+ getOutcome(): NotificationDeliveryOutcome | undefined;
137
+ getProvider(): NotificationDeliveryProvider;
138
+ isRecorded(): boolean;
139
+ getAttributes(outcome: NotificationDeliveryOutcome): NotificationMetricAttributes;
140
+ end(outcomeIfNotMarked: NotificationDeliveryOutcome): void;
141
+ }
142
+ export default class NotificationDeliveryMetrics {
143
+ static startDispatch(start: NotificationDispatchStart): NotificationDispatch;
144
+ static measureDispatch<T>(start: NotificationDispatchStart, send: (dispatch: NotificationDispatch) => Promise<T>): Promise<T>;
145
+ static recordNotSent(start: NotificationDispatchStart): void;
146
+ static recordFailedBeforeSend(start: NotificationDispatchStart): void;
147
+ private static recordWithoutDuration;
148
+ static recordDelivery(report: NotificationDeliveryReport): void;
149
+ static recordTrigger(data: {
150
+ type: NotificationTriggerType;
151
+ source: NotificationTriggerSource;
152
+ monitorType?: string | undefined;
153
+ }): void;
154
+ static recordTimeToSend(data: {
155
+ channel: NotificationDeliveryChannel;
156
+ customChannel?: NotificationCustomChannelIdentity | undefined;
157
+ triggerType?: NotificationTriggerType | undefined;
158
+ pageStart: OnCallPageStart;
159
+ timeToSendInMs: number;
160
+ }): void;
161
+ static recordSendLag(data: {
162
+ channel: NotificationDeliveryChannel;
163
+ customChannel?: NotificationCustomChannelIdentity | undefined;
164
+ triggerType?: NotificationTriggerType | undefined;
165
+ schedule: NotificationSchedule;
166
+ lagInMs: number;
167
+ }): void;
168
+ static getDispatchAttributes(data: {
169
+ channel: NotificationDeliveryChannel;
170
+ provider: NotificationDeliveryProvider;
171
+ providerConfig: NotificationProviderConfig;
172
+ isOnCallPage: boolean;
173
+ customChannel?: NotificationCustomChannelIdentity | undefined;
174
+ destination?: NotificationDestination | undefined;
175
+ outcome: NotificationDeliveryOutcome;
176
+ }): NotificationMetricAttributes;
177
+ static getDeliveryAttributes(data: {
178
+ channel: NotificationDeliveryChannel;
179
+ provider: NotificationDeliveryProvider;
180
+ providerConfig?: NotificationProviderConfig | undefined;
181
+ isOnCallPage: boolean;
182
+ status: NotificationDeliveryStatus;
183
+ }): NotificationMetricAttributes;
184
+ static getMillisecondsSince(writtenAt: Date | null | undefined, now?: Date): number | undefined;
185
+ static getDeliveryStatusOfSms(status: SmsStatus | null | undefined): NotificationDeliveryStatus | null;
186
+ static getDeliveryStatusOfWhatsApp(status: WhatsAppStatus | null | undefined): NotificationDeliveryStatus | null;
187
+ static getTriggerAttributes(data: {
188
+ type: NotificationTriggerType;
189
+ source: NotificationTriggerSource;
190
+ monitorType?: string | undefined;
191
+ }): NotificationMetricAttributes;
192
+ static getTimeToSendAttributes(data: {
193
+ channel: NotificationDeliveryChannel;
194
+ customChannel?: NotificationCustomChannelIdentity | undefined;
195
+ triggerType?: NotificationTriggerType | undefined;
196
+ pageStart: OnCallPageStart;
197
+ }): NotificationMetricAttributes;
198
+ static getSendLagAttributes(data: {
199
+ channel: NotificationDeliveryChannel;
200
+ customChannel?: NotificationCustomChannelIdentity | undefined;
201
+ triggerType?: NotificationTriggerType | undefined;
202
+ schedule: NotificationSchedule;
203
+ }): NotificationMetricAttributes;
204
+ static getTriggerTypeOf(row: {
205
+ triggeredByIncidentId?: unknown;
206
+ triggeredByAlertId?: unknown;
207
+ triggeredByIncidentEpisodeId?: unknown;
208
+ triggeredByAlertEpisodeId?: unknown;
209
+ }): NotificationTriggerType | undefined;
210
+ static getChannelOfOnCallPage(channel: OnCallPageChannel): NotificationDeliveryChannel | null;
211
+ static getMailProvider(transport: MailTransportType): NotificationDeliveryProvider;
212
+ }
@@ -7,6 +7,7 @@ import WorkspaceChannelInvitationPayload from "../../../Types/Workspace/Workspac
7
7
  import WorkspaceMessagePayload, { WorkspaceCheckboxBlock, WorkspaceDatePickerBlock, WorkspaceDateTimePickerBlock, WorkspaceDropdownBlock, WorkspaceMessageBlock, WorkspaceMessagePayloadButton, WorkspaceModalBlock, WorkspaceNumberInputBlock, WorkspacePayloadButtons, WorkspacePayloadContext, WorkspacePayloadHeader, WorkspacePayloadImage, WorkspacePayloadMarkdown, WorkspaceTextAreaBlock, WorkspaceTextBoxBlock } from "../../../Types/Workspace/WorkspaceMessagePayload.mjs";
8
8
  import WorkspaceType from "../../../Types/Workspace/WorkspaceType.mjs";
9
9
  import URL from "../../../Types/API/URL.mjs";
10
+ import { NotificationProviderConfig } from "../Telemetry/NotificationDeliveryMetrics.mjs";
10
11
  export interface WorkspaceThread {
11
12
  channel: WorkspaceChannel;
12
13
  threadId: string;
@@ -195,6 +196,8 @@ export default class WorkspaceBase {
195
196
  static sendMessageToChannelViaIncomingWebhook(_data: {
196
197
  url: URL;
197
198
  text: string;
199
+ providerConfig?: NotificationProviderConfig | undefined;
200
+ isNotification?: boolean | undefined;
198
201
  }): Promise<HTTPResponse<JSONObject> | HTTPErrorResponse>;
199
202
  static isUserInChannel(_data: {
200
203
  authToken: string;
@@ -7,6 +7,7 @@ import WorkspaceChannelInvitationPayload from "../../../Types/Workspace/Workspac
7
7
  import WorkspaceMessagePayload, { WorkspaceCheckboxBlock, WorkspaceDatePickerBlock, WorkspaceDateTimePickerBlock, WorkspaceDropdownBlock, WorkspaceMessageBlock, WorkspaceMessagePayloadButton, WorkspaceModalBlock, WorkspaceNumberInputBlock, WorkspacePayloadButtons, WorkspacePayloadContext, WorkspacePayloadHeader, WorkspacePayloadImage, WorkspacePayloadMarkdown, WorkspaceTextAreaBlock, WorkspaceTextBoxBlock } from "../../../Types/Workspace/WorkspaceMessagePayload";
8
8
  import WorkspaceType from "../../../Types/Workspace/WorkspaceType";
9
9
  import URL from "../../../Types/API/URL";
10
+ import { NotificationProviderConfig } from "../Telemetry/NotificationDeliveryMetrics";
10
11
  export interface WorkspaceThread {
11
12
  channel: WorkspaceChannel;
12
13
  threadId: string;
@@ -195,6 +196,8 @@ export default class WorkspaceBase {
195
196
  static sendMessageToChannelViaIncomingWebhook(_data: {
196
197
  url: URL;
197
198
  text: string;
199
+ providerConfig?: NotificationProviderConfig | undefined;
200
+ isNotification?: boolean | undefined;
198
201
  }): Promise<HTTPResponse<JSONObject> | HTTPErrorResponse>;
199
202
  static isUserInChannel(_data: {
200
203
  authToken: string;
@@ -85,6 +85,7 @@ export declare const AI_ACTION_PLURAL_LINES: {
85
85
  codeFilesReadOnAnotherBranch: PluralTemplate;
86
86
  codeFilesNotRead: PluralTemplate;
87
87
  codeFilesReadInPart: PluralTemplate;
88
+ codeFilesReadInEarlierAnswer: PluralTemplate;
88
89
  codeFilesNotChecked: PluralTemplate;
89
90
  codeFilesValuesHidden: PluralTemplate;
90
91
  moreFiles: PluralTemplate;
@@ -85,6 +85,7 @@ export declare const AI_ACTION_PLURAL_LINES: {
85
85
  codeFilesReadOnAnotherBranch: PluralTemplate;
86
86
  codeFilesNotRead: PluralTemplate;
87
87
  codeFilesReadInPart: PluralTemplate;
88
+ codeFilesReadInEarlierAnswer: PluralTemplate;
88
89
  codeFilesNotChecked: PluralTemplate;
89
90
  codeFilesValuesHidden: PluralTemplate;
90
91
  moreFiles: PluralTemplate;
@@ -128,10 +128,11 @@ exports.AI_ACTION_LINES = {
128
128
  * read_code_file showed it, so a commit - on a branch, or a pull request's
129
129
  * - would undo what was pushed to a file since, or replace a file Ask AI
130
130
  * read on another branch, or never read, or read only part of (issue
131
- * #6330) - or write placeholders where values were hidden from Ask AI
132
- * (issue #6364). Each names the files, as {{files}}: a list of
133
- * AI_ACTION_CODE_FILE, the first few written out and the rest counted
134
- * (moreFiles). {{count}} is how many files it names.
131
+ * #6330), or read only in an earlier answer (issue #6365) - or write
132
+ * placeholders where values were hidden from Ask AI (issue #6364). Each
133
+ * names the files, as {{files}}: a list of AI_ACTION_CODE_FILE, the first
134
+ * few written out and the rest counted (moreFiles). {{count}} is how many
135
+ * files it names.
135
136
  */
136
137
  exports.AI_ACTION_PLURAL_LINES = {
137
138
  // Pushed to, deleted or renamed away on the branch after Ask AI read it there.
@@ -162,6 +163,15 @@ exports.AI_ACTION_PLURAL_LINES = {
162
163
  one: (0, Translator_1.translationKey)("Ask AI read only part of this file, and its version replaces all of it: {{files}}."),
163
164
  other: (0, Translator_1.translationKey)("Ask AI read only part of these {{count}} files, and its versions replace all of them: {{files}}."),
164
165
  },
166
+ /*
167
+ * Ask AI saw the version on the branch only in an earlier answer (issue
168
+ * #6365): a new turn replays the answers, never the files they read, so
169
+ * it writes the file whole from memory.
170
+ */
171
+ codeFilesReadInEarlierAnswer: {
172
+ one: (0, Translator_1.translationKey)("Ask AI read this file in an earlier answer and no longer has its text, and its version replaces all of it: {{files}}."),
173
+ other: (0, Translator_1.translationKey)("Ask AI read these {{count}} files in an earlier answer and no longer has their text, and its versions replace all of them: {{files}}."),
174
+ },
165
175
  // The branch could not be read: never said to be unchanged.
166
176
  codeFilesNotChecked: {
167
177
  one: (0, Translator_1.translationKey)("OneUptime could not check this file on {{branch}} against what Ask AI read: {{files}}."),
@@ -195,6 +205,7 @@ exports.AI_ACTION_CODE_CHANGE_LINES = [
195
205
  exports.AI_ACTION_PLURAL_LINES.codeFilesReadOnAnotherBranch.other,
196
206
  exports.AI_ACTION_PLURAL_LINES.codeFilesNotRead.other,
197
207
  exports.AI_ACTION_PLURAL_LINES.codeFilesReadInPart.other,
208
+ exports.AI_ACTION_PLURAL_LINES.codeFilesReadInEarlierAnswer.other,
198
209
  exports.AI_ACTION_PLURAL_LINES.codeFilesNotChecked.other,
199
210
  exports.AI_ACTION_PLURAL_LINES.codeFilesValuesHidden.other,
200
211
  ];
@@ -21,6 +21,7 @@ export interface AIChatRecordSeen {
21
21
  parts: Array<AIChatRecordPartSeen>;
22
22
  isPartial?: boolean | undefined;
23
23
  linesShown?: AIChatLinesShown | undefined;
24
+ fromEarlierAnswer?: boolean | undefined;
24
25
  }
25
26
  export interface AIChatRecordKnown {
26
27
  revision: number;
@@ -36,6 +37,8 @@ type ReadLinesShownFunction = (value: unknown) => AIChatLinesShown | null;
36
37
  export declare const readAIChatLinesShown: ReadLinesShownFunction;
37
38
  type ReadRecordSeenFunction = (value: unknown) => AIChatRecordSeen | null;
38
39
  export declare const readAIChatRecordSeen: ReadRecordSeenFunction;
40
+ type FromEarlierAnswersFunction = (records: ReadonlyArray<unknown> | null | undefined) => Array<AIChatRecordSeen>;
41
+ export declare const markAIChatRecordsFromEarlierAnswers: FromEarlierAnswersFunction;
39
42
  type ListRecordsSeenFunction = (value: unknown) => Array<unknown>;
40
43
  export declare const listAIChatRecordsSeen: ListRecordsSeenFunction;
41
44
  type GetRecordKnownFunction = (data: {
@@ -21,6 +21,7 @@ export interface AIChatRecordSeen {
21
21
  parts: Array<AIChatRecordPartSeen>;
22
22
  isPartial?: boolean | undefined;
23
23
  linesShown?: AIChatLinesShown | undefined;
24
+ fromEarlierAnswer?: boolean | undefined;
24
25
  }
25
26
  export interface AIChatRecordKnown {
26
27
  revision: number;
@@ -36,6 +37,8 @@ type ReadLinesShownFunction = (value: unknown) => AIChatLinesShown | null;
36
37
  export declare const readAIChatLinesShown: ReadLinesShownFunction;
37
38
  type ReadRecordSeenFunction = (value: unknown) => AIChatRecordSeen | null;
38
39
  export declare const readAIChatRecordSeen: ReadRecordSeenFunction;
40
+ type FromEarlierAnswersFunction = (records: ReadonlyArray<unknown> | null | undefined) => Array<AIChatRecordSeen>;
41
+ export declare const markAIChatRecordsFromEarlierAnswers: FromEarlierAnswersFunction;
39
42
  type ListRecordsSeenFunction = (value: unknown) => Array<unknown>;
40
43
  export declare const listAIChatRecordsSeen: ListRecordsSeenFunction;
41
44
  type GetRecordKnownFunction = (data: {
@@ -37,9 +37,16 @@
37
37
  * commit writes it whole, so a version Ask AI saw only part of is one it
38
38
  * cannot write whole without dropping the lines it never saw. Reads of one
39
39
  * version add up.
40
+ *
41
+ * But only the results of this turn are in front of the model (issue
42
+ * #6365): a new turn replays the earlier turns' questions and answers,
43
+ * never the files their tools read. So the chat runner marks each record of
44
+ * an earlier turn as it hands what the model saw to a prepare
45
+ * (fromEarlierAnswer): its version still says what Ask AI saw - a push
46
+ * since is still a push since - but its lines are not in hand.
40
47
  */
41
48
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.getLatestAIChatRecordsSeen = exports.getAIChatRecordKnown = exports.listAIChatRecordsSeen = exports.readAIChatRecordSeen = exports.readAIChatLinesShown = exports.readAIChatLineRanges = exports.MAX_LINE_RANGES = exports.MAX_RECORDS_SEEN_PER_RESULT = exports.MAX_RECORD_ID_LENGTHS = exports.MAX_RECORD_PARTS_SEEN = exports.AIChatRecordSeenType = void 0;
49
+ exports.getLatestAIChatRecordsSeen = exports.getAIChatRecordKnown = exports.listAIChatRecordsSeen = exports.markAIChatRecordsFromEarlierAnswers = exports.readAIChatRecordSeen = exports.readAIChatLinesShown = exports.readAIChatLineRanges = exports.MAX_LINE_RANGES = exports.MAX_RECORDS_SEEN_PER_RESULT = exports.MAX_RECORD_ID_LENGTHS = exports.MAX_RECORD_PARTS_SEEN = exports.AIChatRecordSeenType = void 0;
43
50
  // The kinds of record a result can show the model, as the tool that changes them names them.
44
51
  var AIChatRecordSeenType;
45
52
  (function (AIChatRecordSeenType) {
@@ -144,6 +151,7 @@ const readAIChatRecordSeen = (value) => {
144
151
  const parts = value["parts"];
145
152
  const isPartial = value["isPartial"];
146
153
  const linesShown = value["linesShown"];
154
+ const fromEarlierAnswer = value["fromEarlierAnswer"];
147
155
  if (!Object.values(AIChatRecordSeenType).includes(recordType) ||
148
156
  typeof recordId !== "string" ||
149
157
  recordId.length === 0 ||
@@ -154,7 +162,8 @@ const readAIChatRecordSeen = (value) => {
154
162
  revision < 0 ||
155
163
  !Array.isArray(parts) ||
156
164
  parts.length > exports.MAX_RECORD_PARTS_SEEN ||
157
- (isPartial !== undefined && typeof isPartial !== "boolean")) {
165
+ (isPartial !== undefined && typeof isPartial !== "boolean") ||
166
+ (fromEarlierAnswer !== undefined && typeof fromEarlierAnswer !== "boolean")) {
158
167
  return null;
159
168
  }
160
169
  /*
@@ -194,9 +203,25 @@ const readAIChatRecordSeen = (value) => {
194
203
  seen.add(id);
195
204
  read.push({ id: id, fingerprint: fingerprint });
196
205
  }
197
- return Object.assign(Object.assign({ recordType: recordType, recordId: recordId, revision: revision, parts: read }, (isPartial === true ? { isPartial: true } : {})), (lines ? { linesShown: lines } : {}));
206
+ return Object.assign(Object.assign(Object.assign({ recordType: recordType, recordId: recordId, revision: revision, parts: read }, (isPartial === true ? { isPartial: true } : {})), (lines ? { linesShown: lines } : {})), (fromEarlierAnswer === true ? { fromEarlierAnswer: true } : {}));
198
207
  };
199
208
  exports.readAIChatRecordSeen = readAIChatRecordSeen;
209
+ /*
210
+ * The records of the turns before this one, as a prepare is handed them
211
+ * (issue #6365): each well-formed one marked as from an earlier answer,
212
+ * whose text the model no longer has. Stored records are never marked.
213
+ */
214
+ const markAIChatRecordsFromEarlierAnswers = (records) => {
215
+ const marked = [];
216
+ for (const value of records || []) {
217
+ const record = (0, exports.readAIChatRecordSeen)(value);
218
+ if (record) {
219
+ marked.push(Object.assign(Object.assign({}, record), { fromEarlierAnswer: true }));
220
+ }
221
+ }
222
+ return marked;
223
+ };
224
+ exports.markAIChatRecordsFromEarlierAnswers = markAIChatRecordsFromEarlierAnswers;
200
225
  /*
201
226
  * What tells one record from another: a workflow by its ID as the database
202
227
  * writes it, whichever case a caller spelt it in; a repository's file
@@ -7,6 +7,7 @@ export const MAX_RECORD_PARTS_SEEN = commonJsModule.MAX_RECORD_PARTS_SEEN;
7
7
  export const getAIChatRecordKnown = commonJsModule.getAIChatRecordKnown;
8
8
  export const getLatestAIChatRecordsSeen = commonJsModule.getLatestAIChatRecordsSeen;
9
9
  export const listAIChatRecordsSeen = commonJsModule.listAIChatRecordsSeen;
10
+ export const markAIChatRecordsFromEarlierAnswers = commonJsModule.markAIChatRecordsFromEarlierAnswers;
10
11
  export const readAIChatLineRanges = commonJsModule.readAIChatLineRanges;
11
12
  export const readAIChatLinesShown = commonJsModule.readAIChatLinesShown;
12
13
  export const readAIChatRecordSeen = commonJsModule.readAIChatRecordSeen;
@@ -47,7 +47,8 @@ export declare enum AIChatCitationTargetType {
47
47
  DataSecurityIssues = "DataSecurityIssues",
48
48
  DataSecurityIssueView = "DataSecurityIssueView",
49
49
  DataSecurityAccess = "DataSecurityAccess",
50
- DataTableView = "DataTableView"
50
+ DataTableView = "DataTableView",
51
+ DataTableLineageView = "DataTableLineageView"
51
52
  }
52
53
  export interface AIChatCitationTarget {
53
54
  type: AIChatCitationTargetType;
@@ -47,7 +47,8 @@ export declare enum AIChatCitationTargetType {
47
47
  DataSecurityIssues = "DataSecurityIssues",
48
48
  DataSecurityIssueView = "DataSecurityIssueView",
49
49
  DataSecurityAccess = "DataSecurityAccess",
50
- DataTableView = "DataTableView"
50
+ DataTableView = "DataTableView",
51
+ DataTableLineageView = "DataTableLineageView"
51
52
  }
52
53
  export interface AIChatCitationTarget {
53
54
  type: AIChatCitationTargetType;
@@ -71,6 +71,8 @@ var AIChatCitationTargetType;
71
71
  AIChatCitationTargetType["DataSecurityAccess"] = "DataSecurityAccess";
72
72
  // Data Observability: one watched table ({ dataAssetId }).
73
73
  AIChatCitationTargetType["DataTableView"] = "DataTableView";
74
+ // Data Observability: one watched table's Lineage tab ({ dataAssetId }).
75
+ AIChatCitationTargetType["DataTableLineageView"] = "DataTableLineageView";
74
76
  })(AIChatCitationTargetType || (exports.AIChatCitationTargetType = AIChatCitationTargetType = {}));
75
77
  /*
76
78
  * ---------------------------------------------------------------------------
@@ -11,6 +11,13 @@ export default interface InvestigationNotStartedReason {
11
11
  source: "recorded" | "current_configuration" | "unknown";
12
12
  evaluatedAt: string;
13
13
  decidedAfterWaitMinutes?: number | undefined;
14
+ facts?: InvestigationNotStartedFacts | undefined;
15
+ }
16
+ export interface InvestigationNotStartedFacts {
17
+ severityName?: string | undefined;
18
+ minimumSeverityName?: string | undefined;
19
+ cooldownWindowMinutes?: number | undefined;
20
+ dailyTokenLimit?: number | undefined;
14
21
  }
15
22
  export interface InvestigationGateDetails {
16
23
  severityName?: string | undefined;
@@ -11,6 +11,13 @@ export default interface InvestigationNotStartedReason {
11
11
  source: "recorded" | "current_configuration" | "unknown";
12
12
  evaluatedAt: string;
13
13
  decidedAfterWaitMinutes?: number | undefined;
14
+ facts?: InvestigationNotStartedFacts | undefined;
15
+ }
16
+ export interface InvestigationNotStartedFacts {
17
+ severityName?: string | undefined;
18
+ minimumSeverityName?: string | undefined;
19
+ cooldownWindowMinutes?: number | undefined;
20
+ dailyTokenLimit?: number | undefined;
14
21
  }
15
22
  export interface InvestigationGateDetails {
16
23
  severityName?: string | undefined;
@@ -27,6 +27,7 @@ declare enum AnalyticsTableName {
27
27
  RumSession = "RumSessionV1",
28
28
  RumSessionChunk = "RumSessionChunkV1",
29
29
  RumProductAnalyticsSession = "RumProductAnalyticsSessionV1",
30
- RumProductAnalyticsUser = "RumProductAnalyticsUserV1"
30
+ RumProductAnalyticsUser = "RumProductAnalyticsUserV1",
31
+ RumProductAnalyticsEvent = "RumProductAnalyticsEventV1"
31
32
  }
32
33
  export default AnalyticsTableName;
@@ -27,6 +27,7 @@ declare enum AnalyticsTableName {
27
27
  RumSession = "RumSessionV1",
28
28
  RumSessionChunk = "RumSessionChunkV1",
29
29
  RumProductAnalyticsSession = "RumProductAnalyticsSessionV1",
30
- RumProductAnalyticsUser = "RumProductAnalyticsUserV1"
30
+ RumProductAnalyticsUser = "RumProductAnalyticsUserV1",
31
+ RumProductAnalyticsEvent = "RumProductAnalyticsEventV1"
31
32
  }
32
33
  export default AnalyticsTableName;
@@ -124,5 +124,12 @@ var AnalyticsTableName;
124
124
  */
125
125
  AnalyticsTableName["RumProductAnalyticsSession"] = "RumProductAnalyticsSessionV1";
126
126
  AnalyticsTableName["RumProductAnalyticsUser"] = "RumProductAnalyticsUserV1";
127
+ /*
128
+ * Product analytics events (issue #6444, part two): one row per event the
129
+ * RUM recorders send from every session, recorded or not - a session
130
+ * starting, a page viewed, a track() call - kept for the same year and a
131
+ * month. A plain MergeTree written by the product analytics ingest worker.
132
+ */
133
+ AnalyticsTableName["RumProductAnalyticsEvent"] = "RumProductAnalyticsEventV1";
127
134
  })(AnalyticsTableName || (AnalyticsTableName = {}));
128
135
  exports.default = AnalyticsTableName;
@@ -0,0 +1,10 @@
1
+ export declare const AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS: number;
2
+ export declare const AUDIT_LOG_MIN_RETENTION_IN_DAYS: number;
3
+ export declare const AUDIT_LOG_MAX_RETENTION_IN_DAYS: number;
4
+ export declare const AUDIT_LOG_RETENTION_ERROR: string;
5
+ export declare function readAuditLogRetentionInDays(value: unknown): number;
6
+ export declare function getAuditLogRetentionError(value: unknown): string | null;
7
+ export declare function getAuditLogRetentionDate(data: {
8
+ recordedAt: Date;
9
+ retentionInDays: unknown;
10
+ }): Date;
@@ -0,0 +1,10 @@
1
+ export declare const AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS: number;
2
+ export declare const AUDIT_LOG_MIN_RETENTION_IN_DAYS: number;
3
+ export declare const AUDIT_LOG_MAX_RETENTION_IN_DAYS: number;
4
+ export declare const AUDIT_LOG_RETENTION_ERROR: string;
5
+ export declare function readAuditLogRetentionInDays(value: unknown): number;
6
+ export declare function getAuditLogRetentionError(value: unknown): string | null;
7
+ export declare function getAuditLogRetentionDate(data: {
8
+ recordedAt: Date;
9
+ retentionInDays: unknown;
10
+ }): Date;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AUDIT_LOG_RETENTION_ERROR = exports.AUDIT_LOG_MAX_RETENTION_IN_DAYS = exports.AUDIT_LOG_MIN_RETENTION_IN_DAYS = exports.AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS = void 0;
7
+ exports.readAuditLogRetentionInDays = readAuditLogRetentionInDays;
8
+ exports.getAuditLogRetentionError = getAuditLogRetentionError;
9
+ exports.getAuditLogRetentionDate = getAuditLogRetentionDate;
10
+ const Date_1 = __importDefault(require("../Date"));
11
+ const NumericColumnValue_1 = require("../Database/NumericColumnValue");
12
+ /*
13
+ * HOW LONG THE AUDIT LOG KEEPS AN ENTRY: ONE RULE FOR EVERY READER.
14
+ *
15
+ * A project keeps each audit log entry for its Retention (days)
16
+ * (Project.auditLogsRetentionInDays): a whole number of days from 7 to 180,
17
+ * and 7 until someone sets another. The recorder stamps each entry with it
18
+ * as it records it - the entry's retentionDate, which the AuditLog table's
19
+ * TTL deletes it on - and a failing audit log export reckons with it when
20
+ * the entries it has not sent are deleted, to warn a day before.
21
+ *
22
+ * The two used to work it out each their own way, and the server took any
23
+ * value: the settings form checked 7 to 180, but the API took -3, 0 or 3.
24
+ * For -3 the recorder kept entries a day while the export reckoned a week,
25
+ * so its "will start losing entries" email came six days after they were
26
+ * gone (#6383). Everything that reads the setting now reads it here:
27
+ *
28
+ * - readAuditLogRetentionInDays: the retention an entry is recorded with.
29
+ * Every value reads as one, so a value stored before the server checked
30
+ * it never breaks a read: one that is not a number of days (none, NaN,
31
+ * text) as the default, and a number as the nearest whole number of days
32
+ * from 7 to 180 - -3, 0 and 3 as 7, 500 as 180;
33
+ * - getAuditLogRetentionDate: when an entry recorded at a moment is
34
+ * deleted, that many calendar days later by the server's clock
35
+ * (OneUptimeDate.addRemoveDays) - the retentionDate the recorder stamps
36
+ * and the moment a failing export reckons;
37
+ * - getAuditLogRetentionError: why a value cannot be saved, which
38
+ * ProjectService refuses a create or an update with. The settings form
39
+ * checks the same range in the browser.
40
+ *
41
+ * Why 7 to 180, and not 1: it is what the settings form, the column's
42
+ * description, the API reference and the docs (NIST 800-53 AU-11 among them)
43
+ * have always said. A week is the least that keeps an audit log useful: an
44
+ * administrator cannot shrink it to hours to hide what they do next, and a
45
+ * failing export has days between "is failing" and "will start losing
46
+ * entries". A stored value under 7 keeps new entries for 7 days, and one
47
+ * over 180 for 180; the entries recorded so far keep their dates.
48
+ */
49
+ // What a project keeps its entries for until someone sets another retention.
50
+ exports.AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS = 7;
51
+ // The shortest and longest retention a project can have.
52
+ exports.AUDIT_LOG_MIN_RETENTION_IN_DAYS = 7;
53
+ exports.AUDIT_LOG_MAX_RETENTION_IN_DAYS = 180;
54
+ // What the server answers a value it will not save.
55
+ exports.AUDIT_LOG_RETENTION_ERROR = `Audit log retention must be a whole number of days from ${exports.AUDIT_LOG_MIN_RETENTION_IN_DAYS} to ${exports.AUDIT_LOG_MAX_RETENTION_IN_DAYS}.`;
56
+ /*
57
+ * The retention, in whole days, an entry is recorded with for a stored or
58
+ * written value. A number written as text ("30", as a form sends it) reads
59
+ * as the number it is (coerceNumericColumnValue).
60
+ */
61
+ function readAuditLogRetentionInDays(value) {
62
+ const days = (0, NumericColumnValue_1.coerceNumericColumnValue)(value);
63
+ if (typeof days !== "number" || !Number.isFinite(days)) {
64
+ return exports.AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS;
65
+ }
66
+ return Math.min(exports.AUDIT_LOG_MAX_RETENTION_IN_DAYS, Math.max(exports.AUDIT_LOG_MIN_RETENTION_IN_DAYS, Math.round(days)));
67
+ }
68
+ /*
69
+ * Why a retention someone saves cannot be kept - not a whole number of days,
70
+ * or outside 7 to 180 - or null when it can. A number written as text is
71
+ * judged as the number it is.
72
+ */
73
+ function getAuditLogRetentionError(value) {
74
+ const days = (0, NumericColumnValue_1.coerceNumericColumnValue)(value);
75
+ if (typeof days === "number" &&
76
+ Number.isInteger(days) &&
77
+ days >= exports.AUDIT_LOG_MIN_RETENTION_IN_DAYS &&
78
+ days <= exports.AUDIT_LOG_MAX_RETENTION_IN_DAYS) {
79
+ return null;
80
+ }
81
+ return exports.AUDIT_LOG_RETENTION_ERROR;
82
+ }
83
+ /*
84
+ * When the audit log deletes an entry recorded at `recordedAt` by a project
85
+ * whose retention is `retentionInDays`: that many calendar days later, by
86
+ * the server's own clock, so across a change of the clocks the day in
87
+ * between is 23 or 25 hours long, as the recorder has always stamped it.
88
+ */
89
+ function getAuditLogRetentionDate(data) {
90
+ return Date_1.default.addRemoveDays(new Date(data.recordedAt), readAuditLogRetentionInDays(data.retentionInDays));
91
+ }
@@ -0,0 +1,8 @@
1
+ import commonJsModule from "./AuditLogRetention.js";
2
+ export const AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS = commonJsModule.AUDIT_LOG_DEFAULT_RETENTION_IN_DAYS;
3
+ export const AUDIT_LOG_MAX_RETENTION_IN_DAYS = commonJsModule.AUDIT_LOG_MAX_RETENTION_IN_DAYS;
4
+ export const AUDIT_LOG_MIN_RETENTION_IN_DAYS = commonJsModule.AUDIT_LOG_MIN_RETENTION_IN_DAYS;
5
+ export const AUDIT_LOG_RETENTION_ERROR = commonJsModule.AUDIT_LOG_RETENTION_ERROR;
6
+ export const getAuditLogRetentionDate = commonJsModule.getAuditLogRetentionDate;
7
+ export const getAuditLogRetentionError = commonJsModule.getAuditLogRetentionError;
8
+ export const readAuditLogRetentionInDays = commonJsModule.readAuditLogRetentionInDays;