@oneuptime/common 14.0.108 → 14.0.109

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 (494) hide show
  1. package/Models/AnalyticsModels/AuditLog.js +1 -1
  2. package/Models/DatabaseModels/CloudApp.d.mts +5 -0
  3. package/Models/DatabaseModels/CloudApp.d.ts +5 -0
  4. package/Models/DatabaseModels/CloudApp.js +112 -0
  5. package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
  6. package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
  7. package/Models/DatabaseModels/GlobalConfig.js +111 -0
  8. package/Models/DatabaseModels/Index.js +7 -0
  9. package/Models/DatabaseModels/Monitor.js +14 -0
  10. package/Models/DatabaseModels/MonitorStatusTimeline.d.mts +1 -0
  11. package/Models/DatabaseModels/MonitorStatusTimeline.d.ts +1 -0
  12. package/Models/DatabaseModels/MonitorStatusTimeline.js +43 -0
  13. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +4 -0
  14. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +4 -0
  15. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +132 -2
  16. package/Models/DatabaseModels/ProductFeedback.d.mts +11 -0
  17. package/Models/DatabaseModels/ProductFeedback.d.ts +11 -0
  18. package/Models/DatabaseModels/ProductFeedback.js +203 -0
  19. package/Models/DatabaseModels/ProductFeedback.mjs +2 -0
  20. package/Models/DatabaseModels/Project.d.mts +6 -0
  21. package/Models/DatabaseModels/Project.d.ts +6 -0
  22. package/Models/DatabaseModels/Project.js +237 -0
  23. package/Models/DatabaseModels/ProjectMilestone.d.mts +11 -0
  24. package/Models/DatabaseModels/ProjectMilestone.d.ts +11 -0
  25. package/Models/DatabaseModels/ProjectMilestone.js +207 -0
  26. package/Models/DatabaseModels/ProjectMilestone.mjs +2 -0
  27. package/Models/DatabaseModels/ProjectUserPreference.d.mts +11 -0
  28. package/Models/DatabaseModels/ProjectUserPreference.d.ts +11 -0
  29. package/Models/DatabaseModels/ProjectUserPreference.js +194 -0
  30. package/Models/DatabaseModels/ProjectUserPreference.mjs +2 -0
  31. package/Models/DatabaseModels/RumSessionPin.js +16 -2
  32. package/Models/DatabaseModels/RumSessionReplayView.js +8 -1
  33. package/Models/DatabaseModels/SecurityCase.js +8 -1
  34. package/Models/DatabaseModels/User.d.mts +2 -0
  35. package/Models/DatabaseModels/User.d.ts +2 -0
  36. package/Models/DatabaseModels/User.js +52 -0
  37. package/Models/DatabaseModels/UserOnCallLog.js +32 -4
  38. package/Models/DatabaseModels/UserOnCallLogTimeline.js +10 -0
  39. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  40. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +9 -0
  41. package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +9 -0
  42. package/Server/Services/DatabaseService.d.mts +1 -0
  43. package/Server/Services/DatabaseService.d.ts +1 -0
  44. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +2 -1
  45. package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +2 -1
  46. package/Server/Utils/Workspace/WorkspaceBase.d.mts +1 -0
  47. package/Server/Utils/Workspace/WorkspaceBase.d.ts +1 -0
  48. package/Types/AI/AIActionWords.d.mts +167 -7
  49. package/Types/AI/AIActionWords.d.ts +167 -7
  50. package/Types/AI/AIActionWords.js +474 -17
  51. package/Types/AI/AIActionWords.mjs +22 -0
  52. package/Types/AI/AIChatMessageStatus.js +3 -2
  53. package/Types/AI/AIChatRecordSeen.d.mts +6 -2
  54. package/Types/AI/AIChatRecordSeen.d.ts +6 -2
  55. package/Types/AI/AIChatRecordSeen.js +48 -9
  56. package/Types/AI/AIChatRecordSeen.mjs +2 -0
  57. package/Types/AI/AIChatTypes.d.mts +19 -1
  58. package/Types/AI/AIChatTypes.d.ts +19 -1
  59. package/Types/AI/AIChatTypes.js +44 -1
  60. package/Types/AI/AIChatTypes.mjs +3 -0
  61. package/Types/AI/AIRunAttempt.d.mts +8 -0
  62. package/Types/AI/AIRunAttempt.d.ts +8 -0
  63. package/Types/AI/AIRunAttempt.js +60 -6
  64. package/Types/AI/AIRunAttempt.mjs +3 -0
  65. package/Types/AI/AISetupActions.d.mts +9 -0
  66. package/Types/AI/AISetupActions.d.ts +9 -0
  67. package/Types/AI/AISetupActions.js +56 -0
  68. package/Types/AI/AISetupActions.mjs +10 -0
  69. package/Types/AI/CodeTask.d.mts +14 -0
  70. package/Types/AI/CodeTask.d.ts +14 -0
  71. package/Types/AI/RecordAiTokenLimit.d.mts +24 -0
  72. package/Types/AI/RecordAiTokenLimit.d.ts +24 -0
  73. package/Types/AI/RecordAiTokenLimit.js +153 -0
  74. package/Types/AI/RecordAiTokenLimit.mjs +8 -0
  75. package/Types/Accounts/SignInMessages.d.mts +8 -0
  76. package/Types/Accounts/SignInMessages.d.ts +8 -0
  77. package/Types/Accounts/SignInMessages.js +28 -0
  78. package/Types/Accounts/SignInMessages.mjs +5 -0
  79. package/Types/Analytics/ActivationMilestone.d.mts +48 -0
  80. package/Types/Analytics/ActivationMilestone.d.ts +48 -0
  81. package/Types/Analytics/ActivationMilestone.js +247 -0
  82. package/Types/Analytics/ActivationMilestone.mjs +16 -0
  83. package/Types/Analytics/ChecklistProgress.d.mts +11 -0
  84. package/Types/Analytics/ChecklistProgress.d.ts +11 -0
  85. package/Types/Analytics/ChecklistProgress.js +32 -0
  86. package/Types/Analytics/ChecklistProgress.mjs +2 -0
  87. package/Types/Analytics/ProductEvent.d.mts +61 -0
  88. package/Types/Analytics/ProductEvent.d.ts +61 -0
  89. package/Types/Analytics/ProductEvent.js +430 -0
  90. package/Types/Analytics/ProductEvent.mjs +14 -0
  91. package/Types/AuditLog/AuditLogAction.d.mts +5 -1
  92. package/Types/AuditLog/AuditLogAction.d.ts +5 -1
  93. package/Types/AuditLog/AuditLogAction.js +11 -0
  94. package/Types/AuditLog/AuditLogActionLabel.d.mts +3 -0
  95. package/Types/AuditLog/AuditLogActionLabel.d.ts +3 -0
  96. package/Types/AuditLog/AuditLogActionLabel.js +30 -0
  97. package/Types/AuditLog/AuditLogActionLabel.mjs +3 -0
  98. package/Types/AuditLog/AuditLogCoverage.d.mts +2 -1
  99. package/Types/AuditLog/AuditLogCoverage.d.ts +2 -1
  100. package/Types/AuditLog/AuditLogCoverage.js +8 -1
  101. package/Types/AuditLog/AuditLogRetention.js +7 -4
  102. package/Types/AuditLog/AuditLogSessionEvent.d.mts +45 -0
  103. package/Types/AuditLog/AuditLogSessionEvent.d.ts +45 -0
  104. package/Types/AuditLog/AuditLogSessionEvent.js +210 -0
  105. package/Types/AuditLog/AuditLogSessionEvent.mjs +14 -0
  106. package/Types/AutoRemediation/RemediationRound.d.mts +4 -0
  107. package/Types/AutoRemediation/RemediationRound.d.ts +4 -0
  108. package/Types/AutoRemediation/RemediationRound.js +19 -2
  109. package/Types/AutoRemediation/RemediationRoundName.d.mts +1 -0
  110. package/Types/AutoRemediation/RemediationRoundName.d.ts +1 -0
  111. package/Types/AutoRemediation/RemediationRoundName.js +5 -0
  112. package/Types/AutoRemediation/RemediationRoundName.mjs +1 -0
  113. package/Types/Cloud/CloudAppTelemetrySignal.d.mts +9 -0
  114. package/Types/Cloud/CloudAppTelemetrySignal.d.ts +9 -0
  115. package/Types/Cloud/CloudAppTelemetrySignal.js +41 -0
  116. package/Types/Cloud/CloudAppTelemetrySignal.mjs +4 -0
  117. package/Types/Cloud/CloudPlatform.js +7 -1
  118. package/Types/CodeRepository/CodeFileSeen.d.mts +5 -0
  119. package/Types/CodeRepository/CodeFileSeen.d.ts +5 -0
  120. package/Types/CodeRepository/CodeFileSeen.js +142 -27
  121. package/Types/CustomDomain/CustomDomainDnsCheckResult.d.mts +13 -0
  122. package/Types/CustomDomain/CustomDomainDnsCheckResult.d.ts +13 -0
  123. package/Types/CustomDomain/CustomDomainDnsCheckResult.js +80 -0
  124. package/Types/CustomDomain/CustomDomainDnsCheckResult.mjs +2 -0
  125. package/Types/CustomDomain/CustomDomainServerReadiness.d.mts +55 -0
  126. package/Types/CustomDomain/CustomDomainServerReadiness.d.ts +55 -0
  127. package/Types/CustomDomain/CustomDomainServerReadiness.js +199 -0
  128. package/Types/CustomDomain/CustomDomainServerReadiness.mjs +8 -0
  129. package/Types/CustomDomain/DnsRecordCheck.d.mts +34 -0
  130. package/Types/CustomDomain/DnsRecordCheck.d.ts +34 -0
  131. package/Types/CustomDomain/DnsRecordCheck.js +175 -0
  132. package/Types/CustomDomain/DnsRecordCheck.mjs +6 -0
  133. package/Types/CustomDomain/DnsRecordCheckWords.d.mts +35 -0
  134. package/Types/CustomDomain/DnsRecordCheckWords.d.ts +35 -0
  135. package/Types/CustomDomain/DnsRecordCheckWords.js +151 -0
  136. package/Types/CustomDomain/DnsRecordCheckWords.mjs +5 -0
  137. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +1 -0
  138. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +1 -0
  139. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +11 -1
  140. package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +1 -0
  141. package/Types/DataObservability/DataCheckType.d.mts +4 -0
  142. package/Types/DataObservability/DataCheckType.d.ts +4 -0
  143. package/Types/DataObservability/DataCheckType.js +17 -0
  144. package/Types/DataObservability/DataCheckType.mjs +1 -0
  145. package/Types/DataObservability/DataLineageColumnTrail.d.mts +10 -0
  146. package/Types/DataObservability/DataLineageColumnTrail.d.ts +10 -0
  147. package/Types/DataObservability/DataLineageColumnTrail.js +152 -0
  148. package/Types/DataObservability/DataLineageColumnTrail.mjs +4 -0
  149. package/Types/DataObservability/DataLineageExpansion.d.mts +29 -0
  150. package/Types/DataObservability/DataLineageExpansion.d.ts +29 -0
  151. package/Types/DataObservability/DataLineageExpansion.js +166 -0
  152. package/Types/DataObservability/DataLineageExpansion.mjs +4 -0
  153. package/Types/DataObservability/DataObservabilityApiTypes.d.mts +1 -0
  154. package/Types/DataObservability/DataObservabilityApiTypes.d.ts +1 -0
  155. package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
  156. package/Types/DataObservability/DataTableLineage.d.mts +7 -0
  157. package/Types/DataObservability/DataTableLineage.d.ts +7 -0
  158. package/Types/DataObservability/DataTableLineage.js +15 -3
  159. package/Types/DataObservability/DataTableLineage.mjs +1 -0
  160. package/Types/Date.d.mts +22 -0
  161. package/Types/Date.d.ts +22 -0
  162. package/Types/Date.js +72 -3
  163. package/Types/DateLanguage.d.mts +7 -0
  164. package/Types/DateLanguage.d.ts +7 -0
  165. package/Types/DateLanguage.js +44 -1
  166. package/Types/DateLanguage.mjs +1 -0
  167. package/Types/Docs/DocsLanguage.d.mts +2 -0
  168. package/Types/Docs/DocsLanguage.d.ts +2 -0
  169. package/Types/Docs/DocsLanguage.js +23 -1
  170. package/Types/Docs/DocsLanguage.mjs +2 -0
  171. package/Types/Docs/GlossaryTerm.d.mts +82 -0
  172. package/Types/Docs/GlossaryTerm.d.ts +82 -0
  173. package/Types/Docs/GlossaryTerm.js +126 -0
  174. package/Types/Docs/GlossaryTerm.mjs +5 -0
  175. package/Types/Email/AmazonSesAuthenticationType.d.mts +23 -0
  176. package/Types/Email/AmazonSesAuthenticationType.d.ts +23 -0
  177. package/Types/Email/AmazonSesAuthenticationType.js +40 -0
  178. package/Types/Email/AmazonSesAuthenticationType.mjs +4 -0
  179. package/Types/Email/EmailServer.d.mts +2 -0
  180. package/Types/Email/EmailServer.d.ts +2 -0
  181. package/Types/Email/EmailTemplateType.d.mts +1 -0
  182. package/Types/Email/EmailTemplateType.d.ts +1 -0
  183. package/Types/Email/EmailTemplateType.js +2 -0
  184. package/Types/Exception/BadDataExceptionWithDetails.d.mts +6 -0
  185. package/Types/Exception/BadDataExceptionWithDetails.d.ts +6 -0
  186. package/Types/Exception/BadDataExceptionWithDetails.js +20 -0
  187. package/Types/Exception/BadDataExceptionWithDetails.mjs +2 -0
  188. package/Types/Exception/ErrorMessageRule.d.mts +4 -0
  189. package/Types/Exception/ErrorMessageRule.d.ts +4 -0
  190. package/Types/Exception/ErrorMessageRule.js +143 -0
  191. package/Types/Exception/ErrorMessageRule.mjs +5 -0
  192. package/Types/Exception/UnexplainedError.d.mts +45 -0
  193. package/Types/Exception/UnexplainedError.d.ts +45 -0
  194. package/Types/Exception/UnexplainedError.js +179 -0
  195. package/Types/Exception/UnexplainedError.mjs +11 -0
  196. package/Types/Icon/IconProp.d.mts +4 -1
  197. package/Types/Icon/IconProp.d.ts +4 -1
  198. package/Types/Icon/IconProp.js +6 -0
  199. package/Types/InstallationHealth/InstallationHealth.d.mts +122 -0
  200. package/Types/InstallationHealth/InstallationHealth.d.ts +122 -0
  201. package/Types/InstallationHealth/InstallationHealth.js +513 -0
  202. package/Types/InstallationHealth/InstallationHealth.mjs +13 -0
  203. package/Types/LLM/LLMProviderExchange.d.mts +17 -0
  204. package/Types/LLM/LLMProviderExchange.d.ts +17 -0
  205. package/Types/LLM/LLMProviderExchange.js +70 -0
  206. package/Types/LLM/LLMProviderExchange.mjs +5 -0
  207. package/Types/Monitor/CriteriaFilter.d.mts +1 -0
  208. package/Types/Monitor/CriteriaFilter.d.ts +1 -0
  209. package/Types/Monitor/CriteriaFilter.js +3 -1
  210. package/Types/Monitor/CriteriaFilterTerms.js +1 -0
  211. package/Types/Monitor/CriteriaFilterValues.d.mts +2 -0
  212. package/Types/Monitor/CriteriaFilterValues.d.ts +2 -0
  213. package/Types/Monitor/CriteriaFilterValues.js +22 -0
  214. package/Types/Monitor/EvaluationSentence.d.mts +1 -0
  215. package/Types/Monitor/EvaluationSentence.d.ts +1 -0
  216. package/Types/Monitor/EvaluationSentence.js +34 -3
  217. package/Types/Monitor/EvaluationSentence.mjs +1 -0
  218. package/Types/Monitor/RetiredEvaluationTemplates.d.mts +2 -0
  219. package/Types/Monitor/RetiredEvaluationTemplates.d.ts +2 -0
  220. package/Types/Monitor/RetiredEvaluationTemplates.js +95 -0
  221. package/Types/Monitor/RetiredEvaluationTemplates.mjs +3 -0
  222. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.mts +6 -0
  223. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.ts +6 -0
  224. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.js +20 -0
  225. package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.mjs +2 -0
  226. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.mts +6 -0
  227. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.ts +6 -0
  228. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.js +29 -0
  229. package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.mjs +2 -0
  230. package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.mts +7 -0
  231. package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.ts +7 -0
  232. package/Types/Monitor/WhoIsTold.d.mts +165 -0
  233. package/Types/Monitor/WhoIsTold.d.ts +165 -0
  234. package/Types/Monitor/WhoIsTold.js +582 -0
  235. package/Types/Monitor/WhoIsTold.mjs +17 -0
  236. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.mts +6 -0
  237. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +6 -0
  238. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +34 -0
  239. package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -0
  240. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +240 -0
  241. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +240 -0
  242. package/Types/OnCallDutyPolicy/OnCallTestPage.js +574 -0
  243. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +52 -0
  244. package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.mts +31 -0
  245. package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.ts +31 -0
  246. package/Types/OnCallDutyPolicy/OnCallTestPageWords.js +105 -0
  247. package/Types/OnCallDutyPolicy/OnCallTestPageWords.mjs +14 -0
  248. package/Types/PhoneNumberDirection.d.mts +6 -0
  249. package/Types/PhoneNumberDirection.d.ts +6 -0
  250. package/Types/PhoneNumberDirection.js +123 -0
  251. package/Types/PhoneNumberDirection.mjs +6 -0
  252. package/Types/Product/ProductKey.d.mts +58 -0
  253. package/Types/Product/ProductKey.d.ts +58 -0
  254. package/Types/Product/ProductKey.js +175 -0
  255. package/Types/Product/ProductKey.mjs +8 -0
  256. package/Types/Product/ProductPins.d.mts +10 -0
  257. package/Types/Product/ProductPins.d.ts +10 -0
  258. package/Types/Product/ProductPins.js +65 -0
  259. package/Types/Product/ProductPins.mjs +6 -0
  260. package/Types/Product/ProductUsage.d.mts +21 -0
  261. package/Types/Product/ProductUsage.d.ts +21 -0
  262. package/Types/Product/ProductUsage.js +175 -0
  263. package/Types/Product/ProductUsage.mjs +10 -0
  264. package/Types/Product/ProjectProducts.d.mts +60 -0
  265. package/Types/Product/ProjectProducts.d.ts +60 -0
  266. package/Types/Product/ProjectProducts.js +336 -0
  267. package/Types/Product/ProjectProducts.mjs +19 -0
  268. package/Types/Product/ProjectProductsAnswer.d.mts +20 -0
  269. package/Types/Product/ProjectProductsAnswer.d.ts +20 -0
  270. package/Types/Product/ProjectProductsAnswer.js +139 -0
  271. package/Types/Product/ProjectProductsAnswer.mjs +7 -0
  272. package/Types/ProductFeedback/NewGitHubIssue.d.mts +12 -0
  273. package/Types/ProductFeedback/NewGitHubIssue.d.ts +12 -0
  274. package/Types/ProductFeedback/NewGitHubIssue.js +64 -0
  275. package/Types/ProductFeedback/NewGitHubIssue.mjs +5 -0
  276. package/Types/ProductFeedback/ProductFeedback.d.mts +140 -0
  277. package/Types/ProductFeedback/ProductFeedback.d.ts +140 -0
  278. package/Types/ProductFeedback/ProductFeedback.js +517 -0
  279. package/Types/ProductFeedback/ProductFeedback.mjs +49 -0
  280. package/Types/ReadingDirection.d.mts +2 -0
  281. package/Types/ReadingDirection.d.ts +2 -0
  282. package/Types/ReadingDirection.js +83 -2
  283. package/Types/ReadingDirection.mjs +2 -0
  284. package/Types/Recommendation/RecommendationType.d.mts +2 -1
  285. package/Types/Recommendation/RecommendationType.d.ts +2 -1
  286. package/Types/Recommendation/RecommendationType.js +6 -0
  287. package/Types/Reminder/ReminderInterval.d.mts +7 -0
  288. package/Types/Reminder/ReminderInterval.d.ts +7 -0
  289. package/Types/Reminder/ReminderInterval.js +110 -0
  290. package/Types/Reminder/ReminderInterval.mjs +8 -0
  291. package/Types/Retention/ResolvedRecordRetention.d.mts +19 -0
  292. package/Types/Retention/ResolvedRecordRetention.d.ts +19 -0
  293. package/Types/Retention/ResolvedRecordRetention.js +124 -0
  294. package/Types/Retention/ResolvedRecordRetention.mjs +14 -0
  295. package/Types/RollingTime/RollingTimeUtil.d.mts +1 -0
  296. package/Types/RollingTime/RollingTimeUtil.d.ts +1 -0
  297. package/Types/RollingTime/RollingTimeUtil.js +9 -0
  298. package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +108 -101
  299. package/Types/ServerSending/ServerSendingStatus.d.mts +69 -0
  300. package/Types/ServerSending/ServerSendingStatus.d.ts +69 -0
  301. package/Types/ServerSending/ServerSendingStatus.js +281 -0
  302. package/Types/ServerSending/ServerSendingStatus.mjs +7 -0
  303. package/Types/ServerSending/ServerSendingWords.d.mts +9 -0
  304. package/Types/ServerSending/ServerSendingWords.d.ts +9 -0
  305. package/Types/ServerSending/ServerSendingWords.js +95 -0
  306. package/Types/ServerSending/ServerSendingWords.mjs +7 -0
  307. package/Types/ServerSetup/ServerSetupChecklist.d.mts +172 -0
  308. package/Types/ServerSetup/ServerSetupChecklist.d.ts +172 -0
  309. package/Types/ServerSetup/ServerSetupChecklist.js +735 -0
  310. package/Types/ServerSetup/ServerSetupChecklist.mjs +12 -0
  311. package/Types/ServerSetup/ServerTestSend.d.mts +35 -0
  312. package/Types/ServerSetup/ServerTestSend.d.ts +35 -0
  313. package/Types/ServerSetup/ServerTestSend.js +160 -0
  314. package/Types/ServerSetup/ServerTestSend.mjs +10 -0
  315. package/Types/SetupHealth/SetupHealth.d.mts +283 -0
  316. package/Types/SetupHealth/SetupHealth.d.ts +283 -0
  317. package/Types/SetupHealth/SetupHealth.js +1047 -0
  318. package/Types/SetupHealth/SetupHealth.mjs +46 -0
  319. package/Types/StatusPage/StatusPageSummary.d.mts +1 -0
  320. package/Types/StatusPage/StatusPageSummary.d.ts +1 -0
  321. package/Types/StatusPage/StatusPageSummary.js +3 -0
  322. package/Types/StatusPage/UptimeDailyAggregate.d.mts +25 -0
  323. package/Types/StatusPage/UptimeDailyAggregate.d.ts +25 -0
  324. package/Types/Telemetry/LlmCallKind.js +1 -1
  325. package/Types/Telemetry/TelemetryIngestionBudget.d.mts +1 -0
  326. package/Types/Telemetry/TelemetryIngestionBudget.d.ts +1 -0
  327. package/Types/Telemetry/TelemetryIngestionBudget.js +135 -2
  328. package/Types/Telemetry/TelemetryIngestionBudget.mjs +1 -0
  329. package/Types/ToolImport/ToolImportCatalog.d.mts +1 -0
  330. package/Types/ToolImport/ToolImportCatalog.d.ts +1 -0
  331. package/Types/ToolImport/ToolImportCatalog.js +54 -1
  332. package/Types/ToolImport/ToolImportCatalog.mjs +1 -0
  333. package/Types/Translator.js +64 -31
  334. package/Types/UserNotification/UserNotificationEventType.d.mts +2 -1
  335. package/Types/UserNotification/UserNotificationEventType.d.ts +2 -1
  336. package/Types/UserNotification/UserNotificationEventType.js +7 -0
  337. package/Types/UserSession/SessionEndCause.d.mts +17 -0
  338. package/Types/UserSession/SessionEndCause.d.ts +17 -0
  339. package/Types/UserSession/SessionEndCause.js +79 -0
  340. package/Types/UserSession/SessionEndCause.mjs +6 -0
  341. package/Types/UserSession/SessionSignIn.d.mts +44 -0
  342. package/Types/UserSession/SessionSignIn.d.ts +44 -0
  343. package/Types/UserSession/SessionSignIn.js +174 -0
  344. package/Types/UserSession/SessionSignIn.mjs +17 -0
  345. package/Types/WelcomeChecklist/ProjectGoal.d.mts +16 -0
  346. package/Types/WelcomeChecklist/ProjectGoal.d.ts +16 -0
  347. package/Types/WelcomeChecklist/ProjectGoal.js +94 -0
  348. package/Types/WelcomeChecklist/ProjectGoal.mjs +8 -0
  349. package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +76 -0
  350. package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +76 -0
  351. package/Types/WelcomeChecklist/WelcomeChecklist.js +344 -0
  352. package/Types/WelcomeChecklist/WelcomeChecklist.mjs +19 -0
  353. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +24 -0
  354. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +24 -0
  355. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +136 -0
  356. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.mjs +9 -0
  357. package/Types/WelcomeChecklist/WelcomeChecklistState.d.mts +27 -0
  358. package/Types/WelcomeChecklist/WelcomeChecklistState.d.ts +27 -0
  359. package/Types/WelcomeChecklist/WelcomeChecklistState.js +183 -0
  360. package/Types/WelcomeChecklist/WelcomeChecklistState.mjs +13 -0
  361. package/Types/Workflow/Documentation/AIDocumentation.js +1 -1
  362. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.mts +7 -0
  363. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.ts +7 -0
  364. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.js +40 -0
  365. package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.mjs +3 -0
  366. package/Types/Workspace/WorkspaceChannelMembers.d.mts +1 -0
  367. package/Types/Workspace/WorkspaceChannelMembers.d.ts +1 -0
  368. package/Types/Workspace/WorkspaceChannelMembers.js +9 -2
  369. package/UI/Components/Dropdown/Dropdown.d.mts +1 -0
  370. package/UI/Components/Dropdown/Dropdown.d.ts +1 -0
  371. package/Utils/API.js +10 -0
  372. package/Utils/Dashboard/DashboardWidgetSorts.js +25 -4
  373. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +37 -0
  374. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +37 -0
  375. package/Utils/Dashboard/MonitorListWidgetFormat.js +86 -0
  376. package/Utils/Dashboard/MonitorListWidgetFormat.mjs +10 -0
  377. package/Utils/GuidedSetup/OnCallPolicyRecords.d.mts +31 -0
  378. package/Utils/GuidedSetup/OnCallPolicyRecords.d.ts +31 -0
  379. package/Utils/GuidedSetup/OnCallPolicyRecords.js +89 -0
  380. package/Utils/GuidedSetup/OnCallPolicyRecords.mjs +6 -0
  381. package/Utils/GuidedSetup/StatusPageRecords.d.mts +36 -0
  382. package/Utils/GuidedSetup/StatusPageRecords.d.ts +36 -0
  383. package/Utils/GuidedSetup/StatusPageRecords.js +105 -0
  384. package/Utils/GuidedSetup/StatusPageRecords.mjs +6 -0
  385. package/Utils/GuidedSetup/WebsiteMonitorRecords.d.mts +41 -0
  386. package/Utils/GuidedSetup/WebsiteMonitorRecords.d.ts +41 -0
  387. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +204 -0
  388. package/Utils/GuidedSetup/WebsiteMonitorRecords.mjs +9 -0
  389. package/Utils/Markdown/InlineImageDataUri.d.mts +9 -0
  390. package/Utils/Markdown/InlineImageDataUri.d.ts +9 -0
  391. package/Utils/Markdown/InlineImageDataUri.js +17 -1
  392. package/Utils/Markdown/InlineImageDataUri.mjs +1 -0
  393. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +12 -0
  394. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +12 -0
  395. package/Utils/Markdown/LinkReferenceDefinitions.js +539 -0
  396. package/Utils/Markdown/LinkReferenceDefinitions.mjs +4 -0
  397. package/Utils/Monitor/ExternalStatusPageReading.d.mts +9 -0
  398. package/Utils/Monitor/ExternalStatusPageReading.d.ts +9 -0
  399. package/Utils/Monitor/ExternalStatusPageReading.js +77 -8
  400. package/Utils/Monitor/ExternalStatusPageReading.mjs +3 -0
  401. package/Utils/Monitor/ExternalStatusPageScope.js +17 -1
  402. package/Utils/Monitor/MonitorDestinationUtil.js +2 -1
  403. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +2 -1
  404. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +2 -1
  405. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +10 -1
  406. package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +1 -0
  407. package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +1 -0
  408. package/Utils/Monitor/MonitorStatusHistoryUtil.js +1 -0
  409. package/Utils/Monitor/MonitorSummaryProbeUtil.d.mts +2 -0
  410. package/Utils/Monitor/MonitorSummaryProbeUtil.d.ts +2 -0
  411. package/Utils/Monitor/MonitorSummaryProbeUtil.js +13 -17
  412. package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -3
  413. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +1 -1
  414. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +1 -1
  415. package/Utils/Monitor/MonitorUptimeSummaryUtil.js +1 -0
  416. package/Utils/Monitor/MonitoringOff.d.mts +20 -0
  417. package/Utils/Monitor/MonitoringOff.d.ts +20 -0
  418. package/Utils/Monitor/MonitoringOff.js +81 -0
  419. package/Utils/Monitor/MonitoringOff.mjs +4 -0
  420. package/Utils/Monitor/NotOperationalMonitorQuery.js +9 -7
  421. package/Utils/Monitor/StateChangeLogScreenshots.d.mts +8 -0
  422. package/Utils/Monitor/StateChangeLogScreenshots.d.ts +8 -0
  423. package/Utils/Monitor/StateChangeLogScreenshots.js +116 -0
  424. package/Utils/Monitor/StateChangeLogScreenshots.mjs +3 -0
  425. package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +1 -1
  426. package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +1 -1
  427. package/Utils/NetworkDevice/Naming/NamingLookup.js +14 -4
  428. package/Utils/NetworkDevice/Naming/NamingLookup.mjs +1 -0
  429. package/Utils/Slo/SloErrorBudgetPolicy.d.mts +2 -1
  430. package/Utils/Slo/SloErrorBudgetPolicy.d.ts +2 -1
  431. package/Utils/Slo/SloErrorBudgetPolicy.js +8 -2
  432. package/Utils/Slo/SloListWidgetFormat.d.mts +7 -1
  433. package/Utils/Slo/SloListWidgetFormat.d.ts +7 -1
  434. package/Utils/Slo/SloListWidgetFormat.js +20 -26
  435. package/Utils/Slo/SloOverviewText.d.mts +6 -1
  436. package/Utils/Slo/SloOverviewText.d.ts +6 -1
  437. package/Utils/Slo/SloOverviewText.js +3 -3
  438. package/Utils/Slo/SloUtil.d.mts +18 -9
  439. package/Utils/Slo/SloUtil.d.ts +18 -9
  440. package/Utils/Slo/SloUtil.js +47 -10
  441. package/Utils/Slo/SloWidgetFormat.d.mts +69 -11
  442. package/Utils/Slo/SloWidgetFormat.d.ts +69 -11
  443. package/Utils/Slo/SloWidgetFormat.js +198 -50
  444. package/Utils/Slo/SloWidgetFormat.mjs +7 -0
  445. package/Utils/StatusPage/FrozenMonitorResources.d.mts +41 -0
  446. package/Utils/StatusPage/FrozenMonitorResources.d.ts +41 -0
  447. package/Utils/StatusPage/FrozenMonitorResources.js +155 -0
  448. package/Utils/StatusPage/FrozenMonitorResources.mjs +4 -0
  449. package/Utils/StatusPage/GroupNestingLayout.d.mts +2 -0
  450. package/Utils/StatusPage/GroupNestingLayout.d.ts +2 -0
  451. package/Utils/StatusPage/GroupNestingLayout.js +12 -0
  452. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.mts +48 -0
  453. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.ts +48 -0
  454. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.js +181 -0
  455. package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.mjs +2 -0
  456. package/Utils/StatusPage/ResourceExplorer.d.mts +1 -0
  457. package/Utils/StatusPage/ResourceExplorer.d.ts +1 -0
  458. package/Utils/StatusPage/ResourceExplorer.js +11 -1
  459. package/Utils/StatusPage/ResourceUptime.d.mts +6 -1
  460. package/Utils/StatusPage/ResourceUptime.d.ts +6 -1
  461. package/Utils/StatusPage/ResourceUptime.js +31 -6
  462. package/Utils/StatusPage/StatusPageSummaryBuilder.d.mts +1 -0
  463. package/Utils/StatusPage/StatusPageSummaryBuilder.d.ts +1 -0
  464. package/Utils/StatusPage/StatusPageSummaryBuilder.js +12 -1
  465. package/Utils/StatusPage/StatusPageUptimeTimezone.d.mts +41 -0
  466. package/Utils/StatusPage/StatusPageUptimeTimezone.d.ts +41 -0
  467. package/Utils/StatusPage/StatusPageUptimeTimezone.js +114 -0
  468. package/Utils/StatusPage/StatusPageUptimeTimezone.mjs +2 -0
  469. package/Utils/StatusPage/UptimeDailyAggregateUtil.d.mts +3 -1
  470. package/Utils/StatusPage/UptimeDailyAggregateUtil.d.ts +3 -1
  471. package/Utils/StatusPage/UptimeDailyAggregateUtil.js +69 -50
  472. package/Utils/Telemetry/CloudInstanceIdentity.js +12 -7
  473. package/Utils/Uptime/DayUptimeGraphUtil.d.mts +8 -0
  474. package/Utils/Uptime/DayUptimeGraphUtil.d.ts +8 -0
  475. package/Utils/Uptime/DayUptimeGraphUtil.js +41 -6
  476. package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +3 -0
  477. package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +3 -0
  478. package/Utils/Uptime/UptimeMaintenanceUtil.js +49 -0
  479. package/Utils/Uptime/UptimeUtil.d.mts +38 -1
  480. package/Utils/Uptime/UptimeUtil.d.ts +38 -1
  481. package/Utils/Uptime/UptimeUtil.js +270 -75
  482. package/Utils/Uptime/WorstStatusTimeline.d.mts +31 -0
  483. package/Utils/Uptime/WorstStatusTimeline.d.ts +31 -0
  484. package/Utils/Uptime/WorstStatusTimeline.js +190 -0
  485. package/Utils/Uptime/WorstStatusTimeline.mjs +2 -0
  486. package/Utils/Workspace/WorkspaceSummarySetup.d.mts +25 -0
  487. package/Utils/Workspace/WorkspaceSummarySetup.d.ts +25 -0
  488. package/Utils/Workspace/WorkspaceSummarySetup.js +215 -0
  489. package/Utils/Workspace/WorkspaceSummarySetup.mjs +11 -0
  490. package/package.json +1 -1
  491. package/Utils/StatusPage/ArchivedMonitorResources.d.mts +0 -10
  492. package/Utils/StatusPage/ArchivedMonitorResources.d.ts +0 -10
  493. package/Utils/StatusPage/ArchivedMonitorResources.js +0 -33
  494. package/Utils/StatusPage/ArchivedMonitorResources.mjs +0 -2
