@oneuptime/common 14.0.109 → 14.1.0

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 (578) hide show
  1. package/Models/AnalyticsModels/SecurityEvent.js +1 -1
  2. package/Models/DatabaseModels/AIInsight.js +2 -2
  3. package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
  4. package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
  5. package/Models/DatabaseModels/AIRunRecording.js +181 -0
  6. package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
  7. package/Models/DatabaseModels/Alert.js +20 -4
  8. package/Models/DatabaseModels/AlertEpisode.js +2 -2
  9. package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
  10. package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
  11. package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
  12. package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
  13. package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
  14. package/Models/DatabaseModels/AlertSeverity.js +13 -4
  15. package/Models/DatabaseModels/AlertState.js +1 -1
  16. package/Models/DatabaseModels/CallLog.js +12 -12
  17. package/Models/DatabaseModels/DataStore.js +9 -0
  18. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
  19. package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
  20. package/Models/DatabaseModels/EmailLog.js +14 -14
  21. package/Models/DatabaseModels/Form.js +3 -3
  22. package/Models/DatabaseModels/FormSubmission.js +6 -6
  23. package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
  24. package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
  25. package/Models/DatabaseModels/GlobalConfig.js +74 -45
  26. package/Models/DatabaseModels/Incident.js +20 -4
  27. package/Models/DatabaseModels/IncidentEpisode.js +2 -2
  28. package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
  29. package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
  30. package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
  31. package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
  32. package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
  33. package/Models/DatabaseModels/IncidentSeverity.js +13 -4
  34. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  35. package/Models/DatabaseModels/IncidentState.js +1 -1
  36. package/Models/DatabaseModels/IncidentTemplate.js +2 -2
  37. package/Models/DatabaseModels/Index.js +4 -0
  38. package/Models/DatabaseModels/InventoryItem.js +11 -0
  39. package/Models/DatabaseModels/Monitor.js +54 -20
  40. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  41. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  42. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  43. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  44. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  45. package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
  46. package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
  47. package/Models/DatabaseModels/NetworkDevice.js +64 -7
  48. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  49. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  50. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  51. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  52. package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
  53. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
  54. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
  55. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
  56. package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
  57. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +28 -11
  58. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
  59. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  60. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  61. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +16 -11
  62. package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
  63. package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
  64. package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
  65. package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
  66. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
  67. package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
  68. package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
  69. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  70. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  71. package/Models/DatabaseModels/Project.d.mts +3 -0
  72. package/Models/DatabaseModels/Project.d.ts +3 -0
  73. package/Models/DatabaseModels/Project.js +142 -5
  74. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  75. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  76. package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
  77. package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
  78. package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
  79. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  80. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  81. package/Models/DatabaseModels/PushNotificationLog.js +12 -12
  82. package/Models/DatabaseModels/Reseller.js +8 -2
  83. package/Models/DatabaseModels/ResellerPlan.js +8 -2
  84. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  85. package/Models/DatabaseModels/RunbookRule.js +6 -6
  86. package/Models/DatabaseModels/ScheduledMaintenance.js +9 -6
  87. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  88. package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
  89. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  90. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  91. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +3 -3
  92. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  93. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  94. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  95. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +10 -7
  96. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  97. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +4 -4
  98. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  99. package/Models/DatabaseModels/Service.js +1 -1
  100. package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
  101. package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
  102. package/Models/DatabaseModels/SmsLog.js +12 -12
  103. package/Models/DatabaseModels/StatusPage.js +5 -5
  104. package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
  105. package/Models/DatabaseModels/TeamMember.js +10 -1
  106. package/Models/DatabaseModels/TelegramLog.js +12 -12
  107. package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
  108. package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
  109. package/Models/DatabaseModels/User.d.mts +4 -0
  110. package/Models/DatabaseModels/User.d.ts +4 -0
  111. package/Models/DatabaseModels/User.js +100 -0
  112. package/Models/DatabaseModels/UserOnCallLog.js +6 -6
  113. package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
  114. package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
  115. package/Models/DatabaseModels/WebhookLog.js +12 -12
  116. package/Models/DatabaseModels/WhatsAppLog.js +12 -12
  117. package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
  118. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  119. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  120. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  121. package/Server/Services/DatabaseService.d.mts +4 -1
  122. package/Server/Services/DatabaseService.d.ts +4 -1
  123. package/Server/Types/Database/CountBy.d.mts +1 -0
  124. package/Server/Types/Database/CountBy.d.ts +1 -0
  125. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  126. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  127. package/Types/AI/AIActionWords.d.mts +25 -1
  128. package/Types/AI/AIActionWords.d.ts +25 -1
  129. package/Types/AI/AIActionWords.js +166 -3
  130. package/Types/AI/AIActionWords.mjs +6 -0
  131. package/Types/AI/AIChatTypes.d.mts +4 -2
  132. package/Types/AI/AIChatTypes.d.ts +4 -2
  133. package/Types/AI/AIChatTypes.js +5 -0
  134. package/Types/AI/AiOutcomes.d.mts +57 -0
  135. package/Types/AI/AiOutcomes.d.ts +57 -0
  136. package/Types/AI/AiOutcomes.js +67 -0
  137. package/Types/AI/AiOutcomes.mjs +10 -0
  138. package/Types/AI/AiRunRefusal.d.mts +45 -0
  139. package/Types/AI/AiRunRefusal.d.ts +45 -0
  140. package/Types/AI/AiRunRefusal.js +187 -0
  141. package/Types/AI/AiRunRefusal.mjs +12 -0
  142. package/Types/AI/InvestigationRecording.d.mts +46 -0
  143. package/Types/AI/InvestigationRecording.d.ts +46 -0
  144. package/Types/AI/InvestigationRecording.js +42 -0
  145. package/Types/AI/InvestigationRecording.mjs +7 -0
  146. package/Types/API/HTTPResponse.d.mts +3 -0
  147. package/Types/API/HTTPResponse.d.ts +3 -0
  148. package/Types/API/HTTPResponse.js +15 -0
  149. package/Types/Analytics/ProductEvent.d.mts +6 -1
  150. package/Types/Analytics/ProductEvent.d.ts +6 -1
  151. package/Types/Analytics/ProductEvent.js +41 -0
  152. package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
  153. package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
  154. package/Types/AuditLog/AuditLogCoverage.js +4 -2
  155. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  156. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  157. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
  158. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
  159. package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
  160. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  161. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  162. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  163. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  164. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  165. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  166. package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
  167. package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
  168. package/Types/Cloud/CloudResourceCatalog.js +33 -3
  169. package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
  170. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  171. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  172. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  173. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  174. package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
  175. package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
  176. package/Types/DataObservability/DataCheckSuggestions.js +102 -65
  177. package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
  178. package/Types/Database/TableMetadata.d.mts +2 -0
  179. package/Types/Database/TableMetadata.d.ts +2 -0
  180. package/Types/Database/TableMetadata.js +6 -0
  181. package/Types/Date.d.mts +26 -2
  182. package/Types/Date.d.ts +26 -2
  183. package/Types/Date.js +81 -9
  184. package/Types/Date.mjs +1 -0
  185. package/Types/DateLanguage.d.mts +2 -0
  186. package/Types/DateLanguage.d.ts +2 -0
  187. package/Types/DateLanguage.js +44 -2
  188. package/Types/DateLanguage.mjs +2 -0
  189. package/Types/DirectionArrow.d.mts +7 -0
  190. package/Types/DirectionArrow.d.ts +7 -0
  191. package/Types/DirectionArrow.js +88 -0
  192. package/Types/DirectionArrow.mjs +7 -0
  193. package/Types/Docs/GlossaryTerm.d.mts +1 -0
  194. package/Types/Docs/GlossaryTerm.d.ts +1 -0
  195. package/Types/Docs/GlossaryTerm.js +2 -0
  196. package/Types/Docs/RetiredNames.d.mts +11 -0
  197. package/Types/Docs/RetiredNames.d.ts +11 -0
  198. package/Types/Docs/RetiredNames.js +139 -0
  199. package/Types/Docs/RetiredNames.mjs +3 -0
  200. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  201. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  202. package/Types/Email/ServerEmailEnvironment.js +793 -0
  203. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  204. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  205. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  206. package/Types/Exception/AiRunRefusalException.js +23 -0
  207. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  208. package/Types/Exception/RefusalWithValues.d.mts +7 -0
  209. package/Types/Exception/RefusalWithValues.d.ts +7 -0
  210. package/Types/Exception/RefusalWithValues.js +76 -0
  211. package/Types/Exception/RefusalWithValues.mjs +3 -0
  212. package/Types/Exception/UnexplainedError.d.mts +13 -0
  213. package/Types/Exception/UnexplainedError.d.ts +13 -0
  214. package/Types/Exception/UnexplainedError.js +53 -1
  215. package/Types/Exception/UnexplainedError.mjs +1 -0
  216. package/Types/File/FileSize.d.mts +4 -1
  217. package/Types/File/FileSize.d.ts +4 -1
  218. package/Types/File/FileSize.js +18 -17
  219. package/Types/Form/FormTargetCatalog.js +2 -2
  220. package/Types/Form/FormTargetType.js +2 -2
  221. package/Types/HostCollector/HostCollector.d.mts +1 -0
  222. package/Types/HostCollector/HostCollector.d.ts +1 -0
  223. package/Types/HostCollector/HostCollector.js +26 -10
  224. package/Types/HostCollector/HostCollector.mjs +1 -0
  225. package/Types/ListData.d.mts +2 -0
  226. package/Types/ListData.d.ts +2 -0
  227. package/Types/ListData.js +4 -0
  228. package/Types/Monitor/MonitorCriteria.js +2 -2
  229. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  230. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  231. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  232. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  233. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  234. package/Types/Monitor/MonitorStep.js +1 -1
  235. package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
  236. package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
  237. package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
  238. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
  239. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
  240. package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
  241. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  242. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  243. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  244. package/Types/Monitor/WhoIsTold.d.mts +3 -1
  245. package/Types/Monitor/WhoIsTold.d.ts +3 -1
  246. package/Types/Monitor/WhoIsTold.js +2 -1
  247. package/Types/NotificationRule/PagingLadder.d.mts +137 -0
  248. package/Types/NotificationRule/PagingLadder.d.ts +137 -0
  249. package/Types/NotificationRule/PagingLadder.js +682 -0
  250. package/Types/NotificationRule/PagingLadder.mjs +28 -0
  251. package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
  252. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  253. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  254. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  255. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  256. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  257. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  258. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  259. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  260. package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
  261. package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
  262. package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
  263. package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
  264. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  265. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  266. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  267. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  268. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  269. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  270. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
  271. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
  272. package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
  273. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  274. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
  275. package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
  276. package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
  277. package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
  278. package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
  279. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  280. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  281. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  282. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  283. package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
  284. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  285. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  286. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  287. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  288. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  289. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  290. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  291. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  292. package/Types/Permission.d.mts +2 -2
  293. package/Types/Permission.d.ts +2 -2
  294. package/Types/Permission.js +196 -195
  295. package/Types/Probe/ProbeCapability.d.mts +2 -1
  296. package/Types/Probe/ProbeCapability.d.ts +2 -1
  297. package/Types/Probe/ProbeCapability.js +10 -0
  298. package/Types/Product/ProductCatalog.d.mts +10 -0
  299. package/Types/Product/ProductCatalog.d.ts +10 -0
  300. package/Types/Product/ProductCatalog.js +208 -0
  301. package/Types/Product/ProductCatalog.mjs +6 -0
  302. package/Types/Product/ProductOfTable.d.mts +3 -0
  303. package/Types/Product/ProductOfTable.d.ts +3 -0
  304. package/Types/Product/ProductOfTable.js +68 -0
  305. package/Types/Product/ProductOfTable.mjs +3 -0
  306. package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
  307. package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
  308. package/Types/Product/ProjectProductsAnswer.js +35 -2
  309. package/Types/Product/ProjectProductsAnswer.mjs +1 -0
  310. package/Types/Product/ServerProducts.d.mts +65 -0
  311. package/Types/Product/ServerProducts.d.ts +65 -0
  312. package/Types/Product/ServerProducts.js +383 -0
  313. package/Types/Product/ServerProducts.mjs +26 -0
  314. package/Types/Product/ServerProductsAnswer.d.mts +21 -0
  315. package/Types/Product/ServerProductsAnswer.d.ts +21 -0
  316. package/Types/Product/ServerProductsAnswer.js +78 -0
  317. package/Types/Product/ServerProductsAnswer.mjs +5 -0
  318. package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
  319. package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
  320. package/Types/ProductFeedback/ProductFeedback.js +8 -0
  321. package/Types/ReaderLanguage.d.mts +1 -0
  322. package/Types/ReaderLanguage.d.ts +1 -0
  323. package/Types/ReaderLanguage.js +13 -1
  324. package/Types/ReaderLanguage.mjs +1 -0
  325. package/Types/Rules/RuleRun.js +2 -2
  326. package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
  327. package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
  328. package/Types/SampleProject/SampleProject.d.mts +54 -0
  329. package/Types/SampleProject/SampleProject.d.ts +54 -0
  330. package/Types/SampleProject/SampleProject.js +177 -0
  331. package/Types/SampleProject/SampleProject.mjs +22 -0
  332. package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
  333. package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
  334. package/Types/SampleProject/SampleProjectContent.js +397 -0
  335. package/Types/SampleProject/SampleProjectContent.mjs +18 -0
  336. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  337. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  338. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  339. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  340. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  341. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  342. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  343. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  344. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  345. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  346. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  347. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  348. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  349. package/Types/Telemetry/CompatibleIngest.js +123 -0
  350. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  351. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  352. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  353. package/Types/Telemetry/TelemetryIngestSurface.js +54 -12
  354. package/Types/TimezoneAlias.d.mts +1 -0
  355. package/Types/TimezoneAlias.d.ts +1 -0
  356. package/Types/TimezoneAlias.js +13 -0
  357. package/Types/Translator.d.mts +1 -0
  358. package/Types/Translator.d.ts +1 -0
  359. package/Types/Translator.js +414 -50
  360. package/Types/Translator.mjs +1 -0
  361. package/Types/UsedBy/UsedBy.d.mts +103 -0
  362. package/Types/UsedBy/UsedBy.d.ts +103 -0
  363. package/Types/UsedBy/UsedBy.js +389 -0
  364. package/Types/UsedBy/UsedBy.mjs +20 -0
  365. package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
  366. package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
  367. package/Types/UsedBy/UsedByServerProducts.js +48 -0
  368. package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
  369. package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
  370. package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
  371. package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
  372. package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
  373. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
  374. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
  375. package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
  376. package/Types/Workflow/PassedOnFields.js +2 -1
  377. package/Types/Workflow/RunRecord.js +1 -1
  378. package/Types/Workflow/Templates.js +3 -3
  379. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  380. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  381. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +28 -1
  382. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +28 -1
  383. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  384. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  385. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  386. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  387. package/Utils/AI/MeaningMatch.d.mts +36 -0
  388. package/Utils/AI/MeaningMatch.d.ts +36 -0
  389. package/Utils/AI/MeaningMatch.js +535 -0
  390. package/Utils/AI/MeaningMatch.mjs +7 -0
  391. package/Utils/ArchivableValues.js +1 -1
  392. package/Utils/AuditLog/AuditLogValues.js +2 -2
  393. package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
  394. package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
  395. package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
  396. package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
  397. package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
  398. package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
  399. package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
  400. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  401. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  402. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  403. package/Utils/DataSecurity/TextScanner.js +2 -2
  404. package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
  405. package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
  406. package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
  407. package/Utils/DeveloperDocs/CliCommands.js +2 -1
  408. package/Utils/DeveloperDocs/CliResources.js +2 -1
  409. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  410. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  411. package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
  412. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  413. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  414. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  415. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  416. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  417. package/Utils/HostAddressUtil.d.mts +1 -0
  418. package/Utils/HostAddressUtil.d.ts +1 -0
  419. package/Utils/HostAddressUtil.js +30 -0
  420. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  421. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
  422. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
  423. package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
  424. package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
  425. package/Utils/Markdown/MarkdownTableCell.js +2 -1
  426. package/Utils/Markdown/OverLongText.js +523 -5
  427. package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
  428. package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
  429. package/Utils/Markdown/SlowMarkdown.js +595 -11
  430. package/Utils/Markdown/SlowMarkdown.mjs +6 -0
  431. package/Utils/Milliseconds.d.mts +7 -0
  432. package/Utils/Milliseconds.d.ts +7 -0
  433. package/Utils/Milliseconds.js +60 -0
  434. package/Utils/Milliseconds.mjs +4 -0
  435. package/Utils/ModelApiName.d.mts +11 -0
  436. package/Utils/ModelApiName.d.ts +11 -0
  437. package/Utils/ModelApiName.js +72 -0
  438. package/Utils/ModelApiName.mjs +5 -0
  439. package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
  440. package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
  441. package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
  442. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  443. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  444. package/Utils/Monitor/EndpointAttachmentUtil.js +97 -22
  445. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  446. package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
  447. package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
  448. package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
  449. package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
  450. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  451. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  452. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  453. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  454. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  455. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  456. package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
  457. package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
  458. package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
  459. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
  460. package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
  461. package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
  462. package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
  463. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  464. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  465. package/Utils/Monitor/MonitoringOff.js +21 -0
  466. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  467. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  468. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  469. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  470. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  471. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  472. package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
  473. package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
  474. package/Utils/Monitor/ProbeFailureReading.js +137 -0
  475. package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
  476. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  477. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  478. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  479. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  480. package/Utils/OpenStack/OpenStackCheckName.js +2 -1
  481. package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
  482. package/Utils/OpenStack/OpenStackLogs.js +3 -2
  483. package/Utils/OpenStack/OpenStackTraces.js +2 -1
  484. package/Utils/Project/NextNumber.js +1 -1
  485. package/Utils/Project/NotificationChannels.js +5 -5
  486. package/Utils/Project/ProjectBalance.js +2 -2
  487. package/Utils/Project/TwilioAccount.js +2 -2
  488. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  489. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  490. package/Utils/PromQL/PromQLAst.js +118 -0
  491. package/Utils/PromQL/PromQLAst.mjs +12 -0
  492. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  493. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  494. package/Utils/PromQL/PromQLDuration.js +78 -0
  495. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  496. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  497. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  498. package/Utils/PromQL/PromQLEngine.js +965 -0
  499. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  500. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  501. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  502. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  503. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  504. package/Utils/PromQL/PromQLError.d.mts +11 -0
  505. package/Utils/PromQL/PromQLError.d.ts +11 -0
  506. package/Utils/PromQL/PromQLError.js +27 -0
  507. package/Utils/PromQL/PromQLError.mjs +3 -0
  508. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  509. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  510. package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
  511. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  512. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  513. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  514. package/Utils/PromQL/PromQLFunctions.js +127 -0
  515. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  516. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  517. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  518. package/Utils/PromQL/PromQLLabels.js +218 -0
  519. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  520. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  521. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  522. package/Utils/PromQL/PromQLLexer.js +391 -0
  523. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  524. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  525. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  526. package/Utils/PromQL/PromQLMath.js +200 -0
  527. package/Utils/PromQL/PromQLMath.mjs +9 -0
  528. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  529. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  530. package/Utils/PromQL/PromQLMetricNames.js +199 -0
  531. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  532. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  533. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  534. package/Utils/PromQL/PromQLParser.js +831 -0
  535. package/Utils/PromQL/PromQLParser.mjs +4 -0
  536. package/Utils/PromQL/PromQLRegex.d.mts +9 -0
  537. package/Utils/PromQL/PromQLRegex.d.ts +9 -0
  538. package/Utils/PromQL/PromQLRegex.js +74 -0
  539. package/Utils/PromQL/PromQLRegex.mjs +2 -0
  540. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  541. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  542. package/Utils/PromQL/PrometheusResponse.js +90 -0
  543. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  544. package/Utils/Rum/PathInSentence.d.mts +5 -0
  545. package/Utils/Rum/PathInSentence.d.ts +5 -0
  546. package/Utils/Rum/PathInSentence.js +46 -0
  547. package/Utils/Rum/PathInSentence.mjs +6 -0
  548. package/Utils/Rum/UrlScrubber.d.mts +4 -0
  549. package/Utils/Rum/UrlScrubber.d.ts +4 -0
  550. package/Utils/Rum/UrlScrubber.js +143 -3
  551. package/Utils/Rum/UserFlow.d.mts +1 -1
  552. package/Utils/Rum/UserFlow.d.ts +1 -1
  553. package/Utils/Rum/UserFlow.js +180 -25
  554. package/Utils/Rum/UserFlow.mjs +1 -1
  555. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  556. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  557. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  558. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  559. package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
  560. package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
  561. package/Utils/ScheduledMaintenanceStart.js +9 -0
  562. package/Utils/Schema/ModelSchema.js +10 -1
  563. package/Utils/Schema/TypeSchemas.js +6 -0
  564. package/Utils/Slo/SloDuration.d.mts +5 -2
  565. package/Utils/Slo/SloDuration.d.ts +5 -2
  566. package/Utils/Slo/SloDuration.js +11 -6
  567. package/Utils/Slo/SloHealth.js +1 -1
  568. package/Utils/StateOrder.js +1 -4
  569. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  570. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  571. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  572. package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
  573. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  574. package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
  575. package/Utils/ValueFormatter.d.mts +8 -6
  576. package/Utils/ValueFormatter.d.ts +8 -6
  577. package/Utils/ValueFormatter.js +145 -0
  578. package/package.json +1 -1
