@oneuptime/common 14.0.109 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/SecurityEvent.js +1 -1
- package/Models/DatabaseModels/AIInsight.js +2 -2
- package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.js +20 -4
- package/Models/DatabaseModels/AlertEpisode.js +2 -2
- package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
- package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertSeverity.js +13 -4
- package/Models/DatabaseModels/AlertState.js +1 -1
- package/Models/DatabaseModels/CallLog.js +12 -12
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/EmailLog.js +14 -14
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +6 -6
- package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
- package/Models/DatabaseModels/GlobalConfig.js +74 -45
- package/Models/DatabaseModels/Incident.js +20 -4
- package/Models/DatabaseModels/IncidentEpisode.js +2 -2
- package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
- package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentSeverity.js +13 -4
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/IncidentState.js +1 -1
- package/Models/DatabaseModels/IncidentTemplate.js +2 -2
- package/Models/DatabaseModels/Index.js +4 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +54 -20
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +64 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +28 -11
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +16 -11
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +3 -0
- package/Models/DatabaseModels/Project.d.ts +3 -0
- package/Models/DatabaseModels/Project.js +142 -5
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/PushNotificationLog.js +12 -12
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +8 -2
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +9 -6
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +10 -7
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/Service.js +1 -1
- package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
- package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
- package/Models/DatabaseModels/SmsLog.js +12 -12
- package/Models/DatabaseModels/StatusPage.js +5 -5
- package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelegramLog.js +12 -12
- package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
- package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
- package/Models/DatabaseModels/User.d.mts +4 -0
- package/Models/DatabaseModels/User.d.ts +4 -0
- package/Models/DatabaseModels/User.js +100 -0
- package/Models/DatabaseModels/UserOnCallLog.js +6 -6
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
- package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
- package/Models/DatabaseModels/WebhookLog.js +12 -12
- package/Models/DatabaseModels/WhatsAppLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +25 -1
- package/Types/AI/AIActionWords.d.ts +25 -1
- package/Types/AI/AIActionWords.js +166 -3
- package/Types/AI/AIActionWords.mjs +6 -0
- package/Types/AI/AIChatTypes.d.mts +4 -2
- package/Types/AI/AIChatTypes.d.ts +4 -2
- package/Types/AI/AIChatTypes.js +5 -0
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +45 -0
- package/Types/AI/AiRunRefusal.d.ts +45 -0
- package/Types/AI/AiRunRefusal.js +187 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/Analytics/ProductEvent.d.mts +6 -1
- package/Types/Analytics/ProductEvent.d.ts +6 -1
- package/Types/Analytics/ProductEvent.js +41 -0
- package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
- package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
- package/Types/AuditLog/AuditLogCoverage.js +4 -2
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +33 -3
- package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.js +102 -65
- package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
- package/Types/Database/TableMetadata.d.mts +2 -0
- package/Types/Database/TableMetadata.d.ts +2 -0
- package/Types/Database/TableMetadata.js +6 -0
- package/Types/Date.d.mts +26 -2
- package/Types/Date.d.ts +26 -2
- package/Types/Date.js +81 -9
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +44 -2
- package/Types/DateLanguage.mjs +2 -0
- package/Types/DirectionArrow.d.mts +7 -0
- package/Types/DirectionArrow.d.ts +7 -0
- package/Types/DirectionArrow.js +88 -0
- package/Types/DirectionArrow.mjs +7 -0
- package/Types/Docs/GlossaryTerm.d.mts +1 -0
- package/Types/Docs/GlossaryTerm.d.ts +1 -0
- package/Types/Docs/GlossaryTerm.js +2 -0
- package/Types/Docs/RetiredNames.d.mts +11 -0
- package/Types/Docs/RetiredNames.d.ts +11 -0
- package/Types/Docs/RetiredNames.js +139 -0
- package/Types/Docs/RetiredNames.mjs +3 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Exception/RefusalWithValues.d.mts +7 -0
- package/Types/Exception/RefusalWithValues.d.ts +7 -0
- package/Types/Exception/RefusalWithValues.js +76 -0
- package/Types/Exception/RefusalWithValues.mjs +3 -0
- package/Types/Exception/UnexplainedError.d.mts +13 -0
- package/Types/Exception/UnexplainedError.d.ts +13 -0
- package/Types/Exception/UnexplainedError.js +53 -1
- package/Types/Exception/UnexplainedError.mjs +1 -0
- package/Types/File/FileSize.d.mts +4 -1
- package/Types/File/FileSize.d.ts +4 -1
- package/Types/File/FileSize.js +18 -17
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/HostCollector/HostCollector.d.mts +1 -0
- package/Types/HostCollector/HostCollector.d.ts +1 -0
- package/Types/HostCollector/HostCollector.js +26 -10
- package/Types/HostCollector/HostCollector.mjs +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/Monitor/MonitorCriteria.js +2 -2
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/MonitorStep.js +1 -1
- package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/Monitor/WhoIsTold.d.mts +3 -1
- package/Types/Monitor/WhoIsTold.d.ts +3 -1
- package/Types/Monitor/WhoIsTold.js +2 -1
- package/Types/NotificationRule/PagingLadder.d.mts +137 -0
- package/Types/NotificationRule/PagingLadder.d.ts +137 -0
- package/Types/NotificationRule/PagingLadder.js +682 -0
- package/Types/NotificationRule/PagingLadder.mjs +28 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
- package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/Permission.d.mts +2 -2
- package/Types/Permission.d.ts +2 -2
- package/Types/Permission.js +196 -195
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/Product/ProductCatalog.d.mts +10 -0
- package/Types/Product/ProductCatalog.d.ts +10 -0
- package/Types/Product/ProductCatalog.js +208 -0
- package/Types/Product/ProductCatalog.mjs +6 -0
- package/Types/Product/ProductOfTable.d.mts +3 -0
- package/Types/Product/ProductOfTable.d.ts +3 -0
- package/Types/Product/ProductOfTable.js +68 -0
- package/Types/Product/ProductOfTable.mjs +3 -0
- package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
- package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
- package/Types/Product/ProjectProductsAnswer.js +35 -2
- package/Types/Product/ProjectProductsAnswer.mjs +1 -0
- package/Types/Product/ServerProducts.d.mts +65 -0
- package/Types/Product/ServerProducts.d.ts +65 -0
- package/Types/Product/ServerProducts.js +383 -0
- package/Types/Product/ServerProducts.mjs +26 -0
- package/Types/Product/ServerProductsAnswer.d.mts +21 -0
- package/Types/Product/ServerProductsAnswer.d.ts +21 -0
- package/Types/Product/ServerProductsAnswer.js +78 -0
- package/Types/Product/ServerProductsAnswer.mjs +5 -0
- package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
- package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
- package/Types/ProductFeedback/ProductFeedback.js +8 -0
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
- package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
- package/Types/SampleProject/SampleProject.d.mts +54 -0
- package/Types/SampleProject/SampleProject.d.ts +54 -0
- package/Types/SampleProject/SampleProject.js +177 -0
- package/Types/SampleProject/SampleProject.mjs +22 -0
- package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
- package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
- package/Types/SampleProject/SampleProjectContent.js +397 -0
- package/Types/SampleProject/SampleProjectContent.mjs +18 -0
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +54 -12
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +414 -50
- package/Types/Translator.mjs +1 -0
- package/Types/UsedBy/UsedBy.d.mts +103 -0
- package/Types/UsedBy/UsedBy.d.ts +103 -0
- package/Types/UsedBy/UsedBy.js +389 -0
- package/Types/UsedBy/UsedBy.mjs +20 -0
- package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
- package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
- package/Types/UsedBy/UsedByServerProducts.js +48 -0
- package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
- package/Types/Workflow/PassedOnFields.js +2 -1
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +3 -3
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +28 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/AI/MeaningMatch.d.mts +36 -0
- package/Utils/AI/MeaningMatch.d.ts +36 -0
- package/Utils/AI/MeaningMatch.js +535 -0
- package/Utils/AI/MeaningMatch.mjs +7 -0
- package/Utils/ArchivableValues.js +1 -1
- package/Utils/AuditLog/AuditLogValues.js +2 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
- package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DataSecurity/TextScanner.js +2 -2
- package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
- package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
- package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
- package/Utils/DeveloperDocs/CliCommands.js +2 -1
- package/Utils/DeveloperDocs/CliResources.js +2 -1
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
- package/Utils/Markdown/MarkdownTableCell.js +2 -1
- package/Utils/Markdown/OverLongText.js +523 -5
- package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
- package/Utils/Markdown/SlowMarkdown.js +595 -11
- package/Utils/Markdown/SlowMarkdown.mjs +6 -0
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/ModelApiName.d.mts +11 -0
- package/Utils/ModelApiName.d.ts +11 -0
- package/Utils/ModelApiName.js +72 -0
- package/Utils/ModelApiName.mjs +5 -0
- package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +97 -22
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
- package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
- package/Utils/Monitor/ProbeFailureReading.js +137 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/OpenStack/OpenStackCheckName.js +2 -1
- package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
- package/Utils/OpenStack/OpenStackLogs.js +3 -2
- package/Utils/OpenStack/OpenStackTraces.js +2 -1
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/Project/NotificationChannels.js +5 -5
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.js +2 -2
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +965 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +218 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +199 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +831 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +9 -0
- package/Utils/PromQL/PromQLRegex.d.ts +9 -0
- package/Utils/PromQL/PromQLRegex.js +74 -0
- package/Utils/PromQL/PromQLRegex.mjs +2 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +90 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +4 -0
- package/Utils/Rum/UrlScrubber.d.ts +4 -0
- package/Utils/Rum/UrlScrubber.js +143 -3
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +180 -25
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
- package/Utils/ScheduledMaintenanceStart.js +9 -0
- package/Utils/Schema/ModelSchema.js +10 -1
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/StateOrder.js +1 -4
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
- package/Utils/ValueFormatter.d.mts +8 -6
- package/Utils/ValueFormatter.d.ts +8 -6
- package/Utils/ValueFormatter.js +145 -0
- package/package.json +1 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AI_RUN_REFUSAL_CODE_FIELD = exports.AI_RUN_REFUSALS = exports.AiRunRefusalCode = void 0;
|
|
4
|
+
exports.isAiRunRefusalCode = isAiRunRefusalCode;
|
|
5
|
+
exports.getAiRunRefusalMessage = getAiRunRefusalMessage;
|
|
6
|
+
exports.readAiRunRefusalCode = readAiRunRefusalCode;
|
|
7
|
+
exports.getRecordNotFoundRefusal = getRecordNotFoundRefusal;
|
|
8
|
+
exports.getNotAllowedRefusal = getNotAllowedRefusal;
|
|
9
|
+
exports.getNoInvestigationRefusal = getNoInvestigationRefusal;
|
|
10
|
+
exports.getInvestigationRunningRefusal = getInvestigationRunningRefusal;
|
|
11
|
+
exports.getRecordAiTokenLimitRefusal = getRecordAiTokenLimitRefusal;
|
|
12
|
+
const Translator_1 = require("../Translator");
|
|
13
|
+
const RecordAiTokenLimit_1 = require("./RecordAiTokenLimit");
|
|
14
|
+
/*
|
|
15
|
+
* WHY ONEUPTIME AI DID NOT START A RUN SOMEONE ASKED FOR, AS A CODE AND
|
|
16
|
+
* ONE SENTENCE (#7359).
|
|
17
|
+
*
|
|
18
|
+
* An incident's or alert's AI card has two buttons that ask the server to
|
|
19
|
+
* start an investigation - Try again on the failure notice, and Investigate
|
|
20
|
+
* now while a rule waits - and an AI insight's card has Try again for its
|
|
21
|
+
* triage. When the server refuses, the card shows why under the button.
|
|
22
|
+
*
|
|
23
|
+
* The server answers the refusal as bad data (400) with its English
|
|
24
|
+
* sentence as the message, for the API and for older Dashboards, and with
|
|
25
|
+
* the refusal's code beside it (AI_RUN_REFUSAL_CODE_FIELD). The Dashboard
|
|
26
|
+
* words the code itself, in the reader's language (AiRunFailureWords'
|
|
27
|
+
* describeAiRunRefusal): the sentences below are its translation keys, so a
|
|
28
|
+
* sentence changed here is a new key every language must word before the
|
|
29
|
+
* Dashboard's extract test passes. A refusal of who may (403, no code) is
|
|
30
|
+
* one of these sentences too, and is worded by its text.
|
|
31
|
+
*
|
|
32
|
+
* Every refusal is one whole sentence per code - incident and alert each
|
|
33
|
+
* have their own, so a language words each its own way - and none carries
|
|
34
|
+
* a number or a name, so none needs values. The sentences that other
|
|
35
|
+
* messages share (the AI credits, the project's daily AI limits, a
|
|
36
|
+
* record's own daily AI token limit) are those messages, word for word: a
|
|
37
|
+
* test holds each to its source.
|
|
38
|
+
*
|
|
39
|
+
* Pure, with no Node or browser APIs: the server and the Dashboard both
|
|
40
|
+
* read it.
|
|
41
|
+
*/
|
|
42
|
+
var AiRunRefusalCode;
|
|
43
|
+
(function (AiRunRefusalCode) {
|
|
44
|
+
// The record is gone, or the person may not read it.
|
|
45
|
+
AiRunRefusalCode["IncidentNotFound"] = "incident_not_found";
|
|
46
|
+
AiRunRefusalCode["AlertNotFound"] = "alert_not_found";
|
|
47
|
+
// The person may read the record but not change it (403).
|
|
48
|
+
AiRunRefusalCode["IncidentTryAgainNotAllowed"] = "incident_try_again_not_allowed";
|
|
49
|
+
AiRunRefusalCode["AlertTryAgainNotAllowed"] = "alert_try_again_not_allowed";
|
|
50
|
+
AiRunRefusalCode["IncidentInvestigateNowNotAllowed"] = "incident_investigate_now_not_allowed";
|
|
51
|
+
AiRunRefusalCode["AlertInvestigateNowNotAllowed"] = "alert_investigate_now_not_allowed";
|
|
52
|
+
// An investigation's Try again.
|
|
53
|
+
AiRunRefusalCode["IncidentHasNoInvestigation"] = "incident_has_no_investigation";
|
|
54
|
+
AiRunRefusalCode["AlertHasNoInvestigation"] = "alert_has_no_investigation";
|
|
55
|
+
AiRunRefusalCode["IncidentInvestigationRunning"] = "incident_investigation_running";
|
|
56
|
+
AiRunRefusalCode["AlertInvestigationRunning"] = "alert_investigation_running";
|
|
57
|
+
AiRunRefusalCode["InvestigationFinished"] = "investigation_finished";
|
|
58
|
+
AiRunRefusalCode["InvestigationNotQueued"] = "investigation_not_queued";
|
|
59
|
+
// Investigate now, while an investigation rule waits.
|
|
60
|
+
AiRunRefusalCode["NotWaiting"] = "not_waiting";
|
|
61
|
+
AiRunRefusalCode["AlreadyInvestigated"] = "already_investigated";
|
|
62
|
+
AiRunRefusalCode["InvestigationNotStarted"] = "investigation_not_started";
|
|
63
|
+
// What stops OneUptime AI for the whole project.
|
|
64
|
+
AiRunRefusalCode["AiOff"] = "ai_off";
|
|
65
|
+
AiRunRefusalCode["NoProviderToInvestigate"] = "no_provider_to_investigate";
|
|
66
|
+
AiRunRefusalCode["AiCreditsUsedUp"] = "ai_credits_used_up";
|
|
67
|
+
AiRunRefusalCode["ProjectDailyLimitReached"] = "project_daily_limit_reached";
|
|
68
|
+
// The incident's (alert's) own daily AI token limit (#7157).
|
|
69
|
+
AiRunRefusalCode["IncidentTokenLimitPaused"] = "incident_token_limit_paused";
|
|
70
|
+
AiRunRefusalCode["IncidentTokenLimitUsedUp"] = "incident_token_limit_used_up";
|
|
71
|
+
AiRunRefusalCode["AlertTokenLimitPaused"] = "alert_token_limit_paused";
|
|
72
|
+
AiRunRefusalCode["AlertTokenLimitUsedUp"] = "alert_token_limit_used_up";
|
|
73
|
+
// An AI insight's triage Try again.
|
|
74
|
+
AiRunRefusalCode["InsightNotFound"] = "insight_not_found";
|
|
75
|
+
AiRunRefusalCode["InsightTriageRunning"] = "insight_triage_running";
|
|
76
|
+
AiRunRefusalCode["TriageFinished"] = "triage_finished";
|
|
77
|
+
AiRunRefusalCode["InsightsOff"] = "insights_off";
|
|
78
|
+
AiRunRefusalCode["NoProviderToTriage"] = "no_provider_to_triage";
|
|
79
|
+
AiRunRefusalCode["TriageNotQueued"] = "triage_not_queued";
|
|
80
|
+
AiRunRefusalCode["TriageNotStarted"] = "triage_not_started";
|
|
81
|
+
})(AiRunRefusalCode || (exports.AiRunRefusalCode = AiRunRefusalCode = {}));
|
|
82
|
+
// Each refusal's sentence: the server's message, and the Dashboard's key.
|
|
83
|
+
exports.AI_RUN_REFUSALS = {
|
|
84
|
+
[AiRunRefusalCode.IncidentNotFound]: (0, Translator_1.translationKey)("Incident not found (or you do not have access to it)."),
|
|
85
|
+
[AiRunRefusalCode.AlertNotFound]: (0, Translator_1.translationKey)("Alert not found (or you do not have access to it)."),
|
|
86
|
+
[AiRunRefusalCode.IncidentTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation again."),
|
|
87
|
+
[AiRunRefusalCode.AlertTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation again."),
|
|
88
|
+
[AiRunRefusalCode.IncidentInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation."),
|
|
89
|
+
[AiRunRefusalCode.AlertInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation."),
|
|
90
|
+
[AiRunRefusalCode.IncidentHasNoInvestigation]: (0, Translator_1.translationKey)("This incident has no investigation to try again."),
|
|
91
|
+
[AiRunRefusalCode.AlertHasNoInvestigation]: (0, Translator_1.translationKey)("This alert has no investigation to try again."),
|
|
92
|
+
[AiRunRefusalCode.IncidentInvestigationRunning]: (0, Translator_1.translationKey)("This incident's investigation is queued or running already."),
|
|
93
|
+
[AiRunRefusalCode.AlertInvestigationRunning]: (0, Translator_1.translationKey)("This alert's investigation is queued or running already."),
|
|
94
|
+
[AiRunRefusalCode.InvestigationFinished]: (0, Translator_1.translationKey)("Only an investigation that did not finish can be tried again."),
|
|
95
|
+
[AiRunRefusalCode.InvestigationNotQueued]: (0, Translator_1.translationKey)("The investigation could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
|
|
96
|
+
[AiRunRefusalCode.NotWaiting]: (0, Translator_1.translationKey)("OneUptime AI is no longer waiting to investigate this. Refresh to see where it stands."),
|
|
97
|
+
[AiRunRefusalCode.AlreadyInvestigated]: (0, Translator_1.translationKey)("OneUptime AI has already started investigating this."),
|
|
98
|
+
[AiRunRefusalCode.InvestigationNotStarted]: (0, Translator_1.translationKey)("The investigation could not be started. Try again in a moment."),
|
|
99
|
+
[AiRunRefusalCode.AiOff]: (0, Translator_1.translationKey)("OneUptime AI is switched off for this project. A project owner or someone with Manage Billing can turn it on in Project Settings > AI > AI Features."),
|
|
100
|
+
[AiRunRefusalCode.NoProviderToInvestigate]: (0, Translator_1.translationKey)("This project has no LLM provider to investigate with. Add one in Project Settings > AI > LLM Providers, then try again."),
|
|
101
|
+
// PROJECT_AI_CREDITS_USED_UP_MESSAGE (Utils/Project/ProjectBalance).
|
|
102
|
+
[AiRunRefusalCode.AiCreditsUsedUp]: (0, Translator_1.translationKey)("This project's AI credits are used up. A project owner or someone with Manage Billing can add AI credits in Project Settings → AI → AI Credits."),
|
|
103
|
+
// Ends with ProjectAiDailyLimits.getWhoCanChangeSentence().
|
|
104
|
+
[AiRunRefusalCode.ProjectDailyLimitReached]: (0, Translator_1.translationKey)("The project reached its daily AI limit. OneUptime AI starts again at midnight UTC. A project owner or someone with Manage Billing can raise or remove the limit in Project Settings → AI → AI Features → More settings."),
|
|
105
|
+
// getRecordAiTokenLimitMessage (Types/AI/RecordAiTokenLimit), each kind.
|
|
106
|
+
[AiRunRefusalCode.IncidentTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Incident AI Token Limit is set to 0, which pauses automatic AI work for incidents. Raise it above 0 under Incidents → AI → Settings → More settings, or clear it, then try again."),
|
|
107
|
+
[AiRunRefusalCode.IncidentTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for incidents used up today's Daily Incident AI Token Limit. Raise or clear it under Incidents → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
|
|
108
|
+
[AiRunRefusalCode.AlertTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Alert AI Token Limit is set to 0, which pauses automatic AI work for alerts. Raise it above 0 under Alerts → AI → Settings → More settings, or clear it, then try again."),
|
|
109
|
+
[AiRunRefusalCode.AlertTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for alerts used up today's Daily Alert AI Token Limit. Raise or clear it under Alerts → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
|
|
110
|
+
[AiRunRefusalCode.InsightNotFound]: (0, Translator_1.translationKey)("This AI insight no longer exists."),
|
|
111
|
+
[AiRunRefusalCode.InsightTriageRunning]: (0, Translator_1.translationKey)("This insight is being triaged already."),
|
|
112
|
+
[AiRunRefusalCode.TriageFinished]: (0, Translator_1.translationKey)("Only a triage that did not finish can be tried again."),
|
|
113
|
+
/*
|
|
114
|
+
* Only AI Insights' own switch is left to be off: a telemetry product's
|
|
115
|
+
* AI that works on the insight's kind is on (getLaneWorkingOn).
|
|
116
|
+
*/
|
|
117
|
+
[AiRunRefusalCode.InsightsOff]: (0, Translator_1.translationKey)("AI Insights is switched off for this project, so no insight is triaged. A project owner or admin can turn on Watch telemetry for problems in AI → Insights → Settings."),
|
|
118
|
+
[AiRunRefusalCode.NoProviderToTriage]: (0, Translator_1.translationKey)("This project has no LLM provider to triage with. Add one in Project Settings > AI > LLM Providers, then try again."),
|
|
119
|
+
[AiRunRefusalCode.TriageNotQueued]: (0, Translator_1.translationKey)("The triage could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
|
|
120
|
+
[AiRunRefusalCode.TriageNotStarted]: (0, Translator_1.translationKey)("The triage could not start. Try again in a moment."),
|
|
121
|
+
};
|
|
122
|
+
/*
|
|
123
|
+
* The field of a refused request's answer that carries the code, beside
|
|
124
|
+
* its message: { message: "...", refusalCode: "ai_off" }.
|
|
125
|
+
*/
|
|
126
|
+
exports.AI_RUN_REFUSAL_CODE_FIELD = "refusalCode";
|
|
127
|
+
const AI_RUN_REFUSAL_CODES = new Set(Object.values(AiRunRefusalCode));
|
|
128
|
+
function isAiRunRefusalCode(value) {
|
|
129
|
+
return typeof value === "string" && AI_RUN_REFUSAL_CODES.has(value);
|
|
130
|
+
}
|
|
131
|
+
function getAiRunRefusalMessage(code) {
|
|
132
|
+
return exports.AI_RUN_REFUSALS[code];
|
|
133
|
+
}
|
|
134
|
+
/*
|
|
135
|
+
* The code of a refused request's answer, or null when it has none or one
|
|
136
|
+
* this version does not know (a newer server): the message is said then.
|
|
137
|
+
*/
|
|
138
|
+
function readAiRunRefusalCode(body) {
|
|
139
|
+
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const code = body[exports.AI_RUN_REFUSAL_CODE_FIELD];
|
|
143
|
+
return isAiRunRefusalCode(code) ? code : null;
|
|
144
|
+
}
|
|
145
|
+
// The record is gone, or the person may not read it.
|
|
146
|
+
function getRecordNotFoundRefusal(subject) {
|
|
147
|
+
return subject === "alert"
|
|
148
|
+
? AiRunRefusalCode.AlertNotFound
|
|
149
|
+
: AiRunRefusalCode.IncidentNotFound;
|
|
150
|
+
}
|
|
151
|
+
// The person may read the record, not change it: which button they pressed.
|
|
152
|
+
function getNotAllowedRefusal(subject, action) {
|
|
153
|
+
if (action === "try_again") {
|
|
154
|
+
return subject === "alert"
|
|
155
|
+
? AiRunRefusalCode.AlertTryAgainNotAllowed
|
|
156
|
+
: AiRunRefusalCode.IncidentTryAgainNotAllowed;
|
|
157
|
+
}
|
|
158
|
+
return subject === "alert"
|
|
159
|
+
? AiRunRefusalCode.AlertInvestigateNowNotAllowed
|
|
160
|
+
: AiRunRefusalCode.IncidentInvestigateNowNotAllowed;
|
|
161
|
+
}
|
|
162
|
+
function getNoInvestigationRefusal(subject) {
|
|
163
|
+
return subject === "alert"
|
|
164
|
+
? AiRunRefusalCode.AlertHasNoInvestigation
|
|
165
|
+
: AiRunRefusalCode.IncidentHasNoInvestigation;
|
|
166
|
+
}
|
|
167
|
+
function getInvestigationRunningRefusal(subject) {
|
|
168
|
+
return subject === "alert"
|
|
169
|
+
? AiRunRefusalCode.AlertInvestigationRunning
|
|
170
|
+
: AiRunRefusalCode.IncidentInvestigationRunning;
|
|
171
|
+
}
|
|
172
|
+
/*
|
|
173
|
+
* The record's own daily AI token limit: paused (a limit of 0 or below)
|
|
174
|
+
* until someone raises it, or used up until midnight UTC. Without a state
|
|
175
|
+
* the limit is taken as used up, as getRecordAiTokenLimitMessage does.
|
|
176
|
+
*/
|
|
177
|
+
function getRecordAiTokenLimitRefusal(kind, state) {
|
|
178
|
+
const isPaused = (0, RecordAiTokenLimit_1.isRecordAiTokenLimitPaused)(state === null || state === void 0 ? void 0 : state.limitInTokens);
|
|
179
|
+
if (kind === "alert") {
|
|
180
|
+
return isPaused
|
|
181
|
+
? AiRunRefusalCode.AlertTokenLimitPaused
|
|
182
|
+
: AiRunRefusalCode.AlertTokenLimitUsedUp;
|
|
183
|
+
}
|
|
184
|
+
return isPaused
|
|
185
|
+
? AiRunRefusalCode.IncidentTokenLimitPaused
|
|
186
|
+
: AiRunRefusalCode.IncidentTokenLimitUsedUp;
|
|
187
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import commonJsModule from "./AiRunRefusal.js";
|
|
2
|
+
export const AI_RUN_REFUSALS = commonJsModule.AI_RUN_REFUSALS;
|
|
3
|
+
export const AI_RUN_REFUSAL_CODE_FIELD = commonJsModule.AI_RUN_REFUSAL_CODE_FIELD;
|
|
4
|
+
export const AiRunRefusalCode = commonJsModule.AiRunRefusalCode;
|
|
5
|
+
export const getAiRunRefusalMessage = commonJsModule.getAiRunRefusalMessage;
|
|
6
|
+
export const getInvestigationRunningRefusal = commonJsModule.getInvestigationRunningRefusal;
|
|
7
|
+
export const getNoInvestigationRefusal = commonJsModule.getNoInvestigationRefusal;
|
|
8
|
+
export const getNotAllowedRefusal = commonJsModule.getNotAllowedRefusal;
|
|
9
|
+
export const getRecordAiTokenLimitRefusal = commonJsModule.getRecordAiTokenLimitRefusal;
|
|
10
|
+
export const getRecordNotFoundRefusal = commonJsModule.getRecordNotFoundRefusal;
|
|
11
|
+
export const isAiRunRefusalCode = commonJsModule.isAiRunRefusalCode;
|
|
12
|
+
export const readAiRunRefusalCode = commonJsModule.readAiRunRefusalCode;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON.mjs";
|
|
2
|
+
import { AIAgentRunLimits } from "./AIAgentRunLimits.mjs";
|
|
3
|
+
import { AIChatCitationTarget } from "./AIChatTypes.mjs";
|
|
4
|
+
import { AiContextActivity } from "./AiContext.mjs";
|
|
5
|
+
export declare const INVESTIGATION_RECORDING_VERSION: number;
|
|
6
|
+
export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
|
|
7
|
+
export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
|
|
8
|
+
export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
|
|
9
|
+
export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
|
|
10
|
+
export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
|
|
11
|
+
export interface InvestigationRecordedToolDefinition {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: JSONObject;
|
|
15
|
+
}
|
|
16
|
+
export interface InvestigationRecordingInputs {
|
|
17
|
+
contextText: string;
|
|
18
|
+
additionalInstructions?: string | undefined;
|
|
19
|
+
personaOverride?: string | undefined;
|
|
20
|
+
questionOverride?: string | undefined;
|
|
21
|
+
aiContext: AiContextActivity | null;
|
|
22
|
+
promptTime: string;
|
|
23
|
+
runLimits: AIAgentRunLimits;
|
|
24
|
+
maxOutputTokens: number;
|
|
25
|
+
excludedToolNames: Array<string>;
|
|
26
|
+
extraTools: Array<InvestigationRecordedToolDefinition>;
|
|
27
|
+
providerName?: string | undefined;
|
|
28
|
+
modelName?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface InvestigationRecordedToolCall {
|
|
31
|
+
toolName: string;
|
|
32
|
+
arguments: JSONObject;
|
|
33
|
+
success: boolean;
|
|
34
|
+
text: string | null;
|
|
35
|
+
rowCount?: number | undefined;
|
|
36
|
+
citationLabel?: string | undefined;
|
|
37
|
+
citationTarget?: AIChatCitationTarget | undefined;
|
|
38
|
+
isTruncated?: boolean | undefined;
|
|
39
|
+
durationMs?: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface InvestigationRecording {
|
|
42
|
+
version: number;
|
|
43
|
+
inputs: InvestigationRecordingInputs;
|
|
44
|
+
toolCalls: Array<InvestigationRecordedToolCall>;
|
|
45
|
+
toolCallsNotKept: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON";
|
|
2
|
+
import { AIAgentRunLimits } from "./AIAgentRunLimits";
|
|
3
|
+
import { AIChatCitationTarget } from "./AIChatTypes";
|
|
4
|
+
import { AiContextActivity } from "./AiContext";
|
|
5
|
+
export declare const INVESTIGATION_RECORDING_VERSION: number;
|
|
6
|
+
export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
|
|
7
|
+
export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
|
|
8
|
+
export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
|
|
9
|
+
export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
|
|
10
|
+
export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
|
|
11
|
+
export interface InvestigationRecordedToolDefinition {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
inputSchema: JSONObject;
|
|
15
|
+
}
|
|
16
|
+
export interface InvestigationRecordingInputs {
|
|
17
|
+
contextText: string;
|
|
18
|
+
additionalInstructions?: string | undefined;
|
|
19
|
+
personaOverride?: string | undefined;
|
|
20
|
+
questionOverride?: string | undefined;
|
|
21
|
+
aiContext: AiContextActivity | null;
|
|
22
|
+
promptTime: string;
|
|
23
|
+
runLimits: AIAgentRunLimits;
|
|
24
|
+
maxOutputTokens: number;
|
|
25
|
+
excludedToolNames: Array<string>;
|
|
26
|
+
extraTools: Array<InvestigationRecordedToolDefinition>;
|
|
27
|
+
providerName?: string | undefined;
|
|
28
|
+
modelName?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface InvestigationRecordedToolCall {
|
|
31
|
+
toolName: string;
|
|
32
|
+
arguments: JSONObject;
|
|
33
|
+
success: boolean;
|
|
34
|
+
text: string | null;
|
|
35
|
+
rowCount?: number | undefined;
|
|
36
|
+
citationLabel?: string | undefined;
|
|
37
|
+
citationTarget?: AIChatCitationTarget | undefined;
|
|
38
|
+
isTruncated?: boolean | undefined;
|
|
39
|
+
durationMs?: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface InvestigationRecording {
|
|
42
|
+
version: number;
|
|
43
|
+
inputs: InvestigationRecordingInputs;
|
|
44
|
+
toolCalls: Array<InvestigationRecordedToolCall>;
|
|
45
|
+
toolCallsNotKept: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = exports.INVESTIGATION_RECORDING_VERSION = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* What an AI investigation saw, kept so it can be run again later on exactly
|
|
6
|
+
* the same data with another prompt or another model (issue #6800): the
|
|
7
|
+
* starting context the model was given, and every tool call it made with
|
|
8
|
+
* the text it was handed back. A replay (Server/Utils/AI/Eval/
|
|
9
|
+
* ReplayInvestigation) builds today's prompt around the same context and
|
|
10
|
+
* answers each tool call from here - never from the project's live data,
|
|
11
|
+
* which has moved on or aged out by then - so a change is scored on the
|
|
12
|
+
* evidence the original run had.
|
|
13
|
+
*
|
|
14
|
+
* Kept by the server only (AIRunRecording: no API reads it, no person can),
|
|
15
|
+
* for INVESTIGATION_RECORDING_RETENTION_IN_DAYS, and held to the caps below.
|
|
16
|
+
* What the model read is what the toolbox already redacted and cut to size,
|
|
17
|
+
* so nothing is kept that the model was not shown.
|
|
18
|
+
*/
|
|
19
|
+
// The shape of a recording; a replay reads only the versions it knows.
|
|
20
|
+
exports.INVESTIGATION_RECORDING_VERSION = 1;
|
|
21
|
+
/*
|
|
22
|
+
* How long a recording is kept. Long enough to replay last month's
|
|
23
|
+
* investigations after a prompt or model change; short enough that what the
|
|
24
|
+
* tools returned does not outlive the telemetry it came from by much.
|
|
25
|
+
*/
|
|
26
|
+
exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = 30;
|
|
27
|
+
/*
|
|
28
|
+
* The caps. A run is recorded until one is reached; a tool call past them is
|
|
29
|
+
* kept without its text, or not kept at all, and a replay that comes to it
|
|
30
|
+
* counts it as not recorded rather than inventing an answer.
|
|
31
|
+
*/
|
|
32
|
+
// The most tool calls one recording keeps.
|
|
33
|
+
exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = 300;
|
|
34
|
+
/*
|
|
35
|
+
* The most characters of one tool result: well above what the toolbox hands
|
|
36
|
+
* the model (64 KB, Toolbox/Serializer), so a normal result always fits.
|
|
37
|
+
*/
|
|
38
|
+
exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = 100000;
|
|
39
|
+
// The most characters of tool results one recording keeps, together.
|
|
40
|
+
exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = 1000000;
|
|
41
|
+
// The most characters of one tool call's arguments, as JSON.
|
|
42
|
+
exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = 10000;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import commonJsModule from "./InvestigationRecording.js";
|
|
2
|
+
export const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS;
|
|
3
|
+
export const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS;
|
|
4
|
+
export const INVESTIGATION_RECORDING_MAX_TOOL_CALLS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOOL_CALLS;
|
|
5
|
+
export const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS;
|
|
6
|
+
export const INVESTIGATION_RECORDING_RETENTION_IN_DAYS = commonJsModule.INVESTIGATION_RECORDING_RETENTION_IN_DAYS;
|
|
7
|
+
export const INVESTIGATION_RECORDING_VERSION = commonJsModule.INVESTIGATION_RECORDING_VERSION;
|
|
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
|
|
|
27
27
|
private _hasMore;
|
|
28
28
|
get hasMore(): boolean | undefined;
|
|
29
29
|
set hasMore(v: boolean | undefined);
|
|
30
|
+
private _isCountCapped;
|
|
31
|
+
get isCountCapped(): boolean | undefined;
|
|
32
|
+
set isCountCapped(v: boolean | undefined);
|
|
30
33
|
constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
|
|
31
34
|
isSuccess(): boolean;
|
|
32
35
|
isFailure(): boolean;
|
|
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
|
|
|
27
27
|
private _hasMore;
|
|
28
28
|
get hasMore(): boolean | undefined;
|
|
29
29
|
set hasMore(v: boolean | undefined);
|
|
30
|
+
private _isCountCapped;
|
|
31
|
+
get isCountCapped(): boolean | undefined;
|
|
32
|
+
set isCountCapped(v: boolean | undefined);
|
|
30
33
|
constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
|
|
31
34
|
isSuccess(): boolean;
|
|
32
35
|
isFailure(): boolean;
|
|
@@ -54,6 +54,12 @@ class HTTPResponse {
|
|
|
54
54
|
set hasMore(v) {
|
|
55
55
|
this._hasMore = v;
|
|
56
56
|
}
|
|
57
|
+
get isCountCapped() {
|
|
58
|
+
return this._isCountCapped;
|
|
59
|
+
}
|
|
60
|
+
set isCountCapped(v) {
|
|
61
|
+
this._isCountCapped = v;
|
|
62
|
+
}
|
|
57
63
|
constructor(statusCode, data, headers) {
|
|
58
64
|
this._statusCode = -1;
|
|
59
65
|
this._headers = {};
|
|
@@ -66,6 +72,12 @@ class HTTPResponse {
|
|
|
66
72
|
* is only a lower bound — UI should drive next/prev from `hasMore`.
|
|
67
73
|
*/
|
|
68
74
|
this._hasMore = undefined;
|
|
75
|
+
/*
|
|
76
|
+
* Optional. True when a list read asked for its count up to a cap
|
|
77
|
+
* (countUpTo) and more records match: `count` is the cap, a lower bound,
|
|
78
|
+
* and records follow this page. Undefined when the count is exact.
|
|
79
|
+
*/
|
|
80
|
+
this._isCountCapped = undefined;
|
|
69
81
|
this.statusCode = statusCode;
|
|
70
82
|
if (!Array.isArray(data) &&
|
|
71
83
|
Object.keys(data).includes("count") &&
|
|
@@ -78,6 +90,9 @@ class HTTPResponse {
|
|
|
78
90
|
if (Object.keys(data).includes("hasMore")) {
|
|
79
91
|
this.hasMore = data["hasMore"];
|
|
80
92
|
}
|
|
93
|
+
if (data["isCountCapped"] === true) {
|
|
94
|
+
this.isCountCapped = true;
|
|
95
|
+
}
|
|
81
96
|
this.jsonData = JSONFunctions_1.default.deserializeArray(data["data"]);
|
|
82
97
|
}
|
|
83
98
|
else if (Array.isArray(data)) {
|
|
@@ -29,7 +29,12 @@ export declare enum ProductEventName {
|
|
|
29
29
|
SetupHealthOpened = "setup_health/opened",
|
|
30
30
|
SetupHealthFixOpened = "setup_health/fix_opened",
|
|
31
31
|
SetupHealthFindingDismissed = "setup_health/finding_dismissed",
|
|
32
|
-
SetupHealthFindingRestored = "setup_health/finding_restored"
|
|
32
|
+
SetupHealthFindingRestored = "setup_health/finding_restored",
|
|
33
|
+
PagingLadderSaved = "paging_ladder/saved",
|
|
34
|
+
PagingLadderGridOpened = "paging_ladder/grid_opened",
|
|
35
|
+
UsedByListOpened = "used_by/list_opened",
|
|
36
|
+
SampleProjectStarted = "sample_project/started",
|
|
37
|
+
SampleProjectDeleted = "sample_project/deleted"
|
|
33
38
|
}
|
|
34
39
|
export declare const SEARCH_QUERY_MAX_LENGTH: number;
|
|
35
40
|
export declare const PRODUCT_EVENT_TOKEN_MAX_LENGTH: number;
|
|
@@ -29,7 +29,12 @@ export declare enum ProductEventName {
|
|
|
29
29
|
SetupHealthOpened = "setup_health/opened",
|
|
30
30
|
SetupHealthFixOpened = "setup_health/fix_opened",
|
|
31
31
|
SetupHealthFindingDismissed = "setup_health/finding_dismissed",
|
|
32
|
-
SetupHealthFindingRestored = "setup_health/finding_restored"
|
|
32
|
+
SetupHealthFindingRestored = "setup_health/finding_restored",
|
|
33
|
+
PagingLadderSaved = "paging_ladder/saved",
|
|
34
|
+
PagingLadderGridOpened = "paging_ladder/grid_opened",
|
|
35
|
+
UsedByListOpened = "used_by/list_opened",
|
|
36
|
+
SampleProjectStarted = "sample_project/started",
|
|
37
|
+
SampleProjectDeleted = "sample_project/deleted"
|
|
33
38
|
}
|
|
34
39
|
export declare const SEARCH_QUERY_MAX_LENGTH: number;
|
|
35
40
|
export declare const PRODUCT_EVENT_TOKEN_MAX_LENGTH: number;
|
|
@@ -99,6 +99,18 @@ var ProductEventName;
|
|
|
99
99
|
ProductEventName["SetupHealthFixOpened"] = "setup_health/fix_opened";
|
|
100
100
|
ProductEventName["SetupHealthFindingDismissed"] = "setup_health/finding_dismissed";
|
|
101
101
|
ProductEventName["SetupHealthFindingRestored"] = "setup_health/finding_restored";
|
|
102
|
+
// How to reach me (#6820): a paging ladder saved, and the grid opened.
|
|
103
|
+
ProductEventName["PagingLadderSaved"] = "paging_ladder/saved";
|
|
104
|
+
ProductEventName["PagingLadderGridOpened"] = "paging_ladder/grid_opened";
|
|
105
|
+
// "Used by" (#6813): the full list of what refers to a record was opened.
|
|
106
|
+
ProductEventName["UsedByListOpened"] = "used_by/list_opened";
|
|
107
|
+
/*
|
|
108
|
+
* A sample project (#6808): made or opened again from an entry point,
|
|
109
|
+
* and deleted from its bar. The only events a sample sends: nothing done
|
|
110
|
+
* inside one is a project getting value (ProductEvents.send).
|
|
111
|
+
*/
|
|
112
|
+
ProductEventName["SampleProjectStarted"] = "sample_project/started";
|
|
113
|
+
ProductEventName["SampleProjectDeleted"] = "sample_project/deleted";
|
|
102
114
|
})(ProductEventName || (exports.ProductEventName = ProductEventName = {}));
|
|
103
115
|
// The words of a search that found nothing, at most this long (Cloud only).
|
|
104
116
|
exports.SEARCH_QUERY_MAX_LENGTH = 40;
|
|
@@ -327,6 +339,35 @@ exports.PRODUCT_EVENTS = [
|
|
|
327
339
|
description: "A dismissed Setup health finding was restored.",
|
|
328
340
|
properties: [token("check")],
|
|
329
341
|
},
|
|
342
|
+
{
|
|
343
|
+
name: ProductEventName.PagingLadderSaved,
|
|
344
|
+
description: "A paging ladder was saved on How to Reach Me: by the person or for a member, how many steps, and how many cards that differed it replaced.",
|
|
345
|
+
properties: [
|
|
346
|
+
{ name: "is_own" },
|
|
347
|
+
{ name: "step_count" },
|
|
348
|
+
{ name: "replaced_card_count" },
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: ProductEventName.PagingLadderGridOpened,
|
|
353
|
+
description: "The per-severity grid behind a paging ladder was opened on How to Reach Me, and how many cards differed from the ladder then.",
|
|
354
|
+
properties: [{ name: "is_own" }, { name: "differing_card_count" }],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: ProductEventName.UsedByListOpened,
|
|
358
|
+
description: 'The full list of what refers to a record was opened: a relation\'s "See all" on a record\'s Used by card (relation), or a label\'s Used by (relation "all").',
|
|
359
|
+
properties: [token("record_kind"), token("relation")],
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: ProductEventName.SampleProjectStarted,
|
|
363
|
+
description: "Explore Sample Project was pressed: where (from - welcome, goals, home), and whether a sample was made or the person's existing one opened (is_new).",
|
|
364
|
+
properties: [token("from"), { name: "is_new" }],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: ProductEventName.SampleProjectDeleted,
|
|
368
|
+
description: "A sample project was deleted from its bar, and how many days after it was made (days_kept).",
|
|
369
|
+
properties: [{ name: "days_kept" }],
|
|
370
|
+
},
|
|
330
371
|
];
|
|
331
372
|
/*
|
|
332
373
|
* The words a property name may not hold, split at underscores and capital
|
|
@@ -25,6 +25,7 @@ export declare const looksLikeSecretColumn: (name: string, type: TableColumnType
|
|
|
25
25
|
export interface AuditLogCoverageModel {
|
|
26
26
|
tableName: string | null;
|
|
27
27
|
singularName: string | null;
|
|
28
|
+
apiSingularName?: string | null | undefined;
|
|
28
29
|
getTenantColumn: () => string | null;
|
|
29
30
|
getTableColumns: () => {
|
|
30
31
|
columns: Array<string>;
|
|
@@ -25,6 +25,7 @@ export declare const looksLikeSecretColumn: (name: string, type: TableColumnType
|
|
|
25
25
|
export interface AuditLogCoverageModel {
|
|
26
26
|
tableName: string | null;
|
|
27
27
|
singularName: string | null;
|
|
28
|
+
apiSingularName?: string | null | undefined;
|
|
28
29
|
getTenantColumn: () => string | null;
|
|
29
30
|
getTableColumns: () => {
|
|
30
31
|
columns: Array<string>;
|
|
@@ -623,8 +623,10 @@ const inferRootResource = (model) => {
|
|
|
623
623
|
}
|
|
624
624
|
const root = getRelatedModel(metadata.modelType);
|
|
625
625
|
const rootTable = root.tableName;
|
|
626
|
+
// The type the root's own entries are stored under, so the two match.
|
|
627
|
+
const rootType = root.apiSingularName || root.singularName;
|
|
626
628
|
if (!rootTable ||
|
|
627
|
-
!
|
|
629
|
+
!rootType ||
|
|
628
630
|
rootTable === tableName ||
|
|
629
631
|
!tableName.startsWith(rootTable) ||
|
|
630
632
|
!exports.AUDIT_LOG_ROOT_RESOURCE_TABLES.has(rootTable)) {
|
|
@@ -642,7 +644,7 @@ const inferRootResource = (model) => {
|
|
|
642
644
|
if (!found || rootTable.length > found.tableLength) {
|
|
643
645
|
found = {
|
|
644
646
|
tableLength: rootTable.length,
|
|
645
|
-
root: { resourceType:
|
|
647
|
+
root: { resourceType: rootType, column: idColumn },
|
|
646
648
|
};
|
|
647
649
|
isTied = false;
|
|
648
650
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GroupBy from "../../Server/Types/Database/GroupBy.mjs";
|
|
2
2
|
import GenericObject from "../GenericObject.mjs";
|
|
3
|
+
import Timezone from "../Timezone.mjs";
|
|
3
4
|
import AggregationInterval from "./AggregationInterval.mjs";
|
|
4
5
|
import AggregationType from "./AggregationType.mjs";
|
|
5
6
|
import Query from "./Query.mjs";
|
|
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
|
|
|
18
19
|
* rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
|
|
19
20
|
*/
|
|
20
21
|
aggregationInterval?: AggregationInterval | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The time zone whose calendar the Day, Week, Month and Year buckets
|
|
24
|
+
* follow: a day bucket runs from midnight to midnight there, a week from
|
|
25
|
+
* Monday, a month from its 1st and a year from 1 January, and each
|
|
26
|
+
* bucket's timestamp is that start. The dashboard sends the reader's zone
|
|
27
|
+
* (the one User Settings picked) whenever the bucket is a day or longer,
|
|
28
|
+
* so a chart that draws its days on the reader's calendar gets each day's
|
|
29
|
+
* total under its own day (issue #7277). Omitted, those buckets follow
|
|
30
|
+
* UTC, as they always have. An hour and shorter, and Total, are the same
|
|
31
|
+
* in every zone and ignore it. Only a name in the Timezone list is
|
|
32
|
+
* accepted; anything else is refused with a 400 in
|
|
33
|
+
* AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
|
|
34
|
+
* a bound parameter, never as text.
|
|
35
|
+
*/
|
|
36
|
+
timezone?: Timezone | undefined;
|
|
21
37
|
aggregationTimestampColumnName: keyof TBaseModel;
|
|
22
38
|
startTimestamp: Date;
|
|
23
39
|
endTimestamp: Date;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GroupBy from "../../Server/Types/Database/GroupBy";
|
|
2
2
|
import GenericObject from "../GenericObject";
|
|
3
|
+
import Timezone from "../Timezone";
|
|
3
4
|
import AggregationInterval from "./AggregationInterval";
|
|
4
5
|
import AggregationType from "./AggregationType";
|
|
5
6
|
import Query from "./Query";
|
|
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
|
|
|
18
19
|
* rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
|
|
19
20
|
*/
|
|
20
21
|
aggregationInterval?: AggregationInterval | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The time zone whose calendar the Day, Week, Month and Year buckets
|
|
24
|
+
* follow: a day bucket runs from midnight to midnight there, a week from
|
|
25
|
+
* Monday, a month from its 1st and a year from 1 January, and each
|
|
26
|
+
* bucket's timestamp is that start. The dashboard sends the reader's zone
|
|
27
|
+
* (the one User Settings picked) whenever the bucket is a day or longer,
|
|
28
|
+
* so a chart that draws its days on the reader's calendar gets each day's
|
|
29
|
+
* total under its own day (issue #7277). Omitted, those buckets follow
|
|
30
|
+
* UTC, as they always have. An hour and shorter, and Total, are the same
|
|
31
|
+
* in every zone and ignore it. Only a name in the Timezone list is
|
|
32
|
+
* accepted; anything else is refused with a 400 in
|
|
33
|
+
* AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
|
|
34
|
+
* a bound parameter, never as text.
|
|
35
|
+
*/
|
|
36
|
+
timezone?: Timezone | undefined;
|
|
21
37
|
aggregationTimestampColumnName: keyof TBaseModel;
|
|
22
38
|
startTimestamp: Date;
|
|
23
39
|
endTimestamp: Date;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import AggregationInterval from "./AggregationInterval.mjs";
|
|
2
|
+
import Timezone from "../Timezone.mjs";
|
|
3
|
+
export interface AggregateWindow {
|
|
4
|
+
startTimestamp?: Date | undefined;
|
|
5
|
+
endTimestamp?: Date | undefined;
|
|
6
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
7
|
+
timezone?: Timezone | undefined;
|
|
8
|
+
}
|
|
2
9
|
export declare class AggregationIntervalUtil {
|
|
3
10
|
static getAggregationIntervalForWindow(data: {
|
|
4
11
|
startDate: Date;
|
|
@@ -11,11 +18,19 @@ export declare class AggregationIntervalUtil {
|
|
|
11
18
|
*/
|
|
12
19
|
aggregationInterval?: AggregationInterval | undefined;
|
|
13
20
|
}): AggregationInterval;
|
|
21
|
+
static isCalendarInterval(interval: AggregationInterval): boolean;
|
|
22
|
+
static getReaderTimezone(data: {
|
|
23
|
+
startDate: Date;
|
|
24
|
+
endDate: Date;
|
|
25
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
26
|
+
}): Timezone | undefined;
|
|
27
|
+
static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
|
|
14
28
|
static getAggregationIntervalMs(interval: AggregationInterval): number;
|
|
15
|
-
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval): Date;
|
|
29
|
+
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
|
|
16
30
|
static getIntervalAlignedWindow(data: {
|
|
17
31
|
startDate: Date;
|
|
18
32
|
endDate: Date;
|
|
33
|
+
timezone?: Timezone | undefined;
|
|
19
34
|
}): {
|
|
20
35
|
startDate: Date;
|
|
21
36
|
endDate: Date;
|