@@ -3,9 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.formatSloChartValue = exports.getSloChartAggregationInterval = exports.getSloWidgetTileDisplay = exports.getSloWidgetTitle = exports.getSloHistoryMetricName = exports.getSloMetricLabel = exports.formatErrorBudgetRemainingSeconds = exports.formatSloBurnRate = exports.formatSloPercent = exports.SLO_NOT_EVALUATED_TEXT = void 0;
6
+ exports.formatSloChartValue = exports.getSloChartAggregationInterval = exports.getSloWidgetTileDisplay = exports.formatSloTargetSubline = exports.getSloWidgetTitle = exports.getSloWidgetTitleSentence = exports.getSloHistoryMetricName = exports.getSloMetricLabel = exports.formatErrorBudgetRemainingSeconds = exports.formatSloBurnRate = exports.formatSloPercent = exports.formatSloNumber = exports.BURN_RATE_DECIMALS = exports.BUDGET_PERCENT_DECIMALS = exports.SLI_DECIMALS = exports.SLO_TARGET_SUBLINE_TEMPLATE = exports.SLO_NOT_EVALUATED_TEXT = void 0;
7
7
  const AggregationInterval_1 = __importDefault(require("../../Types/BaseDatabase/AggregationInterval"));
8
8
  const DashboardSloComponent_1 = require("../../Types/Dashboard/DashboardComponents/DashboardSloComponent");
