@oneuptime/common 14.3.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/AIAgent.js +5 -1
- package/Models/DatabaseModels/AcmeCertificate.js +14 -0
- package/Models/DatabaseModels/Alert.js +6 -8
- package/Models/DatabaseModels/AlertEpisodeStateTimeline.js +3 -2
- package/Models/DatabaseModels/AlertSeverity.js +3 -12
- package/Models/DatabaseModels/ApiKey.d.mts +3 -1
- package/Models/DatabaseModels/ApiKey.d.ts +3 -1
- package/Models/DatabaseModels/ApiKey.js +67 -14
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +1 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +1 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +37 -4
- package/Models/DatabaseModels/CallLog.js +15 -3
- package/Models/DatabaseModels/CodeRepository.d.mts +1 -0
- package/Models/DatabaseModels/CodeRepository.d.ts +1 -0
- package/Models/DatabaseModels/CodeRepository.js +45 -2
- package/Models/DatabaseModels/CodeRepositoryMintedToken.d.mts +25 -0
- package/Models/DatabaseModels/CodeRepositoryMintedToken.d.ts +25 -0
- package/Models/DatabaseModels/CodeRepositoryMintedToken.js +436 -0
- package/Models/DatabaseModels/CodeRepositoryMintedToken.mjs +2 -0
- package/Models/DatabaseModels/Dashboard.js +10 -2
- package/Models/DatabaseModels/DashboardDomain.js +22 -27
- package/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/RuleBaseModel.js +30 -0
- package/Models/DatabaseModels/EmailLog.js +15 -3
- package/Models/DatabaseModels/File.js +4 -2
- package/Models/DatabaseModels/FormDomain.js +10 -2
- package/Models/DatabaseModels/GlobalConfig.d.mts +9 -1
- package/Models/DatabaseModels/GlobalConfig.d.ts +9 -1
- package/Models/DatabaseModels/GlobalConfig.js +186 -10
- package/Models/DatabaseModels/Incident.js +38 -44
- package/Models/DatabaseModels/IncidentEpisodePublicNote.js +11 -16
- package/Models/DatabaseModels/IncidentEpisodeStateTimeline.js +3 -2
- package/Models/DatabaseModels/IncidentPublicNote.js +11 -16
- package/Models/DatabaseModels/IncidentSeverity.js +3 -12
- package/Models/DatabaseModels/IncidentStateTimeline.js +12 -16
- package/Models/DatabaseModels/IncidentTemplate.js +6 -11
- package/Models/DatabaseModels/IncomingRequestSecret.d.mts +6 -0
- package/Models/DatabaseModels/IncomingRequestSecret.d.ts +6 -0
- package/Models/DatabaseModels/IncomingRequestSecret.js +156 -29
- package/Models/DatabaseModels/Index.js +2 -5
- package/Models/DatabaseModels/Monitor.d.mts +1 -0
- package/Models/DatabaseModels/Monitor.d.ts +1 -0
- package/Models/DatabaseModels/Monitor.js +97 -22
- package/Models/DatabaseModels/MonitorNetworkDevice.js +4 -1
- package/Models/DatabaseModels/MonitorTemplate.js +3 -1
- package/Models/DatabaseModels/MonitorTest.js +3 -1
- package/Models/DatabaseModels/NetworkDevice.js +16 -3
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +45 -12
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.mts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.d.ts +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +93 -5
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +43 -0
- package/Models/DatabaseModels/Probe.js +5 -1
- package/Models/DatabaseModels/Project.d.mts +1 -1
- package/Models/DatabaseModels/Project.d.ts +1 -1
- package/Models/DatabaseModels/Project.js +59 -64
- package/Models/DatabaseModels/ProjectSmtpConfig.js +44 -49
- package/Models/DatabaseModels/PushNotificationLog.js +15 -3
- package/Models/DatabaseModels/Reseller.js +2 -8
- package/Models/DatabaseModels/ResellerPlan.js +2 -8
- package/Models/DatabaseModels/RunbookExecution.js +4 -4
- package/Models/DatabaseModels/Runner.d.mts +1 -0
- package/Models/DatabaseModels/Runner.d.ts +1 -0
- package/Models/DatabaseModels/Runner.js +50 -0
- package/Models/DatabaseModels/ScheduledMaintenance.js +32 -24
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +11 -16
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +12 -16
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +9 -8
- package/Models/DatabaseModels/ServiceLevelObjective.js +7 -0
- package/Models/DatabaseModels/SmsLog.js +15 -3
- package/Models/DatabaseModels/StatusPage.js +30 -11
- package/Models/DatabaseModels/StatusPageAnnouncement.js +19 -24
- package/Models/DatabaseModels/StatusPageDomain.js +24 -27
- package/Models/DatabaseModels/StatusPageSubscriber.js +5 -4
- package/Models/DatabaseModels/TelegramLog.js +15 -3
- package/Models/DatabaseModels/User.d.mts +0 -3
- package/Models/DatabaseModels/User.d.ts +0 -3
- package/Models/DatabaseModels/User.js +5 -73
- package/Models/DatabaseModels/UserOnCallLog.d.mts +1 -0
- package/Models/DatabaseModels/UserOnCallLog.d.ts +1 -0
- package/Models/DatabaseModels/UserOnCallLog.js +52 -5
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +10 -2
- package/Models/DatabaseModels/UserWebhook.js +14 -5
- package/Models/DatabaseModels/WebhookLog.js +15 -3
- package/Models/DatabaseModels/WhatsAppLog.js +15 -3
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +15 -3
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +10 -7
- package/Models/DatabaseModels/WorkspaceProjectAuthToken.js +16 -2
- package/Models/DatabaseModels/WorkspaceUserAuthToken.js +13 -2
- package/Server/Services/DatabaseService.d.mts +57 -38
- package/Server/Services/DatabaseService.d.ts +57 -38
- package/Server/Types/Database/Permissions/PrivateRecordPermission.d.mts +123 -0
- package/Server/Types/Database/Permissions/PrivateRecordPermission.d.ts +123 -0
- package/Types/AI/AIActionWords.d.mts +14 -1
- package/Types/AI/AIActionWords.d.ts +14 -1
- package/Types/AI/AIActionWords.js +85 -1
- package/Types/AI/AIActionWords.mjs +4 -0
- package/Types/AI/AIAgentRunLimits.js +5 -4
- package/Types/AI/AIChatTypes.js +8 -3
- package/Types/AI/AIReadTableWords.js +7 -2
- package/Types/AI/AiActivityInsights.d.mts +1 -0
- package/Types/AI/AiActivityInsights.d.ts +1 -0
- package/Types/AI/CodeTask.d.mts +1 -0
- package/Types/AI/CodeTask.d.ts +1 -0
- package/Types/AI/CodeTask.js +7 -0
- package/Types/AI/ResourceAiAccessApi.d.mts +4 -0
- package/Types/AI/ResourceAiAccessApi.d.ts +4 -0
- package/Types/Accounts/MoreWaysToSignIn.d.mts +1 -0
- package/Types/Accounts/MoreWaysToSignIn.d.ts +1 -0
- package/Types/Accounts/MoreWaysToSignIn.js +11 -0
- package/Types/Accounts/MoreWaysToSignIn.mjs +2 -0
- package/Types/Accounts/SignInMessages.d.mts +5 -0
- package/Types/Accounts/SignInMessages.d.ts +5 -0
- package/Types/Accounts/SignInMessages.js +19 -1
- package/Types/Accounts/SignInMessages.mjs +2 -0
- package/Types/Analytics/ProductEvent.d.mts +7 -2
- package/Types/Analytics/ProductEvent.d.ts +7 -2
- package/Types/Analytics/ProductEvent.js +62 -12
- package/Types/ApiKey/ApiKeyShownOnce.d.mts +11 -0
- package/Types/ApiKey/ApiKeyShownOnce.d.ts +11 -0
- package/Types/ApiKey/ApiKeyShownOnce.js +78 -0
- package/Types/ApiKey/ApiKeyShownOnce.mjs +6 -0
- package/Types/AuditLog/AuditLogAction.d.mts +1 -0
- package/Types/AuditLog/AuditLogAction.d.ts +1 -0
- package/Types/AuditLog/AuditLogAction.js +11 -1
- package/Types/AuditLog/AuditLogActionLabel.js +1 -0
- package/Types/AuditLog/AuditLogCoverage.js +1 -0
- package/Types/AuditLog/AuditLogSessionEvent.d.mts +15 -3
- package/Types/AuditLog/AuditLogSessionEvent.d.ts +15 -3
- package/Types/AuditLog/AuditLogSessionEvent.js +107 -12
- package/Types/AuditLog/AuditLogSessionEvent.mjs +6 -0
- package/Types/AuditLog/AuditLogSignInFailure.d.mts +30 -0
- package/Types/AuditLog/AuditLogSignInFailure.d.ts +30 -0
- package/Types/AuditLog/AuditLogSignInFailure.js +109 -0
- package/Types/AuditLog/AuditLogSignInFailure.mjs +8 -0
- package/Types/AuditLog/AuditLogStatusPageSession.d.mts +29 -0
- package/Types/AuditLog/AuditLogStatusPageSession.d.ts +29 -0
- package/Types/AuditLog/AuditLogStatusPageSession.js +106 -0
- package/Types/AuditLog/AuditLogStatusPageSession.mjs +9 -0
- package/Types/AuditLog/Export/AuditLogExportEntriesLost.d.mts +11 -0
- package/Types/AuditLog/Export/AuditLogExportEntriesLost.d.ts +11 -0
- package/Types/AuditLog/Export/AuditLogExportEntriesLost.js +57 -0
- package/Types/AuditLog/Export/AuditLogExportEntriesLost.mjs +5 -0
- package/Types/AutoRemediation/RemediationApprovals.d.mts +39 -0
- package/Types/AutoRemediation/RemediationApprovals.d.ts +39 -0
- package/Types/AutoRemediation/RemediationApprovals.js +174 -8
- package/Types/AutoRemediation/RemediationApprovals.mjs +9 -0
- package/Types/AutoRemediation/RemediationPlanFingerprint.d.mts +15 -0
- package/Types/AutoRemediation/RemediationPlanFingerprint.d.ts +15 -0
- package/Types/AutoRemediation/RemediationPlanFingerprint.js +131 -0
- package/Types/AutoRemediation/RemediationPlanFingerprint.mjs +6 -0
- package/Types/BaseDatabase/SortNulls.d.mts +5 -0
- package/Types/BaseDatabase/SortNulls.d.ts +5 -0
- package/Types/BaseDatabase/SortNulls.js +14 -0
- package/Types/BaseDatabase/SortNulls.mjs +2 -0
- package/Types/Billing/AdminProjectInvoice.d.mts +20 -0
- package/Types/Billing/AdminProjectInvoice.d.ts +20 -0
- package/Types/Billing/AdminProjectInvoice.js +85 -0
- package/Types/Billing/AdminProjectInvoice.mjs +6 -0
- package/Types/CloudConnection/CloudAiAgentCost.d.mts +6 -2
- package/Types/CloudConnection/CloudAiAgentCost.d.ts +6 -2
- package/Types/CloudConnection/CloudAiAgentCost.js +28 -2
- package/Types/CloudConnection/CloudAiAgentCost.mjs +4 -0
- package/Types/CloudConnection/CloudAiAgentSetupCommands.d.mts +19 -1
- package/Types/CloudConnection/CloudAiAgentSetupCommands.d.ts +19 -1
- package/Types/CloudConnection/CloudAiAgentSetupCommands.js +354 -16
- package/Types/CloudConnection/CloudAiAgentSetupCommands.mjs +17 -0
- package/Types/CustomDomain/UploadedCertificateRefusals.d.mts +10 -0
- package/Types/CustomDomain/UploadedCertificateRefusals.d.ts +10 -0
- package/Types/CustomDomain/UploadedCertificateRefusals.js +69 -0
- package/Types/CustomDomain/UploadedCertificateRefusals.mjs +11 -0
- package/Types/DataObservability/DataLineageMap.d.mts +147 -0
- package/Types/DataObservability/DataLineageMap.d.ts +147 -0
- package/Types/DataObservability/DataLineageMap.js +503 -0
- package/Types/DataObservability/DataLineageMap.mjs +20 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +1 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +1 -0
- package/Types/DataObservability/DataObservabilityApiTypes.js +2 -0
- package/Types/Database/TableColumn.d.mts +1 -0
- package/Types/Database/TableColumn.d.ts +1 -0
- package/Types/Database/UserAttribution.js +7 -3
- package/Types/Date.d.mts +0 -2
- package/Types/Date.d.ts +0 -2
- package/Types/Date.js +12 -19
- package/Types/Email/EmailMessage.d.mts +2 -0
- package/Types/Email/EmailMessage.d.ts +2 -0
- package/Types/Email/EmailRecipients.d.mts +11 -0
- package/Types/Email/EmailRecipients.d.ts +11 -0
- package/Types/Email/EmailRecipients.js +84 -0
- package/Types/Email/EmailRecipients.mjs +6 -0
- package/Types/Email/EmailTemplateType.d.mts +2 -1
- package/Types/Email/EmailTemplateType.d.ts +2 -1
- package/Types/Email/EmailTemplateType.js +5 -0
- package/Types/IP/IP.js +27 -1
- package/Types/JoinedSerializableObjects.d.mts +6 -0
- package/Types/JoinedSerializableObjects.d.ts +6 -0
- package/Types/JoinedSerializableObjects.js +14 -0
- package/Types/JoinedSerializableObjects.mjs +3 -0
- package/Types/Kubernetes/KubernetesClusterAiLogs.d.mts +2 -0
- package/Types/Kubernetes/KubernetesClusterAiLogs.d.ts +2 -0
- package/Types/MasterApiKey/MasterApiKeyAnswer.d.mts +15 -0
- package/Types/MasterApiKey/MasterApiKeyAnswer.d.ts +15 -0
- package/Types/MasterApiKey/MasterApiKeyAnswer.js +81 -0
- package/Types/MasterApiKey/MasterApiKeyAnswer.mjs +5 -0
- package/Types/MeaningKeys.js +19 -0
- package/Types/Monitor/IncomingMonitor/IncomingMonitorRequest.d.mts +2 -0
- package/Types/Monitor/IncomingMonitor/IncomingMonitorRequest.d.ts +2 -0
- package/Types/Monitor/IncomingMonitor/IncomingRequestSecret.d.mts +23 -1
- package/Types/Monitor/IncomingMonitor/IncomingRequestSecret.d.ts +23 -1
- package/Types/Monitor/IncomingMonitor/IncomingRequestSecret.js +105 -4
- package/Types/Monitor/IncomingMonitor/IncomingRequestSecret.mjs +7 -0
- package/Types/Monitor/IncomingMonitor/WebhookVerificationProvider.d.mts +11 -0
- package/Types/Monitor/IncomingMonitor/WebhookVerificationProvider.d.ts +11 -0
- package/Types/Monitor/IncomingMonitor/WebhookVerificationProvider.js +28 -0
- package/Types/Monitor/IncomingMonitor/WebhookVerificationProvider.mjs +3 -0
- package/Types/Monitor/MonitorCriteria.js +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +8 -0
- package/Types/Monitor/MonitorGroupUptimeSummary.d.mts +12 -0
- package/Types/Monitor/MonitorGroupUptimeSummary.d.ts +12 -0
- package/Types/Monitor/MonitorGroupUptimeSummary.js +2 -0
- package/Types/Monitor/MonitorGroupUptimeSummary.mjs +1 -0
- package/Types/Monitor/MonitorJsonTypes.d.mts +4 -0
- package/Types/Monitor/MonitorJsonTypes.d.ts +4 -0
- package/Types/Monitor/MonitorJsonTypes.js +31 -0
- package/Types/Monitor/MonitorJsonTypes.mjs +2 -0
- package/Types/Monitor/MonitorStep.js +8 -0
- package/Types/Monitor/MonitorSteps.js +8 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.browser.d.mts +3 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.browser.d.ts +3 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.browser.js +21 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.browser.mjs +2 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.d.mts +3 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.d.ts +3 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.js +24 -0
- package/Types/Monitor/MonitorStepsColumnTransformer.mjs +2 -0
- package/Types/Monitor/UptimeHistoryLabels.d.mts +4 -0
- package/Types/Monitor/UptimeHistoryLabels.d.ts +4 -0
- package/Types/Monitor/UptimeHistoryLabels.js +4 -0
- package/Types/Monitor/WhoIsTold.d.mts +25 -0
- package/Types/Monitor/WhoIsTold.d.ts +25 -0
- package/Types/Monitor/WhoIsTold.js +171 -19
- package/Types/Monitor/WhoIsTold.mjs +3 -0
- package/Types/NoBreakSpaces.d.mts +5 -1
- package/Types/NoBreakSpaces.d.ts +5 -1
- package/Types/NoBreakSpaces.js +107 -52
- package/Types/NoBreakSpaces.mjs +1 -0
- package/Types/NotificationRule/PagingLadder.d.mts +2 -0
- package/Types/NotificationRule/PagingLadder.d.ts +2 -0
- package/Types/NotificationRule/PagingLadder.js +47 -1
- package/Types/NotificationRule/PagingLadder.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCalDutyExecutionLogTimelineStatus.d.mts +2 -1
- package/Types/OnCallDutyPolicy/OnCalDutyExecutionLogTimelineStatus.d.ts +2 -1
- package/Types/OnCallDutyPolicy/OnCalDutyExecutionLogTimelineStatus.js +6 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgementTimeout.d.mts +5 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgementTimeout.d.ts +5 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgementTimeout.js +41 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgementTimeout.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallLogLine.d.mts +6 -1
- package/Types/OnCallDutyPolicy/OnCallLogLine.d.ts +6 -1
- package/Types/OnCallDutyPolicy/OnCallLogLine.js +60 -0
- package/Types/OnCallDutyPolicy/OnCallPageMerge.d.mts +32 -0
- package/Types/OnCallDutyPolicy/OnCallPageMerge.d.ts +32 -0
- package/Types/OnCallDutyPolicy/OnCallPageMerge.js +192 -0
- package/Types/OnCallDutyPolicy/OnCallPageMerge.mjs +14 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.d.mts +40 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.d.ts +40 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.js +142 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.mjs +13 -0
- package/Types/Password.d.mts +18 -12
- package/Types/Password.d.ts +18 -12
- package/Types/Password.js +63 -58
- package/Types/Password.mjs +3 -3
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +48 -0
- package/Types/PrivateRecord/PrivateRecordParts.js +50 -0
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +11 -0
- package/Types/Product/ProjectProducts.d.mts +1 -15
- package/Types/Product/ProjectProducts.d.ts +1 -15
- package/Types/Product/ProjectProducts.js +38 -129
- package/Types/Product/ProjectProducts.mjs +1 -5
- package/Types/Product/ProjectProductsAnswer.js +5 -6
- package/Types/ProductFeedback/ProductFeedback.d.mts +29 -4
- package/Types/ProductFeedback/ProductFeedback.d.ts +29 -4
- package/Types/ProductFeedback/ProductFeedback.js +176 -28
- package/Types/ProductFeedback/ProductFeedback.mjs +11 -1
- package/Types/ResourceAiAgent/CloudAiAgentNames.d.mts +6 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.d.ts +6 -0
- package/Types/ResourceAiAgent/CloudAiAgentNames.js +20 -1
- package/Types/ResourceAiAgent/CloudAiAgentNames.mjs +5 -0
- package/Types/ResourceAiAgent/ResourceAiAccess.d.mts +3 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.d.ts +3 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.js +18 -1
- package/Types/ResourceAiAgent/ResourceAiAccess.mjs +2 -0
- package/Types/Retention/ResolvedRecordRetention.d.mts +33 -0
- package/Types/Retention/ResolvedRecordRetention.d.ts +33 -0
- package/Types/Retention/ResolvedRecordRetention.js +211 -1
- package/Types/Retention/ResolvedRecordRetention.mjs +13 -0
- package/Types/Retention/ResolvedRecordRetentionAnswers.d.mts +28 -0
- package/Types/Retention/ResolvedRecordRetentionAnswers.d.ts +28 -0
- package/Types/Retention/ResolvedRecordRetentionAnswers.js +134 -0
- package/Types/Retention/ResolvedRecordRetentionAnswers.mjs +5 -0
- package/Types/Rules/RuleEmptiedLimit.d.mts +20 -0
- package/Types/Rules/RuleEmptiedLimit.d.ts +20 -0
- package/Types/Rules/RuleEmptiedLimit.js +131 -0
- package/Types/Rules/RuleEmptiedLimit.mjs +9 -0
- package/Types/Runbook/RunbookStepTimeout.js +11 -10
- package/Types/Runner/GlobalRunnerRepositoryTokens.d.mts +18 -0
- package/Types/Runner/GlobalRunnerRepositoryTokens.d.ts +18 -0
- package/Types/Runner/GlobalRunnerRepositoryTokens.js +97 -0
- package/Types/Runner/GlobalRunnerRepositoryTokens.mjs +8 -0
- package/Types/Runner/GlobalRunnerSandbox.d.mts +38 -0
- package/Types/Runner/GlobalRunnerSandbox.d.ts +38 -0
- package/Types/Runner/GlobalRunnerSandbox.js +178 -0
- package/Types/Runner/GlobalRunnerSandbox.mjs +9 -0
- package/Types/Runner/GlobalRunnerWork.js +9 -4
- package/Types/Runner/RunnerCodeFixCapability.d.mts +14 -0
- package/Types/Runner/RunnerCodeFixCapability.d.ts +14 -0
- package/Types/Runner/RunnerCodeFixCapability.js +103 -0
- package/Types/Runner/RunnerCodeFixCapability.mjs +7 -0
- package/Types/Runner/RunnerCodeFixes.d.mts +3 -0
- package/Types/Runner/RunnerCodeFixes.d.ts +3 -0
- package/Types/Runner/RunnerCodeFixes.js +27 -4
- package/Types/Runner/RunnerCodeFixes.mjs +1 -0
- package/Types/SSO/SessionsWithoutSso.d.mts +10 -0
- package/Types/SSO/SessionsWithoutSso.d.ts +10 -0
- package/Types/SSO/SessionsWithoutSso.js +39 -0
- package/Types/SSO/SessionsWithoutSso.mjs +5 -0
- package/Types/SerializableObjectDictionary.js +11 -8
- package/Types/SetupHealth/SetupHealth.d.mts +47 -2
- package/Types/SetupHealth/SetupHealth.d.ts +47 -2
- package/Types/SetupHealth/SetupHealth.js +228 -1
- package/Types/SetupHealth/SetupHealth.mjs +12 -0
- package/Types/StatusPage/StatusPageReport.d.mts +5 -2
- package/Types/StatusPage/StatusPageReport.d.ts +5 -2
- package/Types/StatusPage/SubscriberNotificationTemplateVariables.js +2 -2
- package/Types/StatusPage/UptimeDailyAggregate.d.mts +1 -0
- package/Types/StatusPage/UptimeDailyAggregate.d.ts +1 -0
- package/Types/Telemetry/LlmConventions.d.mts +1 -1
- package/Types/Telemetry/LlmConventions.d.ts +1 -1
- package/Types/Telemetry/LlmConventions.js +1 -1
- package/Types/Telemetry/ScrubRule.d.mts +1 -0
- package/Types/Telemetry/ScrubRule.d.ts +1 -0
- package/Types/Telemetry/ScrubRule.js +47 -0
- package/Types/Translator.d.mts +5 -2
- package/Types/Translator.d.ts +5 -2
- package/Types/Translator.js +43 -19
- package/Types/UsedBy/UsedBy.d.mts +107 -4
- package/Types/UsedBy/UsedBy.d.ts +107 -4
- package/Types/UsedBy/UsedBy.js +339 -6
- package/Types/UsedBy/UsedBy.mjs +12 -0
- package/Types/UsedBy/UsedByServerProducts.d.mts +5 -2
- package/Types/UsedBy/UsedByServerProducts.d.ts +5 -2
- package/Types/UsedBy/UsedByServerProducts.js +115 -6
- package/Types/UsedBy/UsedByServerProducts.mjs +1 -0
- package/Types/UserNotification/UserNotificationExecutionStatus.d.mts +2 -1
- package/Types/UserNotification/UserNotificationExecutionStatus.d.ts +2 -1
- package/Types/UserNotification/UserNotificationExecutionStatus.js +7 -0
- package/Types/UserSession/SessionEndCause.d.mts +1 -0
- package/Types/UserSession/SessionEndCause.d.ts +1 -0
- package/Types/UserSession/SessionEndCause.js +8 -1
- package/Types/WelcomeChecklist/ProjectGoal.js +5 -5
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +63 -1
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +0 -1
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +0 -1
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +0 -3
- package/Types/Workflow/WatchedFields.d.mts +1 -0
- package/Types/Workflow/WatchedFields.d.ts +1 -0
- package/Types/Workflow/WatchedFields.js +10 -1
- package/Types/Workflow/WatchedFields.mjs +1 -0
- package/Types/Workflow/WorkflowPrivateRecords.d.mts +2 -0
- package/Types/Workflow/WorkflowPrivateRecords.d.ts +2 -0
- package/Types/Workflow/WorkflowPrivateRecords.js +33 -0
- package/Types/Workflow/WorkflowPrivateRecords.mjs +3 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +1 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +1 -0
- package/Types/Workspace/NotificationRules/EventType.js +4 -3
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +19 -2
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +19 -2
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +127 -8
- package/Types/Workspace/WorkspaceLiveMessageKey.d.mts +5 -1
- package/Types/Workspace/WorkspaceLiveMessageKey.d.ts +5 -1
- package/Types/Workspace/WorkspaceLiveMessageKey.js +12 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +6 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +6 -0
- package/Utils/API.d.mts +6 -7
- package/Utils/API.d.ts +6 -7
- package/Utils/API.js +57 -35
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.mts +10 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.d.ts +10 -0
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.js +89 -1
- package/Utils/AiRemediation/Resource/CloudOperationCatalog.mjs +4 -0
- package/Utils/Billing/InvoiceAmount.d.mts +4 -0
- package/Utils/Billing/InvoiceAmount.d.ts +4 -0
- package/Utils/Billing/InvoiceAmount.js +35 -0
- package/Utils/Billing/InvoiceAmount.mjs +2 -0
- package/Utils/CertificateReissue.js +4 -3
- package/Utils/CronScheduleText.js +10 -3
- package/Utils/CronTab.js +6 -33
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +5 -18
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +5 -18
- package/Utils/Dashboard/MonitorListWidgetFormat.js +54 -18
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -1
- package/Utils/DeveloperDocs/TerraformSchema.js +3 -2
- package/Utils/LinearRegExp/LinearRegExp.d.mts +1 -0
- package/Utils/LinearRegExp/LinearRegExp.d.ts +1 -0
- package/Utils/LinearRegExp/LinearRegExp.js +17 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +6 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +6 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +477 -152
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
- package/Utils/Markdown/SlowMarkdown.js +168 -33
- package/Utils/Metrics/MetricFormulaEvaluator.d.mts +20 -4
- package/Utils/Metrics/MetricFormulaEvaluator.d.ts +20 -4
- package/Utils/Metrics/MetricFormulaEvaluator.js +233 -29
- package/Utils/Metrics/MetricResultUnitConverter.js +7 -1
- package/Utils/Metrics/MetricSeriesArrivalUtil.d.mts +4 -0
- package/Utils/Metrics/MetricSeriesArrivalUtil.d.ts +4 -0
- package/Utils/Metrics/MetricSeriesArrivalUtil.js +27 -0
- package/Utils/Metrics/MetricZeroFill.d.mts +45 -0
- package/Utils/Metrics/MetricZeroFill.d.ts +45 -0
- package/Utils/Metrics/MetricZeroFill.js +145 -0
- package/Utils/Metrics/MetricZeroFill.mjs +2 -0
- package/Utils/ModelImportExport.js +4 -1
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +3 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +3 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +57 -0
- package/Utils/Monitor/HeartbeatSweepSchedule.d.mts +9 -0
- package/Utils/Monitor/HeartbeatSweepSchedule.d.ts +9 -0
- package/Utils/Monitor/HeartbeatSweepSchedule.js +52 -0
- package/Utils/Monitor/HeartbeatSweepSchedule.mjs +5 -0
- package/Utils/Monitor/MonitorFirstCheck.d.mts +32 -0
- package/Utils/Monitor/MonitorFirstCheck.d.ts +32 -0
- package/Utils/Monitor/MonitorFirstCheck.js +128 -0
- package/Utils/Monitor/MonitorFirstCheck.mjs +4 -0
- package/Utils/Monitor/MonitorFirstCheckOverdue.d.mts +12 -0
- package/Utils/Monitor/MonitorFirstCheckOverdue.d.ts +12 -0
- package/Utils/Monitor/MonitorFirstCheckOverdue.js +87 -0
- package/Utils/Monitor/MonitorFirstCheckOverdue.mjs +2 -0
- package/Utils/Monitor/MonitorGroupUptimeSummaryUtil.d.mts +11 -0
- package/Utils/Monitor/MonitorGroupUptimeSummaryUtil.d.ts +11 -0
- package/Utils/Monitor/MonitorGroupUptimeSummaryUtil.js +86 -0
- package/Utils/Monitor/MonitorGroupUptimeSummaryUtil.mjs +2 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +4 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +4 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +122 -4
- package/Utils/Monitor/MonitorRowStatus.d.mts +56 -0
- package/Utils/Monitor/MonitorRowStatus.d.ts +56 -0
- package/Utils/Monitor/MonitorRowStatus.js +189 -0
- package/Utils/Monitor/MonitorRowStatus.mjs +6 -0
- package/Utils/Monitor/MonitorSummarySnapshotUtil.js +3 -2
- package/Utils/Monitor/MonitorUptimeSummaryUtil.js +14 -3
- package/Utils/NetworkDevice/TransceiverHealthUtil.js +2 -2
- package/Utils/Profiles/ProfileFrames.js +11 -4
- package/Utils/Profiles/ProfileFunctionNames.d.mts +2 -0
- package/Utils/Profiles/ProfileFunctionNames.d.ts +2 -0
- package/Utils/Profiles/ProfileFunctionNames.js +104 -0
- package/Utils/Profiles/ProfileFunctionNames.mjs +3 -0
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.d.mts +3 -0
- package/Utils/Project/TwilioAccount.d.ts +3 -0
- package/Utils/Project/TwilioAccount.js +58 -18
- package/Utils/Project/TwilioAccount.mjs +2 -0
- package/Utils/ResponseTooLarge.d.mts +5 -0
- package/Utils/ResponseTooLarge.d.ts +5 -0
- package/Utils/ResponseTooLarge.js +69 -0
- package/Utils/ResponseTooLarge.mjs +2 -0
- package/Utils/RetryAfter.d.mts +17 -0
- package/Utils/RetryAfter.d.ts +17 -0
- package/Utils/RetryAfter.js +251 -0
- package/Utils/RetryAfter.mjs +5 -0
- package/Utils/ScheduledMaintenanceStart.js +2 -3
- package/Utils/Schema/BaseSchema.d.mts +12 -5
- package/Utils/Schema/BaseSchema.d.ts +12 -5
- package/Utils/Schema/BaseSchema.js +43 -4
- package/Utils/Schema/BaseSchema.mjs +1 -0
- package/Utils/Schema/ModelSchema.d.mts +10 -0
- package/Utils/Schema/ModelSchema.d.ts +10 -0
- package/Utils/Schema/ModelSchema.js +251 -22
- package/Utils/Slo/SloMonthlyReport.d.mts +187 -0
- package/Utils/Slo/SloMonthlyReport.d.ts +187 -0
- package/Utils/Slo/SloMonthlyReport.js +945 -0
- package/Utils/Slo/SloMonthlyReport.mjs +35 -0
- package/Utils/Slo/SloOverviewText.js +7 -2
- package/Utils/Slo/SloProjection.js +2 -1
- package/Utils/Slo/SloUtil.d.mts +5 -0
- package/Utils/Slo/SloUtil.d.ts +5 -0
- package/Utils/Slo/SloUtil.js +5 -0
- package/Utils/Slo/SloWidgetFormat.js +3 -1
- package/Utils/StatusPage/FrozenMonitorResources.d.mts +30 -0
- package/Utils/StatusPage/FrozenMonitorResources.d.ts +30 -0
- package/Utils/StatusPage/FrozenMonitorResources.js +147 -12
- package/Utils/StatusPage/FrozenMonitorResources.mjs +2 -0
- package/Utils/StatusPage/GroupNestingLayout.js +3 -2
- package/Utils/StatusPage/HistoryChartBarColors.d.mts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.d.ts +2 -0
- package/Utils/StatusPage/HistoryChartBarColors.js +15 -1
- package/Utils/StatusPage/HistoryChartBarColors.mjs +2 -0
- package/Utils/StatusPage/Report.js +12 -4
- package/Utils/StatusPage/ReportText.d.mts +4 -0
- package/Utils/StatusPage/ReportText.d.ts +4 -0
- package/Utils/StatusPage/ReportText.js +22 -2
- package/Utils/StatusPage/ReportText.mjs +1 -0
- package/Utils/StatusPage/ResourceUptime.js +32 -25
- package/Utils/StatusPage/UptimeDailyAggregateUtil.js +17 -3
- package/Utils/Syslog/SyslogMessageParser.d.mts +25 -0
- package/Utils/Syslog/SyslogMessageParser.d.ts +25 -0
- package/Utils/Syslog/SyslogMessageParser.js +428 -100
- package/Utils/Syslog/SyslogMessageParser.mjs +3 -0
- package/Utils/Syslog/SyslogRawCopies.d.mts +20 -0
- package/Utils/Syslog/SyslogRawCopies.d.ts +20 -0
- package/Utils/Syslog/SyslogRawCopies.js +283 -0
- package/Utils/Syslog/SyslogRawCopies.mjs +2 -0
- package/Utils/Telemetry/CorrelationIdAttributes.d.mts +8 -0
- package/Utils/Telemetry/CorrelationIdAttributes.d.ts +8 -0
- package/Utils/Telemetry/CorrelationIdAttributes.js +118 -0
- package/Utils/Telemetry/CorrelationIdAttributes.mjs +5 -0
- package/Utils/Telemetry/ScrubJsonKeys.d.mts +11 -0
- package/Utils/Telemetry/ScrubJsonKeys.d.ts +11 -0
- package/Utils/Telemetry/ScrubJsonKeys.js +505 -0
- package/Utils/Telemetry/ScrubJsonKeys.mjs +2 -0
- package/Utils/Telemetry/ScrubJsonText.d.mts +25 -0
- package/Utils/Telemetry/ScrubJsonText.d.ts +25 -0
- package/Utils/Telemetry/ScrubJsonText.js +568 -0
- package/Utils/Telemetry/ScrubJsonText.mjs +4 -0
- package/Utils/Telemetry/ScrubMask.d.mts +1 -0
- package/Utils/Telemetry/ScrubMask.d.ts +1 -0
- package/Utils/Telemetry/ScrubMask.js +54 -0
- package/Utils/Telemetry/ScrubMask.mjs +2 -0
- package/Utils/Telemetry/ScrubNestedValues.d.mts +5 -2
- package/Utils/Telemetry/ScrubNestedValues.d.ts +5 -2
- package/Utils/Telemetry/ScrubNestedValues.js +56 -9
- package/Utils/Uptime/DayUptimeGraphUtil.d.mts +17 -0
- package/Utils/Uptime/DayUptimeGraphUtil.d.ts +17 -0
- package/Utils/Uptime/DayUptimeGraphUtil.js +91 -3
- package/Utils/Uptime/DayUptimeGraphUtil.mjs +1 -0
- package/Utils/Uptime/TimeBeforeFirstCheck.d.mts +11 -0
- package/Utils/Uptime/TimeBeforeFirstCheck.d.ts +11 -0
- package/Utils/Uptime/TimeBeforeFirstCheck.js +188 -0
- package/Utils/Uptime/TimeBeforeFirstCheck.mjs +2 -0
- package/package.json +1 -1
- package/Models/DatabaseModels/GreenlockCertificate.d.mts +0 -10
- package/Models/DatabaseModels/GreenlockCertificate.d.ts +0 -10
- package/Models/DatabaseModels/GreenlockCertificate.js +0 -143
- package/Models/DatabaseModels/GreenlockCertificate.mjs +0 -2
- package/Models/DatabaseModels/GreenlockChallenge.d.mts +0 -10
- package/Models/DatabaseModels/GreenlockChallenge.d.ts +0 -10
- package/Models/DatabaseModels/GreenlockChallenge.js +0 -144
- package/Models/DatabaseModels/GreenlockChallenge.mjs +0 -2
- package/Types/SampleProject/SampleProject.d.mts +0 -54
- package/Types/SampleProject/SampleProject.d.ts +0 -54
- package/Types/SampleProject/SampleProject.js +0 -177
- package/Types/SampleProject/SampleProject.mjs +0 -22
- package/Types/SampleProject/SampleProjectContent.d.mts +0 -127
- package/Types/SampleProject/SampleProjectContent.d.ts +0 -127
- package/Types/SampleProject/SampleProjectContent.js +0 -397
- package/Types/SampleProject/SampleProjectContent.mjs +0 -18
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BadDataException_1 = __importDefault(require("../../Types/Exception/BadDataException"));
|
|
7
7
|
const LookupTable_1 = require("../LookupTable");
|
|
8
|
+
const MetricZeroFill_1 = __importDefault(require("./MetricZeroFill"));
|
|
8
9
|
/**
|
|
9
10
|
* Shunting-yard based evaluator for metric formulas such as
|
|
10
11
|
* "$A + $B * 2" or "(a - b) / 100". Variables are matched by metric
|
|
@@ -22,6 +23,15 @@ const LookupTable_1 = require("../LookupTable");
|
|
|
22
23
|
* isGroupedVariable). When every referenced variable has a single
|
|
23
24
|
* series the evaluator behaves exactly like the original timestamp-only
|
|
24
25
|
* join — no stamping, identical output.
|
|
26
|
+
*
|
|
27
|
+
* A query that counts what happened (the Sum or Count of a counter or a
|
|
28
|
+
* histogram) has no point in a step where nothing happened. Given the
|
|
29
|
+
* catalog's word on its metric (`zeroFill`, MetricZeroFill), the formula
|
|
30
|
+
* reads it as 0 in a settled step another variable has a point in - so a
|
|
31
|
+
* failure share draws 0% where nothing failed - and in a group of the
|
|
32
|
+
* formula it has no series for. Without `zeroFill`, and for anything else
|
|
33
|
+
* (a gauge, an average, a percentile, a formula), a missing point is a gap,
|
|
34
|
+
* as it always was.
|
|
25
35
|
*/
|
|
26
36
|
var TokenType;
|
|
27
37
|
(function (TokenType) {
|
|
@@ -52,10 +62,11 @@ class MetricFormulaEvaluator {
|
|
|
52
62
|
* Throws for STRUCTURAL problems (invalid formula syntax/arity,
|
|
53
63
|
* unknown variable, grouped variables with no groups in common).
|
|
54
64
|
* Per-point data gaps (a timestamp missing from one variable) are
|
|
55
|
-
* skipped silently, as before
|
|
65
|
+
* skipped silently, as before - except a counting query's, which
|
|
66
|
+
* `zeroFill` reads as 0 (MetricZeroFill).
|
|
56
67
|
*/
|
|
57
68
|
static evaluateFormula(input) {
|
|
58
|
-
var _a;
|
|
69
|
+
var _a, _b;
|
|
59
70
|
const trimmedFormula = (input.formula || "").trim();
|
|
60
71
|
if (!trimmedFormula) {
|
|
61
72
|
return { data: [] };
|
|
@@ -85,6 +96,13 @@ class MetricFormulaEvaluator {
|
|
|
85
96
|
for (const variableName of referencedVariables) {
|
|
86
97
|
seriesBuckets[variableName] = MetricFormulaEvaluator.bucketSeriesByGroup(variableData[variableName]);
|
|
87
98
|
}
|
|
99
|
+
// The queries a missing point of reads as 0 (MetricZeroFill).
|
|
100
|
+
const countingVariables = MetricFormulaEvaluator.getCountingVariables({
|
|
101
|
+
referencedVariables,
|
|
102
|
+
variableData,
|
|
103
|
+
zeroFill: input.zeroFill,
|
|
104
|
+
});
|
|
105
|
+
const isStepSettled = (_a = input.zeroFill) === null || _a === void 0 ? void 0 : _a.isStepSettled;
|
|
88
106
|
/*
|
|
89
107
|
* The grouped path only ENGAGES when some variable factually carries
|
|
90
108
|
* two or more series. Callers like the metric-monitor worker
|
|
@@ -109,6 +127,8 @@ class MetricFormulaEvaluator {
|
|
|
109
127
|
rpn,
|
|
110
128
|
referencedVariables,
|
|
111
129
|
seriesByVariable,
|
|
130
|
+
countingVariables,
|
|
131
|
+
isStepSettled,
|
|
112
132
|
}),
|
|
113
133
|
};
|
|
114
134
|
}
|
|
@@ -122,17 +142,47 @@ class MetricFormulaEvaluator {
|
|
|
122
142
|
const groupedVariables = referencedVariables.filter((variableName) => {
|
|
123
143
|
return MetricFormulaEvaluator.isGroupedVariable(seriesBuckets[variableName], variableData[variableName]);
|
|
124
144
|
});
|
|
145
|
+
/*
|
|
146
|
+
* A grouped counting query has no series in a group where nothing it
|
|
147
|
+
* counts happened - a service with requests and no failure has no
|
|
148
|
+
* failures series - so it is filled in the groups the formula is
|
|
149
|
+
* evaluated for instead of narrowing them. Only when it is grouped by
|
|
150
|
+
* the very attributes those groups are: a query grouped by others is
|
|
151
|
+
* never matched to them, and narrows the groups as any other does.
|
|
152
|
+
*/
|
|
153
|
+
const fillableGroupedVariables = MetricFormulaEvaluator.getFillableGroupedVariables({
|
|
154
|
+
groupedVariables,
|
|
155
|
+
countingVariables,
|
|
156
|
+
seriesBuckets,
|
|
157
|
+
variableData,
|
|
158
|
+
});
|
|
159
|
+
const requiredGroupedVariables = groupedVariables.filter((variableName) => {
|
|
160
|
+
return !fillableGroupedVariables.includes(variableName);
|
|
161
|
+
});
|
|
125
162
|
/*
|
|
126
163
|
* Groups the formula is evaluated for = groups present in EVERY
|
|
127
|
-
* grouped variable
|
|
128
|
-
*
|
|
164
|
+
* grouped variable that must have a point - every grouped one but the
|
|
165
|
+
* fillable counts - or, when all of them are fillable counts, in ANY of
|
|
166
|
+
* them. Ungrouped variables broadcast, so they don't constrain the set.
|
|
129
167
|
*/
|
|
130
|
-
let commonGroupKeys =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
168
|
+
let commonGroupKeys = [];
|
|
169
|
+
if (requiredGroupedVariables.length > 0) {
|
|
170
|
+
commonGroupKeys = Array.from(seriesBuckets[requiredGroupedVariables[0]].keys());
|
|
171
|
+
for (let index = 1; index < requiredGroupedVariables.length; index++) {
|
|
172
|
+
const buckets = seriesBuckets[requiredGroupedVariables[index]];
|
|
173
|
+
commonGroupKeys = commonGroupKeys.filter((groupKey) => {
|
|
174
|
+
return buckets.has(groupKey);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
const anyGroupKeys = new Set();
|
|
180
|
+
for (const variableName of fillableGroupedVariables) {
|
|
181
|
+
for (const groupKey of seriesBuckets[variableName].keys()) {
|
|
182
|
+
anyGroupKeys.add(groupKey);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
commonGroupKeys = Array.from(anyGroupKeys);
|
|
136
186
|
}
|
|
137
187
|
if (commonGroupKeys.length === 0) {
|
|
138
188
|
throw new BadDataException_1.default(`Formula "${trimmedFormula}" references grouped queries that have no series groups in common. Make sure every grouped query used by the formula is grouped by the same attributes.`);
|
|
@@ -142,14 +192,30 @@ class MetricFormulaEvaluator {
|
|
|
142
192
|
* lexicographic sort yields a stable, human-sensible series order.
|
|
143
193
|
*/
|
|
144
194
|
commonGroupKeys.sort();
|
|
195
|
+
/*
|
|
196
|
+
* A grouped count that is not filled across groups (grouped by other
|
|
197
|
+
* attributes) is not filled within one either: it is matched as any
|
|
198
|
+
* other grouped variable is.
|
|
199
|
+
*/
|
|
200
|
+
const groupCountingVariables = new Set(Array.from(countingVariables).filter((variableName) => {
|
|
201
|
+
return (!groupedVariables.includes(variableName) ||
|
|
202
|
+
fillableGroupedVariables.includes(variableName));
|
|
203
|
+
}));
|
|
145
204
|
const resultData = [];
|
|
146
205
|
for (const groupKey of commonGroupKeys) {
|
|
147
|
-
|
|
206
|
+
// The labels of the first grouped variable that has the group.
|
|
207
|
+
const labelSource = [
|
|
208
|
+
...requiredGroupedVariables,
|
|
209
|
+
...fillableGroupedVariables,
|
|
210
|
+
].find((variableName) => {
|
|
211
|
+
return seriesBuckets[variableName].has(groupKey);
|
|
212
|
+
});
|
|
213
|
+
const groupLabels = seriesBuckets[labelSource].get(groupKey).labels;
|
|
148
214
|
const seriesByVariable = {};
|
|
149
215
|
for (const variableName of referencedVariables) {
|
|
150
216
|
const buckets = seriesBuckets[variableName];
|
|
151
217
|
if (MetricFormulaEvaluator.isGroupedVariable(buckets, variableData[variableName])) {
|
|
152
|
-
seriesByVariable[variableName] = ((
|
|
218
|
+
seriesByVariable[variableName] = ((_b = buckets.get(groupKey)) === null || _b === void 0 ? void 0 : _b.samples) || [];
|
|
153
219
|
}
|
|
154
220
|
else {
|
|
155
221
|
// Ungrouped variable: broadcast to every group.
|
|
@@ -162,10 +228,105 @@ class MetricFormulaEvaluator {
|
|
|
162
228
|
referencedVariables,
|
|
163
229
|
seriesByVariable,
|
|
164
230
|
groupAttributes: groupLabels,
|
|
231
|
+
countingVariables: groupCountingVariables,
|
|
232
|
+
isStepSettled,
|
|
165
233
|
}));
|
|
166
234
|
}
|
|
167
235
|
return { data: resultData };
|
|
168
236
|
}
|
|
237
|
+
/*
|
|
238
|
+
* The variables of a formula that a missing point of reads as 0, in order
|
|
239
|
+
* of first appearance: the queries it references that count what happened
|
|
240
|
+
* (MetricZeroFill.isCountingQuery). Empty without `zeroFill`, for a
|
|
241
|
+
* formula that cannot be read, and for a formula of formulas' formula
|
|
242
|
+
* variables - a formula's own output already holds its zeros.
|
|
243
|
+
*/
|
|
244
|
+
static getCountingVariablesOfFormula(input) {
|
|
245
|
+
const zeroFill = input.zeroFill;
|
|
246
|
+
if (!zeroFill) {
|
|
247
|
+
return [];
|
|
248
|
+
}
|
|
249
|
+
return MetricFormulaEvaluator.getReferencedVariables(input.formula).filter((variable) => {
|
|
250
|
+
const queryConfig = input.queryConfigs.find((candidate) => {
|
|
251
|
+
var _a;
|
|
252
|
+
return ((((_a = candidate.metricAliasData) === null || _a === void 0 ? void 0 : _a.metricVariable) || "").toLowerCase() === variable);
|
|
253
|
+
});
|
|
254
|
+
return MetricZeroFill_1.default.isCountingQuery({
|
|
255
|
+
queryConfig,
|
|
256
|
+
semanticsByMetricName: zeroFill.semanticsByMetricName,
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/*
|
|
261
|
+
* The referenced query variables that count what happened, and whose read
|
|
262
|
+
* is whole: a read cut at its row limit, or to its top N series
|
|
263
|
+
* (AggregatedResult.truncated), lacks points that were only cut, and is
|
|
264
|
+
* never filled.
|
|
265
|
+
*/
|
|
266
|
+
static getCountingVariables(input) {
|
|
267
|
+
var _a, _b;
|
|
268
|
+
const countingVariables = new Set();
|
|
269
|
+
const zeroFill = input.zeroFill;
|
|
270
|
+
if (!zeroFill) {
|
|
271
|
+
return countingVariables;
|
|
272
|
+
}
|
|
273
|
+
for (const variableName of input.referencedVariables) {
|
|
274
|
+
const queryConfig = (_a = input.variableData[variableName]) === null || _a === void 0 ? void 0 : _a.queryConfig;
|
|
275
|
+
if (queryConfig &&
|
|
276
|
+
((_b = input.variableData[variableName]) === null || _b === void 0 ? void 0 : _b.result.truncated) !== true &&
|
|
277
|
+
MetricZeroFill_1.default.isCountingQuery({
|
|
278
|
+
queryConfig,
|
|
279
|
+
semanticsByMetricName: zeroFill.semanticsByMetricName,
|
|
280
|
+
})) {
|
|
281
|
+
countingVariables.add(variableName);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return countingVariables;
|
|
285
|
+
}
|
|
286
|
+
/*
|
|
287
|
+
* The grouped counting queries filled in a group they have no series in:
|
|
288
|
+
* grouped by their query's own attributes (a count grouped some other way
|
|
289
|
+
* has labels nothing can be told apart by), and by the same attributes as
|
|
290
|
+
* the groups are - those of the first grouped variable that must have a
|
|
291
|
+
* point. When every grouped variable is such a count, the groups are any
|
|
292
|
+
* of theirs, so they must all be grouped alike: counts grouped by service
|
|
293
|
+
* and by region are never filled into each other's groups. The rest are
|
|
294
|
+
* matched group by group like any other grouped variable.
|
|
295
|
+
*/
|
|
296
|
+
static getFillableGroupedVariables(input) {
|
|
297
|
+
const candidates = input.groupedVariables.filter((variableName) => {
|
|
298
|
+
var _a;
|
|
299
|
+
return (input.countingVariables.has(variableName) &&
|
|
300
|
+
(((_a = input.variableData[variableName]) === null || _a === void 0 ? void 0 : _a.groupByAttributeKeys.length) || 0) >
|
|
301
|
+
0);
|
|
302
|
+
});
|
|
303
|
+
if (candidates.length === 0) {
|
|
304
|
+
return [];
|
|
305
|
+
}
|
|
306
|
+
const others = input.groupedVariables.filter((variableName) => {
|
|
307
|
+
return !candidates.includes(variableName);
|
|
308
|
+
});
|
|
309
|
+
const keysOf = (variableName) => {
|
|
310
|
+
var _a, _b, _c;
|
|
311
|
+
const queryKeys = ((_a = input.variableData[variableName]) === null || _a === void 0 ? void 0 : _a.groupByAttributeKeys) || [];
|
|
312
|
+
const keys = queryKeys.length > 0
|
|
313
|
+
? queryKeys
|
|
314
|
+
: Object.keys(((_c = (_b = input.seriesBuckets[variableName]) === null || _b === void 0 ? void 0 : _b.values().next().value) === null || _c === void 0 ? void 0 : _c.labels) || {});
|
|
315
|
+
return Array.from(new Set(keys)).sort().join("\u0000");
|
|
316
|
+
};
|
|
317
|
+
if (others.length > 0) {
|
|
318
|
+
const groupKeys = keysOf(others[0]);
|
|
319
|
+
return candidates.filter((variableName) => {
|
|
320
|
+
return keysOf(variableName) === groupKeys;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const groupKeys = keysOf(candidates[0]);
|
|
324
|
+
return candidates.every((variableName) => {
|
|
325
|
+
return keysOf(variableName) === groupKeys;
|
|
326
|
+
})
|
|
327
|
+
? candidates
|
|
328
|
+
: [];
|
|
329
|
+
}
|
|
169
330
|
/**
|
|
170
331
|
* Return the set of variables referenced by a formula, preserving the
|
|
171
332
|
* order of first appearance. Variable names are lower-cased to match
|
|
@@ -326,7 +487,7 @@ class MetricFormulaEvaluator {
|
|
|
326
487
|
return null;
|
|
327
488
|
}
|
|
328
489
|
static buildVariableResultMap(input) {
|
|
329
|
-
var _a, _b, _c, _d
|
|
490
|
+
var _a, _b, _c, _d;
|
|
330
491
|
const variableMap = {};
|
|
331
492
|
const totalSeries = input.queryConfigs.length + input.formulaConfigs.length;
|
|
332
493
|
for (let index = 0; index < totalSeries; index++) {
|
|
@@ -336,18 +497,18 @@ class MetricFormulaEvaluator {
|
|
|
336
497
|
}
|
|
337
498
|
let alias;
|
|
338
499
|
let groupByAttributeKeys = [];
|
|
500
|
+
let queryConfig = undefined;
|
|
339
501
|
if (index < input.queryConfigs.length) {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
groupByAttributeKeys = (((_d = (_c = input.queryConfigs[index]) === null || _c === void 0 ? void 0 : _c.metricQueryData) === null || _d === void 0 ? void 0 : _d.groupByAttributeKeys) || []).filter((key) => {
|
|
502
|
+
queryConfig = input.queryConfigs[index];
|
|
503
|
+
alias = ((_a = queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.metricAliasData) === null || _a === void 0 ? void 0 : _a.metricVariable) || undefined;
|
|
504
|
+
groupByAttributeKeys = (((_b = queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.metricQueryData) === null || _b === void 0 ? void 0 : _b.groupByAttributeKeys) || []).filter((key) => {
|
|
344
505
|
return Boolean(key);
|
|
345
506
|
});
|
|
346
507
|
}
|
|
347
508
|
else {
|
|
348
509
|
const formulaIndex = index - input.queryConfigs.length;
|
|
349
510
|
alias =
|
|
350
|
-
((
|
|
511
|
+
((_d = (_c = input.formulaConfigs[formulaIndex]) === null || _c === void 0 ? void 0 : _c.metricAliasData) === null || _d === void 0 ? void 0 : _d.metricVariable) ||
|
|
351
512
|
undefined;
|
|
352
513
|
}
|
|
353
514
|
if (!alias) {
|
|
@@ -356,6 +517,7 @@ class MetricFormulaEvaluator {
|
|
|
356
517
|
variableMap[alias.toLowerCase()] = {
|
|
357
518
|
result,
|
|
358
519
|
groupByAttributeKeys,
|
|
520
|
+
queryConfig,
|
|
359
521
|
};
|
|
360
522
|
}
|
|
361
523
|
return variableMap;
|
|
@@ -373,7 +535,8 @@ class MetricFormulaEvaluator {
|
|
|
373
535
|
* keep the observed >=2 heuristic. A config-grouped variable with an
|
|
374
536
|
* EMPTY result intentionally classifies as ungrouped: it degrades to
|
|
375
537
|
* per-point gaps (empty output) instead of a structural
|
|
376
|
-
* no-groups-in-common error
|
|
538
|
+
* no-groups-in-common error - or, when it counts what happened (a
|
|
539
|
+
* failures query nothing failed in), to a 0 in every group.
|
|
377
540
|
*
|
|
378
541
|
* Only consulted once the grouped path has engaged — the passthrough
|
|
379
542
|
* gate in evaluateFormula deliberately does NOT use this predicate,
|
|
@@ -476,21 +639,53 @@ class MetricFormulaEvaluator {
|
|
|
476
639
|
* point. Points missing a value for any referenced variable are
|
|
477
640
|
* skipped (a partial join would produce misleading numbers — e.g.
|
|
478
641
|
* treating a gap as zero silently when using subtraction), as are
|
|
479
|
-
* non-finite results like divide-by-zero.
|
|
480
|
-
*
|
|
642
|
+
* non-finite results like divide-by-zero. The one exception is a
|
|
643
|
+
* counting query's missing point (`countingVariables`), which is 0 in a
|
|
644
|
+
* step another variable has a point in, once the step is settled: that
|
|
645
|
+
* query counted nothing there (MetricZeroFill). A point that is there
|
|
646
|
+
* with no number is never one to fill. Structural formula errors are
|
|
647
|
+
* impossible here: the RPN's arity is validated at parse time.
|
|
481
648
|
*/
|
|
482
649
|
static evaluatePointwise(input) {
|
|
483
650
|
const timestampIndex = MetricFormulaEvaluator.buildTimestampIndex(input.referencedVariables, input.seriesByVariable);
|
|
484
651
|
const sortedTimestamps = Array.from(timestampIndex.keys()).sort();
|
|
652
|
+
const countingVariables = input.countingVariables || new Set();
|
|
485
653
|
const resultData = [];
|
|
486
654
|
for (const timestampString of sortedTimestamps) {
|
|
487
|
-
const values = timestampIndex.get(timestampString) ||
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
655
|
+
const values = timestampIndex.get(timestampString) ||
|
|
656
|
+
MetricFormulaEvaluator.createStepValues();
|
|
657
|
+
const missingVariables = [];
|
|
658
|
+
let hasValueThatIsNotANumber = false;
|
|
659
|
+
for (const variable of input.referencedVariables) {
|
|
660
|
+
if (!Object.prototype.hasOwnProperty.call(values, variable)) {
|
|
661
|
+
missingVariables.push(variable);
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
if (typeof values[variable] !== "number") {
|
|
665
|
+
hasValueThatIsNotANumber = true;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (hasValueThatIsNotANumber) {
|
|
492
669
|
continue;
|
|
493
670
|
}
|
|
671
|
+
if (missingVariables.length > 0) {
|
|
672
|
+
/*
|
|
673
|
+
* Every timestamp here is one some variable has a point at, so a
|
|
674
|
+
* step none of them has a point in never reaches this.
|
|
675
|
+
*/
|
|
676
|
+
const readsMissingAsZero = missingVariables.length < input.referencedVariables.length &&
|
|
677
|
+
missingVariables.every((variable) => {
|
|
678
|
+
return countingVariables.has(variable);
|
|
679
|
+
}) &&
|
|
680
|
+
(!input.isStepSettled ||
|
|
681
|
+
input.isStepSettled(new Date(timestampString)));
|
|
682
|
+
if (!readsMissingAsZero) {
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
for (const variable of missingVariables) {
|
|
686
|
+
values[variable] = 0;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
494
689
|
const evaluated = MetricFormulaEvaluator.evaluateRpn(input.rpn, values);
|
|
495
690
|
if (!Number.isFinite(evaluated)) {
|
|
496
691
|
continue;
|
|
@@ -516,15 +711,24 @@ class MetricFormulaEvaluator {
|
|
|
516
711
|
}
|
|
517
712
|
for (const sample of series) {
|
|
518
713
|
const timestampKey = MetricFormulaEvaluator.normalizeTimestamp(sample.timestamp);
|
|
519
|
-
|
|
520
|
-
|
|
714
|
+
let bucket = index.get(timestampKey);
|
|
715
|
+
if (!bucket) {
|
|
716
|
+
bucket = MetricFormulaEvaluator.createStepValues();
|
|
717
|
+
index.set(timestampKey, bucket);
|
|
521
718
|
}
|
|
522
|
-
const bucket = index.get(timestampKey) || {};
|
|
523
719
|
bucket[variable] = sample.value;
|
|
524
720
|
}
|
|
525
721
|
}
|
|
526
722
|
return index;
|
|
527
723
|
}
|
|
724
|
+
/*
|
|
725
|
+
* A step's values with no prototype: a variable named constructor or
|
|
726
|
+
* toString is there only when it has a point, and one named __proto__ is
|
|
727
|
+
* a key like any other.
|
|
728
|
+
*/
|
|
729
|
+
static createStepValues() {
|
|
730
|
+
return Object.create(null);
|
|
731
|
+
}
|
|
528
732
|
static normalizeTimestamp(timestamp) {
|
|
529
733
|
if (timestamp instanceof Date) {
|
|
530
734
|
return timestamp.toISOString();
|
|
@@ -77,7 +77,13 @@ class MetricResultUnitConverter {
|
|
|
77
77
|
value: convertedValue,
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
/*
|
|
81
|
+
* The read's own word on itself stays with it: whether it was cut at
|
|
82
|
+
* its row limit or to its top N series (truncated, totalGroups) is what
|
|
83
|
+
* a chart's "Showing top k of N" says and what a formula does not read
|
|
84
|
+
* a missing point of as 0 for (MetricZeroFill).
|
|
85
|
+
*/
|
|
86
|
+
return { ...input.result, data: convertedData };
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
exports.default = MetricResultUnitConverter;
|
|
@@ -16,5 +16,9 @@ export default class MetricSeriesArrivalUtil {
|
|
|
16
16
|
aggregates: MetricSeriesArrivalAggregates;
|
|
17
17
|
}): MetricSeriesArrival | null;
|
|
18
18
|
static combine(arrivals: Array<MetricSeriesArrival | null | undefined>): MetricSeriesArrival | null;
|
|
19
|
+
static combineForFormula(input: {
|
|
20
|
+
read: Array<MetricSeriesArrival | null | undefined>;
|
|
21
|
+
filled: Array<MetricSeriesArrival | null | undefined>;
|
|
22
|
+
}): MetricSeriesArrival | null;
|
|
19
23
|
private static isTime;
|
|
20
24
|
}
|
|
@@ -16,5 +16,9 @@ export default class MetricSeriesArrivalUtil {
|
|
|
16
16
|
aggregates: MetricSeriesArrivalAggregates;
|
|
17
17
|
}): MetricSeriesArrival | null;
|
|
18
18
|
static combine(arrivals: Array<MetricSeriesArrival | null | undefined>): MetricSeriesArrival | null;
|
|
19
|
+
static combineForFormula(input: {
|
|
20
|
+
read: Array<MetricSeriesArrival | null | undefined>;
|
|
21
|
+
filled: Array<MetricSeriesArrival | null | undefined>;
|
|
22
|
+
}): MetricSeriesArrival | null;
|
|
19
23
|
private static isTime;
|
|
20
24
|
}
|
|
@@ -73,6 +73,33 @@ class MetricSeriesArrivalUtil {
|
|
|
73
73
|
}
|
|
74
74
|
return combined;
|
|
75
75
|
}
|
|
76
|
+
/*
|
|
77
|
+
* The arrival of a formula that reads some of its queries' missing points
|
|
78
|
+
* as 0 (MetricZeroFill): `filled` are those queries' arrivals, `read` the
|
|
79
|
+
* arrivals of the variables it needs a point of. A query that counts what
|
|
80
|
+
* happened sends nothing while nothing happens - a failures query after
|
|
81
|
+
* the last failure - so its silence is never the formula's: the formula's
|
|
82
|
+
* points are timed by the variables it needs, and it is as fresh as they
|
|
83
|
+
* are (combine). When it needs none, it has a point wherever any of its
|
|
84
|
+
* queries has one: it is as fresh as the freshest of them, and fresh when
|
|
85
|
+
* one of them was not read (not behind, or no data to be behind).
|
|
86
|
+
*/
|
|
87
|
+
static combineForFormula(input) {
|
|
88
|
+
if (input.read.length > 0 || input.filled.length === 0) {
|
|
89
|
+
return MetricSeriesArrivalUtil.combine(input.read);
|
|
90
|
+
}
|
|
91
|
+
let freshest = null;
|
|
92
|
+
for (const arrival of input.filled) {
|
|
93
|
+
if (!arrival) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
if (!freshest ||
|
|
97
|
+
arrival.sinceNewestArrivalMs < freshest.sinceNewestArrivalMs) {
|
|
98
|
+
freshest = arrival;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return freshest ? { ...freshest } : null;
|
|
102
|
+
}
|
|
76
103
|
static isTime(value) {
|
|
77
104
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
78
105
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AggregationTemporality } from "../../Models/AnalyticsModels/Metric.mjs";
|
|
2
|
+
import AggregationInterval from "../../Types/BaseDatabase/AggregationInterval.mjs";
|
|
3
|
+
import MetricQueryConfigData from "../../Types/Metrics/MetricQueryConfigData.mjs";
|
|
4
|
+
import Timezone from "../../Types/Timezone.mjs";
|
|
5
|
+
export interface MetricPointSemantics {
|
|
6
|
+
isMonotonic?: boolean | null | undefined;
|
|
7
|
+
aggregationTemporality?: AggregationTemporality | string | null | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface MetricPointSemanticsSource extends MetricPointSemantics {
|
|
10
|
+
name?: string | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface MetricZeroFillOptions {
|
|
13
|
+
semanticsByMetricName: ReadonlyMap<string, MetricPointSemantics>;
|
|
14
|
+
isStepSettled?: ((stepStart: Date) => boolean) | undefined;
|
|
15
|
+
}
|
|
16
|
+
export default class MetricZeroFill {
|
|
17
|
+
static readonly SETTLE_MS: number;
|
|
18
|
+
static countsWhatHappened(semantics: MetricPointSemantics | null | undefined): boolean;
|
|
19
|
+
static isCountingQuery(input: {
|
|
20
|
+
queryConfig: MetricQueryConfigData | null | undefined;
|
|
21
|
+
semanticsByMetricName: ReadonlyMap<string, MetricPointSemantics>;
|
|
22
|
+
}): boolean;
|
|
23
|
+
static getSemanticsByMetricName(metricTypes: ReadonlyArray<MetricPointSemanticsSource | null | undefined>): Map<string, MetricPointSemantics>;
|
|
24
|
+
static isStepSettled(input: {
|
|
25
|
+
stepStart: Date;
|
|
26
|
+
window: {
|
|
27
|
+
startDate: Date;
|
|
28
|
+
endDate: Date;
|
|
29
|
+
};
|
|
30
|
+
aggregationInterval: AggregationInterval;
|
|
31
|
+
timezone?: Timezone | undefined;
|
|
32
|
+
readAt: Date;
|
|
33
|
+
}): boolean;
|
|
34
|
+
static getOptions(input: {
|
|
35
|
+
metricTypes: ReadonlyArray<MetricPointSemanticsSource | null | undefined>;
|
|
36
|
+
window: {
|
|
37
|
+
startDate: Date;
|
|
38
|
+
endDate: Date;
|
|
39
|
+
};
|
|
40
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
41
|
+
readsWholeWindow?: boolean | undefined;
|
|
42
|
+
timezone?: Timezone | undefined;
|
|
43
|
+
readAt: Date;
|
|
44
|
+
}): MetricZeroFillOptions;
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AggregationTemporality } from "../../Models/AnalyticsModels/Metric";
|
|
2
|
+
import AggregationInterval from "../../Types/BaseDatabase/AggregationInterval";
|
|
3
|
+
import MetricQueryConfigData from "../../Types/Metrics/MetricQueryConfigData";
|
|
4
|
+
import Timezone from "../../Types/Timezone";
|
|
5
|
+
export interface MetricPointSemantics {
|
|
6
|
+
isMonotonic?: boolean | null | undefined;
|
|
7
|
+
aggregationTemporality?: AggregationTemporality | string | null | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface MetricPointSemanticsSource extends MetricPointSemantics {
|
|
10
|
+
name?: string | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface MetricZeroFillOptions {
|
|
13
|
+
semanticsByMetricName: ReadonlyMap<string, MetricPointSemantics>;
|
|
14
|
+
isStepSettled?: ((stepStart: Date) => boolean) | undefined;
|
|
15
|
+
}
|
|
16
|
+
export default class MetricZeroFill {
|
|
17
|
+
static readonly SETTLE_MS: number;
|
|
18
|
+
static countsWhatHappened(semantics: MetricPointSemantics | null | undefined): boolean;
|
|
19
|
+
static isCountingQuery(input: {
|
|
20
|
+
queryConfig: MetricQueryConfigData | null | undefined;
|
|
21
|
+
semanticsByMetricName: ReadonlyMap<string, MetricPointSemantics>;
|
|
22
|
+
}): boolean;
|
|
23
|
+
static getSemanticsByMetricName(metricTypes: ReadonlyArray<MetricPointSemanticsSource | null | undefined>): Map<string, MetricPointSemantics>;
|
|
24
|
+
static isStepSettled(input: {
|
|
25
|
+
stepStart: Date;
|
|
26
|
+
window: {
|
|
27
|
+
startDate: Date;
|
|
28
|
+
endDate: Date;
|
|
29
|
+
};
|
|
30
|
+
aggregationInterval: AggregationInterval;
|
|
31
|
+
timezone?: Timezone | undefined;
|
|
32
|
+
readAt: Date;
|
|
33
|
+
}): boolean;
|
|
34
|
+
static getOptions(input: {
|
|
35
|
+
metricTypes: ReadonlyArray<MetricPointSemanticsSource | null | undefined>;
|
|
36
|
+
window: {
|
|
37
|
+
startDate: Date;
|
|
38
|
+
endDate: Date;
|
|
39
|
+
};
|
|
40
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
41
|
+
readsWholeWindow?: boolean | undefined;
|
|
42
|
+
timezone?: Timezone | undefined;
|
|
43
|
+
readAt: Date;
|
|
44
|
+
}): MetricZeroFillOptions;
|
|
45
|
+
}
|