@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
@@ -0,0 +1,69 @@
1
+ export declare enum ServerSendingChannel {
2
+ Email = "email",
3
+ SMS = "sms",
4
+ Call = "call",
5
+ Push = "push"
6
+ }
7
+ export declare enum ServerSendingState {
8
+ NotSetUp = "not-set-up",
9
+ Untested = "untested",
10
+ Working = "working",
11
+ Failing = "failing"
12
+ }
13
+ export declare const SERVER_SENDING_CHANNELS: ReadonlyArray<ServerSendingChannel>;
14
+ export interface ServerSendingHealthEntry {
15
+ lastSucceededAt: string | null;
16
+ lastFailedAt: string | null;
17
+ failingSince: string | null;
18
+ lastFailure: string | null;
19
+ }
20
+ export type ServerSendingHealth = Partial<Record<ServerSendingChannel, ServerSendingHealthEntry>>;
21
+ export interface ServerChannelStatus {
22
+ channel: ServerSendingChannel;
23
+ state: ServerSendingState;
24
+ hasWorked: boolean;
25
+ lastWorkedAt: string | null;
26
+ failingSince: string | null;
27
+ lastFailure: string | null;
28
+ setUpProblem: string | null;
29
+ }
30
+ export interface ServerGlobalProbesStatus {
31
+ total: number;
32
+ reporting: number;
33
+ }
34
+ export interface ServerSendingStatusAnswer {
35
+ channels: Array<ServerChannelStatus>;
36
+ globalProbes: ServerGlobalProbesStatus | null;
37
+ }
38
+ export declare const SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS: number;
39
+ export declare const MAX_SERVER_SENDING_FAILURE_LENGTH: number;
40
+ export default class ServerSendingStatusUtil {
41
+ static readEntry(value: unknown): ServerSendingHealthEntry;
42
+ static readHealth(value: unknown): ServerSendingHealth;
43
+ static getEntry(health: ServerSendingHealth, channel: ServerSendingChannel): ServerSendingHealthEntry;
44
+ static getState(data: {
45
+ isSetUp: boolean;
46
+ entry: ServerSendingHealthEntry;
47
+ }): ServerSendingState;
48
+ static getStatus(data: {
49
+ channel: ServerSendingChannel;
50
+ setUpProblem: string | null;
51
+ entry: ServerSendingHealthEntry;
52
+ }): ServerChannelStatus;
53
+ static canSendPublicly(status: {
54
+ state: ServerSendingState;
55
+ hasWorked: boolean;
56
+ }): boolean;
57
+ static needsAttention(status: {
58
+ state: ServerSendingState;
59
+ }): boolean;
60
+ static withSucceeded(entry: ServerSendingHealthEntry, now: Date): ServerSendingHealthEntry;
61
+ static withFailed(entry: ServerSendingHealthEntry, reason: string, now: Date): ServerSendingHealthEntry;
62
+ static shouldWriteSucceeded(entry: ServerSendingHealthEntry, now: Date): boolean;
63
+ static shouldWriteFailed(entry: ServerSendingHealthEntry, reason: string, now: Date): boolean;
64
+ static isChannel(value: unknown): value is ServerSendingChannel;
65
+ static isState(value: unknown): value is ServerSendingState;
66
+ static parseAnswer(value: unknown): ServerSendingStatusAnswer | null;
67
+ static getChannel(answer: ServerSendingStatusAnswer, channel: ServerSendingChannel): ServerChannelStatus | null;
68
+ static areGlobalProbesSilent(probes: ServerGlobalProbesStatus | null): boolean;
69
+ }
@@ -0,0 +1,281 @@
1
+ "use strict";
2
+ /*
3
+ * CAN THIS SERVER SEND EMAIL, SMS, CALLS AND PUSH NOTIFICATIONS?
4
+ *
5
+ * A fresh self-hosted OneUptime cannot send email: there is no bundled mail
6
+ * server, and nothing is set up until its admin does it (Admin Dashboard >
7
+ * Settings > Emails). The product used to carry on as if it could:
8
+ * "forgot password" and invitations said the email was sent, a monitor's card
9
+ * said the project's owners would be emailed, and the person waited for
10
+ * something that never came (#6825, and the customers' #1600 and #405).
11
+ *
12
+ * One answer, per channel, says where the server stands:
13
+ *
14
+ * - not-set-up the settings it sends with are missing or incomplete, so
15
+ * nothing can go out - known for certain from the settings;
16
+ * - untested set up, and nothing has gone out since the settings were
17
+ * last saved;
18
+ * - working the last send went out;
19
+ * - failing sends fail, since `failingSince`, and why (`lastFailure`).
20
+ *
21
+ * The server works it out (Server/Utils/ServerSending/ServerSendingStatus)
22
+ * from its settings - the same rules the Notification service sends by - and
23
+ * from what the server remembers of its own last sends (GlobalConfig.
24
+ * serverSendingHealth, written by the senders). Saving a channel's settings
25
+ * starts it again at untested.
26
+ *
27
+ * Who reads what:
28
+ *
29
+ * - anybody, signed in or not (GET /global-config/vars): only whether the
30
+ * server is known not to be able to send email - `canSendEmail` - so the
31
+ * sign-in pages say so before anyone types an address. That is a fact
32
+ * about the server, never about an account, and it is said only while
33
+ * email has never worked: once it has, a later failure is told to the
34
+ * server's admins only (canSendPublicly);
35
+ * - master admins (GET /global-config/sending-status): every channel's
36
+ * state, since when, why, and what its settings are missing - the banner
37
+ * in the Dashboard and the Admin Dashboard, and the server's setup
38
+ * checklist (#6824).
39
+ *
40
+ * Pure, with no Node or browser APIs: the server, the Dashboard, the Admin
41
+ * Dashboard, the Accounts pages and their tests all read it.
42
+ */
43
+ Object.defineProperty(exports, "__esModule", { value: true });
44
+ exports.MAX_SERVER_SENDING_FAILURE_LENGTH = exports.SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS = exports.SERVER_SENDING_CHANNELS = exports.ServerSendingState = exports.ServerSendingChannel = void 0;
45
+ var ServerSendingChannel;
46
+ (function (ServerSendingChannel) {
47
+ ServerSendingChannel["Email"] = "email";
48
+ ServerSendingChannel["SMS"] = "sms";
49
+ ServerSendingChannel["Call"] = "call";
50
+ ServerSendingChannel["Push"] = "push";
51
+ })(ServerSendingChannel || (exports.ServerSendingChannel = ServerSendingChannel = {}));
52
+ var ServerSendingState;
53
+ (function (ServerSendingState) {
54
+ ServerSendingState["NotSetUp"] = "not-set-up";
55
+ ServerSendingState["Untested"] = "untested";
56
+ ServerSendingState["Working"] = "working";
57
+ ServerSendingState["Failing"] = "failing";
58
+ })(ServerSendingState || (exports.ServerSendingState = ServerSendingState = {}));
59
+ exports.SERVER_SENDING_CHANNELS = [
60
+ ServerSendingChannel.Email,
61
+ ServerSendingChannel.SMS,
62
+ ServerSendingChannel.Call,
63
+ ServerSendingChannel.Push,
64
+ ];
65
+ /*
66
+ * How often a channel that keeps working, or keeps failing for the same
67
+ * reason, writes that down again: the senders write a change at once (the
68
+ * first send that goes out, the first that fails, a new reason) and the same
69
+ * news at most once in this long, so a busy server is not one write per
70
+ * email.
71
+ */
72
+ exports.SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS = 60 * 60 * 1000;
73
+ // The longest failure reason kept: a mail server's answer can be long.
74
+ exports.MAX_SERVER_SENDING_FAILURE_LENGTH = 500;
75
+ const EMPTY_ENTRY = {
76
+ lastSucceededAt: null,
77
+ lastFailedAt: null,
78
+ failingSince: null,
79
+ lastFailure: null,
80
+ };
81
+ const readDate = (value) => {
82
+ if (typeof value !== "string" && !(value instanceof Date)) {
83
+ return null;
84
+ }
85
+ const date = value instanceof Date ? value : new Date(value);
86
+ if (Number.isNaN(date.getTime())) {
87
+ return null;
88
+ }
89
+ return date.toISOString();
90
+ };
91
+ const readText = (value) => {
92
+ if (typeof value !== "string") {
93
+ return null;
94
+ }
95
+ const text = value.trim();
96
+ return text ? text.slice(0, exports.MAX_SERVER_SENDING_FAILURE_LENGTH) : null;
97
+ };
98
+ const readCount = (value) => {
99
+ return typeof value === "number" && Number.isFinite(value) && value > 0
100
+ ? Math.floor(value)
101
+ : 0;
102
+ };
103
+ const isObject = (value) => {
104
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
105
+ };
106
+ class ServerSendingStatusUtil {
107
+ // One channel's entry, read whole from whatever was stored.
108
+ static readEntry(value) {
109
+ if (!isObject(value)) {
110
+ return Object.assign({}, EMPTY_ENTRY);
111
+ }
112
+ return {
113
+ lastSucceededAt: readDate(value["lastSucceededAt"]),
114
+ lastFailedAt: readDate(value["lastFailedAt"]),
115
+ failingSince: readDate(value["failingSince"]),
116
+ lastFailure: readText(value["lastFailure"]),
117
+ };
118
+ }
119
+ /*
120
+ * What the server remembers of every channel, read from the stored
121
+ * column: anything that is not an entry of a known channel is left out.
122
+ */
123
+ static readHealth(value) {
124
+ const health = {};
125
+ if (!isObject(value)) {
126
+ return health;
127
+ }
128
+ for (const channel of exports.SERVER_SENDING_CHANNELS) {
129
+ if (isObject(value[channel])) {
130
+ health[channel] = ServerSendingStatusUtil.readEntry(value[channel]);
131
+ }
132
+ }
133
+ return health;
134
+ }
135
+ static getEntry(health, channel) {
136
+ return health[channel] ? Object.assign({}, health[channel]) : Object.assign({}, EMPTY_ENTRY);
137
+ }
138
+ /*
139
+ * Where a channel stands: not set up whatever it remembers, then failing
140
+ * while its sends fail, working once one went out, and untested before.
141
+ */
142
+ static getState(data) {
143
+ if (!data.isSetUp) {
144
+ return ServerSendingState.NotSetUp;
145
+ }
146
+ if (data.entry.failingSince) {
147
+ return ServerSendingState.Failing;
148
+ }
149
+ if (data.entry.lastSucceededAt) {
150
+ return ServerSendingState.Working;
151
+ }
152
+ return ServerSendingState.Untested;
153
+ }
154
+ static getStatus(data) {
155
+ const isSetUp = !data.setUpProblem;
156
+ return {
157
+ channel: data.channel,
158
+ state: ServerSendingStatusUtil.getState({
159
+ isSetUp: isSetUp,
160
+ entry: data.entry,
161
+ }),
162
+ hasWorked: Boolean(data.entry.lastSucceededAt),
163
+ lastWorkedAt: data.entry.lastSucceededAt,
164
+ failingSince: data.entry.failingSince,
165
+ lastFailure: data.entry.lastFailure,
166
+ setUpProblem: data.setUpProblem,
167
+ };
168
+ }
169
+ /*
170
+ * What a page anybody can open may say: the server is known not to be
171
+ * able to send - it is not set up, or it is and has never managed to.
172
+ * Untested says nothing (it may well work), and a channel that has
173
+ * worked is never said to fail here: that is for the server's admins.
174
+ */
175
+ static canSendPublicly(status) {
176
+ if (status.state === ServerSendingState.NotSetUp) {
177
+ return false;
178
+ }
179
+ if (status.state === ServerSendingState.Failing && !status.hasWorked) {
180
+ return false;
181
+ }
182
+ return true;
183
+ }
184
+ /*
185
+ * Whether a master admin should be told, in the product, that this
186
+ * channel does not work: not set up, or failing.
187
+ */
188
+ static needsAttention(status) {
189
+ return (status.state === ServerSendingState.NotSetUp ||
190
+ status.state === ServerSendingState.Failing);
191
+ }
192
+ // The entry after a send went out.
193
+ static withSucceeded(entry, now) {
194
+ return Object.assign(Object.assign({}, entry), { lastSucceededAt: now.toISOString(), failingSince: null });
195
+ }
196
+ // The entry after a send failed, and why.
197
+ static withFailed(entry, reason, now) {
198
+ return Object.assign(Object.assign({}, entry), { lastFailedAt: now.toISOString(), failingSince: entry.failingSince || now.toISOString(), lastFailure: readText(reason) || "Unknown error." });
199
+ }
200
+ /*
201
+ * Whether a send that went out is news worth a write: the first ever, the
202
+ * first after failures, or the same news an hour later.
203
+ */
204
+ static shouldWriteSucceeded(entry, now) {
205
+ if (!entry.lastSucceededAt || entry.failingSince) {
206
+ return true;
207
+ }
208
+ return (now.getTime() - new Date(entry.lastSucceededAt).getTime() >=
209
+ exports.SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS);
210
+ }
211
+ /*
212
+ * Whether a failed send is news worth a write: the first failure, a new
213
+ * reason, or the same failure an hour later.
214
+ */
215
+ static shouldWriteFailed(entry, reason, now) {
216
+ if (!entry.failingSince || !entry.lastFailedAt) {
217
+ return true;
218
+ }
219
+ if ((readText(reason) || "Unknown error.") !== entry.lastFailure) {
220
+ return true;
221
+ }
222
+ return (now.getTime() - new Date(entry.lastFailedAt).getTime() >=
223
+ exports.SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS);
224
+ }
225
+ static isChannel(value) {
226
+ return exports.SERVER_SENDING_CHANNELS.includes(value);
227
+ }
228
+ static isState(value) {
229
+ return Object.values(ServerSendingState).includes(value);
230
+ }
231
+ /*
232
+ * The answer of GET /global-config/sending-status, read in a browser, or
233
+ * null when it is not one (a failed read, a proxy's page): the banner then
234
+ * draws nothing. A channel row that is not one is left out.
235
+ */
236
+ static parseAnswer(value) {
237
+ if (!isObject(value) || !Array.isArray(value["channels"])) {
238
+ return null;
239
+ }
240
+ const channels = [];
241
+ for (const row of value["channels"]) {
242
+ if (!isObject(row) ||
243
+ !ServerSendingStatusUtil.isChannel(row["channel"]) ||
244
+ !ServerSendingStatusUtil.isState(row["state"])) {
245
+ continue;
246
+ }
247
+ channels.push({
248
+ channel: row["channel"],
249
+ state: row["state"],
250
+ hasWorked: row["hasWorked"] === true,
251
+ lastWorkedAt: readDate(row["lastWorkedAt"]),
252
+ failingSince: readDate(row["failingSince"]),
253
+ lastFailure: readText(row["lastFailure"]),
254
+ setUpProblem: readText(row["setUpProblem"]),
255
+ });
256
+ }
257
+ const probes = value["globalProbes"];
258
+ return {
259
+ channels: channels,
260
+ globalProbes: isObject(probes)
261
+ ? {
262
+ total: readCount(probes["total"]),
263
+ reporting: Math.min(readCount(probes["reporting"]), readCount(probes["total"])),
264
+ }
265
+ : null,
266
+ };
267
+ }
268
+ static getChannel(answer, channel) {
269
+ return (answer.channels.find((status) => {
270
+ return status.channel === channel;
271
+ }) || null);
272
+ }
273
+ /*
274
+ * Whether the server has global probes and none of them is reporting:
275
+ * monitors that run on them are not checked.
276
+ */
277
+ static areGlobalProbesSilent(probes) {
278
+ return Boolean(probes && probes.total > 0 && probes.reporting === 0);
279
+ }
280
+ }
281
+ exports.default = ServerSendingStatusUtil;
@@ -0,0 +1,7 @@
1
+ import commonJsModule from "./ServerSendingStatus.js";
2
+ export default commonJsModule.default;
3
+ export const MAX_SERVER_SENDING_FAILURE_LENGTH = commonJsModule.MAX_SERVER_SENDING_FAILURE_LENGTH;
4
+ export const SERVER_SENDING_CHANNELS = commonJsModule.SERVER_SENDING_CHANNELS;
5
+ export const SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS = commonJsModule.SERVER_SENDING_HEALTH_REWRITE_INTERVAL_MS;
6
+ export const ServerSendingChannel = commonJsModule.ServerSendingChannel;
7
+ export const ServerSendingState = commonJsModule.ServerSendingState;
@@ -0,0 +1,9 @@
1
+ export declare const SERVER_EMAIL_NOT_SET_UP_MESSAGE: string;
2
+ export declare const PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE: string;
3
+ export declare const SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE: string;
4
+ export declare const REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE: string;
5
+ export declare const LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES: ReadonlyArray<string>;
6
+ export default class ServerSendingWords {
7
+ static isServerEmailNotSetUpMessage(message: string | null | undefined): boolean;
8
+ static toProjectEmailLogMessage(message: string | null | undefined): string;
9
+ }
@@ -0,0 +1,9 @@
1
+ export declare const SERVER_EMAIL_NOT_SET_UP_MESSAGE: string;
2
+ export declare const PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE: string;
3
+ export declare const SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE: string;
4
+ export declare const REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE: string;
5
+ export declare const LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES: ReadonlyArray<string>;
6
+ export default class ServerSendingWords {
7
+ static isServerEmailNotSetUpMessage(message: string | null | undefined): boolean;
8
+ static toProjectEmailLogMessage(message: string | null | undefined): string;
9
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ /*
3
+ * WHAT PEOPLE ARE TOLD WHEN THE SERVER CANNOT SEND EMAIL.
4
+ *
5
+ * Each sentence says what did not happen and who can fix it, in the words of
6
+ * the person reading it - never an SMTP phrase. A project's owner reads why
7
+ * an email was not sent in the project's Notification Logs; someone locked
8
+ * out reads who can let them in; a master admin reads where to set email up.
9
+ *
10
+ * Pure, with no Node or browser APIs: the server, the Dashboard, the Accounts
11
+ * pages and their tests all read the same words (ServerSendingStatus says
12
+ * where the server stands). The one a Dashboard page shows is marked for
13
+ * translation (the Dashboard's extractor reads this file).
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES = exports.REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE = exports.SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE = exports.PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE = exports.SERVER_EMAIL_NOT_SET_UP_MESSAGE = void 0;
17
+ const Translator_1 = require("../Translator");
18
+ /*
19
+ * Why an email the server had to send through its own settings was not
20
+ * sent, while those settings are missing or incomplete: the Email Log row a
21
+ * project's owners read, the on-call log, and the error the sender throws.
22
+ */
23
+ exports.SERVER_EMAIL_NOT_SET_UP_MESSAGE = (0, Translator_1.translationKey)("This server has no email set up, so this email was not sent. Ask your server's admin to set up email.");
24
+ /*
25
+ * What "Forgot password" answers while the server cannot send email: the
26
+ * same for every address, so it says nothing about who has an account.
27
+ */
28
+ exports.PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE = "This server cannot send email yet, so it cannot email you a link to reset your password. Ask your server's admin to reset your password.";
29
+ // What asking for a sign-in link answers while the server cannot send email.
30
+ exports.SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE = "This server cannot send email yet, so it cannot email you a sign-in link. Sign in with your password, or ask your server's admin to let you in.";
31
+ /*
32
+ * What an invited person who signs up without their invitation link is told
33
+ * while the server cannot send email: the link that finishes signing up
34
+ * would have been emailed to them.
35
+ */
36
+ exports.REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE = "This server cannot send email yet, so it cannot email you a link to finish signing up. Ask the person who invited you for your invitation link, or ask your server's admin.";
37
+ /*
38
+ * What the Email Log rows written before these words said, word for word:
39
+ * read back, each is shown in the words above (toProjectEmailLogMessage).
40
+ */
41
+ exports.LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES = [
42
+ "Email is configured to use SMTP, but SMTP settings are not configured.",
43
+ "Global SMTP Config not found",
44
+ "Global Config not found",
45
+ "Email is configured to use Sendgrid, but Sendgrid Settings is not configured.",
46
+ "Email is configured to use Sendgrid, but Sendgrid API key is not configured.",
47
+ "Email is configured to use Sendgrid, but Sendgrid From Email is not configured.",
48
+ "Email is configured to use Sendgrid, but Sendgrid From Name is not configured.",
49
+ "Sendgrid Config not found",
50
+ "Sendgrid API key not configured",
51
+ "Sendgrid From Email not configured",
52
+ "Sendgrid From Name not configured",
53
+ ];
54
+ /*
55
+ * The endings the server's own email settings used to refuse a send with
56
+ * (Notification/Config: a setting left blank, "Please set this in the Admin
57
+ * Dashboard: <address>"). Only the server's settings are refused this way.
58
+ */
59
+ const LEGACY_ADMIN_DASHBOARD_SETTING_PHRASES = [
60
+ "Please set this in the Admin Dashboard",
61
+ "Please set it in the Admin Dashboard, under Settings > Emails",
62
+ ];
63
+ class ServerSendingWords {
64
+ /*
65
+ * Whether a stored status message says the server's own email settings
66
+ * are missing or incomplete, in any words it has ever said it in.
67
+ */
68
+ static isServerEmailNotSetUpMessage(message) {
69
+ const text = (message || "").trim();
70
+ if (!text) {
71
+ return false;
72
+ }
73
+ if (text === exports.SERVER_EMAIL_NOT_SET_UP_MESSAGE) {
74
+ return true;
75
+ }
76
+ if (exports.LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES.includes(text)) {
77
+ return true;
78
+ }
79
+ return LEGACY_ADMIN_DASHBOARD_SETTING_PHRASES.some((phrase) => {
80
+ return text.includes(phrase);
81
+ });
82
+ }
83
+ /*
84
+ * An Email Log row's status message as a project's owners read it: a
85
+ * failure because the server has no email set up reads as such, whatever
86
+ * words the row was written in. Anything else is shown as it is.
87
+ */
88
+ static toProjectEmailLogMessage(message) {
89
+ if (ServerSendingWords.isServerEmailNotSetUpMessage(message)) {
90
+ return exports.SERVER_EMAIL_NOT_SET_UP_MESSAGE;
91
+ }
92
+ return message || "";
93
+ }
94
+ }
95
+ exports.default = ServerSendingWords;
@@ -0,0 +1,7 @@
1
+ import commonJsModule from "./ServerSendingWords.js";
2
+ export default commonJsModule.default;
3
+ export const LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES = commonJsModule.LEGACY_SERVER_EMAIL_NOT_SET_UP_MESSAGES;
4
+ export const PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE = commonJsModule.PASSWORD_RESET_CANNOT_BE_EMAILED_MESSAGE;
5
+ export const REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE = commonJsModule.REGISTRATION_LINK_CANNOT_BE_EMAILED_MESSAGE;
6
+ export const SERVER_EMAIL_NOT_SET_UP_MESSAGE = commonJsModule.SERVER_EMAIL_NOT_SET_UP_MESSAGE;
7
+ export const SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE = commonJsModule.SIGN_IN_LINK_CANNOT_BE_EMAILED_MESSAGE;
@@ -0,0 +1,172 @@
1
+ import { ServerChannelStatus, ServerGlobalProbesStatus, ServerSendingChannel } from "../ServerSending/ServerSendingStatus.mjs";
2
+ export declare enum ServerSetupCheckId {
3
+ Email = "email",
4
+ Https = "https",
5
+ Signups = "signups",
6
+ SmsAndCalls = "sms-and-calls",
7
+ Probes = "probes",
8
+ Backups = "backups",
9
+ UpdateChecks = "update-checks",
10
+ BrowserPush = "browser-push",
11
+ AiProvider = "ai-provider",
12
+ SingleSignOn = "single-sign-on"
13
+ }
14
+ export declare enum ServerSetupCheckTier {
15
+ Required = "required",
16
+ Recommended = "recommended",
17
+ Optional = "optional"
18
+ }
19
+ export declare enum ServerSetupStatus {
20
+ NotSetUp = "not-set-up",
21
+ Untested = "untested",
22
+ Failing = "failing",
23
+ Done = "done",
24
+ Skipped = "skipped",
25
+ Confirmed = "confirmed"
26
+ }
27
+ export declare const FINISHED_SERVER_SETUP_STATUSES: ReadonlyArray<ServerSetupStatus>;
28
+ export declare enum ServerSetupChoiceKind {
29
+ Skipped = "skipped",
30
+ Confirmed = "confirmed"
31
+ }
32
+ export interface ServerSetupCheckDefinition {
33
+ id: ServerSetupCheckId;
34
+ tier: ServerSetupCheckTier;
35
+ title: string;
36
+ adminPath?: string | undefined;
37
+ guidePath?: string | undefined;
38
+ choice: ServerSetupChoiceKind | null;
39
+ tests: ReadonlyArray<ServerSendingChannel>;
40
+ }
41
+ export declare const SERVER_SETUP_GUIDES: {
42
+ https: string;
43
+ backups: string;
44
+ updateChecks: string;
45
+ browserPush: string;
46
+ };
47
+ export declare const SERVER_SETUP_ADMIN_PATHS: {
48
+ setup: string;
49
+ email: string;
50
+ authentication: string;
51
+ callAndSms: string;
52
+ probes: string;
53
+ backups: string;
54
+ llmProviders: string;
55
+ singleSignOn: string;
56
+ };
57
+ export declare const SERVER_SETUP_CHECKS: ReadonlyArray<ServerSetupCheckDefinition>;
58
+ export declare const SERVER_SETUP_STATUS_WORDS: Readonly<Record<ServerSetupCheckId, Partial<Record<ServerSetupStatus, string>>>>;
59
+ export declare const SERVER_SETUP_CHECKED_WORDS: {
60
+ emailAccepted: string;
61
+ smsAccepted: string;
62
+ callAccepted: string;
63
+ providerSaid: string;
64
+ lastBackup: string;
65
+ lastUpdateCheck: string;
66
+ chosenBy: string;
67
+ chosenOn: string;
68
+ };
69
+ export interface ServerSetupChoice {
70
+ kind: ServerSetupChoiceKind;
71
+ at: string;
72
+ byUserId: string | null;
73
+ byName?: string | null | undefined;
74
+ }
75
+ export interface ServerSetupHidden {
76
+ at: string;
77
+ openRequired: Array<ServerSetupCheckId>;
78
+ }
79
+ export interface ServerSetupChoices {
80
+ choices: Partial<Record<ServerSetupCheckId, ServerSetupChoice>>;
81
+ hiddenBy: Record<string, ServerSetupHidden>;
82
+ }
83
+ export interface ServerSetupFacts {
84
+ isHttpsSetUp: boolean;
85
+ areSignupsClosed: boolean;
86
+ email: ServerChannelStatus;
87
+ sms: ServerChannelStatus;
88
+ call: ServerChannelStatus;
89
+ emailSentThrough: string | null;
90
+ smsSentThrough: string | null;
91
+ callSentThrough: string | null;
92
+ globalProbes: ServerGlobalProbesStatus | null;
93
+ updateChecks: {
94
+ isDisabled: boolean;
95
+ lastCheckedAt: string | null;
96
+ lastFailure: string | null;
97
+ };
98
+ lastBackup: {
99
+ succeeded: boolean;
100
+ finishedAt: string | null;
101
+ error: string | null;
102
+ } | null;
103
+ hasScheduledBackups: boolean;
104
+ isBrowserPushSetUp: boolean;
105
+ hasAiProvider: boolean;
106
+ hasSingleSignOn: boolean;
107
+ choices: ServerSetupChoices;
108
+ }
109
+ export interface ServerSetupCheckResult {
110
+ id: ServerSetupCheckId;
111
+ tier: ServerSetupCheckTier;
112
+ status: ServerSetupStatus;
113
+ isFinished: boolean;
114
+ time: string | null;
115
+ sentThrough: string | null;
116
+ reason: string | null;
117
+ channels: Array<ServerChannelStatus & {
118
+ sentThrough: string | null;
119
+ }>;
120
+ choice: ServerSetupChoice | null;
121
+ canChoose: ServerSetupChoiceKind | null;
122
+ tests: Array<ServerSendingChannel>;
123
+ hasScheduledBackups?: boolean | undefined;
124
+ }
125
+ export interface ServerSetupChecklistAnswer {
126
+ checks: Array<ServerSetupCheckResult>;
127
+ openRequired: Array<ServerSetupCheckId>;
128
+ isHiddenForReader: boolean;
129
+ }
130
+ export default class ServerSetupChecklistUtil {
131
+ static getDefinition(id: ServerSetupCheckId): ServerSetupCheckDefinition;
132
+ static isCheckId(value: unknown): value is ServerSetupCheckId;
133
+ static isFinished(status: ServerSetupStatus): boolean;
134
+ static readChoices(value: unknown): ServerSetupChoices;
135
+ static withChoice(data: {
136
+ choices: ServerSetupChoices;
137
+ check: ServerSetupCheckId;
138
+ kind: ServerSetupChoiceKind | null;
139
+ byUserId: string | null;
140
+ now: Date;
141
+ }): ServerSetupChoices;
142
+ static withHidden(data: {
143
+ choices: ServerSetupChoices;
144
+ userId: string;
145
+ openRequired: Array<ServerSetupCheckId>;
146
+ now: Date;
147
+ }): ServerSetupChoices;
148
+ static isHiddenFor(data: {
149
+ choices: ServerSetupChoices;
150
+ userId: string | null;
151
+ openRequired: Array<ServerSetupCheckId>;
152
+ }): boolean;
153
+ private static channelStatus;
154
+ private static result;
155
+ private static evaluateEmail;
156
+ private static evaluateSmsAndCalls;
157
+ private static evaluateBackups;
158
+ private static evaluateUpdateChecks;
159
+ private static evaluateYesNo;
160
+ static evaluate(facts: ServerSetupFacts): Array<ServerSetupCheckResult>;
161
+ static getOpenRequired(checks: Array<ServerSetupCheckResult>): Array<ServerSetupCheckId>;
162
+ static getAnswer(data: {
163
+ facts: ServerSetupFacts;
164
+ readerUserId: string | null;
165
+ }): ServerSetupChecklistAnswer;
166
+ static getStatusWords(check: {
167
+ id: ServerSetupCheckId;
168
+ status: ServerSetupStatus;
169
+ }): string;
170
+ static parseAnswer(value: unknown): ServerSetupChecklistAnswer | null;
171
+ static getCheck(answer: ServerSetupChecklistAnswer, id: ServerSetupCheckId): ServerSetupCheckResult | null;
172
+ }