9
+ const DateLanguage_1 = require("../../Types/DateLanguage");
10
+ const ReadingDirection_1 = require("../../Types/ReadingDirection");
11
+ const Translator_1 = require("../../Types/Translator");
9
12
  /**
10
13
  * Pure value/label derivation for the dashboard SLO widget.
11
14
  *
@@ -17,13 +20,57 @@ const DashboardSloComponent_1 = require("../../Types/Dashboard/DashboardComponen
17
20
  * The worker-maintained state columns on ServiceLevelObjective are NULL
18
21
  * until the SLO is first evaluated, so every entry point must be able to
19
22
  * answer "not evaluated yet" instead of rendering "null%" or "NaN%".
23
+ *
24
+ * Each helper takes the reader's Translator as an optional last argument
25
+ * (the Dashboard passes useTranslator()). With one, a figure is written the
26
+ * way the reader's language writes it - "99,874 %" in German, "۹۹٫۸۷۴٪" in
27
+ * Persian, Latin digits in Arabic (DateLanguage's LATIN_DIGIT_LANGUAGES) -
28
+ * and the words are the reader's: each is a key of the Dashboard's locales,
29
+ * read from this file by the extractor (SOURCE_ROOTS in
30
+ * scripts/i18n/ExtractStrings.ts), which reads only what the file marks.
31
+ * Without one, and for an English reader, every text reads exactly as it
32
+ * always did: what the API, Terraform, the server and a unit test get.
20
33
  */
