@oneuptime/common 14.0.110 → 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 (322) 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.js +18 -2
  6. package/Models/DatabaseModels/DataStore.js +9 -0
  7. package/Models/DatabaseModels/EmailLog.js +2 -2
  8. package/Models/DatabaseModels/Form.js +3 -3
  9. package/Models/DatabaseModels/FormSubmission.js +4 -4
  10. package/Models/DatabaseModels/GlobalConfig.js +46 -45
  11. package/Models/DatabaseModels/Incident.js +18 -2
  12. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  13. package/Models/DatabaseModels/Index.js +4 -0
  14. package/Models/DatabaseModels/InventoryItem.js +11 -0
  15. package/Models/DatabaseModels/Monitor.js +51 -17
  16. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  17. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  18. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  19. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  20. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  21. package/Models/DatabaseModels/NetworkDevice.js +23 -7
  22. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  23. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  24. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  25. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  26. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
  27. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  28. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  29. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
  30. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  31. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  32. package/Models/DatabaseModels/Project.d.mts +1 -0
  33. package/Models/DatabaseModels/Project.d.ts +1 -0
  34. package/Models/DatabaseModels/Project.js +46 -3
  35. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  36. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  37. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  38. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  39. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  40. package/Models/DatabaseModels/RunbookRule.js +6 -6
  41. package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
  42. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  43. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  44. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  45. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
  46. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  47. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  48. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  49. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
  50. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  51. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
  52. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  53. package/Models/DatabaseModels/TeamMember.js +10 -1
  54. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  55. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  56. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  57. package/Server/Services/DatabaseService.d.mts +4 -1
  58. package/Server/Services/DatabaseService.d.ts +4 -1
  59. package/Server/Types/Database/CountBy.d.mts +1 -0
  60. package/Server/Types/Database/CountBy.d.ts +1 -0
  61. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  62. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  63. package/Types/AI/AIActionWords.d.mts +25 -1
  64. package/Types/AI/AIActionWords.d.ts +25 -1
  65. package/Types/AI/AIActionWords.js +166 -3
  66. package/Types/AI/AIActionWords.mjs +6 -0
  67. package/Types/AI/AIChatTypes.d.mts +2 -1
  68. package/Types/AI/AIChatTypes.d.ts +2 -1
  69. package/Types/AI/AiOutcomes.d.mts +57 -0
  70. package/Types/AI/AiOutcomes.d.ts +57 -0
  71. package/Types/AI/AiOutcomes.js +67 -0
  72. package/Types/AI/AiOutcomes.mjs +10 -0
  73. package/Types/AI/AiRunRefusal.d.mts +45 -0
  74. package/Types/AI/AiRunRefusal.d.ts +45 -0
  75. package/Types/AI/AiRunRefusal.js +187 -0
  76. package/Types/AI/AiRunRefusal.mjs +12 -0
  77. package/Types/AI/InvestigationRecording.d.mts +46 -0
  78. package/Types/AI/InvestigationRecording.d.ts +46 -0
  79. package/Types/AI/InvestigationRecording.js +42 -0
  80. package/Types/AI/InvestigationRecording.mjs +7 -0
  81. package/Types/API/HTTPResponse.d.mts +3 -0
  82. package/Types/API/HTTPResponse.d.ts +3 -0
  83. package/Types/API/HTTPResponse.js +15 -0
  84. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  85. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  86. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
  87. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
  88. package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
  89. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  90. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  91. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  92. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  93. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  94. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  95. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  96. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  97. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  98. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  99. package/Types/Date.d.mts +6 -1
  100. package/Types/Date.d.ts +6 -1
  101. package/Types/Date.js +39 -7
  102. package/Types/Date.mjs +1 -0
  103. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  104. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  105. package/Types/Email/ServerEmailEnvironment.js +793 -0
  106. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  107. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  108. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  109. package/Types/Exception/AiRunRefusalException.js +23 -0
  110. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  111. package/Types/Form/FormTargetCatalog.js +2 -2
  112. package/Types/Form/FormTargetType.js +2 -2
  113. package/Types/ListData.d.mts +2 -0
  114. package/Types/ListData.d.ts +2 -0
  115. package/Types/ListData.js +4 -0
  116. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  117. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  118. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  119. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  120. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  121. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  122. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  123. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  124. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  125. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  126. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  127. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  128. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  129. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  130. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  131. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  132. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  133. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  134. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  135. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  136. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  137. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  138. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  139. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  140. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  141. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  142. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  143. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  144. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  145. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  146. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  147. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  148. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  149. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  150. package/Types/Permission.js +2 -2
  151. package/Types/Probe/ProbeCapability.d.mts +2 -1
  152. package/Types/Probe/ProbeCapability.d.ts +2 -1
  153. package/Types/Probe/ProbeCapability.js +10 -0
  154. package/Types/ReaderLanguage.d.mts +1 -0
  155. package/Types/ReaderLanguage.d.ts +1 -0
  156. package/Types/ReaderLanguage.js +13 -1
  157. package/Types/ReaderLanguage.mjs +1 -0
  158. package/Types/Rules/RuleRun.js +2 -2
  159. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  160. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  161. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  162. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  163. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  164. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  165. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  166. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  167. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  168. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  169. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  170. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  171. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  172. package/Types/Telemetry/CompatibleIngest.js +123 -0
  173. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  174. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  175. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  176. package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
  177. package/Types/TimezoneAlias.d.mts +1 -0
  178. package/Types/TimezoneAlias.d.ts +1 -0
  179. package/Types/TimezoneAlias.js +13 -0
  180. package/Types/Translator.js +374 -48
  181. package/Types/Workflow/RunRecord.js +1 -1
  182. package/Types/Workflow/Templates.js +2 -2
  183. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  184. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  185. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
  186. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
  187. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  188. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  189. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  190. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  191. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  192. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  193. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  194. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  195. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  196. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  197. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  198. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  199. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  200. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  201. package/Utils/HostAddressUtil.d.mts +1 -0
  202. package/Utils/HostAddressUtil.d.ts +1 -0
  203. package/Utils/HostAddressUtil.js +30 -0
  204. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  205. package/Utils/Milliseconds.d.mts +7 -0
  206. package/Utils/Milliseconds.d.ts +7 -0
  207. package/Utils/Milliseconds.js +60 -0
  208. package/Utils/Milliseconds.mjs +4 -0
  209. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  210. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  211. package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
  212. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  213. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  214. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  215. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  216. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  217. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  218. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  219. package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
  220. package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
  221. package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
  222. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  223. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  224. package/Utils/Monitor/MonitoringOff.js +21 -0
  225. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  226. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  227. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  228. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  229. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  230. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  231. package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
  232. package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
  233. package/Utils/Monitor/ProbeFailureReading.js +137 -0
  234. package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
  235. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  236. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  237. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  238. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  239. package/Utils/Project/NextNumber.js +1 -1
  240. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  241. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  242. package/Utils/PromQL/PromQLAst.js +118 -0
  243. package/Utils/PromQL/PromQLAst.mjs +12 -0
  244. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  245. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  246. package/Utils/PromQL/PromQLDuration.js +78 -0
  247. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  248. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  249. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  250. package/Utils/PromQL/PromQLEngine.js +965 -0
  251. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  252. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  253. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  254. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  255. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  256. package/Utils/PromQL/PromQLError.d.mts +11 -0
  257. package/Utils/PromQL/PromQLError.d.ts +11 -0
  258. package/Utils/PromQL/PromQLError.js +27 -0
  259. package/Utils/PromQL/PromQLError.mjs +3 -0
  260. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  261. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  262. package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
  263. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  264. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  265. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  266. package/Utils/PromQL/PromQLFunctions.js +127 -0
  267. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  268. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  269. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  270. package/Utils/PromQL/PromQLLabels.js +218 -0
  271. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  272. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  273. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  274. package/Utils/PromQL/PromQLLexer.js +391 -0
  275. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  276. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  277. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  278. package/Utils/PromQL/PromQLMath.js +200 -0
  279. package/Utils/PromQL/PromQLMath.mjs +9 -0
  280. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  281. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  282. package/Utils/PromQL/PromQLMetricNames.js +199 -0
  283. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  284. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  285. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  286. package/Utils/PromQL/PromQLParser.js +831 -0
  287. package/Utils/PromQL/PromQLParser.mjs +4 -0
  288. package/Utils/PromQL/PromQLRegex.d.mts +9 -0
  289. package/Utils/PromQL/PromQLRegex.d.ts +9 -0
  290. package/Utils/PromQL/PromQLRegex.js +74 -0
  291. package/Utils/PromQL/PromQLRegex.mjs +2 -0
  292. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  293. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  294. package/Utils/PromQL/PrometheusResponse.js +90 -0
  295. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  296. package/Utils/Rum/PathInSentence.d.mts +5 -0
  297. package/Utils/Rum/PathInSentence.d.ts +5 -0
  298. package/Utils/Rum/PathInSentence.js +46 -0
  299. package/Utils/Rum/PathInSentence.mjs +6 -0
  300. package/Utils/Rum/UrlScrubber.d.mts +4 -0
  301. package/Utils/Rum/UrlScrubber.d.ts +4 -0
  302. package/Utils/Rum/UrlScrubber.js +143 -3
  303. package/Utils/Rum/UserFlow.d.mts +1 -1
  304. package/Utils/Rum/UserFlow.d.ts +1 -1
  305. package/Utils/Rum/UserFlow.js +180 -25
  306. package/Utils/Rum/UserFlow.mjs +1 -1
  307. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  308. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  309. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  310. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  311. package/Utils/Schema/TypeSchemas.js +6 -0
  312. package/Utils/Slo/SloDuration.d.mts +5 -2
  313. package/Utils/Slo/SloDuration.d.ts +5 -2
  314. package/Utils/Slo/SloDuration.js +11 -6
  315. package/Utils/Slo/SloHealth.js +1 -1
  316. package/Utils/StateOrder.js +1 -4
  317. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  318. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  319. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  320. package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
  321. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  322. package/package.json +1 -1
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.MONITORED_SELECT = exports.MONITORING_OFF_SELECT = void 0;
7
+ const MonitorNotCheckedReason_1 = __importDefault(require("../../Types/Monitor/MonitorNotCheckedReason"));
4
8
  /*
5
9
  * A MONITOR WHOSE MONITORING IS TURNED OFF.
6
10
  *
@@ -77,5 +81,22 @@ class MonitoringOff {
77
81
  static isMonitored(monitor) {
78
82
  return (monitor === null || monitor === void 0 ? void 0 : monitor.isArchived) !== true && !MonitoringOff.isOff(monitor);
79
83
  }
84
+ /*
85
+ * Why nothing checks the monitor (read with MONITORED_SELECT), or null
86
+ * when it is checked - exactly when isMonitored is false, so the two never
87
+ * disagree. Archived wins when both are set: unarchiving is what puts the
88
+ * monitor back, and its switch only matters after that. The device pages'
89
+ * "Monitor archived" and "Monitoring off" qualifiers and the Network Map's
90
+ * device nodes say this reason (issue #7346).
91
+ */
92
+ static getNotCheckedReason(monitor) {
93
+ if ((monitor === null || monitor === void 0 ? void 0 : monitor.isArchived) === true) {
94
+ return MonitorNotCheckedReason_1.default.MonitorArchived;
95
+ }
96
+ if (MonitoringOff.isOff(monitor)) {
97
+ return MonitorNotCheckedReason_1.default.MonitoringOff;
98
+ }
99
+ return null;
100
+ }
80
101
  }
