@oneuptime/common 14.0.107 → 14.0.109
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/DatabaseModels/CloudApp.d.mts +5 -0
- package/Models/DatabaseModels/CloudApp.d.ts +5 -0
- package/Models/DatabaseModels/CloudApp.js +112 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +4 -0
- package/Models/DatabaseModels/DataBiConnection.d.ts +4 -0
- package/Models/DatabaseModels/DataBiConnection.js +59 -2
- package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
- package/Models/DatabaseModels/GlobalConfig.js +111 -0
- package/Models/DatabaseModels/Index.js +9 -0
- package/Models/DatabaseModels/Monitor.js +14 -0
- package/Models/DatabaseModels/MonitorStatusTimeline.d.mts +1 -0
- package/Models/DatabaseModels/MonitorStatusTimeline.d.ts +1 -0
- package/Models/DatabaseModels/MonitorStatusTimeline.js +43 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +4 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +4 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +132 -2
- package/Models/DatabaseModels/ProductFeedback.d.mts +11 -0
- package/Models/DatabaseModels/ProductFeedback.d.ts +11 -0
- package/Models/DatabaseModels/ProductFeedback.js +203 -0
- package/Models/DatabaseModels/ProductFeedback.mjs +2 -0
- package/Models/DatabaseModels/Project.d.mts +6 -0
- package/Models/DatabaseModels/Project.d.ts +6 -0
- package/Models/DatabaseModels/Project.js +237 -0
- package/Models/DatabaseModels/ProjectMilestone.d.mts +11 -0
- package/Models/DatabaseModels/ProjectMilestone.d.ts +11 -0
- package/Models/DatabaseModels/ProjectMilestone.js +207 -0
- package/Models/DatabaseModels/ProjectMilestone.mjs +2 -0
- package/Models/DatabaseModels/ProjectUserPreference.d.mts +11 -0
- package/Models/DatabaseModels/ProjectUserPreference.d.ts +11 -0
- package/Models/DatabaseModels/ProjectUserPreference.js +194 -0
- package/Models/DatabaseModels/ProjectUserPreference.mjs +2 -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/RumSessionPin.js +16 -2
- package/Models/DatabaseModels/RumSessionReplayView.js +8 -1
- package/Models/DatabaseModels/SecurityCase.js +8 -1
- package/Models/DatabaseModels/User.d.mts +2 -0
- package/Models/DatabaseModels/User.d.ts +2 -0
- package/Models/DatabaseModels/User.js +52 -0
- package/Models/DatabaseModels/UserOnCallLog.js +32 -4
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +10 -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/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.mts +20 -0
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.d.ts +20 -0
- package/Models/DatabaseModels/WorkspaceUserGroup.js +1 -1
- package/Server/Services/DatabaseService.d.mts +1 -0
- package/Server/Services/DatabaseService.d.ts +1 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.mts +213 -0
- package/Server/Utils/Telemetry/NotificationDeliveryMetrics.d.ts +213 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +4 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +4 -0
- package/Types/AI/AIActionWords.d.mts +167 -7
- package/Types/AI/AIActionWords.d.ts +167 -7
- package/Types/AI/AIActionWords.js +474 -17
- package/Types/AI/AIActionWords.mjs +22 -0
- package/Types/AI/AIChatMessageStatus.js +3 -2
- package/Types/AI/AIChatRecordSeen.d.mts +6 -2
- package/Types/AI/AIChatRecordSeen.d.ts +6 -2
- package/Types/AI/AIChatRecordSeen.js +48 -9
- package/Types/AI/AIChatRecordSeen.mjs +2 -0
- package/Types/AI/AIChatTypes.d.mts +20 -1
- package/Types/AI/AIChatTypes.d.ts +20 -1
- package/Types/AI/AIChatTypes.js +46 -1
- package/Types/AI/AIChatTypes.mjs +3 -0
- package/Types/AI/AIRunAttempt.d.mts +8 -0
- package/Types/AI/AIRunAttempt.d.ts +8 -0
- package/Types/AI/AIRunAttempt.js +60 -6
- package/Types/AI/AIRunAttempt.mjs +3 -0
- package/Types/AI/AISetupActions.d.mts +9 -0
- package/Types/AI/AISetupActions.d.ts +9 -0
- package/Types/AI/AISetupActions.js +56 -0
- package/Types/AI/AISetupActions.mjs +10 -0
- package/Types/AI/CodeTask.d.mts +14 -0
- package/Types/AI/CodeTask.d.ts +14 -0
- package/Types/AI/InvestigationNotStartedReason.d.mts +7 -0
- package/Types/AI/InvestigationNotStartedReason.d.ts +7 -0
- package/Types/AI/RecordAiTokenLimit.d.mts +24 -0
- package/Types/AI/RecordAiTokenLimit.d.ts +24 -0
- package/Types/AI/RecordAiTokenLimit.js +153 -0
- package/Types/AI/RecordAiTokenLimit.mjs +8 -0
- package/Types/Accounts/SignInMessages.d.mts +8 -0
- package/Types/Accounts/SignInMessages.d.ts +8 -0
- package/Types/Accounts/SignInMessages.js +28 -0
- package/Types/Accounts/SignInMessages.mjs +5 -0
- package/Types/Analytics/ActivationMilestone.d.mts +48 -0
- package/Types/Analytics/ActivationMilestone.d.ts +48 -0
- package/Types/Analytics/ActivationMilestone.js +247 -0
- package/Types/Analytics/ActivationMilestone.mjs +16 -0
- package/Types/Analytics/ChecklistProgress.d.mts +11 -0
- package/Types/Analytics/ChecklistProgress.d.ts +11 -0
- package/Types/Analytics/ChecklistProgress.js +32 -0
- package/Types/Analytics/ChecklistProgress.mjs +2 -0
- package/Types/Analytics/ProductEvent.d.mts +61 -0
- package/Types/Analytics/ProductEvent.d.ts +61 -0
- package/Types/Analytics/ProductEvent.js +430 -0
- package/Types/Analytics/ProductEvent.mjs +14 -0
- package/Types/AuditLog/AuditLogAction.d.mts +5 -1
- package/Types/AuditLog/AuditLogAction.d.ts +5 -1
- package/Types/AuditLog/AuditLogAction.js +11 -0
- package/Types/AuditLog/AuditLogActionLabel.d.mts +3 -0
- package/Types/AuditLog/AuditLogActionLabel.d.ts +3 -0
- package/Types/AuditLog/AuditLogActionLabel.js +30 -0
- package/Types/AuditLog/AuditLogActionLabel.mjs +3 -0
- package/Types/AuditLog/AuditLogCoverage.d.mts +2 -1
- package/Types/AuditLog/AuditLogCoverage.d.ts +2 -1
- package/Types/AuditLog/AuditLogCoverage.js +8 -1
- package/Types/AuditLog/AuditLogRetention.js +7 -4
- package/Types/AuditLog/AuditLogSessionEvent.d.mts +45 -0
- package/Types/AuditLog/AuditLogSessionEvent.d.ts +45 -0
- package/Types/AuditLog/AuditLogSessionEvent.js +210 -0
- package/Types/AuditLog/AuditLogSessionEvent.mjs +14 -0
- package/Types/AutoRemediation/RemediationRound.d.mts +4 -0
- package/Types/AutoRemediation/RemediationRound.d.ts +4 -0
- package/Types/AutoRemediation/RemediationRound.js +19 -2
- package/Types/AutoRemediation/RemediationRoundName.d.mts +1 -0
- package/Types/AutoRemediation/RemediationRoundName.d.ts +1 -0
- package/Types/AutoRemediation/RemediationRoundName.js +5 -0
- package/Types/AutoRemediation/RemediationRoundName.mjs +1 -0
- package/Types/Cloud/CloudAppTelemetrySignal.d.mts +9 -0
- package/Types/Cloud/CloudAppTelemetrySignal.d.ts +9 -0
- package/Types/Cloud/CloudAppTelemetrySignal.js +41 -0
- package/Types/Cloud/CloudAppTelemetrySignal.mjs +4 -0
- package/Types/Cloud/CloudPlatform.js +7 -1
- 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 +5 -0
- package/Types/CodeRepository/CodeFileSeen.d.ts +5 -0
- package/Types/CodeRepository/CodeFileSeen.js +142 -27
- package/Types/CustomDomain/CustomDomainDnsCheckResult.d.mts +13 -0
- package/Types/CustomDomain/CustomDomainDnsCheckResult.d.ts +13 -0
- package/Types/CustomDomain/CustomDomainDnsCheckResult.js +80 -0
- package/Types/CustomDomain/CustomDomainDnsCheckResult.mjs +2 -0
- package/Types/CustomDomain/CustomDomainServerReadiness.d.mts +55 -0
- package/Types/CustomDomain/CustomDomainServerReadiness.d.ts +55 -0
- package/Types/CustomDomain/CustomDomainServerReadiness.js +199 -0
- package/Types/CustomDomain/CustomDomainServerReadiness.mjs +8 -0
- package/Types/CustomDomain/DnsRecordCheck.d.mts +34 -0
- package/Types/CustomDomain/DnsRecordCheck.d.ts +34 -0
- package/Types/CustomDomain/DnsRecordCheck.js +175 -0
- package/Types/CustomDomain/DnsRecordCheck.mjs +6 -0
- package/Types/CustomDomain/DnsRecordCheckWords.d.mts +35 -0
- package/Types/CustomDomain/DnsRecordCheckWords.d.ts +35 -0
- package/Types/CustomDomain/DnsRecordCheckWords.js +151 -0
- package/Types/CustomDomain/DnsRecordCheckWords.mjs +5 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.mts +1 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.d.ts +1 -0
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.js +11 -1
- package/Types/CustomNotificationChannel/CustomNotificationChannelPayload.mjs +1 -0
- 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/DataCheckType.d.mts +4 -0
- package/Types/DataObservability/DataCheckType.d.ts +4 -0
- package/Types/DataObservability/DataCheckType.js +17 -0
- package/Types/DataObservability/DataCheckType.mjs +1 -0
- package/Types/DataObservability/DataLineageColumnTrail.d.mts +10 -0
- package/Types/DataObservability/DataLineageColumnTrail.d.ts +10 -0
- package/Types/DataObservability/DataLineageColumnTrail.js +152 -0
- package/Types/DataObservability/DataLineageColumnTrail.mjs +4 -0
- package/Types/DataObservability/DataLineageExpansion.d.mts +29 -0
- package/Types/DataObservability/DataLineageExpansion.d.ts +29 -0
- package/Types/DataObservability/DataLineageExpansion.js +166 -0
- package/Types/DataObservability/DataLineageExpansion.mjs +4 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +8 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +8 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +14 -0
- package/Types/DataObservability/DataTableLineage.d.mts +29 -1
- package/Types/DataObservability/DataTableLineage.d.ts +29 -1
- package/Types/DataObservability/DataTableLineage.js +27 -7
- package/Types/DataObservability/DataTableLineage.mjs +3 -0
- package/Types/Date.d.mts +22 -0
- package/Types/Date.d.ts +22 -0
- package/Types/Date.js +72 -3
- package/Types/DateLanguage.d.mts +7 -0
- package/Types/DateLanguage.d.ts +7 -0
- package/Types/DateLanguage.js +44 -1
- package/Types/DateLanguage.mjs +1 -0
- package/Types/Docs/DocsLanguage.d.mts +2 -0
- package/Types/Docs/DocsLanguage.d.ts +2 -0
- package/Types/Docs/DocsLanguage.js +23 -1
- package/Types/Docs/DocsLanguage.mjs +2 -0
- package/Types/Docs/GlossaryTerm.d.mts +82 -0
- package/Types/Docs/GlossaryTerm.d.ts +82 -0
- package/Types/Docs/GlossaryTerm.js +126 -0
- package/Types/Docs/GlossaryTerm.mjs +5 -0
- package/Types/Email/AmazonSesAuthenticationType.d.mts +23 -0
- package/Types/Email/AmazonSesAuthenticationType.d.ts +23 -0
- package/Types/Email/AmazonSesAuthenticationType.js +40 -0
- package/Types/Email/AmazonSesAuthenticationType.mjs +4 -0
- package/Types/Email/EmailServer.d.mts +2 -0
- package/Types/Email/EmailServer.d.ts +2 -0
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Exception/BadDataExceptionWithDetails.d.mts +6 -0
- package/Types/Exception/BadDataExceptionWithDetails.d.ts +6 -0
- package/Types/Exception/BadDataExceptionWithDetails.js +20 -0
- package/Types/Exception/BadDataExceptionWithDetails.mjs +2 -0
- package/Types/Exception/ErrorMessageRule.d.mts +4 -0
- package/Types/Exception/ErrorMessageRule.d.ts +4 -0
- package/Types/Exception/ErrorMessageRule.js +143 -0
- package/Types/Exception/ErrorMessageRule.mjs +5 -0
- package/Types/Exception/UnexplainedError.d.mts +45 -0
- package/Types/Exception/UnexplainedError.d.ts +45 -0
- package/Types/Exception/UnexplainedError.js +179 -0
- package/Types/Exception/UnexplainedError.mjs +11 -0
- package/Types/HashedString.js +9 -2
- package/Types/Icon/IconProp.d.mts +4 -1
- package/Types/Icon/IconProp.d.ts +4 -1
- package/Types/Icon/IconProp.js +6 -0
- package/Types/InstallationHealth/InstallationHealth.d.mts +122 -0
- package/Types/InstallationHealth/InstallationHealth.d.ts +122 -0
- package/Types/InstallationHealth/InstallationHealth.js +513 -0
- package/Types/InstallationHealth/InstallationHealth.mjs +13 -0
- package/Types/LLM/LLMProviderExchange.d.mts +17 -0
- package/Types/LLM/LLMProviderExchange.d.ts +17 -0
- package/Types/LLM/LLMProviderExchange.js +70 -0
- package/Types/LLM/LLMProviderExchange.mjs +5 -0
- package/Types/Monitor/CriteriaFilter.d.mts +1 -0
- package/Types/Monitor/CriteriaFilter.d.ts +1 -0
- package/Types/Monitor/CriteriaFilter.js +3 -1
- package/Types/Monitor/CriteriaFilterTerms.js +1 -0
- package/Types/Monitor/CriteriaFilterValues.d.mts +18 -0
- package/Types/Monitor/CriteriaFilterValues.d.ts +18 -0
- package/Types/Monitor/CriteriaFilterValues.js +346 -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 +1 -0
- package/Types/Monitor/EvaluationSentence.d.ts +1 -0
- package/Types/Monitor/EvaluationSentence.js +34 -3
- package/Types/Monitor/EvaluationSentence.mjs +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.mts +1 -0
- package/Types/Monitor/IncomingEmailMonitor/IncomingEmailMonitorRequest.d.ts +1 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +22 -2
- 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/RetiredEvaluationTemplates.d.mts +2 -0
- package/Types/Monitor/RetiredEvaluationTemplates.d.ts +2 -0
- package/Types/Monitor/RetiredEvaluationTemplates.js +95 -0
- package/Types/Monitor/RetiredEvaluationTemplates.mjs +3 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.mts +6 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.d.ts +6 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.js +20 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationCheckMethod.mjs +2 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.mts +6 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.d.ts +6 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.js +29 -0
- package/Types/Monitor/SSLMonitor/CertificateRevocationStatus.mjs +2 -0
- package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.mts +7 -0
- package/Types/Monitor/SSLMonitor/SslMonitorResponse.d.ts +7 -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/WhoIsTold.d.mts +165 -0
- package/Types/Monitor/WhoIsTold.d.ts +165 -0
- package/Types/Monitor/WhoIsTold.js +582 -0
- package/Types/Monitor/WhoIsTold.mjs +17 -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/OnCallDutyPolicyRunWait.d.mts +6 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.d.ts +6 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.js +34 -0
- package/Types/OnCallDutyPolicy/OnCallDutyPolicyRunWait.mjs +2 -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/OnCallTestPage.d.mts +240 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +240 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +574 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +52 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.mts +31 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageWords.d.ts +31 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageWords.js +105 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageWords.mjs +14 -0
- package/Types/PhoneNumberDirection.d.mts +6 -0
- package/Types/PhoneNumberDirection.d.ts +6 -0
- package/Types/PhoneNumberDirection.js +123 -0
- package/Types/PhoneNumberDirection.mjs +6 -0
- package/Types/Probe/ProbeMonitorResponse.d.mts +1 -0
- package/Types/Probe/ProbeMonitorResponse.d.ts +1 -0
- package/Types/Product/ProductKey.d.mts +58 -0
- package/Types/Product/ProductKey.d.ts +58 -0
- package/Types/Product/ProductKey.js +175 -0
- package/Types/Product/ProductKey.mjs +8 -0
- package/Types/Product/ProductPins.d.mts +10 -0
- package/Types/Product/ProductPins.d.ts +10 -0
- package/Types/Product/ProductPins.js +65 -0
- package/Types/Product/ProductPins.mjs +6 -0
- package/Types/Product/ProductUsage.d.mts +21 -0
- package/Types/Product/ProductUsage.d.ts +21 -0
- package/Types/Product/ProductUsage.js +175 -0
- package/Types/Product/ProductUsage.mjs +10 -0
- package/Types/Product/ProjectProducts.d.mts +60 -0
- package/Types/Product/ProjectProducts.d.ts +60 -0
- package/Types/Product/ProjectProducts.js +336 -0
- package/Types/Product/ProjectProducts.mjs +19 -0
- package/Types/Product/ProjectProductsAnswer.d.mts +20 -0
- package/Types/Product/ProjectProductsAnswer.d.ts +20 -0
- package/Types/Product/ProjectProductsAnswer.js +139 -0
- package/Types/Product/ProjectProductsAnswer.mjs +7 -0
- package/Types/ProductFeedback/NewGitHubIssue.d.mts +12 -0
- package/Types/ProductFeedback/NewGitHubIssue.d.ts +12 -0
- package/Types/ProductFeedback/NewGitHubIssue.js +64 -0
- package/Types/ProductFeedback/NewGitHubIssue.mjs +5 -0
- package/Types/ProductFeedback/ProductFeedback.d.mts +140 -0
- package/Types/ProductFeedback/ProductFeedback.d.ts +140 -0
- package/Types/ProductFeedback/ProductFeedback.js +517 -0
- package/Types/ProductFeedback/ProductFeedback.mjs +49 -0
- package/Types/ReadingDirection.d.mts +4 -0
- package/Types/ReadingDirection.d.ts +4 -0
- package/Types/ReadingDirection.js +303 -26
- package/Types/ReadingDirection.mjs +4 -0
- package/Types/Recommendation/RecommendationType.d.mts +2 -1
- package/Types/Recommendation/RecommendationType.d.ts +2 -1
- package/Types/Recommendation/RecommendationType.js +6 -0
- package/Types/Reminder/ReminderInterval.d.mts +7 -0
- package/Types/Reminder/ReminderInterval.d.ts +7 -0
- package/Types/Reminder/ReminderInterval.js +110 -0
- package/Types/Reminder/ReminderInterval.mjs +8 -0
- package/Types/Retention/ResolvedRecordRetention.d.mts +19 -0
- package/Types/Retention/ResolvedRecordRetention.d.ts +19 -0
- package/Types/Retention/ResolvedRecordRetention.js +124 -0
- package/Types/Retention/ResolvedRecordRetention.mjs +14 -0
- package/Types/RollingTime/RollingTimeUtil.d.mts +8 -0
- package/Types/RollingTime/RollingTimeUtil.d.ts +8 -0
- package/Types/RollingTime/RollingTimeUtil.js +249 -71
- 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/SecurityEvent/Connectors/SecurityEventConnectorCatalog.js +116 -108
- package/Types/ServerSending/ServerSendingStatus.d.mts +69 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +69 -0
- package/Types/ServerSending/ServerSendingStatus.js +281 -0
- package/Types/ServerSending/ServerSendingStatus.mjs +7 -0
- package/Types/ServerSending/ServerSendingWords.d.mts +9 -0
- package/Types/ServerSending/ServerSendingWords.d.ts +9 -0
- package/Types/ServerSending/ServerSendingWords.js +95 -0
- package/Types/ServerSending/ServerSendingWords.mjs +7 -0
- package/Types/ServerSetup/ServerSetupChecklist.d.mts +172 -0
- package/Types/ServerSetup/ServerSetupChecklist.d.ts +172 -0
- package/Types/ServerSetup/ServerSetupChecklist.js +735 -0
- package/Types/ServerSetup/ServerSetupChecklist.mjs +12 -0
- package/Types/ServerSetup/ServerTestSend.d.mts +35 -0
- package/Types/ServerSetup/ServerTestSend.d.ts +35 -0
- package/Types/ServerSetup/ServerTestSend.js +160 -0
- package/Types/ServerSetup/ServerTestSend.mjs +10 -0
- package/Types/SetupHealth/SetupHealth.d.mts +283 -0
- package/Types/SetupHealth/SetupHealth.d.ts +283 -0
- package/Types/SetupHealth/SetupHealth.js +1047 -0
- package/Types/SetupHealth/SetupHealth.mjs +46 -0
- package/Types/StatusPage/StatusPageSummary.d.mts +1 -0
- package/Types/StatusPage/StatusPageSummary.d.ts +1 -0
- package/Types/StatusPage/StatusPageSummary.js +3 -0
- package/Types/StatusPage/UptimeDailyAggregate.d.mts +25 -0
- package/Types/StatusPage/UptimeDailyAggregate.d.ts +25 -0
- package/Types/Telemetry/LlmCallKind.js +1 -1
- 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/TelemetryIngestionBudget.d.mts +1 -0
- package/Types/Telemetry/TelemetryIngestionBudget.d.ts +1 -0
- package/Types/Telemetry/TelemetryIngestionBudget.js +135 -2
- package/Types/Telemetry/TelemetryIngestionBudget.mjs +1 -0
- package/Types/ToolImport/ToolImportCatalog.d.mts +1 -0
- package/Types/ToolImport/ToolImportCatalog.d.ts +1 -0
- package/Types/ToolImport/ToolImportCatalog.js +54 -1
- package/Types/ToolImport/ToolImportCatalog.mjs +1 -0
- package/Types/Translator.js +64 -31
- package/Types/UserNotification/UserNotificationEventType.d.mts +2 -1
- package/Types/UserNotification/UserNotificationEventType.d.ts +2 -1
- package/Types/UserNotification/UserNotificationEventType.js +7 -0
- package/Types/UserSession/SessionEndCause.d.mts +17 -0
- package/Types/UserSession/SessionEndCause.d.ts +17 -0
- package/Types/UserSession/SessionEndCause.js +79 -0
- package/Types/UserSession/SessionEndCause.mjs +6 -0
- package/Types/UserSession/SessionSignIn.d.mts +44 -0
- package/Types/UserSession/SessionSignIn.d.ts +44 -0
- package/Types/UserSession/SessionSignIn.js +174 -0
- package/Types/UserSession/SessionSignIn.mjs +17 -0
- package/Types/WelcomeChecklist/ProjectGoal.d.mts +16 -0
- package/Types/WelcomeChecklist/ProjectGoal.d.ts +16 -0
- package/Types/WelcomeChecklist/ProjectGoal.js +94 -0
- package/Types/WelcomeChecklist/ProjectGoal.mjs +8 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +76 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +76 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +344 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +19 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +24 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +24 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +136 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.mjs +9 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.d.mts +27 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.d.ts +27 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.js +183 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.mjs +13 -0
- package/Types/Workflow/Documentation/AIDocumentation.js +1 -1
- package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.mts +7 -0
- package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.d.ts +7 -0
- package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.js +40 -0
- package/Types/Workspace/NotificationSummary/WorkspaceSummaryTestChannel.mjs +3 -0
- package/Types/Workspace/WorkspaceChannelMembers.d.mts +1 -0
- package/Types/Workspace/WorkspaceChannelMembers.d.ts +1 -0
- package/Types/Workspace/WorkspaceChannelMembers.js +9 -2
- package/UI/Components/Dropdown/Dropdown.d.mts +1 -0
- package/UI/Components/Dropdown/Dropdown.d.ts +1 -0
- package/Utils/API.js +10 -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/DashboardWidgetSorts.js +25 -4
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +37 -0
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +37 -0
- package/Utils/Dashboard/MonitorListWidgetFormat.js +86 -0
- package/Utils/Dashboard/MonitorListWidgetFormat.mjs +10 -0
- package/Utils/GuidedSetup/OnCallPolicyRecords.d.mts +31 -0
- package/Utils/GuidedSetup/OnCallPolicyRecords.d.ts +31 -0
- package/Utils/GuidedSetup/OnCallPolicyRecords.js +89 -0
- package/Utils/GuidedSetup/OnCallPolicyRecords.mjs +6 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +36 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +36 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +105 -0
- package/Utils/GuidedSetup/StatusPageRecords.mjs +6 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.d.mts +41 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.d.ts +41 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +204 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.mjs +9 -0
- package/Utils/Markdown/InlineImageDataUri.d.mts +9 -0
- package/Utils/Markdown/InlineImageDataUri.d.ts +9 -0
- package/Utils/Markdown/InlineImageDataUri.js +17 -1
- package/Utils/Markdown/InlineImageDataUri.mjs +1 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +12 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +12 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +539 -0
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +4 -0
- package/Utils/Metrics/MetricQueryCloudAggregation.js +2 -4
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +9 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +9 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +77 -8
- package/Utils/Monitor/ExternalStatusPageReading.mjs +3 -0
- package/Utils/Monitor/ExternalStatusPageScope.js +17 -1
- package/Utils/Monitor/MonitorDestinationUtil.js +2 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +2 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +2 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +10 -1
- package/Utils/Monitor/MonitorRootCauseWording.js +28 -24
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +1 -0
- package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +1 -0
- package/Utils/Monitor/MonitorStatusHistoryUtil.js +1 -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/MonitorSummaryProbeUtil.d.mts +2 -0
- package/Utils/Monitor/MonitorSummaryProbeUtil.d.ts +2 -0
- package/Utils/Monitor/MonitorSummaryProbeUtil.js +13 -17
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +5 -3
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +1 -1
- package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +1 -1
- package/Utils/Monitor/MonitorUptimeSummaryUtil.js +1 -0
- package/Utils/Monitor/MonitoringOff.d.mts +20 -0
- package/Utils/Monitor/MonitoringOff.d.ts +20 -0
- package/Utils/Monitor/MonitoringOff.js +81 -0
- package/Utils/Monitor/MonitoringOff.mjs +4 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.js +9 -7
- package/Utils/Monitor/StateChangeLogScreenshots.d.mts +8 -0
- package/Utils/Monitor/StateChangeLogScreenshots.d.ts +8 -0
- package/Utils/Monitor/StateChangeLogScreenshots.js +116 -0
- package/Utils/Monitor/StateChangeLogScreenshots.mjs +3 -0
- package/Utils/NetworkDevice/Naming/NamingLookup.d.mts +1 -1
- package/Utils/NetworkDevice/Naming/NamingLookup.d.ts +1 -1
- package/Utils/NetworkDevice/Naming/NamingLookup.js +14 -4
- package/Utils/NetworkDevice/Naming/NamingLookup.mjs +1 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +2 -1
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +2 -1
- package/Utils/Slo/SloErrorBudgetPolicy.js +8 -2
- package/Utils/Slo/SloListWidgetFormat.d.mts +7 -1
- package/Utils/Slo/SloListWidgetFormat.d.ts +7 -1
- package/Utils/Slo/SloListWidgetFormat.js +20 -26
- package/Utils/Slo/SloOverviewText.d.mts +6 -1
- package/Utils/Slo/SloOverviewText.d.ts +6 -1
- package/Utils/Slo/SloOverviewText.js +3 -3
- 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/Slo/SloUtil.d.mts +18 -9
- package/Utils/Slo/SloUtil.d.ts +18 -9
- package/Utils/Slo/SloUtil.js +47 -10
- package/Utils/Slo/SloWidgetFormat.d.mts +69 -11
- package/Utils/Slo/SloWidgetFormat.d.ts +69 -11
- package/Utils/Slo/SloWidgetFormat.js +198 -50
- package/Utils/Slo/SloWidgetFormat.mjs +7 -0
- package/Utils/StatusPage/FrozenMonitorResources.d.mts +41 -0
- package/Utils/StatusPage/FrozenMonitorResources.d.ts +41 -0
- package/Utils/StatusPage/FrozenMonitorResources.js +155 -0
- package/Utils/StatusPage/FrozenMonitorResources.mjs +4 -0
- package/Utils/StatusPage/GroupNestingLayout.d.mts +2 -0
- package/Utils/StatusPage/GroupNestingLayout.d.ts +2 -0
- package/Utils/StatusPage/GroupNestingLayout.js +12 -0
- package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.mts +48 -0
- package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.d.ts +48 -0
- package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.js +181 -0
- package/Utils/StatusPage/MonitorGroupUptimeDailyAggregateUtil.mjs +2 -0
- package/Utils/StatusPage/ResourceExplorer.d.mts +1 -10
- package/Utils/StatusPage/ResourceExplorer.d.ts +1 -10
- package/Utils/StatusPage/ResourceExplorer.js +11 -29
- package/Utils/StatusPage/ResourceUptime.d.mts +6 -1
- package/Utils/StatusPage/ResourceUptime.d.ts +6 -1
- package/Utils/StatusPage/ResourceUptime.js +31 -6
- package/Utils/StatusPage/StatusPageSummaryBuilder.d.mts +1 -0
- package/Utils/StatusPage/StatusPageSummaryBuilder.d.ts +1 -0
- package/Utils/StatusPage/StatusPageSummaryBuilder.js +12 -1
- package/Utils/StatusPage/StatusPageUptimeTimezone.d.mts +41 -0
- package/Utils/StatusPage/StatusPageUptimeTimezone.d.ts +41 -0
- package/Utils/StatusPage/StatusPageUptimeTimezone.js +114 -0
- package/Utils/StatusPage/StatusPageUptimeTimezone.mjs +2 -0
- package/Utils/StatusPage/UptimeDailyAggregateUtil.d.mts +3 -1
- package/Utils/StatusPage/UptimeDailyAggregateUtil.d.ts +3 -1
- package/Utils/StatusPage/UptimeDailyAggregateUtil.js +69 -50
- package/Utils/Telemetry/CloudInstanceIdentity.js +12 -7
- package/Utils/Uptime/DayUptimeGraphUtil.d.mts +8 -0
- package/Utils/Uptime/DayUptimeGraphUtil.d.ts +8 -0
- package/Utils/Uptime/DayUptimeGraphUtil.js +41 -6
- package/Utils/Uptime/UptimeMaintenanceUtil.d.mts +3 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.d.ts +3 -0
- package/Utils/Uptime/UptimeMaintenanceUtil.js +49 -0
- package/Utils/Uptime/UptimeUtil.d.mts +38 -1
- package/Utils/Uptime/UptimeUtil.d.ts +38 -1
- package/Utils/Uptime/UptimeUtil.js +270 -75
- package/Utils/Uptime/WorstStatusTimeline.d.mts +31 -0
- package/Utils/Uptime/WorstStatusTimeline.d.ts +31 -0
- package/Utils/Uptime/WorstStatusTimeline.js +190 -0
- package/Utils/Uptime/WorstStatusTimeline.mjs +2 -0
- package/Utils/Workspace/WorkspaceSummarySetup.d.mts +25 -0
- package/Utils/Workspace/WorkspaceSummarySetup.d.ts +25 -0
- package/Utils/Workspace/WorkspaceSummarySetup.js +215 -0
- package/Utils/Workspace/WorkspaceSummarySetup.mjs +11 -0
- package/package.json +1 -1
- package/Utils/StatusPage/ArchivedMonitorResources.d.mts +0 -10
- package/Utils/StatusPage/ArchivedMonitorResources.d.ts +0 -10
- package/Utils/StatusPage/ArchivedMonitorResources.js +0 -33
- package/Utils/StatusPage/ArchivedMonitorResources.mjs +0 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* HOW LONG A RESOLVED INCIDENT OR ALERT IS KEPT (OneUptime issue #6903).
|
|
4
|
+
*
|
|
5
|
+
* Incidents and alerts used to stay in the database for good, with all they
|
|
6
|
+
* carry: their state timelines, feeds, notes, notification logs - and, for a
|
|
7
|
+
* synthetic monitor's, the screenshots of the check that opened and closed
|
|
8
|
+
* them. A project now chooses how long a resolved one stays
|
|
9
|
+
* (Project.incidentRetentionInDays, Project.alertRetentionInDays, set by a
|
|
10
|
+
* Project Owner or Admin on Incidents -> Settings -> Data Retention and Alerts
|
|
11
|
+
* -> Settings -> Data Retention). The Workers jobs
|
|
12
|
+
* Incident:DeleteResolvedIncidents and Alert:DeleteResolvedAlerts delete the
|
|
13
|
+
* ones resolved for longer, through Server/Utils/Retention/ResolvedRecordRetention,
|
|
14
|
+
* which says what stays however old it is.
|
|
15
|
+
*
|
|
16
|
+
* Every project starts at 0 - every incident and alert stays, as before - so
|
|
17
|
+
* an upgrade deletes nothing until someone picks a length. The lengths are a
|
|
18
|
+
* short list, as a polling interval's are, from a month - longer than a
|
|
19
|
+
* status page's incident history shows by default (14 days) - to three
|
|
20
|
+
* years.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.DEFAULT_KEEP_INCIDENTS_WITH_COMPLETED_POSTMORTEM = exports.MIN_RESOLVED_RECORD_RETENTION_IN_DAYS = exports.DEFAULT_RESOLVED_RECORD_RETENTION_IN_DAYS = exports.KEEP_EVERY_RESOLVED_RECORD = exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS = exports.ResolvedRecordKind = void 0;
|
|
24
|
+
exports.getResolvedRecordRetentionRefusal = getResolvedRecordRetentionRefusal;
|
|
25
|
+
exports.isResolvedRecordRetentionInDays = isResolvedRecordRetentionInDays;
|
|
26
|
+
exports.getResolvedRecordRetentionProblem = getResolvedRecordRetentionProblem;
|
|
27
|
+
exports.toResolvedRecordRetentionInDays = toResolvedRecordRetentionInDays;
|
|
28
|
+
exports.readResolvedRecordRetentionInDays = readResolvedRecordRetentionInDays;
|
|
29
|
+
exports.isResolvedRecordRetentionOn = isResolvedRecordRetentionOn;
|
|
30
|
+
exports.doesResolvedRecordRetentionDeleteMore = doesResolvedRecordRetentionDeleteMore;
|
|
31
|
+
// What a retention is about: incidents (and their episodes) or alerts (and theirs).
|
|
32
|
+
var ResolvedRecordKind;
|
|
33
|
+
(function (ResolvedRecordKind) {
|
|
34
|
+
ResolvedRecordKind["Incident"] = "Incident";
|
|
35
|
+
ResolvedRecordKind["Alert"] = "Alert";
|
|
36
|
+
})(ResolvedRecordKind || (exports.ResolvedRecordKind = ResolvedRecordKind = {}));
|
|
37
|
+
exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS = [30, 60, 90, 180, 365, 730, 1095];
|
|
38
|
+
// The setting's value for "Never": every resolved record stays.
|
|
39
|
+
exports.KEEP_EVERY_RESOLVED_RECORD = 0;
|
|
40
|
+
// Where every project starts: nothing is deleted until someone picks a length.
|
|
41
|
+
exports.DEFAULT_RESOLVED_RECORD_RETENTION_IN_DAYS = exports.KEEP_EVERY_RESOLVED_RECORD;
|
|
42
|
+
// The shortest a project may keep a resolved incident or alert.
|
|
43
|
+
exports.MIN_RESOLVED_RECORD_RETENTION_IN_DAYS = exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS[0];
|
|
44
|
+
/*
|
|
45
|
+
* Whether an incident whose postmortem is completed stays however long ago it
|
|
46
|
+
* was resolved (Project.keepIncidentsWithCompletedPostmortem): on unless a
|
|
47
|
+
* Project Owner or Admin turns it off - a written-up incident is the one a
|
|
48
|
+
* team comes back to.
|
|
49
|
+
*/
|
|
50
|
+
exports.DEFAULT_KEEP_INCIDENTS_WITH_COMPLETED_POSTMORTEM = true;
|
|
51
|
+
// "30, 60, 90, 180, 365, 730 or 1095": the choices as a sentence says them.
|
|
52
|
+
const RETENTION_CHOICES_TEXT = `${exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS.slice(0, -1).join(", ")} or ${exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS[exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS.length - 1]}`;
|
|
53
|
+
// What a refused value is answered with, for the kind it was written for.
|
|
54
|
+
function getResolvedRecordRetentionRefusal(kind) {
|
|
55
|
+
const noun = kind === ResolvedRecordKind.Incident ? "incident" : "alert";
|
|
56
|
+
return `Pick how long a resolved ${noun} is kept: ${RETENTION_CHOICES_TEXT} days, or ${exports.KEEP_EVERY_RESOLVED_RECORD} to keep every ${noun}.`;
|
|
57
|
+
}
|
|
58
|
+
// Whether a value is one the setting takes: a choice, or 0 for never.
|
|
59
|
+
function isResolvedRecordRetentionInDays(value) {
|
|
60
|
+
return (typeof value === "number" &&
|
|
61
|
+
(value === exports.KEEP_EVERY_RESOLVED_RECORD ||
|
|
62
|
+
exports.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS.includes(value)));
|
|
63
|
+
}
|
|
64
|
+
/*
|
|
65
|
+
* What is wrong with a value written to the setting, or null when it is one
|
|
66
|
+
* of the choices or 0. A whole number written as text ("90") is read as the
|
|
67
|
+
* number; nothing else is: the column is never left empty, so null is
|
|
68
|
+
* refused too, and a number that is not a choice is a mistake, not a
|
|
69
|
+
* default - a typo must never delete more than was meant.
|
|
70
|
+
*/
|
|
71
|
+
function getResolvedRecordRetentionProblem(value, kind) {
|
|
72
|
+
return isResolvedRecordRetentionInDays(toNumber(value))
|
|
73
|
+
? null
|
|
74
|
+
: getResolvedRecordRetentionRefusal(kind);
|
|
75
|
+
}
|
|
76
|
+
/*
|
|
77
|
+
* The value as the column stores it. Call getResolvedRecordRetentionProblem
|
|
78
|
+
* first: anything else reads as the default, which deletes nothing.
|
|
79
|
+
*/
|
|
80
|
+
function toResolvedRecordRetentionInDays(value) {
|
|
81
|
+
const days = toNumber(value);
|
|
82
|
+
return isResolvedRecordRetentionInDays(days)
|
|
83
|
+
? days
|
|
84
|
+
: exports.DEFAULT_RESOLVED_RECORD_RETENTION_IN_DAYS;
|
|
85
|
+
}
|
|
86
|
+
/*
|
|
87
|
+
* The setting as a reader of a response or a row takes it: one of the
|
|
88
|
+
* choices, 0 for never, or undefined when it is missing or not one of them -
|
|
89
|
+
* then nothing is said about it, and nothing is deleted by it.
|
|
90
|
+
*/
|
|
91
|
+
function readResolvedRecordRetentionInDays(value) {
|
|
92
|
+
const days = toNumber(value);
|
|
93
|
+
return isResolvedRecordRetentionInDays(days) ? days : undefined;
|
|
94
|
+
}
|
|
95
|
+
// Whether resolved records are deleted at all with this setting.
|
|
96
|
+
function isResolvedRecordRetentionOn(days) {
|
|
97
|
+
return days !== exports.KEEP_EVERY_RESOLVED_RECORD;
|
|
98
|
+
}
|
|
99
|
+
/*
|
|
100
|
+
* Whether moving the setting from `from` to `to` deletes records `from` kept:
|
|
101
|
+
* turning it on, or shortening it. The setting asks before such a move, as
|
|
102
|
+
* what it deletes cannot be brought back; lengthening it or turning it off
|
|
103
|
+
* deletes nothing.
|
|
104
|
+
*/
|
|
105
|
+
function doesResolvedRecordRetentionDeleteMore(data) {
|
|
106
|
+
if (!isResolvedRecordRetentionOn(data.to)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (!isResolvedRecordRetentionOn(data.from)) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return data.to < data.from;
|
|
113
|
+
}
|
|
114
|
+
// Days as a form or an API client may send them: as text.
|
|
115
|
+
const DAYS_AS_TEXT = /^\d{1,4}$/;
|
|
116
|
+
function toNumber(value) {
|
|
117
|
+
if (typeof value === "number") {
|
|
118
|
+
return Number.isFinite(value) ? value : null;
|
|
119
|
+
}
|
|
120
|
+
if (typeof value === "string" && DAYS_AS_TEXT.test(value.trim())) {
|
|
121
|
+
return Number(value.trim());
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import commonJsModule from "./ResolvedRecordRetention.js";
|
|
2
|
+
export const DEFAULT_KEEP_INCIDENTS_WITH_COMPLETED_POSTMORTEM = commonJsModule.DEFAULT_KEEP_INCIDENTS_WITH_COMPLETED_POSTMORTEM;
|
|
3
|
+
export const DEFAULT_RESOLVED_RECORD_RETENTION_IN_DAYS = commonJsModule.DEFAULT_RESOLVED_RECORD_RETENTION_IN_DAYS;
|
|
4
|
+
export const KEEP_EVERY_RESOLVED_RECORD = commonJsModule.KEEP_EVERY_RESOLVED_RECORD;
|
|
5
|
+
export const MIN_RESOLVED_RECORD_RETENTION_IN_DAYS = commonJsModule.MIN_RESOLVED_RECORD_RETENTION_IN_DAYS;
|
|
6
|
+
export const RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS = commonJsModule.RESOLVED_RECORD_RETENTION_CHOICES_IN_DAYS;
|
|
7
|
+
export const ResolvedRecordKind = commonJsModule.ResolvedRecordKind;
|
|
8
|
+
export const doesResolvedRecordRetentionDeleteMore = commonJsModule.doesResolvedRecordRetentionDeleteMore;
|
|
9
|
+
export const getResolvedRecordRetentionProblem = commonJsModule.getResolvedRecordRetentionProblem;
|
|
10
|
+
export const getResolvedRecordRetentionRefusal = commonJsModule.getResolvedRecordRetentionRefusal;
|
|
11
|
+
export const isResolvedRecordRetentionInDays = commonJsModule.isResolvedRecordRetentionInDays;
|
|
12
|
+
export const isResolvedRecordRetentionOn = commonJsModule.isResolvedRecordRetentionOn;
|
|
13
|
+
export const readResolvedRecordRetentionInDays = commonJsModule.readResolvedRecordRetentionInDays;
|
|
14
|
+
export const toResolvedRecordRetentionInDays = commonJsModule.toResolvedRecordRetentionInDays;
|
|
@@ -2,6 +2,14 @@ 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 getUnitsRead(): Array<string>;
|
|
10
|
+
static getValuesText(): string;
|
|
5
11
|
static convertToStartAndEndDate(rollingTime: RollingTime, endDate?: Date): InBetween<Date>;
|
|
6
12
|
static getWindowInMs(rollingTime: RollingTime): number;
|
|
13
|
+
private static readIso8601Duration;
|
|
14
|
+
private static readLengthInWords;
|
|
7
15
|
}
|
|
@@ -2,6 +2,14 @@ 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 getUnitsRead(): Array<string>;
|
|
10
|
+
static getValuesText(): string;
|
|
5
11
|
static convertToStartAndEndDate(rollingTime: RollingTime, endDate?: Date): InBetween<Date>;
|
|
6
12
|
static getWindowInMs(rollingTime: RollingTime): number;
|
|
13
|
+
private static readIso8601Duration;
|
|
14
|
+
private static readLengthInWords;
|
|
7
15
|
}
|
|
@@ -6,94 +6,272 @@ 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);
|
|
34
|
-
}
|
|
35
|
-
if (rollingTime === RollingTime_1.default.Past1Hour) {
|
|
36
|
-
startDate = Date_1.default.addRemoveHours(endDate, -1);
|
|
142
|
+
static fromValue(value) {
|
|
143
|
+
var _a;
|
|
144
|
+
if (RollingTimeUtil.isRollingTime(value)) {
|
|
145
|
+
return value;
|
|
37
146
|
}
|
|
38
|
-
if (
|
|
39
|
-
|
|
147
|
+
if (typeof value !== "string") {
|
|
148
|
+
return null;
|
|
40
149
|
}
|
|
41
|
-
|
|
42
|
-
|
|
150
|
+
const trimmed = value.trim();
|
|
151
|
+
if (trimmed.length === 0 || trimmed.length > MAX_LENGTH_TEXT_LENGTH) {
|
|
152
|
+
return null;
|
|
43
153
|
}
|
|
44
|
-
|
|
45
|
-
|
|
154
|
+
const text = trimmed
|
|
155
|
+
.toLowerCase()
|
|
156
|
+
.replace(/[\s_-]+/g, " ")
|
|
157
|
+
.trim();
|
|
158
|
+
if (text === KEY_NAME_THAT_SAYS_ANOTHER_LENGTH) {
|
|
159
|
+
return null;
|
|
46
160
|
}
|
|
47
|
-
|
|
48
|
-
|
|
161
|
+
const lengthInSeconds = (_a = RollingTimeUtil.readIso8601Duration(text)) !== null && _a !== void 0 ? _a : RollingTimeUtil.readLengthInWords(text);
|
|
162
|
+
if (lengthInSeconds === null) {
|
|
163
|
+
return null;
|
|
49
164
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
+
* Each unit a length is read in: "s", "min", "minutes", "h", "wk" and so
|
|
186
|
+
* on. For a reader that must read lengths exactly as this one does - the
|
|
187
|
+
* Terraform provider's, which is checked against cases built from these
|
|
188
|
+
* (Scripts/TerraformProvider/Core/MonitorStepsValuesCases.ts).
|
|
189
|
+
*/
|
|
190
|
+
static getUnitsRead() {
|
|
191
|
+
return Object.keys(UNIT_IN_SECONDS);
|
|
192
|
+
}
|
|
193
|
+
/*
|
|
194
|
+
* Every rolling time, quoted and listed for a sentence: "Past 1 Minute",
|
|
195
|
+
* "Past 5 Minutes", ... or "Past 365 Days".
|
|
196
|
+
*/
|
|
197
|
+
static getValuesText() {
|
|
198
|
+
const quoted = ROLLING_TIMES.map((rollingTime) => {
|
|
199
|
+
return `"${rollingTime}"`;
|
|
200
|
+
});
|
|
201
|
+
return `${quoted.slice(0, -1).join(", ")} or ${quoted[quoted.length - 1]}`;
|
|
202
|
+
}
|
|
203
|
+
/*
|
|
204
|
+
* The window a rolling time covers, ending now - or at `endDate` when a
|
|
205
|
+
* caller needs it to end earlier (a telemetry check while OneUptime's
|
|
206
|
+
* ingest queue is behind, issue #2825). A value that is no rolling time
|
|
207
|
+
* covers the default's window (fromValueOrDefault), never one of no
|
|
208
|
+
* length.
|
|
209
|
+
*/
|
|
210
|
+
static convertToStartAndEndDate(rollingTime, endDate = Date_1.default.getCurrentDate()) {
|
|
211
|
+
const startDate = Date_1.default.addRemoveMinutes(endDate, -WINDOW_IN_MINUTES[RollingTimeUtil.fromValueOrDefault(rollingTime)]);
|
|
212
|
+
return new InBetween_1.default(startDate, endDate);
|
|
213
|
+
}
|
|
214
|
+
// How long a rolling time's window is, in milliseconds.
|
|
215
|
+
static getWindowInMs(rollingTime) {
|
|
216
|
+
return (WINDOW_IN_MINUTES[RollingTimeUtil.fromValueOrDefault(rollingTime)] *
|
|
217
|
+
60 *
|
|
218
|
+
1000);
|
|
219
|
+
}
|
|
220
|
+
static readIso8601Duration(text) {
|
|
221
|
+
const match = ISO_8601_DURATION.exec(text);
|
|
222
|
+
if (!match) {
|
|
223
|
+
return null;
|
|
77
224
|
}
|
|
78
|
-
|
|
79
|
-
|
|
225
|
+
// Weeks, days, hours, minutes and seconds, in the order they are written.
|
|
226
|
+
const partUnits = [
|
|
227
|
+
UNIT_IN_SECONDS["week"],
|
|
228
|
+
UNIT_IN_SECONDS["day"],
|
|
229
|
+
UNIT_IN_SECONDS["hour"],
|
|
230
|
+
UNIT_IN_SECONDS["minute"],
|
|
231
|
+
UNIT_IN_SECONDS["second"],
|
|
232
|
+
];
|
|
233
|
+
let lengthInSeconds = 0;
|
|
234
|
+
let hasPart = false;
|
|
235
|
+
partUnits.forEach((unitInSeconds, index) => {
|
|
236
|
+
const part = match[index + 1];
|
|
237
|
+
if (part !== undefined) {
|
|
238
|
+
hasPart = true;
|
|
239
|
+
lengthInSeconds += Number(part) * unitInSeconds;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
// "P" or "PT" alone is no length, nor is a "T" with no time after it.
|
|
243
|
+
const hasTimePart = match[3] !== undefined ||
|
|
244
|
+
match[4] !== undefined ||
|
|
245
|
+
match[5] !== undefined;
|
|
246
|
+
if (!hasPart || (text.includes("t") && !hasTimePart)) {
|
|
247
|
+
return null;
|
|
80
248
|
}
|
|
81
|
-
|
|
82
|
-
|
|
249
|
+
return lengthInSeconds;
|
|
250
|
+
}
|
|
251
|
+
static readLengthInWords(text) {
|
|
252
|
+
const match = LENGTH_IN_WORDS.exec(text);
|
|
253
|
+
if (!match) {
|
|
254
|
+
return null;
|
|
83
255
|
}
|
|
84
|
-
|
|
85
|
-
|
|
256
|
+
const lookBack = match[1];
|
|
257
|
+
const count = match[2];
|
|
258
|
+
const unit = match[3];
|
|
259
|
+
const unitInSeconds = Object.prototype.hasOwnProperty.call(UNIT_IN_SECONDS, unit)
|
|
260
|
+
? UNIT_IN_SECONDS[unit]
|
|
261
|
+
: undefined;
|
|
262
|
+
if (unitInSeconds === undefined) {
|
|
263
|
+
return null;
|
|
86
264
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
265
|
+
if (count === undefined) {
|
|
266
|
+
/*
|
|
267
|
+
* "past hour" is an hour; "hour" alone, or "past h", is not
|
|
268
|
+
* written as a length.
|
|
269
|
+
*/
|
|
270
|
+
return lookBack && UNITS_WITHOUT_A_NUMBER.includes(unit)
|
|
271
|
+
? unitInSeconds
|
|
272
|
+
: null;
|
|
89
273
|
}
|
|
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();
|
|
274
|
+
return Number(count) * unitInSeconds;
|
|
97
275
|
}
|
|
98
276
|
}
|
|
99
277
|
exports.default = RollingTimeUtil;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ProductAnalyticsEventRef, ProductAnalyticsRetentionPeriod, ProductAnalyticsSegmentFilter } from "./ProductAnalyticsEventReads.mjs";
|
|
2
|
+
export declare enum ProductAnalyticsSavedViewType {
|
|
3
|
+
Funnel = "funnel",
|
|
4
|
+
Retention = "retention"
|
|
5
|
+
}
|
|
6
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_TYPES: ReadonlyArray<ProductAnalyticsSavedViewType>;
|
|
7
|
+
export declare function isProductAnalyticsSavedViewType(value: unknown): value is ProductAnalyticsSavedViewType;
|
|
8
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_NAME_MAX_LENGTH: number;
|
|
9
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEWS_PER_APPLICATION_MAX: number;
|
|
10
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_URL_KEY: string;
|
|
11
|
+
export interface ProductAnalyticsFunnelDefinition {
|
|
12
|
+
steps: Array<ProductAnalyticsEventRef>;
|
|
13
|
+
windowMs: number;
|
|
14
|
+
filters: Array<ProductAnalyticsSegmentFilter>;
|
|
15
|
+
}
|
|
16
|
+
export interface ProductAnalyticsRetentionDefinition {
|
|
17
|
+
startEvent: ProductAnalyticsEventRef;
|
|
18
|
+
returnEvent: ProductAnalyticsEventRef;
|
|
19
|
+
period: ProductAnalyticsRetentionPeriod;
|
|
20
|
+
filters: Array<ProductAnalyticsSegmentFilter>;
|
|
21
|
+
}
|
|
22
|
+
export interface ProductAnalyticsSavedViewDefinitions {
|
|
23
|
+
[ProductAnalyticsSavedViewType.Funnel]: ProductAnalyticsFunnelDefinition;
|
|
24
|
+
[ProductAnalyticsSavedViewType.Retention]: ProductAnalyticsRetentionDefinition;
|
|
25
|
+
}
|
|
26
|
+
export type ProductAnalyticsDefinitionRead<T> = {
|
|
27
|
+
definition: T;
|
|
28
|
+
problem: null;
|
|
29
|
+
} | {
|
|
30
|
+
definition: null;
|
|
31
|
+
problem: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_PROBLEMS: {
|
|
34
|
+
notAnObject: string;
|
|
35
|
+
steps: string;
|
|
36
|
+
step: string;
|
|
37
|
+
window: string;
|
|
38
|
+
filters: string;
|
|
39
|
+
filter: string;
|
|
40
|
+
startEvent: string;
|
|
41
|
+
returnEvent: string;
|
|
42
|
+
period: string;
|
|
43
|
+
name: string;
|
|
44
|
+
nameTooLong: string;
|
|
45
|
+
viewType: string;
|
|
46
|
+
viewTypeFixed: string;
|
|
47
|
+
oneKindAtATime: string;
|
|
48
|
+
definition: string;
|
|
49
|
+
tooMany: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function readProductAnalyticsFunnelDefinition(value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsFunnelDefinition>;
|
|
52
|
+
export declare function readProductAnalyticsRetentionDefinition(value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsRetentionDefinition>;
|
|
53
|
+
export declare function readProductAnalyticsSavedViewDefinition<T extends ProductAnalyticsSavedViewType>(viewType: T, value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsSavedViewDefinitions[T]>;
|
|
54
|
+
export declare function toProductAnalyticsSavedViewName(value: unknown): string;
|
|
55
|
+
export declare function getProductAnalyticsSavedViewNameProblem(value: unknown): string | null;
|
|
56
|
+
export declare function isSameProductAnalyticsDefinition(left: unknown, right: unknown): boolean;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ProductAnalyticsEventRef, ProductAnalyticsRetentionPeriod, ProductAnalyticsSegmentFilter } from "./ProductAnalyticsEventReads";
|
|
2
|
+
export declare enum ProductAnalyticsSavedViewType {
|
|
3
|
+
Funnel = "funnel",
|
|
4
|
+
Retention = "retention"
|
|
5
|
+
}
|
|
6
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_TYPES: ReadonlyArray<ProductAnalyticsSavedViewType>;
|
|
7
|
+
export declare function isProductAnalyticsSavedViewType(value: unknown): value is ProductAnalyticsSavedViewType;
|
|
8
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_NAME_MAX_LENGTH: number;
|
|
9
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEWS_PER_APPLICATION_MAX: number;
|
|
10
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_URL_KEY: string;
|
|
11
|
+
export interface ProductAnalyticsFunnelDefinition {
|
|
12
|
+
steps: Array<ProductAnalyticsEventRef>;
|
|
13
|
+
windowMs: number;
|
|
14
|
+
filters: Array<ProductAnalyticsSegmentFilter>;
|
|
15
|
+
}
|
|
16
|
+
export interface ProductAnalyticsRetentionDefinition {
|
|
17
|
+
startEvent: ProductAnalyticsEventRef;
|
|
18
|
+
returnEvent: ProductAnalyticsEventRef;
|
|
19
|
+
period: ProductAnalyticsRetentionPeriod;
|
|
20
|
+
filters: Array<ProductAnalyticsSegmentFilter>;
|
|
21
|
+
}
|
|
22
|
+
export interface ProductAnalyticsSavedViewDefinitions {
|
|
23
|
+
[ProductAnalyticsSavedViewType.Funnel]: ProductAnalyticsFunnelDefinition;
|
|
24
|
+
[ProductAnalyticsSavedViewType.Retention]: ProductAnalyticsRetentionDefinition;
|
|
25
|
+
}
|
|
26
|
+
export type ProductAnalyticsDefinitionRead<T> = {
|
|
27
|
+
definition: T;
|
|
28
|
+
problem: null;
|
|
29
|
+
} | {
|
|
30
|
+
definition: null;
|
|
31
|
+
problem: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const PRODUCT_ANALYTICS_SAVED_VIEW_PROBLEMS: {
|
|
34
|
+
notAnObject: string;
|
|
35
|
+
steps: string;
|
|
36
|
+
step: string;
|
|
37
|
+
window: string;
|
|
38
|
+
filters: string;
|
|
39
|
+
filter: string;
|
|
40
|
+
startEvent: string;
|
|
41
|
+
returnEvent: string;
|
|
42
|
+
period: string;
|
|
43
|
+
name: string;
|
|
44
|
+
nameTooLong: string;
|
|
45
|
+
viewType: string;
|
|
46
|
+
viewTypeFixed: string;
|
|
47
|
+
oneKindAtATime: string;
|
|
48
|
+
definition: string;
|
|
49
|
+
tooMany: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function readProductAnalyticsFunnelDefinition(value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsFunnelDefinition>;
|
|
52
|
+
export declare function readProductAnalyticsRetentionDefinition(value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsRetentionDefinition>;
|
|
53
|
+
export declare function readProductAnalyticsSavedViewDefinition<T extends ProductAnalyticsSavedViewType>(viewType: T, value: unknown): ProductAnalyticsDefinitionRead<ProductAnalyticsSavedViewDefinitions[T]>;
|
|
54
|
+
export declare function toProductAnalyticsSavedViewName(value: unknown): string;
|
|
55
|
+
export declare function getProductAnalyticsSavedViewNameProblem(value: unknown): string | null;
|
|
56
|
+
export declare function isSameProductAnalyticsDefinition(left: unknown, right: unknown): boolean;
|