@oneuptime/common 14.0.110 → 14.2.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 (527) hide show
  1. package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
  2. package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
  3. package/Models/DatabaseModels/AIRunRecording.js +181 -0
  4. package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
  5. package/Models/DatabaseModels/Alert.d.mts +1 -0
  6. package/Models/DatabaseModels/Alert.d.ts +1 -0
  7. package/Models/DatabaseModels/Alert.js +52 -2
  8. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
  9. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
  10. package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
  11. package/Models/DatabaseModels/DataStore.js +9 -0
  12. package/Models/DatabaseModels/EmailLog.js +2 -2
  13. package/Models/DatabaseModels/Form.js +3 -3
  14. package/Models/DatabaseModels/FormSubmission.js +4 -4
  15. package/Models/DatabaseModels/GlobalConfig.js +46 -45
  16. package/Models/DatabaseModels/Incident.d.mts +1 -0
  17. package/Models/DatabaseModels/Incident.d.ts +1 -0
  18. package/Models/DatabaseModels/Incident.js +53 -2
  19. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
  20. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
  21. package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
  22. package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
  23. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  24. package/Models/DatabaseModels/Index.js +6 -0
  25. package/Models/DatabaseModels/InventoryItem.js +11 -0
  26. package/Models/DatabaseModels/Monitor.js +51 -17
  27. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  28. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  29. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  30. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  31. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  32. package/Models/DatabaseModels/NetworkDevice.js +23 -7
  33. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  34. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  35. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  36. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  37. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
  38. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  39. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  40. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
  41. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  42. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  43. package/Models/DatabaseModels/Project.d.mts +1 -0
  44. package/Models/DatabaseModels/Project.d.ts +1 -0
  45. package/Models/DatabaseModels/Project.js +46 -3
  46. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  47. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  48. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  49. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  50. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  51. package/Models/DatabaseModels/RunbookRule.js +6 -6
  52. package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
  53. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  54. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  55. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  56. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
  57. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  58. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  59. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  60. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
  61. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  62. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
  63. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  64. package/Models/DatabaseModels/TeamMember.js +10 -1
  65. package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
  66. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  67. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  68. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  69. package/Server/Services/DatabaseService.d.mts +4 -1
  70. package/Server/Services/DatabaseService.d.ts +4 -1
  71. package/Server/Types/Database/CountBy.d.mts +1 -0
  72. package/Server/Types/Database/CountBy.d.ts +1 -0
  73. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  74. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  75. package/Types/AI/AIActionWords.d.mts +28 -2
  76. package/Types/AI/AIActionWords.d.ts +28 -2
  77. package/Types/AI/AIActionWords.js +235 -3
  78. package/Types/AI/AIActionWords.mjs +8 -0
  79. package/Types/AI/AIChatTypes.d.mts +3 -1
  80. package/Types/AI/AIChatTypes.d.ts +3 -1
  81. package/Types/AI/AIReadTableWords.d.mts +192 -0
  82. package/Types/AI/AIReadTableWords.d.ts +192 -0
  83. package/Types/AI/AIReadTableWords.js +368 -0
  84. package/Types/AI/AIReadTableWords.mjs +18 -0
  85. package/Types/AI/AiOutcomes.d.mts +57 -0
  86. package/Types/AI/AiOutcomes.d.ts +57 -0
  87. package/Types/AI/AiOutcomes.js +67 -0
  88. package/Types/AI/AiOutcomes.mjs +10 -0
  89. package/Types/AI/AiRunRefusal.d.mts +48 -0
  90. package/Types/AI/AiRunRefusal.d.ts +48 -0
  91. package/Types/AI/AiRunRefusal.js +208 -0
  92. package/Types/AI/AiRunRefusal.mjs +12 -0
  93. package/Types/AI/InvestigationRecording.d.mts +46 -0
  94. package/Types/AI/InvestigationRecording.d.ts +46 -0
  95. package/Types/AI/InvestigationRecording.js +42 -0
  96. package/Types/AI/InvestigationRecording.mjs +7 -0
  97. package/Types/AI/ResourceAiAccessPermissions.js +7 -18
  98. package/Types/API/HTTPResponse.d.mts +3 -0
  99. package/Types/API/HTTPResponse.d.ts +3 -0
  100. package/Types/API/HTTPResponse.js +15 -0
  101. package/Types/AuditLog/AuditLogActionLabel.js +19 -9
  102. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  103. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  104. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
  105. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
  106. package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -2
  107. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  108. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  109. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  110. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  111. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  112. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  113. package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
  114. package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
  115. package/Types/Cloud/CloudResourceHealth.js +405 -13
  116. package/Types/Cloud/CloudResourceHealth.mjs +28 -0
  117. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  118. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  119. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  120. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  121. package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
  122. package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
  123. package/Types/DataObservability/DataCheckRefusals.js +77 -0
  124. package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
  125. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
  126. package/Types/Date.d.mts +8 -1
  127. package/Types/Date.d.ts +8 -1
  128. package/Types/Date.js +61 -7
  129. package/Types/Date.mjs +1 -0
  130. package/Types/DateLanguage.d.mts +2 -0
  131. package/Types/DateLanguage.d.ts +2 -0
  132. package/Types/DateLanguage.js +8 -5
  133. package/Types/Email/EmailTemplateType.d.mts +1 -0
  134. package/Types/Email/EmailTemplateType.d.ts +1 -0
  135. package/Types/Email/EmailTemplateType.js +2 -0
  136. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  137. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  138. package/Types/Email/ServerEmailEnvironment.js +793 -0
  139. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  140. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  141. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  142. package/Types/Exception/AiRunRefusalException.js +23 -0
  143. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  144. package/Types/Exception/EgressGuardException.js +1 -1
  145. package/Types/Exception/ErrorMessageRule.d.mts +1 -0
  146. package/Types/Exception/ErrorMessageRule.d.ts +1 -0
  147. package/Types/Exception/ErrorMessageRule.js +67 -13
  148. package/Types/Exception/ErrorMessageRule.mjs +1 -0
  149. package/Types/Exception/ExceptionMessages.d.mts +2 -0
  150. package/Types/Exception/ExceptionMessages.d.ts +2 -0
  151. package/Types/Exception/ExceptionMessages.js +2 -0
  152. package/Types/Form/FormTargetCatalog.js +2 -2
  153. package/Types/Form/FormTargetType.js +2 -2
  154. package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
  155. package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
  156. package/Types/Incident/PostmortemActionItemStatus.js +74 -0
  157. package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
  158. package/Types/JSONFunctions.js +10 -3
  159. package/Types/Link.d.mts +1 -0
  160. package/Types/Link.d.ts +1 -0
  161. package/Types/ListData.d.mts +2 -0
  162. package/Types/ListData.d.ts +2 -0
  163. package/Types/ListData.js +4 -0
  164. package/Types/MeaningKeys.d.mts +4 -0
  165. package/Types/MeaningKeys.d.ts +4 -0
  166. package/Types/MeaningKeys.js +74 -0
  167. package/Types/MeaningKeys.mjs +5 -0
  168. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  169. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  170. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  171. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  172. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  173. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  174. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  175. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  176. package/Types/Monitor/WhoIsTold.d.mts +3 -0
  177. package/Types/Monitor/WhoIsTold.d.ts +3 -0
  178. package/Types/Monitor/WhoIsTold.js +63 -13
  179. package/Types/NoBreakSpaces.d.mts +16 -0
  180. package/Types/NoBreakSpaces.d.ts +16 -0
  181. package/Types/NoBreakSpaces.js +419 -0
  182. package/Types/NoBreakSpaces.mjs +9 -0
  183. package/Types/NotificationRule/PagingLadder.d.mts +12 -0
  184. package/Types/NotificationRule/PagingLadder.d.ts +12 -0
  185. package/Types/NotificationRule/PagingLadder.js +159 -11
  186. package/Types/NotificationRule/PagingLadder.mjs +3 -0
  187. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  188. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  189. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  190. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  191. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  192. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  193. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  194. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  195. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  196. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  197. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
  198. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
  199. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
  200. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
  201. package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
  202. package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
  203. package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
  204. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
  205. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
  206. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
  207. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
  208. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  209. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  210. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  211. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  212. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
  213. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
  214. package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
  215. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  216. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  217. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  218. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  219. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  220. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  221. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  222. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  223. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  224. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  225. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  226. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  227. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  228. package/Types/OpenStack/OpenStackCapacity.js +12 -5
  229. package/Types/Permission.d.mts +4 -0
  230. package/Types/Permission.d.ts +4 -0
  231. package/Types/Permission.js +66 -10
  232. package/Types/Probe/ProbeCapability.d.mts +2 -1
  233. package/Types/Probe/ProbeCapability.d.ts +2 -1
  234. package/Types/Probe/ProbeCapability.js +10 -0
  235. package/Types/Product/ProductUsage.js +2 -1
  236. package/Types/Product/ProjectProductsAnswer.js +2 -1
  237. package/Types/ReaderLanguage.d.mts +1 -0
  238. package/Types/ReaderLanguage.d.ts +1 -0
  239. package/Types/ReaderLanguage.js +13 -1
  240. package/Types/ReaderLanguage.mjs +1 -0
  241. package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
  242. package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
  243. package/Types/ResourceAiAgent/AiResourceType.js +12 -0
  244. package/Types/Rules/RuleRun.js +2 -2
  245. package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
  246. package/Types/Rum/ProductAnalyticsEvents.js +13 -1
  247. package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
  248. package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
  249. package/Types/Rum/SessionReplayCustomEvents.js +12 -0
  250. package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
  251. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  252. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  253. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  254. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  255. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  256. package/Types/SetupHealth/SetupHealth.d.mts +1 -0
  257. package/Types/SetupHealth/SetupHealth.d.ts +1 -0
  258. package/Types/SetupHealth/SetupHealth.js +13 -5
  259. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  260. package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
  261. package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
  262. package/Types/StatusPage/DefaultStatusNames.js +74 -28
  263. package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
  264. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  265. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  266. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  267. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  268. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  269. package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
  270. package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
  271. package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
  272. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  273. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  274. package/Types/Telemetry/CompatibleIngest.js +123 -0
  275. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  276. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  277. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  278. package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
  279. package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
  280. package/Types/TimezoneAlias.d.mts +1 -0
  281. package/Types/TimezoneAlias.d.ts +1 -0
  282. package/Types/TimezoneAlias.js +13 -0
  283. package/Types/Translator.d.mts +1 -0
  284. package/Types/Translator.d.ts +1 -0
  285. package/Types/Translator.js +470 -63
  286. package/Types/Translator.mjs +1 -0
  287. package/Types/UserSession/SessionLength.d.mts +33 -0
  288. package/Types/UserSession/SessionLength.d.ts +33 -0
  289. package/Types/UserSession/SessionLength.js +134 -5
  290. package/Types/UserSession/SessionLength.mjs +5 -0
  291. package/Types/Workflow/RunRecord.js +1 -1
  292. package/Types/Workflow/Templates.js +2 -2
  293. package/Types/Workflow/WorkflowStatus.js +21 -10
  294. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  295. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  296. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
  297. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
  298. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  299. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  300. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  301. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  302. package/Utils/AI/InvestigationReport.js +2 -2
  303. package/Utils/API.d.mts +0 -11
  304. package/Utils/API.d.ts +0 -11
  305. package/Utils/API.js +0 -432
  306. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
  307. package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
  308. package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
  309. package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
  310. package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
  311. package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
  312. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
  313. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
  314. package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
  315. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  316. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  317. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  318. package/Utils/DefaultRecordNames.d.mts +6 -0
  319. package/Utils/DefaultRecordNames.d.ts +6 -0
  320. package/Utils/DefaultRecordNames.js +122 -0
  321. package/Utils/DefaultRecordNames.mjs +6 -0
  322. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  323. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  324. package/Utils/Grok/Grok.js +7 -4
  325. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  326. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  327. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  328. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  329. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  330. package/Utils/HostAddressUtil.d.mts +1 -0
  331. package/Utils/HostAddressUtil.d.ts +1 -0
  332. package/Utils/HostAddressUtil.js +30 -0
  333. package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
  334. package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
  335. package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
  336. package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
  337. package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
  338. package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
  339. package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
  340. package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
  341. package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
  342. package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
  343. package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
  344. package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
  345. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  346. package/Utils/LookupTable.d.mts +3 -0
  347. package/Utils/LookupTable.d.ts +3 -0
  348. package/Utils/LookupTable.js +61 -0
  349. package/Utils/LookupTable.mjs +3 -0
  350. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
  351. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
  352. package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
  353. package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
  354. package/Utils/Markdown/OverLongText.js +296 -2
  355. package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
  356. package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
  357. package/Utils/Markdown/SlowMarkdown.js +354 -4
  358. package/Utils/Markdown/SlowMarkdown.mjs +1 -0
  359. package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
  360. package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
  361. package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
  362. package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
  363. package/Utils/Metrics/MetricSeriesScope.js +5 -1
  364. package/Utils/Milliseconds.d.mts +7 -0
  365. package/Utils/Milliseconds.d.ts +7 -0
  366. package/Utils/Milliseconds.js +60 -0
  367. package/Utils/Milliseconds.mjs +4 -0
  368. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  369. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  370. package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
  371. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  372. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  373. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  374. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  375. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  376. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  377. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  378. package/Utils/Monitor/MonitorRootCauseWording.d.mts +5 -0
  379. package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
  380. package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
  381. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  382. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  383. package/Utils/Monitor/MonitoringOff.js +21 -0
  384. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  385. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  386. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  387. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  388. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  389. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  390. package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
  391. package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
  392. package/Utils/Monitor/ProbeAgreementRule.js +58 -0
  393. package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
  394. package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
  395. package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
  396. package/Utils/Monitor/ProbeFailureReading.js +166 -0
  397. package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
  398. package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
  399. package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
  400. package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
  401. package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
  402. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  403. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  404. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  405. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  406. package/Utils/Project/NextNumber.js +1 -1
  407. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  408. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  409. package/Utils/PromQL/PromQLAst.js +118 -0
  410. package/Utils/PromQL/PromQLAst.mjs +12 -0
  411. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  412. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  413. package/Utils/PromQL/PromQLDuration.js +78 -0
  414. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  415. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  416. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  417. package/Utils/PromQL/PromQLEngine.js +974 -0
  418. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  419. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  420. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  421. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  422. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  423. package/Utils/PromQL/PromQLError.d.mts +11 -0
  424. package/Utils/PromQL/PromQLError.d.ts +11 -0
  425. package/Utils/PromQL/PromQLError.js +27 -0
  426. package/Utils/PromQL/PromQLError.mjs +3 -0
  427. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  428. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  429. package/Utils/PromQL/PromQLFunctionEvaluators.js +829 -0
  430. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  431. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  432. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  433. package/Utils/PromQL/PromQLFunctions.js +127 -0
  434. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  435. package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
  436. package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
  437. package/Utils/PromQL/PromQLLabelOrder.js +212 -0
  438. package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
  439. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  440. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  441. package/Utils/PromQL/PromQLLabels.js +219 -0
  442. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  443. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  444. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  445. package/Utils/PromQL/PromQLLexer.js +391 -0
  446. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  447. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  448. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  449. package/Utils/PromQL/PromQLMath.js +200 -0
  450. package/Utils/PromQL/PromQLMath.mjs +9 -0
  451. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  452. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  453. package/Utils/PromQL/PromQLMetricNames.js +205 -0
  454. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  455. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  456. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  457. package/Utils/PromQL/PromQLParser.js +836 -0
  458. package/Utils/PromQL/PromQLParser.mjs +4 -0
  459. package/Utils/PromQL/PromQLRegex.d.mts +20 -0
  460. package/Utils/PromQL/PromQLRegex.d.ts +20 -0
  461. package/Utils/PromQL/PromQLRegex.js +1014 -0
  462. package/Utils/PromQL/PromQLRegex.mjs +5 -0
  463. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  464. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  465. package/Utils/PromQL/PrometheusResponse.js +92 -0
  466. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  467. package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
  468. package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
  469. package/Utils/PromQL/RE2CharacterClass.js +532 -0
  470. package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
  471. package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
  472. package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
  473. package/Utils/RequestFailedDetailsUtil.js +452 -0
  474. package/Utils/RequestFailedDetailsUtil.mjs +2 -0
  475. package/Utils/Rum/PathInSentence.d.mts +5 -0
  476. package/Utils/Rum/PathInSentence.d.ts +5 -0
  477. package/Utils/Rum/PathInSentence.js +46 -0
  478. package/Utils/Rum/PathInSentence.mjs +6 -0
  479. package/Utils/Rum/UrlScrubber.d.mts +5 -1
  480. package/Utils/Rum/UrlScrubber.d.ts +5 -1
  481. package/Utils/Rum/UrlScrubber.js +153 -7
  482. package/Utils/Rum/UserFlow.d.mts +1 -1
  483. package/Utils/Rum/UserFlow.d.ts +1 -1
  484. package/Utils/Rum/UserFlow.js +202 -29
  485. package/Utils/Rum/UserFlow.mjs +1 -1
  486. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  487. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  488. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  489. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  490. package/Utils/Schema/TypeSchemas.js +6 -0
  491. package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
  492. package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
  493. package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
  494. package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
  495. package/Utils/Slo/SloDuration.d.mts +5 -2
  496. package/Utils/Slo/SloDuration.d.ts +5 -2
  497. package/Utils/Slo/SloDuration.js +11 -6
  498. package/Utils/Slo/SloHealth.js +1 -1
  499. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  500. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  501. package/Utils/Sms/OnCallPageSms.js +3 -1
  502. package/Utils/StateListType.d.mts +11 -0
  503. package/Utils/StateListType.d.ts +11 -0
  504. package/Utils/StateListType.js +21 -0
  505. package/Utils/StateListType.mjs +2 -0
  506. package/Utils/StateOrder.d.mts +8 -11
  507. package/Utils/StateOrder.d.ts +8 -11
  508. package/Utils/StateOrder.js +50 -88
  509. package/Utils/StateOrder.mjs +2 -0
  510. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  511. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
  512. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
  513. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
  514. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
  515. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
  516. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
  517. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
  518. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
  519. package/Utils/Syslog/SyslogMessageParser.js +16 -6
  520. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  521. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  522. package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
  523. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  524. package/Utils/ValueFormatter.d.mts +1 -0
  525. package/Utils/ValueFormatter.d.ts +1 -0
  526. package/Utils/ValueFormatter.js +258 -18
  527. package/package.json +1 -1