81
102
  exports.default = MonitoringOff;
@@ -1,4 +1,4 @@
1
- import NetworkTopology, { NetworkTopologyNodeStatus } from "../../Types/Monitor/SnmpMonitor/NetworkTopology.mjs";
1
+ import NetworkTopology, { NetworkTopologyMonitorNotChecked, NetworkTopologyNodeStatus } from "../../Types/Monitor/SnmpMonitor/NetworkTopology.mjs";
2
2
  import LldpNeighbor from "../../Types/Monitor/SnmpMonitor/LldpNeighbor.mjs";
3
3
  import CdpNeighbor from "../../Types/Monitor/SnmpMonitor/CdpNeighbor.mjs";
4
4
  import { TopologyDeviceRoleInput } from "./NetworkDeviceRoleCatalog.mjs";
@@ -32,6 +32,7 @@ export interface TopologyDeviceInput {
32
32
  controllerProvider?: string | undefined;
33
33
  isEndpointCollectionEnabled?: boolean | undefined;
34
34
  isDescribedByController?: boolean | undefined;
35
+ monitorNotChecked?: NetworkTopologyMonitorNotChecked | undefined;
35
36
  }
36
37
  export interface TopologyInterfaceInput {
37
38
  networkDeviceId: string;
@@ -1,4 +1,4 @@
1
- import NetworkTopology, { NetworkTopologyNodeStatus } from "../../Types/Monitor/SnmpMonitor/NetworkTopology";
1
+ import NetworkTopology, { NetworkTopologyMonitorNotChecked, NetworkTopologyNodeStatus } from "../../Types/Monitor/SnmpMonitor/NetworkTopology";
2
2
  import LldpNeighbor from "../../Types/Monitor/SnmpMonitor/LldpNeighbor";
3
3
  import CdpNeighbor from "../../Types/Monitor/SnmpMonitor/CdpNeighbor";
4
4
  import { TopologyDeviceRoleInput } from "./NetworkDeviceRoleCatalog";
@@ -32,6 +32,7 @@ export interface TopologyDeviceInput {
32
32
  controllerProvider?: string | undefined;
33
33
  isEndpointCollectionEnabled?: boolean | undefined;
34
34
  isDescribedByController?: boolean | undefined;
35
+ monitorNotChecked?: NetworkTopologyMonitorNotChecked | undefined;
35
36
  }
36
37
  export interface TopologyInterfaceInput {
37
38
  networkDeviceId: string;
@@ -253,6 +253,16 @@ class NetworkTopologyUtil {
253
253
  */
254
254
  macAddress: (0, EndpointAttachmentUtil_1.normalizeMac)(device.macAddress),
255
255
  };
256
+ /*
257
+ * Only when there is one, so a node whose monitor is checked - and
258
+ * every node of an older caller - carries no such field at all.
259
+ */
260
+ if (device.monitorNotChecked) {
261
+ deviceNode.monitorNotChecked = {
262
+ monitorId: device.monitorNotChecked.monitorId,
263
+ reason: device.monitorNotChecked.reason,
264
+ };
265
+ }
256
266
  /*
257
267
  * The address it is polled at, when that is an IP: drawn under its
258
268
  * name and searched by (issue #5775). A device registered by a DNS
@@ -1,5 +1,6 @@
1
1
  import Monitor from "../../Models/DatabaseModels/Monitor.mjs";
2
2
  import Query from "../../Types/BaseDatabase/Query.mjs";
3
+ import ObjectID from "../../Types/ObjectID.mjs";
3
4
  export default class NotOperationalMonitorQuery {
4
- static getQuery(): Query<Monitor>;
5
+ static getQuery(projectId?: ObjectID | string | null | undefined): Query<Monitor>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import Monitor from "../../Models/DatabaseModels/Monitor";
2
2
  import Query from "../../Types/BaseDatabase/Query";
3
+ import ObjectID from "../../Types/ObjectID";
3
4
  export default class NotOperationalMonitorQuery {
4
- static getQuery(): Query<Monitor>;
5
+ static getQuery(projectId?: ObjectID | string | null | undefined): Query<Monitor>;
5
6
  }
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ObjectID_1 = __importDefault(require("../../Types/ObjectID"));
6
7
  const MonitoringOff_1 = __importDefault(require("./MonitoringOff"));
7
8
  /*
8
9
  * WHICH MONITORS ARE NOT OPERATIONAL.
@@ -30,10 +31,28 @@ const MonitoringOff_1 = __importDefault(require("./MonitoringOff"));
30
31
  * problemsOnly. The checked monitors are MonitoringOff's.
31
32
  */
32
33
  class NotOperationalMonitorQuery {
33
- static getQuery() {
34
- return Object.assign(Object.assign({}, MonitoringOff_1.default.getMonitoredQuery()), { currentMonitorStatus: {
35
- isOperationalState: false,
36
- } });
34
+ /*
35
+ * Given the project the monitors are read in, the status is asked of that
36
+ * project too (issue #8096). A monitor's statuses are its project's own,
37
+ * so the answer is the same, but Postgres can then start from the
38
+ * project's few statuses that are not operational and read only the
39
+ * monitors that hold one (the index on currentMonitorStatusId), where it
40
+ * otherwise reads every monitor of the project and joins each to its
41
+ * status: 1,915 buffers instead of 8,585 for a count in a project of
42
+ * 20,000 monitors. Every Not Operational count and list that knows its
43
+ * project passes it; a list also counts what it lists.
44
+ */
45
+ static getQuery(projectId) {
46
+ return Object.assign(Object.assign({}, MonitoringOff_1.default.getMonitoredQuery()), { currentMonitorStatus: projectId
47
+ ? {
48
+ isOperationalState: false,
49
+ projectId: projectId instanceof ObjectID_1.default
50
+ ? projectId
51
+ : new ObjectID_1.default(projectId),
52
+ }
53
+ : {
54
+ isOperationalState: false,
55
+ } });
37
56
  }
38
57
  }
39
58
  exports.default = NotOperationalMonitorQuery;
@@ -0,0 +1,14 @@
1
+ import { RequestFailedPhase } from "../../Types/Probe/RequestFailedDetails.mjs";
2
+ import { PluralTemplate, Translator } from "../../Types/Translator.mjs";
3
+ export declare const PROBE_TIMEOUT_FAILURE_CAUSE: PluralTemplate;
4
+ export declare const writeProbeTimeoutFailureCause: (triedCount: number | undefined) => string;
5
+ export declare const readProbeTimeoutFailureCause: (failureCause: string | null | undefined) => number | null;
6
+ export declare const getProbeFailureCauseText: (data: {
7
+ translator: Translator;
8
+ failureCause: string | null | undefined;
9
+ }) => string;
10
+ export declare const REQUEST_FAILED_PHASE_WORDS: Readonly<Record<RequestFailedPhase, string>>;
11
+ export declare const getRequestFailedPhaseText: (data: {
12
+ translator: Translator;
13
+ failedPhase: string | null | undefined;
14
+ }) => string;
@@ -0,0 +1,14 @@
1
+ import { RequestFailedPhase } from "../../Types/Probe/RequestFailedDetails";
2
+ import { PluralTemplate, Translator } from "../../Types/Translator";
3
+ export declare const PROBE_TIMEOUT_FAILURE_CAUSE: PluralTemplate;
4
+ export declare const writeProbeTimeoutFailureCause: (triedCount: number | undefined) => string;
5
+ export declare const readProbeTimeoutFailureCause: (failureCause: string | null | undefined) => number | null;
6
+ export declare const getProbeFailureCauseText: (data: {
7
+ translator: Translator;
8
+ failureCause: string | null | undefined;
9
+ }) => string;
10
+ export declare const REQUEST_FAILED_PHASE_WORDS: Readonly<Record<RequestFailedPhase, string>>;
11
+ export declare const getRequestFailedPhaseText: (data: {
12
+ translator: Translator;
13
+ failedPhase: string | null | undefined;
14
+ }) => string;
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRequestFailedPhaseText = exports.REQUEST_FAILED_PHASE_WORDS = exports.getProbeFailureCauseText = exports.readProbeTimeoutFailureCause = exports.writeProbeTimeoutFailureCause = exports.PROBE_TIMEOUT_FAILURE_CAUSE = void 0;
4
+ const RequestFailedDetails_1 = require("../../Types/Probe/RequestFailedDetails");
5
+ const Translator_1 = require("../../Types/Translator");
6
+ /*
7
+ * WHY A PROBE'S CHECK FAILED, READ IN THE READER'S LANGUAGE.
8
+ *
9
+ * A failed check stores why in the probe's English: its failure cause (the
10
+ * summary's Error) and, for a request, the phase it broke in (Failed
11
+ * Phase).
12
+ * Monitor criteria, incident root causes and logs compare that English, so
13
+ * it is stored as it always was. The monitor summaries read it back here
14
+ * and draw OneUptime's own words in the reader's language; anything else -
15
+ * the network's, the runtime's or a server's own message - stays as
16
+ * written (and is drawn in its own direction on an Arabic or Persian page).
17
+ *
18
+ * The words are translation keys: the Dashboard's npm run i18n:extract
19
+ * reads this directory.
20
+ */
21
+ /*
22
+ * THE PROBE'S TIMEOUT SENTENCE.
23
+ *
24
+ * When every attempt of a check timed out, the probe of each monitor type
25
+ * that retries - Website, API, Ping, SSL Certificate, DNS, Domain, SNMP
26
+ * and External Status Page - writes one sentence as the check's failure
27
+ * cause: "Request was tried 3 times and it timed out." The probe writes it
28
+ * with writeProbeTimeoutFailureCause, always in the general form with the
29
+ * count in digits ("1 times" too), exactly as it did before the sentence
30
+ * became a key: an "Error contains" criterion, a root cause or a log line
31
+ * written against that English still finds it.
32
+ *
33
+ * Drawn for a reader, it is a count-dependent sentence: "once" for one
34
+ * try, and each language's own plural forms, with the count in the
35
+ * reader's digits (getProbeFailureCauseText).
36
+ */
37
+ exports.PROBE_TIMEOUT_FAILURE_CAUSE = {
38
+ // Stored under the general sentence's key plus "_one", never on its own.
39
+ one: "Request was tried once and it timed out.",
40
+ other: (0, Translator_1.translationKey)("Request was tried {{count}} times and it timed out."),
41
+ };
42
+ // The stored sentence's words before and after its count.
43
+ const TIMEOUT_COUNT_PLACEHOLDER = "{{count}}";
44
+ const TIMEOUT_BEFORE_COUNT = exports.PROBE_TIMEOUT_FAILURE_CAUSE.other.slice(0, exports.PROBE_TIMEOUT_FAILURE_CAUSE.other.indexOf(TIMEOUT_COUNT_PLACEHOLDER));
45
+ const TIMEOUT_AFTER_COUNT = exports.PROBE_TIMEOUT_FAILURE_CAUSE.other.slice(exports.PROBE_TIMEOUT_FAILURE_CAUSE.other.indexOf(TIMEOUT_COUNT_PLACEHOLDER) +
46
+ TIMEOUT_COUNT_PLACEHOLDER.length);
47
+ /*
48
+ * A count the probe writes: Latin digits only, as String(number) writes a
49
+ * whole number, and no longer than any count of tries could be. Anchored
50
+ * and with no repeat beside another, so it reads any text in time that
51
+ * grows with its length.
52
+ */
53
+ const STORED_COUNT_PATTERN = /^[0-9]{1,9}$/;
54
+ /*
55
+ * The failure cause the probe stores when every one of `triedCount`
56
+ * attempts timed out - word for word the English it always wrote with
57
+ * "Request was tried " + count + " times and it timed out.", the count
58
+ * written by String() as that concatenation did.
59
+ */
60
+ const writeProbeTimeoutFailureCause = (triedCount) => {
61
+ return (0, Translator_1.fillTemplate)(exports.PROBE_TIMEOUT_FAILURE_CAUSE.other, {
62
+ count: String(triedCount),
63
+ });
64
+ };
65
+ exports.writeProbeTimeoutFailureCause = writeProbeTimeoutFailureCause;
66
+ /*
67
+ * The count of tries a stored failure cause names, when the cause is
68
+ * exactly the probe's timeout sentence (space round it aside); null for any
69
+ * other cause - a sentence close to it but not the same, the sentence
70
+ * inside a longer message, the network's or a server's own words - which
71
+ * stays as written.
72
+ */
73
+ const readProbeTimeoutFailureCause = (failureCause) => {
74
+ const text = typeof failureCause === "string" ? failureCause.trim() : "";
75
+ if (text.length <= TIMEOUT_BEFORE_COUNT.length + TIMEOUT_AFTER_COUNT.length ||
76
+ !text.startsWith(TIMEOUT_BEFORE_COUNT) ||
77
+ !text.endsWith(TIMEOUT_AFTER_COUNT)) {
78
+ return null;
79
+ }
80
+ const count = text.slice(TIMEOUT_BEFORE_COUNT.length, text.length - TIMEOUT_AFTER_COUNT.length);
81
+ if (!STORED_COUNT_PATTERN.test(count)) {
82
+ return null;
83
+ }
84
+ return Number.parseInt(count, 10);
85
+ };
86
+ exports.readProbeTimeoutFailureCause = readProbeTimeoutFailureCause;
87
+ /*
88
+ * A check's failure cause - or any message of the probe's - as a summary
89
+ * draws it: the probe's timeout sentence in the reader's language, with
90
+ * the count in the reader's digits; anything else as written, trimmed.
91
+ */
92
+ const getProbeFailureCauseText = (data) => {
93
+ const text = typeof data.failureCause === "string" ? data.failureCause.trim() : "";
94
+ const triedCount = (0, exports.readProbeTimeoutFailureCause)(text);
95
+ if (triedCount === null) {
96
+ return text;
97
+ }
98
+ return data.translator.translatePlural(exports.PROBE_TIMEOUT_FAILURE_CAUSE, triedCount);
99
+ };
100
+ exports.getProbeFailureCauseText = getProbeFailureCauseText;
101
+ /*
102
+ * WHERE A REQUEST BROKE.
103
+ *
104
+ * Each phase a request can fail in (RequestFailedDetails' failedPhase, the
105
+ * summary's Failed Phase) by its English words, a translation key. The probe
106
+ * stores the enum's value, which is these words; criteria may compare it,
107
+ * so it never changes.
108
+ */
109
+ exports.REQUEST_FAILED_PHASE_WORDS = {
110
+ [RequestFailedDetails_1.RequestFailedPhase.DNSResolution]: (0, Translator_1.translationKey)("DNS Resolution"),
111
+ [RequestFailedDetails_1.RequestFailedPhase.TCPConnection]: (0, Translator_1.translationKey)("TCP Connection"),
112
+ [RequestFailedDetails_1.RequestFailedPhase.TLSHandshake]: (0, Translator_1.translationKey)("TLS Handshake"),
113
+ [RequestFailedDetails_1.RequestFailedPhase.RequestTimeout]: (0, Translator_1.translationKey)("Request Timeout"),
114
+ [RequestFailedDetails_1.RequestFailedPhase.ServerResponse]: (0, Translator_1.translationKey)("Server Response"),
115
+ [RequestFailedDetails_1.RequestFailedPhase.RequestAborted]: (0, Translator_1.translationKey)("Request Aborted"),
116
+ [RequestFailedDetails_1.RequestFailedPhase.NetworkError]: (0, Translator_1.translationKey)("Network Error"),
117
+ [RequestFailedDetails_1.RequestFailedPhase.CertificateError]: (0, Translator_1.translationKey)("Certificate Error"),
118
+ [RequestFailedDetails_1.RequestFailedPhase.TargetResolution]: (0, Translator_1.translationKey)("Target Resolution"),
119
+ [RequestFailedDetails_1.RequestFailedPhase.Unknown]: (0, Translator_1.translationKey)("Unknown"),
120
+ };
121
+ const isRequestFailedPhase = (value) => {
122
+ return Object.prototype.hasOwnProperty.call(exports.REQUEST_FAILED_PHASE_WORDS, value);
123
+ };
124
+ /*
125
+ * The phase a request failed in, as the summary's Failed Phase draws it: the
126
+ * reader's word for a phase the probe names; a value no probe writes today
127
+ * (a newer probe's) as written, trimmed; "" for none.
128
+ */
129
+ const getRequestFailedPhaseText = (data) => {
130
+ const phase = typeof data.failedPhase === "string" ? data.failedPhase.trim() : "";
131
+ if (!phase || !isRequestFailedPhase(phase)) {
132
+ return phase;
133
+ }
134
+ const words = exports.REQUEST_FAILED_PHASE_WORDS[phase];
135
+ return data.translator.translateText(words) || words;
136
+ };
137
+ exports.getRequestFailedPhaseText = getRequestFailedPhaseText;
@@ -0,0 +1,7 @@
1
+ import commonJsModule from "./ProbeFailureReading.js";
2
+ export const PROBE_TIMEOUT_FAILURE_CAUSE = commonJsModule.PROBE_TIMEOUT_FAILURE_CAUSE;
3
+ export const REQUEST_FAILED_PHASE_WORDS = commonJsModule.REQUEST_FAILED_PHASE_WORDS;
4
+ export const getProbeFailureCauseText = commonJsModule.getProbeFailureCauseText;
5
+ export const getRequestFailedPhaseText = commonJsModule.getRequestFailedPhaseText;
6
+ export const readProbeTimeoutFailureCause = commonJsModule.readProbeTimeoutFailureCause;
7
+ export const writeProbeTimeoutFailureCause = commonJsModule.writeProbeTimeoutFailureCause;
@@ -0,0 +1,9 @@
1
+ import ObjectID from "../../Types/ObjectID.mjs";
2
+ import MonitorNotCheckedReason from "../../Types/Monitor/MonitorNotCheckedReason.mjs";
3
+ import { MonitoredFlags } from "../Monitor/MonitoringOff.mjs";
4
+ export interface BoundMonitorDeviceRow {
5
+ monitoringMethod?: string | null | undefined;
6
+ monitorId?: ObjectID | string | null | undefined;
7
+ monitor?: MonitoredFlags | null | undefined;
8
+ }
9
+ export declare function getBoundMonitorNotCheckedReason(device: BoundMonitorDeviceRow): MonitorNotCheckedReason | null;
@@ -0,0 +1,9 @@
1
+ import ObjectID from "../../Types/ObjectID";
2
+ import MonitorNotCheckedReason from "../../Types/Monitor/MonitorNotCheckedReason";
3
+ import { MonitoredFlags } from "../Monitor/MonitoringOff";
4
+ export interface BoundMonitorDeviceRow {
5
+ monitoringMethod?: string | null | undefined;
6
+ monitorId?: ObjectID | string | null | undefined;
7
+ monitor?: MonitoredFlags | null | undefined;
8
+ }
9
+ export declare function getBoundMonitorNotCheckedReason(device: BoundMonitorDeviceRow): MonitorNotCheckedReason | null;
@@ -0,0 +1,15 @@
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.getBoundMonitorNotCheckedReason = getBoundMonitorNotCheckedReason;
7
+ const NetworkDeviceMonitoringMethod_1 = require("../../Types/NetworkDevice/NetworkDeviceMonitoringMethod");
8
+ const MonitoringOff_1 = __importDefault(require("../Monitor/MonitoringOff"));
9
+ function getBoundMonitorNotCheckedReason(device) {
10
+ if (!NetworkDeviceMonitoringMethod_1.NetworkDeviceMonitoringMethodUtil.isMonitorBacked(device.monitoringMethod) ||
11
+ !device.monitorId) {
12
+ return null;
13
+ }
14
+ return MonitoringOff_1.default.getNotCheckedReason(device.monitor);
15
+ }
@@ -0,0 +1,2 @@
1
+ import commonJsModule from "./BoundMonitorNotChecked.js";
2
+ export const getBoundMonitorNotCheckedReason = commonJsModule.getBoundMonitorNotCheckedReason;
@@ -79,7 +79,7 @@ exports.NUMBERED_RECORD_KINDS = [
79
79
  startsAtColumn: "scheduledMaintenanceNumbersStartAt",
80
80
  prefixColumn: "scheduledMaintenanceNumberPrefix",
81
81
  title: "Scheduled Maintenance Numbers Start At",
82
- recordName: "scheduled maintenance event",
82
+ recordName: "maintenance event",
83
83
  },
84
84
  {
85
85
  kind: NumberedRecordKind.SecurityCase,
@@ -0,0 +1,159 @@
1
+ export declare enum PromQLValueType {
2
+ Scalar = "scalar",
3
+ InstantVector = "vector",
4
+ RangeVector = "matrix",
5
+ String = "string"
6
+ }
7
+ export declare const PROMQL_VALUE_TYPE_NAMES: Record<PromQLValueType, string>;
8
+ export declare const PROMQL_VALUE_TYPE_WITH_ARTICLE: Record<PromQLValueType, string>;
9
+ export declare enum PromQLMatchType {
10
+ Equal = "=",
11
+ NotEqual = "!=",
12
+ RegexMatch = "=~",
13
+ RegexNoMatch = "!~"
14
+ }
15
+ export interface PromQLLabelMatcher {
16
+ name: string;
17
+ type: PromQLMatchType;
18
+ value: string;
19
+ }
20
+ export interface PromQLPosition {
21
+ start: number;
22
+ end: number;
23
+ }
24
+ export declare enum PromQLNodeKind {
25
+ NumberLiteral = "NumberLiteral",
26
+ StringLiteral = "StringLiteral",
27
+ VectorSelector = "VectorSelector",
28
+ MatrixSelector = "MatrixSelector",
29
+ Subquery = "Subquery",
30
+ Call = "Call",
31
+ Aggregate = "Aggregate",
32
+ Binary = "Binary",
33
+ Unary = "Unary",
34
+ Paren = "Paren"
35
+ }
36
+ export type PromQLAtModifier = {
37
+ kind: "timestamp";
38
+ timestampMs: number;
39
+ } | {
40
+ kind: "start";
41
+ } | {
42
+ kind: "end";
43
+ };
44
+ export interface PromQLNumberLiteral {
45
+ kind: PromQLNodeKind.NumberLiteral;
46
+ value: number;
47
+ position: PromQLPosition;
48
+ }
49
+ export interface PromQLStringLiteral {
50
+ kind: PromQLNodeKind.StringLiteral;
51
+ value: string;
52
+ position: PromQLPosition;
53
+ }
54
+ export interface PromQLVectorSelector {
55
+ kind: PromQLNodeKind.VectorSelector;
56
+ name: string | undefined;
57
+ matchers: Array<PromQLLabelMatcher>;
58
+ offsetMs: number;
59
+ at: PromQLAtModifier | undefined;
60
+ position: PromQLPosition;
61
+ }
62
+ export interface PromQLMatrixSelector {
63
+ kind: PromQLNodeKind.MatrixSelector;
64
+ vectorSelector: PromQLVectorSelector;
65
+ rangeMs: number;
66
+ position: PromQLPosition;
67
+ }
68
+ export interface PromQLSubquery {
69
+ kind: PromQLNodeKind.Subquery;
70
+ expression: PromQLExpression;
71
+ rangeMs: number;
72
+ stepMs: number | undefined;
73
+ offsetMs: number;
74
+ at: PromQLAtModifier | undefined;
75
+ position: PromQLPosition;
76
+ }
77
+ export interface PromQLCall {
78
+ kind: PromQLNodeKind.Call;
79
+ functionName: string;
80
+ args: Array<PromQLExpression>;
81
+ position: PromQLPosition;
82
+ }
83
+ export declare enum PromQLAggregateOperator {
84
+ Sum = "sum",
85
+ Avg = "avg",
86
+ Min = "min",
87
+ Max = "max",
88
+ Count = "count",
89
+ Group = "group",
90
+ Stddev = "stddev",
91
+ Stdvar = "stdvar",
92
+ Topk = "topk",
93
+ Bottomk = "bottomk",
94
+ Quantile = "quantile",
95
+ CountValues = "count_values"
96
+ }
97
+ export interface PromQLAggregate {
98
+ kind: PromQLNodeKind.Aggregate;
99
+ operator: PromQLAggregateOperator;
100
+ expression: PromQLExpression;
101
+ parameter: PromQLExpression | undefined;
102
+ grouping: Array<string>;
103
+ without: boolean;
104
+ position: PromQLPosition;
105
+ }
106
+ export declare enum PromQLBinaryOperator {
107
+ Add = "+",
108
+ Sub = "-",
109
+ Mul = "*",
110
+ Div = "/",
111
+ Mod = "%",
112
+ Pow = "^",
113
+ Atan2 = "atan2",
114
+ Eql = "==",
115
+ Neq = "!=",
116
+ Gtr = ">",
117
+ Lss = "<",
118
+ Gte = ">=",
119
+ Lte = "<=",
120
+ And = "and",
121
+ Or = "or",
122
+ Unless = "unless"
123
+ }
124
+ export declare enum PromQLVectorMatchCardinality {
125
+ OneToOne = "one-to-one",
126
+ ManyToOne = "many-to-one",
127
+ OneToMany = "one-to-many",
128
+ ManyToMany = "many-to-many"
129
+ }
130
+ export interface PromQLVectorMatching {
131
+ cardinality: PromQLVectorMatchCardinality;
132
+ on: boolean;
133
+ matchingLabels: Array<string>;
134
+ include: Array<string>;
135
+ }
136
+ export interface PromQLBinary {
137
+ kind: PromQLNodeKind.Binary;
138
+ operator: PromQLBinaryOperator;
139
+ lhs: PromQLExpression;
140
+ rhs: PromQLExpression;
141
+ returnBool: boolean;
142
+ matching: PromQLVectorMatching | undefined;
143
+ position: PromQLPosition;
144
+ }
145
+ export interface PromQLUnary {
146
+ kind: PromQLNodeKind.Unary;
147
+ operator: PromQLBinaryOperator.Add | PromQLBinaryOperator.Sub;
148
+ expression: PromQLExpression;
149
+ position: PromQLPosition;
150
+ }
151
+ export interface PromQLParen {
152
+ kind: PromQLNodeKind.Paren;
153
+ expression: PromQLExpression;
154
+ position: PromQLPosition;
155
+ }
156
+ export type PromQLExpression = PromQLNumberLiteral | PromQLStringLiteral | PromQLVectorSelector | PromQLMatrixSelector | PromQLSubquery | PromQLCall | PromQLAggregate | PromQLBinary | PromQLUnary | PromQLParen;
157
+ export declare const PROMQL_METRIC_NAME_LABEL: string;
158
+ export declare const isComparisonOperator: (operator: PromQLBinaryOperator) => boolean;
159
+ export declare const isSetOperator: (operator: PromQLBinaryOperator) => boolean;