@@ -0,0 +1,383 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getProductOffMessage = exports.SERVER_PRODUCTS_SETTINGS_PATH = exports.withProductSwitched = exports.withPreset = exports.shouldSuggestStoppingIngestion = exports.isProductOffOnServer = exports.getOffProducts = exports.getServerProductsOff = exports.parseServerProductsStartingValue = exports.SERVER_PRODUCTS_ENV_VAR = exports.toServerProductsSettingsJSON = exports.parseServerProductsSettings = exports.isServerProductOffReason = exports.ServerProductOffReason = exports.TELEMETRY_INGESTION_PRODUCTS = exports.getPresetOf = exports.getOffByPreset = exports.getOffFromOn = exports.isServerProductsPreset = exports.PRESET_TITLES = exports.PRODUCTS_OF_PRESET = exports.SERVER_PRODUCTS_PRESETS = exports.ServerProductsPreset = exports.SWITCHABLE_PRODUCTS = exports.isSwitchableProduct = void 0;
37
+ const ProductCatalog_1 = require("./ProductCatalog");
38
+ const ProductKey_1 = __importStar(require("./ProductKey"));
39
+ const ProjectProducts_1 = require("./ProjectProducts");
40
+ /*
41
+ * THE PRODUCTS A SERVER SWITCHES OFF FOR EVERY PROJECT (#6815, #2471).
42
+ *
43
+ * Many self-hosted servers run OneUptime for one job: watch some websites,
44
+ * publish a status page. Their admin switches the rest off on Admin
45
+ * Dashboard > Settings > Products, with a switch per product or a preset in
46
+ * one click, and every project on the server shows only what is left.
47
+ *
48
+ * Off is stronger than anything a project or a person chooses
49
+ * (ProjectProducts.getProductPlacement): an off product is in no menu, not
50
+ * on Home, not found by Search, not under More products, not pinned, and on
51
+ * Project Settings > Products it reads "Switched off on this server" instead
52
+ * of a switch. Its pages say it is switched off and who can switch it on,
53
+ * and the API refuses to create, change or delete its records
54
+ * (Server/Utils/ServerProducts). Reads keep working: products that are on
55
+ * show records of others (an incident names its monitors).
56
+ *
57
+ * Off changes what people see and use, never what is kept or what runs:
58
+ * nothing is deleted, monitors keep checking, published status pages stay
59
+ * up, and telemetry keeps arriving unless the admin also stops ingestion
60
+ * (DISABLE_TELEMETRY_INGESTION).
61
+ *
62
+ * WHERE THE LIST COMES FROM
63
+ *
64
+ * 1. What an admin saved on the Admin Dashboard: GlobalConfig.
65
+ * serverProducts, read with parseServerProductsSettings. Once saved,
66
+ * it is the source.
67
+ * 2. Until then, the starting value: SERVER_PRODUCTS in config.env (Helm:
68
+ * products.onThisServer), for servers configured as code
69
+ * (parseServerProductsStartingValue). Unset, every product is on, so an
70
+ * upgrade changes nothing.
71
+ * 3. On top of either, when DISABLE_TELEMETRY_INGESTION is set, the
72
+ * telemetry products (TELEMETRY_INGESTION_PRODUCTS) are off too, for
73
+ * that reason: nothing new can reach them.
74
+ *
75
+ * Pure: the server, the Dashboard, the Admin Dashboard and their tests read
76
+ * it.
77
+ */
78
+ /*
79
+ * The products a server can switch off: every product but Users, Teams and
80
+ * Project Settings, which a project needs to run itself - the same ones a
81
+ * project can never hide.
82
+ */
83
+ exports.isSwitchableProduct = ProjectProducts_1.isHideableProduct;
84
+ exports.SWITCHABLE_PRODUCTS = ProductKey_1.PRODUCT_KEYS.filter(exports.isSwitchableProduct);
85
+ // One click on the Admin Dashboard: the products it keeps on.
86
+ var ServerProductsPreset;
87
+ (function (ServerProductsPreset) {
88
+ ServerProductsPreset["MonitoringAndStatusPages"] = "monitoring-and-status-pages";
89
+ ServerProductsPreset["IncidentResponse"] = "incident-response";
90
+ ServerProductsPreset["Everything"] = "everything";
91
+ })(ServerProductsPreset || (exports.ServerProductsPreset = ServerProductsPreset = {}));
92
+ // The presets, smallest first, as the page offers them.
93
+ exports.SERVER_PRODUCTS_PRESETS = [
94
+ ServerProductsPreset.MonitoringAndStatusPages,
95
+ ServerProductsPreset.IncidentResponse,
96
+ ServerProductsPreset.Everything,
97
+ ];
98
+ /*
99
+ * What each preset keeps on. Monitoring and status pages is the server that
100
+ * watches websites and tells customers (#528): a monitor opens an incident,
101
+ * the person who looks after it is paged, the status page shows it, and
102
+ * planned work is announced. On-Call Duty is in it because a monitor that
103
+ * can tell nobody is not monitoring: "Know when my website is down", the
104
+ * first thing Home offers, ends in a test page through an on-call policy.
105
+ * Incident response adds what a team on call uses to answer and learn:
106
+ * alerts, SLOs, workflows and runbooks.
107
+ */
108
+ exports.PRODUCTS_OF_PRESET = {
109
+ [ServerProductsPreset.MonitoringAndStatusPages]: [
110
+ ProductKey_1.default.Monitors,
111
+ ProductKey_1.default.Incidents,
112
+ ProductKey_1.default.OnCall,
113
+ ProductKey_1.default.StatusPages,
114
+ ProductKey_1.default.ScheduledMaintenance,
115
+ ],
116
+ [ServerProductsPreset.IncidentResponse]: [
117
+ ProductKey_1.default.Monitors,
118
+ ProductKey_1.default.Incidents,
119
+ ProductKey_1.default.Alerts,
120
+ ProductKey_1.default.OnCall,
121
+ ProductKey_1.default.StatusPages,
122
+ ProductKey_1.default.ScheduledMaintenance,
123
+ ProductKey_1.default.Slos,
124
+ ProductKey_1.default.Workflows,
125
+ ProductKey_1.default.Runbooks,
126
+ ],
127
+ [ServerProductsPreset.Everything]: exports.SWITCHABLE_PRODUCTS,
128
+ };
129
+ exports.PRESET_TITLES = {
130
+ [ServerProductsPreset.MonitoringAndStatusPages]: "Monitoring and status pages",
131
+ [ServerProductsPreset.IncidentResponse]: "Incident response",
132
+ [ServerProductsPreset.Everything]: "Everything",
133
+ };
134
+ const isServerProductsPreset = (value) => {
135
+ return (typeof value === "string" &&
136
+ exports.SERVER_PRODUCTS_PRESETS.includes(value));
137
+ };
138
+ exports.isServerProductsPreset = isServerProductsPreset;
139
+ // The products a server keeps on, as a list of the ones it switches off.
140
+ const getOffFromOn = (on) => {
141
+ return exports.SWITCHABLE_PRODUCTS.filter((product) => {
142
+ return !on.includes(product);
143
+ });
144
+ };
145
+ exports.getOffFromOn = getOffFromOn;
146
+ // The products a preset switches off, in the menu's order.
147
+ const getOffByPreset = (preset) => {
148
+ return (0, exports.getOffFromOn)(exports.PRODUCTS_OF_PRESET[preset]);
149
+ };
150
+ exports.getOffByPreset = getOffByPreset;
151
+ // The preset these products are, exactly, or null for a choice of one's own.
152
+ const getPresetOf = (off) => {
153
+ const offSet = new Set(off.filter((product) => {
154
+ return (0, exports.isSwitchableProduct)(product);
155
+ }));
156
+ for (const preset of exports.SERVER_PRODUCTS_PRESETS) {
157
+ const byPreset = (0, exports.getOffByPreset)(preset);
158
+ if (byPreset.length === offSet.size &&
159
+ byPreset.every((product) => {
160
+ return offSet.has(product);
161
+ })) {
162
+ return preset;
163
+ }
164
+ }
165
+ return null;
166
+ };
167
+ exports.getPresetOf = getPresetOf;
168
+ /*
169
+ * The products that show only what telemetry ingestion brings - OpenTelemetry
170
+ * logs, metrics, traces and profiles, Fluentd, Syslog and Pyroscope - and are
171
+ * off while DISABLE_TELEMETRY_INGESTION is set. Monitors write their own
172
+ * results, so the products built on them (and on records) stay on.
173
+ */
174
+ exports.TELEMETRY_INGESTION_PRODUCTS = [
175
+ ProductKey_1.default.Logs,
176
+ ProductKey_1.default.Metrics,
177
+ ProductKey_1.default.Traces,
178
+ ProductKey_1.default.Profiles,
179
+ ProductKey_1.default.Exceptions,
180
+ ];
181
+ // Why a product is off on this server.
182
+ var ServerProductOffReason;
183
+ (function (ServerProductOffReason) {
184
+ // An admin switched it off, or SERVER_PRODUCTS left it out.
185
+ ServerProductOffReason["SwitchedOff"] = "switched-off";
186
+ // DISABLE_TELEMETRY_INGESTION is set: nothing new can reach it.
187
+ ServerProductOffReason["TelemetryIngestionStopped"] = "telemetry-ingestion-stopped";
188
+ })(ServerProductOffReason || (exports.ServerProductOffReason = ServerProductOffReason = {}));
189
+ const isServerProductOffReason = (value) => {
190
+ return (value === ServerProductOffReason.SwitchedOff ||
191
+ value === ServerProductOffReason.TelemetryIngestionStopped);
192
+ };
193
+ exports.isServerProductOffReason = isServerProductOffReason;
194
+ /*
195
+ * What an admin saved, or null when nobody has (the starting value applies).
196
+ * Unknown products, and the ones a server can never switch off, are left
197
+ * out: a stored value never switches off Project Settings.
198
+ */
199
+ const parseServerProductsSettings = (value) => {
200
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
201
+ return null;
202
+ }
203
+ const json = value;
204
+ if (!Array.isArray(json["off"])) {
205
+ return null;
206
+ }
207
+ const off = (0, ProductKey_1.parseProductKeys)(json["off"]);
208
+ return {
209
+ off: exports.SWITCHABLE_PRODUCTS.filter((product) => {
210
+ return off.includes(product);
211
+ }),
212
+ changedAt: typeof json["changedAt"] === "string" ? json["changedAt"] : null,
213
+ changedByUserId: typeof json["changedByUserId"] === "string"
214
+ ? json["changedByUserId"]
215
+ : null,
216
+ };
217
+ };
218
+ exports.parseServerProductsSettings = parseServerProductsSettings;
219
+ const toServerProductsSettingsJSON = (settings) => {
220
+ return {
221
+ off: [...settings.off],
222
+ changedAt: settings.changedAt,
223
+ changedByUserId: settings.changedByUserId,
224
+ };
225
+ };
226
+ exports.toServerProductsSettingsJSON = toServerProductsSettingsJSON;
227
+ // The environment variable that sets the starting value (config.env, Helm).
228
+ exports.SERVER_PRODUCTS_ENV_VAR = "SERVER_PRODUCTS";
229
+ /*
230
+ * The starting value SERVER_PRODUCTS gives: empty or "everything" keeps
231
+ * every product on; a preset's name, that preset; otherwise a list of the
232
+ * products to keep on, by their keys, separated by commas or spaces
233
+ * ("monitors, incidents, status-pages"). Users, Teams and Project Settings
234
+ * are always on. A value that names no product at all keeps everything on -
235
+ * a typo must not switch a whole server off - and every name it did not
236
+ * know is reported, so the server can say so in its log.
237
+ */
238
+ const parseServerProductsStartingValue = (value) => {
239
+ const names = (value || "")
240
+ .split(/[\s,]+/)
241
+ .map((name) => {
242
+ return name.trim().toLowerCase();
243
+ })
244
+ .filter((name) => {
245
+ return name.length > 0;
246
+ });
247
+ if (names.length === 0) {
248
+ return {
249
+ off: [],
250
+ preset: ServerProductsPreset.Everything,
251
+ unknownNames: [],
252
+ };
253
+ }
254
+ if (names.length === 1 && (0, exports.isServerProductsPreset)(names[0])) {
255
+ const preset = names[0];
256
+ return { off: (0, exports.getOffByPreset)(preset), preset: preset, unknownNames: [] };
257
+ }
258
+ const on = [];
259
+ const unknownNames = [];
260
+ for (const name of names) {
261
+ if ((0, ProductKey_1.isProductKey)(name)) {
262
+ if (!on.includes(name)) {
263
+ on.push(name);
264
+ }
265
+ continue;
266
+ }
267
+ if (!unknownNames.includes(name)) {
268
+ unknownNames.push(name);
269
+ }
270
+ }
271
+ const switchableOn = on.filter(exports.isSwitchableProduct);
272
+ if (switchableOn.length === 0) {
273
+ return {
274
+ off: [],
275
+ preset: ServerProductsPreset.Everything,
276
+ unknownNames: unknownNames,
277
+ };
278
+ }
279
+ const off = (0, exports.getOffFromOn)(switchableOn);
280
+ return { off: off, preset: (0, exports.getPresetOf)(off), unknownNames: unknownNames };
281
+ };
282
+ exports.parseServerProductsStartingValue = parseServerProductsStartingValue;
283
+ /*
284
+ * What is off on the server, and why: what an admin saved or, until then,
285
+ * the starting value - and, while ingestion is stopped, the telemetry
286
+ * products, for that reason. Ingestion's reason wins: switching such a
287
+ * product on brings nothing back while nothing can arrive.
288
+ */
289
+ const getServerProductsOff = (data) => {
290
+ const switchedOff = data.settings
291
+ ? data.settings.off
292
+ : data.startingValue;
293
+ const off = {};
294
+ for (const product of exports.SWITCHABLE_PRODUCTS) {
295
+ if (data.isTelemetryIngestionStopped &&
296
+ exports.TELEMETRY_INGESTION_PRODUCTS.includes(product)) {
297
+ off[product] = ServerProductOffReason.TelemetryIngestionStopped;
298
+ continue;
299
+ }
300
+ if (switchedOff.includes(product)) {
301
+ off[product] = ServerProductOffReason.SwitchedOff;
302
+ }
303
+ }
304
+ return off;
305
+ };
306
+ exports.getServerProductsOff = getServerProductsOff;
307
+ // The products that are off, in the menu's order.
308
+ const getOffProducts = (off) => {
309
+ return ProductKey_1.PRODUCT_KEYS.filter((product) => {
310
+ return Boolean(off[product]);
311
+ });
312
+ };
313
+ exports.getOffProducts = getOffProducts;
314
+ const isProductOffOnServer = (off, product) => {
315
+ return Boolean(off[product]);
316
+ };
317
+ exports.isProductOffOnServer = isProductOffOnServer;
318
+ /*
319
+ * Whether the page should say "You can also stop telemetry ingestion to
320
+ * save memory": every telemetry product is switched off, and ingestion
321
+ * still runs, receiving data nothing on this server shows.
322
+ */
323
+ const shouldSuggestStoppingIngestion = (data) => {
324
+ if (data.isTelemetryIngestionStopped) {
325
+ return false;
326
+ }
327
+ return exports.TELEMETRY_INGESTION_PRODUCTS.every((product) => {
328
+ return data.off[product] === ServerProductOffReason.SwitchedOff;
329
+ });
330
+ };
331
+ exports.shouldSuggestStoppingIngestion = shouldSuggestStoppingIngestion;
332
+ // The settings after an admin applies a preset.
333
+ const withPreset = (data) => {
334
+ return {
335
+ off: (0, exports.getOffByPreset)(data.preset),
336
+ changedAt: data.now.toISOString(),
337
+ changedByUserId: data.userId,
338
+ };
339
+ };
340
+ exports.withPreset = withPreset;
341
+ /*
342
+ * The settings after an admin switches one product on or off, starting from
343
+ * what is switched off now (saved, or the starting value). A product that
344
+ * can never be switched off is left as it is.
345
+ */
346
+ const withProductSwitched = (data) => {
347
+ const off = new Set(data.currentOff);
348
+ if ((0, exports.isSwitchableProduct)(data.product)) {
349
+ if (data.isOn) {
350
+ off.delete(data.product);
351
+ }
352
+ else {
353
+ off.add(data.product);
354
+ }
355
+ }
356
+ return {
357
+ off: exports.SWITCHABLE_PRODUCTS.filter((product) => {
358
+ return off.has(product);
359
+ }),
360
+ changedAt: data.now.toISOString(),
361
+ changedByUserId: data.userId,
362
+ };
363
+ };
364
+ exports.withProductSwitched = withProductSwitched;
365
+ /*
366
+ * Where a server's admin switches products on, as a person reads it - the
367
+ * same words in the API's refusal, on the "switched off" page and in Ask
368
+ * AI's answer.
369
+ */
370
+ exports.SERVER_PRODUCTS_SETTINGS_PATH = "Admin Dashboard > Settings > Products";
371
+ /*
372
+ * Why a product is off, and what to do next, in one or two sentences: what
373
+ * the API answers when it refuses a change, and what Ask AI is told to say.
374
+ * Nothing in it is anybody's data.
375
+ */
376
+ const getProductOffMessage = (data) => {
377
+ const title = (0, ProductCatalog_1.getProductTitle)(data.product);
378
+ if (data.reason === ServerProductOffReason.TelemetryIngestionStopped) {
379
+ return `${title} is off because telemetry ingestion is stopped on this server. A server admin can start it again by setting DISABLE_TELEMETRY_INGESTION to false and restarting OneUptime. Nothing was deleted.`;
380
+ }
381
+ return `${title} is switched off on this server. A server admin can switch it on in ${exports.SERVER_PRODUCTS_SETTINGS_PATH}. Nothing was deleted.`;
382
+ };
383
+ exports.getProductOffMessage = getProductOffMessage;
@@ -0,0 +1,26 @@
1
+ import commonJsModule from "./ServerProducts.js";
2
+ export const PRESET_TITLES = commonJsModule.PRESET_TITLES;
3
+ export const PRODUCTS_OF_PRESET = commonJsModule.PRODUCTS_OF_PRESET;
4
+ export const SERVER_PRODUCTS_ENV_VAR = commonJsModule.SERVER_PRODUCTS_ENV_VAR;
5
+ export const SERVER_PRODUCTS_PRESETS = commonJsModule.SERVER_PRODUCTS_PRESETS;
6
+ export const SERVER_PRODUCTS_SETTINGS_PATH = commonJsModule.SERVER_PRODUCTS_SETTINGS_PATH;
7
+ export const SWITCHABLE_PRODUCTS = commonJsModule.SWITCHABLE_PRODUCTS;
8
+ export const ServerProductOffReason = commonJsModule.ServerProductOffReason;
9
+ export const ServerProductsPreset = commonJsModule.ServerProductsPreset;
10
+ export const TELEMETRY_INGESTION_PRODUCTS = commonJsModule.TELEMETRY_INGESTION_PRODUCTS;
11
+ export const getOffByPreset = commonJsModule.getOffByPreset;
12
+ export const getOffFromOn = commonJsModule.getOffFromOn;
13
+ export const getOffProducts = commonJsModule.getOffProducts;
14
+ export const getPresetOf = commonJsModule.getPresetOf;
15
+ export const getProductOffMessage = commonJsModule.getProductOffMessage;
16
+ export const getServerProductsOff = commonJsModule.getServerProductsOff;
17
+ export const isProductOffOnServer = commonJsModule.isProductOffOnServer;
18
+ export const isServerProductOffReason = commonJsModule.isServerProductOffReason;
19
+ export const isServerProductsPreset = commonJsModule.isServerProductsPreset;
20
+ export const isSwitchableProduct = commonJsModule.isSwitchableProduct;
21
+ export const parseServerProductsSettings = commonJsModule.parseServerProductsSettings;
22
+ export const parseServerProductsStartingValue = commonJsModule.parseServerProductsStartingValue;
23
+ export const shouldSuggestStoppingIngestion = commonJsModule.shouldSuggestStoppingIngestion;
24
+ export const toServerProductsSettingsJSON = commonJsModule.toServerProductsSettingsJSON;
25
+ export const withPreset = commonJsModule.withPreset;
26
+ export const withProductSwitched = commonJsModule.withProductSwitched;
@@ -0,0 +1,21 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import ProductKey from "./ProductKey.mjs";
3
+ import { ServerProductsOff, ServerProductsPreset } from "./ServerProducts.mjs";
4
+ export declare const SERVER_PRODUCTS_ROUTE: string;
5
+ export declare enum ServerProductsSource {
6
+ Saved = "saved",
7
+ StartingValue = "starting-value"
8
+ }
9
+ export interface ServerProductsAnswer {
10
+ off: ServerProductsOff;
11
+ switchedOff: Array<ProductKey>;
12
+ preset: ServerProductsPreset | null;
13
+ source: ServerProductsSource;
14
+ startingValue: string;
15
+ startingValueUnknownNames: Array<string>;
16
+ isTelemetryIngestionStopped: boolean;
17
+ shouldSuggestStoppingIngestion: boolean;
18
+ changedAt: string | null;
19
+ }
20
+ export declare const parseServerProductsAnswer: (value: unknown) => ServerProductsAnswer | null;
21
+ export declare const toServerProductsAnswerJSON: (answer: ServerProductsAnswer) => JSONObject;
@@ -0,0 +1,21 @@
1
+ import { JSONObject } from "../JSON";
2
+ import ProductKey from "./ProductKey";
3
+ import { ServerProductsOff, ServerProductsPreset } from "./ServerProducts";
4
+ export declare const SERVER_PRODUCTS_ROUTE: string;
5
+ export declare enum ServerProductsSource {
6
+ Saved = "saved",
7
+ StartingValue = "starting-value"
8
+ }
9
+ export interface ServerProductsAnswer {
10
+ off: ServerProductsOff;
11
+ switchedOff: Array<ProductKey>;
12
+ preset: ServerProductsPreset | null;
13
+ source: ServerProductsSource;
14
+ startingValue: string;
15
+ startingValueUnknownNames: Array<string>;
16
+ isTelemetryIngestionStopped: boolean;
17
+ shouldSuggestStoppingIngestion: boolean;
18
+ changedAt: string | null;
19
+ }
20
+ export declare const parseServerProductsAnswer: (value: unknown) => ServerProductsAnswer | null;
21
+ export declare const toServerProductsAnswerJSON: (answer: ServerProductsAnswer) => JSONObject;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toServerProductsAnswerJSON = exports.parseServerProductsAnswer = exports.ServerProductsSource = exports.SERVER_PRODUCTS_ROUTE = void 0;
4
+ const ProductKey_1 = require("./ProductKey");
5
+ const ProjectProductsAnswer_1 = require("./ProjectProductsAnswer");
6
+ const ServerProducts_1 = require("./ServerProducts");
7
+ /*
8
+ * WHAT ADMIN DASHBOARD > SETTINGS > PRODUCTS READS AND CHANGES (#6815).
9
+ *
10
+ * GET /global-config/server-products the answer below. A master admin,
11
+ * or the server's master API key
12
+ * (read-only: `npm run doctor`).
13
+ * POST /global-config/server-products { preset } - one click: the
14
+ * products a preset keeps on;
15
+ * { product, isOn } - one switch.
16
+ * A master admin. Answers the new
17
+ * answer.
18
+ *
19
+ * Server/Utils/ServerProducts works it out, Types/Product/ServerProducts
20
+ * holds the rules.
21
+ */
22
+ exports.SERVER_PRODUCTS_ROUTE = "/global-config/server-products";
23
+ // Where the switches' positions come from.
24
+ var ServerProductsSource;
25
+ (function (ServerProductsSource) {
26
+ // A master admin saved the page.
27
+ ServerProductsSource["Saved"] = "saved";
28
+ // Nobody has: SERVER_PRODUCTS, or every product on when it is unset.
29
+ ServerProductsSource["StartingValue"] = "starting-value";
30
+ })(ServerProductsSource || (exports.ServerProductsSource = ServerProductsSource = {}));
31
+ const parseServerProductsAnswer = (value) => {
32
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
33
+ return null;
34
+ }
35
+ const json = value;
36
+ const switchedOff = (0, ProductKey_1.parseProductKeys)(json["switchedOff"]);
37
+ return {
38
+ off: (0, ProjectProductsAnswer_1.parseServerProductsOff)(json["off"]),
39
+ switchedOff: ProductKey_1.PRODUCT_KEYS.filter((product) => {
40
+ return (0, ServerProducts_1.isSwitchableProduct)(product) && switchedOff.includes(product);
41
+ }),
42
+ preset: (0, ServerProducts_1.isServerProductsPreset)(json["preset"]) ? json["preset"] : null,
43
+ source: json["source"] === ServerProductsSource.Saved
44
+ ? ServerProductsSource.Saved
45
+ : ServerProductsSource.StartingValue,
46
+ startingValue: typeof json["startingValue"] === "string" ? json["startingValue"] : "",
47
+ startingValueUnknownNames: Array.isArray(json["startingValueUnknownNames"])
48
+ ? json["startingValueUnknownNames"].filter((name) => {
49
+ return typeof name === "string";
50
+ })
51
+ : [],
52
+ isTelemetryIngestionStopped: json["isTelemetryIngestionStopped"] === true,
53
+ shouldSuggestStoppingIngestion: json["shouldSuggestStoppingIngestion"] === true,
54
+ changedAt: typeof json["changedAt"] === "string" ? json["changedAt"] : null,
55
+ };
56
+ };
57
+ exports.parseServerProductsAnswer = parseServerProductsAnswer;
58
+ const toServerProductsAnswerJSON = (answer) => {
59
+ const off = {};
60
+ for (const product of ProductKey_1.PRODUCT_KEYS) {
61
+ const reason = answer.off[product];
62
+ if (reason) {
63
+ off[product] = reason;
64
+ }
65
+ }
66
+ return {
67
+ off: off,
68
+ switchedOff: [...answer.switchedOff],
69
+ preset: answer.preset,
70
+ source: answer.source,
71
+ startingValue: answer.startingValue,
72
+ startingValueUnknownNames: [...answer.startingValueUnknownNames],
73
+ isTelemetryIngestionStopped: answer.isTelemetryIngestionStopped,
74
+ shouldSuggestStoppingIngestion: answer.shouldSuggestStoppingIngestion,
75
+ changedAt: answer.changedAt,
76
+ };
77
+ };
78
+ exports.toServerProductsAnswerJSON = toServerProductsAnswerJSON;
@@ -0,0 +1,5 @@
1
+ import commonJsModule from "./ServerProductsAnswer.js";
2
+ export const SERVER_PRODUCTS_ROUTE = commonJsModule.SERVER_PRODUCTS_ROUTE;
3
+ export const ServerProductsSource = commonJsModule.ServerProductsSource;
4
+ export const parseServerProductsAnswer = commonJsModule.parseServerProductsAnswer;
5
+ export const toServerProductsAnswerJSON = commonJsModule.toServerProductsAnswerJSON;
@@ -61,7 +61,8 @@ export declare enum FeedbackQuestionDecision {
61
61
  PersonOff = "person_off",
62
62
  AlreadyAsked = "already_asked",
63
63
  IncidentOpen = "incident_open",
64
- AskedRecently = "asked_recently"
64
+ AskedRecently = "asked_recently",
65
+ SampleProject = "sample_project"
65
66
  }