@@ -0,0 +1,84 @@
1
+ import BaseNotificationRule from "./BaseNotificationRule";
2
+ import NotificationRuleEventType from "./EventType";
3
+ import NotificationRuleWorkspaceChannel from "./NotificationRuleWorkspaceChannel";
4
+ export declare enum NotificationRuleUpdateKind {
5
+ Created = "Created",
6
+ VideoCallStarted = "VideoCallStarted",
7
+ ResolvedAndReopened = "ResolvedAndReopened",
8
+ StateChanges = "StateChanges",
9
+ SeverityChanges = "SeverityChanges",
10
+ PublicNotes = "PublicNotes",
11
+ PrivateNotes = "PrivateNotes",
12
+ Owners = "Owners",
13
+ Paging = "Paging",
14
+ EpisodeMembers = "EpisodeMembers",
15
+ Postmortem = "Postmortem",
16
+ AI = "AI",
17
+ Edits = "Edits",
18
+ Other = "Other",
19
+ OnCallNow = "OnCallNow",
20
+ OnCallNext = "OnCallNext",
21
+ NobodyOnCall = "NobodyOnCall",
22
+ Overrides = "Overrides",
23
+ PolicyChanges = "PolicyChanges"
24
+ }
25
+ export declare enum NotificationRuleUpdatesChoice {
26
+ EveryUpdate = "EveryUpdate",
27
+ KeyUpdates = "KeyUpdates",
28
+ ChosenUpdates = "ChosenUpdates"
29
+ }
30
+ export declare const ALWAYS_POSTED_UPDATE_KINDS: ReadonlyArray<NotificationRuleUpdateKind>;
31
+ export type RuleWithUpdates = Partial<Pick<BaseNotificationRule, "updatesToPost">>;
32
+ export type StoredRuleUpdates = RuleWithUpdates | null | undefined;
33
+ export interface RuleOfChannel {
34
+ id: string;
35
+ rule: StoredRuleUpdates;
36
+ }
37
+ export default class NotificationRuleUpdates {
38
+ static isUpdateKind(value: unknown): value is NotificationRuleUpdateKind;
39
+ static isAlwaysPosted(kind: NotificationRuleUpdateKind): boolean;
40
+ static getChoosableKinds(eventType: NotificationRuleEventType | undefined): Array<NotificationRuleUpdateKind>;
41
+ static canChooseUpdates(eventType: NotificationRuleEventType | undefined): boolean;
42
+ static getNewRuleUpdatesToPost(eventType: NotificationRuleEventType | undefined): Array<NotificationRuleUpdateKind> | undefined;
43
+ static getNewRuleUpdates(eventType: NotificationRuleEventType | undefined): RuleWithUpdates;
44
+ static getKeyKinds(eventType: NotificationRuleEventType | undefined): Array<NotificationRuleUpdateKind>;
45
+ static getChosenKinds(rule: StoredRuleUpdates): Array<NotificationRuleUpdateKind> | undefined;
46
+ static getChoice(data: {
47
+ rule: StoredRuleUpdates;
48
+ eventType: NotificationRuleEventType | undefined;
49
+ }): NotificationRuleUpdatesChoice;
50
+ static getPostedKinds(data: {
51
+ rule: StoredRuleUpdates;
52
+ eventType: NotificationRuleEventType | undefined;
53
+ }): Array<NotificationRuleUpdateKind>;
54
+ static withChosenKinds<T extends RuleWithUpdates>(data: {
55
+ rule: T | undefined;
56
+ eventType: NotificationRuleEventType | undefined;
57
+ kinds: ReadonlyArray<NotificationRuleUpdateKind> | undefined;
58
+ }): T;
59
+ static withChoice<T extends RuleWithUpdates>(data: {
60
+ rule: T | undefined;
61
+ eventType: NotificationRuleEventType | undefined;
62
+ choice: NotificationRuleUpdatesChoice;
63
+ kinds?: ReadonlyArray<NotificationRuleUpdateKind> | undefined;
64
+ }): T;
65
+ static isPostedEverywhere(updateKinds: ReadonlyArray<NotificationRuleUpdateKind> | undefined): boolean;
66
+ static wantsUpdate(data: {
67
+ rule: StoredRuleUpdates;
68
+ updateKinds: ReadonlyArray<NotificationRuleUpdateKind> | undefined;
69
+ }): boolean;
70
+ static isWantedInChannel(data: {
71
+ channel: Partial<Pick<NotificationRuleWorkspaceChannel, "notificationRuleId" | "notificationRuleIds">>;
72
+ rules: ReadonlyArray<RuleOfChannel>;
73
+ updateKinds: ReadonlyArray<NotificationRuleUpdateKind> | undefined;
74
+ }): boolean;
75
+ static getStateChangeKind(data: {
76
+ isResolved: boolean;
77
+ wasResolved: boolean;
78
+ }): NotificationRuleUpdateKind;
79
+ static getValidationError(data: {
80
+ eventType: NotificationRuleEventType | undefined;
81
+ updatesToPost: unknown;
82
+ }): string | null;
83
+ private static isSameKinds;
84
+ }
@@ -0,0 +1,456 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ALWAYS_POSTED_UPDATE_KINDS = exports.NotificationRuleUpdatesChoice = exports.NotificationRuleUpdateKind = void 0;
7
+ const EventType_1 = __importDefault(require("./EventType"));
8
+ const NotificationRuleWorkspaceChannel_1 = require("./NotificationRuleWorkspaceChannel");
9
+ /*
10
+ * WHICH UPDATES A WORKSPACE NOTIFICATION RULE POSTS (issue #7581).
11
+ *
12
+ * A record's channels hear of everything that happens to it: every state
13
+ * change, note, owner, page and edit. A channel for the people working the
14
+ * incident wants that. A quiet one - #executive-alerts - wants to hear that
15
+ * an incident was declared and resolved, and little else, and every
16
+ * granular update buried those two. So an incident, alert, episode or
17
+ * scheduled maintenance rule says which updates it posts:
18
+ *
19
+ * Which updates to post
20
+ * (o) Every update
21
+ * ( ) Key updates only Resolved and reopened, severity changes,
22
+ * public notes and the postmortem.
23
+ * ( ) Choose updates [x] Resolved and reopened [ ] Private notes ...
24
+ *
25
+ * The choice is stored on the rule, as the kinds of update it posts
26
+ * (BaseNotificationRule.updatesToPost). No list - every rule saved before
27
+ * there was a choice, and every new rule until somebody makes one - posts
28
+ * every update, as rules always did. An empty list posts only what every
29
+ * rule posts (ALWAYS_POSTED_UPDATE_KINDS): the record's first message -
30
+ * declared, created or scheduled - which is what the channel is about, and
31
+ * a video call's Join button, which a rule's Video Call step promises
32
+ * "wherever the rule posts".
33
+ *
34
+ * Every entry of a record's feed is one kind of update
35
+ * (Server/Utils/Feed/FeedUpdateKinds), and so is an on-call policy's run
36
+ * message (Paging). A message is posted in a channel only when a rule the
37
+ * channel is for wants one of its kinds (wantsUpdate, isWantedInChannel). A
38
+ * message can be of more than one kind - an edit that changes the severity
39
+ * and the title is a severity change and an edit - and is posted where any
40
+ * of them is wanted.
41
+ *
42
+ * An on-call policy rule chooses too (issue #7549), from updates of its
43
+ * own: who is on call now, who is next, nobody on call, overrides, changes
44
+ * to the policy and its owners. A handoff is one message - "📞 @Ana is now
45
+ * on call for Payments until Fri at 5:50 PM" - that names who is next only
46
+ * where a rule asks for it (OnCallHandoffPosts). A NEW on-call rule starts
47
+ * with the key updates ticked (getNewRuleUpdatesToPost): who is on call
48
+ * now, and when nobody is.
49
+ *
50
+ * Monitor, security and SLO rules post every update; they have no choice
51
+ * yet (getChoosableKinds is empty for them).
52
+ */
53
+ var NotificationRuleUpdateKind;
54
+ (function (NotificationRuleUpdateKind) {
55
+ // The record's first message: declared, created or scheduled. Always posted.
56
+ NotificationRuleUpdateKind["Created"] = "Created";
57
+ // A video call started for the record, with its Join button. Always posted.
58
+ NotificationRuleUpdateKind["VideoCallStarted"] = "VideoCallStarted";
59
+ // Resolved, or reopened after it was resolved.
60
+ NotificationRuleUpdateKind["ResolvedAndReopened"] = "ResolvedAndReopened";
61
+ /*
62
+ * Any other move between states: acknowledged, investigating, or on from
63
+ * one resolved state to another. A scheduled maintenance event's every
64
+ * state change.
65
+ */
66
+ NotificationRuleUpdateKind["StateChanges"] = "StateChanges";
67
+ NotificationRuleUpdateKind["SeverityChanges"] = "SeverityChanges";
68
+ // Notes shown on status pages.
69
+ NotificationRuleUpdateKind["PublicNotes"] = "PublicNotes";
70
+ NotificationRuleUpdateKind["PrivateNotes"] = "PrivateNotes";
71
+ // Owners added and removed; an incident's roles - Incident Commander - too.
72
+ NotificationRuleUpdateKind["Owners"] = "Owners";
73
+ // An on-call policy's run: who was paged, who acknowledged, who was not reached.
74
+ NotificationRuleUpdateKind["Paging"] = "Paging";
75
+ // An episode's incidents (or alerts) added and removed.
76
+ NotificationRuleUpdateKind["EpisodeMembers"] = "EpisodeMembers";
77
+ // The postmortem's note, its draft and its status.
78
+ NotificationRuleUpdateKind["Postmortem"] = "Postmortem";
79
+ // AI root cause analyses, call summaries and automatic fixes.
80
+ NotificationRuleUpdateKind["AI"] = "AI";
81
+ // The title, description, labels, custom fields and other fields.
82
+ NotificationRuleUpdateKind["Edits"] = "Edits";
83
+ // Everything else: linked records, reminders, delivery problems.
84
+ NotificationRuleUpdateKind["Other"] = "Other";
85
+ /*
86
+ * An on-call policy's updates (issue #7549). Each of its feed entries is
87
+ * one of these, or Owners (FeedUpdateKinds).
88
+ */
89
+ // A handoff: who is on call now in one of the policy's schedules, until when.
90
+ NotificationRuleUpdateKind["OnCallNow"] = "OnCallNow";
91
+ // Who takes over at the next handoff.
92
+ NotificationRuleUpdateKind["OnCallNext"] = "OnCallNext";
93
+ // A schedule with nobody on call: alerts that reach it page no one.
94
+ NotificationRuleUpdateKind["NobodyOnCall"] = "NobodyOnCall";
95
+ // Somebody covering for somebody else, and covers taken back.
96
+ NotificationRuleUpdateKind["Overrides"] = "Overrides";
97
+ /*
98
+ * Schedules, people and teams added to or removed from the policy's
99
+ * escalation rules.
100
+ */
101
+ NotificationRuleUpdateKind["PolicyChanges"] = "PolicyChanges";
102
+ })(NotificationRuleUpdateKind || (exports.NotificationRuleUpdateKind = NotificationRuleUpdateKind = {}));
103
+ // What a rule picks on its Updates step.
104
+ var NotificationRuleUpdatesChoice;
105
+ (function (NotificationRuleUpdatesChoice) {
106
+ NotificationRuleUpdatesChoice["EveryUpdate"] = "EveryUpdate";
107
+ NotificationRuleUpdatesChoice["KeyUpdates"] = "KeyUpdates";
108
+ NotificationRuleUpdatesChoice["ChosenUpdates"] = "ChosenUpdates";
109
+ })(NotificationRuleUpdatesChoice || (exports.NotificationRuleUpdatesChoice = NotificationRuleUpdatesChoice = {}));
110
+ /*
111
+ * Posted wherever a record's messages go, whatever a rule chose: the first
112
+ * message, and a video call's Join button.
113
+ */
114
+ exports.ALWAYS_POSTED_UPDATE_KINDS = [
115
+ NotificationRuleUpdateKind.Created,
116
+ NotificationRuleUpdateKind.VideoCallStarted,
117
+ ];
118
+ /*
119
+ * The updates each kind of rule can choose, in the order its Updates step
120
+ * lists them. Only what that kind of record posts: an alert has no public
121
+ * notes or postmortem, an episode's severity changes stay in its feed, a
122
+ * scheduled maintenance event's owners are not posted.
123
+ */
124
+ const CHOOSABLE_UPDATE_KINDS = {
125
+ [EventType_1.default.Incident]: [
126
+ NotificationRuleUpdateKind.ResolvedAndReopened,
127
+ NotificationRuleUpdateKind.StateChanges,
128
+ NotificationRuleUpdateKind.SeverityChanges,
129
+ NotificationRuleUpdateKind.PublicNotes,
130
+ NotificationRuleUpdateKind.PrivateNotes,
131
+ NotificationRuleUpdateKind.Owners,
132
+ NotificationRuleUpdateKind.Paging,
133
+ NotificationRuleUpdateKind.Postmortem,
134
+ NotificationRuleUpdateKind.AI,
135
+ NotificationRuleUpdateKind.Edits,
136
+ NotificationRuleUpdateKind.Other,
137
+ ],
138
+ [EventType_1.default.Alert]: [
139
+ NotificationRuleUpdateKind.ResolvedAndReopened,
140
+ NotificationRuleUpdateKind.StateChanges,
141
+ NotificationRuleUpdateKind.SeverityChanges,
142
+ NotificationRuleUpdateKind.PrivateNotes,
143
+ NotificationRuleUpdateKind.Owners,
144
+ NotificationRuleUpdateKind.Paging,
145
+ NotificationRuleUpdateKind.AI,
146
+ NotificationRuleUpdateKind.Edits,
147
+ NotificationRuleUpdateKind.Other,
148
+ ],
149
+ [EventType_1.default.IncidentEpisode]: [
150
+ NotificationRuleUpdateKind.ResolvedAndReopened,
151
+ NotificationRuleUpdateKind.StateChanges,
152
+ NotificationRuleUpdateKind.EpisodeMembers,
153
+ NotificationRuleUpdateKind.PublicNotes,
154
+ NotificationRuleUpdateKind.PrivateNotes,
155
+ NotificationRuleUpdateKind.Owners,
156
+ NotificationRuleUpdateKind.Paging,
157
+ NotificationRuleUpdateKind.Other,
158
+ ],
159
+ [EventType_1.default.AlertEpisode]: [
160
+ NotificationRuleUpdateKind.ResolvedAndReopened,
161
+ NotificationRuleUpdateKind.StateChanges,
162
+ NotificationRuleUpdateKind.EpisodeMembers,
163
+ NotificationRuleUpdateKind.PrivateNotes,
164
+ NotificationRuleUpdateKind.Owners,
165
+ NotificationRuleUpdateKind.Paging,
166
+ NotificationRuleUpdateKind.Other,
167
+ ],
168
+ [EventType_1.default.ScheduledMaintenance]: [
169
+ NotificationRuleUpdateKind.StateChanges,
170
+ NotificationRuleUpdateKind.PublicNotes,
171
+ NotificationRuleUpdateKind.PrivateNotes,
172
+ NotificationRuleUpdateKind.Other,
173
+ ],
174
+ // Everything an on-call policy's feed posts: nothing is Everything else.
175
+ [EventType_1.default.OnCallDutyPolicy]: [
176
+ NotificationRuleUpdateKind.OnCallNow,
177
+ NotificationRuleUpdateKind.OnCallNext,
178
+ NotificationRuleUpdateKind.NobodyOnCall,
179
+ NotificationRuleUpdateKind.Overrides,
180
+ NotificationRuleUpdateKind.PolicyChanges,
181
+ NotificationRuleUpdateKind.Owners,
182
+ ],
183
+ };
184
+ /*
185
+ * Key updates only: what a quiet channel wants to hear, beside the first
186
+ * message - that the record is over (or is not, after all), how bad it is,
187
+ * what its status page says and, for an incident, what was learned.
188
+ */
189
+ const KEY_UPDATE_KINDS = {
190
+ [EventType_1.default.Incident]: [
191
+ NotificationRuleUpdateKind.ResolvedAndReopened,
192
+ NotificationRuleUpdateKind.SeverityChanges,
193
+ NotificationRuleUpdateKind.PublicNotes,
194
+ NotificationRuleUpdateKind.Postmortem,
195
+ ],
196
+ [EventType_1.default.Alert]: [
197
+ NotificationRuleUpdateKind.ResolvedAndReopened,
198
+ NotificationRuleUpdateKind.SeverityChanges,
199
+ ],
200
+ [EventType_1.default.IncidentEpisode]: [
201
+ NotificationRuleUpdateKind.ResolvedAndReopened,
202
+ NotificationRuleUpdateKind.PublicNotes,
203
+ ],
204
+ [EventType_1.default.AlertEpisode]: [
205
+ NotificationRuleUpdateKind.ResolvedAndReopened,
206
+ ],
207
+ [EventType_1.default.ScheduledMaintenance]: [
208
+ NotificationRuleUpdateKind.StateChanges,
209
+ NotificationRuleUpdateKind.PublicNotes,
210
+ ],
211
+ /*
212
+ * Who is on call: each handoff, and a schedule left with nobody on call -
213
+ * the two things an on-call channel is for (issue #7549).
214
+ */
215
+ [EventType_1.default.OnCallDutyPolicy]: [
216
+ NotificationRuleUpdateKind.OnCallNow,
217
+ NotificationRuleUpdateKind.NobodyOnCall,
218
+ ],
219
+ };
220
+ /*
221
+ * What a NEW rule of a kind starts with, when that is not every update. An
222
+ * on-call channel used to hear of every handoff three times over, and of
223
+ * every schedule, person and team added to the policy (issue #7549): a new
224
+ * on-call rule starts on the key updates instead - who is on call now, and
225
+ * when nobody is - and its Updates step offers the rest. Rules saved
226
+ * before keep posting every update.
227
+ */
228
+ const NEW_RULE_UPDATE_KINDS = {
229
+ [EventType_1.default.OnCallDutyPolicy]: [
230
+ NotificationRuleUpdateKind.OnCallNow,
231
+ NotificationRuleUpdateKind.NobodyOnCall,
232
+ ],
233
+ };
234
+ class NotificationRuleUpdates {
235
+ static isUpdateKind(value) {
236
+ return (typeof value === "string" &&
237
+ Object.values(NotificationRuleUpdateKind).includes(value));
238
+ }
239
+ static isAlwaysPosted(kind) {
240
+ return exports.ALWAYS_POSTED_UPDATE_KINDS.includes(kind);
241
+ }
242
+ // The updates a kind of rule can choose, in order: none when it has no choice.
243
+ static getChoosableKinds(eventType) {
244
+ return eventType ? [...(CHOOSABLE_UPDATE_KINDS[eventType] || [])] : [];
245
+ }
246
+ // Whether a kind of rule chooses which updates it posts.
247
+ static canChooseUpdates(eventType) {
248
+ return this.getChoosableKinds(eventType).length > 0;
249
+ }
250
+ /*
251
+ * The updates a new rule of this kind starts with, or undefined when it
252
+ * starts posting every update (NEW_RULE_UPDATE_KINDS).
253
+ */
254
+ static getNewRuleUpdatesToPost(eventType) {
255
+ const kinds = eventType ? NEW_RULE_UPDATE_KINDS[eventType] : undefined;
256
+ return kinds ? [...kinds] : undefined;
257
+ }
258
+ /*
259
+ * A new rule's JSON, as far as its updates go: the updates its kind
260
+ * starts with, or nothing - every update.
261
+ */
262
+ static getNewRuleUpdates(eventType) {
263
+ const kinds = this.getNewRuleUpdatesToPost(eventType);
264
+ return kinds ? { updatesToPost: kinds } : {};
265
+ }
266
+ // Key updates only, in the order the Updates step lists them.
267
+ static getKeyKinds(eventType) {
268
+ return eventType ? [...(KEY_UPDATE_KINDS[eventType] || [])] : [];
269
+ }
270
+ /*
271
+ * The updates a rule chose, as stored: undefined when it chose none, which
272
+ * is every update. A value that is not a kind - typed by hand into the
273
+ * JSON, or a kind a later version took out - is left out.
274
+ */
275
+ static getChosenKinds(rule) {
276
+ const stored = rule === null || rule === void 0 ? void 0 : rule.updatesToPost;
277
+ if (!Array.isArray(stored)) {
278
+ return undefined;
279
+ }
280
+ const kinds = [];
281
+ for (const value of stored) {
282
+ if (this.isUpdateKind(value) && !kinds.includes(value)) {
283
+ kinds.push(value);
284
+ }
285
+ }
286
+ return kinds;
287
+ }
288
+ /*
289
+ * What the rule picked on its Updates step. A list that is exactly Key
290
+ * updates only reads as that choice, in whatever order it was stored.
291
+ */
292
+ static getChoice(data) {
293
+ const chosen = this.getChosenKinds(data.rule);
294
+ if (!chosen || !this.canChooseUpdates(data.eventType)) {
295
+ return NotificationRuleUpdatesChoice.EveryUpdate;
296
+ }
297
+ if (this.isSameKinds(chosen, this.getKeyKinds(data.eventType))) {
298
+ return NotificationRuleUpdatesChoice.KeyUpdates;
299
+ }
300
+ return NotificationRuleUpdatesChoice.ChosenUpdates;
301
+ }
302
+ /*
303
+ * The updates the rule posts, of those its kind can choose, in their
304
+ * order: every one when it chose none.
305
+ */
306
+ static getPostedKinds(data) {
307
+ const choosable = this.getChoosableKinds(data.eventType);
308
+ const chosen = this.getChosenKinds(data.rule);
309
+ if (!chosen) {
310
+ return choosable;
311
+ }
312
+ return choosable.filter((kind) => {
313
+ return chosen.includes(kind);
314
+ });
315
+ }
316
+ /*
317
+ * The rule with `kinds` as the updates it posts, put in the order its
318
+ * Updates step lists them. Every update - no list, or every kind its
319
+ * Updates step lists - takes the list out, so the rule goes on posting
320
+ * every update, the kinds a later version adds included.
321
+ */
322
+ static withChosenKinds(data) {
323
+ const rule = Object.assign({}, (data.rule || {}));
324
+ const choosable = this.getChoosableKinds(data.eventType);
325
+ const kinds = data.kinds
326
+ ? choosable.filter((kind) => {
327
+ return data.kinds.includes(kind);
328
+ })
329
+ : undefined;
330
+ if (!kinds || choosable.length === 0 || kinds.length === choosable.length) {
331
+ delete rule.updatesToPost;
332
+ return rule;
333
+ }
334
+ rule.updatesToPost = kinds;
335
+ return rule;
336
+ }
337
+ // The rule as a choice on its Updates step sets it.
338
+ static withChoice(data) {
339
+ if (data.choice === NotificationRuleUpdatesChoice.EveryUpdate) {
340
+ return this.withChosenKinds({
341
+ rule: data.rule,
342
+ eventType: data.eventType,
343
+ kinds: undefined,
344
+ });
345
+ }
346
+ if (data.choice === NotificationRuleUpdatesChoice.KeyUpdates) {
347
+ return this.withChosenKinds({
348
+ rule: data.rule,
349
+ eventType: data.eventType,
350
+ kinds: this.getKeyKinds(data.eventType),
351
+ });
352
+ }
353
+ return this.withChosenKinds({
354
+ rule: data.rule,
355
+ eventType: data.eventType,
356
+ kinds: data.kinds || [],
357
+ });
358
+ }
359
+ /*
360
+ * Whether a message of these kinds goes wherever the record's messages
361
+ * go, whatever the rules chose: one that says nothing of its kind - a
362
+ * monitor's - or one every rule posts.
363
+ */
364
+ static isPostedEverywhere(updateKinds) {
365
+ return (!updateKinds ||
366
+ updateKinds.length === 0 ||
367
+ updateKinds.some((kind) => {
368
+ return this.isAlwaysPosted(kind);
369
+ }));
370
+ }
371
+ /*
372
+ * Whether a rule posts a message of these kinds: one posted everywhere
373
+ * (isPostedEverywhere), or one of the updates it chose - every one when
374
+ * it chose none.
375
+ */
376
+ static wantsUpdate(data) {
377
+ if (!data.updateKinds || this.isPostedEverywhere(data.updateKinds)) {
378
+ return true;
379
+ }
380
+ const chosen = this.getChosenKinds(data.rule);
381
+ if (!chosen) {
382
+ return true;
383
+ }
384
+ return data.updateKinds.some((kind) => {
385
+ return chosen.includes(kind);
386
+ });
387
+ }
388
+ /*
389
+ * Whether a message of these kinds is posted in a channel OneUptime
390
+ * created for a record: when one of the rules that asked for the channel
391
+ * wants it. A channel stored before its rules were recorded, or whose
392
+ * every rule was deleted since, has no rule left to ask, and gets every
393
+ * update, as it always did.
394
+ */
395
+ static isWantedInChannel(data) {
396
+ const rulesOfChannel = data.rules.filter((rule) => {
397
+ return NotificationRuleWorkspaceChannel_1.NotificationRuleWorkspaceChannelUtil.isChannelOfRule({
398
+ channel: data.channel,
399
+ notificationRuleId: rule.id,
400
+ });
401
+ });
402
+ if (rulesOfChannel.length === 0) {
403
+ return true;
404
+ }
405
+ return rulesOfChannel.some((rule) => {
406
+ return this.wantsUpdate({
407
+ rule: rule.rule,
408
+ updateKinds: data.updateKinds,
409
+ });
410
+ });
411
+ }
412
+ /*
413
+ * Which update a move between states is: resolving the record, or
414
+ * reopening it, is Resolved and reopened; any other - acknowledged,
415
+ * investigating, or on from one resolved state to another ("Resolved" to
416
+ * "Closed") - is another state change.
417
+ */
418
+ static getStateChangeKind(data) {
419
+ return data.isResolved !== data.wasResolved
420
+ ? NotificationRuleUpdateKind.ResolvedAndReopened
421
+ : NotificationRuleUpdateKind.StateChanges;
422
+ }
423
+ /*
424
+ * What is wrong with the updates a rule is saved with, through the API or
425
+ * the Dashboard, or null when nothing is: a list of the kinds its kind of
426
+ * rule can choose, or nothing at all.
427
+ */
428
+ static getValidationError(data) {
429
+ if (data.updatesToPost === undefined || data.updatesToPost === null) {
430
+ return null;
431
+ }
432
+ const choosable = this.getChoosableKinds(data.eventType);
433
+ if (choosable.length === 0) {
434
+ return `${data.eventType || "These"} rules post every update: leave updatesToPost out.`;
435
+ }
436
+ if (!Array.isArray(data.updatesToPost)) {
437
+ return `updatesToPost is a list of the updates the rule posts, any of: ${choosable.join(", ")}. Leave it out to post every update.`;
438
+ }
439
+ for (const value of data.updatesToPost) {
440
+ if (!this.isUpdateKind(value) ||
441
+ !choosable.includes(value)) {
442
+ // A value typed by hand can be anything: only its start is repeated.
443
+ const shown = String(JSON.stringify(value)).substring(0, 80);
444
+ return `updatesToPost lists ${shown}, which ${data.eventType} rules cannot choose. They choose any of: ${choosable.join(", ")}.`;
445
+ }
446
+ }
447
+ return null;
448
+ }
449
+ static isSameKinds(first, second) {
450
+ return (first.length === second.length &&
451
+ first.every((kind) => {
452
+ return second.includes(kind);
453
+ }));
454
+ }
455
+ }
456
+ exports.default = NotificationRuleUpdates;
@@ -0,0 +1,5 @@
1
+ import commonJsModule from "./NotificationRuleUpdates.js";
2
+ export default commonJsModule.default;
3
+ export const ALWAYS_POSTED_UPDATE_KINDS = commonJsModule.ALWAYS_POSTED_UPDATE_KINDS;
4
+ export const NotificationRuleUpdateKind = commonJsModule.NotificationRuleUpdateKind;
5
+ export const NotificationRuleUpdatesChoice = commonJsModule.NotificationRuleUpdatesChoice;
@@ -48,8 +48,8 @@ exports.AI_SECURITY_CASE_TRIAGE_HEADING_TEXT = "AI — Security Case Triage";
48
48
  * How the runner's own first line of a follow-up check's report starts: the
