@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DATA_BI_REFRESH_GROUP_BY_ATTRIBUTES = void 0;
|
|
7
|
+
exports.buildDataBiRefreshMonitorStep = buildDataBiRefreshMonitorStep;
|
|
8
|
+
const MonitorStep_1 = __importDefault(require("./MonitorStep"));
|
|
9
|
+
const MonitorCriteria_1 = __importDefault(require("./MonitorCriteria"));
|
|
10
|
+
const CriteriaFilter_1 = require("./CriteriaFilter");
|
|
11
|
+
const MonitorType_1 = __importDefault(require("./MonitorType"));
|
|
12
|
+
const RollingTime_1 = __importDefault(require("../RollingTime/RollingTime"));
|
|
13
|
+
const MetricsAggregationType_1 = __importDefault(require("../Metrics/MetricsAggregationType"));
|
|
14
|
+
const DataBiRefreshAlert_1 = require("../DataObservability/DataBiRefreshAlert");
|
|
15
|
+
const RecommendationCriteriaBuilder_1 = require("./Recommendation/RecommendationCriteriaBuilder");
|
|
16
|
+
/*
|
|
17
|
+
* THE MONITOR STEP OF A POWER BI TOOL'S FAILED REFRESHES.
|
|
18
|
+
*
|
|
19
|
+
* A Metrics monitor over oneuptime.data.bi.refresh_failed, filtered on the
|
|
20
|
+
* tool's id and grouped by dataset and workspace: one monitor watches every
|
|
21
|
+
* dataset of the tool - one published next week too - and opens one alert
|
|
22
|
+
* per dataset whose refresh failed, named in the alert's title. Each dataset
|
|
23
|
+
* is checked every five minutes (DataBiRefreshCheck), so the ten-minute
|
|
24
|
+
* window holds two checks: the alert opens at the first check that finds
|
|
25
|
+
* the dataset failing, stays open while it fails - however many hourly
|
|
26
|
+
* reads find it so - and resolves once the checks find a later refresh
|
|
27
|
+
* completed.
|
|
28
|
+
*/
|
|
29
|
+
const METRIC_ALIAS = "refresh_failed";
|
|
30
|
+
// One series, and one alert, per dataset: its name and its workspace's, as the title names them.
|
|
31
|
+
exports.DATA_BI_REFRESH_GROUP_BY_ATTRIBUTES = [
|
|
32
|
+
DataBiRefreshAlert_1.DataBiAttribute.DatasetName,
|
|
33
|
+
DataBiRefreshAlert_1.DataBiAttribute.Workspace,
|
|
34
|
+
];
|
|
35
|
+
function buildDataBiRefreshMonitorStep(args) {
|
|
36
|
+
const step = MonitorStep_1.default.getDefaultMonitorStep({
|
|
37
|
+
monitorName: args.monitorName,
|
|
38
|
+
monitorType: MonitorType_1.default.Metrics,
|
|
39
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
40
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
41
|
+
defaultIncidentSeverityId: args.defaultIncidentSeverityId,
|
|
42
|
+
defaultAlertSeverityId: args.defaultAlertSeverityId,
|
|
43
|
+
});
|
|
44
|
+
step.setMetricMonitor({
|
|
45
|
+
rollingTime: RollingTime_1.default.Past10Minutes,
|
|
46
|
+
metricViewConfig: {
|
|
47
|
+
queryConfigs: [
|
|
48
|
+
{
|
|
49
|
+
metricAliasData: {
|
|
50
|
+
metricVariable: METRIC_ALIAS,
|
|
51
|
+
title: `Failed refreshes - ${args.toolName}`,
|
|
52
|
+
description: `The datasets of ${args.toolName} whose last refresh failed.`,
|
|
53
|
+
legend: args.toolName,
|
|
54
|
+
legendUnit: "",
|
|
55
|
+
},
|
|
56
|
+
metricQueryData: {
|
|
57
|
+
filterData: {
|
|
58
|
+
metricName: DataBiRefreshAlert_1.DataBiMetricName.RefreshFailed,
|
|
59
|
+
attributes: {
|
|
60
|
+
[DataBiRefreshAlert_1.DataBiAttribute.ConnectionId]: args.dataBiConnectionId,
|
|
61
|
+
},
|
|
62
|
+
aggegationType: MetricsAggregationType_1.default.Max,
|
|
63
|
+
aggregateBy: {},
|
|
64
|
+
},
|
|
65
|
+
groupByAttributeKeys: [...exports.DATA_BI_REFRESH_GROUP_BY_ATTRIBUTES],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
formulaConfigs: [],
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
const unhealthy = (0, RecommendationCriteriaBuilder_1.buildUnhealthyCriteriaInstance)({
|
|
73
|
+
offlineMonitorStatusId: args.offlineMonitorStatusId,
|
|
74
|
+
incidentSeverityId: args.defaultIncidentSeverityId,
|
|
75
|
+
alertSeverityId: args.defaultAlertSeverityId,
|
|
76
|
+
monitorName: args.monitorName,
|
|
77
|
+
metricAlias: METRIC_ALIAS,
|
|
78
|
+
filterType: CriteriaFilter_1.FilterType.GreaterThan,
|
|
79
|
+
value: 0,
|
|
80
|
+
incidentTitle: `[Data] Power BI Refresh Failed - ${args.toolName}`,
|
|
81
|
+
incidentDescription: `The last refresh of a dataset of ${args.toolName} failed or was cancelled, so the reports and dashboards built on it show the data of its last completed refresh. BI Dashboards in Data Observability shows the refresh's error. This resolves once a later refresh completes.`,
|
|
82
|
+
criteriaName: "A dataset's refresh failed",
|
|
83
|
+
criteriaDescription: "Triggers when a check finds a dataset whose last refresh failed or was cancelled.",
|
|
84
|
+
resourceNoun: "dataset",
|
|
85
|
+
// A check is an event: one that finds the dataset failing is enough.
|
|
86
|
+
metricAggregationType: CriteriaFilter_1.EvaluateOverTimeType.AnyValue,
|
|
87
|
+
});
|
|
88
|
+
/*
|
|
89
|
+
* An alert, not an incident: as a pipeline's monitors are made by default
|
|
90
|
+
* (MonitorRecommendationCreateSideOver), it tells the team without
|
|
91
|
+
* publishing to a status page. The incident stays configured, inert, one
|
|
92
|
+
* switch away on the monitor.
|
|
93
|
+
*/
|
|
94
|
+
unhealthy.data.createIncidents = false;
|
|
95
|
+
const healthy = (0, RecommendationCriteriaBuilder_1.buildHealthyCriteriaInstance)({
|
|
96
|
+
onlineMonitorStatusId: args.onlineMonitorStatusId,
|
|
97
|
+
metricAlias: METRIC_ALIAS,
|
|
98
|
+
filterType: CriteriaFilter_1.FilterType.LessThanOrEqualTo,
|
|
99
|
+
value: 0,
|
|
100
|
+
recoveryValue: 0,
|
|
101
|
+
isBinaryMetric: true,
|
|
102
|
+
metricAggregationType: CriteriaFilter_1.EvaluateOverTimeType.AllValues,
|
|
103
|
+
});
|
|
104
|
+
const criteria = new MonitorCriteria_1.default();
|
|
105
|
+
criteria.data = { monitorCriteriaInstanceArray: [unhealthy, healthy] };
|
|
106
|
+
step.setMonitorCriteria(criteria);
|
|
107
|
+
return step;
|
|
108
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PluralTemplate, Translator } from "../Translator.mjs";
|
|
2
|
+
export interface EvaluationTerm {
|
|
3
|
+
term: string;
|
|
4
|
+
inSentence?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface EvaluationTime {
|
|
7
|
+
time: string;
|
|
8
|
+
}
|
|
9
|
+
export type EvaluationSentenceValue = string | number | EvaluationTerm | EvaluationTime | EvaluationSentence;
|
|
10
|
+
export interface EvaluationSentence {
|
|
11
|
+
template: string;
|
|
12
|
+
values?: Record<string, EvaluationSentenceValue> | undefined;
|
|
13
|
+
one?: string | undefined;
|
|
14
|
+
count?: number | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const translatableSentence: (template: string, values?: Record<string, EvaluationSentenceValue> | undefined) => EvaluationSentence;
|
|
17
|
+
export declare const translatablePluralSentence: (forms: PluralTemplate, count: number, values?: Record<string, EvaluationSentenceValue> | undefined) => EvaluationSentence;
|
|
18
|
+
export declare const evaluationTerm: (text: string, options?: {
|
|
19
|
+
inSentence?: boolean | undefined;
|
|
20
|
+
} | undefined) => EvaluationTerm;
|
|
21
|
+
export declare const evaluationTime: (date: Date | string) => EvaluationTime;
|
|
22
|
+
export declare const isEvaluationTerm: (value: unknown) => value is EvaluationTerm;
|
|
23
|
+
export declare const isEvaluationTime: (value: unknown) => value is EvaluationTime;
|
|
24
|
+
export declare const isEvaluationSentence: (value: unknown) => value is EvaluationSentence;
|
|
25
|
+
export type EvaluationTimeWriter = (date: Date) => string;
|
|
26
|
+
export interface WordEvaluationSentenceOptions {
|
|
27
|
+
writeTime?: EvaluationTimeWriter | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare function wordEvaluationSentence(sentence: EvaluationSentence, translator: Translator, options?: WordEvaluationSentenceOptions): string;
|
|
30
|
+
export declare function englishOfEvaluationSentence(sentence: EvaluationSentence): string;
|
|
31
|
+
export declare function isWhollyWorded(sentence: EvaluationSentence, translator: Translator): boolean;
|
|
32
|
+
export declare function wordStoredEvaluationText(data: {
|
|
33
|
+
english: string;
|
|
34
|
+
sentence: unknown;
|
|
35
|
+
translator: Translator;
|
|
36
|
+
options?: WordEvaluationSentenceOptions | undefined;
|
|
37
|
+
}): string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PluralTemplate, Translator } from "../Translator";
|
|
2
|
+
export interface EvaluationTerm {
|
|
3
|
+
term: string;
|
|
4
|
+
inSentence?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface EvaluationTime {
|
|
7
|
+
time: string;
|
|
8
|
+
}
|
|
9
|
+
export type EvaluationSentenceValue = string | number | EvaluationTerm | EvaluationTime | EvaluationSentence;
|
|
10
|
+
export interface EvaluationSentence {
|
|
11
|
+
template: string;
|
|
12
|
+
values?: Record<string, EvaluationSentenceValue> | undefined;
|
|
13
|
+
one?: string | undefined;
|
|
14
|
+
count?: number | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const translatableSentence: (template: string, values?: Record<string, EvaluationSentenceValue> | undefined) => EvaluationSentence;
|
|
17
|
+
export declare const translatablePluralSentence: (forms: PluralTemplate, count: number, values?: Record<string, EvaluationSentenceValue> | undefined) => EvaluationSentence;
|
|
18
|
+
export declare const evaluationTerm: (text: string, options?: {
|
|
19
|
+
inSentence?: boolean | undefined;
|
|
20
|
+
} | undefined) => EvaluationTerm;
|
|
21
|
+
export declare const evaluationTime: (date: Date | string) => EvaluationTime;
|
|
22
|
+
export declare const isEvaluationTerm: (value: unknown) => value is EvaluationTerm;
|
|
23
|
+
export declare const isEvaluationTime: (value: unknown) => value is EvaluationTime;
|
|
24
|
+
export declare const isEvaluationSentence: (value: unknown) => value is EvaluationSentence;
|
|
25
|
+
export type EvaluationTimeWriter = (date: Date) => string;
|
|
26
|
+
export interface WordEvaluationSentenceOptions {
|
|
27
|
+
writeTime?: EvaluationTimeWriter | undefined;
|
|
28
|
+
}
|
|
29
|
+
export declare function wordEvaluationSentence(sentence: EvaluationSentence, translator: Translator, options?: WordEvaluationSentenceOptions): string;
|
|
30
|
+
export declare function englishOfEvaluationSentence(sentence: EvaluationSentence): string;
|
|
31
|
+
export declare function isWhollyWorded(sentence: EvaluationSentence, translator: Translator): boolean;
|
|
32
|
+
export declare function wordStoredEvaluationText(data: {
|
|
33
|
+
english: string;
|
|
34
|
+
sentence: unknown;
|
|
35
|
+
translator: Translator;
|
|
36
|
+
options?: WordEvaluationSentenceOptions | undefined;
|
|
37
|
+
}): string;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isEvaluationSentence = exports.isEvaluationTime = exports.isEvaluationTerm = exports.evaluationTime = exports.evaluationTerm = exports.translatablePluralSentence = exports.translatableSentence = void 0;
|
|
7
|
+
exports.wordEvaluationSentence = wordEvaluationSentence;
|
|
8
|
+
exports.englishOfEvaluationSentence = englishOfEvaluationSentence;
|
|
9
|
+
exports.isWhollyWorded = isWhollyWorded;
|
|
10
|
+
exports.wordStoredEvaluationText = wordStoredEvaluationText;
|
|
11
|
+
const Date_1 = __importDefault(require("../Date"));
|
|
12
|
+
const DateLanguage_1 = require("../DateLanguage");
|
|
13
|
+
const Translator_1 = require("../Translator");
|
|
14
|
+
// How deep parts may nest, and how many values a sentence may hold.
|
|
15
|
+
const MAX_DEPTH = 8;
|
|
16
|
+
const MAX_VALUES = 32;
|
|
17
|
+
// A stored template or value longer than this is not one OneUptime wrote.
|
|
18
|
+
const MAX_TEMPLATE_LENGTH = 1000;
|
|
19
|
+
const MAX_VALUE_LENGTH = 10000;
|
|
20
|
+
/*
|
|
21
|
+
* A sentence of the engine's own, ready to store. Its template is a
|
|
22
|
+
* literal at the call, which the Dashboard's string extractor reads as a
|
|
23
|
+
* translation key (scripts/i18n/ExtractStrings.ts reads translatableSentence
|
|
24
|
+
* calls in the files it lists).
|
|
25
|
+
*/
|
|
26
|
+
const translatableSentence = (template, values) => {
|
|
27
|
+
return values && Object.keys(values).length > 0
|
|
28
|
+
? { template: template, values: values }
|
|
29
|
+
: { template: template };
|
|
30
|
+
};
|
|
31
|
+
exports.translatableSentence = translatableSentence;
|
|
32
|
+
/*
|
|
33
|
+
* A count-dependent sentence: `forms` as a PluralTemplate whose forms are
|
|
34
|
+
* marked with translationKey(), so the extractor reads them as a plural.
|
|
35
|
+
*/
|
|
36
|
+
const translatablePluralSentence = (forms, count, values) => {
|
|
37
|
+
return Object.assign(Object.assign({}, (0, exports.translatableSentence)(forms.other, values)), { one: forms.one, count: count });
|
|
38
|
+
};
|
|
39
|
+
exports.translatablePluralSentence = translatablePluralSentence;
|
|
40
|
+
// A word the reader's language words: a check's name, "true".
|
|
41
|
+
const evaluationTerm = (text, options) => {
|
|
42
|
+
return (options === null || options === void 0 ? void 0 : options.inSentence)
|
|
43
|
+
? { term: text, inSentence: true }
|
|
44
|
+
: { term: text };
|
|
45
|
+
};
|
|
46
|
+
exports.evaluationTerm = evaluationTerm;
|
|
47
|
+
// A time, written where the sentence is read.
|
|
48
|
+
const evaluationTime = (date) => {
|
|
49
|
+
return { time: Date_1.default.fromString(date).toISOString() };
|
|
50
|
+
};
|
|
51
|
+
exports.evaluationTime = evaluationTime;
|
|
52
|
+
const isPlainObject = (value) => {
|
|
53
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
54
|
+
};
|
|
55
|
+
const isEvaluationTerm = (value) => {
|
|
56
|
+
return (isPlainObject(value) &&
|
|
57
|
+
typeof value["term"] === "string" &&
|
|
58
|
+
value["term"].length <= MAX_VALUE_LENGTH &&
|
|
59
|
+
(value["inSentence"] === undefined ||
|
|
60
|
+
typeof value["inSentence"] === "boolean"));
|
|
61
|
+
};
|
|
62
|
+
exports.isEvaluationTerm = isEvaluationTerm;
|
|
63
|
+
const isEvaluationTime = (value) => {
|
|
64
|
+
return (isPlainObject(value) &&
|
|
65
|
+
typeof value["time"] === "string" &&
|
|
66
|
+
value["time"].length <= 64 &&
|
|
67
|
+
!Number.isNaN(new Date(value["time"]).getTime()));
|
|
68
|
+
};
|
|
69
|
+
exports.isEvaluationTime = isEvaluationTime;
|
|
70
|
+
const isSentenceAtDepth = (value, depth) => {
|
|
71
|
+
if (depth > MAX_DEPTH || !isPlainObject(value)) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
const template = value["template"];
|
|
75
|
+
if (typeof template !== "string" ||
|
|
76
|
+
template.length === 0 ||
|
|
77
|
+
template.length > MAX_TEMPLATE_LENGTH) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
const one = value["one"];
|
|
81
|
+
const count = value["count"];
|
|
82
|
+
if (one !== undefined &&
|
|
83
|
+
(typeof one !== "string" || one.length > MAX_TEMPLATE_LENGTH)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (count !== undefined &&
|
|
87
|
+
(typeof count !== "number" || !Number.isFinite(count))) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
// A one form and its count come together, or not at all.
|
|
91
|
+
if ((one === undefined) !== (count === undefined)) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
const values = value["values"];
|
|
95
|
+
if (values === undefined) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (!isPlainObject(values)) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
const keys = Object.keys(values);
|
|
102
|
+
if (keys.length > MAX_VALUES) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return keys.every((key) => {
|
|
106
|
+
const item = values[key];
|
|
107
|
+
if (typeof item === "string") {
|
|
108
|
+
return item.length <= MAX_VALUE_LENGTH;
|
|
109
|
+
}
|
|
110
|
+
if (typeof item === "number") {
|
|
111
|
+
return Number.isFinite(item);
|
|
112
|
+
}
|
|
113
|
+
return ((0, exports.isEvaluationTerm)(item) ||
|
|
114
|
+
(0, exports.isEvaluationTime)(item) ||
|
|
115
|
+
isSentenceAtDepth(item, depth + 1));
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
/*
|
|
119
|
+
* Whether a stored value is a sentence this build can word: a template,
|
|
120
|
+
* values of the kinds above, parts no deeper than MAX_DEPTH. Anything else
|
|
121
|
+
* - a record from a newer build, a value written by hand - is not, and the
|
|
122
|
+
* English stored beside it is shown instead.
|
|
123
|
+
*/
|
|
124
|
+
const isEvaluationSentence = (value) => {
|
|
125
|
+
return isSentenceAtDepth(value, 0);
|
|
126
|
+
};
|
|
127
|
+
exports.isEvaluationSentence = isEvaluationSentence;
|
|
128
|
+
const writeTimeAsTheServerDoes = (date) => {
|
|
129
|
+
return Date_1.default.getDateAsLocalFormattedString(date);
|
|
130
|
+
};
|
|
131
|
+
const toTemplateValue = (value, options) => {
|
|
132
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
133
|
+
return typeof value === "number" ? String(value) : value;
|
|
134
|
+
}
|
|
135
|
+
if ((0, exports.isEvaluationTerm)(value)) {
|
|
136
|
+
return (0, Translator_1.translatableTerm)(value.term, {
|
|
137
|
+
inSentence: Boolean(value.inSentence),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if ((0, exports.isEvaluationTime)(value)) {
|
|
141
|
+
const writeTime = options.writeTime || writeTimeAsTheServerDoes;
|
|
142
|
+
const date = new Date(value.time);
|
|
143
|
+
/*
|
|
144
|
+
* In the sentence's language: the reader's when it is worded in theirs,
|
|
145
|
+
* English when it is not ("Checked vor 5 Stunden" never happens).
|
|
146
|
+
*/
|
|
147
|
+
return (0, Translator_1.composedValue)((translator) => {
|
|
148
|
+
return translator.language === "en"
|
|
149
|
+
? (0, DateLanguage_1.inEnglishDates)(() => {
|
|
150
|
+
return writeTime(date);
|
|
151
|
+
})
|
|
152
|
+
: (0, DateLanguage_1.withDateDisplayLanguage)(translator.language, () => {
|
|
153
|
+
return writeTime(date);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
const part = value;
|
|
158
|
+
return (0, Translator_1.composedValue)((translator) => {
|
|
159
|
+
return wordEvaluationSentence(part, translator, options);
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
/*
|
|
163
|
+
* The sentence in `translator`'s language: wholly in it when it words the
|
|
164
|
+
* template, else wholly in English. Numbers are written as stored: they are
|
|
165
|
+
* the engine's own ("200", "1.5 sec"), as the English text has them.
|
|
166
|
+
*/
|
|
167
|
+
function wordEvaluationSentence(sentence, translator, options = {}) {
|
|
168
|
+
const values = {};
|
|
169
|
+
for (const key of Object.keys(sentence.values || {})) {
|
|
170
|
+
values[key] = toTemplateValue((sentence.values || {})[key], options);
|
|
171
|
+
}
|
|
172
|
+
if (sentence.one !== undefined && typeof sentence.count === "number") {
|
|
173
|
+
return translator.translatePlural({ one: sentence.one, other: sentence.template }, sentence.count, Object.assign({
|
|
174
|
+
// The count as the engine wrote it, like every other number here.
|
|
175
|
+
count: String(sentence.count) }, values));
|
|
176
|
+
}
|
|
177
|
+
return translator.translateTemplate(hasWords(sentence.template)
|
|
178
|
+
? sentence.template
|
|
179
|
+
: punctuateWordlessTemplate(sentence.template, translator.language), values);
|
|
180
|
+
}
|
|
181
|
+
/*
|
|
182
|
+
* How a language writes the punctuation OneUptime's wordless templates put
|
|
183
|
+
* between their parts ("{{observation}}, {{comparison}}."). Such a template
|
|
184
|
+
* belongs to no language, so no locale words it: its commas and full stop
|
|
185
|
+
* are written here the way the sentence's language writes them - "响应状态码为
|
|
186
|
+
* 503,高于阈值 499。", never "503, 高于阈值 499." Languages not listed write
|
|
187
|
+
* them as English does.
|
|
188
|
+
*/
|
|
189
|
+
const WORDLESS_PUNCTUATION = {
|
|
190
|
+
zh: [
|
|
191
|
+
[", ", ","],
|
|
192
|
+
["; ", ";"],
|
|
193
|
+
[".", "。"],
|
|
194
|
+
],
|
|
195
|
+
ja: [
|
|
196
|
+
[", ", "、"],
|
|
197
|
+
["; ", ";"],
|
|
198
|
+
[".", "。"],
|
|
199
|
+
],
|
|
200
|
+
ar: [
|
|
201
|
+
[", ", "، "],
|
|
202
|
+
["; ", "؛ "],
|
|
203
|
+
],
|
|
204
|
+
fa: [
|
|
205
|
+
[", ", "، "],
|
|
206
|
+
["; ", "؛ "],
|
|
207
|
+
],
|
|
208
|
+
};
|
|
209
|
+
const punctuateWordlessTemplate = (template, language) => {
|
|
210
|
+
const marks = WORDLESS_PUNCTUATION[(language || "").split("-")[0].toLowerCase()];
|
|
211
|
+
if (!marks) {
|
|
212
|
+
return template;
|
|
213
|
+
}
|
|
214
|
+
// Only the template's own text: a placeholder's name is left as it is.
|
|
215
|
+
return template
|
|
216
|
+
.split(/(\{\{\s*[\w.]+\s*\}\})/)
|
|
217
|
+
.map((part, index) => {
|
|
218
|
+
if (index % 2 === 1) {
|
|
219
|
+
return part;
|
|
220
|
+
}
|
|
221
|
+
return marks.reduce((text, [from, to]) => {
|
|
222
|
+
return text.split(from).join(to);
|
|
223
|
+
}, part);
|
|
224
|
+
})
|
|
225
|
+
.join("");
|
|
226
|
+
};
|
|
227
|
+
let englishTranslator = null;
|
|
228
|
+
const getEnglishTranslator = () => {
|
|
229
|
+
if (!englishTranslator) {
|
|
230
|
+
englishTranslator = (0, Translator_1.createTranslator)(undefined, "en");
|
|
231
|
+
}
|
|
232
|
+
return englishTranslator;
|
|
233
|
+
};
|
|
234
|
+
/*
|
|
235
|
+
* The sentence in English, as the server stores it beside the sentence:
|
|
236
|
+
* the text every reader without a translation, every email and every chat
|
|
237
|
+
* message reads.
|
|
238
|
+
*/
|
|
239
|
+
function englishOfEvaluationSentence(sentence) {
|
|
240
|
+
return wordEvaluationSentence(sentence, getEnglishTranslator());
|
|
241
|
+
}
|
|
242
|
+
const PLACEHOLDER = /\{\{\s*[\w.]+\s*\}\}/g;
|
|
243
|
+
const LETTER = /\p{L}/u;
|
|
244
|
+
// Whether a template has words of its own, besides its placeholders.
|
|
245
|
+
const hasWords = (template) => {
|
|
246
|
+
return LETTER.test(template.replace(PLACEHOLDER, ""));
|
|
247
|
+
};
|
|
248
|
+
/*
|
|
249
|
+
* Whether `translator` words every sentence of `sentence`: the sentence
|
|
250
|
+
* itself and each part in it. One that has words its language has not
|
|
251
|
+
* worded yet makes the whole sentence English: a Chinese sentence never
|
|
252
|
+
* holds an English clause. A template without words of its own ("{{a}},
|
|
253
|
+
* {{b}}.") belongs to no language and does not count.
|
|
254
|
+
*
|
|
255
|
+
* A count-dependent sentence is worded under its general form, its key:
|
|
256
|
+
* a language's other forms are stored beside it ("…_one", "…_few"), and a
|
|
257
|
+
* language with one form only - Chinese, Japanese - has none of them.
|
|
258
|
+
*/
|
|
259
|
+
function isWhollyWorded(sentence, translator) {
|
|
260
|
+
if (hasWords(sentence.template) &&
|
|
261
|
+
!translator.hasTranslation(sentence.template)) {
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
return Object.keys(sentence.values || {}).every((key) => {
|
|
265
|
+
const value = (sentence.values || {})[key];
|
|
266
|
+
if (typeof value === "string" ||
|
|
267
|
+
typeof value === "number" ||
|
|
268
|
+
(0, exports.isEvaluationTerm)(value) ||
|
|
269
|
+
(0, exports.isEvaluationTime)(value)) {
|
|
270
|
+
return true;
|
|
271
|
+
}
|
|
272
|
+
return isWhollyWorded(value, translator);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/*
|
|
276
|
+
* A stored sentence in the reader's language, or `english` - the text
|
|
277
|
+
* stored beside it - when there is none, or none this build can read. A
|
|
278
|
+
* sentence the reader's language words only in part reads in English,
|
|
279
|
+
* whole (isWhollyWorded).
|
|
280
|
+
*/
|
|
281
|
+
function wordStoredEvaluationText(data) {
|
|
282
|
+
if (!(0, exports.isEvaluationSentence)(data.sentence)) {
|
|
283
|
+
return data.english;
|
|
284
|
+
}
|
|
285
|
+
try {
|
|
286
|
+
/*
|
|
287
|
+
* English, when the reader's language does not word all of it - with
|
|
288
|
+
* its times still written where it is read (the reader's time zone).
|
|
289
|
+
*/
|
|
290
|
+
const translator = isWhollyWorded(data.sentence, data.translator)
|
|
291
|
+
? data.translator
|
|
292
|
+
: getEnglishTranslator();
|
|
293
|
+
return wordEvaluationSentence(data.sentence, translator, data.options || {});
|
|
294
|
+
}
|
|
295
|
+
catch (_a) {
|
|
296
|
+
return data.english;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import commonJsModule from "./EvaluationSentence.js";
|
|
2
|
+
export const englishOfEvaluationSentence = commonJsModule.englishOfEvaluationSentence;
|
|
3
|
+
export const evaluationTerm = commonJsModule.evaluationTerm;
|
|
4
|
+
export const evaluationTime = commonJsModule.evaluationTime;
|
|
5
|
+
export const isEvaluationSentence = commonJsModule.isEvaluationSentence;
|
|
6
|
+
export const isEvaluationTerm = commonJsModule.isEvaluationTerm;
|
|
7
|
+
export const isEvaluationTime = commonJsModule.isEvaluationTime;
|
|
8
|
+
export const isWhollyWorded = commonJsModule.isWhollyWorded;
|
|
9
|
+
export const translatablePluralSentence = commonJsModule.translatablePluralSentence;
|
|
10
|
+
export const translatableSentence = commonJsModule.translatableSentence;
|
|
11
|
+
export const wordEvaluationSentence = commonJsModule.wordEvaluationSentence;
|
|
12
|
+
export const wordStoredEvaluationText = commonJsModule.wordStoredEvaluationText;
|
|
@@ -17,6 +17,7 @@ export default interface IncomingEmailMonitorRequest {
|
|
|
17
17
|
emailHeaders?: Dictionary<string> | undefined;
|
|
18
18
|
emailReceivedAt: Date;
|
|
19
19
|
checkedAt: Date;
|
|
20
|
+
dataReceivedAt?: Date | undefined;
|
|
20
21
|
attachments?: Array<EmailAttachment> | undefined;
|
|
21
22
|
onlyCheckForIncomingEmailReceivedAt?: boolean | undefined;
|
|
22
23
|
evaluationSummary?: MonitorEvaluationSummary | undefined;
|
|
@@ -17,6 +17,7 @@ export default interface IncomingEmailMonitorRequest {
|
|
|
17
17
|
emailHeaders?: Dictionary<string> | undefined;
|
|
18
18
|
emailReceivedAt: Date;
|
|
19
19
|
checkedAt: Date;
|
|
20
|
+
dataReceivedAt?: Date | undefined;
|
|
20
21
|
attachments?: Array<EmailAttachment> | undefined;
|
|
21
22
|
onlyCheckForIncomingEmailReceivedAt?: boolean | undefined;
|
|
22
23
|
evaluationSummary?: MonitorEvaluationSummary | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import DatabaseProperty from "../Database/DatabaseProperty.mjs";
|
|
2
2
|
import { JSONObject } from "../JSON.mjs";
|
|
3
3
|
import ObjectID from "../ObjectID.mjs";
|
|
4
|
+
import { Translator } from "../Translator.mjs";
|
|
4
5
|
import MonitorCriteriaInstance from "./MonitorCriteriaInstance.mjs";
|
|
5
6
|
import MonitorType from "./MonitorType.mjs";
|
|
6
7
|
import { FindOperator } from "typeorm";
|
|
@@ -18,6 +19,7 @@ export default class MonitorCriteria extends DatabaseProperty {
|
|
|
18
19
|
defaultIncidentSeverityId: ObjectID;
|
|
19
20
|
defaultAlertSeverityId: ObjectID;
|
|
20
21
|
warningAlertSeverityId?: ObjectID | undefined;
|
|
22
|
+
translator?: Translator | undefined;
|
|
21
23
|
}): MonitorCriteria;
|
|
22
24
|
static getValidationError(value: MonitorCriteria, monitorType: MonitorType): string | null;
|
|
23
25
|
static getNewMonitorCriteriaAsJSON(): JSONObject;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import DatabaseProperty from "../Database/DatabaseProperty";
|
|
2
2
|
import { JSONObject } from "../JSON";
|
|
3
3
|
import ObjectID from "../ObjectID";
|
|
4
|
+
import { Translator } from "../Translator";
|
|
4
5
|
import MonitorCriteriaInstance from "./MonitorCriteriaInstance";
|
|
5
6
|
import MonitorType from "./MonitorType";
|
|
6
7
|
import { FindOperator } from "typeorm";
|
|
@@ -18,6 +19,7 @@ export default class MonitorCriteria extends DatabaseProperty {
|
|
|
18
19
|
defaultIncidentSeverityId: ObjectID;
|
|
19
20
|
defaultAlertSeverityId: ObjectID;
|
|
20
21
|
warningAlertSeverityId?: ObjectID | undefined;
|
|
22
|
+
translator?: Translator | undefined;
|
|
21
23
|
}): MonitorCriteria;
|
|
22
24
|
static getValidationError(value: MonitorCriteria, monitorType: MonitorType): string | null;
|
|
23
25
|
static getNewMonitorCriteriaAsJSON(): JSONObject;
|
|
@@ -29,6 +29,11 @@ class MonitorCriteria extends DatabaseProperty_1.default {
|
|
|
29
29
|
* project), the one MonitorRecommendationSeverityMapper calls Warning;
|
|
30
30
|
* without it the warning uses defaultAlertSeverityId like every other
|
|
31
31
|
* default alert.
|
|
32
|
+
*
|
|
33
|
+
* translator is the reader's: the Dashboard passes it, so the criteria's
|
|
34
|
+
* names and descriptions and the incidents' and alerts' words are written
|
|
35
|
+
* in the language of the person creating the monitor. Without one they
|
|
36
|
+
* are English (MonitorCriteriaInstance.getWordsTranslator).
|
|
32
37
|
*/
|
|
33
38
|
static getDefaultMonitorCriteria(arg) {
|
|
34
39
|
const monitorCriteria = new MonitorCriteria();
|
|
@@ -38,16 +43,19 @@ class MonitorCriteria extends DatabaseProperty_1.default {
|
|
|
38
43
|
incidentSeverityId: arg.defaultIncidentSeverityId,
|
|
39
44
|
alertSeverityId: arg.defaultAlertSeverityId,
|
|
40
45
|
monitorName: arg.monitorName,
|
|
46
|
+
translator: arg.translator,
|
|
41
47
|
});
|
|
42
48
|
const warningCriteria = MonitorCriteriaInstance_1.default.getDefaultWarningMonitorCriteriaInstance({
|
|
43
49
|
monitorType: arg.monitorType,
|
|
44
50
|
alertSeverityId: arg.warningAlertSeverityId || arg.defaultAlertSeverityId,
|
|
45
51
|
monitorName: arg.monitorName,
|
|
52
|
+
translator: arg.translator,
|
|
46
53
|
});
|
|
47
54
|
const onlineCriteria = MonitorCriteriaInstance_1.default.getDefaultOnlineMonitorCriteriaInstance({
|
|
48
55
|
monitorType: arg.monitorType,
|
|
49
56
|
monitorStatusId: arg.onlineMonitorStatusId,
|
|
50
57
|
monitorName: arg.monitorName,
|
|
58
|
+
translator: arg.translator,
|
|
51
59
|
});
|
|
52
60
|
monitorCriteria.data = {
|
|
53
61
|
monitorCriteriaInstanceArray: [],
|
|
@@ -2,6 +2,7 @@ import DatabaseProperty from "../Database/DatabaseProperty.mjs";
|
|
|
2
2
|
import FilterCondition from "../Filter/FilterCondition.mjs";
|
|
3
3
|
import { JSONObject } from "../JSON.mjs";
|
|
4
4
|
import ObjectID from "../ObjectID.mjs";
|
|
5
|
+
import { Translator } from "../Translator.mjs";
|
|
5
6
|
import { CriteriaAlert } from "./CriteriaAlert.mjs";
|
|
6
7
|
import { CriteriaFilter } from "./CriteriaFilter.mjs";
|
|
7
8
|
import { CriteriaIncident } from "./CriteriaIncident.mjs";
|
|
@@ -49,6 +50,7 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
49
50
|
static readonly DEFAULT_LLM_MIN_BAD_ANSWERS: number;
|
|
50
51
|
data: MonitorCriteriaInstanceType | undefined;
|
|
51
52
|
constructor();
|
|
53
|
+
private static getWordsTranslator;
|
|
52
54
|
static getDefaultOnlineMonitorCriteriaInstance(arg: {
|
|
53
55
|
monitorType: MonitorType;
|
|
54
56
|
monitorStatusId: ObjectID;
|
|
@@ -56,11 +58,13 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
56
58
|
metricOptions?: {
|
|
57
59
|
metricAliases: Array<string>;
|
|
58
60
|
};
|
|
61
|
+
translator?: Translator | undefined;
|
|
59
62
|
}): MonitorCriteriaInstance | null;
|
|
60
63
|
static getDefaultWarningMonitorCriteriaInstance(arg: {
|
|
61
64
|
monitorType: MonitorType;
|
|
62
65
|
alertSeverityId: ObjectID;
|
|
63
66
|
monitorName: string;
|
|
67
|
+
translator?: Translator | undefined;
|
|
64
68
|
}): MonitorCriteriaInstance | null;
|
|
65
69
|
static getDefaultOfflineMonitorCriteriaInstance(arg: {
|
|
66
70
|
monitorType: MonitorType;
|
|
@@ -71,6 +75,7 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
71
75
|
metricOptions?: {
|
|
72
76
|
metricAliases: Array<string>;
|
|
73
77
|
};
|
|
78
|
+
translator?: Translator | undefined;
|
|
74
79
|
}): MonitorCriteriaInstance;
|
|
75
80
|
static readonly PROBE_DISCONNECTED_TITLE: string;
|
|
76
81
|
static readonly PROBE_DISCONNECTED_DESCRIPTION: string;
|
|
@@ -2,6 +2,7 @@ import DatabaseProperty from "../Database/DatabaseProperty";
|
|
|
2
2
|
import FilterCondition from "../Filter/FilterCondition";
|
|
3
3
|
import { JSONObject } from "../JSON";
|
|
4
4
|
import ObjectID from "../ObjectID";
|
|
5
|
+
import { Translator } from "../Translator";
|
|
5
6
|
import { CriteriaAlert } from "./CriteriaAlert";
|
|
6
7
|
import { CriteriaFilter } from "./CriteriaFilter";
|
|
7
8
|
import { CriteriaIncident } from "./CriteriaIncident";
|
|
@@ -49,6 +50,7 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
49
50
|
static readonly DEFAULT_LLM_MIN_BAD_ANSWERS: number;
|
|
50
51
|
data: MonitorCriteriaInstanceType | undefined;
|
|
51
52
|
constructor();
|
|
53
|
+
private static getWordsTranslator;
|
|
52
54
|
static getDefaultOnlineMonitorCriteriaInstance(arg: {
|
|
53
55
|
monitorType: MonitorType;
|
|
54
56
|
monitorStatusId: ObjectID;
|
|
@@ -56,11 +58,13 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
56
58
|
metricOptions?: {
|
|
57
59
|
metricAliases: Array<string>;
|
|
58
60
|
};
|
|
61
|
+
translator?: Translator | undefined;
|
|
59
62
|
}): MonitorCriteriaInstance | null;
|
|
60
63
|
static getDefaultWarningMonitorCriteriaInstance(arg: {
|
|
61
64
|
monitorType: MonitorType;
|
|
62
65
|
alertSeverityId: ObjectID;
|
|
63
66
|
monitorName: string;
|
|
67
|
+
translator?: Translator | undefined;
|
|
64
68
|
}): MonitorCriteriaInstance | null;
|
|
65
69
|
static getDefaultOfflineMonitorCriteriaInstance(arg: {
|
|
66
70
|
monitorType: MonitorType;
|
|
@@ -71,6 +75,7 @@ export default class MonitorCriteriaInstance extends DatabaseProperty {
|
|
|
71
75
|
metricOptions?: {
|
|
72
76
|
metricAliases: Array<string>;
|
|
73
77
|
};
|
|
78
|
+
translator?: Translator | undefined;
|
|
74
79
|
}): MonitorCriteriaInstance;
|
|
75
80
|
static readonly PROBE_DISCONNECTED_TITLE: string;
|
|
76
81
|
static readonly PROBE_DISCONNECTED_DESCRIPTION: string;
|