@oneuptime/common 14.0.108 → 14.0.110

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 (711) hide show
  1. package/Models/AnalyticsModels/AuditLog.js +1 -1
  2. package/Models/AnalyticsModels/SecurityEvent.js +1 -1
  3. package/Models/DatabaseModels/AIInsight.js +2 -2
  4. package/Models/DatabaseModels/Alert.js +2 -2
  5. package/Models/DatabaseModels/AlertEpisode.js +2 -2
  6. package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
  7. package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
  8. package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
  9. package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
  10. package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
  11. package/Models/DatabaseModels/AlertSeverity.js +13 -4
  12. package/Models/DatabaseModels/AlertState.js +1 -1
  13. package/Models/DatabaseModels/CallLog.js +12 -12
  14. package/Models/DatabaseModels/CloudApp.d.mts +5 -0
  15. package/Models/DatabaseModels/CloudApp.d.ts +5 -0
  16. package/Models/DatabaseModels/CloudApp.js +112 -0
  17. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
  18. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
  19. package/Models/DatabaseModels/EmailLog.js +12 -12
  20. package/Models/DatabaseModels/FormSubmission.js +2 -2
  21. package/Models/DatabaseModels/GlobalConfig.d.mts +6 -0
  22. package/Models/DatabaseModels/GlobalConfig.d.ts +6 -0
  23. package/Models/DatabaseModels/GlobalConfig.js +139 -0
  24. package/Models/DatabaseModels/Incident.js +2 -2
  25. package/Models/DatabaseModels/IncidentEpisode.js +2 -2
  26. package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
  27. package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
  28. package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
  29. package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
  30. package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
  31. package/Models/DatabaseModels/IncidentSeverity.js +13 -4
  32. package/Models/DatabaseModels/IncidentState.js +1 -1
  33. package/Models/DatabaseModels/IncidentTemplate.js +2 -2
  34. package/Models/DatabaseModels/Index.js +7 -0
  35. package/Models/DatabaseModels/Monitor.js +17 -3
  36. package/Models/DatabaseModels/MonitorStatusTimeline.d.mts +1 -0
  37. package/Models/DatabaseModels/MonitorStatusTimeline.d.ts +1 -0
  38. package/Models/DatabaseModels/MonitorStatusTimeline.js +43 -0
  39. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  40. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  41. package/Models/DatabaseModels/NetworkDevice.js +41 -0
  42. package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
  43. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
  44. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
  45. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
  46. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
  47. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +4 -0
  48. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +4 -0
  49. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +141 -8
  50. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
  51. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +14 -11
  52. package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
  53. package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
  54. package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
  55. package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
  56. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
  57. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
  58. package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
  59. package/Models/DatabaseModels/ProductFeedback.d.mts +11 -0
  60. package/Models/DatabaseModels/ProductFeedback.d.ts +11 -0
  61. package/Models/DatabaseModels/ProductFeedback.js +203 -0
  62. package/Models/DatabaseModels/ProductFeedback.mjs +2 -0
  63. package/Models/DatabaseModels/Project.d.mts +8 -0
  64. package/Models/DatabaseModels/Project.d.ts +8 -0
  65. package/Models/DatabaseModels/Project.js +333 -2
  66. package/Models/DatabaseModels/ProjectMilestone.d.mts +11 -0
  67. package/Models/DatabaseModels/ProjectMilestone.d.ts +11 -0
  68. package/Models/DatabaseModels/ProjectMilestone.js +207 -0
  69. package/Models/DatabaseModels/ProjectMilestone.mjs +2 -0
  70. package/Models/DatabaseModels/ProjectUserPreference.d.mts +11 -0
  71. package/Models/DatabaseModels/ProjectUserPreference.d.ts +11 -0
  72. package/Models/DatabaseModels/ProjectUserPreference.js +194 -0
  73. package/Models/DatabaseModels/ProjectUserPreference.mjs +2 -0
  74. package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
  75. package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
  76. package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
  77. package/Models/DatabaseModels/PushNotificationLog.js +12 -12
  78. package/Models/DatabaseModels/Reseller.js +8 -2
  79. package/Models/DatabaseModels/ResellerPlan.js +8 -2
  80. package/Models/DatabaseModels/RumSessionPin.js +16 -2
  81. package/Models/DatabaseModels/RumSessionReplayView.js +8 -1
  82. package/Models/DatabaseModels/ScheduledMaintenance.js +6 -3
  83. package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
  84. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +2 -2
  85. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +7 -4
  86. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -1
  87. package/Models/DatabaseModels/SecurityCase.js +8 -1
  88. package/Models/DatabaseModels/Service.js +1 -1
  89. package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
  90. package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
  91. package/Models/DatabaseModels/SmsLog.js +12 -12
  92. package/Models/DatabaseModels/StatusPage.js +5 -5
  93. package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
  94. package/Models/DatabaseModels/TelegramLog.js +12 -12
  95. package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
  96. package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
  97. package/Models/DatabaseModels/User.d.mts +6 -0
  98. package/Models/DatabaseModels/User.d.ts +6 -0
  99. package/Models/DatabaseModels/User.js +152 -0
  100. package/Models/DatabaseModels/UserOnCallLog.js +38 -10
  101. package/Models/DatabaseModels/UserOnCallLogTimeline.js +13 -3
  102. package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
  103. package/Models/DatabaseModels/WebhookLog.js +12 -12
  104. package/Models/DatabaseModels/WhatsAppLog.js +12 -12
  105. package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
  106. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  107. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +9 -0
  108. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +9 -0
  109. package/Server/Services/DatabaseService.d.mts +1 -0
  110. package/Server/Services/DatabaseService.d.ts +1 -0
  111. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +2 -1
  112. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +2 -1
  113. package/Server/Utils/Workspace/WorkspaceBase.d.mts +1 -0
  114. package/Server/Utils/Workspace/WorkspaceBase.d.ts +1 -0
  115. package/Types/AI/AIActionWords.d.mts +167 -7
  116. package/Types/AI/AIActionWords.d.ts +167 -7
  117. package/Types/AI/AIActionWords.js +474 -17
  118. package/Types/AI/AIActionWords.mjs +22 -0
  119. package/Types/AI/AIChatMessageStatus.js +3 -2
  120. package/Types/AI/AIChatRecordSeen.d.mts +6 -2
  121. package/Types/AI/AIChatRecordSeen.d.ts +6 -2
  122. package/Types/AI/AIChatRecordSeen.js +48 -9
  123. package/Types/AI/AIChatRecordSeen.mjs +2 -0
  124. package/Types/AI/AIChatTypes.d.mts +21 -2
  125. package/Types/AI/AIChatTypes.d.ts +21 -2
  126. package/Types/AI/AIChatTypes.js +49 -1
  127. package/Types/AI/AIChatTypes.mjs +3 -0
  128. package/Types/AI/AIRunAttempt.d.mts +8 -0
  129. package/Types/AI/AIRunAttempt.d.ts +8 -0
  130. package/Types/AI/AIRunAttempt.js +60 -6
  131. package/Types/AI/AIRunAttempt.mjs +3 -0
  132. package/Types/AI/AISetupActions.d.mts +9 -0
  133. package/Types/AI/AISetupActions.d.ts +9 -0
  134. package/Types/AI/AISetupActions.js +56 -0
  135. package/Types/AI/AISetupActions.mjs +10 -0
  136. package/Types/AI/CodeTask.d.mts +14 -0
  137. package/Types/AI/CodeTask.d.ts +14 -0
  138. package/Types/AI/RecordAiTokenLimit.d.mts +24 -0
  139. package/Types/AI/RecordAiTokenLimit.d.ts +24 -0
  140. package/Types/AI/RecordAiTokenLimit.js +153 -0
  141. package/Types/AI/RecordAiTokenLimit.mjs +8 -0
  142. package/Types/Accounts/SignInMessages.d.mts +8 -0
  143. package/Types/Accounts/SignInMessages.d.ts +8 -0
  144. package/Types/Accounts/SignInMessages.js +28 -0
  145. package/Types/Accounts/SignInMessages.mjs +5 -0
  146. package/Types/Analytics/ActivationMilestone.d.mts +48 -0
  147. package/Types/Analytics/ActivationMilestone.d.ts +48 -0
  148. package/Types/Analytics/ActivationMilestone.js +247 -0
  149. package/Types/Analytics/ActivationMilestone.mjs +16 -0
  150. package/Types/Analytics/ChecklistProgress.d.mts +11 -0
  151. package/Types/Analytics/ChecklistProgress.d.ts +11 -0
  152. package/Types/Analytics/ChecklistProgress.js +32 -0
  153. package/Types/Analytics/ChecklistProgress.mjs +2 -0
  154. package/Types/Analytics/ProductEvent.d.mts +66 -0
  155. package/Types/Analytics/ProductEvent.d.ts +66 -0
  156. package/Types/Analytics/ProductEvent.js +471 -0
  157. package/Types/Analytics/ProductEvent.mjs +14 -0
  158. package/Types/AuditLog/AuditLogAction.d.mts +5 -1
  159. package/Types/AuditLog/AuditLogAction.d.ts +5 -1
  160. package/Types/AuditLog/AuditLogAction.js +11 -0
  161. package/Types/AuditLog/AuditLogActionLabel.d.mts +3 -0
  162. package/Types/AuditLog/AuditLogActionLabel.d.ts +3 -0
  163. package/Types/AuditLog/AuditLogActionLabel.js +30 -0
  164. package/Types/AuditLog/AuditLogActionLabel.mjs +3 -0
  165. package/Types/AuditLog/AuditLogCoverage.d.mts +3 -1
  166. package/Types/AuditLog/AuditLogCoverage.d.ts +3 -1
  167. package/Types/AuditLog/AuditLogCoverage.js +12 -3
  168. package/Types/AuditLog/AuditLogRetention.js +7 -4
  169. package/Types/AuditLog/AuditLogSessionEvent.d.mts +45 -0
  170. package/Types/AuditLog/AuditLogSessionEvent.d.ts +45 -0
  171. package/Types/AuditLog/AuditLogSessionEvent.js +210 -0
  172. package/Types/AuditLog/AuditLogSessionEvent.mjs +14 -0
  173. package/Types/AutoRemediation/RemediationRound.d.mts +4 -0
  174. package/Types/AutoRemediation/RemediationRound.d.ts +4 -0
  175. package/Types/AutoRemediation/RemediationRound.js +19 -2
  176. package/Types/AutoRemediation/RemediationRoundName.d.mts +1 -0
  177. package/Types/AutoRemediation/RemediationRoundName.d.ts +1 -0
  178. package/Types/AutoRemediation/RemediationRoundName.js +5 -0
  179. package/Types/AutoRemediation/RemediationRoundName.mjs +1 -0
  180. package/Types/Cloud/CloudAppTelemetrySignal.d.mts +9 -0
  181. package/Types/Cloud/CloudAppTelemetrySignal.d.ts +9 -0
  182. package/Types/Cloud/CloudAppTelemetrySignal.js +41 -0
  183. package/Types/Cloud/CloudAppTelemetrySignal.mjs +4 -0
  184. package/Types/Cloud/CloudPlatform.js +7 -1
  185. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  186. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  187. package/Types/Cloud/CloudResourceCatalog.js +33 -3
  188. package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
  189. package/Types/CodeRepository/CodeFileSeen.d.mts +5 -0
  190. package/Types/CodeRepository/CodeFileSeen.d.ts +5 -0
  191. package/Types/CodeRepository/CodeFileSeen.js +142 -27
  192. package/Types/CustomDomain/CustomDomainDnsCheckResult.d.mts +13 -0
  193. package/Types/CustomDomain/CustomDomainDnsCheckResult.d.ts +13 -0
  194. package/Types/CustomDomain/CustomDomainDnsCheckResult.js +80 -0
  195. package/Types/CustomDomain/CustomDomainDnsCheckResult.mjs +2 -0
  196. package/Types/CustomDomain/CustomDomainServerReadiness.d.mts +55 -0
  197. package/Types/CustomDomain/CustomDomainServerReadiness.d.ts +55 -0
  198. package/Types/CustomDomain/CustomDomainServerReadiness.js +199 -0
  199. package/Types/CustomDomain/CustomDomainServerReadiness.mjs +8 -0
  200. package/Types/CustomDomain/DnsRecordCheck.d.mts +34 -0
  201. package/Types/CustomDomain/DnsRecordCheck.d.ts +34 -0
  202. package/Types/CustomDomain/DnsRecordCheck.js +175 -0
  203. package/Types/CustomDomain/DnsRecordCheck.mjs +6 -0
  204. package/Types/CustomDomain/DnsRecordCheckWords.d.mts +35 -0
  205. package/Types/CustomDomain/DnsRecordCheckWords.d.ts +35 -0
  206. package/Types/CustomDomain/DnsRecordCheckWords.js +151 -0
  207. package/Types/CustomDomain/DnsRecordCheckWords.mjs +5 -0
  208. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +1 -0
  209. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +1 -0
  210. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +11 -1
  211. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +1 -0
  212. package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
  213. package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
  214. package/Types/DataObservability/DataCheckSuggestions.js +102 -65
  215. package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
  216. package/Types/DataObservability/DataCheckType.d.mts +4 -0
  217. package/Types/DataObservability/DataCheckType.d.ts +4 -0
  218. package/Types/DataObservability/DataCheckType.js +17 -0
  219. package/Types/DataObservability/DataCheckType.mjs +1 -0
  220. package/Types/DataObservability/DataLineageColumnTrail.d.mts +10 -0
  221. package/Types/DataObservability/DataLineageColumnTrail.d.ts +10 -0
  222. package/Types/DataObservability/DataLineageColumnTrail.js +152 -0
  223. package/Types/DataObservability/DataLineageColumnTrail.mjs +4 -0
  224. package/Types/DataObservability/DataLineageExpansion.d.mts +29 -0
  225. package/Types/DataObservability/DataLineageExpansion.d.ts +29 -0
  226. package/Types/DataObservability/DataLineageExpansion.js +166 -0
  227. package/Types/DataObservability/DataLineageExpansion.mjs +4 -0
  228. package/Types/DataObservability/DataObservabilityApiTypes.d.mts +1 -0
  229. package/Types/DataObservability/DataObservabilityApiTypes.d.ts +1 -0
  230. package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
  231. package/Types/DataObservability/DataTableLineage.d.mts +7 -0
  232. package/Types/DataObservability/DataTableLineage.d.ts +7 -0
  233. package/Types/DataObservability/DataTableLineage.js +15 -3
  234. package/Types/DataObservability/DataTableLineage.mjs +1 -0
  235. package/Types/Database/TableMetadata.d.mts +2 -0
  236. package/Types/Database/TableMetadata.d.ts +2 -0
  237. package/Types/Database/TableMetadata.js +6 -0
  238. package/Types/Date.d.mts +42 -1
  239. package/Types/Date.d.ts +42 -1
  240. package/Types/Date.js +114 -5
  241. package/Types/DateLanguage.d.mts +9 -0
  242. package/Types/DateLanguage.d.ts +9 -0
  243. package/Types/DateLanguage.js +87 -2
  244. package/Types/DateLanguage.mjs +3 -0
  245. package/Types/DirectionArrow.d.mts +7 -0
  246. package/Types/DirectionArrow.d.ts +7 -0
  247. package/Types/DirectionArrow.js +88 -0
  248. package/Types/DirectionArrow.mjs +7 -0
  249. package/Types/Docs/DocsLanguage.d.mts +2 -0
  250. package/Types/Docs/DocsLanguage.d.ts +2 -0
  251. package/Types/Docs/DocsLanguage.js +23 -1
  252. package/Types/Docs/DocsLanguage.mjs +2 -0
  253. package/Types/Docs/GlossaryTerm.d.mts +83 -0
  254. package/Types/Docs/GlossaryTerm.d.ts +83 -0
  255. package/Types/Docs/GlossaryTerm.js +128 -0
  256. package/Types/Docs/GlossaryTerm.mjs +5 -0
  257. package/Types/Docs/RetiredNames.d.mts +11 -0
  258. package/Types/Docs/RetiredNames.d.ts +11 -0
  259. package/Types/Docs/RetiredNames.js +139 -0
  260. package/Types/Docs/RetiredNames.mjs +3 -0
  261. package/Types/Email/AmazonSesAuthenticationType.d.mts +23 -0
  262. package/Types/Email/AmazonSesAuthenticationType.d.ts +23 -0
  263. package/Types/Email/AmazonSesAuthenticationType.js +40 -0
  264. package/Types/Email/AmazonSesAuthenticationType.mjs +4 -0
  265. package/Types/Email/EmailServer.d.mts +2 -0
  266. package/Types/Email/EmailServer.d.ts +2 -0
  267. package/Types/Email/EmailTemplateType.d.mts +1 -0
  268. package/Types/Email/EmailTemplateType.d.ts +1 -0
  269. package/Types/Email/EmailTemplateType.js +2 -0
  270. package/Types/Exception/BadDataExceptionWithDetails.d.mts +6 -0
  271. package/Types/Exception/BadDataExceptionWithDetails.d.ts +6 -0
  272. package/Types/Exception/BadDataExceptionWithDetails.js +20 -0
  273. package/Types/Exception/BadDataExceptionWithDetails.mjs +2 -0
  274. package/Types/Exception/ErrorMessageRule.d.mts +4 -0
  275. package/Types/Exception/ErrorMessageRule.d.ts +4 -0
  276. package/Types/Exception/ErrorMessageRule.js +143 -0
  277. package/Types/Exception/ErrorMessageRule.mjs +5 -0
  278. package/Types/Exception/RefusalWithValues.d.mts +7 -0
  279. package/Types/Exception/RefusalWithValues.d.ts +7 -0
  280. package/Types/Exception/RefusalWithValues.js +76 -0
  281. package/Types/Exception/RefusalWithValues.mjs +3 -0
  282. package/Types/Exception/UnexplainedError.d.mts +58 -0
  283. package/Types/Exception/UnexplainedError.d.ts +58 -0
  284. package/Types/Exception/UnexplainedError.js +231 -0
  285. package/Types/Exception/UnexplainedError.mjs +12 -0
  286. package/Types/File/FileSize.d.mts +4 -1
  287. package/Types/File/FileSize.d.ts +4 -1
  288. package/Types/File/FileSize.js +18 -17
  289. package/Types/HostCollector/HostCollector.d.mts +1 -0
  290. package/Types/HostCollector/HostCollector.d.ts +1 -0
  291. package/Types/HostCollector/HostCollector.js +26 -10
  292. package/Types/HostCollector/HostCollector.mjs +1 -0
  293. package/Types/Icon/IconProp.d.mts +4 -1
  294. package/Types/Icon/IconProp.d.ts +4 -1
  295. package/Types/Icon/IconProp.js +6 -0
  296. package/Types/InstallationHealth/InstallationHealth.d.mts +122 -0
  297. package/Types/InstallationHealth/InstallationHealth.d.ts +122 -0
  298. package/Types/InstallationHealth/InstallationHealth.js +513 -0
  299. package/Types/InstallationHealth/InstallationHealth.mjs +13 -0
  300. package/Types/LLM/LLMProviderExchange.d.mts +17 -0
  301. package/Types/LLM/LLMProviderExchange.d.ts +17 -0
  302. package/Types/LLM/LLMProviderExchange.js +70 -0
  303. package/Types/LLM/LLMProviderExchange.mjs +5 -0
  304. package/Types/Monitor/CriteriaFilter.d.mts +1 -0
  305. package/Types/Monitor/CriteriaFilter.d.ts +1 -0
  306. package/Types/Monitor/CriteriaFilter.js +3 -1
  307. package/Types/Monitor/CriteriaFilterTerms.js +1 -0
  308. package/Types/Monitor/CriteriaFilterValues.d.mts +2 -0
  309. package/Types/Monitor/CriteriaFilterValues.d.ts +2 -0
  310. package/Types/Monitor/CriteriaFilterValues.js +22 -0
  311. package/Types/Monitor/EvaluationSentence.d.mts +1 -0
  312. package/Types/Monitor/EvaluationSentence.d.ts +1 -0
  313. package/Types/Monitor/EvaluationSentence.js +34 -3
  314. package/Types/Monitor/EvaluationSentence.mjs +1 -0
  315. package/Types/Monitor/MonitorCriteria.js +2 -2
  316. package/Types/Monitor/MonitorStep.js +1 -1
  317. package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
  318. package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
  319. package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
  320. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
  321. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
  322. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
  323. package/Types/Monitor/RetiredEvaluationTemplates.d.mts +2 -0
  324. package/Types/Monitor/RetiredEvaluationTemplates.d.ts +2 -0
  325. package/Types/Monitor/RetiredEvaluationTemplates.js +95 -0
  326. package/Types/Monitor/RetiredEvaluationTemplates.mjs +3 -0
  327. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.mts +6 -0
  328. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.ts +6 -0
  329. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.js +20 -0
  330. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.mjs +2 -0
  331. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.mts +6 -0
  332. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.ts +6 -0
  333. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.js +29 -0
  334. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.mjs +2 -0
  335. package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.mts +7 -0
  336. package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.ts +7 -0
  337. package/Types/Monitor/WhoIsTold.d.mts +167 -0
  338. package/Types/Monitor/WhoIsTold.d.ts +167 -0
  339. package/Types/Monitor/WhoIsTold.js +583 -0
  340. package/Types/Monitor/WhoIsTold.mjs +17 -0
  341. package/Types/NotificationRule/PagingLadder.d.mts +137 -0
  342. package/Types/NotificationRule/PagingLadder.d.ts +137 -0
  343. package/Types/NotificationRule/PagingLadder.js +682 -0
  344. package/Types/NotificationRule/PagingLadder.mjs +28 -0
  345. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
  346. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +6 -0
  347. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +6 -0
  348. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +34 -0
  349. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
  350. package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
  351. package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
  352. package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
  353. package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
  354. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +284 -0
  355. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +284 -0
  356. package/Types/OnCallDutyPolicy/OnCallTestPage.js +665 -0
  357. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +53 -0
  358. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
  359. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
  360. package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
  361. package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
  362. package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.mts +31 -0
  363. package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.ts +31 -0
  364. package/Types/OnCallDutyPolicy/OnCallTestPageWords.js +105 -0
  365. package/Types/OnCallDutyPolicy/OnCallTestPageWords.mjs +14 -0
  366. package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
  367. package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
  368. package/Types/Permission.d.mts +2 -2
  369. package/Types/Permission.d.ts +2 -2
  370. package/Types/Permission.js +194 -193
  371. package/Types/PhoneNumberDirection.d.mts +6 -0
  372. package/Types/PhoneNumberDirection.d.ts +6 -0
  373. package/Types/PhoneNumberDirection.js +123 -0
  374. package/Types/PhoneNumberDirection.mjs +6 -0
  375. package/Types/Product/ProductCatalog.d.mts +10 -0
  376. package/Types/Product/ProductCatalog.d.ts +10 -0
  377. package/Types/Product/ProductCatalog.js +208 -0
  378. package/Types/Product/ProductCatalog.mjs +6 -0
  379. package/Types/Product/ProductKey.d.mts +58 -0
  380. package/Types/Product/ProductKey.d.ts +58 -0
  381. package/Types/Product/ProductKey.js +175 -0
  382. package/Types/Product/ProductKey.mjs +8 -0
  383. package/Types/Product/ProductOfTable.d.mts +3 -0
  384. package/Types/Product/ProductOfTable.d.ts +3 -0
  385. package/Types/Product/ProductOfTable.js +68 -0
  386. package/Types/Product/ProductOfTable.mjs +3 -0
  387. package/Types/Product/ProductPins.d.mts +10 -0
  388. package/Types/Product/ProductPins.d.ts +10 -0
  389. package/Types/Product/ProductPins.js +65 -0
  390. package/Types/Product/ProductPins.mjs +6 -0
  391. package/Types/Product/ProductUsage.d.mts +21 -0
  392. package/Types/Product/ProductUsage.d.ts +21 -0
  393. package/Types/Product/ProductUsage.js +175 -0
  394. package/Types/Product/ProductUsage.mjs +10 -0
  395. package/Types/Product/ProjectProducts.d.mts +60 -0
  396. package/Types/Product/ProjectProducts.d.ts +60 -0
  397. package/Types/Product/ProjectProducts.js +336 -0
  398. package/Types/Product/ProjectProducts.mjs +19 -0
  399. package/Types/Product/ProjectProductsAnswer.d.mts +23 -0
  400. package/Types/Product/ProjectProductsAnswer.d.ts +23 -0
  401. package/Types/Product/ProjectProductsAnswer.js +172 -0
  402. package/Types/Product/ProjectProductsAnswer.mjs +8 -0
  403. package/Types/Product/ServerProducts.d.mts +65 -0
  404. package/Types/Product/ServerProducts.d.ts +65 -0
  405. package/Types/Product/ServerProducts.js +383 -0
  406. package/Types/Product/ServerProducts.mjs +26 -0
  407. package/Types/Product/ServerProductsAnswer.d.mts +21 -0
  408. package/Types/Product/ServerProductsAnswer.d.ts +21 -0
  409. package/Types/Product/ServerProductsAnswer.js +78 -0
  410. package/Types/Product/ServerProductsAnswer.mjs +5 -0
  411. package/Types/ProductFeedback/NewGitHubIssue.d.mts +12 -0
  412. package/Types/ProductFeedback/NewGitHubIssue.d.ts +12 -0
  413. package/Types/ProductFeedback/NewGitHubIssue.js +64 -0
  414. package/Types/ProductFeedback/NewGitHubIssue.mjs +5 -0
  415. package/Types/ProductFeedback/ProductFeedback.d.mts +142 -0
  416. package/Types/ProductFeedback/ProductFeedback.d.ts +142 -0
  417. package/Types/ProductFeedback/ProductFeedback.js +525 -0
  418. package/Types/ProductFeedback/ProductFeedback.mjs +49 -0
  419. package/Types/ReadingDirection.d.mts +2 -0
  420. package/Types/ReadingDirection.d.ts +2 -0
  421. package/Types/ReadingDirection.js +83 -2
  422. package/Types/ReadingDirection.mjs +2 -0
  423. package/Types/Recommendation/RecommendationType.d.mts +2 -1
  424. package/Types/Recommendation/RecommendationType.d.ts +2 -1
  425. package/Types/Recommendation/RecommendationType.js +6 -0
  426. package/Types/Reminder/ReminderInterval.d.mts +7 -0
  427. package/Types/Reminder/ReminderInterval.d.ts +7 -0
  428. package/Types/Reminder/ReminderInterval.js +110 -0
  429. package/Types/Reminder/ReminderInterval.mjs +8 -0
  430. package/Types/Retention/ResolvedRecordRetention.d.mts +19 -0
  431. package/Types/Retention/ResolvedRecordRetention.d.ts +19 -0
  432. package/Types/Retention/ResolvedRecordRetention.js +124 -0
  433. package/Types/Retention/ResolvedRecordRetention.mjs +14 -0
  434. package/Types/RollingTime/RollingTimeUtil.d.mts +1 -0
  435. package/Types/RollingTime/RollingTimeUtil.d.ts +1 -0
  436. package/Types/RollingTime/RollingTimeUtil.js +9 -0
  437. package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
  438. package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
  439. package/Types/SampleProject/SampleProject.d.mts +54 -0
  440. package/Types/SampleProject/SampleProject.d.ts +54 -0
  441. package/Types/SampleProject/SampleProject.js +177 -0
  442. package/Types/SampleProject/SampleProject.mjs +22 -0
  443. package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
  444. package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
  445. package/Types/SampleProject/SampleProjectContent.js +397 -0
  446. package/Types/SampleProject/SampleProjectContent.mjs +18 -0
  447. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +108 -101
  448. package/Types/ServerSending/ServerSendingStatus.d.mts +69 -0
  449. package/Types/ServerSending/ServerSendingStatus.d.ts +69 -0
  450. package/Types/ServerSending/ServerSendingStatus.js +281 -0
  451. package/Types/ServerSending/ServerSendingStatus.mjs +7 -0
  452. package/Types/ServerSending/ServerSendingWords.d.mts +9 -0
  453. package/Types/ServerSending/ServerSendingWords.d.ts +9 -0
  454. package/Types/ServerSending/ServerSendingWords.js +95 -0
  455. package/Types/ServerSending/ServerSendingWords.mjs +7 -0
  456. package/Types/ServerSetup/ServerSetupChecklist.d.mts +172 -0
  457. package/Types/ServerSetup/ServerSetupChecklist.d.ts +172 -0
  458. package/Types/ServerSetup/ServerSetupChecklist.js +735 -0
  459. package/Types/ServerSetup/ServerSetupChecklist.mjs +12 -0
  460. package/Types/ServerSetup/ServerTestSend.d.mts +35 -0
  461. package/Types/ServerSetup/ServerTestSend.d.ts +35 -0
  462. package/Types/ServerSetup/ServerTestSend.js +160 -0
  463. package/Types/ServerSetup/ServerTestSend.mjs +10 -0
  464. package/Types/SetupHealth/SetupHealth.d.mts +283 -0
  465. package/Types/SetupHealth/SetupHealth.d.ts +283 -0
  466. package/Types/SetupHealth/SetupHealth.js +1047 -0
  467. package/Types/SetupHealth/SetupHealth.mjs +46 -0
  468. package/Types/StatusPage/StatusPageSummary.d.mts +1 -0
  469. package/Types/StatusPage/StatusPageSummary.d.ts +1 -0
  470. package/Types/StatusPage/StatusPageSummary.js +3 -0
  471. package/Types/StatusPage/UptimeDailyAggregate.d.mts +25 -0
  472. package/Types/StatusPage/UptimeDailyAggregate.d.ts +25 -0
  473. package/Types/Telemetry/LlmCallKind.js +1 -1
  474. package/Types/Telemetry/TelemetryIngestSurface.js +6 -5
  475. package/Types/Telemetry/TelemetryIngestionBudget.d.mts +1 -0
  476. package/Types/Telemetry/TelemetryIngestionBudget.d.ts +1 -0
  477. package/Types/Telemetry/TelemetryIngestionBudget.js +135 -2
  478. package/Types/Telemetry/TelemetryIngestionBudget.mjs +1 -0
  479. package/Types/ToolImport/ToolImportCatalog.d.mts +1 -0
  480. package/Types/ToolImport/ToolImportCatalog.d.ts +1 -0
  481. package/Types/ToolImport/ToolImportCatalog.js +54 -1
  482. package/Types/ToolImport/ToolImportCatalog.mjs +1 -0
  483. package/Types/Translator.d.mts +1 -0
  484. package/Types/Translator.d.ts +1 -0
  485. package/Types/Translator.js +104 -33
  486. package/Types/Translator.mjs +1 -0
  487. package/Types/UsedBy/UsedBy.d.mts +103 -0
  488. package/Types/UsedBy/UsedBy.d.ts +103 -0
  489. package/Types/UsedBy/UsedBy.js +389 -0
  490. package/Types/UsedBy/UsedBy.mjs +20 -0
  491. package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
  492. package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
  493. package/Types/UsedBy/UsedByServerProducts.js +48 -0
  494. package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
  495. package/Types/UserNotification/UserNotificationEventType.d.mts +2 -1
  496. package/Types/UserNotification/UserNotificationEventType.d.ts +2 -1
  497. package/Types/UserNotification/UserNotificationEventType.js +7 -0
  498. package/Types/UserSession/SessionEndCause.d.mts +17 -0
  499. package/Types/UserSession/SessionEndCause.d.ts +17 -0
  500. package/Types/UserSession/SessionEndCause.js +79 -0
  501. package/Types/UserSession/SessionEndCause.mjs +6 -0
  502. package/Types/UserSession/SessionSignIn.d.mts +44 -0
  503. package/Types/UserSession/SessionSignIn.d.ts +44 -0
  504. package/Types/UserSession/SessionSignIn.js +174 -0
  505. package/Types/UserSession/SessionSignIn.mjs +17 -0
  506. package/Types/WelcomeChecklist/ProjectGoal.d.mts +16 -0
  507. package/Types/WelcomeChecklist/ProjectGoal.d.ts +16 -0
  508. package/Types/WelcomeChecklist/ProjectGoal.js +94 -0
  509. package/Types/WelcomeChecklist/ProjectGoal.mjs +8 -0
  510. package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +82 -0
  511. package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +82 -0
  512. package/Types/WelcomeChecklist/WelcomeChecklist.js +396 -0
  513. package/Types/WelcomeChecklist/WelcomeChecklist.mjs +23 -0
  514. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +25 -0
  515. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +25 -0
  516. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +139 -0
  517. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.mjs +9 -0
  518. package/Types/WelcomeChecklist/WelcomeChecklistState.d.mts +27 -0
  519. package/Types/WelcomeChecklist/WelcomeChecklistState.d.ts +27 -0
  520. package/Types/WelcomeChecklist/WelcomeChecklistState.js +183 -0
  521. package/Types/WelcomeChecklist/WelcomeChecklistState.mjs +13 -0
  522. package/Types/Workflow/Documentation/AIDocumentation.js +1 -1
  523. package/Types/Workflow/PassedOnFields.js +2 -1
  524. package/Types/Workflow/Templates.js +1 -1
  525. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +2 -0
  526. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +2 -0
  527. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.mts +7 -0
  528. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.ts +7 -0
  529. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.js +40 -0
  530. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.mjs +3 -0
  531. package/Types/Workspace/WorkspaceChannelMembers.d.mts +1 -0
  532. package/Types/Workspace/WorkspaceChannelMembers.d.ts +1 -0
  533. package/Types/Workspace/WorkspaceChannelMembers.js +9 -2
  534. package/UI/Components/Dropdown/Dropdown.d.mts +1 -0
  535. package/UI/Components/Dropdown/Dropdown.d.ts +1 -0
  536. package/Utils/AI/MeaningMatch.d.mts +36 -0
  537. package/Utils/AI/MeaningMatch.d.ts +36 -0
  538. package/Utils/AI/MeaningMatch.js +535 -0
  539. package/Utils/AI/MeaningMatch.mjs +7 -0
  540. package/Utils/API.js +10 -0
  541. package/Utils/ArchivableValues.js +1 -1
  542. package/Utils/AuditLog/AuditLogValues.js +2 -2
  543. package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
  544. package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
  545. package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
  546. package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
  547. package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
  548. package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
  549. package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
  550. package/Utils/Dashboard/DashboardWidgetSorts.js +25 -4
  551. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +37 -0
  552. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +37 -0
  553. package/Utils/Dashboard/MonitorListWidgetFormat.js +86 -0
  554. package/Utils/Dashboard/MonitorListWidgetFormat.mjs +10 -0
  555. package/Utils/DataSecurity/TextScanner.js +2 -2
  556. package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
  557. package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
  558. package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
  559. package/Utils/DeveloperDocs/CliCommands.js +2 -1
  560. package/Utils/DeveloperDocs/CliResources.js +2 -1
  561. package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
  562. package/Utils/GuidedSetup/OnCallPolicyRecords.d.mts +31 -0
  563. package/Utils/GuidedSetup/OnCallPolicyRecords.d.ts +31 -0
  564. package/Utils/GuidedSetup/OnCallPolicyRecords.js +89 -0
  565. package/Utils/GuidedSetup/OnCallPolicyRecords.mjs +6 -0
  566. package/Utils/GuidedSetup/StatusPageRecords.d.mts +36 -0
  567. package/Utils/GuidedSetup/StatusPageRecords.d.ts +36 -0
  568. package/Utils/GuidedSetup/StatusPageRecords.js +105 -0
  569. package/Utils/GuidedSetup/StatusPageRecords.mjs +6 -0
  570. package/Utils/GuidedSetup/WebsiteMonitorRecords.d.mts +41 -0
  571. package/Utils/GuidedSetup/WebsiteMonitorRecords.d.ts +41 -0
  572. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +204 -0
  573. package/Utils/GuidedSetup/WebsiteMonitorRecords.mjs +9 -0
  574. package/Utils/Markdown/InlineImageDataUri.d.mts +9 -0
  575. package/Utils/Markdown/InlineImageDataUri.d.ts +9 -0
  576. package/Utils/Markdown/InlineImageDataUri.js +17 -1
  577. package/Utils/Markdown/InlineImageDataUri.mjs +1 -0
  578. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +20 -0
  579. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +20 -0
  580. package/Utils/Markdown/LinkReferenceDefinitions.js +1901 -0
  581. package/Utils/Markdown/LinkReferenceDefinitions.mjs +5 -0
  582. package/Utils/Markdown/MarkdownTableCell.js +2 -1
  583. package/Utils/Markdown/OverLongText.js +523 -5
  584. package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
  585. package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
  586. package/Utils/Markdown/SlowMarkdown.js +595 -11
  587. package/Utils/Markdown/SlowMarkdown.mjs +6 -0
  588. package/Utils/ModelApiName.d.mts +11 -0
  589. package/Utils/ModelApiName.d.ts +11 -0
  590. package/Utils/ModelApiName.js +72 -0
  591. package/Utils/ModelApiName.mjs +5 -0
  592. package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
  593. package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
  594. package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
  595. package/Utils/Monitor/EndpointAttachmentUtil.js +8 -3
  596. package/Utils/Monitor/ExternalStatusPageReading.d.mts +12 -0
  597. package/Utils/Monitor/ExternalStatusPageReading.d.ts +12 -0
  598. package/Utils/Monitor/ExternalStatusPageReading.js +111 -8
  599. package/Utils/Monitor/ExternalStatusPageReading.mjs +5 -0
  600. package/Utils/Monitor/ExternalStatusPageScope.js +17 -1
  601. package/Utils/Monitor/MonitorDestinationUtil.js +2 -1
  602. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +2 -1
  603. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +2 -1
  604. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +10 -1
  605. package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +1 -0
  606. package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +1 -0
  607. package/Utils/Monitor/MonitorStatusHistoryUtil.js +1 -0
  608. package/Utils/Monitor/MonitorSummaryProbeUtil.d.mts +2 -0
  609. package/Utils/Monitor/MonitorSummaryProbeUtil.d.ts +2 -0
  610. package/Utils/Monitor/MonitorSummaryProbeUtil.js +13 -17
  611. package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -3
  612. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
  613. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
  614. package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
  615. package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
  616. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +1 -1
  617. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +1 -1
  618. package/Utils/Monitor/MonitorUptimeSummaryUtil.js +1 -0
  619. package/Utils/Monitor/MonitoringOff.d.mts +20 -0
  620. package/Utils/Monitor/MonitoringOff.d.ts +20 -0
  621. package/Utils/Monitor/MonitoringOff.js +81 -0
  622. package/Utils/Monitor/MonitoringOff.mjs +4 -0
  623. package/Utils/Monitor/NotOperationalMonitorQuery.js +9 -7
  624. package/Utils/Monitor/StateChangeLogScreenshots.d.mts +8 -0
  625. package/Utils/Monitor/StateChangeLogScreenshots.d.ts +8 -0
  626. package/Utils/Monitor/StateChangeLogScreenshots.js +116 -0
  627. package/Utils/Monitor/StateChangeLogScreenshots.mjs +3 -0
  628. package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +1 -1
  629. package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +1 -1
  630. package/Utils/NetworkDevice/Naming/NamingLookup.js +14 -4
  631. package/Utils/NetworkDevice/Naming/NamingLookup.mjs +1 -0
  632. package/Utils/OpenStack/OpenStackCheckName.js +2 -1
  633. package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
  634. package/Utils/OpenStack/OpenStackLogs.js +3 -2
  635. package/Utils/OpenStack/OpenStackTraces.js +2 -1
  636. package/Utils/Project/NotificationChannels.js +5 -5
  637. package/Utils/Project/ProjectBalance.js +2 -2
  638. package/Utils/Project/TwilioAccount.js +2 -2
  639. package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
  640. package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
  641. package/Utils/ScheduledMaintenanceStart.js +9 -0
  642. package/Utils/Schema/ModelSchema.js +10 -1
  643. package/Utils/Slo/SloErrorBudgetPolicy.d.mts +2 -1
  644. package/Utils/Slo/SloErrorBudgetPolicy.d.ts +2 -1
  645. package/Utils/Slo/SloErrorBudgetPolicy.js +8 -2
  646. package/Utils/Slo/SloListWidgetFormat.d.mts +7 -1
  647. package/Utils/Slo/SloListWidgetFormat.d.ts +7 -1
  648. package/Utils/Slo/SloListWidgetFormat.js +20 -26
  649. package/Utils/Slo/SloOverviewText.d.mts +6 -1
  650. package/Utils/Slo/SloOverviewText.d.ts +6 -1
  651. package/Utils/Slo/SloOverviewText.js +3 -3
  652. package/Utils/Slo/SloUtil.d.mts +18 -9
  653. package/Utils/Slo/SloUtil.d.ts +18 -9
  654. package/Utils/Slo/SloUtil.js +47 -10
  655. package/Utils/Slo/SloWidgetFormat.d.mts +69 -11
  656. package/Utils/Slo/SloWidgetFormat.d.ts +69 -11
  657. package/Utils/Slo/SloWidgetFormat.js +198 -50
  658. package/Utils/Slo/SloWidgetFormat.mjs +7 -0
  659. package/Utils/StatusPage/FrozenMonitorResources.d.mts +41 -0
  660. package/Utils/StatusPage/FrozenMonitorResources.d.ts +41 -0
  661. package/Utils/StatusPage/FrozenMonitorResources.js +155 -0
  662. package/Utils/StatusPage/FrozenMonitorResources.mjs +4 -0
  663. package/Utils/StatusPage/GroupNestingLayout.d.mts +2 -0
  664. package/Utils/StatusPage/GroupNestingLayout.d.ts +2 -0
  665. package/Utils/StatusPage/GroupNestingLayout.js +12 -0
  666. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.mts +48 -0
  667. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.ts +48 -0
  668. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.js +181 -0
  669. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.mjs +2 -0
  670. package/Utils/StatusPage/ResourceExplorer.d.mts +1 -0
  671. package/Utils/StatusPage/ResourceExplorer.d.ts +1 -0
  672. package/Utils/StatusPage/ResourceExplorer.js +11 -1
  673. package/Utils/StatusPage/ResourceUptime.d.mts +6 -1
  674. package/Utils/StatusPage/ResourceUptime.d.ts +6 -1
  675. package/Utils/StatusPage/ResourceUptime.js +31 -6
  676. package/Utils/StatusPage/StatusPageSummaryBuilder.d.mts +1 -0
  677. package/Utils/StatusPage/StatusPageSummaryBuilder.d.ts +1 -0
  678. package/Utils/StatusPage/StatusPageSummaryBuilder.js +12 -1
  679. package/Utils/StatusPage/StatusPageUptimeTimezone.d.mts +41 -0
  680. package/Utils/StatusPage/StatusPageUptimeTimezone.d.ts +41 -0
  681. package/Utils/StatusPage/StatusPageUptimeTimezone.js +114 -0
  682. package/Utils/StatusPage/StatusPageUptimeTimezone.mjs +2 -0
  683. package/Utils/StatusPage/UptimeDailyAggregateUtil.d.mts +3 -1
  684. package/Utils/StatusPage/UptimeDailyAggregateUtil.d.ts +3 -1
  685. package/Utils/StatusPage/UptimeDailyAggregateUtil.js +69 -50
  686. package/Utils/Telemetry/CloudInstanceIdentity.js +12 -7
  687. package/Utils/Uptime/DayUptimeGraphUtil.d.mts +8 -0
  688. package/Utils/Uptime/DayUptimeGraphUtil.d.ts +8 -0
  689. package/Utils/Uptime/DayUptimeGraphUtil.js +41 -6
  690. package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +3 -0
  691. package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +3 -0
  692. package/Utils/Uptime/UptimeMaintenanceUtil.js +51 -1
  693. package/Utils/Uptime/UptimeUtil.d.mts +38 -1
  694. package/Utils/Uptime/UptimeUtil.d.ts +38 -1
  695. package/Utils/Uptime/UptimeUtil.js +270 -75
  696. package/Utils/Uptime/WorstStatusTimeline.d.mts +31 -0
  697. package/Utils/Uptime/WorstStatusTimeline.d.ts +31 -0
  698. package/Utils/Uptime/WorstStatusTimeline.js +190 -0
  699. package/Utils/Uptime/WorstStatusTimeline.mjs +2 -0
  700. package/Utils/ValueFormatter.d.mts +8 -6
  701. package/Utils/ValueFormatter.d.ts +8 -6
  702. package/Utils/ValueFormatter.js +145 -0
  703. package/Utils/Workspace/WorkspaceSummarySetup.d.mts +25 -0
  704. package/Utils/Workspace/WorkspaceSummarySetup.d.ts +25 -0
  705. package/Utils/Workspace/WorkspaceSummarySetup.js +215 -0
  706. package/Utils/Workspace/WorkspaceSummarySetup.mjs +11 -0
  707. package/package.json +1 -1
  708. package/Utils/StatusPage/ArchivedMonitorResources.d.mts +0 -10
  709. package/Utils/StatusPage/ArchivedMonitorResources.d.ts +0 -10
  710. package/Utils/StatusPage/ArchivedMonitorResources.js +0 -33
  711. package/Utils/StatusPage/ArchivedMonitorResources.mjs +0 -2