66
67
  export declare const decideFeedbackQuestion: (data: {
67
68
  key: string;
@@ -70,6 +71,7 @@ export declare const decideFeedbackQuestion: (data: {
70
71
  asked: Record<string, string>;
71
72
  isIncidentOpen: boolean;
72
73
  now: Date;
74
+ isSampleProject?: boolean | undefined;
73
75
  }) => FeedbackQuestionDecision;
74
76
  export declare const isCheckInDue: (data: {
75
77
  projectCreatedAt: Date | string | null | undefined;
@@ -61,7 +61,8 @@ export declare enum FeedbackQuestionDecision {
61
61
  PersonOff = "person_off",
62
62
  AlreadyAsked = "already_asked",
63
63
  IncidentOpen = "incident_open",
64
- AskedRecently = "asked_recently"
64
+ AskedRecently = "asked_recently",
65
+ SampleProject = "sample_project"
65
66
  }
66
67
  export declare const decideFeedbackQuestion: (data: {
67
68
  key: string;
@@ -70,6 +71,7 @@ export declare const decideFeedbackQuestion: (data: {
70
71
  asked: Record<string, string>;
71
72
  isIncidentOpen: boolean;
72
73
  now: Date;
74
+ isSampleProject?: boolean | undefined;
73
75
  }) => FeedbackQuestionDecision;
74
76
  export declare const isCheckInDue: (data: {
75
77
  projectCreatedAt: Date | string | null | undefined;
@@ -341,6 +341,11 @@ var FeedbackQuestionDecision;
341
341
  FeedbackQuestionDecision["IncidentOpen"] = "incident_open";
342
342
  // Another question was asked in the last FEEDBACK_QUESTION_GAP_DAYS days.
343
343
  FeedbackQuestionDecision["AskedRecently"] = "asked_recently";
344
+ /*
345
+ * The project is a sample (issue #6808): made up for looking around, so
346
+ * nothing done in it says how OneUptime is to use. Never asked there.
347
+ */
348
+ FeedbackQuestionDecision["SampleProject"] = "sample_project";
344
349
  })(FeedbackQuestionDecision || (exports.FeedbackQuestionDecision = FeedbackQuestionDecision = {}));
345
350
  // Whether to ask a question now, and if not, why not.
346
351
  const decideFeedbackQuestion = (data) => {
@@ -350,6 +355,9 @@ const decideFeedbackQuestion = (data) => {
350
355
  if (!data.isPersonOn) {
351
356
  return FeedbackQuestionDecision.PersonOff;
352
357
  }
358
+ if (data.isSampleProject) {
359
+ return FeedbackQuestionDecision.SampleProject;
360
+ }
353
361
  if (data.asked[data.key]) {
354
362
  return FeedbackQuestionDecision.AlreadyAsked;
355
363
  }
@@ -4,6 +4,7 @@ export declare const toSupportedLanguage: (code: string | null | undefined, supp
4
4
  export declare const toDetectedLanguage: (tag: string, supportedLanguages: ReadonlyArray<string>) => string;
5
5
  export declare const getVisitorLanguage: (browserLanguages: ReadonlyArray<string>, supportedLanguages: ReadonlyArray<string>) => string;
6
6
  export declare const isReaderLanguage: (code: unknown) => boolean;
7
+ export declare const readRequestedReaderLanguage: (value: unknown) => string | undefined;
7
8
  export declare const toReaderLanguage: (code: string | null | undefined) => string;
8
9
  export declare const MAX_ACCEPT_LANGUAGE_LENGTH: number;
9
10
  export declare const MAX_ACCEPT_LANGUAGE_TAGS: number;
@@ -4,6 +4,7 @@ export declare const toSupportedLanguage: (code: string | null | undefined, supp
4
4
  export declare const toDetectedLanguage: (tag: string, supportedLanguages: ReadonlyArray<string>) => string;
5
5
  export declare const getVisitorLanguage: (browserLanguages: ReadonlyArray<string>, supportedLanguages: ReadonlyArray<string>) => string;
6
6
  export declare const isReaderLanguage: (code: unknown) => boolean;
7
+ export declare const readRequestedReaderLanguage: (value: unknown) => string | undefined;
7
8
  export declare const toReaderLanguage: (code: string | null | undefined) => string;
8
9
  export declare const MAX_ACCEPT_LANGUAGE_LENGTH: number;
9
10
  export declare const MAX_ACCEPT_LANGUAGE_TAGS: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReaderLanguageFromAcceptLanguage = exports.getAcceptLanguageTags = exports.MAX_ACCEPT_LANGUAGE_TAGS = exports.MAX_ACCEPT_LANGUAGE_LENGTH = exports.toReaderLanguage = exports.isReaderLanguage = exports.getVisitorLanguage = exports.toDetectedLanguage = exports.toSupportedLanguage = exports.READER_LANGUAGE_CODES = exports.DEFAULT_READER_LANGUAGE = void 0;
3
+ exports.getReaderLanguageFromAcceptLanguage = exports.getAcceptLanguageTags = exports.MAX_ACCEPT_LANGUAGE_TAGS = exports.MAX_ACCEPT_LANGUAGE_LENGTH = exports.toReaderLanguage = exports.readRequestedReaderLanguage = exports.isReaderLanguage = exports.getVisitorLanguage = exports.toDetectedLanguage = exports.toSupportedLanguage = exports.READER_LANGUAGE_CODES = exports.DEFAULT_READER_LANGUAGE = void 0;
4
4
  const DashboardLanguage_1 = require("./Dashboard/DashboardLanguage");
5
5
  /*
6
6
  * THE LANGUAGES ONEUPTIME WRITES IN, AND WHICH ONE A READER READS.
@@ -90,6 +90,18 @@ const isReaderLanguage = (code) => {
90
90
  return typeof code === "string" && exports.READER_LANGUAGE_CODES.includes(code);
91
91
  };
92
92
  exports.isReaderLanguage = isReaderLanguage;
93
+ /*
94
+ * The language a request names - a field of its body, sent by a frontend
95
+ * from the language it is read in - kept only when it is one of the codes
96
+ * OneUptime writes in, exactly as written ("de", "zh-TW"). Anything else -
97
+ * nothing, another type, a tag, text from outside - is undefined, so the
98
+ * caller decides what none means, and nothing sent here ever goes further
99
+ * than a code. Never longer than a code: no text is kept or read in parts.
100
+ */
101
+ const readRequestedReaderLanguage = (value) => {
102
+ return (0, exports.isReaderLanguage)(value) ? value : undefined;
103
+ };
104
+ exports.readRequestedReaderLanguage = readRequestedReaderLanguage;
93
105
  /*
94
106
  * One of the languages OneUptime writes in for a tag: "de-AT" is "de",
95
107
  * "zh-HK" is "zh-TW", and a tag it does not write in - or none - is
@@ -7,6 +7,7 @@ export const getAcceptLanguageTags = commonJsModule.getAcceptLanguageTags;
7
7
  export const getReaderLanguageFromAcceptLanguage = commonJsModule.getReaderLanguageFromAcceptLanguage;
8
8
  export const getVisitorLanguage = commonJsModule.getVisitorLanguage;
9
9
  export const isReaderLanguage = commonJsModule.isReaderLanguage;
10
+ export const readRequestedReaderLanguage = commonJsModule.readRequestedReaderLanguage;
10
11
  export const toDetectedLanguage = commonJsModule.toDetectedLanguage;
11
12
  export const toReaderLanguage = commonJsModule.toReaderLanguage;
12
13
  export const toSupportedLanguage = commonJsModule.toSupportedLanguage;
@@ -187,8 +187,8 @@ exports.RULE_RUN_TYPE_METADATA = {
187
187
  [RuleRunType.RumApplicationOwnerRule]: metadata(Owners, "RUM application", "RUM applications"),
188
188
  [RuleRunType.RunbookLabelRule]: metadata(Labels, "runbook", "runbooks"),
189
189
  [RuleRunType.RunbookOwnerRule]: metadata(Owners, "runbook", "runbooks"),
190
- [RuleRunType.ScheduledMaintenanceLabelRule]: metadata(Labels, "scheduled maintenance event", "scheduled maintenance events"),
191
- [RuleRunType.ScheduledMaintenanceOwnerRule]: metadata(Owners, "scheduled maintenance event", "scheduled maintenance events"),
190
+ [RuleRunType.ScheduledMaintenanceLabelRule]: metadata(Labels, "maintenance event", "maintenance events"),
191
+ [RuleRunType.ScheduledMaintenanceOwnerRule]: metadata(Owners, "maintenance event", "maintenance events"),
192
192
  [RuleRunType.ServerlessFunctionLabelRule]: metadata(Labels, "serverless function", "serverless functions"),
193
193
  [RuleRunType.ServerlessFunctionOwnerRule]: metadata(Owners, "serverless function", "serverless functions"),
194
194
  [RuleRunType.ServiceLabelRule]: metadata(Labels, "service", "services"),