21
34
  /** Shown in place of a number whenever the SLO has no evaluated state. */
22
- exports.SLO_NOT_EVALUATED_TEXT = "Not evaluated yet";
35
+ exports.SLO_NOT_EVALUATED_TEXT = (0, Translator_1.translationKey)("Not evaluated yet");
23
36
  /** U+2212 MINUS SIGN — reads as a minus rather than a hyphen at tile sizes. */
24
37
  const MINUS_SIGN = "−";
25
38
  /** U+00D7 MULTIPLICATION SIGN — burn rate is a multiplier ("3.2×"). */
26
39
  const MULTIPLICATION_SIGN = "×";
40
+ /*
41
+ * U+200E LEFT-TO-RIGHT MARK. On a page read right to left the burn rate's
42
+ * sign is set between two of them, as Intl sets Arabic's percent sign (a
43
+ * mark on each side of the "%"): the sign then stays after its figure,
44
+ * where the percentages beside it keep theirs - "14.4×" in a tile, a table
45
+ * cell and after a rule's name ("Fast burn 14.4×"), never "×14.4" or
46
+ * "×Fast burn 14.4", which the bidi algorithm draws for a bare "×" at the
47
+ * end of a line read right to left.
48
+ */
49
+ const LEFT_TO_RIGHT_MARK = String.fromCharCode(0x200e);
50
+ /*
51
+ * The line under the error budget: "43 min remaining", "−42 min over
52
+ * budget". Each case is a whole sentence of its own, so a language words
53
+ * it its way - and counts its minutes its way, which is why the forms are
54
+ * plurals even where English writes "min" for any count.
55
+ */
56
+ const MINUTES_REMAINING = {
57
+ one: (0, Translator_1.translationKey)("{{count}} min remaining"),
58
+ other: (0, Translator_1.translationKey)("{{count}} min remaining"),
59
+ };
60
+ const MINUTES_OVER_BUDGET = {
61
+ one: (0, Translator_1.translationKey)("−{{count}} min over budget"),
62
+ other: (0, Translator_1.translationKey)("−{{count}} min over budget"),
63
+ };
64
+ const UNDER_A_MINUTE_REMAINING = (0, Translator_1.translationKey)("under 1 min remaining");
65
+ const UNDER_A_MINUTE_OVER_BUDGET = (0, Translator_1.translationKey)("under 1 min over budget");
66
+ /** "target 99.9%": the line under an SLI, on the widget and the SLO list. */
67
+ exports.SLO_TARGET_SUBLINE_TEMPLATE = (0, Translator_1.translationKey)("target {{target}}");
68
+ /*
69
+ * The widget's title is the SLO's name and the metric's label: a name as
70
+ * written, set apart from the line where it reads the other way (an English
71
+ * name on an Arabic dashboard), and the label in the reader's words.
72
+ */
73
+ const TITLE_OPTIONS = { setsValuesApart: true };
27
74
  const toFiniteNumber = (value) => {
28
75
  if (typeof value !== "number" || !isFinite(value)) {
29
76
  return null;
@@ -39,60 +86,124 @@ const roundToDecimals = (value, maxDecimals) => {
39
86
  return Math.round(value * factor) / factor + 0;
40
87
  };
41
88
  /**
42
- * SLI is quoted to three decimals to match the SLO pages — the digits
43
- * past the second matter at 99.99x targets. Error budget remaining is a
44
- * coarse gauge, so one decimal is enough; the precise number lives in the
89
+ * SLI is quoted to three decimals to match the SLO pages — the digits past
90
+ * the second matter at 99.99x targets. Error budget remaining is a coarse
91
+ * gauge, so one decimal is enough; the precise number lives in the
45
92
  * seconds subline.
46
93
  */
47
- const SLI_DECIMALS = 3;
48
- const BUDGET_PERCENT_DECIMALS = 1;
49
- const BURN_RATE_DECIMALS = 2;
50
- const formatSloPercent = (value, maxDecimals) => {
94
+ exports.SLI_DECIMALS = 3;
95
+ exports.BUDGET_PERCENT_DECIMALS = 1;
96
+ exports.BURN_RATE_DECIMALS = 2;
97
+ /*
98
+ * One Intl format per language, kind and precision: the SLO pages write the
99
+ * same few figures many times on every render.
100
+ */
101
+ const figureFormats = new Map();
102
+ const writeFigureInLanguage = (figure, language) => {
103
+ const key = [
104
+ language,
105
+ figure.isPercent ? "percent" : "decimal",
106
+ figure.maxDecimals,
107
+ ].join("|");
108
+ if (!figureFormats.has(key)) {
109
+ let format = null;
110
+ try {
111
+ format = new Intl.NumberFormat((0, DateLanguage_1.getNumberLocale)(language), {
112
+ style: figure.isPercent ? "percent" : "decimal",
113
+ maximumFractionDigits: figure.maxDecimals,
114
+ });
115
+ }
116
+ catch (_a) {
117
+ format = null;
118
+ }
119
+ figureFormats.set(key, format);
120
+ }
121
+ const format = figureFormats.get(key) || null;
122
+ if (!format) {
123
+ return null;
124
+ }
125
+ return format.format(figure.isPercent ? figure.rounded / 100 : figure.rounded);
126
+ };
127
+ const writeFigure = (figure, translator) => {
128
+ var _a;
129
+ const plain = `${figure.rounded}${figure.isPercent ? "%" : ""}`;
130
+ if (!translator || (0, DateLanguage_1.isEnglishDateLanguage)(translator.language)) {
131
+ return plain;
132
+ }
133
+ return (_a = writeFigureInLanguage(figure, translator.language)) !== null && _a !== void 0 ? _a : plain;
134
+ };
135
+ const formatSloNumber = (value, maxDecimals, translator) => {
51
136
  const numericValue = toFiniteNumber(value);
52
137
  if (numericValue === null) {
53
138
  return null;
54
139
  }
55
- return `${roundToDecimals(numericValue, maxDecimals !== null && maxDecimals !== void 0 ? maxDecimals : SLI_DECIMALS)}%`;
140
+ return writeFigure({
141
+ rounded: roundToDecimals(numericValue, maxDecimals),
142
+ maxDecimals: maxDecimals,
143
+ isPercent: false,
144
+ }, translator);
56
145
  };
57
- exports.formatSloPercent = formatSloPercent;
58
- const formatSloBurnRate = (value) => {
146
+ exports.formatSloNumber = formatSloNumber;
147
+ const formatSloPercent = (value, maxDecimals, translator) => {
59
148
  const numericValue = toFiniteNumber(value);
60
149
  if (numericValue === null) {
61
150
  return null;
62
151
  }
63
- return `${roundToDecimals(numericValue, BURN_RATE_DECIMALS)}${MULTIPLICATION_SIGN}`;
152
+ const decimals = maxDecimals !== null && maxDecimals !== void 0 ? maxDecimals : exports.SLI_DECIMALS;
153
+ return writeFigure({
154
+ rounded: roundToDecimals(numericValue, decimals),
155
+ maxDecimals: decimals,
156
+ isPercent: true,
157
+ }, translator);
158
+ };
159
+ exports.formatSloPercent = formatSloPercent;
160
+ const formatSloBurnRate = (value, translator) => {
161
+ const figure = (0, exports.formatSloNumber)(value, exports.BURN_RATE_DECIMALS, translator);
162
+ if (figure === null) {
163
+ return null;
164
+ }
165
+ return translator && (0, ReadingDirection_1.isRightToLeftLanguage)(translator.language)
166
+ ? `${figure}${LEFT_TO_RIGHT_MARK}${MULTIPLICATION_SIGN}${LEFT_TO_RIGHT_MARK}`
167
+ : `${figure}${MULTIPLICATION_SIGN}`;
64
168
  };
65
169
  exports.formatSloBurnRate = formatSloBurnRate;
66
- const formatErrorBudgetRemainingSeconds = (seconds) => {
170
+ const formatErrorBudgetRemainingSeconds = (seconds, translator) => {
67
171
  const numericSeconds = toFiniteNumber(seconds);
68
172
  if (numericSeconds === null) {
69
173
  return null;
70
174
  }
71
175
  const isOverBudget = numericSeconds < 0;
72
- const suffix = isOverBudget ? "over budget" : "remaining";
73
176
  const minutes = Math.round(Math.abs(numericSeconds) / 60);
74
- if (minutes === 0) {
75
- /*
76
- * Exactly zero is a real state worth stating; a sub-30-second
77
- * remainder would otherwise round to a misleading "0 min".
78
- */
79
- if (numericSeconds === 0) {
80
- return `0 min ${suffix}`;
81
- }
82
- return `under 1 min ${suffix}`;
177
+ /*
178
+ * Exactly zero is a real state worth stating ("0 min remaining"); a
179
+ * sub-30-second remainder would otherwise round to a misleading "0 min".
180
+ */
181
+ if (minutes === 0 && numericSeconds !== 0) {
182
+ const underAMinute = isOverBudget
183
+ ? UNDER_A_MINUTE_OVER_BUDGET
184
+ : UNDER_A_MINUTE_REMAINING;
185
+ return translator
186
+ ? translator.translateText(underAMinute) || underAMinute
187
+ : underAMinute;
83
188
  }
84
- return `${isOverBudget ? MINUS_SIGN : ""}${minutes} min ${suffix}`;
189
+ if (!translator) {
190
+ return `${isOverBudget ? MINUS_SIGN : ""}${minutes} min ${isOverBudget ? "over budget" : "remaining"}`;
191
+ }
192
+ return translator.translatePlural(isOverBudget ? MINUTES_OVER_BUDGET : MINUTES_REMAINING, minutes, {
193
+ count: writeFigure({ rounded: minutes, maxDecimals: 0, isPercent: false }, translator),
194
+ });
85
195
  };
86
196
  exports.formatErrorBudgetRemainingSeconds = formatErrorBudgetRemainingSeconds;
87
- const getSloMetricLabel = (sloMetric) => {
197
+ const getSloMetricLabel = (sloMetric, translator) => {
198
+ // Sli is the default metric, so it is also the fallback label.
199
+ let label = (0, Translator_1.translationKey)("SLI");
88
200
  if (sloMetric === DashboardSloComponent_1.SloWidgetMetric.ErrorBudgetRemaining) {
89
- return "Error Budget Remaining";
201
+ label = (0, Translator_1.translationKey)("Error Budget Remaining");
90
202
  }
91
- if (sloMetric === DashboardSloComponent_1.SloWidgetMetric.BurnRate) {
92
- return "Burn Rate";
203
+ else if (sloMetric === DashboardSloComponent_1.SloWidgetMetric.BurnRate) {
204
+ label = (0, Translator_1.translationKey)("Burn Rate");
93
205
  }
94
- // Sli is the default metric, so it is also the fallback label.
95
- return "SLI";
206
+ return translator ? translator.translateText(label) || label : label;
96
207
  };
97
208
  exports.getSloMetricLabel = getSloMetricLabel;
98
209
  const getSloHistoryMetricName = (sloMetric) => {
@@ -105,25 +216,63 @@ const getSloHistoryMetricName = (sloMetric) => {
105
216
  return "sli.percent";
106
217
  };
107
218
  exports.getSloHistoryMetricName = getSloHistoryMetricName;
108
- const getSloWidgetTitle = (data) => {
219
+ /*
220
+ * Null for a header of one piece: the author's own title on a pinned
221
+ * widget, or the metric's label before the SLO's name is known.
222
+ */
223
+ const getSloWidgetTitleSentence = (data) => {
109
224
  const trimmedTitle = (data.widgetTitle || "").trim();
110
225
  const trimmedName = (data.sloName || "").trim();
226
+ if (!trimmedName || (trimmedTitle && !data.followsSelection)) {
227
+ return null;
228
+ }
111
229
  if (trimmedTitle) {
112
- return data.followsSelection && trimmedName
113
- ? `${trimmedName} · ${trimmedTitle}`
114
- : trimmedTitle;
230
+ return {
231
+ template: "{{name}} · {{title}}",
232
+ name: trimmedName,
233
+ values: { title: trimmedTitle },
234
+ };
115
235
  }
116
- const metricLabel = (0, exports.getSloMetricLabel)(data.sloMetric);
117
- if (!trimmedName) {
118
- return metricLabel;
236
+ return {
237
+ template: "{{name}} · {{metric}}",
238
+ name: trimmedName,
239
+ values: { metric: (0, exports.getSloMetricLabel)(data.sloMetric, data.translator) },
240
+ };
241
+ };
242
+ exports.getSloWidgetTitleSentence = getSloWidgetTitleSentence;
243
+ const getSloWidgetTitle = (data) => {
244
+ const translator = data.translator;
245
+ const sentence = (0, exports.getSloWidgetTitleSentence)(data);
246
+ if (!sentence) {
247
+ return ((data.widgetTitle || "").trim() ||
248
+ (0, exports.getSloMetricLabel)(data.sloMetric, translator));
119
249
  }
120
- return `${trimmedName} · ${metricLabel}`;
250
+ const values = Object.assign({ name: sentence.name }, sentence.values);
251
+ return translator
252
+ ? translator.translateTemplate(sentence.template, values, TITLE_OPTIONS)
253
+ : (0, Translator_1.fillTemplate)(sentence.template, values);
121
254
  };
122
255
  exports.getSloWidgetTitle = getSloWidgetTitle;
256
+ const formatSloTargetSubline = (targetPercentage, translator) => {
257
+ const target = (0, exports.formatSloPercent)(targetPercentage, exports.SLI_DECIMALS, translator);
258
+ if (target === null) {
259
+ return null;
260
+ }
261
+ return translator
262
+ ? translator.translateTemplate(exports.SLO_TARGET_SUBLINE_TEMPLATE, {
263
+ target: target,
264
+ })
265
+ : `target ${target}`;
266
+ };
267
+ exports.formatSloTargetSubline = formatSloTargetSubline;
123
268
  const getSloWidgetTileDisplay = (data) => {
269
+ const translator = data.translator;
124
270
  const notEvaluated = {
125
271
  isEvaluated: false,
126
- value: exports.SLO_NOT_EVALUATED_TEXT,
272
+ value: translator
273
+ ? translator.translateText(exports.SLO_NOT_EVALUATED_TEXT) ||
274
+ exports.SLO_NOT_EVALUATED_TEXT
275
+ : exports.SLO_NOT_EVALUATED_TEXT,
127
276
  subline: null,
128
277
  };
129
278
  const slo = data.slo;
@@ -131,18 +280,18 @@ const getSloWidgetTileDisplay = (data) => {
131
280
  return notEvaluated;
132
281
  }
133
282
  if (data.sloMetric === DashboardSloComponent_1.SloWidgetMetric.ErrorBudgetRemaining) {
134
- const value = (0, exports.formatSloPercent)(slo.errorBudgetRemainingPercentage, BUDGET_PERCENT_DECIMALS);
283
+ const value = (0, exports.formatSloPercent)(slo.errorBudgetRemainingPercentage, exports.BUDGET_PERCENT_DECIMALS, translator);
135
284
  if (value === null) {
136
285
  return notEvaluated;
137
286
  }
138
287
  return {
139
288
  isEvaluated: true,
140
289
  value: value,
141
- subline: (0, exports.formatErrorBudgetRemainingSeconds)(slo.errorBudgetRemainingSeconds),
290
+ subline: (0, exports.formatErrorBudgetRemainingSeconds)(slo.errorBudgetRemainingSeconds, translator),
142
291
  };
143
292
  }
144
293
  if (data.sloMetric === DashboardSloComponent_1.SloWidgetMetric.BurnRate) {
145
- const value = (0, exports.formatSloBurnRate)(slo.currentBurnRate);
294
+ const value = (0, exports.formatSloBurnRate)(slo.currentBurnRate, translator);
146
295
  if (value === null) {
147
296
  return notEvaluated;
148
297
  }
@@ -153,15 +302,14 @@ const getSloWidgetTileDisplay = (data) => {
153
302
  };
154
303
  }
155
304
  // Sli (also the default when the argument was never set).
156
- const value = (0, exports.formatSloPercent)(slo.currentSliPercentage, SLI_DECIMALS);
305
+ const value = (0, exports.formatSloPercent)(slo.currentSliPercentage, exports.SLI_DECIMALS, translator);
157
306
  if (value === null) {
158
307
  return notEvaluated;
159
308
  }
160
- const target = (0, exports.formatSloPercent)(slo.targetPercentage, SLI_DECIMALS);
161
309
  return {
162
310
  isEvaluated: true,
163
311
  value: value,
164
- subline: target === null ? null : `target ${target}`,
312
+ subline: (0, exports.formatSloTargetSubline)(slo.targetPercentage, translator),
165
313
  };
166
314
  };
167
315
  exports.getSloWidgetTileDisplay = getSloWidgetTileDisplay;
@@ -178,13 +326,13 @@ const getSloChartAggregationInterval = (rangeInMinutes) => {
178
326
  return AggregationInterval_1.default.Day;
179
327
  };
180
328
  exports.getSloChartAggregationInterval = getSloChartAggregationInterval;
181
- const formatSloChartValue = (sloMetric, value) => {
329
+ const formatSloChartValue = (sloMetric, value, translator) => {
182
330
  if (sloMetric === DashboardSloComponent_1.SloWidgetMetric.BurnRate) {
183
- return (0, exports.formatSloBurnRate)(value) || "";
331
+ return (0, exports.formatSloBurnRate)(value, translator) || "";
184
332
  }
185
333
  if (sloMetric === DashboardSloComponent_1.SloWidgetMetric.ErrorBudgetRemaining) {
186
- return (0, exports.formatSloPercent)(value, BUDGET_PERCENT_DECIMALS) || "";
334
+ return (0, exports.formatSloPercent)(value, exports.BUDGET_PERCENT_DECIMALS, translator) || "";
187
335
  }
188
- return (0, exports.formatSloPercent)(value, SLI_DECIMALS) || "";
336
+ return (0, exports.formatSloPercent)(value, exports.SLI_DECIMALS, translator) || "";
189
337
  };
190
338
  exports.formatSloChartValue = formatSloChartValue;
@@ -1,11 +1,18 @@
1
1
  import commonJsModule from "./SloWidgetFormat.js";
2
+ export const BUDGET_PERCENT_DECIMALS = commonJsModule.BUDGET_PERCENT_DECIMALS;
3
+ export const BURN_RATE_DECIMALS = commonJsModule.BURN_RATE_DECIMALS;
4
+ export const SLI_DECIMALS = commonJsModule.SLI_DECIMALS;
2
5
  export const SLO_NOT_EVALUATED_TEXT = commonJsModule.SLO_NOT_EVALUATED_TEXT;
6
+ export const SLO_TARGET_SUBLINE_TEMPLATE = commonJsModule.SLO_TARGET_SUBLINE_TEMPLATE;
3
7
  export const formatErrorBudgetRemainingSeconds = commonJsModule.formatErrorBudgetRemainingSeconds;
4
8
  export const formatSloBurnRate = commonJsModule.formatSloBurnRate;
5
9
  export const formatSloChartValue = commonJsModule.formatSloChartValue;
10
+ export const formatSloNumber = commonJsModule.formatSloNumber;
6
11
  export const formatSloPercent = commonJsModule.formatSloPercent;
12
+ export const formatSloTargetSubline = commonJsModule.formatSloTargetSubline;
7
13
  export const getSloChartAggregationInterval = commonJsModule.getSloChartAggregationInterval;
8
14
  export const getSloHistoryMetricName = commonJsModule.getSloHistoryMetricName;
9
15
  export const getSloMetricLabel = commonJsModule.getSloMetricLabel;
10
16
  export const getSloWidgetTileDisplay = commonJsModule.getSloWidgetTileDisplay;
11
17
  export const getSloWidgetTitle = commonJsModule.getSloWidgetTitle;
18
+ export const getSloWidgetTitleSentence = commonJsModule.getSloWidgetTitleSentence;
@@ -0,0 +1,41 @@
1
+ import Color from "../../Types/Color.mjs";
2
+ import Dictionary from "../../Types/Dictionary.mjs";
3
+ export interface ResourceWithMonitor {
4
+ monitorId?: unknown;
5
+ monitor?: {
6
+ isArchived?: boolean | undefined;
7
+ disableActiveMonitoring?: boolean | null | undefined;
8
+ } | undefined;
9
+ }
10
+ export interface StatusPageResourceWithMonitor extends ResourceWithMonitor {
11
+ _id?: unknown;
12
+ monitorGroupId?: unknown;
13
+ }
14
+ export declare const NOT_MONITORED_STATUS_COLOR: Color;
15
+ export declare const NOT_MONITORED_STATUS_NAME: string;
16
+ export type NotMonitoredResourceIds = ReadonlyArray<string> | ReadonlySet<string>;
17
+ export default class FrozenMonitorResources {
18
+ static isMonitorArchived(resource: ResourceWithMonitor): boolean;
19
+ static isMonitoringOff(resource: ResourceWithMonitor): boolean;
20
+ static isStatusFrozen(resource: ResourceWithMonitor): boolean;
21
+ static withoutArchivedMonitors<T extends ResourceWithMonitor>(resources: Array<T>): Array<T>;
22
+ static withoutFrozenMonitors<T extends ResourceWithMonitor>(resources: Array<T>): Array<T>;
23
+ static isMonitoringOffForEveryMonitor(members: Array<ResourceWithMonitor>): boolean;
24
+ static withoutNotMonitoredMonitorGroups<T>(data: {
25
+ monitorGroupStatuses: Dictionary<T>;
26
+ monitorGroupResources: Dictionary<Array<ResourceWithMonitor>>;
27
+ }): Dictionary<T>;
28
+ static getNotMonitoredResourceIds(data: {
29
+ statusPageResources: Array<StatusPageResourceWithMonitor>;
30
+ monitorGroupResources: Dictionary<Array<ResourceWithMonitor>>;
31
+ }): Array<string>;
32
+ static isNotMonitored(resource: {
33
+ _id?: unknown;
34
+ }, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
35
+ static isEveryResourceNotMonitored(resources: Array<{
36
+ _id?: unknown;
37
+ }>, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
38
+ static isSomeResourceNotMonitored(resources: Array<{
39
+ _id?: unknown;
40
+ }>, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
41
+ }
@@ -0,0 +1,41 @@
1
+ import Color from "../../Types/Color";
2
+ import Dictionary from "../../Types/Dictionary";
3
+ export interface ResourceWithMonitor {
4
+ monitorId?: unknown;
5
+ monitor?: {
6
+ isArchived?: boolean | undefined;
7
+ disableActiveMonitoring?: boolean | null | undefined;
8
+ } | undefined;
9
+ }
10
+ export interface StatusPageResourceWithMonitor extends ResourceWithMonitor {
11
+ _id?: unknown;
12
+ monitorGroupId?: unknown;
13
+ }
14
+ export declare const NOT_MONITORED_STATUS_COLOR: Color;
15
+ export declare const NOT_MONITORED_STATUS_NAME: string;
16
+ export type NotMonitoredResourceIds = ReadonlyArray<string> | ReadonlySet<string>;
17
+ export default class FrozenMonitorResources {
18
+ static isMonitorArchived(resource: ResourceWithMonitor): boolean;
19
+ static isMonitoringOff(resource: ResourceWithMonitor): boolean;
20
+ static isStatusFrozen(resource: ResourceWithMonitor): boolean;
21
+ static withoutArchivedMonitors<T extends ResourceWithMonitor>(resources: Array<T>): Array<T>;
22
+ static withoutFrozenMonitors<T extends ResourceWithMonitor>(resources: Array<T>): Array<T>;
23
+ static isMonitoringOffForEveryMonitor(members: Array<ResourceWithMonitor>): boolean;
24
+ static withoutNotMonitoredMonitorGroups<T>(data: {
25
+ monitorGroupStatuses: Dictionary<T>;
26
+ monitorGroupResources: Dictionary<Array<ResourceWithMonitor>>;
27
+ }): Dictionary<T>;
28
+ static getNotMonitoredResourceIds(data: {
29
+ statusPageResources: Array<StatusPageResourceWithMonitor>;
30
+ monitorGroupResources: Dictionary<Array<ResourceWithMonitor>>;
31
+ }): Array<string>;
32
+ static isNotMonitored(resource: {
33
+ _id?: unknown;
34
+ }, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
35
+ static isEveryResourceNotMonitored(resources: Array<{
36
+ _id?: unknown;
37
+ }>, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
38
+ static isSomeResourceNotMonitored(resources: Array<{
39
+ _id?: unknown;
40
+ }>, notMonitoredResourceIds: NotMonitoredResourceIds): boolean;
41
+ }
@@ -0,0 +1,155 @@
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.NOT_MONITORED_STATUS_NAME = exports.NOT_MONITORED_STATUS_COLOR = void 0;
7
+ const BrandColors_1 = require("../../Types/BrandColors");
8
+ const MonitorGroupMonitoring_1 = __importDefault(require("../Monitor/MonitorGroupMonitoring"));
9
+ const MonitoringOff_1 = __importDefault(require("../Monitor/MonitoringOff"));
10
+ /*
11
+ * The gray a status page draws Not monitored in: neither a status's color
12
+ * nor the green of Operational, and the gray the Dashboard draws a monitor
13
+ * whose monitoring is off in (Utils/Dashboard/MonitorListWidgetFormat).
14
+ */
15
+ exports.NOT_MONITORED_STATUS_COLOR = BrandColors_1.Gray500;
16
+ /*
17
+ * The words, in English, where a page has no language of its own: the
18
+ * embedded status badge. The status page itself says them in its visitor's
19
+ * language (overview.notMonitored).
20
+ */
21
+ exports.NOT_MONITORED_STATUS_NAME = "Not monitored";
22
+ // A record's id as text: its _id, or "" when it has none.
23
+ const idOf = (record) => {
24
+ return record._id ? String(record._id).trim() : "";
25
+ };
26
+ const holds = (ids, id) => {
27
+ if (ids instanceof Set) {
28
+ return ids.has(id);
29
+ }
30
+ return ids.includes(id);
31
+ };
32
+ class FrozenMonitorResources {
33
+ // True when the row points at a monitor that is archived.
34
+ static isMonitorArchived(resource) {
35
+ var _a;
36
+ return ((_a = resource.monitor) === null || _a === void 0 ? void 0 : _a.isArchived) === true;
37
+ }
38
+ // True when the row points at a monitor whose monitoring is turned off.
39
+ static isMonitoringOff(resource) {
40
+ return MonitoringOff_1.default.isOff(resource.monitor);
41
+ }
42
+ // True when nothing checks the row's monitor: it is archived, or its monitoring is off.
43
+ static isStatusFrozen(resource) {
44
+ return (FrozenMonitorResources.isMonitorArchived(resource) ||
45
+ FrozenMonitorResources.isMonitoringOff(resource));
46
+ }
47
+ // The rows whose monitor is not archived, in their original order: what a page lists.
48
+ static withoutArchivedMonitors(resources) {
49
+ return resources.filter((resource) => {
50
+ return !FrozenMonitorResources.isMonitorArchived(resource);
51
+ });
52
+ }
53
+ /*
54
+ * The rows whose monitor is checked - neither archived nor turned off - in
55
+ * their original order: what a status is worked out from.
56
+ */
57
+ static withoutFrozenMonitors(resources) {
58
+ return resources.filter((resource) => {
59
+ return !FrozenMonitorResources.isStatusFrozen(resource);
60
+ });
61
+ }
62
+ /*
63
+ * Whether monitoring is off for every monitor of a monitor group: the
64
+ * group's members that are not archived, all of them turned off. It is
65
+ * the rule the Dashboard draws such a group as Disabled by
66
+ * (MonitorGroupMonitoring), so a status page draws the same group as Not
67
+ * monitored. A group with no member that is not archived is empty, not
68
+ * off.
69
+ */
70
+ static isMonitoringOffForEveryMonitor(members) {
71
+ return MonitorGroupMonitoring_1.default.isMonitoringOffForEveryMonitor(MonitorGroupMonitoring_1.default.getSummary(FrozenMonitorResources.withoutArchivedMonitors(members).map((member) => {
72
+ return member.monitor || {};
73
+ })));
74
+ }
75
+ /*
76
+ * The monitor group statuses a status page shows, by monitor group id:
77
+ * the ones given, less each group whose monitors all have monitoring off.
78
+ * Nothing checks such a group, so the status it is left at says nothing:
79
+ * the page draws it as Not monitored, and it decides no other status. A
80
+ * group whose members were not read keeps its status.
81
+ */
82
+ static withoutNotMonitoredMonitorGroups(data) {
83
+ const statuses = {};
84
+ for (const monitorGroupId of Object.keys(data.monitorGroupStatuses)) {
85
+ const status = data.monitorGroupStatuses[monitorGroupId];
86
+ if (status === undefined ||
87
+ FrozenMonitorResources.isMonitoringOffForEveryMonitor(data.monitorGroupResources[monitorGroupId] || [])) {
88
+ continue;
89
+ }
90
+ statuses[monitorGroupId] = status;
91
+ }
92
+ return statuses;
93
+ }
94
+ /*
95
+ * The ids of the resources a status page draws as Not monitored: each
96
+ * monitor whose monitoring is off, and each monitor group whose monitors
97
+ * all have it off (isMonitoringOffForEveryMonitor). Those resources stay
98
+ * on the page, and decide no status - not a group's, not the page's.
99
+ *
100
+ * monitorGroupResources holds each monitor group's members by its id, as
101
+ * MonitorGroupService.getMonitorGroupResourcesByGroupIds reads them (with
102
+ * monitor.disableActiveMonitoring). A group missing from it has no
103
+ * members that were read, and counts as monitored.
104
+ */
105
+ static getNotMonitoredResourceIds(data) {
106
+ const ids = new Set();
107
+ for (const resource of data.statusPageResources) {
108
+ const id = idOf(resource);
109
+ if (!id || ids.has(id)) {
110
+ continue;
111
+ }
112
+ if (resource.monitor || resource.monitorId) {
113
+ if (FrozenMonitorResources.isMonitoringOff(resource)) {
114
+ ids.add(id);
115
+ }
116
+ continue;
117
+ }
118
+ if (resource.monitorGroupId) {
119
+ const members = data.monitorGroupResources[String(resource.monitorGroupId)] || [];
120
+ if (FrozenMonitorResources.isMonitoringOffForEveryMonitor(members)) {
121
+ ids.add(id);
122
+ }
123
+ }
124
+ }
125
+ return Array.from(ids);
126
+ }
127
+ // Whether the page draws this resource as Not monitored (getNotMonitoredResourceIds).
128
+ static isNotMonitored(resource, notMonitoredResourceIds) {
129
+ const id = idOf(resource);
130
+ return Boolean(id) && holds(notMonitoredResourceIds, id);
131
+ }
132
+ /*
133
+ * Whether every one of these resources is drawn as Not monitored: a page,
134
+ * a status page group or a grid cell that holds resources, none of them
135
+ * checked, has no status to show but that. False for none at all.
136
+ */
137
+ static isEveryResourceNotMonitored(resources, notMonitoredResourceIds) {
138
+ return (resources.length > 0 &&
139
+ resources.every((resource) => {
140
+ return FrozenMonitorResources.isNotMonitored(resource, notMonitoredResourceIds);
141
+ }));
142
+ }
143
+ /*
144
+ * Whether at least one of these resources is drawn as Not monitored. A
145
+ * page whose checked resources are all operational then says all the
146
+ * monitored ones are, never that all of them are: nothing knows the
147
+ * status of the one drawn as Not monitored below. False for none at all.
148
+ */
149
+ static isSomeResourceNotMonitored(resources, notMonitoredResourceIds) {
150
+ return resources.some((resource) => {
151
+ return FrozenMonitorResources.isNotMonitored(resource, notMonitoredResourceIds);
152
+ });
153
+ }
154
+ }
155
+ exports.default = FrozenMonitorResources;
@@ -0,0 +1,4 @@
1
+ import commonJsModule from "./FrozenMonitorResources.js";
2
+ export default commonJsModule.default;
3
+ export const NOT_MONITORED_STATUS_COLOR = commonJsModule.NOT_MONITORED_STATUS_COLOR;
4
+ export const NOT_MONITORED_STATUS_NAME = commonJsModule.NOT_MONITORED_STATUS_NAME;
@@ -3,6 +3,7 @@ import StatusPageResource from "../../Models/DatabaseModels/StatusPageResource.m
3
3
  export declare enum StatusPageGroupRollupKind {
4
4
  UptimePercent = "UptimePercent",
5
5
  CurrentStatus = "CurrentStatus",
6
+ NotMonitored = "NotMonitored",
6
7
  None = "None"
7
8
  }
8
9
  export default class StatusPageGroupNestingLayoutUtil {
@@ -74,5 +75,6 @@ export default class StatusPageGroupNestingLayoutUtil {
74
75
  isCurrentlyDown: boolean;
75
76
  uptimePercent: number | null;
76
77
  resourceCountInSubtree: number;
78
+ isNotMonitored?: boolean | undefined;
77
79
  }): StatusPageGroupRollupKind;
78
80
  }
@@ -3,6 +3,7 @@ import StatusPageResource from "../../Models/DatabaseModels/StatusPageResource";
3
3
  export declare enum StatusPageGroupRollupKind {
4
4
  UptimePercent = "UptimePercent",
5
5
  CurrentStatus = "CurrentStatus",
6
+ NotMonitored = "NotMonitored",
6
7
  None = "None"
7
8
  }
8
9
  export default class StatusPageGroupNestingLayoutUtil {
@@ -74,5 +75,6 @@ export default class StatusPageGroupNestingLayoutUtil {
74
75
  isCurrentlyDown: boolean;
75
76
  uptimePercent: number | null;
76
77
  resourceCountInSubtree: number;
78
+ isNotMonitored?: boolean | undefined;
77
79
  }): StatusPageGroupRollupKind;
78
80
  }