@oneuptime/common 14.0.106 → 14.0.108
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/AuditLog.js +1 -1
- package/Models/AnalyticsModels/Index.js +3 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.mts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.d.ts +5 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +300 -0
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.mjs +3 -0
- package/Models/DatabaseModels/CallLog.d.mts +4 -0
- package/Models/DatabaseModels/CallLog.d.ts +4 -0
- package/Models/DatabaseModels/CallLog.js +85 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +7 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +7 -0
- package/Models/DatabaseModels/DataBiConnection.js +105 -2
- package/Models/DatabaseModels/DataDashboard.d.mts +10 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +10 -0
- package/Models/DatabaseModels/DataDashboard.js +129 -2
- package/Models/DatabaseModels/Index.js +8 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +55 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.mts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.d.ts +26 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.js +536 -0
- package/Models/DatabaseModels/NetworkDeviceNamingRule.mjs +2 -0
- package/Models/DatabaseModels/NetworkSite.d.mts +1 -0
- package/Models/DatabaseModels/NetworkSite.d.ts +1 -0
- package/Models/DatabaseModels/NetworkSite.js +51 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +41 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.mts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.d.ts +2 -0
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +80 -1
- package/Models/DatabaseModels/RumApplication.d.mts +2 -0
- package/Models/DatabaseModels/RumApplication.d.ts +2 -0
- package/Models/DatabaseModels/RumApplication.js +108 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.mts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.d.ts +20 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.js +353 -0
- package/Models/DatabaseModels/RumProductAnalyticsSavedView.mjs +2 -0
- package/Models/DatabaseModels/Team.js +10 -2
- package/Models/DatabaseModels/TeamComplianceSetting.js +8 -1
- package/Models/DatabaseModels/TeamCustomRole.js +9 -1
- package/Models/DatabaseModels/TeamMember.js +15 -1
- package/Models/DatabaseModels/TeamOwnerTeam.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerTeam.js +325 -0
- package/Models/DatabaseModels/TeamOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.mts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.d.ts +17 -0
- package/Models/DatabaseModels/TeamOwnerUser.js +331 -0
- package/Models/DatabaseModels/TeamOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/TeamPermission.js +12 -1
- package/Models/DatabaseModels/TelemetryUsageBilling.d.mts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.d.ts +1 -0
- package/Models/DatabaseModels/TelemetryUsageBilling.js +34 -0
- package/Models/DatabaseModels/WhatsAppLog.d.mts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.d.ts +3 -0
- package/Models/DatabaseModels/WhatsAppLog.js +62 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +11 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +11 -0
- package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +212 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +212 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +3 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +3 -0
- package/Types/AI/AIActionWords.d.mts +1 -0
- package/Types/AI/AIActionWords.d.ts +1 -0
- package/Types/AI/AIActionWords.js +15 -4
- package/Types/AI/AIChatRecordSeen.d.mts +3 -0
- package/Types/AI/AIChatRecordSeen.d.ts +3 -0
- package/Types/AI/AIChatRecordSeen.js +28 -3
- package/Types/AI/AIChatRecordSeen.mjs +1 -0
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +2 -0
- package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
- package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.mts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.d.ts +2 -1
- package/Types/AnalyticsDatabase/AnalyticsTableName.js +7 -0
- package/Types/AuditLog/AuditLogRetention.d.mts +10 -0
- package/Types/AuditLog/AuditLogRetention.d.ts +10 -0
- package/Types/AuditLog/AuditLogRetention.js +91 -0
- package/Types/AuditLog/AuditLogRetention.mjs +8 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.mts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.d.ts +37 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.js +224 -0
- package/Types/CallAndSMS/TwilioConfigDefaults.mjs +3 -0
- package/Types/CodeInSentence.d.mts +8 -0
- package/Types/CodeInSentence.d.ts +8 -0
- package/Types/CodeInSentence.js +875 -0
- package/Types/CodeInSentence.mjs +4 -0
- package/Types/CodeRepository/CodeFileSeen.d.mts +3 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +3 -0
- package/Types/CodeRepository/CodeFileSeen.js +61 -3
- package/Types/Dashboard/DashboardComponentType.d.mts +2 -0
- package/Types/Dashboard/DashboardComponentType.d.ts +2 -0
- package/Types/Dashboard/DashboardComponentType.js +7 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.mts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.d.ts +3 -1
- package/Types/Dashboard/DashboardComponents/ComponentArgument.js +3 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsFunnelComponent.mjs +1 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.mts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.d.ts +11 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.js +2 -0
- package/Types/Dashboard/DashboardComponents/DashboardProductAnalyticsRetentionComponent.mjs +1 -0
- package/Types/Dashboard/PublicDashboardServedSettings.js +15 -7
- package/Types/DataObservability/DataBiRefreshAlert.d.mts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.d.ts +44 -0
- package/Types/DataObservability/DataBiRefreshAlert.js +206 -0
- package/Types/DataObservability/DataBiRefreshAlert.mjs +12 -0
- package/Types/DataObservability/DataDashboardActivity.d.mts +40 -0
- package/Types/DataObservability/DataDashboardActivity.d.ts +40 -0
- package/Types/DataObservability/DataDashboardActivity.js +119 -0
- package/Types/DataObservability/DataDashboardActivity.mjs +12 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +14 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +14 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +14 -0
- package/Types/DataObservability/DataTableLineage.d.mts +108 -0
- package/Types/DataObservability/DataTableLineage.d.ts +108 -0
- package/Types/DataObservability/DataTableLineage.js +119 -0
- package/Types/DataObservability/DataTableLineage.mjs +21 -0
- package/Types/DataSecurity/DataStoreKind.d.mts +1 -0
- package/Types/DataSecurity/DataStoreKind.d.ts +1 -0
- package/Types/DataSecurity/DataStoreKind.js +3 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/DatabaseServer/DatabaseServerMetricCatalog.js +71 -82
- package/Types/Date.d.mts +4 -0
- package/Types/Date.d.ts +4 -0
- package/Types/Date.js +47 -2
- package/Types/Date.mjs +2 -0
- package/Types/DateLanguage.d.mts +9 -0
- package/Types/DateLanguage.d.ts +9 -0
- package/Types/DateLanguage.js +79 -1
- package/Types/DateLanguage.mjs +4 -0
- package/Types/HashedString.js +9 -2
- package/Types/MessageQueue/MessageQueueMetricCatalog.js +61 -61
- package/Types/Monitor/CriteriaFilterTerms.d.mts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.d.ts +4 -0
- package/Types/Monitor/CriteriaFilterTerms.js +166 -0
- package/Types/Monitor/CriteriaFilterTerms.mjs +4 -0
- package/Types/Monitor/CriteriaFilterValues.d.mts +16 -0
- package/Types/Monitor/CriteriaFilterValues.d.ts +16 -0
- package/Types/Monitor/CriteriaFilterValues.js +324 -0
- package/Types/Monitor/CriteriaFilterValues.mjs +2 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.mts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.d.ts +13 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.js +108 -0
- package/Types/Monitor/DataBiRefreshMonitorStep.mjs +3 -0
- package/Types/Monitor/EvaluationSentence.d.mts +37 -0
- package/Types/Monitor/EvaluationSentence.d.ts +37 -0
- package/Types/Monitor/EvaluationSentence.js +298 -0
- package/Types/Monitor/EvaluationSentence.mjs +12 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
- package/Types/Monitor/MonitorCriteria.d.mts +2 -0
- package/Types/Monitor/MonitorCriteria.d.ts +2 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +265 -196
- package/Types/Monitor/MonitorEvaluationDetails.d.mts +2 -0
- package/Types/Monitor/MonitorEvaluationDetails.d.ts +2 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.mts +4 -0
- package/Types/Monitor/MonitorEvaluationSummary.d.ts +4 -0
- package/Types/Monitor/MonitorStep.d.mts +2 -0
- package/Types/Monitor/MonitorStep.d.ts +2 -0
- package/Types/Monitor/MonitorStep.js +28 -11
- package/Types/Monitor/MonitorStepMetricMonitor.js +6 -1
- package/Types/Monitor/MonitorStepRollingTime.d.mts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.d.ts +12 -0
- package/Types/Monitor/MonitorStepRollingTime.js +117 -0
- package/Types/Monitor/MonitorStepRollingTime.mjs +2 -0
- package/Types/Monitor/MonitorSteps.d.mts +2 -0
- package/Types/Monitor/MonitorSteps.d.ts +2 -0
- package/Types/Monitor/MonitorType.d.mts +1 -0
- package/Types/Monitor/MonitorType.d.ts +1 -0
- package/Types/Monitor/MonitorType.js +12 -0
- package/Types/Monitor/SeriesContext/SeriesLabelDisplay.js +11 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.mts +1 -0
- package/Types/Monitor/ServerMonitor/ServerMonitorResponse.d.ts +1 -0
- package/Types/Monitor/TelemetryAlertRule.js +7 -2
- package/Types/Monitor/TelemetryObservation.d.mts +15 -0
- package/Types/Monitor/TelemetryObservation.d.ts +15 -0
- package/Types/Monitor/TelemetryObservation.js +28 -0
- package/Types/Monitor/TelemetryObservation.mjs +2 -0
- package/Types/NetworkDevice/DeviceNaming.d.mts +87 -0
- package/Types/NetworkDevice/DeviceNaming.d.ts +87 -0
- package/Types/NetworkDevice/DeviceNaming.js +279 -0
- package/Types/NetworkDevice/DeviceNaming.mjs +24 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +1 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +4 -0
- package/Types/NotificationRule/NotificationRepeat.d.mts +10 -0
- package/Types/NotificationRule/NotificationRepeat.d.ts +10 -0
- package/Types/NotificationRule/NotificationRepeat.js +51 -0
- package/Types/NotificationRule/NotificationRepeat.mjs +2 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +70 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +276 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +12 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.mts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.d.ts +9 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.js +44 -0
- package/Types/OnCallDutyPolicy/OnCallEscalationWait.mjs +5 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.mts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.d.ts +68 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.js +351 -0
- package/Types/OnCallDutyPolicy/OnCallPageChannel.mjs +15 -0
- package/Types/Permission.d.mts +5 -0
- package/Types/Permission.d.ts +5 -0
- package/Types/Permission.js +61 -5
- package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
- package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
- package/Types/ReadingDirection.d.mts +2 -0
- package/Types/ReadingDirection.d.ts +2 -0
- package/Types/ReadingDirection.js +221 -25
- package/Types/ReadingDirection.mjs +2 -0
- package/Types/RollingTime/RollingTimeUtil.d.mts +7 -0
- package/Types/RollingTime/RollingTimeUtil.d.ts +7 -0
- package/Types/RollingTime/RollingTimeUtil.js +240 -71
- package/Types/Rules/RuleCriteriaFieldRegistry.js +12 -0
- package/Types/Rules/RuleCriteriaSubject.js +1 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.mts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.d.ts +115 -0
- package/Types/Rum/ProductAnalyticsEventReads.js +166 -0
- package/Types/Rum/ProductAnalyticsEventReads.mjs +27 -0
- package/Types/Rum/ProductAnalyticsEvents.d.mts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.d.ts +121 -0
- package/Types/Rum/ProductAnalyticsEvents.js +477 -0
- package/Types/Rum/ProductAnalyticsEvents.mjs +40 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.mts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.d.ts +56 -0
- package/Types/Rum/ProductAnalyticsSavedViews.js +219 -0
- package/Types/Rum/ProductAnalyticsSavedViews.mjs +14 -0
- package/Types/Rum/SessionReplay.d.mts +4 -0
- package/Types/Rum/SessionReplay.d.ts +4 -0
- package/Types/Rum/SessionReplayHealth.js +1 -1
- package/Types/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +8 -7
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.js +51 -0
- package/Types/ServiceLevelObjective/SloErrorBudgetPolicyChange.mjs +4 -0
- package/Types/Team/BuiltInTeam.d.mts +1 -0
- package/Types/Team/BuiltInTeam.d.ts +1 -0
- package/Types/Team/BuiltInTeam.js +14 -1
- package/Types/Team/BuiltInTeam.mjs +1 -0
- package/Types/Telemetry/ServiceType.d.mts +1 -0
- package/Types/Telemetry/ServiceType.d.ts +1 -0
- package/Types/Telemetry/ServiceType.js +6 -0
- package/Types/Telemetry/TelemetryUsage.d.mts +7 -2
- package/Types/Telemetry/TelemetryUsage.d.ts +7 -2
- package/Types/Telemetry/TelemetryUsage.js +24 -5
- package/Types/Telemetry/TelemetryUsage.mjs +3 -0
- package/Types/UserNotification/UserNotificationStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationStatus.js +8 -0
- package/Types/Workspace/NotificationRules/EventType.d.mts +2 -1
- package/Types/Workspace/NotificationRules/EventType.d.ts +2 -1
- package/Types/Workspace/NotificationRules/EventType.js +8 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +7 -1
- package/Types/Workspace/NotificationRules/NotificationRuleInvites.js +5 -1
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.mts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.d.ts +4 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.js +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleTypes/ServiceLevelObjectiveNotificationRule.mjs +1 -0
- package/Utils/AI/InvestigationReport.js +93 -21
- package/Utils/AI/InvestigationReportLanguages.d.mts +25 -0
- package/Utils/AI/InvestigationReportLanguages.d.ts +25 -0
- package/Utils/AI/InvestigationReportLanguages.js +603 -0
- package/Utils/AI/InvestigationReportLanguages.mjs +11 -0
- package/Utils/Crypto.js +10 -3
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +67 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.mjs +2 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.mts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.d.ts +7 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +68 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.mjs +2 -0
- package/Utils/Dashboard/DashboardWidgetIds.js +6 -1
- package/Utils/Dashboard/TableThresholds.js +5 -2
- package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
- package/Utils/Monitor/MonitorLogSummaryUtil.d.mts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.d.ts +8 -0
- package/Utils/Monitor/MonitorLogSummaryUtil.js +170 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +17 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +246 -0
- package/Utils/Monitor/MonitorRootCauseWording.mjs +2 -0
- package/Utils/Monitor/MonitorStepMetricQueries.js +2 -1
- package/Utils/Monitor/MonitorStepsValuesUtil.d.mts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.d.ts +13 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.js +80 -0
- package/Utils/Monitor/MonitorStepsValuesUtil.mjs +2 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.mts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.d.ts +3 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -2
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.mts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.d.ts +75 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.js +303 -0
- package/Utils/NetworkDevice/Naming/DeviceNamingPlanner.mjs +8 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.mts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.d.ts +122 -0
- package/Utils/NetworkDevice/Naming/NamePattern.js +649 -0
- package/Utils/NetworkDevice/Naming/NamePattern.mjs +22 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +77 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.js +467 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +14 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.mts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.d.ts +26 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.js +327 -0
- package/Utils/NetworkDevice/Naming/NamingRuleMatcher.mjs +7 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredNameUpgrade.js +8 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.mts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.d.ts +2 -0
- package/Utils/NetworkDiscovery/PingMonitorBuilder.js +1 -0
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.mts +7 -6
- package/Utils/{Rum → SessionReplay}/SessionReplayHealth.d.ts +7 -6
- package/Utils/SessionReplay/SessionReplayHealth.js +703 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +7 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +39 -0
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +1 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +19 -4
- package/Utils/Slo/SloFeedMarkdown.d.ts +19 -4
- package/Utils/Slo/SloFeedMarkdown.js +64 -17
- package/Utils/Slo/SloFeedMarkdown.mjs +4 -0
- package/Utils/Slo/SloProjection.d.mts +18 -0
- package/Utils/Slo/SloProjection.d.ts +18 -0
- package/Utils/Slo/SloProjection.js +53 -12
- package/Utils/Slo/SloProjection.mjs +2 -0
- package/Utils/StatusPage/ResourceExplorer.d.mts +0 -10
- package/Utils/StatusPage/ResourceExplorer.d.ts +0 -10
- package/Utils/StatusPage/ResourceExplorer.js +5 -32
- package/Utils/TotpSetupKey.d.mts +3 -0
- package/Utils/TotpSetupKey.d.ts +3 -0
- package/Utils/TotpSetupKey.js +72 -0
- package/Utils/TotpSetupKey.mjs +4 -0
- package/Utils/Workspace/WorkspaceChannelName.js +5 -1
- package/package.json +1 -1
- package/Utils/Rum/SessionReplayHealth.js +0 -558
- /package/Utils/{Rum → SessionReplay}/SessionReplayHealth.mjs +0 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* "ku-Latn"), the language otherwise.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getTextReadingDirection = exports.setApartInSentence = exports.isSetApartInSentence = exports.POP_DIRECTIONAL_ISOLATE = exports.FIRST_STRONG_ISOLATE = exports.getTextReadingDirectionByMostLetters = exports.TEXT_DIRECTION_SCAN_LENGTH = exports.isRightToLeftLanguage = exports.getReadingDirection = exports.RIGHT_TO_LEFT_SCRIPTS = exports.RIGHT_TO_LEFT_LANGUAGES = exports.RIGHT_TO_LEFT = exports.LEFT_TO_RIGHT = void 0;
|
|
18
|
+
exports.getTextReadingDirection = exports.setApartInSentence = exports.isSetApartInSentence = exports.POP_DIRECTIONAL_ISOLATE = exports.FIRST_STRONG_ISOLATE = exports.hasEnglishWords = exports.hasRightToLeftWords = exports.getTextReadingDirectionByMostLetters = exports.TEXT_DIRECTION_SCAN_LENGTH = exports.isRightToLeftLanguage = exports.getReadingDirection = exports.RIGHT_TO_LEFT_SCRIPTS = exports.RIGHT_TO_LEFT_LANGUAGES = exports.RIGHT_TO_LEFT = exports.LEFT_TO_RIGHT = void 0;
|
|
19
19
|
exports.LEFT_TO_RIGHT = "ltr";
|
|
20
20
|
exports.RIGHT_TO_LEFT = "rtl";
|
|
21
21
|
// Languages written from right to left, by their primary subtag.
|
|
@@ -113,48 +113,244 @@ const FIRST_LETTER_REGEX = /\p{L}/u;
|
|
|
113
113
|
const RIGHT_TO_LEFT_LETTER_REGEX = /[\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Nko}\p{Script=Adlam}\p{Script=Hanifi_Rohingya}\p{Script=Mandaic}\p{Script=Samaritan}]/u;
|
|
114
114
|
// One letter, of any script.
|
|
115
115
|
const LETTER_REGEX = /^\p{L}$/u;
|
|
116
|
+
// Each isolate's opening mark: LRI, RLI, FSI.
|
|
117
|
+
const ISOLATE_INITIATOR_REGEX = /^[\u{2066}-\u{2068}]$/u;
|
|
116
118
|
/*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* so it can be read as a whole: "`kubectl` را اجرا کنید" and "API پرداخت از
|
|
120
|
-
* کار افتاده" are Persian sentences that start with an English word, and
|
|
121
|
-
* laid out from that first letter their Persian words came out in the
|
|
122
|
-
* wrong order. "Checkout API (EU)" and "Rolled back v2.4.1." read left to
|
|
123
|
-
* right, their full stop at their end. A tie goes to the first letter.
|
|
124
|
-
* Null when there is no letter, so the text follows the page; only the
|
|
125
|
-
* first TEXT_DIRECTION_SCAN_LENGTH characters are read.
|
|
119
|
+
* A web address: a scheme from the start of a word ("https://",
|
|
120
|
+
* "s3://"), up to the next space or isolate mark.
|
|
126
121
|
*/
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
const WEB_ADDRESS_REGEX = /(?<![A-Za-z0-9+.-])[A-Za-z][A-Za-z0-9+.-]{0,31}:\/\/[^\s\u{2066}-\u{2069}]*/gu;
|
|
123
|
+
const getDirectionByCount = (count) => {
|
|
124
|
+
if (count.rightToLeft === count.leftToRight) {
|
|
125
|
+
return count.first;
|
|
130
126
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
return count.rightToLeft > count.leftToRight ? exports.RIGHT_TO_LEFT : exports.LEFT_TO_RIGHT;
|
|
128
|
+
};
|
|
129
|
+
const countLetters = (text) => {
|
|
130
|
+
const outside = { rightToLeft: 0, leftToRight: 0, first: null };
|
|
131
|
+
const inside = { rightToLeft: 0, leftToRight: 0, first: null };
|
|
132
|
+
// How many isolates the scan is in.
|
|
133
|
+
let depth = 0;
|
|
134
|
+
// Each address counted as if it were set apart.
|
|
135
|
+
const scanned = text
|
|
136
|
+
.slice(0, exports.TEXT_DIRECTION_SCAN_LENGTH)
|
|
137
|
+
.replace(WEB_ADDRESS_REGEX, (address) => {
|
|
138
|
+
return `${exports.FIRST_STRONG_ISOLATE}${address}${exports.POP_DIRECTIONAL_ISOLATE}`;
|
|
139
|
+
});
|
|
134
140
|
// By code point, so a letter outside the Basic Multilingual Plane counts once.
|
|
135
|
-
for (const character of
|
|
141
|
+
for (const character of scanned) {
|
|
142
|
+
if (ISOLATE_INITIATOR_REGEX.test(character)) {
|
|
143
|
+
depth++;
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
// A PDI with no isolate open closes nothing.
|
|
147
|
+
if (character === exports.POP_DIRECTIONAL_ISOLATE) {
|
|
148
|
+
depth = Math.max(0, depth - 1);
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
136
151
|
if (!LETTER_REGEX.test(character)) {
|
|
137
152
|
continue;
|
|
138
153
|
}
|
|
139
154
|
const direction = RIGHT_TO_LEFT_LETTER_REGEX.test(character)
|
|
140
155
|
? exports.RIGHT_TO_LEFT
|
|
141
156
|
: exports.LEFT_TO_RIGHT;
|
|
157
|
+
const count = depth > 0 ? inside : outside;
|
|
142
158
|
if (direction === exports.RIGHT_TO_LEFT) {
|
|
143
|
-
|
|
159
|
+
count.rightToLeft++;
|
|
144
160
|
}
|
|
145
161
|
else {
|
|
146
|
-
|
|
162
|
+
count.leftToRight++;
|
|
147
163
|
}
|
|
148
|
-
|
|
164
|
+
count.first = count.first || direction;
|
|
149
165
|
}
|
|
150
|
-
|
|
151
|
-
|
|
166
|
+
return { outside, inside };
|
|
167
|
+
};
|
|
168
|
+
const getTextReadingDirectionByMostLetters = (text) => {
|
|
169
|
+
if (!text) {
|
|
170
|
+
return null;
|
|
152
171
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
: exports.LEFT_TO_RIGHT;
|
|
172
|
+
const counts = countLetters(text);
|
|
173
|
+
return (getDirectionByCount(counts.outside) || getDirectionByCount(counts.inside));
|
|
156
174
|
};
|
|
157
175
|
exports.getTextReadingDirectionByMostLetters = getTextReadingDirectionByMostLetters;
|
|
176
|
+
/*
|
|
177
|
+
* WHETHER A TEXT HAS WORDS OF A RIGHT-TO-LEFT SCRIPT OF ITS OWN: a letter
|
|
178
|
+
* of one outside what it sets apart - an isolate, a web address - counted
|
|
179
|
+
* as getTextReadingDirectionByMostLetters counts. An Arabic or Persian
|
|
180
|
+
* sentence has, however many names, paths and commands it gives in Latin
|
|
181
|
+
* letters ("Microsoft Teams غير متصل بعد!"); an English sentence has not,
|
|
182
|
+
* nor one that sets a Persian name apart. Only the first
|
|
183
|
+
* TEXT_DIRECTION_SCAN_LENGTH characters are read.
|
|
184
|
+
*/
|
|
185
|
+
const hasRightToLeftWords = (text) => {
|
|
186
|
+
return Boolean(text) && countLetters(text).outside.rightToLeft > 0;
|
|
187
|
+
};
|
|
188
|
+
exports.hasRightToLeftWords = hasRightToLeftWords;
|
|
189
|
+
/*
|
|
190
|
+
* WHETHER A TEXT HAS ENGLISH WORDS OF ITS OWN: whether it is an English
|
|
191
|
+
* sentence, not a name or a label in Latin letters. An answer from the
|
|
192
|
+
* server is English, and it may quote a name someone typed in Arabic or
|
|
193
|
+
* Persian ("A custom channel named قناة الطوارئ already exists."), so it
|
|
194
|
+
* has right-to-left letters of its own too (hasRightToLeftWords). What
|
|
195
|
+
* tells it from an Arabic sentence that names products ("Microsoft Teams
|
|
196
|
+
* غير متصل بعد!") are the small words an English sentence is made of: "is",
|
|
197
|
+
* "the", "already", "not" (ENGLISH_SENTENCE_WORDS). One counts when it is
|
|
198
|
+
* written in lower case outside what the text sets apart in an isolate,
|
|
199
|
+
* quotes, marks as code or in bold, or leaves to a value ({{name}}), and
|
|
200
|
+
* is not inside a name written in Title Case ("Red Hat OpenStack Services
|
|
201
|
+
* on OpenShift", "Add an Integration"). Only the first
|
|
202
|
+
* TEXT_DIRECTION_SCAN_LENGTH characters are read.
|
|
203
|
+
*/
|
|
204
|
+
const ENGLISH_SENTENCE_WORDS = new Set([
|
|
205
|
+
"already",
|
|
206
|
+
"also",
|
|
207
|
+
"an",
|
|
208
|
+
"and",
|
|
209
|
+
"another",
|
|
210
|
+
"any",
|
|
211
|
+
"are",
|
|
212
|
+
"aren't",
|
|
213
|
+
"as",
|
|
214
|
+
"at",
|
|
215
|
+
"be",
|
|
216
|
+
"been",
|
|
217
|
+
"but",
|
|
218
|
+
"by",
|
|
219
|
+
"can",
|
|
220
|
+
"can't",
|
|
221
|
+
"cannot",
|
|
222
|
+
"could",
|
|
223
|
+
"couldn't",
|
|
224
|
+
"did",
|
|
225
|
+
"do",
|
|
226
|
+
"does",
|
|
227
|
+
"doesn't",
|
|
228
|
+
"don't",
|
|
229
|
+
"each",
|
|
230
|
+
"every",
|
|
231
|
+
"for",
|
|
232
|
+
"from",
|
|
233
|
+
"had",
|
|
234
|
+
"has",
|
|
235
|
+
"have",
|
|
236
|
+
"here",
|
|
237
|
+
"how",
|
|
238
|
+
"if",
|
|
239
|
+
"in",
|
|
240
|
+
"into",
|
|
241
|
+
"is",
|
|
242
|
+
"isn't",
|
|
243
|
+
"it",
|
|
244
|
+
"it's",
|
|
245
|
+
"its",
|
|
246
|
+
"may",
|
|
247
|
+
"must",
|
|
248
|
+
"no",
|
|
249
|
+
"not",
|
|
250
|
+
"of",
|
|
251
|
+
"on",
|
|
252
|
+
"only",
|
|
253
|
+
"or",
|
|
254
|
+
"other",
|
|
255
|
+
"our",
|
|
256
|
+
"please",
|
|
257
|
+
"should",
|
|
258
|
+
"so",
|
|
259
|
+
"some",
|
|
260
|
+
"than",
|
|
261
|
+
"that",
|
|
262
|
+
"the",
|
|
263
|
+
"their",
|
|
264
|
+
"then",
|
|
265
|
+
"there",
|
|
266
|
+
"these",
|
|
267
|
+
"they",
|
|
268
|
+
"this",
|
|
269
|
+
"those",
|
|
270
|
+
"to",
|
|
271
|
+
"too",
|
|
272
|
+
"was",
|
|
273
|
+
"wasn't",
|
|
274
|
+
"we",
|
|
275
|
+
"were",
|
|
276
|
+
"what",
|
|
277
|
+
"when",
|
|
278
|
+
"where",
|
|
279
|
+
"which",
|
|
280
|
+
"who",
|
|
281
|
+
"will",
|
|
282
|
+
"with",
|
|
283
|
+
"won't",
|
|
284
|
+
"would",
|
|
285
|
+
"yet",
|
|
286
|
+
"you",
|
|
287
|
+
"your",
|
|
288
|
+
]);
|
|
289
|
+
/*
|
|
290
|
+
* What a text quotes, marks as code or in bold, or leaves to a value: not
|
|
291
|
+
* its own words. Each kind opens with its own sign and is read no further
|
|
292
|
+
* than 256 characters for its close.
|
|
293
|
+
*/
|
|
294
|
+
const QUOTED_OR_CODE_REGEX = /\{\{[^{}]{0,256}\}\}|`[^`]{0,256}`|\*\*[^*]{0,256}\*\*|\u{00AB}[^\u{00AB}\u{00BB}]{0,256}\u{00BB}|\u{201C}[^\u{201C}\u{201D}]{0,256}\u{201D}|"[^"]{0,256}"/gu;
|
|
295
|
+
const SPACES_REGEX = /\s+/u;
|
|
296
|
+
const CURLY_APOSTROPHE_REGEX = /\u{2019}/gu;
|
|
297
|
+
// A Latin letter, or an apostrophe inside a word ("isn't", "it’s").
|
|
298
|
+
const isWordCharacter = (character) => {
|
|
299
|
+
return ((character >= "a" && character <= "z") ||
|
|
300
|
+
(character >= "A" && character <= "Z") ||
|
|
301
|
+
character === "'" ||
|
|
302
|
+
character === "\u{2019}");
|
|
303
|
+
};
|
|
304
|
+
// A piece of text between spaces without the signs round it: "exists." is "exists".
|
|
305
|
+
const getWordOf = (piece) => {
|
|
306
|
+
let start = 0;
|
|
307
|
+
let end = piece.length;
|
|
308
|
+
while (start < end && !isWordCharacter(piece.charAt(start))) {
|
|
309
|
+
start++;
|
|
310
|
+
}
|
|
311
|
+
while (end > start && !isWordCharacter(piece.charAt(end - 1))) {
|
|
312
|
+
end--;
|
|
313
|
+
}
|
|
314
|
+
return piece.slice(start, end).replace(CURLY_APOSTROPHE_REGEX, "'");
|
|
315
|
+
};
|
|
316
|
+
const isTitleCaseWord = (word) => {
|
|
317
|
+
const first = word ? word.charAt(0) : "";
|
|
318
|
+
return first >= "A" && first <= "Z";
|
|
319
|
+
};
|
|
320
|
+
const hasEnglishWords = (text) => {
|
|
321
|
+
if (!text) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
/*
|
|
325
|
+
* The text outside its isolates, with a space where each was. A web
|
|
326
|
+
* address holds no word of its own: it runs to the next space.
|
|
327
|
+
*/
|
|
328
|
+
let ownText = "";
|
|
329
|
+
let depth = 0;
|
|
330
|
+
for (const character of text.slice(0, exports.TEXT_DIRECTION_SCAN_LENGTH)) {
|
|
331
|
+
if (ISOLATE_INITIATOR_REGEX.test(character)) {
|
|
332
|
+
ownText += depth === 0 ? " " : "";
|
|
333
|
+
depth++;
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
if (character === exports.POP_DIRECTIONAL_ISOLATE) {
|
|
337
|
+
depth = Math.max(0, depth - 1);
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
if (depth === 0) {
|
|
341
|
+
ownText += character;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
const words = ownText
|
|
345
|
+
.replace(QUOTED_OR_CODE_REGEX, " ")
|
|
346
|
+
.split(SPACES_REGEX)
|
|
347
|
+
.map(getWordOf);
|
|
348
|
+
return words.some((word, index) => {
|
|
349
|
+
return (ENGLISH_SENTENCE_WORDS.has(word) &&
|
|
350
|
+
!(isTitleCaseWord(words[index - 1]) && isTitleCaseWord(words[index + 1])));
|
|
351
|
+
});
|
|
352
|
+
};
|
|
353
|
+
exports.hasEnglishWords = hasEnglishWords;
|
|
158
354
|
/*
|
|
159
355
|
* A VALUE PUT INTO A SENTENCE, SET APART FROM IT.
|
|
160
356
|
*
|
|
@@ -9,6 +9,8 @@ export const TEXT_DIRECTION_SCAN_LENGTH = commonJsModule.TEXT_DIRECTION_SCAN_LEN
|
|
|
9
9
|
export const getReadingDirection = commonJsModule.getReadingDirection;
|
|
10
10
|
export const getTextReadingDirection = commonJsModule.getTextReadingDirection;
|
|
11
11
|
export const getTextReadingDirectionByMostLetters = commonJsModule.getTextReadingDirectionByMostLetters;
|
|
12
|
+
export const hasEnglishWords = commonJsModule.hasEnglishWords;
|
|
13
|
+
export const hasRightToLeftWords = commonJsModule.hasRightToLeftWords;
|
|
12
14
|
export const isRightToLeftLanguage = commonJsModule.isRightToLeftLanguage;
|
|
13
15
|
export const isSetApartInSentence = commonJsModule.isSetApartInSentence;
|
|
14
16
|
export const setApartInSentence = commonJsModule.setApartInSentence;
|
|
@@ -2,6 +2,13 @@ import InBetween from "../BaseDatabase/InBetween.mjs";
|
|
|
2
2
|
import RollingTime from "./RollingTime.mjs";
|
|
3
3
|
export default class RollingTimeUtil {
|
|
4
4
|
static getDefault(): RollingTime;
|
|
5
|
+
static isRollingTime(value: unknown): value is RollingTime;
|
|
6
|
+
static fromValue(value: unknown): RollingTime | null;
|
|
7
|
+
static fromWindowInMs(windowInMs: number): RollingTime | null;
|
|
8
|
+
static fromValueOrDefault(value: unknown): RollingTime;
|
|
9
|
+
static getValuesText(): string;
|
|
5
10
|
static convertToStartAndEndDate(rollingTime: RollingTime, endDate?: Date): InBetween<Date>;
|
|
6
11
|
static getWindowInMs(rollingTime: RollingTime): number;
|
|
12
|
+
private static readIso8601Duration;
|
|
13
|
+
private static readLengthInWords;
|
|
7
14
|
}
|
|
@@ -2,6 +2,13 @@ import InBetween from "../BaseDatabase/InBetween";
|
|
|
2
2
|
import RollingTime from "./RollingTime";
|
|
3
3
|
export default class RollingTimeUtil {
|
|
4
4
|
static getDefault(): RollingTime;
|
|
5
|
+
static isRollingTime(value: unknown): value is RollingTime;
|
|
6
|
+
static fromValue(value: unknown): RollingTime | null;
|
|
7
|
+
static fromWindowInMs(windowInMs: number): RollingTime | null;
|
|
8
|
+
static fromValueOrDefault(value: unknown): RollingTime;
|
|
9
|
+
static getValuesText(): string;
|
|
5
10
|
static convertToStartAndEndDate(rollingTime: RollingTime, endDate?: Date): InBetween<Date>;
|
|
6
11
|
static getWindowInMs(rollingTime: RollingTime): number;
|
|
12
|
+
private static readIso8601Duration;
|
|
13
|
+
private static readLengthInWords;
|
|
7
14
|
}
|
|
@@ -6,94 +6,263 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const InBetween_1 = __importDefault(require("../BaseDatabase/InBetween"));
|
|
7
7
|
const Date_1 = __importDefault(require("../Date"));
|
|
8
8
|
const RollingTime_1 = __importDefault(require("./RollingTime"));
|
|
9
|
+
const MINUTES_IN_A_DAY = 24 * 60;
|
|
10
|
+
/*
|
|
11
|
+
* How long each rolling time's window is, in minutes. A Record over the
|
|
12
|
+
* enum, so a rolling time added without a length does not compile: a value
|
|
13
|
+
* this did not know read as a window of no length at all, which finds no
|
|
14
|
+
* data on any check.
|
|
15
|
+
*
|
|
16
|
+
* Days are fixed lengths, 24 hours a day, not calendar days: in a zone
|
|
17
|
+
* whose clocks change inside the window, N calendar days back is an hour
|
|
18
|
+
* more or less than N days. Past 1, 3 and 7 Days and Past 180 Days sit
|
|
19
|
+
* exactly on the edge of a bucket width (AggregationIntervalUtil), so in
|
|
20
|
+
* London after the clocks went back on 2026-10-25 Past 3 Days was bucketed
|
|
21
|
+
* by the hour instead of every 30 minutes - in the browser, and on any
|
|
22
|
+
* server not in UTC - and getWindowInMs, which stepped back from
|
|
23
|
+
* 1970-01-01, read Past 90 and 180 Days an hour long in New York.
|
|
24
|
+
*/
|
|
25
|
+
const WINDOW_IN_MINUTES = {
|
|
26
|
+
[RollingTime_1.default.Past1Minute]: 1,
|
|
27
|
+
[RollingTime_1.default.Past5Minutes]: 5,
|
|
28
|
+
[RollingTime_1.default.Past10Minutes]: 10,
|
|
29
|
+
[RollingTime_1.default.Past15Minutes]: 15,
|
|
30
|
+
[RollingTime_1.default.Past30Minutes]: 30,
|
|
31
|
+
[RollingTime_1.default.Past1Hour]: 60,
|
|
32
|
+
[RollingTime_1.default.Past2Hours]: 2 * 60,
|
|
33
|
+
[RollingTime_1.default.Past3Hours]: 3 * 60,
|
|
34
|
+
[RollingTime_1.default.Past6Hours]: 6 * 60,
|
|
35
|
+
[RollingTime_1.default.Past12Hours]: 12 * 60,
|
|
36
|
+
// "Past 1 Day": the key's name is older than its value.
|
|
37
|
+
[RollingTime_1.default.Past1Hours]: MINUTES_IN_A_DAY,
|
|
38
|
+
[RollingTime_1.default.Past2Days]: 2 * MINUTES_IN_A_DAY,
|
|
39
|
+
[RollingTime_1.default.Past3Days]: 3 * MINUTES_IN_A_DAY,
|
|
40
|
+
[RollingTime_1.default.Past7Days]: 7 * MINUTES_IN_A_DAY,
|
|
41
|
+
[RollingTime_1.default.Past14Days]: 14 * MINUTES_IN_A_DAY,
|
|
42
|
+
[RollingTime_1.default.Past30Days]: 30 * MINUTES_IN_A_DAY,
|
|
43
|
+
[RollingTime_1.default.Past60Days]: 60 * MINUTES_IN_A_DAY,
|
|
44
|
+
[RollingTime_1.default.Past90Days]: 90 * MINUTES_IN_A_DAY,
|
|
45
|
+
[RollingTime_1.default.Past180Days]: 180 * MINUTES_IN_A_DAY,
|
|
46
|
+
[RollingTime_1.default.Past365Days]: 365 * MINUTES_IN_A_DAY,
|
|
47
|
+
};
|
|
48
|
+
const ROLLING_TIMES = Object.values(RollingTime_1.default);
|
|
49
|
+
/*
|
|
50
|
+
* The longest text read as a length of time. The longest way of writing
|
|
51
|
+
* one ("previous 31536000 seconds", "P52W1DT0H0M0S") is a few dozen
|
|
52
|
+
* characters; a longer text is not one, and is never handed to a pattern.
|
|
53
|
+
*/
|
|
54
|
+
const MAX_LENGTH_TEXT_LENGTH = 64;
|
|
55
|
+
/*
|
|
56
|
+
* The enum's own name for Past 1 Day, "Past1Hours", whose words say an
|
|
57
|
+
* hour. Whoever wrote it meant one or the other, and which is not for
|
|
58
|
+
* OneUptime to guess: it reads as neither.
|
|
59
|
+
*/
|
|
60
|
+
const KEY_NAME_THAT_SAYS_ANOTHER_LENGTH = "past1hours";
|
|
61
|
+
/*
|
|
62
|
+
* A length written in words or short units - "15 minutes", "Past 15
|
|
63
|
+
* Minutes", "last 15m", "15min", "24h", "past hour" - read from text that
|
|
64
|
+
* is already lower case, with each run of spaces, dashes and underscores
|
|
65
|
+
* one space. Anchored at both ends, with every repeat bounded, so it reads
|
|
66
|
+
* in time in line with the text (as does ISO_8601_DURATION below) - and
|
|
67
|
+
* it is never handed more than MAX_LENGTH_TEXT_LENGTH characters.
|
|
68
|
+
*/
|
|
69
|
+
const LENGTH_IN_WORDS = /^(?:(past|last|previous) ?)?(\d{1,9}(?:\.\d{1,9})?)? ?([a-z]{1,7})$/;
|
|
70
|
+
/*
|
|
71
|
+
* An ISO 8601 duration without years or months, which have no fixed
|
|
72
|
+
* length: "PT15M", "PT1H", "P1D", "P1W", "PT24H". Read lower case. Each
|
|
73
|
+
* part ends at its own letter.
|
|
74
|
+
*/
|
|
75
|
+
const ISO_8601_DURATION = /^p(?:(\d{1,9})w)?(?:(\d{1,9})d)?(?:t(?:(\d{1,9})h)?(?:(\d{1,9})m)?(?:(\d{1,9})s)?)?$/;
|
|
76
|
+
// Each unit a length may be written in, in seconds.
|
|
77
|
+
const UNIT_IN_SECONDS = {
|
|
78
|
+
s: 1,
|
|
79
|
+
sec: 1,
|
|
80
|
+
secs: 1,
|
|
81
|
+
second: 1,
|
|
82
|
+
seconds: 1,
|
|
83
|
+
m: 60,
|
|
84
|
+
min: 60,
|
|
85
|
+
mins: 60,
|
|
86
|
+
minute: 60,
|
|
87
|
+
minutes: 60,
|
|
88
|
+
h: 60 * 60,
|
|
89
|
+
hr: 60 * 60,
|
|
90
|
+
hrs: 60 * 60,
|
|
91
|
+
hour: 60 * 60,
|
|
92
|
+
hours: 60 * 60,
|
|
93
|
+
d: 24 * 60 * 60,
|
|
94
|
+
day: 24 * 60 * 60,
|
|
95
|
+
days: 24 * 60 * 60,
|
|
96
|
+
w: 7 * 24 * 60 * 60,
|
|
97
|
+
wk: 7 * 24 * 60 * 60,
|
|
98
|
+
wks: 7 * 24 * 60 * 60,
|
|
99
|
+
week: 7 * 24 * 60 * 60,
|
|
100
|
+
weeks: 7 * 24 * 60 * 60,
|
|
101
|
+
};
|
|
102
|
+
// The units "past" or "last" may stand before with no number: "past hour".
|
|
103
|
+
const UNITS_WITHOUT_A_NUMBER = [
|
|
104
|
+
"minute",
|
|
105
|
+
"hour",
|
|
106
|
+
"day",
|
|
107
|
+
"week",
|
|
108
|
+
];
|
|
9
109
|
class RollingTimeUtil {
|
|
10
110
|
static getDefault() {
|
|
11
111
|
return RollingTime_1.default.Past1Minute;
|
|
12
112
|
}
|
|
113
|
+
// Whether a value is a rolling time exactly as OneUptime writes it.
|
|
114
|
+
static isRollingTime(value) {
|
|
115
|
+
return ROLLING_TIMES.includes(value);
|
|
116
|
+
}
|
|
13
117
|
/*
|
|
14
|
-
* The
|
|
15
|
-
*
|
|
16
|
-
*
|
|
118
|
+
* The rolling time a value means, or null when it means none.
|
|
119
|
+
*
|
|
120
|
+
* A monitor's steps are stored as JSON, and the API, Terraform, MCP, a
|
|
121
|
+
* workflow or an AI writing them can spell a rolling time its own way.
|
|
122
|
+
* A Metrics monitor created through the MCP server stored "15 minutes":
|
|
123
|
+
* nothing read it, so every check judged a window of no length, found
|
|
124
|
+
* no data, and its no-data rule opened an alert on every run - while its
|
|
125
|
+
* charts showed nothing in one place and data in another.
|
|
126
|
+
*
|
|
127
|
+
* Read here:
|
|
128
|
+
* - each rolling time as OneUptime writes it ("Past 15 Minutes"), in
|
|
129
|
+
* any case and spacing, with dashes or underscores between words;
|
|
130
|
+
* - a number and a unit, after "past", "last" or "previous" or not:
|
|
131
|
+
* "15 minutes", "15 mins", "15m", "last 15 minutes", "24h", "1 week";
|
|
132
|
+
* - "past" or "last" and a unit: "past hour", "last day";
|
|
133
|
+
* - an ISO 8601 duration: "PT15M", "PT1H", "P1D", "P1W".
|
|
134
|
+
*
|
|
135
|
+
* A length is read as the rolling time exactly as long: "60 minutes" is
|
|
136
|
+
* Past 1 Hour, "24 hours" Past 1 Day, "2 weeks" Past 14 Days. A length
|
|
137
|
+
* no rolling time is as long as ("20 minutes"), a month or a year (which
|
|
138
|
+
* have no fixed length), a number with no unit, the enum's key name
|
|
139
|
+
* "Past1Hours" (above), and anything else is null - for the caller to
|
|
140
|
+
* refuse, or to read as the default.
|
|
17
141
|
*/
|
|
18
|
-
static
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
if (rollingTime === RollingTime_1.default.Past5Minutes) {
|
|
24
|
-
startDate = Date_1.default.addRemoveMinutes(endDate, -5);
|
|
25
|
-
}
|
|
26
|
-
if (rollingTime === RollingTime_1.default.Past10Minutes) {
|
|
27
|
-
startDate = Date_1.default.addRemoveMinutes(endDate, -10);
|
|
28
|
-
}
|
|
29
|
-
if (rollingTime === RollingTime_1.default.Past15Minutes) {
|
|
30
|
-
startDate = Date_1.default.addRemoveMinutes(endDate, -15);
|
|
31
|
-
}
|
|
32
|
-
if (rollingTime === RollingTime_1.default.Past30Minutes) {
|
|
33
|
-
startDate = Date_1.default.addRemoveMinutes(endDate, -30);
|
|
142
|
+
static fromValue(value) {
|
|
143
|
+
var _a;
|
|
144
|
+
if (RollingTimeUtil.isRollingTime(value)) {
|
|
145
|
+
return value;
|
|
34
146
|
}
|
|
35
|
-
if (
|
|
36
|
-
|
|
147
|
+
if (typeof value !== "string") {
|
|
148
|
+
return null;
|
|
37
149
|
}
|
|
38
|
-
|
|
39
|
-
|
|
150
|
+
const trimmed = value.trim();
|
|
151
|
+
if (trimmed.length === 0 || trimmed.length > MAX_LENGTH_TEXT_LENGTH) {
|
|
152
|
+
return null;
|
|
40
153
|
}
|
|
41
|
-
|
|
42
|
-
|
|
154
|
+
const text = trimmed
|
|
155
|
+
.toLowerCase()
|
|
156
|
+
.replace(/[\s_-]+/g, " ")
|
|
157
|
+
.trim();
|
|
158
|
+
if (text === KEY_NAME_THAT_SAYS_ANOTHER_LENGTH) {
|
|
159
|
+
return null;
|
|
43
160
|
}
|
|
44
|
-
|
|
45
|
-
|
|
161
|
+
const lengthInSeconds = (_a = RollingTimeUtil.readIso8601Duration(text)) !== null && _a !== void 0 ? _a : RollingTimeUtil.readLengthInWords(text);
|
|
162
|
+
if (lengthInSeconds === null) {
|
|
163
|
+
return null;
|
|
46
164
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
* more or less than N days. Past 1, 3 and 7 Days and Past 180 Days sit
|
|
54
|
-
* exactly on the edge of a bucket width (AggregationIntervalUtil), so in
|
|
55
|
-
* London after the clocks went back on 2026-10-25 Past 3 Days was
|
|
56
|
-
* bucketed by the hour instead of every 30 minutes - in the browser, and
|
|
57
|
-
* on any server not in UTC - and getWindowInMs, which steps back from
|
|
58
|
-
* 1970-01-01, read Past 90 and 180 Days an hour long in New York.
|
|
59
|
-
*/
|
|
60
|
-
if (rollingTime === RollingTime_1.default.Past1Hours) {
|
|
61
|
-
startDate = Date_1.default.addRemoveHours(endDate, -24);
|
|
62
|
-
}
|
|
63
|
-
if (rollingTime === RollingTime_1.default.Past2Days) {
|
|
64
|
-
startDate = Date_1.default.addRemoveHours(endDate, -2 * 24);
|
|
65
|
-
}
|
|
66
|
-
if (rollingTime === RollingTime_1.default.Past3Days) {
|
|
67
|
-
startDate = Date_1.default.addRemoveHours(endDate, -3 * 24);
|
|
68
|
-
}
|
|
69
|
-
if (rollingTime === RollingTime_1.default.Past7Days) {
|
|
70
|
-
startDate = Date_1.default.addRemoveHours(endDate, -7 * 24);
|
|
71
|
-
}
|
|
72
|
-
if (rollingTime === RollingTime_1.default.Past14Days) {
|
|
73
|
-
startDate = Date_1.default.addRemoveHours(endDate, -14 * 24);
|
|
165
|
+
return RollingTimeUtil.fromWindowInMs(Math.round(lengthInSeconds * 1000));
|
|
166
|
+
}
|
|
167
|
+
// The rolling time whose window is exactly this long, or null.
|
|
168
|
+
static fromWindowInMs(windowInMs) {
|
|
169
|
+
if (!Number.isFinite(windowInMs) || windowInMs <= 0) {
|
|
170
|
+
return null;
|
|
74
171
|
}
|
|
75
|
-
|
|
76
|
-
|
|
172
|
+
return (ROLLING_TIMES.find((rollingTime) => {
|
|
173
|
+
return WINDOW_IN_MINUTES[rollingTime] * 60 * 1000 === windowInMs;
|
|
174
|
+
}) || null);
|
|
175
|
+
}
|
|
176
|
+
/*
|
|
177
|
+
* The rolling time a value means, or the default (Past 1 Minute) - the
|
|
178
|
+
* window a step read with no rolling time has always had - when it means
|
|
179
|
+
* none. Never a window of no length.
|
|
180
|
+
*/
|
|
181
|
+
static fromValueOrDefault(value) {
|
|
182
|
+
return RollingTimeUtil.fromValue(value) || RollingTimeUtil.getDefault();
|
|
183
|
+
}
|
|
184
|
+
/*
|
|
185
|
+
* Every rolling time, quoted and listed for a sentence: "Past 1 Minute",
|
|
186
|
+
* "Past 5 Minutes", ... or "Past 365 Days".
|
|
187
|
+
*/
|
|
188
|
+
static getValuesText() {
|
|
189
|
+
const quoted = ROLLING_TIMES.map((rollingTime) => {
|
|
190
|
+
return `"${rollingTime}"`;
|
|
191
|
+
});
|
|
192
|
+
return `${quoted.slice(0, -1).join(", ")} or ${quoted[quoted.length - 1]}`;
|
|
193
|
+
}
|
|
194
|
+
/*
|
|
195
|
+
* The window a rolling time covers, ending now - or at `endDate` when a
|
|
196
|
+
* caller needs it to end earlier (a telemetry check while OneUptime's
|
|
197
|
+
* ingest queue is behind, issue #2825). A value that is no rolling time
|
|
198
|
+
* covers the default's window (fromValueOrDefault), never one of no
|
|
199
|
+
* length.
|
|
200
|
+
*/
|
|
201
|
+
static convertToStartAndEndDate(rollingTime, endDate = Date_1.default.getCurrentDate()) {
|
|
202
|
+
const startDate = Date_1.default.addRemoveMinutes(endDate, -WINDOW_IN_MINUTES[RollingTimeUtil.fromValueOrDefault(rollingTime)]);
|
|
203
|
+
return new InBetween_1.default(startDate, endDate);
|
|
204
|
+
}
|
|
205
|
+
// How long a rolling time's window is, in milliseconds.
|
|
206
|
+
static getWindowInMs(rollingTime) {
|
|
207
|
+
return (WINDOW_IN_MINUTES[RollingTimeUtil.fromValueOrDefault(rollingTime)] *
|
|
208
|
+
60 *
|
|
209
|
+
1000);
|
|
210
|
+
}
|
|
211
|
+
static readIso8601Duration(text) {
|
|
212
|
+
const match = ISO_8601_DURATION.exec(text);
|
|
213
|
+
if (!match) {
|
|
214
|
+
return null;
|
|
77
215
|
}
|
|
78
|
-
|
|
79
|
-
|
|
216
|
+
// Weeks, days, hours, minutes and seconds, in the order they are written.
|
|
217
|
+
const partUnits = [
|
|
218
|
+
UNIT_IN_SECONDS["week"],
|
|
219
|
+
UNIT_IN_SECONDS["day"],
|
|
220
|
+
UNIT_IN_SECONDS["hour"],
|
|
221
|
+
UNIT_IN_SECONDS["minute"],
|
|
222
|
+
UNIT_IN_SECONDS["second"],
|
|
223
|
+
];
|
|
224
|
+
let lengthInSeconds = 0;
|
|
225
|
+
let hasPart = false;
|
|
226
|
+
partUnits.forEach((unitInSeconds, index) => {
|
|
227
|
+
const part = match[index + 1];
|
|
228
|
+
if (part !== undefined) {
|
|
229
|
+
hasPart = true;
|
|
230
|
+
lengthInSeconds += Number(part) * unitInSeconds;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
// "P" or "PT" alone is no length, nor is a "T" with no time after it.
|
|
234
|
+
const hasTimePart = match[3] !== undefined ||
|
|
235
|
+
match[4] !== undefined ||
|
|
236
|
+
match[5] !== undefined;
|
|
237
|
+
if (!hasPart || (text.includes("t") && !hasTimePart)) {
|
|
238
|
+
return null;
|
|
80
239
|
}
|
|
81
|
-
|
|
82
|
-
|
|
240
|
+
return lengthInSeconds;
|
|
241
|
+
}
|
|
242
|
+
static readLengthInWords(text) {
|
|
243
|
+
const match = LENGTH_IN_WORDS.exec(text);
|
|
244
|
+
if (!match) {
|
|
245
|
+
return null;
|
|
83
246
|
}
|
|
84
|
-
|
|
85
|
-
|
|
247
|
+
const lookBack = match[1];
|
|
248
|
+
const count = match[2];
|
|
249
|
+
const unit = match[3];
|
|
250
|
+
const unitInSeconds = Object.prototype.hasOwnProperty.call(UNIT_IN_SECONDS, unit)
|
|
251
|
+
? UNIT_IN_SECONDS[unit]
|
|
252
|
+
: undefined;
|
|
253
|
+
if (unitInSeconds === undefined) {
|
|
254
|
+
return null;
|
|
86
255
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
256
|
+
if (count === undefined) {
|
|
257
|
+
/*
|
|
258
|
+
* "past hour" is an hour; "hour" alone, or "past h", is not
|
|
259
|
+
* written as a length.
|
|
260
|
+
*/
|
|
261
|
+
return lookBack && UNITS_WITHOUT_A_NUMBER.includes(unit)
|
|
262
|
+
? unitInSeconds
|
|
263
|
+
: null;
|
|
89
264
|
}
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
// How long a rolling time's window is, in milliseconds.
|
|
93
|
-
static getWindowInMs(rollingTime) {
|
|
94
|
-
const endDate = new Date(0);
|
|
95
|
-
const window = this.convertToStartAndEndDate(rollingTime, endDate);
|
|
96
|
-
return endDate.getTime() - window.startValue.getTime();
|
|
265
|
+
return Number(count) * unitInSeconds;
|
|
97
266
|
}
|
|
98
267
|
}
|
|
99
268
|
exports.default = RollingTimeUtil;
|
|
@@ -360,6 +360,18 @@ exports.RULE_CRITERIA_FIELDS_BY_MODEL = {
|
|
|
360
360
|
"sysDescrPattern",
|
|
361
361
|
"sysObjectIdPattern",
|
|
362
362
|
],
|
|
363
|
+
/*
|
|
364
|
+
* Which devices a naming rule names (issue #6619): read by
|
|
365
|
+
* NamingRuleMatcher, on the facts the naming engine gathers for a device
|
|
366
|
+
* being imported or already in the project.
|
|
367
|
+
*/
|
|
368
|
+
NetworkDeviceNamingRule: [
|
|
369
|
+
"ipMatchTarget",
|
|
370
|
+
"discoveredNamePattern",
|
|
371
|
+
"macAddressPattern",
|
|
372
|
+
"vendorPattern",
|
|
373
|
+
"sites",
|
|
374
|
+
],
|
|
363
375
|
NetworkDeviceLabelRule: [
|
|
364
376
|
"networkDeviceLabels",
|
|
365
377
|
"networkDeviceNamePattern",
|