@@ -0,0 +1,1047 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SETUP_HEALTH_RULES = exports.SETUP_HEALTH_CACHE_TTL_IN_MS = exports.SCHEDULE_GAP_LOOKAHEAD_IN_DAYS = exports.MONITOR_OFF_FOR_LONG_IN_DAYS = exports.DOMAIN_VERIFICATION_GRACE_IN_MS = exports.SETUP_HEALTH_WORDS = exports.SetupHealthEventKind = exports.SetupHealthMonitorReason = exports.SetupHealthScheduleReason = exports.SETUP_HEALTH_RESPONDER_REASON_ORDER = exports.SetupHealthResponderReason = exports.SetupHealthFix = exports.SetupHealthRecordKind = exports.SETUP_HEALTH_CHECK_ORDER = exports.SetupHealthCheck = exports.SETUP_HEALTH_LEVELS_ON_HOME = exports.SETUP_HEALTH_LEVEL_ORDER = exports.SetupHealthLevel = void 0;
4
+ exports.getSetupHealthFindingKey = getSetupHealthFindingKey;
5
+ exports.makeSetupHealthFinding = makeSetupHealthFinding;
6
+ exports.getChainFindings = getChainFindings;
7
+ exports.getResponderFindings = getResponderFindings;
8
+ exports.getPolicyNotRunFindings = getPolicyNotRunFindings;
9
+ exports.getScheduleFindings = getScheduleFindings;
10
+ exports.formatEnglishTime = formatEnglishTime;
11
+ exports.formatEnglishUsd = formatEnglishUsd;
12
+ exports.usesPaidMessages = usesPaidMessages;
13
+ exports.getLowBalanceFindings = getLowBalanceFindings;
14
+ exports.getServerFindings = getServerFindings;
15
+ exports.getMonitorNotCheckedFindings = getMonitorNotCheckedFindings;
16
+ exports.getMonitorOffForLongFindings = getMonitorOffForLongFindings;
17
+ exports.getStatusPageFindings = getStatusPageFindings;
18
+ exports.getStatusPageDomainFindings = getStatusPageDomainFindings;
19
+ exports.getOwnerFindings = getOwnerFindings;
20
+ exports.getWorkspaceFindings = getWorkspaceFindings;
21
+ exports.getTelemetryFindings = getTelemetryFindings;
22
+ exports.compareSetupHealthFindings = compareSetupHealthFindings;
23
+ exports.getSetupHealthFindings = getSetupHealthFindings;
24
+ exports.getSetupHealthDismissalId = getSetupHealthDismissalId;
25
+ exports.findSetupHealthDismissal = findSetupHealthDismissal;
26
+ exports.applySetupHealthDismissals = applySetupHealthDismissals;
27
+ exports.getSetupHealthCounts = getSetupHealthCounts;
28
+ exports.isSetupHealthFindingReadable = isSetupHealthFindingReadable;
29
+ exports.redactSetupHealthFindings = redactSetupHealthFindings;
30
+ exports.getSetupHealthRecordIds = getSetupHealthRecordIds;
31
+ const Translator_1 = require("../Translator");
32
+ const WhoIsTold_1 = require("../Monitor/WhoIsTold");
33
+ const OnCallPageChannel_1 = require("../OnCallDutyPolicy/OnCallPageChannel");
34
+ const OnCallTestPage_1 = require("../OnCallDutyPolicy/OnCallTestPage");
35
+ /*
36
+ * SETUP HEALTH (#6812): ONE LIST OF WHAT IS MISCONFIGURED IN A PROJECT, EACH
37
+ * FINDING WITH ITS FIX.
38
+ *
39
+ * OneUptime lets a team build a setup in which a monitor fails and nobody
40
+ * hears about it, while every page along the way looks fine: each product
41
+ * checks its own corner. This looks at the project as a whole and says
42
+ * "these things are wrong, here is how to fix each" - which is also how a
43
+ * person learns the product's rules without reading about them.
44
+ *
45
+ * The server reads the facts once per project, in batches
46
+ * (Server/Services/SetupHealthService), and every rule here is a small pure
47
+ * function over them, so a test can hand any project to each rule. The
48
+ * monitors' findings are the breaks of their "When this goes down" chains
49
+ * (Types/Monitor/WhoIsTold, #6810), resolved for the whole project at once
50
+ * (WhoIsToldService.resolveProject): the card on a monitor and this list
51
+ * share one set of rules and never disagree.
52
+ *
53
+ * A finding says what is wrong in one sentence, names the one record it is
54
+ * about, and says which page fixes it. Its words are a template the
55
+ * Dashboard translates with the finding's values; the server fills them in
56
+ * English (`sentence`) for the API and for Ask AI. Three levels, in the
57
+ * spirit of Installation health's fix and warn (#6826):
58
+ *
59
+ * - PagesWillNotArrive: something set up to tell people will not.
60
+ * - WorthFixing: a gap people usually do not mean to leave.
61
+ * - Suggestion: worth a look, and often fine as it is.
62
+ *
63
+ * Home's "Needs attention" counts the first two. A finding can be dismissed
64
+ * for everyone, with a reason ("We do not page for this on purpose"): the
65
+ * dismissal is a RecommendationDismissal of RecommendationType.SetupHealth,
66
+ * named by getSetupHealthDismissalId, and Restore deletes it.
67
+ *
68
+ * Pure, with no server or browser APIs.
69
+ */
70
+ var SetupHealthLevel;
71
+ (function (SetupHealthLevel) {
72
+ SetupHealthLevel["PagesWillNotArrive"] = "pages_will_not_arrive";
73
+ SetupHealthLevel["WorthFixing"] = "worth_fixing";
74
+ SetupHealthLevel["Suggestion"] = "suggestion";
75
+ })(SetupHealthLevel || (exports.SetupHealthLevel = SetupHealthLevel = {}));
76
+ // Worst first: the order the page lists them in.
77
+ exports.SETUP_HEALTH_LEVEL_ORDER = [
78
+ SetupHealthLevel.PagesWillNotArrive,
79
+ SetupHealthLevel.WorthFixing,
80
+ SetupHealthLevel.Suggestion,
81
+ ];
82
+ // The levels Home's "Needs attention" counts.
83
+ exports.SETUP_HEALTH_LEVELS_ON_HOME = [
84
+ SetupHealthLevel.PagesWillNotArrive,
85
+ SetupHealthLevel.WorthFixing,
86
+ ];
87
+ /*
88
+ * What is checked. The values are kept in dismissals
89
+ * (getSetupHealthDismissalId), so they are never renamed.
90
+ */
91
+ var SetupHealthCheck;
92
+ (function (SetupHealthCheck) {
93
+ // From the monitors' chains (WhoIsToldBreakKind).
94
+ SetupHealthCheck["MonitorTellsNobody"] = "monitor_tells_nobody";
95
+ SetupHealthCheck["MonitorPagesNobody"] = "monitor_pages_nobody";
96
+ SetupHealthCheck["MonitorAlertsPageNobody"] = "monitor_alerts_page_nobody";
97
+ SetupHealthCheck["PolicyHasNoEscalationRules"] = "policy_has_no_escalation_rules";
98
+ SetupHealthCheck["PolicyReachesNobody"] = "policy_reaches_nobody";
99
+ SetupHealthCheck["ResponderCannotBePaged"] = "responder_cannot_be_paged";
100
+ SetupHealthCheck["ChannelOff"] = "channel_off";
101
+ SetupHealthCheck["NoBalance"] = "no_balance";
102
+ SetupHealthCheck["ServerCannotSend"] = "server_cannot_send";
103
+ // The project's other records.
104
+ SetupHealthCheck["PolicyNotRun"] = "policy_not_run";
105
+ SetupHealthCheck["ScheduleHasNobodyOnCall"] = "schedule_has_nobody_on_call";
106
+ SetupHealthCheck["LowBalance"] = "low_balance";
107
+ SetupHealthCheck["MonitorNotChecked"] = "monitor_not_checked";
108
+ SetupHealthCheck["MonitorOffForLong"] = "monitor_off_for_long";
109
+ SetupHealthCheck["StatusPageShowsNoMonitor"] = "status_page_shows_no_monitor";
110
+ SetupHealthCheck["StatusPageDomainNotVerified"] = "status_page_domain_not_verified";
111
+ SetupHealthCheck["OneOwner"] = "one_owner";
112
+ SetupHealthCheck["WorkspaceNotUsed"] = "workspace_not_used";
113
+ SetupHealthCheck["TelemetryNotWatched"] = "telemetry_not_watched";
114
+ })(SetupHealthCheck || (exports.SetupHealthCheck = SetupHealthCheck = {}));
115
+ /*
116
+ * Within a level, the order the page lists the checks in: who is told
117
+ * first, then what is checked and shown, then the project.
118
+ */
119
+ exports.SETUP_HEALTH_CHECK_ORDER = [
120
+ SetupHealthCheck.ServerCannotSend,
121
+ SetupHealthCheck.NoBalance,
122
+ SetupHealthCheck.ChannelOff,
123
+ SetupHealthCheck.MonitorAlertsPageNobody,
124
+ SetupHealthCheck.PolicyHasNoEscalationRules,
125
+ SetupHealthCheck.PolicyReachesNobody,
126
+ SetupHealthCheck.ResponderCannotBePaged,
127
+ SetupHealthCheck.MonitorPagesNobody,
128
+ SetupHealthCheck.MonitorTellsNobody,
129
+ SetupHealthCheck.PolicyNotRun,
130
+ SetupHealthCheck.ScheduleHasNobodyOnCall,
131
+ SetupHealthCheck.LowBalance,
132
+ SetupHealthCheck.MonitorNotChecked,
133
+ SetupHealthCheck.StatusPageShowsNoMonitor,
134
+ SetupHealthCheck.StatusPageDomainNotVerified,
135
+ SetupHealthCheck.MonitorOffForLong,
136
+ SetupHealthCheck.TelemetryNotWatched,
137
+ SetupHealthCheck.WorkspaceNotUsed,
138
+ SetupHealthCheck.OneOwner,
139
+ ];
140
+ /*
141
+ * The kind of record a finding is about. The values are also the
142
+ * `resourceType` of a dismissal, so they are never renamed.
143
+ */
144
+ var SetupHealthRecordKind;
145
+ (function (SetupHealthRecordKind) {
146
+ SetupHealthRecordKind["Monitor"] = "Monitor";
147
+ SetupHealthRecordKind["OnCallDutyPolicy"] = "OnCallDutyPolicy";
148
+ SetupHealthRecordKind["OnCallDutyPolicySchedule"] = "OnCallDutyPolicySchedule";
149
+ SetupHealthRecordKind["User"] = "User";
150
+ SetupHealthRecordKind["StatusPage"] = "StatusPage";
151
+ SetupHealthRecordKind["StatusPageDomain"] = "StatusPageDomain";
152
+ SetupHealthRecordKind["Project"] = "Project";
153
+ })(SetupHealthRecordKind || (exports.SetupHealthRecordKind = SetupHealthRecordKind = {}));
154
+ // The page that puts a finding right.
155
+ var SetupHealthFix;
156
+ (function (SetupHealthFix) {
157
+ SetupHealthFix["MonitorCriteria"] = "MonitorCriteria";
158
+ SetupHealthFix["MonitorProbes"] = "MonitorProbes";
159
+ SetupHealthFix["MonitorOverview"] = "MonitorOverview";
160
+ SetupHealthFix["CreateMonitor"] = "CreateMonitor";
161
+ SetupHealthFix["IncidentOnCallRules"] = "IncidentOnCallRules";
162
+ SetupHealthFix["AlertOnCallRules"] = "AlertOnCallRules";
163
+ SetupHealthFix["OnCallPolicy"] = "OnCallPolicy";
164
+ SetupHealthFix["OnCallSchedule"] = "OnCallSchedule";
165
+ SetupHealthFix["OnCallReadiness"] = "OnCallReadiness";
166
+ SetupHealthFix["ProjectNotificationSettings"] = "ProjectNotificationSettings";
167
+ SetupHealthFix["ProjectBilling"] = "ProjectBilling";
168
+ // Self-hosted: the Admin Dashboard's settings, for the server's admins.
169
+ SetupHealthFix["ServerSettings"] = "ServerSettings";
170
+ SetupHealthFix["StatusPageResources"] = "StatusPageResources";
171
+ SetupHealthFix["StatusPageDomains"] = "StatusPageDomains";
172
+ SetupHealthFix["ProjectOwners"] = "ProjectOwners";
173
+ SetupHealthFix["WorkspaceNotificationRules"] = "WorkspaceNotificationRules";
174
+ })(SetupHealthFix || (exports.SetupHealthFix = SetupHealthFix = {}));
175
+ // Why a responder can't be paged (ResponderCannotBePaged's reasons), worst first.
176
+ var SetupHealthResponderReason;
177
+ (function (SetupHealthResponderReason) {
178
+ SetupHealthResponderReason["NotAMember"] = "not_a_member";
179
+ SetupHealthResponderReason["InvitationNotAccepted"] = "invitation_not_accepted";
180
+ SetupHealthResponderReason["NoVerifiedMethod"] = "no_verified_method";
181
+ SetupHealthResponderReason["NoRuleNoFallback"] = "no_rule_no_fallback";
182
+ SetupHealthResponderReason["OptedOut"] = "opted_out";
183
+ })(SetupHealthResponderReason || (exports.SetupHealthResponderReason = SetupHealthResponderReason = {}));
184
+ exports.SETUP_HEALTH_RESPONDER_REASON_ORDER = [
185
+ SetupHealthResponderReason.NotAMember,
186
+ SetupHealthResponderReason.InvitationNotAccepted,
187
+ SetupHealthResponderReason.NoVerifiedMethod,
188
+ SetupHealthResponderReason.NoRuleNoFallback,
189
+ SetupHealthResponderReason.OptedOut,
190
+ ];
191
+ // Why nobody is on call in a schedule (ScheduleHasNobodyOnCall's reasons), worst first.
192
+ var SetupHealthScheduleReason;
193
+ (function (SetupHealthScheduleReason) {
194
+ SetupHealthScheduleReason["NoRotations"] = "no_rotations";
195
+ SetupHealthScheduleReason["NobodyInRotations"] = "nobody_in_rotations";
196
+ SetupHealthScheduleReason["NobodyNow"] = "nobody_now";
197
+ SetupHealthScheduleReason["GapAhead"] = "gap_ahead";
198
+ })(SetupHealthScheduleReason || (exports.SetupHealthScheduleReason = SetupHealthScheduleReason = {}));
199
+ // Why a monitor is not checked (MonitorNotChecked's reasons).
200
+ var SetupHealthMonitorReason;
201
+ (function (SetupHealthMonitorReason) {
202
+ SetupHealthMonitorReason["NoProbe"] = "no_probe";
203
+ SetupHealthMonitorReason["ProbesDisconnected"] = "probes_disconnected";
204
+ })(SetupHealthMonitorReason || (exports.SetupHealthMonitorReason = SetupHealthMonitorReason = {}));
205
+ // Which records an incident or an alert has the on-call rules of.
206
+ var SetupHealthEventKind;
207
+ (function (SetupHealthEventKind) {
208
+ SetupHealthEventKind["Incident"] = "incident";
209
+ SetupHealthEventKind["Alert"] = "alert";
210
+ })(SetupHealthEventKind || (exports.SetupHealthEventKind = SetupHealthEventKind = {}));
211
+ /*
212
+ * THE WORDS OF EACH FINDING, by check and reason (or subject). Each is a
213
+ * whole sentence (the reader's language may put the names anywhere), and
214
+ * the ones the "When this goes down" card says too are the card's own
215
+ * words, so the two say a break one way.
216
+ */
217
+ exports.SETUP_HEALTH_WORDS = {
218
+ monitorTellsNobody: (0, Translator_1.translationKey)("{{monitor}} tells nobody when it goes down: none of its criteria changes its status or opens an incident or an alert."),
219
+ monitorPagesNobody: {
220
+ [SetupHealthEventKind.Incident]: (0, Translator_1.translationKey)("Nobody is paged when {{monitor}} goes down: no on-call rule matches its incidents."),
221
+ [SetupHealthEventKind.Alert]: (0, Translator_1.translationKey)("Nobody is paged when {{monitor}} goes down: no on-call rule matches its alerts."),
222
+ },
223
+ monitorAlertsPageNobody: (0, Translator_1.translationKey)("Nobody is paged for the alerts of {{monitor}}: only incidents have on-call rules."),
224
+ policyHasNoEscalationRules: (0, Translator_1.translationKey)("On-call policy {{policy}} has no escalation rules, so it pages nobody."),
225
+ policyReachesNobody: (0, Translator_1.translationKey)("On-call policy {{policy}} reaches nobody right now: nobody is on call in its first escalation rule."),
226
+ responderCannotBePaged: {
227
+ [SetupHealthResponderReason.NotAMember]: (0, Translator_1.translationKey)("{{name}} is no longer a member of this project, but an on-call policy still pages them."),
228
+ [SetupHealthResponderReason.InvitationNotAccepted]: (0, Translator_1.translationKey)("{{name}} hasn't accepted the invitation to this project, so pages don't reach them."),
229
+ [SetupHealthResponderReason.NoVerifiedMethod]: (0, Translator_1.translationKey)("{{name}} has no verified notification method, so pages don't reach them."),
230
+ [SetupHealthResponderReason.NoRuleNoFallback]: (0, Translator_1.translationKey)("{{name}} has no on-call rule for some pages an on-call policy sends them, and this project doesn't fall back to verified methods."),
231
+ [SetupHealthResponderReason.OptedOut]: (0, Translator_1.translationKey)("{{name}} opted out of some pages an on-call policy sends them."),
232
+ },
233
+ channelOff: (0, Translator_1.translationKey)("{{channel}} is off in this project, so pages that use it are not sent."),
234
+ noBalance: (0, Translator_1.translationKey)("This project has no balance left for SMS and calls, so they are not sent."),
235
+ serverCannotSend: {
236
+ [WhoIsTold_1.WhoIsToldServerChannel.Email]: (0, Translator_1.translationKey)("This server can't send email yet, so nobody is emailed."),
237
+ [WhoIsTold_1.WhoIsToldServerChannel.SMS]: (0, Translator_1.translationKey)("This server can't send SMS yet, so SMS pages are not sent."),
238
+ [WhoIsTold_1.WhoIsToldServerChannel.Call]: (0, Translator_1.translationKey)("This server can't make phone calls yet, so call pages are not sent."),
239
+ },
240
+ policyNotRun: (0, Translator_1.translationKey)("On-call policy {{policy}} pages nobody: no on-call rule and no monitor runs it."),
241
+ scheduleHasNobodyOnCall: {
242
+ [SetupHealthScheduleReason.NoRotations]: (0, Translator_1.translationKey)("On-call schedule {{schedule}} has no rotations, so nobody is ever on call in it."),
243
+ [SetupHealthScheduleReason.NobodyInRotations]: (0, Translator_1.translationKey)("Nobody is in the rotations of on-call schedule {{schedule}}, so nobody is ever on call in it."),
244
+ [SetupHealthScheduleReason.NobodyNow]: (0, Translator_1.translationKey)("Nobody is on call in on-call schedule {{schedule}} right now."),
245
+ [SetupHealthScheduleReason.GapAhead]: (0, Translator_1.translationKey)("Nobody will be on call in on-call schedule {{schedule}} from {{time}}."),
246
+ },
247
+ lowBalance: (0, Translator_1.translationKey)("This project's balance for SMS and calls is low ({{balance}}) and auto-recharge is off, so they stop when it runs out."),
248
+ monitorNotChecked: {
249
+ [SetupHealthMonitorReason.NoProbe]: (0, Translator_1.translationKey)("{{monitor}} is never checked: no probe is turned on for it."),
250
+ [SetupHealthMonitorReason.ProbesDisconnected]: (0, Translator_1.translationKey)("{{monitor}} is not checked right now: every probe it uses is disconnected."),
251
+ },
252
+ monitorOffForLong: (0, Translator_1.translationKey)("{{monitor}} has been turned off for more than 30 days."),
253
+ statusPageShowsNoMonitor: (0, Translator_1.translationKey)("Status page {{statusPage}} shows no monitors yet."),
254
+ statusPageDomainNotVerified: (0, Translator_1.translationKey)("{{domain}} doesn't open status page {{statusPage}} yet: its CNAME record isn't verified."),
255
+ oneOwner: (0, Translator_1.translationKey)("This project has only one owner. Make a second person an owner, so somebody can always manage it."),
256
+ workspaceNotUsed: (0, Translator_1.translationKey)("{{workspace}} is connected, but no notification rule posts to it."),
257
+ telemetryNotWatched: (0, Translator_1.translationKey)("Telemetry arrives in this project, but no monitor alerts on it."),
258
+ };
259
+ /*
260
+ * A domain added less than this long ago is not yet said to be unverified:
261
+ * DNS takes a while to answer for a new record.
262
+ */
263
+ exports.DOMAIN_VERIFICATION_GRACE_IN_MS = 60 * 60 * 1000;
264
+ // A monitor turned off for longer than this is said to be off for long.
265
+ exports.MONITOR_OFF_FOR_LONG_IN_DAYS = 30;
266
+ // How far ahead a schedule's gaps are looked for.
267
+ exports.SCHEDULE_GAP_LOOKAHEAD_IN_DAYS = 7;
268
+ // How long the server keeps a project's findings before working them out again.
269
+ exports.SETUP_HEALTH_CACHE_TTL_IN_MS = 60 * 1000;
270
+ const DAY_IN_MS = 24 * 60 * 60 * 1000;
271
+ // The record of a finding about the project itself.
272
+ function projectRecord(facts) {
273
+ return {
274
+ kind: SetupHealthRecordKind.Project,
275
+ id: facts.projectId,
276
+ name: "",
277
+ };
278
+ }
279
+ // What makes a finding itself: its check, its subject and its record.
280
+ function getSetupHealthFindingKey(data) {
281
+ return [data.check, data.subject, data.record.kind, data.record.id].join("|");
282
+ }
283
+ // A finding, with its key and its English sentence.
284
+ function makeSetupHealthFinding(data) {
285
+ const values = data.values || {};
286
+ const subject = data.subject || "";
287
+ const finding = {
288
+ key: getSetupHealthFindingKey({
289
+ check: data.check,
290
+ subject: subject,
291
+ record: data.record,
292
+ }),
293
+ check: data.check,
294
+ level: data.level,
295
+ subject: subject,
296
+ reason: data.reason || "",
297
+ record: data.record,
298
+ related: data.related || [],
299
+ fix: data.fix,
300
+ fixRecordId: data.fixRecordId || "",
301
+ words: data.words,
302
+ values: values,
303
+ sentence: (0, Translator_1.fillTemplate)(data.words, values),
304
+ };
305
+ if (data.startsAt) {
306
+ finding.startsAt = data.startsAt;
307
+ }
308
+ if (data.balanceInUSDCents !== undefined) {
309
+ finding.balanceInUSDCents = data.balanceInUSDCents;
310
+ }
311
+ return finding;
312
+ }
313
+ function capitalizeFirst(text) {
314
+ return text ? `${text.charAt(0).toUpperCase()}${text.slice(1)}` : text;
315
+ }
316
+ function monitorRecord(chain) {
317
+ return {
318
+ kind: SetupHealthRecordKind.Monitor,
319
+ id: chain.monitorId,
320
+ name: chain.monitorName,
321
+ };
322
+ }
323
+ function policyName(facts, policyId) {
324
+ var _a;
325
+ return (((_a = facts.policies.find((policy) => {
326
+ return policy.id === policyId;
327
+ })) === null || _a === void 0 ? void 0 : _a.name) || "");
328
+ }
329
+ const PERSON_PROBLEM_REASONS = {
330
+ [WhoIsTold_1.WhoIsToldPersonProblem.NoVerifiedMethod]: SetupHealthResponderReason.NoVerifiedMethod,
331
+ [WhoIsTold_1.WhoIsToldPersonProblem.NoRuleNoFallback]: SetupHealthResponderReason.NoRuleNoFallback,
332
+ [WhoIsTold_1.WhoIsToldPersonProblem.OptedOut]: SetupHealthResponderReason.OptedOut,
333
+ };
334
+ // A responder who can't be paged, for one reason.
335
+ function responderFinding(data) {
336
+ return makeSetupHealthFinding({
337
+ check: SetupHealthCheck.ResponderCannotBePaged,
338
+ level: SetupHealthLevel.PagesWillNotArrive,
339
+ record: {
340
+ kind: SetupHealthRecordKind.User,
341
+ id: data.userId,
342
+ name: data.name,
343
+ },
344
+ reason: data.reason,
345
+ related: data.related,
346
+ fix: SetupHealthFix.OnCallReadiness,
347
+ words: exports.SETUP_HEALTH_WORDS.responderCannotBePaged[data.reason],
348
+ values: { name: data.name || "Someone" },
349
+ });
350
+ }
351
+ /*
352
+ * ONE MONITOR'S BREAKS AS FINDINGS. A break about the monitor (nothing
353
+ * happens, nobody is paged) is the monitor's; one about a policy or a
354
+ * person is that record's, with the monitor as what it concerns; one about
355
+ * the project's channels or the server is the project's.
356
+ */
357
+ function getChainFindings(facts, chain) {
358
+ const findings = [];
359
+ const monitor = monitorRecord(chain);
360
+ const values = { monitor: chain.monitorName };
361
+ for (const brk of chain.breaks) {
362
+ const finding = getBreakFinding({
363
+ facts: facts,
364
+ brk: brk,
365
+ monitor: monitor,
366
+ values: values,
367
+ });
368
+ if (finding) {
369
+ findings.push(finding);
370
+ }
371
+ }
372
+ return findings;
373
+ }
374
+ function getBreakFinding(data) {
375
+ const brk = data.brk;
376
+ switch (brk.kind) {
377
+ case WhoIsTold_1.WhoIsToldBreakKind.NothingHappens:
378
+ return makeSetupHealthFinding({
379
+ check: SetupHealthCheck.MonitorTellsNobody,
380
+ level: SetupHealthLevel.WorthFixing,
381
+ record: data.monitor,
382
+ fix: SetupHealthFix.MonitorCriteria,
383
+ fixRecordId: data.monitor.id,
384
+ words: exports.SETUP_HEALTH_WORDS.monitorTellsNobody,
385
+ values: data.values,
386
+ });
387
+ case WhoIsTold_1.WhoIsToldBreakKind.NobodyPaged: {
388
+ const kind = brk.recordKind === OnCallTestPage_1.OnCallTestPageRecordKind.Alert
389
+ ? SetupHealthEventKind.Alert
390
+ : SetupHealthEventKind.Incident;
391
+ /*
392
+ * In a project with no on-call policy yet, email to the owners may be
393
+ * just what they want: a suggestion, not a problem.
394
+ */
395
+ return makeSetupHealthFinding({
396
+ check: SetupHealthCheck.MonitorPagesNobody,
397
+ level: data.facts.policies.length > 0
398
+ ? SetupHealthLevel.WorthFixing
399
+ : SetupHealthLevel.Suggestion,
400
+ record: data.monitor,
401
+ subject: kind,
402
+ fix: kind === SetupHealthEventKind.Alert
403
+ ? SetupHealthFix.AlertOnCallRules
404
+ : SetupHealthFix.IncidentOnCallRules,
405
+ words: exports.SETUP_HEALTH_WORDS.monitorPagesNobody[kind],
406
+ values: data.values,
407
+ });
408
+ }
409
+ case WhoIsTold_1.WhoIsToldBreakKind.OnlyIncidentsHaveRules:
410
+ return makeSetupHealthFinding({
411
+ check: SetupHealthCheck.MonitorAlertsPageNobody,
412
+ level: SetupHealthLevel.PagesWillNotArrive,
413
+ record: data.monitor,
414
+ fix: SetupHealthFix.AlertOnCallRules,
415
+ words: exports.SETUP_HEALTH_WORDS.monitorAlertsPageNobody,
416
+ values: data.values,
417
+ });
418
+ case WhoIsTold_1.WhoIsToldBreakKind.PolicyHasNoLevels:
419
+ case WhoIsTold_1.WhoIsToldBreakKind.PolicyReachesNobody: {
420
+ if (!brk.policyId) {
421
+ return null;
422
+ }
423
+ const name = brk.policyName || policyName(data.facts, brk.policyId);
424
+ const hasNoLevels = brk.kind === WhoIsTold_1.WhoIsToldBreakKind.PolicyHasNoLevels;
425
+ return makeSetupHealthFinding({
426
+ check: hasNoLevels
427
+ ? SetupHealthCheck.PolicyHasNoEscalationRules
428
+ : SetupHealthCheck.PolicyReachesNobody,
429
+ level: SetupHealthLevel.PagesWillNotArrive,
430
+ record: {
431
+ kind: SetupHealthRecordKind.OnCallDutyPolicy,
432
+ id: brk.policyId,
433
+ name: name,
434
+ },
435
+ related: [data.monitor],
436
+ fix: SetupHealthFix.OnCallPolicy,
437
+ fixRecordId: brk.policyId,
438
+ words: hasNoLevels
439
+ ? exports.SETUP_HEALTH_WORDS.policyHasNoEscalationRules
440
+ : exports.SETUP_HEALTH_WORDS.policyReachesNobody,
441
+ values: { policy: name },
442
+ });
443
+ }
444
+ case WhoIsTold_1.WhoIsToldBreakKind.PersonUnreachable: {
445
+ const reason = brk.problem
446
+ ? PERSON_PROBLEM_REASONS[brk.problem]
447
+ : SetupHealthResponderReason.NoVerifiedMethod;
448
+ // Reached only by switched-off channels: the switch's finding.
449
+ if (!brk.userId || !reason) {
450
+ return null;
451
+ }
452
+ return responderFinding({
453
+ userId: brk.userId,
454
+ name: brk.userName || "",
455
+ reason: reason,
456
+ related: brk.policyId
457
+ ? [
458
+ {
459
+ kind: SetupHealthRecordKind.OnCallDutyPolicy,
460
+ id: brk.policyId,
461
+ name: brk.policyName || policyName(data.facts, brk.policyId),
462
+ },
463
+ ]
464
+ : [],
465
+ });
466
+ }
467
+ case WhoIsTold_1.WhoIsToldBreakKind.ChannelOff: {
468
+ const channel = brk.channel || OnCallPageChannel_1.OnCallPageChannel.SMS;
469
+ return makeSetupHealthFinding({
470
+ check: SetupHealthCheck.ChannelOff,
471
+ level: SetupHealthLevel.PagesWillNotArrive,
472
+ record: projectRecord(data.facts),
473
+ subject: channel,
474
+ related: [data.monitor],
475
+ fix: SetupHealthFix.ProjectNotificationSettings,
476
+ words: exports.SETUP_HEALTH_WORDS.channelOff,
477
+ // It starts the sentence: "Phone call is off ...".
478
+ values: { channel: capitalizeFirst((0, OnCallPageChannel_1.getOnCallPageChannelName)(channel)) },
479
+ });
480
+ }
481
+ case WhoIsTold_1.WhoIsToldBreakKind.NoBalance:
482
+ return makeSetupHealthFinding({
483
+ check: SetupHealthCheck.NoBalance,
484
+ level: SetupHealthLevel.PagesWillNotArrive,
485
+ record: projectRecord(data.facts),
486
+ related: [data.monitor],
487
+ fix: SetupHealthFix.ProjectBilling,
488
+ words: exports.SETUP_HEALTH_WORDS.noBalance,
489
+ });
490
+ case WhoIsTold_1.WhoIsToldBreakKind.ServerCannotSend:
491
+ return serverFinding(data.facts, brk.channel || WhoIsTold_1.WhoIsToldServerChannel.Email, [data.monitor]);
492
+ }
493
+ }
494
+ function serverFinding(facts, channel, related) {
495
+ return makeSetupHealthFinding({
496
+ check: SetupHealthCheck.ServerCannotSend,
497
+ level: SetupHealthLevel.PagesWillNotArrive,
498
+ record: projectRecord(facts),
499
+ subject: channel,
500
+ related: related,
501
+ fix: SetupHealthFix.ServerSettings,
502
+ words: exports.SETUP_HEALTH_WORDS.serverCannotSend[channel],
503
+ });
504
+ }
505
+ /*
506
+ * The people Readiness says nothing reaches - on any policy, not only the
507
+ * ones a monitor runs: an invitation not accepted, somebody who left, no
508
+ * verified method.
509
+ */
510
+ function getResponderFindings(facts) {
511
+ return facts.responders
512
+ .filter((responder) => {
513
+ return responder.isNotReachable;
514
+ })
515
+ .map((responder) => {
516
+ return responderFinding({
517
+ userId: responder.userId,
518
+ name: responder.name,
519
+ reason: responder.reason,
520
+ });
521
+ });
522
+ }
523
+ // The ids of the policies a monitor's criteria names for what it opens.
524
+ function getPolicyIdsNamedByCriteria(chains) {
525
+ const named = new Set();
526
+ for (const chain of chains) {
527
+ for (const item of chain.criteria) {
528
+ for (const event of item.events) {
529
+ for (const policy of event.policies) {
530
+ if (policy.isNamedByCriteria) {
531
+ named.add(policy.id);
532
+ }
533
+ }
534
+ }
535
+ }
536
+ }
537
+ return named;
538
+ }
539
+ /*
540
+ * A policy nothing runs: no enabled on-call rule of any kind names it, and
541
+ * no monitor's criteria does. It pages nobody unless somebody adds it to an
542
+ * incident by hand.
543
+ */
544
+ function getPolicyNotRunFindings(facts) {
545
+ const runByRules = new Set(facts.policyIdsRunByRules);
546
+ const named = getPolicyIdsNamedByCriteria(facts.chains);
547
+ return facts.policies
548
+ .filter((policy) => {
549
+ return !runByRules.has(policy.id) && !named.has(policy.id);
550
+ })
551
+ .map((policy) => {
552
+ return makeSetupHealthFinding({
553
+ check: SetupHealthCheck.PolicyNotRun,
554
+ level: SetupHealthLevel.WorthFixing,
555
+ record: {
556
+ kind: SetupHealthRecordKind.OnCallDutyPolicy,
557
+ id: policy.id,
558
+ name: policy.name,
559
+ },
560
+ fix: SetupHealthFix.IncidentOnCallRules,
561
+ words: exports.SETUP_HEALTH_WORDS.policyNotRun,
562
+ values: { policy: policy.name },
563
+ });
564
+ });
565
+ }
566
+ // A schedule a policy pages with nobody on call in it, now or soon.
567
+ function getScheduleFindings(facts) {
568
+ const findings = [];
569
+ for (const schedule of facts.schedules) {
570
+ if (!schedule.reason) {
571
+ continue;
572
+ }
573
+ if (schedule.reason === SetupHealthScheduleReason.GapAhead &&
574
+ !schedule.gapStartsAt) {
575
+ continue;
576
+ }
577
+ findings.push(makeSetupHealthFinding({
578
+ check: SetupHealthCheck.ScheduleHasNobodyOnCall,
579
+ level: SetupHealthLevel.WorthFixing,
580
+ record: {
581
+ kind: SetupHealthRecordKind.OnCallDutyPolicySchedule,
582
+ id: schedule.id,
583
+ name: schedule.name,
584
+ },
585
+ reason: schedule.reason,
586
+ fix: SetupHealthFix.OnCallSchedule,
587
+ fixRecordId: schedule.id,
588
+ words: exports.SETUP_HEALTH_WORDS.scheduleHasNobodyOnCall[schedule.reason],
589
+ values: Object.assign({ schedule: schedule.name }, (schedule.gapStartsAt
590
+ ? { time: formatEnglishTime(schedule.gapStartsAt) }
591
+ : {})),
592
+ startsAt: schedule.gapStartsAt || undefined,
593
+ }));
594
+ }
595
+ return findings;
596
+ }
597
+ // "2026-11-14 03:00 UTC", as Installation health writes a time for English readers.
598
+ function formatEnglishTime(value) {
599
+ const date = new Date(value);
600
+ if (Number.isNaN(date.getTime())) {
601
+ return value;
602
+ }
603
+ return `${date.toISOString().slice(0, 16).replace("T", " ")} UTC`;
604
+ }
605
+ // "$4.20", for English readers.
606
+ function formatEnglishUsd(cents) {
607
+ return `$${(Math.max(0, cents) / 100).toFixed(2)}`;
608
+ }
609
+ /*
610
+ * Whether some page of some monitor goes out by a channel paid from
611
+ * the balance: SMS or calls not sent through the project's own Twilio,
612
+ * WhatsApp, Telegram.
613
+ */
614
+ function usesPaidMessages(facts) {
615
+ const channels = facts.channels;
616
+ for (const chain of facts.chains) {
617
+ for (const item of chain.criteria) {
618
+ for (const event of item.events) {
619
+ for (const policy of event.policies) {
620
+ for (const person of policy.people) {
621
+ for (const channel of person.channels) {
622
+ if ((channel === OnCallPageChannel_1.OnCallPageChannel.SMS &&
623
+ !(channels === null || channels === void 0 ? void 0 : channels.hasOwnTwilioForSms)) ||
624
+ (channel === OnCallPageChannel_1.OnCallPageChannel.Call &&
625
+ !(channels === null || channels === void 0 ? void 0 : channels.hasOwnTwilioForCalls)) ||
626
+ channel === OnCallPageChannel_1.OnCallPageChannel.WhatsApp ||
627
+ channel === OnCallPageChannel_1.OnCallPageChannel.Telegram) {
628
+ return true;
629
+ }
630
+ }
631
+ }
632
+ }
633
+ }
634
+ }
635
+ }
636
+ return false;
637
+ }
638
+ /*
639
+ * OneUptime Cloud: pages go out by SMS or calls paid from a balance that is
640
+ * low - below the project's own auto-recharge threshold - while
641
+ * auto-recharge is off. An empty balance is the chains' NoBalance.
642
+ */
643
+ function getLowBalanceFindings(facts) {
644
+ const balance = facts.balance;
645
+ if (!balance ||
646
+ balance.isAutoRechargeOn ||
647
+ balance.balanceInUSDCents <= 0 ||
648
+ balance.balanceInUSDCents >= balance.lowBalanceInUSDCents ||
649
+ !usesPaidMessages(facts)) {
650
+ return [];
651
+ }
652
+ return [
653
+ makeSetupHealthFinding({
654
+ check: SetupHealthCheck.LowBalance,
655
+ level: SetupHealthLevel.WorthFixing,
656
+ record: projectRecord(facts),
657
+ fix: SetupHealthFix.ProjectBilling,
658
+ words: exports.SETUP_HEALTH_WORDS.lowBalance,
659
+ values: { balance: formatEnglishUsd(balance.balanceInUSDCents) },
660
+ balanceInUSDCents: balance.balanceInUSDCents,
661
+ }),
662
+ ];
663
+ }
664
+ /*
665
+ * Self-hosted: a server that can't send email leaves every project without
666
+ * it - owners are not emailed, nor are invitations - whether or not a
667
+ * monitor would email anyone. SMS and calls are the chains' to say, when a
668
+ * page uses them.
669
+ */
670
+ function getServerFindings(facts) {
671
+ if (facts.serverCanSendEmail !== false) {
672
+ return [];
673
+ }
674
+ return [serverFinding(facts, WhoIsTold_1.WhoIsToldServerChannel.Email, [])];
675
+ }
676
+ // A monitor's record, from what the server read of it.
677
+ function monitorFactRecord(monitor) {
678
+ return {
679
+ kind: SetupHealthRecordKind.Monitor,
680
+ id: monitor.id,
681
+ name: monitor.name,
682
+ };
683
+ }
684
+ /*
685
+ * A monitor checked by probes that no probe checks: none is turned on for
686
+ * it, or every one it uses is disconnected. It never goes down, so nobody
687
+ * is ever told.
688
+ */
689
+ function getMonitorNotCheckedFindings(facts) {
690
+ const findings = [];
691
+ for (const monitor of facts.monitors) {
692
+ if (monitor.isTurnedOff || !monitor.isCheckedByProbes) {
693
+ continue;
694
+ }
695
+ let reason = null;
696
+ if (monitor.hasNoProbeOn) {
697
+ reason = SetupHealthMonitorReason.NoProbe;
698
+ }
699
+ else if (monitor.areAllProbesDisconnected) {
700
+ reason = SetupHealthMonitorReason.ProbesDisconnected;
701
+ }
702
+ if (!reason) {
703
+ continue;
704
+ }
705
+ findings.push(makeSetupHealthFinding({
706
+ check: SetupHealthCheck.MonitorNotChecked,
707
+ level: SetupHealthLevel.WorthFixing,
708
+ record: monitorFactRecord(monitor),
709
+ reason: reason,
710
+ fix: SetupHealthFix.MonitorProbes,
711
+ fixRecordId: monitor.id,
712
+ words: exports.SETUP_HEALTH_WORDS.monitorNotChecked[reason],
713
+ values: { monitor: monitor.name },
714
+ }));
715
+ }
716
+ return findings;
717
+ }
718
+ /*
719
+ * A monitor turned off by hand, and unchanged since, for more than 30 days:
720
+ * most often forgotten. Its last change is the latest it can have been
721
+ * turned off, so "more than 30 days" is never more than the truth.
722
+ */
723
+ function getMonitorOffForLongFindings(facts) {
724
+ const now = new Date(facts.now).getTime();
725
+ const limit = exports.MONITOR_OFF_FOR_LONG_IN_DAYS * DAY_IN_MS;
726
+ return facts.monitors
727
+ .filter((monitor) => {
728
+ if (!monitor.isTurnedOff || !monitor.updatedAt) {
729
+ return false;
730
+ }
731
+ const updatedAt = new Date(monitor.updatedAt).getTime();
732
+ return !Number.isNaN(updatedAt) && now - updatedAt > limit;
733
+ })
734
+ .map((monitor) => {
735
+ return makeSetupHealthFinding({
736
+ check: SetupHealthCheck.MonitorOffForLong,
737
+ level: SetupHealthLevel.Suggestion,
738
+ record: monitorFactRecord(monitor),
739
+ fix: SetupHealthFix.MonitorOverview,
740
+ fixRecordId: monitor.id,
741
+ words: exports.SETUP_HEALTH_WORDS.monitorOffForLong,
742
+ values: { monitor: monitor.name },
743
+ });
744
+ });
745
+ }
746
+ // A status page that shows no monitor and no monitor group.
747
+ function getStatusPageFindings(facts) {
748
+ return facts.statusPages
749
+ .filter((page) => {
750
+ return page.resourceCount === 0;
751
+ })
752
+ .map((page) => {
753
+ return makeSetupHealthFinding({
754
+ check: SetupHealthCheck.StatusPageShowsNoMonitor,
755
+ level: SetupHealthLevel.WorthFixing,
756
+ record: {
757
+ kind: SetupHealthRecordKind.StatusPage,
758
+ id: page.id,
759
+ name: page.name,
760
+ },
761
+ fix: SetupHealthFix.StatusPageResources,
762
+ fixRecordId: page.id,
763
+ words: exports.SETUP_HEALTH_WORDS.statusPageShowsNoMonitor,
764
+ values: { statusPage: page.name },
765
+ });
766
+ });
767
+ }
768
+ /*
769
+ * A status page's custom domain whose CNAME record is not verified, an
770
+ * hour after it was added: it does not open the status page yet.
771
+ */
772
+ function getStatusPageDomainFindings(facts) {
773
+ const now = new Date(facts.now).getTime();
774
+ return facts.statusPageDomains
775
+ .filter((domain) => {
776
+ if (domain.isCnameVerified) {
777
+ return false;
778
+ }
779
+ const createdAt = domain.createdAt
780
+ ? new Date(domain.createdAt).getTime()
781
+ : Number.NaN;
782
+ return (Number.isNaN(createdAt) ||
783
+ now - createdAt > exports.DOMAIN_VERIFICATION_GRACE_IN_MS);
784
+ })
785
+ .map((domain) => {
786
+ return makeSetupHealthFinding({
787
+ check: SetupHealthCheck.StatusPageDomainNotVerified,
788
+ level: SetupHealthLevel.WorthFixing,
789
+ record: {
790
+ kind: SetupHealthRecordKind.StatusPageDomain,
791
+ id: domain.id,
792
+ name: domain.fullDomain,
793
+ },
794
+ related: [
795
+ {
796
+ kind: SetupHealthRecordKind.StatusPage,
797
+ id: domain.statusPageId,
798
+ name: domain.statusPageName,
799
+ },
800
+ ],
801
+ fix: SetupHealthFix.StatusPageDomains,
802
+ fixRecordId: domain.statusPageId,
803
+ words: exports.SETUP_HEALTH_WORDS.statusPageDomainNotVerified,
804
+ values: {
805
+ domain: domain.fullDomain,
806
+ statusPage: domain.statusPageName,
807
+ },
808
+ });
809
+ });
810
+ }
811
+ /*
812
+ * A project with more than one person and only one owner: nobody else can
813
+ * manage its billing, members and settings while they are away.
814
+ */
815
+ function getOwnerFindings(facts) {
816
+ if (!facts.owners ||
817
+ facts.owners.ownerCount !== 1 ||
818
+ facts.owners.memberCount < 2) {
819
+ return [];
820
+ }
821
+ return [
822
+ makeSetupHealthFinding({
823
+ check: SetupHealthCheck.OneOwner,
824
+ level: SetupHealthLevel.Suggestion,
825
+ record: projectRecord(facts),
826
+ fix: SetupHealthFix.ProjectOwners,
827
+ words: exports.SETUP_HEALTH_WORDS.oneOwner,
828
+ }),
829
+ ];
830
+ }
831
+ // A chat workspace that is connected, with no notification rule posting to it.
832
+ function getWorkspaceFindings(facts) {
833
+ return facts.workspaces
834
+ .filter((workspace) => {
835
+ return workspace.ruleCount === 0;
836
+ })
837
+ .map((workspace) => {
838
+ return makeSetupHealthFinding({
839
+ check: SetupHealthCheck.WorkspaceNotUsed,
840
+ level: SetupHealthLevel.Suggestion,
841
+ record: projectRecord(facts),
842
+ subject: workspace.workspaceType,
843
+ fix: SetupHealthFix.WorkspaceNotificationRules,
844
+ words: exports.SETUP_HEALTH_WORDS.workspaceNotUsed,
845
+ values: { workspace: workspace.workspaceName },
846
+ });
847
+ });
848
+ }
849
+ // Telemetry arrives, and no monitor of logs, metrics, traces or exceptions watches it.
850
+ function getTelemetryFindings(facts) {
851
+ var _a;
852
+ if (!((_a = facts.telemetry) === null || _a === void 0 ? void 0 : _a.receivesTelemetry) ||
853
+ facts.monitors.some((monitor) => {
854
+ return monitor.isTelemetryMonitor;
855
+ })) {
856
+ return [];
857
+ }
858
+ return [
859
+ makeSetupHealthFinding({
860
+ check: SetupHealthCheck.TelemetryNotWatched,
861
+ level: SetupHealthLevel.Suggestion,
862
+ record: projectRecord(facts),
863
+ fix: SetupHealthFix.CreateMonitor,
864
+ words: exports.SETUP_HEALTH_WORDS.telemetryNotWatched,
865
+ }),
866
+ ];
867
+ }
868
+ // The rules, each a function of the facts.
869
+ exports.SETUP_HEALTH_RULES = [
870
+ (facts) => {
871
+ return facts.chains.flatMap((chain) => {
872
+ return getChainFindings(facts, chain);
873
+ });
874
+ },
875
+ getResponderFindings,
876
+ getServerFindings,
877
+ getPolicyNotRunFindings,
878
+ getScheduleFindings,
879
+ getLowBalanceFindings,
880
+ getMonitorNotCheckedFindings,
881
+ getMonitorOffForLongFindings,
882
+ getStatusPageFindings,
883
+ getStatusPageDomainFindings,
884
+ getOwnerFindings,
885
+ getWorkspaceFindings,
886
+ getTelemetryFindings,
887
+ ];
888
+ function addRelated(into, records) {
889
+ for (const record of records) {
890
+ if (!into.some((known) => {
891
+ return known.kind === record.kind && known.id === record.id;
892
+ })) {
893
+ into.push(record);
894
+ }
895
+ }
896
+ }
897
+ function reasonRank(finding) {
898
+ const index = exports.SETUP_HEALTH_RESPONDER_REASON_ORDER.indexOf(finding.reason);
899
+ return index === -1 ? exports.SETUP_HEALTH_RESPONDER_REASON_ORDER.length : index;
900
+ }
901
+ function levelRank(level) {
902
+ return exports.SETUP_HEALTH_LEVEL_ORDER.indexOf(level);
903
+ }
904
+ function checkRank(check) {
905
+ return exports.SETUP_HEALTH_CHECK_ORDER.indexOf(check);
906
+ }
907
+ /*
908
+ * Worst first, then by check, then by the record's name - so the page
909
+ * reads the same way every time.
910
+ */
911
+ function compareSetupHealthFindings(a, b) {
912
+ return (levelRank(a.level) - levelRank(b.level) ||
913
+ checkRank(a.check) - checkRank(b.check) ||
914
+ a.subject.localeCompare(b.subject) ||
915
+ a.record.name.localeCompare(b.record.name) ||
916
+ a.key.localeCompare(b.key));
917
+ }
918
+ /*
919
+ * EVERY FINDING OF A PROJECT, each once, worst first. A finding several
920
+ * rules or monitors make (a policy many monitors run, the server's email)
921
+ * is said once, with every record it concerns; a responder found by both
922
+ * Readiness and a chain keeps the worst reason. One key is one check, so
923
+ * the findings it merges are of one level.
924
+ */
925
+ function getSetupHealthFindings(facts) {
926
+ const byKey = new Map();
927
+ for (const rule of exports.SETUP_HEALTH_RULES) {
928
+ for (const finding of rule(facts)) {
929
+ const known = byKey.get(finding.key);
930
+ if (!known) {
931
+ byKey.set(finding.key, Object.assign(Object.assign({}, finding), { related: [...finding.related] }));
932
+ continue;
933
+ }
934
+ const kept = reasonRank(finding) < reasonRank(known)
935
+ ? Object.assign(Object.assign({}, finding), { related: [...known.related] }) : known;
936
+ addRelated(kept.related, finding.related);
937
+ byKey.set(finding.key, kept);
938
+ }
939
+ }
940
+ return Array.from(byKey.values()).sort(compareSetupHealthFindings);
941
+ }
942
+ /*
943
+ * THE DISMISSAL OF A FINDING, as a RecommendationDismissal row holds it
944
+ * (RecommendationType.SetupHealth): the check and its subject as the
945
+ * recommendation, the record as the resource.
946
+ */
947
+ function getSetupHealthDismissalId(finding) {
948
+ return finding.subject
949
+ ? `${finding.check}:${finding.subject}`
950
+ : finding.check;
951
+ }
952
+ // The dismissal a finding is hidden by, if any.
953
+ function findSetupHealthDismissal(finding, dismissals) {
954
+ const recommendationId = getSetupHealthDismissalId(finding);
955
+ return (dismissals.find((dismissal) => {
956
+ return (dismissal.recommendationId === recommendationId &&
957
+ dismissal.resourceType === finding.record.kind &&
958
+ dismissal.resourceId === finding.record.id);
959
+ }) || null);
960
+ }
961
+ /*
962
+ * The findings, with the dismissed ones set apart. A dismissal of a
963
+ * finding that is gone (fixed since) hides nothing and is not listed.
964
+ */
965
+ function applySetupHealthDismissals(findings, dismissals) {
966
+ const open = [];
967
+ const dismissed = [];
968
+ for (const finding of findings) {
969
+ const dismissal = findSetupHealthDismissal(finding, dismissals);
970
+ if (dismissal) {
971
+ dismissed.push({ finding: finding, dismissal: dismissal });
972
+ }
973
+ else {
974
+ open.push(finding);
975
+ }
976
+ }
977
+ return { findings: open, dismissed: dismissed };
978
+ }
979
+ function getSetupHealthCounts(findings) {
980
+ const count = (level) => {
981
+ return findings.filter((finding) => {
982
+ return finding.level === level;
983
+ }).length;
984
+ };
985
+ const pagesWillNotArrive = count(SetupHealthLevel.PagesWillNotArrive);
986
+ const worthFixing = count(SetupHealthLevel.WorthFixing);
987
+ return {
988
+ pagesWillNotArrive: pagesWillNotArrive,
989
+ worthFixing: worthFixing,
990
+ suggestion: count(SetupHealthLevel.Suggestion),
991
+ needsALook: pagesWillNotArrive + worthFixing,
992
+ };
993
+ }
994
+ function isRecordReadable(record, readable) {
995
+ switch (record.kind) {
996
+ case SetupHealthRecordKind.Monitor:
997
+ return readable.monitorIds.has(record.id);
998
+ case SetupHealthRecordKind.OnCallDutyPolicy:
999
+ return readable.policyIds.has(record.id);
1000
+ case SetupHealthRecordKind.OnCallDutyPolicySchedule:
1001
+ return readable.scheduleIds.has(record.id);
1002
+ case SetupHealthRecordKind.StatusPage:
1003
+ return readable.statusPageIds.has(record.id);
1004
+ case SetupHealthRecordKind.User:
1005
+ return readable.canReadResponders;
1006
+ case SetupHealthRecordKind.StatusPageDomain:
1007
+ // Read through its status page (isFindingReadable).
1008
+ return false;
1009
+ case SetupHealthRecordKind.Project:
1010
+ return true;
1011
+ }
1012
+ }
1013
+ function isSetupHealthFindingReadable(finding, readable) {
1014
+ if (finding.record.kind === SetupHealthRecordKind.StatusPageDomain) {
1015
+ return finding.related.some((record) => {
1016
+ return (record.kind === SetupHealthRecordKind.StatusPage &&
1017
+ readable.statusPageIds.has(record.id));
1018
+ });
1019
+ }
1020
+ return isRecordReadable(finding.record, readable);
1021
+ }
1022
+ function redactSetupHealthFindings(findings, readable) {
1023
+ return findings
1024
+ .filter((finding) => {
1025
+ return isSetupHealthFindingReadable(finding, readable);
1026
+ })
1027
+ .map((finding) => {
1028
+ return Object.assign(Object.assign({}, finding), { related: finding.related.filter((record) => {
1029
+ return isRecordReadable(record, readable);
1030
+ }) });
1031
+ });
1032
+ }
1033
+ /*
1034
+ * The ids of every record of a kind the findings name, for the reads that
1035
+ * say which the caller may see.
1036
+ */
1037
+ function getSetupHealthRecordIds(findings, kind) {
1038
+ const ids = new Set();
1039
+ for (const finding of findings) {
1040
+ for (const record of [finding.record, ...finding.related]) {
1041
+ if (record.kind === kind && record.id) {
1042
+ ids.add(record.id);
1043
+ }
1044
+ }
1045
+ }
1046
+ return Array.from(ids);
1047
+ }