49
49
  * report OneUptime AI writes when it checks an incident again after an alert
50
50
  * opened on its linked infrastructure ("**Checked again** after alert #12
51
- * (High CPU on web-1) opened on Host web-1, 2 minutes after this incident was
52
- * declared." - IncidentFollowUpCheck.buildReportLead). The server puts it
51
+ * opened on host web-1, 2 minutes after this incident was declared: High CPU
52
+ * on web-1." - IncidentFollowUpCheck.buildReportLead). The server puts it
53
53
  * right under the brand heading, before the model's analysis.
54
54
  */
55
55
  exports.FOLLOW_UP_REPORT_LEAD_PREFIX = "**Checked again**";
package/Utils/API.d.mts CHANGED
@@ -11,7 +11,6 @@ import URL from "../Types/API/URL.mjs";
11
11
  import Dictionary from "../Types/Dictionary.mjs";
12
12
  import APIException from "../Types/Exception/ApiException.mjs";
13
13
  import { JSONArray, JSONObject } from "../Types/JSON.mjs";
14
- import RequestFailedDetails from "../Types/Probe/RequestFailedDetails.mjs";
15
14
  import { AxiosError, AxiosProgressEvent } from "axios";
16
15
  import { HTTPResponseBodyBudget } from "./HTTPResponseBodyReader.mjs";
17
16
  import type { Agent as HttpAgent } from "http";
@@ -147,14 +146,4 @@ export default class API {
147
146
  private static getRetryAfterInMs;
148
147
  private static getErrorResponse;
149
148
  static getFriendlyErrorMessage(error: AxiosError | Error | HTTPErrorResponse): string;
150
- /**
151
- * Extracts detailed error information from an axios error or generic error.
152
- * This provides more context about where and why a request failed.
153
- */
154
- static getRequestFailedDetails(error: AxiosError | Error | unknown): RequestFailedDetails;
155
- static getProbeNetworkFailureDescription(error: unknown): string | null;
156
- private static getProbeSideRequestFailure;
157
- private static getProbeSideFailureDetails;
158
- private static getRequestHost;
159
- private static collectConnectAddresses;
160
149
  }
package/Utils/API.d.ts CHANGED
@@ -11,7 +11,6 @@ import URL from "../Types/API/URL";
11
11
  import Dictionary from "../Types/Dictionary";
12
12
  import APIException from "../Types/Exception/ApiException";
13
13
  import { JSONArray, JSONObject } from "../Types/JSON";
14
- import RequestFailedDetails from "../Types/Probe/RequestFailedDetails";
15
14
  import { AxiosError, AxiosProgressEvent } from "axios";
16
15
  import { HTTPResponseBodyBudget } from "./HTTPResponseBodyReader";
17
16
  import type { Agent as HttpAgent } from "http";
@@ -147,14 +146,4 @@ export default class API {
147
146
  private static getRetryAfterInMs;
148
147
  private static getErrorResponse;
149
148
  static getFriendlyErrorMessage(error: AxiosError | Error | HTTPErrorResponse): string;
150
- /**
151
- * Extracts detailed error information from an axios error or generic error.
152
- * This provides more context about where and why a request failed.
153
- */
154
- static getRequestFailedDetails(error: AxiosError | Error | unknown): RequestFailedDetails;
155
- static getProbeNetworkFailureDescription(error: unknown): string | null;
156
- private static getProbeSideRequestFailure;
157
- private static getProbeSideFailureDetails;
158
- private static getRequestHost;
159
- private static collectConnectAddresses;
160
149
  }