@oneuptime/common 14.0.109 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/SecurityEvent.js +1 -1
- package/Models/DatabaseModels/AIInsight.js +2 -2
- package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.js +20 -4
- package/Models/DatabaseModels/AlertEpisode.js +2 -2
- package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
- package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertSeverity.js +13 -4
- package/Models/DatabaseModels/AlertState.js +1 -1
- package/Models/DatabaseModels/CallLog.js +12 -12
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/EmailLog.js +14 -14
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +6 -6
- package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
- package/Models/DatabaseModels/GlobalConfig.js +74 -45
- package/Models/DatabaseModels/Incident.js +20 -4
- package/Models/DatabaseModels/IncidentEpisode.js +2 -2
- package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
- package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentSeverity.js +13 -4
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/IncidentState.js +1 -1
- package/Models/DatabaseModels/IncidentTemplate.js +2 -2
- package/Models/DatabaseModels/Index.js +4 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +54 -20
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +64 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +28 -11
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +16 -11
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +3 -0
- package/Models/DatabaseModels/Project.d.ts +3 -0
- package/Models/DatabaseModels/Project.js +142 -5
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/PushNotificationLog.js +12 -12
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +8 -2
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +9 -6
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +10 -7
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/Service.js +1 -1
- package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
- package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
- package/Models/DatabaseModels/SmsLog.js +12 -12
- package/Models/DatabaseModels/StatusPage.js +5 -5
- package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelegramLog.js +12 -12
- package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
- package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
- package/Models/DatabaseModels/User.d.mts +4 -0
- package/Models/DatabaseModels/User.d.ts +4 -0
- package/Models/DatabaseModels/User.js +100 -0
- package/Models/DatabaseModels/UserOnCallLog.js +6 -6
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
- package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
- package/Models/DatabaseModels/WebhookLog.js +12 -12
- package/Models/DatabaseModels/WhatsAppLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +25 -1
- package/Types/AI/AIActionWords.d.ts +25 -1
- package/Types/AI/AIActionWords.js +166 -3
- package/Types/AI/AIActionWords.mjs +6 -0
- package/Types/AI/AIChatTypes.d.mts +4 -2
- package/Types/AI/AIChatTypes.d.ts +4 -2
- package/Types/AI/AIChatTypes.js +5 -0
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +45 -0
- package/Types/AI/AiRunRefusal.d.ts +45 -0
- package/Types/AI/AiRunRefusal.js +187 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/Analytics/ProductEvent.d.mts +6 -1
- package/Types/Analytics/ProductEvent.d.ts +6 -1
- package/Types/Analytics/ProductEvent.js +41 -0
- package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
- package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
- package/Types/AuditLog/AuditLogCoverage.js +4 -2
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +33 -3
- package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.js +102 -65
- package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
- package/Types/Database/TableMetadata.d.mts +2 -0
- package/Types/Database/TableMetadata.d.ts +2 -0
- package/Types/Database/TableMetadata.js +6 -0
- package/Types/Date.d.mts +26 -2
- package/Types/Date.d.ts +26 -2
- package/Types/Date.js +81 -9
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +44 -2
- package/Types/DateLanguage.mjs +2 -0
- package/Types/DirectionArrow.d.mts +7 -0
- package/Types/DirectionArrow.d.ts +7 -0
- package/Types/DirectionArrow.js +88 -0
- package/Types/DirectionArrow.mjs +7 -0
- package/Types/Docs/GlossaryTerm.d.mts +1 -0
- package/Types/Docs/GlossaryTerm.d.ts +1 -0
- package/Types/Docs/GlossaryTerm.js +2 -0
- package/Types/Docs/RetiredNames.d.mts +11 -0
- package/Types/Docs/RetiredNames.d.ts +11 -0
- package/Types/Docs/RetiredNames.js +139 -0
- package/Types/Docs/RetiredNames.mjs +3 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Exception/RefusalWithValues.d.mts +7 -0
- package/Types/Exception/RefusalWithValues.d.ts +7 -0
- package/Types/Exception/RefusalWithValues.js +76 -0
- package/Types/Exception/RefusalWithValues.mjs +3 -0
- package/Types/Exception/UnexplainedError.d.mts +13 -0
- package/Types/Exception/UnexplainedError.d.ts +13 -0
- package/Types/Exception/UnexplainedError.js +53 -1
- package/Types/Exception/UnexplainedError.mjs +1 -0
- package/Types/File/FileSize.d.mts +4 -1
- package/Types/File/FileSize.d.ts +4 -1
- package/Types/File/FileSize.js +18 -17
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/HostCollector/HostCollector.d.mts +1 -0
- package/Types/HostCollector/HostCollector.d.ts +1 -0
- package/Types/HostCollector/HostCollector.js +26 -10
- package/Types/HostCollector/HostCollector.mjs +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/Monitor/MonitorCriteria.js +2 -2
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/MonitorStep.js +1 -1
- package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/Monitor/WhoIsTold.d.mts +3 -1
- package/Types/Monitor/WhoIsTold.d.ts +3 -1
- package/Types/Monitor/WhoIsTold.js +2 -1
- package/Types/NotificationRule/PagingLadder.d.mts +137 -0
- package/Types/NotificationRule/PagingLadder.d.ts +137 -0
- package/Types/NotificationRule/PagingLadder.js +682 -0
- package/Types/NotificationRule/PagingLadder.mjs +28 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
- package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/Permission.d.mts +2 -2
- package/Types/Permission.d.ts +2 -2
- package/Types/Permission.js +196 -195
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/Product/ProductCatalog.d.mts +10 -0
- package/Types/Product/ProductCatalog.d.ts +10 -0
- package/Types/Product/ProductCatalog.js +208 -0
- package/Types/Product/ProductCatalog.mjs +6 -0
- package/Types/Product/ProductOfTable.d.mts +3 -0
- package/Types/Product/ProductOfTable.d.ts +3 -0
- package/Types/Product/ProductOfTable.js +68 -0
- package/Types/Product/ProductOfTable.mjs +3 -0
- package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
- package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
- package/Types/Product/ProjectProductsAnswer.js +35 -2
- package/Types/Product/ProjectProductsAnswer.mjs +1 -0
- package/Types/Product/ServerProducts.d.mts +65 -0
- package/Types/Product/ServerProducts.d.ts +65 -0
- package/Types/Product/ServerProducts.js +383 -0
- package/Types/Product/ServerProducts.mjs +26 -0
- package/Types/Product/ServerProductsAnswer.d.mts +21 -0
- package/Types/Product/ServerProductsAnswer.d.ts +21 -0
- package/Types/Product/ServerProductsAnswer.js +78 -0
- package/Types/Product/ServerProductsAnswer.mjs +5 -0
- package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
- package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
- package/Types/ProductFeedback/ProductFeedback.js +8 -0
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
- package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
- package/Types/SampleProject/SampleProject.d.mts +54 -0
- package/Types/SampleProject/SampleProject.d.ts +54 -0
- package/Types/SampleProject/SampleProject.js +177 -0
- package/Types/SampleProject/SampleProject.mjs +22 -0
- package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
- package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
- package/Types/SampleProject/SampleProjectContent.js +397 -0
- package/Types/SampleProject/SampleProjectContent.mjs +18 -0
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +54 -12
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +414 -50
- package/Types/Translator.mjs +1 -0
- package/Types/UsedBy/UsedBy.d.mts +103 -0
- package/Types/UsedBy/UsedBy.d.ts +103 -0
- package/Types/UsedBy/UsedBy.js +389 -0
- package/Types/UsedBy/UsedBy.mjs +20 -0
- package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
- package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
- package/Types/UsedBy/UsedByServerProducts.js +48 -0
- package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
- package/Types/Workflow/PassedOnFields.js +2 -1
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +3 -3
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/AI/MeaningMatch.d.mts +36 -0
- package/Utils/AI/MeaningMatch.d.ts +36 -0
- package/Utils/AI/MeaningMatch.js +535 -0
- package/Utils/AI/MeaningMatch.mjs +7 -0
- package/Utils/ArchivableValues.js +1 -1
- package/Utils/AuditLog/AuditLogValues.js +2 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
- package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DataSecurity/TextScanner.js +2 -2
- package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
- package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
- package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
- package/Utils/DeveloperDocs/CliCommands.js +2 -1
- package/Utils/DeveloperDocs/CliResources.js +2 -1
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
- package/Utils/Markdown/MarkdownTableCell.js +2 -1
- package/Utils/Markdown/OverLongText.js +523 -5
- package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
- package/Utils/Markdown/SlowMarkdown.js +595 -11
- package/Utils/Markdown/SlowMarkdown.mjs +6 -0
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/ModelApiName.d.mts +11 -0
- package/Utils/ModelApiName.d.ts +11 -0
- package/Utils/ModelApiName.js +72 -0
- package/Utils/ModelApiName.mjs +5 -0
- package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +97 -22
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
- package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
- package/Utils/Monitor/ProbeFailureReading.js +137 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/OpenStack/OpenStackCheckName.js +2 -1
- package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
- package/Utils/OpenStack/OpenStackLogs.js +3 -2
- package/Utils/OpenStack/OpenStackTraces.js +2 -1
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/Project/NotificationChannels.js +5 -5
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.js +2 -2
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +965 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +218 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +199 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +831 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +9 -0
- package/Utils/PromQL/PromQLRegex.d.ts +9 -0
- package/Utils/PromQL/PromQLRegex.js +74 -0
- package/Utils/PromQL/PromQLRegex.mjs +2 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +90 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +4 -0
- package/Utils/Rum/UrlScrubber.d.ts +4 -0
- package/Utils/Rum/UrlScrubber.js +143 -3
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +180 -25
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
- package/Utils/ScheduledMaintenanceStart.js +9 -0
- package/Utils/Schema/ModelSchema.js +10 -1
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/StateOrder.js +1 -4
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
- package/Utils/ValueFormatter.d.mts +8 -6
- package/Utils/ValueFormatter.d.ts +8 -6
- package/Utils/ValueFormatter.js +145 -0
- package/package.json +1 -1
|
@@ -56,7 +56,7 @@ exports.PROJECT_NOTIFICATION_CHANNEL_UPDATE_PERMISSIONS = [
|
|
|
56
56
|
Permission_1.default.ManageProjectBilling,
|
|
57
57
|
];
|
|
58
58
|
// The page that holds the switches (its Notification Channels card).
|
|
59
|
-
exports.PROJECT_NOTIFICATION_CHANNEL_SETTINGS_PAGE = "Project Settings > Notifications > Notification
|
|
59
|
+
exports.PROJECT_NOTIFICATION_CHANNEL_SETTINGS_PAGE = "Project Settings > Notifications > Notification Channels";
|
|
60
60
|
// Where that page is in the dashboard, under a project's own route.
|
|
61
61
|
exports.PROJECT_NOTIFICATION_CHANNEL_SETTINGS_PATH = "settings/notification-settings";
|
|
62
62
|
/*
|
|
@@ -81,7 +81,7 @@ const CHANNEL_WORDS = {
|
|
|
81
81
|
* Who can turn it on, and where, as the end of a sentence about a channel
|
|
82
82
|
* that is off ("it") or several ("them"): "a project owner, a Billing Admin
|
|
83
83
|
* or someone with Manage Billing can turn it on in Project Settings >
|
|
84
|
-
* Notifications > Notification
|
|
84
|
+
* Notifications > Notification Channels".
|
|
85
85
|
*/
|
|
86
86
|
const getWhoCanTurnOnClause = (pronoun) => {
|
|
87
87
|
return `${exports.WHO_MAY_TURN_THEM_ON} can turn ${pronoun} on in ${exports.PROJECT_NOTIFICATION_CHANNEL_SETTINGS_PAGE}`;
|
|
@@ -90,7 +90,7 @@ exports.getWhoCanTurnOnClause = getWhoCanTurnOnClause;
|
|
|
90
90
|
/*
|
|
91
91
|
* The same, as the sentence after one that says a channel is off: "A
|
|
92
92
|
* project owner, a Billing Admin or someone with Manage Billing can turn it
|
|
93
|
-
* on in Project Settings > Notifications > Notification
|
|
93
|
+
* on in Project Settings > Notifications > Notification Channels."
|
|
94
94
|
*/
|
|
95
95
|
const getWhoCanTurnOnSentence = (pronoun) => {
|
|
96
96
|
const clause = (0, exports.getWhoCanTurnOnClause)(pronoun);
|
|
@@ -104,7 +104,7 @@ const getPronoun = (channel) => {
|
|
|
104
104
|
* What the server says when something needs a channel the project has off:
|
|
105
105
|
* "SMS is off in this project. A project owner, a Billing Admin or someone
|
|
106
106
|
* with Manage Billing can turn it on in Project Settings > Notifications >
|
|
107
|
-
* Notification
|
|
107
|
+
* Notification Channels." Said to whoever asked - someone who may turn it on, or not -
|
|
108
108
|
* so it names who can rather than telling the reader to.
|
|
109
109
|
*/
|
|
110
110
|
const getProjectNotificationChannelOffMessage = (channel) => {
|
|
@@ -127,7 +127,7 @@ exports.STATUS_PAGE_SMS_SUBSCRIPTIONS_SMS_OFF_MESSAGE = `Visitors can't subscrib
|
|
|
127
127
|
* channel is off. They may turn it on, so it tells them to, and where (the
|
|
128
128
|
* email adds the link to that page): "SMS is off in this project. If it
|
|
129
129
|
* should be on, turn it on in Project Settings > Notifications > Notification
|
|
130
|
-
*
|
|
130
|
+
* Channels."
|
|
131
131
|
*/
|
|
132
132
|
const getProjectNotificationChannelOffOwnerSentence = (channel) => {
|
|
133
133
|
const words = CHANNEL_WORDS[channel];
|
|
@@ -73,7 +73,7 @@ const capitalize = (text) => {
|
|
|
73
73
|
* Who can add to a balance, and where, as the sentence after one that says
|
|
74
74
|
* it is too low - for whoever reads it, who may or may not be one of them:
|
|
75
75
|
* "A project owner or someone with Manage Billing can add balance in Project
|
|
76
|
-
* Settings > Notification
|
|
76
|
+
* Settings > Notification Channels."
|
|
77
77
|
*
|
|
78
78
|
* It does not offer Auto Recharge as the way out: most readers cannot turn
|
|
79
79
|
* it on, and where it is already on, it is what could not add more (its
|
|
@@ -118,7 +118,7 @@ const ONE_MESSAGE_WORDS = {
|
|
|
118
118
|
* verification code again, is refused because the project's balance is too
|
|
119
119
|
* low to pay for the code: "This project's balance is too low to send SMS.
|
|
120
120
|
* A project owner or someone with Manage Billing can add balance in Project
|
|
121
|
-
* Settings > Notification
|
|
121
|
+
* Settings > Notification Channels." Said to whoever asked, so it names who
|
|
122
122
|
* can rather than telling the reader to.
|
|
123
123
|
*/
|
|
124
124
|
const getProjectBalanceTooLowMessage = (channel) => {
|
|
@@ -11,7 +11,7 @@ const TwilioConfigUse_1 = __importDefault(require("../../Types/CallAndSMS/Twilio
|
|
|
11
11
|
*
|
|
12
12
|
* SMS and calls to the people in a project - on-call alerts, notifications, and
|
|
13
13
|
* the codes that verify their phone numbers - go through the project's default
|
|
14
|
-
* Twilio config (Project Settings > Notifications > Notification
|
|
14
|
+
* Twilio config (Project Settings > Notifications > Notification Channels), and
|
|
15
15
|
* through the Twilio account of the OneUptime server itself when the project
|
|
16
16
|
* has none (Admin Dashboard > Settings > Call and SMS). OneUptime Cloud always
|
|
17
17
|
* has the second. A self-hosted server has neither until somebody sets one up,
|
|
@@ -64,7 +64,7 @@ const WHAT_NEEDS_IT = {
|
|
|
64
64
|
* there is none: "The OneUptime server's administrator can add one in Admin
|
|
65
65
|
* Dashboard > Settings > Call and SMS, or a project owner, a project admin or
|
|
66
66
|
* someone with Create Call and SMS can add this project's own in Project
|
|
67
|
-
* Settings > Notification
|
|
67
|
+
* Settings > Notification Channels."
|
|
68
68
|
*/
|
|
69
69
|
exports.WHO_CAN_ADD_A_TWILIO_ACCOUNT_SENTENCE = `The OneUptime server's administrator can add one in ${exports.SERVER_TWILIO_SETTINGS_PAGE}, or ${exports.WHO_MAY_ADD_A_PROJECT_TWILIO_ACCOUNT} can add this project's own in ${exports.PROJECT_TWILIO_SETTINGS_PAGE}.`;
|
|
70
70
|
/*
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The syntax tree of a PromQL query (issue #6796).
|
|
4
|
+
*
|
|
5
|
+
* PromQL is the query language of Prometheus, and the one most people who
|
|
6
|
+
* chart metrics already know. OneUptime reads its own metrics with it: the
|
|
7
|
+
* parser (PromQLParser) turns a query into this tree, and the engine
|
|
8
|
+
* (PromQLEngine) evaluates the tree against series a source hands it, so the
|
|
9
|
+
* same query answers on the Metrics page, in Grafana through the
|
|
10
|
+
* Prometheus-compatible API, and in tests against series held in memory.
|
|
11
|
+
*
|
|
12
|
+
* The tree follows Prometheus 3's own (promql/parser/ast.go), with the
|
|
13
|
+
* modifiers resolved to milliseconds so the engine never reads a duration
|
|
14
|
+
* string.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.isSetOperator = exports.isComparisonOperator = exports.PROMQL_METRIC_NAME_LABEL = exports.PromQLVectorMatchCardinality = exports.PromQLBinaryOperator = exports.PromQLAggregateOperator = exports.PromQLNodeKind = exports.PromQLMatchType = exports.PROMQL_VALUE_TYPE_WITH_ARTICLE = exports.PROMQL_VALUE_TYPE_NAMES = exports.PromQLValueType = void 0;
|
|
18
|
+
var PromQLValueType;
|
|
19
|
+
(function (PromQLValueType) {
|
|
20
|
+
PromQLValueType["Scalar"] = "scalar";
|
|
21
|
+
PromQLValueType["InstantVector"] = "vector";
|
|
22
|
+
PromQLValueType["RangeVector"] = "matrix";
|
|
23
|
+
PromQLValueType["String"] = "string";
|
|
24
|
+
})(PromQLValueType || (exports.PromQLValueType = PromQLValueType = {}));
|
|
25
|
+
/*
|
|
26
|
+
* How a value type is named in a message, the way Prometheus names it:
|
|
27
|
+
* "expected type range vector in call to function rate".
|
|
28
|
+
*/
|
|
29
|
+
exports.PROMQL_VALUE_TYPE_NAMES = {
|
|
30
|
+
[PromQLValueType.Scalar]: "scalar",
|
|
31
|
+
[PromQLValueType.InstantVector]: "instant vector",
|
|
32
|
+
[PromQLValueType.RangeVector]: "range vector",
|
|
33
|
+
[PromQLValueType.String]: "string",
|
|
34
|
+
};
|
|
35
|
+
// A value type with its article, for the middle of a sentence.
|
|
36
|
+
exports.PROMQL_VALUE_TYPE_WITH_ARTICLE = {
|
|
37
|
+
[PromQLValueType.Scalar]: "a scalar",
|
|
38
|
+
[PromQLValueType.InstantVector]: "an instant vector",
|
|
39
|
+
[PromQLValueType.RangeVector]: "a range vector",
|
|
40
|
+
[PromQLValueType.String]: "a string",
|
|
41
|
+
};
|
|
42
|
+
var PromQLMatchType;
|
|
43
|
+
(function (PromQLMatchType) {
|
|
44
|
+
PromQLMatchType["Equal"] = "=";
|
|
45
|
+
PromQLMatchType["NotEqual"] = "!=";
|
|
46
|
+
PromQLMatchType["RegexMatch"] = "=~";
|
|
47
|
+
PromQLMatchType["RegexNoMatch"] = "!~";
|
|
48
|
+
})(PromQLMatchType || (exports.PromQLMatchType = PromQLMatchType = {}));
|
|
49
|
+
var PromQLNodeKind;
|
|
50
|
+
(function (PromQLNodeKind) {
|
|
51
|
+
PromQLNodeKind["NumberLiteral"] = "NumberLiteral";
|
|
52
|
+
PromQLNodeKind["StringLiteral"] = "StringLiteral";
|
|
53
|
+
PromQLNodeKind["VectorSelector"] = "VectorSelector";
|
|
54
|
+
PromQLNodeKind["MatrixSelector"] = "MatrixSelector";
|
|
55
|
+
PromQLNodeKind["Subquery"] = "Subquery";
|
|
56
|
+
PromQLNodeKind["Call"] = "Call";
|
|
57
|
+
PromQLNodeKind["Aggregate"] = "Aggregate";
|
|
58
|
+
PromQLNodeKind["Binary"] = "Binary";
|
|
59
|
+
PromQLNodeKind["Unary"] = "Unary";
|
|
60
|
+
PromQLNodeKind["Paren"] = "Paren";
|
|
61
|
+
})(PromQLNodeKind || (exports.PromQLNodeKind = PromQLNodeKind = {}));
|
|
62
|
+
var PromQLAggregateOperator;
|
|
63
|
+
(function (PromQLAggregateOperator) {
|
|
64
|
+
PromQLAggregateOperator["Sum"] = "sum";
|
|
65
|
+
PromQLAggregateOperator["Avg"] = "avg";
|
|
66
|
+
PromQLAggregateOperator["Min"] = "min";
|
|
67
|
+
PromQLAggregateOperator["Max"] = "max";
|
|
68
|
+
PromQLAggregateOperator["Count"] = "count";
|
|
69
|
+
PromQLAggregateOperator["Group"] = "group";
|
|
70
|
+
PromQLAggregateOperator["Stddev"] = "stddev";
|
|
71
|
+
PromQLAggregateOperator["Stdvar"] = "stdvar";
|
|
72
|
+
PromQLAggregateOperator["Topk"] = "topk";
|
|
73
|
+
PromQLAggregateOperator["Bottomk"] = "bottomk";
|
|
74
|
+
PromQLAggregateOperator["Quantile"] = "quantile";
|
|
75
|
+
PromQLAggregateOperator["CountValues"] = "count_values";
|
|
76
|
+
})(PromQLAggregateOperator || (exports.PromQLAggregateOperator = PromQLAggregateOperator = {}));
|
|
77
|
+
var PromQLBinaryOperator;
|
|
78
|
+
(function (PromQLBinaryOperator) {
|
|
79
|
+
PromQLBinaryOperator["Add"] = "+";
|
|
80
|
+
PromQLBinaryOperator["Sub"] = "-";
|
|
81
|
+
PromQLBinaryOperator["Mul"] = "*";
|
|
82
|
+
PromQLBinaryOperator["Div"] = "/";
|
|
83
|
+
PromQLBinaryOperator["Mod"] = "%";
|
|
84
|
+
PromQLBinaryOperator["Pow"] = "^";
|
|
85
|
+
PromQLBinaryOperator["Atan2"] = "atan2";
|
|
86
|
+
PromQLBinaryOperator["Eql"] = "==";
|
|
87
|
+
PromQLBinaryOperator["Neq"] = "!=";
|
|
88
|
+
PromQLBinaryOperator["Gtr"] = ">";
|
|
89
|
+
PromQLBinaryOperator["Lss"] = "<";
|
|
90
|
+
PromQLBinaryOperator["Gte"] = ">=";
|
|
91
|
+
PromQLBinaryOperator["Lte"] = "<=";
|
|
92
|
+
PromQLBinaryOperator["And"] = "and";
|
|
93
|
+
PromQLBinaryOperator["Or"] = "or";
|
|
94
|
+
PromQLBinaryOperator["Unless"] = "unless";
|
|
95
|
+
})(PromQLBinaryOperator || (exports.PromQLBinaryOperator = PromQLBinaryOperator = {}));
|
|
96
|
+
var PromQLVectorMatchCardinality;
|
|
97
|
+
(function (PromQLVectorMatchCardinality) {
|
|
98
|
+
PromQLVectorMatchCardinality["OneToOne"] = "one-to-one";
|
|
99
|
+
PromQLVectorMatchCardinality["ManyToOne"] = "many-to-one";
|
|
100
|
+
PromQLVectorMatchCardinality["OneToMany"] = "one-to-many";
|
|
101
|
+
PromQLVectorMatchCardinality["ManyToMany"] = "many-to-many";
|
|
102
|
+
})(PromQLVectorMatchCardinality || (exports.PromQLVectorMatchCardinality = PromQLVectorMatchCardinality = {}));
|
|
103
|
+
exports.PROMQL_METRIC_NAME_LABEL = "__name__";
|
|
104
|
+
const isComparisonOperator = (operator) => {
|
|
105
|
+
return (operator === PromQLBinaryOperator.Eql ||
|
|
106
|
+
operator === PromQLBinaryOperator.Neq ||
|
|
107
|
+
operator === PromQLBinaryOperator.Gtr ||
|
|
108
|
+
operator === PromQLBinaryOperator.Lss ||
|
|
109
|
+
operator === PromQLBinaryOperator.Gte ||
|
|
110
|
+
operator === PromQLBinaryOperator.Lte);
|
|
111
|
+
};
|
|
112
|
+
exports.isComparisonOperator = isComparisonOperator;
|
|
113
|
+
const isSetOperator = (operator) => {
|
|
114
|
+
return (operator === PromQLBinaryOperator.And ||
|
|
115
|
+
operator === PromQLBinaryOperator.Or ||
|
|
116
|
+
operator === PromQLBinaryOperator.Unless);
|
|
117
|
+
};
|
|
118
|
+
exports.isSetOperator = isSetOperator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import commonJsModule from "./PromQLAst.js";
|
|
2
|
+
export const PROMQL_METRIC_NAME_LABEL = commonJsModule.PROMQL_METRIC_NAME_LABEL;
|
|
3
|
+
export const PROMQL_VALUE_TYPE_NAMES = commonJsModule.PROMQL_VALUE_TYPE_NAMES;
|
|
4
|
+
export const PROMQL_VALUE_TYPE_WITH_ARTICLE = commonJsModule.PROMQL_VALUE_TYPE_WITH_ARTICLE;
|
|
5
|
+
export const PromQLAggregateOperator = commonJsModule.PromQLAggregateOperator;
|
|
6
|
+
export const PromQLBinaryOperator = commonJsModule.PromQLBinaryOperator;
|
|
7
|
+
export const PromQLMatchType = commonJsModule.PromQLMatchType;
|
|
8
|
+
export const PromQLNodeKind = commonJsModule.PromQLNodeKind;
|
|
9
|
+
export const PromQLValueType = commonJsModule.PromQLValueType;
|
|
10
|
+
export const PromQLVectorMatchCardinality = commonJsModule.PromQLVectorMatchCardinality;
|
|
11
|
+
export const isComparisonOperator = commonJsModule.isComparisonOperator;
|
|
12
|
+
export const isSetOperator = commonJsModule.isSetOperator;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* PromQL durations: `5m`, `1h30m`, `500ms`, `2w`.
|
|
4
|
+
*
|
|
5
|
+
* Written the way Prometheus reads them (common/model.ParseDuration): one or
|
|
6
|
+
* more whole numbers, each with a unit, the units largest first and each used
|
|
7
|
+
* once. A year is 365 days and a week 7, as there.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.formatPromQLDuration = exports.parsePromQLDuration = void 0;
|
|
11
|
+
const UNIT_MILLISECONDS = {
|
|
12
|
+
y: 365 * 24 * 60 * 60 * 1000,
|
|
13
|
+
w: 7 * 24 * 60 * 60 * 1000,
|
|
14
|
+
d: 24 * 60 * 60 * 1000,
|
|
15
|
+
h: 60 * 60 * 1000,
|
|
16
|
+
m: 60 * 1000,
|
|
17
|
+
s: 1000,
|
|
18
|
+
ms: 1,
|
|
19
|
+
};
|
|
20
|
+
// Largest first: the order the units must be written in.
|
|
21
|
+
const UNIT_ORDER = ["y", "w", "d", "h", "m", "s", "ms"];
|
|
22
|
+
const DURATION_PART_REGEX = /(\d+)(ms|y|w|d|h|m|s)/y;
|
|
23
|
+
/*
|
|
24
|
+
* The duration a string spells, in milliseconds, or undefined when it is not
|
|
25
|
+
* one. "0s" is a duration (of nothing); "" and "5" are not.
|
|
26
|
+
*/
|
|
27
|
+
const parsePromQLDuration = (text) => {
|
|
28
|
+
if (text.length === 0) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
let total = 0;
|
|
32
|
+
let position = 0;
|
|
33
|
+
let lastUnitIndex = -1;
|
|
34
|
+
while (position < text.length) {
|
|
35
|
+
DURATION_PART_REGEX.lastIndex = position;
|
|
36
|
+
const match = DURATION_PART_REGEX.exec(text);
|
|
37
|
+
if (!match) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const amount = Number(match[1]);
|
|
41
|
+
const unit = match[2];
|
|
42
|
+
const unitIndex = UNIT_ORDER.indexOf(unit);
|
|
43
|
+
// `5m1h` and `1m1m` are refused, as Prometheus refuses them.
|
|
44
|
+
if (unitIndex <= lastUnitIndex) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
lastUnitIndex = unitIndex;
|
|
48
|
+
total += amount * UNIT_MILLISECONDS[unit];
|
|
49
|
+
position = DURATION_PART_REGEX.lastIndex;
|
|
50
|
+
}
|
|
51
|
+
if (!Number.isFinite(total)) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return total;
|
|
55
|
+
};
|
|
56
|
+
exports.parsePromQLDuration = parsePromQLDuration;
|
|
57
|
+
/*
|
|
58
|
+
* A duration written the shortest way PromQL reads it: 90000 is "1m30s",
|
|
59
|
+
* 0 is "0s". Negative durations keep their sign: -300000 is "-5m".
|
|
60
|
+
*/
|
|
61
|
+
const formatPromQLDuration = (milliseconds) => {
|
|
62
|
+
if (milliseconds === 0) {
|
|
63
|
+
return "0s";
|
|
64
|
+
}
|
|
65
|
+
const sign = milliseconds < 0 ? "-" : "";
|
|
66
|
+
let remaining = Math.abs(Math.round(milliseconds));
|
|
67
|
+
let text = "";
|
|
68
|
+
for (const unit of UNIT_ORDER) {
|
|
69
|
+
const size = UNIT_MILLISECONDS[unit];
|
|
70
|
+
const amount = Math.floor(remaining / size);
|
|
71
|
+
if (amount > 0) {
|
|
72
|
+
text += `${amount}${unit}`;
|
|
73
|
+
remaining -= amount * size;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return `${sign}${text}`;
|
|
77
|
+
};
|
|
78
|
+
exports.formatPromQLDuration = formatPromQLDuration;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PromQLExpression } from "./PromQLAst.mjs";
|
|
2
|
+
import { PromQLEngineOptions, PromQLQueryResult, PromQLSeriesSource } from "./PromQLEngineTypes.mjs";
|
|
3
|
+
export declare const PROMQL_DEFAULT_LOOKBACK_DELTA_MS: number;
|
|
4
|
+
export declare const PROMQL_DEFAULT_SUBQUERY_STEP_MS: number;
|
|
5
|
+
export declare const PROMQL_DEFAULT_MAX_SAMPLES: number;
|
|
6
|
+
export declare const PROMQL_MAX_POINTS_PER_SERIES: number;
|
|
7
|
+
export declare const PROMQL_DEFAULT_TIMEOUT_MS: number;
|
|
8
|
+
export default class PromQLEngine {
|
|
9
|
+
private readonly source;
|
|
10
|
+
private readonly options;
|
|
11
|
+
constructor(source: PromQLSeriesSource, options?: PromQLEngineOptions);
|
|
12
|
+
instantQuery(query: string | PromQLExpression, timeMs: number): Promise<PromQLQueryResult>;
|
|
13
|
+
rangeQuery(query: string | PromQLExpression, startMs: number, endMs: number, stepMs: number): Promise<PromQLQueryResult>;
|
|
14
|
+
private prepare;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PromQLExpression } from "./PromQLAst";
|
|
2
|
+
import { PromQLEngineOptions, PromQLQueryResult, PromQLSeriesSource } from "./PromQLEngineTypes";
|
|
3
|
+
export declare const PROMQL_DEFAULT_LOOKBACK_DELTA_MS: number;
|
|
4
|
+
export declare const PROMQL_DEFAULT_SUBQUERY_STEP_MS: number;
|
|
5
|
+
export declare const PROMQL_DEFAULT_MAX_SAMPLES: number;
|
|
6
|
+
export declare const PROMQL_MAX_POINTS_PER_SERIES: number;
|
|
7
|
+
export declare const PROMQL_DEFAULT_TIMEOUT_MS: number;
|
|
8
|
+
export default class PromQLEngine {
|
|
9
|
+
private readonly source;
|
|
10
|
+
private readonly options;
|
|
11
|
+
constructor(source: PromQLSeriesSource, options?: PromQLEngineOptions);
|
|
12
|
+
instantQuery(query: string | PromQLExpression, timeMs: number): Promise<PromQLQueryResult>;
|
|
13
|
+
rangeQuery(query: string | PromQLExpression, startMs: number, endMs: number, stepMs: number): Promise<PromQLQueryResult>;
|
|
14
|
+
private prepare;
|
|
15
|
+
}
|