@oneuptime/common 14.0.110 → 14.2.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/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.d.mts +1 -0
- package/Models/DatabaseModels/Alert.d.ts +1 -0
- package/Models/DatabaseModels/Alert.js +52 -2
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.d.mts +1 -0
- package/Models/DatabaseModels/Incident.d.ts +1 -0
- package/Models/DatabaseModels/Incident.js +53 -2
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- 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.js +23 -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/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- 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 +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
- 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 +28 -2
- package/Types/AI/AIActionWords.d.ts +28 -2
- package/Types/AI/AIActionWords.js +235 -3
- package/Types/AI/AIActionWords.mjs +8 -0
- package/Types/AI/AIChatTypes.d.mts +3 -1
- package/Types/AI/AIChatTypes.d.ts +3 -1
- package/Types/AI/AIReadTableWords.d.mts +192 -0
- package/Types/AI/AIReadTableWords.d.ts +192 -0
- package/Types/AI/AIReadTableWords.js +368 -0
- package/Types/AI/AIReadTableWords.mjs +18 -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 +48 -0
- package/Types/AI/AiRunRefusal.d.ts +48 -0
- package/Types/AI/AiRunRefusal.js +208 -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/AI/ResourceAiAccessPermissions.js +7 -18
- 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/AuditLog/AuditLogActionLabel.js +19 -9
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -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/CloudResourceHealth.d.mts +30 -1
- package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
- package/Types/Cloud/CloudResourceHealth.js +405 -13
- package/Types/Cloud/CloudResourceHealth.mjs +28 -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/DataCheckRefusals.d.mts +32 -0
- package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
- package/Types/DataObservability/DataCheckRefusals.js +77 -0
- package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
- package/Types/Date.d.mts +8 -1
- package/Types/Date.d.ts +8 -1
- package/Types/Date.js +61 -7
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +8 -5
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/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/EgressGuardException.js +1 -1
- package/Types/Exception/ErrorMessageRule.d.mts +1 -0
- package/Types/Exception/ErrorMessageRule.d.ts +1 -0
- package/Types/Exception/ErrorMessageRule.js +67 -13
- package/Types/Exception/ErrorMessageRule.mjs +1 -0
- package/Types/Exception/ExceptionMessages.d.mts +2 -0
- package/Types/Exception/ExceptionMessages.d.ts +2 -0
- package/Types/Exception/ExceptionMessages.js +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.js +74 -0
- package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
- package/Types/JSONFunctions.js +10 -3
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/MeaningKeys.d.mts +4 -0
- package/Types/MeaningKeys.d.ts +4 -0
- package/Types/MeaningKeys.js +74 -0
- package/Types/MeaningKeys.mjs +5 -0
- 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/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 -0
- package/Types/Monitor/WhoIsTold.d.ts +3 -0
- package/Types/Monitor/WhoIsTold.js +63 -13
- package/Types/NoBreakSpaces.d.mts +16 -0
- package/Types/NoBreakSpaces.d.ts +16 -0
- package/Types/NoBreakSpaces.js +419 -0
- package/Types/NoBreakSpaces.mjs +9 -0
- package/Types/NotificationRule/PagingLadder.d.mts +12 -0
- package/Types/NotificationRule/PagingLadder.d.ts +12 -0
- package/Types/NotificationRule/PagingLadder.js +159 -11
- package/Types/NotificationRule/PagingLadder.mjs +3 -0
- 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/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +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 +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- 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/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/OpenStack/OpenStackCapacity.js +12 -5
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +66 -10
- 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/ProductUsage.js +2 -1
- package/Types/Product/ProjectProductsAnswer.js +2 -1
- 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/ResourceAiAgent/AiResourceType.d.mts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.js +12 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
- package/Types/Rum/ProductAnalyticsEvents.js +13 -1
- package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.js +12 -0
- package/Types/Rum/SessionReplayCustomEvents.mjs +1 -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/SetupHealth/SetupHealth.d.mts +1 -0
- package/Types/SetupHealth/SetupHealth.d.ts +1 -0
- package/Types/SetupHealth/SetupHealth.js +13 -5
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
- package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
- package/Types/StatusPage/DefaultStatusNames.js +74 -28
- package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
- 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/StatusPage/StateChangeNoteMessage.d.mts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
- 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 +48 -7
- package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
- 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 +470 -63
- package/Types/Translator.mjs +1 -0
- package/Types/UserSession/SessionLength.d.mts +33 -0
- package/Types/UserSession/SessionLength.d.ts +33 -0
- package/Types/UserSession/SessionLength.js +134 -5
- package/Types/UserSession/SessionLength.mjs +5 -0
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workflow/WorkflowStatus.js +21 -10
- 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 +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -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/InvestigationReport.js +2 -2
- package/Utils/API.d.mts +0 -11
- package/Utils/API.d.ts +0 -11
- package/Utils/API.js +0 -432
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
- package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
- package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
- 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/DefaultRecordNames.d.mts +6 -0
- package/Utils/DefaultRecordNames.d.ts +6 -0
- package/Utils/DefaultRecordNames.js +122 -0
- package/Utils/DefaultRecordNames.mjs +6 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/Grok/Grok.js +7 -4
- 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/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
- package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/LookupTable.d.mts +3 -0
- package/Utils/LookupTable.d.ts +3 -0
- package/Utils/LookupTable.js +61 -0
- package/Utils/LookupTable.mjs +3 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
- package/Utils/Markdown/OverLongText.js +296 -2
- package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
- package/Utils/Markdown/SlowMarkdown.js +354 -4
- package/Utils/Markdown/SlowMarkdown.mjs +1 -0
- package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
- package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
- package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
- package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
- package/Utils/Metrics/MetricSeriesScope.js +5 -1
- 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/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -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 +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
- 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/ProbeAgreementRule.d.mts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.js +58 -0
- package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
- package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
- package/Utils/Monitor/ProbeFailureReading.js +166 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
- package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -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/Project/NextNumber.js +1 -1
- 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 +974 -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 +829 -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/PromQLLabelOrder.d.mts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.js +212 -0
- package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +219 -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 +205 -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 +836 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +20 -0
- package/Utils/PromQL/PromQLRegex.d.ts +20 -0
- package/Utils/PromQL/PromQLRegex.js +1014 -0
- package/Utils/PromQL/PromQLRegex.mjs +5 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +92 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
- package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
- package/Utils/PromQL/RE2CharacterClass.js +532 -0
- package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
- package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
- package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
- package/Utils/RequestFailedDetailsUtil.js +452 -0
- package/Utils/RequestFailedDetailsUtil.mjs +2 -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 +5 -1
- package/Utils/Rum/UrlScrubber.d.ts +5 -1
- package/Utils/Rum/UrlScrubber.js +153 -7
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +202 -29
- 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/Schema/TypeSchemas.js +6 -0
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
- package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -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/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +3 -1
- package/Utils/StateListType.d.mts +11 -0
- package/Utils/StateListType.d.ts +11 -0
- package/Utils/StateListType.js +21 -0
- package/Utils/StateListType.mjs +2 -0
- package/Utils/StateOrder.d.mts +8 -11
- package/Utils/StateOrder.d.ts +8 -11
- package/Utils/StateOrder.js +50 -88
- package/Utils/StateOrder.mjs +2 -0
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
- package/Utils/Syslog/SyslogMessageParser.js +16 -6
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/ValueFormatter.d.mts +1 -0
- package/Utils/ValueFormatter.d.ts +1 -0
- package/Utils/ValueFormatter.js +258 -18
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import SecurityCaseVerdict from "../../Types/SecurityCase/SecurityCaseVerdict.mjs";
|
|
2
2
|
import SecurityDetectionSource from "../../Types/SecurityCase/SecurityDetectionSource.mjs";
|
|
3
|
+
import Timezone from "../../Types/Timezone.mjs";
|
|
3
4
|
export interface OverviewCaseRow {
|
|
4
5
|
createdAt: Date;
|
|
5
6
|
priorityId: string | undefined;
|
|
@@ -24,6 +25,11 @@ export interface DayCount {
|
|
|
24
25
|
total: number;
|
|
25
26
|
byKey: Record<string, number>;
|
|
26
27
|
}
|
|
28
|
+
export interface CalendarDay {
|
|
29
|
+
day: string;
|
|
30
|
+
startMs: number;
|
|
31
|
+
endMs: number;
|
|
32
|
+
}
|
|
27
33
|
export interface RuleCount {
|
|
28
34
|
ruleName: string;
|
|
29
35
|
detectionRuleId: string | null;
|
|
@@ -53,7 +59,10 @@ export interface SecurityOverviewMetrics {
|
|
|
53
59
|
topTactics: Array<TacticCount>;
|
|
54
60
|
}
|
|
55
61
|
export declare function utcDay(date: Date): string;
|
|
56
|
-
export declare function
|
|
62
|
+
export declare function dayInTimezone(date: Date, timezone?: Timezone | undefined): string;
|
|
63
|
+
export declare function calendarDaysBetween(start: Date, end: Date, timezone?: Timezone | undefined): Array<CalendarDay>;
|
|
64
|
+
export declare function daysBetween(start: Date, end: Date, timezone?: Timezone | undefined): Array<string>;
|
|
65
|
+
export declare function findCalendarDay(days: ReadonlyArray<CalendarDay>, date: Date): CalendarDay | undefined;
|
|
57
66
|
export declare function computeSecurityOverviewMetrics(data: {
|
|
58
67
|
priorities: ReadonlyArray<unknown>;
|
|
59
68
|
statuses: ReadonlyArray<unknown>;
|
|
@@ -64,5 +73,6 @@ export declare function computeSecurityOverviewMetrics(data: {
|
|
|
64
73
|
detectionWindowStart: Date;
|
|
65
74
|
now: Date;
|
|
66
75
|
topLimit?: number | undefined;
|
|
76
|
+
timezone?: Timezone | undefined;
|
|
67
77
|
}): SecurityOverviewMetrics;
|
|
68
78
|
export declare function formatDurationInMinutes(minutes: number | null): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import SecurityCaseVerdict from "../../Types/SecurityCase/SecurityCaseVerdict";
|
|
2
2
|
import SecurityDetectionSource from "../../Types/SecurityCase/SecurityDetectionSource";
|
|
3
|
+
import Timezone from "../../Types/Timezone";
|
|
3
4
|
export interface OverviewCaseRow {
|
|
4
5
|
createdAt: Date;
|
|
5
6
|
priorityId: string | undefined;
|
|
@@ -24,6 +25,11 @@ export interface DayCount {
|
|
|
24
25
|
total: number;
|
|
25
26
|
byKey: Record<string, number>;
|
|
26
27
|
}
|
|
28
|
+
export interface CalendarDay {
|
|
29
|
+
day: string;
|
|
30
|
+
startMs: number;
|
|
31
|
+
endMs: number;
|
|
32
|
+
}
|
|
27
33
|
export interface RuleCount {
|
|
28
34
|
ruleName: string;
|
|
29
35
|
detectionRuleId: string | null;
|
|
@@ -53,7 +59,10 @@ export interface SecurityOverviewMetrics {
|
|
|
53
59
|
topTactics: Array<TacticCount>;
|
|
54
60
|
}
|
|
55
61
|
export declare function utcDay(date: Date): string;
|
|
56
|
-
export declare function
|
|
62
|
+
export declare function dayInTimezone(date: Date, timezone?: Timezone | undefined): string;
|
|
63
|
+
export declare function calendarDaysBetween(start: Date, end: Date, timezone?: Timezone | undefined): Array<CalendarDay>;
|
|
64
|
+
export declare function daysBetween(start: Date, end: Date, timezone?: Timezone | undefined): Array<string>;
|
|
65
|
+
export declare function findCalendarDay(days: ReadonlyArray<CalendarDay>, date: Date): CalendarDay | undefined;
|
|
57
66
|
export declare function computeSecurityOverviewMetrics(data: {
|
|
58
67
|
priorities: ReadonlyArray<unknown>;
|
|
59
68
|
statuses: ReadonlyArray<unknown>;
|
|
@@ -64,5 +73,6 @@ export declare function computeSecurityOverviewMetrics(data: {
|
|
|
64
73
|
detectionWindowStart: Date;
|
|
65
74
|
now: Date;
|
|
66
75
|
topLimit?: number | undefined;
|
|
76
|
+
timezone?: Timezone | undefined;
|
|
67
77
|
}): SecurityOverviewMetrics;
|
|
68
78
|
export declare function formatDurationInMinutes(minutes: number | null): string;
|
|
@@ -4,33 +4,109 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.utcDay = utcDay;
|
|
7
|
+
exports.dayInTimezone = dayInTimezone;
|
|
8
|
+
exports.calendarDaysBetween = calendarDaysBetween;
|
|
7
9
|
exports.daysBetween = daysBetween;
|
|
10
|
+
exports.findCalendarDay = findCalendarDay;
|
|
8
11
|
exports.computeSecurityOverviewMetrics = computeSecurityOverviewMetrics;
|
|
9
12
|
exports.formatDurationInMinutes = formatDurationInMinutes;
|
|
10
13
|
const SecurityCasePriorities_1 = __importDefault(require("./SecurityCasePriorities"));
|
|
11
14
|
const SecurityCaseStatuses_1 = __importDefault(require("./SecurityCaseStatuses"));
|
|
15
|
+
const AggregationInterval_1 = __importDefault(require("../../Types/BaseDatabase/AggregationInterval"));
|
|
16
|
+
const AggregationIntervalUtil_1 = __importDefault(require("../../Types/BaseDatabase/AggregationIntervalUtil"));
|
|
17
|
+
const Date_1 = __importDefault(require("../../Types/Date"));
|
|
12
18
|
const SecurityCaseVerdict_1 = __importDefault(require("../../Types/SecurityCase/SecurityCaseVerdict"));
|
|
13
19
|
const SecurityDetectionSource_1 = require("../../Types/SecurityCase/SecurityDetectionSource");
|
|
20
|
+
const Timezone_1 = __importDefault(require("../../Types/Timezone"));
|
|
21
|
+
const TimezoneAlias_1 = __importDefault(require("../../Types/TimezoneAlias"));
|
|
14
22
|
const MINUTE_IN_MS = 60 * 1000;
|
|
15
23
|
function utcDay(date) {
|
|
16
24
|
return date.toISOString().slice(0, 10);
|
|
17
25
|
}
|
|
18
|
-
//
|
|
19
|
-
function
|
|
26
|
+
// The zone the days are cut in, by its current name: UTC when none is given.
|
|
27
|
+
function calendarZoneOf(timezone) {
|
|
28
|
+
return timezone ? TimezoneAlias_1.default.getCanonicalTimezone(timezone) : Timezone_1.default.UTC;
|
|
29
|
+
}
|
|
30
|
+
/*
|
|
31
|
+
* The day `date` falls on in `timezone`, as YYYY-MM-DD: the reader's own day
|
|
32
|
+
* where the overview was asked in their zone, the UTC day where it was not.
|
|
33
|
+
* In New York a case opened at 20:00 on 4 November is on 4 November, not on
|
|
34
|
+
* the 5th, which is the UTC day it falls on.
|
|
35
|
+
*/
|
|
36
|
+
function dayInTimezone(date, timezone) {
|
|
37
|
+
if (!timezone) {
|
|
38
|
+
return utcDay(date);
|
|
39
|
+
}
|
|
40
|
+
return Date_1.default.getDateAsCustomFormattedStringInTimezone({
|
|
41
|
+
date: date,
|
|
42
|
+
format: "YYYY-MM-DD",
|
|
43
|
+
timezone: calendarZoneOf(timezone),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/*
|
|
47
|
+
* Every day from the one `start` falls on to the one `end` falls on, in
|
|
48
|
+
* `timezone` (UTC's when none is given), oldest first, with the instants
|
|
49
|
+
* each starts and ends at. Each day starts where the one before it ends
|
|
50
|
+
* (AggregationIntervalUtil.getBucketEnd, as the server's day buckets are
|
|
51
|
+
* walked): 23 or 25 hours on where the clocks change, so no day is drawn
|
|
52
|
+
* twice, and none is skipped.
|
|
53
|
+
*/
|
|
54
|
+
function calendarDaysBetween(start, end, timezone) {
|
|
55
|
+
const zone = calendarZoneOf(timezone);
|
|
20
56
|
const days = [];
|
|
21
|
-
const
|
|
22
|
-
|
|
57
|
+
const lastMs = end.getTime();
|
|
58
|
+
let startMs = Date_1.default.getStartOfDay(start, zone).getTime();
|
|
23
59
|
// Bounded: a window is never more than a year of days.
|
|
24
|
-
for (let index = 0; index < 400; index++) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
60
|
+
for (let index = 0; index < 400 && Number.isFinite(startMs); index++) {
|
|
61
|
+
const endMs = AggregationIntervalUtil_1.default.getBucketEnd({
|
|
62
|
+
bucketStart: new Date(startMs),
|
|
63
|
+
interval: AggregationInterval_1.default.Day,
|
|
64
|
+
timezone: zone,
|
|
65
|
+
}).getTime();
|
|
66
|
+
days.push({
|
|
67
|
+
day: dayInTimezone(new Date(startMs), zone),
|
|
68
|
+
startMs: startMs,
|
|
69
|
+
endMs: endMs,
|
|
70
|
+
});
|
|
71
|
+
if (!(endMs <= lastMs)) {
|
|
28
72
|
break;
|
|
29
73
|
}
|
|
30
|
-
|
|
74
|
+
startMs = endMs;
|
|
31
75
|
}
|
|
32
76
|
return days;
|
|
33
77
|
}
|
|
78
|
+
/*
|
|
79
|
+
* Every day from the day of `start` to the day of `end`, oldest first: the
|
|
80
|
+
* reader's days in `timezone`, UTC's when none is given.
|
|
81
|
+
*/
|
|
82
|
+
function daysBetween(start, end, timezone) {
|
|
83
|
+
return calendarDaysBetween(start, end, timezone).map((day) => {
|
|
84
|
+
return day.day;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/*
|
|
88
|
+
* The day of `days` (oldest first, one after another) that `date` falls in,
|
|
89
|
+
* or undefined when it is before the first or from the end of the last.
|
|
90
|
+
*/
|
|
91
|
+
function findCalendarDay(days, date) {
|
|
92
|
+
const ms = new Date(date).getTime();
|
|
93
|
+
let low = 0;
|
|
94
|
+
let high = days.length - 1;
|
|
95
|
+
while (low <= high) {
|
|
96
|
+
const middle = Math.floor((low + high) / 2);
|
|
97
|
+
const day = days[middle];
|
|
98
|
+
if (ms < day.startMs) {
|
|
99
|
+
high = middle - 1;
|
|
100
|
+
}
|
|
101
|
+
else if (ms >= day.endMs) {
|
|
102
|
+
low = middle + 1;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
return day;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
34
110
|
function emptyCounts(keys) {
|
|
35
111
|
const counts = {};
|
|
36
112
|
for (const key of keys) {
|
|
@@ -103,9 +179,9 @@ function computeSecurityOverviewMetrics(data) {
|
|
|
103
179
|
}
|
|
104
180
|
}
|
|
105
181
|
}
|
|
106
|
-
const caseDays =
|
|
182
|
+
const caseDays = calendarDaysBetween(data.windowStart, data.now, data.timezone);
|
|
107
183
|
const casesPerDay = new Map();
|
|
108
|
-
for (const day of caseDays) {
|
|
184
|
+
for (const { day } of caseDays) {
|
|
109
185
|
casesPerDay.set(day, {
|
|
110
186
|
day,
|
|
111
187
|
total: 0,
|
|
@@ -114,7 +190,10 @@ function computeSecurityOverviewMetrics(data) {
|
|
|
114
190
|
}
|
|
115
191
|
const tacticCounts = new Map();
|
|
116
192
|
for (const row of data.casesInWindow) {
|
|
117
|
-
const
|
|
193
|
+
const openedOn = findCalendarDay(caseDays, new Date(row.createdAt));
|
|
194
|
+
const bucket = openedOn
|
|
195
|
+
? casesPerDay.get(openedOn.day)
|
|
196
|
+
: undefined;
|
|
118
197
|
if (bucket) {
|
|
119
198
|
bucket.total++;
|
|
120
199
|
if (row.priorityId && bucket.byKey[row.priorityId] !== undefined) {
|
|
@@ -125,9 +204,9 @@ function computeSecurityOverviewMetrics(data) {
|
|
|
125
204
|
tacticCounts.set(tactic, (tacticCounts.get(tactic) || 0) + 1);
|
|
126
205
|
}
|
|
127
206
|
}
|
|
128
|
-
const detectionDays =
|
|
207
|
+
const detectionDays = calendarDaysBetween(data.detectionWindowStart, data.now, data.timezone);
|
|
129
208
|
const detectionsPerDay = new Map();
|
|
130
|
-
for (const day of detectionDays) {
|
|
209
|
+
for (const { day } of detectionDays) {
|
|
131
210
|
detectionsPerDay.set(day, {
|
|
132
211
|
day,
|
|
133
212
|
total: 0,
|
|
@@ -136,7 +215,10 @@ function computeSecurityOverviewMetrics(data) {
|
|
|
136
215
|
}
|
|
137
216
|
const ruleCounts = new Map();
|
|
138
217
|
for (const row of data.detectionsInWindow) {
|
|
139
|
-
const
|
|
218
|
+
const firstSeenOn = findCalendarDay(detectionDays, new Date(row.firstSeenAt));
|
|
219
|
+
const bucket = firstSeenOn
|
|
220
|
+
? detectionsPerDay.get(firstSeenOn.day)
|
|
221
|
+
: undefined;
|
|
140
222
|
if (bucket) {
|
|
141
223
|
bucket.total++;
|
|
142
224
|
if (row.source && bucket.byKey[row.source] !== undefined) {
|
|
@@ -178,10 +260,10 @@ function computeSecurityOverviewMetrics(data) {
|
|
|
178
260
|
meanTimeToCloseInMinutes: meanMinutes(durationsTo(data.casesInWindow, (row) => {
|
|
179
261
|
return row.closedAt;
|
|
180
262
|
})),
|
|
181
|
-
casesOpenedPerDay: caseDays.map((day) => {
|
|
263
|
+
casesOpenedPerDay: caseDays.map(({ day }) => {
|
|
182
264
|
return casesPerDay.get(day);
|
|
183
265
|
}),
|
|
184
|
-
detectionsPerDay: detectionDays.map((day) => {
|
|
266
|
+
detectionsPerDay: detectionDays.map(({ day }) => {
|
|
185
267
|
return detectionsPerDay.get(day);
|
|
186
268
|
}),
|
|
187
269
|
detectionsInWindow: data.detectionsInWindow.length,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import commonJsModule from "./SecurityOverviewMetrics.js";
|
|
2
|
+
export const calendarDaysBetween = commonJsModule.calendarDaysBetween;
|
|
2
3
|
export const computeSecurityOverviewMetrics = commonJsModule.computeSecurityOverviewMetrics;
|
|
4
|
+
export const dayInTimezone = commonJsModule.dayInTimezone;
|
|
3
5
|
export const daysBetween = commonJsModule.daysBetween;
|
|
6
|
+
export const findCalendarDay = commonJsModule.findCalendarDay;
|
|
4
7
|
export const formatDurationInMinutes = commonJsModule.formatDurationInMinutes;
|
|
5
8
|
export const utcDay = commonJsModule.utcDay;
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* one rendering, and so every rounding edge is unit-testable without a
|
|
15
15
|
* DOM.
|
|
16
16
|
*/
|
|
17
|
+
export interface CompactDurationOptions {
|
|
18
|
+
adjacentUnitsOnly?: boolean | undefined;
|
|
19
|
+
}
|
|
17
20
|
/**
|
|
18
21
|
* An unsigned duration as "2d 5h" / "43m 12s" / "45s". Fractional seconds
|
|
19
22
|
* are floored, so a 59.9-second budget renders "59s" rather than rounding
|
|
@@ -22,9 +25,9 @@
|
|
|
22
25
|
* A duration that floors to zero renders "0s" — a real, sayable state —
|
|
23
26
|
* instead of an empty string.
|
|
24
27
|
*/
|
|
25
|
-
export type FormatDurationCompactFunction = (seconds: number) => string;
|
|
28
|
+
export type FormatDurationCompactFunction = (seconds: number, options?: CompactDurationOptions | undefined) => string;
|
|
26
29
|
export declare const formatDurationCompact: FormatDurationCompactFunction;
|
|
27
|
-
export declare const formatDurationCompactInLanguage: (seconds: number, language?: string | undefined) => string;
|
|
30
|
+
export declare const formatDurationCompactInLanguage: (seconds: number, language?: string | undefined, options?: CompactDurationOptions | undefined) => string;
|
|
28
31
|
/**
|
|
29
32
|
* `errorBudgetRemainingSeconds` is SIGNED: negative means the budget is
|
|
30
33
|
* overspent, and that overage is the single most useful number during a
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* one rendering, and so every rounding edge is unit-testable without a
|
|
15
15
|
* DOM.
|
|
16
16
|
*/
|
|
17
|
+
export interface CompactDurationOptions {
|
|
18
|
+
adjacentUnitsOnly?: boolean | undefined;
|
|
19
|
+
}
|
|
17
20
|
/**
|
|
18
21
|
* An unsigned duration as "2d 5h" / "43m 12s" / "45s". Fractional seconds
|
|
19
22
|
* are floored, so a 59.9-second budget renders "59s" rather than rounding
|
|
@@ -22,9 +25,9 @@
|
|
|
22
25
|
* A duration that floors to zero renders "0s" — a real, sayable state —
|
|
23
26
|
* instead of an empty string.
|
|
24
27
|
*/
|
|
25
|
-
export type FormatDurationCompactFunction = (seconds: number) => string;
|
|
28
|
+
export type FormatDurationCompactFunction = (seconds: number, options?: CompactDurationOptions | undefined) => string;
|
|
26
29
|
export declare const formatDurationCompact: FormatDurationCompactFunction;
|
|
27
|
-
export declare const formatDurationCompactInLanguage: (seconds: number, language?: string | undefined) => string;
|
|
30
|
+
export declare const formatDurationCompactInLanguage: (seconds: number, language?: string | undefined, options?: CompactDurationOptions | undefined) => string;
|
|
28
31
|
/**
|
|
29
32
|
* `errorBudgetRemainingSeconds` is SIGNED: negative means the budget is
|
|
30
33
|
* overspent, and that overage is the single most useful number during a
|
package/Utils/Slo/SloDuration.js
CHANGED
|
@@ -38,7 +38,7 @@ const toFiniteNumber = (value) => {
|
|
|
38
38
|
return value;
|
|
39
39
|
};
|
|
40
40
|
// The units a compact duration names, with their counts: [2 d, 5 h].
|
|
41
|
-
const getCompactParts = (seconds) => {
|
|
41
|
+
const getCompactParts = (seconds, options) => {
|
|
42
42
|
let remainingSeconds = Math.floor(Math.abs(seconds));
|
|
43
43
|
const parts = [];
|
|
44
44
|
for (const unit of UNITS) {
|
|
@@ -50,8 +50,13 @@ const getCompactParts = (seconds) => {
|
|
|
50
50
|
* Skip leading zero units ("0d 5h"), but once a larger unit has been
|
|
51
51
|
* emitted a zero is still skipped rather than padded — "2d" is
|
|
52
52
|
* correct for exactly 48 hours, "2d 0h" is not how anyone says it.
|
|
53
|
+
* With adjacentUnitsOnly a zero right after the first unit ends the
|
|
54
|
+
* duration there: "2d", never "2d 30s".
|
|
53
55
|
*/
|
|
54
56
|
if (count <= 0) {
|
|
57
|
+
if (parts.length > 0 && (options === null || options === void 0 ? void 0 : options.adjacentUnitsOnly)) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
55
60
|
continue;
|
|
56
61
|
}
|
|
57
62
|
parts.push({ count: count, suffix: unit.suffix, unit: unit.unit });
|
|
@@ -59,8 +64,8 @@ const getCompactParts = (seconds) => {
|
|
|
59
64
|
}
|
|
60
65
|
return parts;
|
|
61
66
|
};
|
|
62
|
-
const formatDurationCompact = (seconds) => {
|
|
63
|
-
const parts = getCompactParts(seconds);
|
|
67
|
+
const formatDurationCompact = (seconds, options) => {
|
|
68
|
+
const parts = getCompactParts(seconds, options);
|
|
64
69
|
if (parts.length === 0) {
|
|
65
70
|
return "0s";
|
|
66
71
|
}
|
|
@@ -89,12 +94,12 @@ exports.formatDurationCompact = formatDurationCompact;
|
|
|
89
94
|
* formatDurationCompact itself stays English: the SLO pages still glue its
|
|
90
95
|
* text into English sentences of their own.
|
|
91
96
|
*/
|
|
92
|
-
const formatDurationCompactInLanguage = (seconds, language) => {
|
|
97
|
+
const formatDurationCompactInLanguage = (seconds, language, options) => {
|
|
93
98
|
const write = () => {
|
|
94
99
|
return (0, DateLanguage_1.writeInDateDisplayLanguage)(() => {
|
|
95
|
-
return (0, exports.formatDurationCompact)(seconds);
|
|
100
|
+
return (0, exports.formatDurationCompact)(seconds, options);
|
|
96
101
|
}, (_language, locale) => {
|
|
97
|
-
const parts = getCompactParts(seconds).map((part) => {
|
|
102
|
+
const parts = getCompactParts(seconds, options).map((part) => {
|
|
98
103
|
return { count: part.count, unit: part.unit };
|
|
99
104
|
});
|
|
100
105
|
return (0, DateLanguage_1.formatDurationText)({
|
package/Utils/Slo/SloHealth.js
CHANGED
|
@@ -170,7 +170,7 @@ const getSloNotice = (data) => {
|
|
|
170
170
|
return {
|
|
171
171
|
type: SloNoticeType.Info,
|
|
172
172
|
title: "Measurement is paused",
|
|
173
|
-
body: "Every monitor attached to this SLO has active monitoring disabled — by hand, by a manual incident, or by a
|
|
173
|
+
body: "Every monitor attached to this SLO has active monitoring disabled — by hand, by a manual incident, or by a maintenance event — so there is no signal to measure. The SLO resumes automatically when a monitor starts reporting again.",
|
|
174
174
|
action: {
|
|
175
175
|
label: "View monitors",
|
|
176
176
|
target: SloNoticeActionTarget.Monitors,
|
|
@@ -22,6 +22,7 @@ export interface OnCallPageSmsLanguage {
|
|
|
22
22
|
projectName: string;
|
|
23
23
|
isPageAgain: boolean;
|
|
24
24
|
lead: string;
|
|
25
|
+
isPolicyLead?: boolean | undefined;
|
|
25
26
|
}) => string;
|
|
26
27
|
action: string;
|
|
27
28
|
observerLead: string;
|
|
@@ -37,6 +38,7 @@ export interface OnCallPageSmsInput {
|
|
|
37
38
|
link: string;
|
|
38
39
|
isPageAgain?: boolean | undefined;
|
|
39
40
|
lead?: string | null | undefined;
|
|
41
|
+
isPolicyLead?: boolean | undefined;
|
|
40
42
|
isObserverPage?: boolean | undefined;
|
|
41
43
|
sentAs?: ((text: string) => string) | undefined;
|
|
42
44
|
language?: OnCallPageSmsLanguage | undefined;
|
|
@@ -22,6 +22,7 @@ export interface OnCallPageSmsLanguage {
|
|
|
22
22
|
projectName: string;
|
|
23
23
|
isPageAgain: boolean;
|
|
24
24
|
lead: string;
|
|
25
|
+
isPolicyLead?: boolean | undefined;
|
|
25
26
|
}) => string;
|
|
26
27
|
action: string;
|
|
27
28
|
observerLead: string;
|
|
@@ -37,6 +38,7 @@ export interface OnCallPageSmsInput {
|
|
|
37
38
|
link: string;
|
|
38
39
|
isPageAgain?: boolean | undefined;
|
|
39
40
|
lead?: string | null | undefined;
|
|
41
|
+
isPolicyLead?: boolean | undefined;
|
|
40
42
|
isObserverPage?: boolean | undefined;
|
|
41
43
|
sentAs?: ((text: string) => string) | undefined;
|
|
42
44
|
language?: OnCallPageSmsLanguage | undefined;
|
|
@@ -198,7 +198,7 @@ const compose = (parts, options) => {
|
|
|
198
198
|
return composeInLanguage(parts, parts.language, options);
|
|
199
199
|
}
|
|
200
200
|
let head = parts.lead
|
|
201
|
-
? `${parts.productName}: ${parts.lead} about ${parts.what}`
|
|
201
|
+
? `${parts.productName}: ${parts.lead} ${parts.isPolicyLead ? "for" : "about"} ${parts.what}`
|
|
202
202
|
: parts.isObserverPage
|
|
203
203
|
? `${parts.productName} ${OnCallObserverPage_1.ON_CALL_OBSERVER_PAGE_SMS_LEAD}: ${parts.what}`
|
|
204
204
|
: `${parts.productName}: ${parts.what}`;
|
|
@@ -253,6 +253,7 @@ const composeInLanguage = (parts, language, options) => {
|
|
|
253
253
|
projectName: options.withProject ? parts.projectName : "",
|
|
254
254
|
isPageAgain: parts.isPageAgain,
|
|
255
255
|
lead: parts.lead,
|
|
256
|
+
isPolicyLead: parts.isPolicyLead,
|
|
256
257
|
}))}`;
|
|
257
258
|
if (options.title) {
|
|
258
259
|
sentence += `: ${options.title}`;
|
|
@@ -340,6 +341,7 @@ const buildOnCallPageSms = (input) => {
|
|
|
340
341
|
link: input.link.trim(),
|
|
341
342
|
isPageAgain: input.isPageAgain === true,
|
|
342
343
|
lead: toValue(input.lead),
|
|
344
|
+
isPolicyLead: input.isPolicyLead === true && Boolean(toValue(input.lead)),
|
|
343
345
|
isObserverPage: input.isObserverPage === true,
|
|
344
346
|
language: input.language,
|
|
345
347
|
writesWordsInGsm7: Boolean(input.language) && !isWrittenInUcs2,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum StateListType {
|
|
2
|
+
IncidentState = "IncidentState",
|
|
3
|
+
AlertState = "AlertState",
|
|
4
|
+
ScheduledMaintenanceState = "ScheduledMaintenanceState",
|
|
5
|
+
MonitorStatus = "MonitorStatus",
|
|
6
|
+
IncidentSeverity = "IncidentSeverity",
|
|
7
|
+
AlertSeverity = "AlertSeverity",
|
|
8
|
+
IncidentPostmortemStatus = "IncidentPostmortemStatus",
|
|
9
|
+
SecurityCaseStatus = "SecurityCaseStatus",
|
|
10
|
+
SecurityCasePriority = "SecurityCasePriority"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum StateListType {
|
|
2
|
+
IncidentState = "IncidentState",
|
|
3
|
+
AlertState = "AlertState",
|
|
4
|
+
ScheduledMaintenanceState = "ScheduledMaintenanceState",
|
|
5
|
+
MonitorStatus = "MonitorStatus",
|
|
6
|
+
IncidentSeverity = "IncidentSeverity",
|
|
7
|
+
AlertSeverity = "AlertSeverity",
|
|
8
|
+
IncidentPostmortemStatus = "IncidentPostmortemStatus",
|
|
9
|
+
SecurityCaseStatus = "SecurityCaseStatus",
|
|
10
|
+
SecurityCasePriority = "SecurityCasePriority"
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateListType = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* The lists a project orders (Utils/StateOrder), each by its records'
|
|
6
|
+
* table. A module of its own, so what only names a list - DefaultRecordNames,
|
|
7
|
+
* which every form loads, sign-in and sign-up pages included - loads none of
|
|
8
|
+
* StateOrder's lists and rules with it.
|
|
9
|
+
*/
|
|
10
|
+
var StateListType;
|
|
11
|
+
(function (StateListType) {
|
|
12
|
+
StateListType["IncidentState"] = "IncidentState";
|
|
13
|
+
StateListType["AlertState"] = "AlertState";
|
|
14
|
+
StateListType["ScheduledMaintenanceState"] = "ScheduledMaintenanceState";
|
|
15
|
+
StateListType["MonitorStatus"] = "MonitorStatus";
|
|
16
|
+
StateListType["IncidentSeverity"] = "IncidentSeverity";
|
|
17
|
+
StateListType["AlertSeverity"] = "AlertSeverity";
|
|
18
|
+
StateListType["IncidentPostmortemStatus"] = "IncidentPostmortemStatus";
|
|
19
|
+
StateListType["SecurityCaseStatus"] = "SecurityCaseStatus";
|
|
20
|
+
StateListType["SecurityCasePriority"] = "SecurityCasePriority";
|
|
21
|
+
})(StateListType || (exports.StateListType = StateListType = {}));
|
package/Utils/StateOrder.d.mts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
AlertState = "AlertState",
|
|
4
|
-
ScheduledMaintenanceState = "ScheduledMaintenanceState",
|
|
5
|
-
MonitorStatus = "MonitorStatus",
|
|
6
|
-
IncidentSeverity = "IncidentSeverity",
|
|
7
|
-
AlertSeverity = "AlertSeverity",
|
|
8
|
-
IncidentPostmortemStatus = "IncidentPostmortemStatus",
|
|
9
|
-
SecurityCaseStatus = "SecurityCaseStatus",
|
|
10
|
-
SecurityCasePriority = "SecurityCasePriority"
|
|
11
|
-
}
|
|
1
|
+
import { StateListType } from "./StateListType.mjs";
|
|
2
|
+
export { StateListType };
|
|
12
3
|
export interface StateListBuiltIn {
|
|
13
4
|
flag: string;
|
|
14
5
|
role: string;
|
|
@@ -24,8 +15,14 @@ export interface StateListDefinition {
|
|
|
24
15
|
keepsBuiltInOrder: boolean;
|
|
25
16
|
insertAboveFlag?: string | undefined;
|
|
26
17
|
orderReason?: string | undefined;
|
|
18
|
+
worstAt: StateListEnd;
|
|
19
|
+
}
|
|
20
|
+
export declare enum StateListEnd {
|
|
21
|
+
Top = "Top",
|
|
22
|
+
Bottom = "Bottom"
|
|
27
23
|
}
|
|
28
24
|
export declare const STATE_LISTS: Record<StateListType, StateListDefinition>;
|
|
25
|
+
export declare const getStateListOfTable: (tableName: string | null | undefined) => StateListDefinition | null;
|
|
29
26
|
export interface StateListRow {
|
|
30
27
|
id: string;
|
|
31
28
|
name: string;
|
package/Utils/StateOrder.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
AlertState = "AlertState",
|
|
4
|
-
ScheduledMaintenanceState = "ScheduledMaintenanceState",
|
|
5
|
-
MonitorStatus = "MonitorStatus",
|
|
6
|
-
IncidentSeverity = "IncidentSeverity",
|
|
7
|
-
AlertSeverity = "AlertSeverity",
|
|
8
|
-
IncidentPostmortemStatus = "IncidentPostmortemStatus",
|
|
9
|
-
SecurityCaseStatus = "SecurityCaseStatus",
|
|
10
|
-
SecurityCasePriority = "SecurityCasePriority"
|
|
11
|
-
}
|
|
1
|
+
import { StateListType } from "./StateListType";
|
|
2
|
+
export { StateListType };
|
|
12
3
|
export interface StateListBuiltIn {
|
|
13
4
|
flag: string;
|
|
14
5
|
role: string;
|
|
@@ -24,8 +15,14 @@ export interface StateListDefinition {
|
|
|
24
15
|
keepsBuiltInOrder: boolean;
|
|
25
16
|
insertAboveFlag?: string | undefined;
|
|
26
17
|
orderReason?: string | undefined;
|
|
18
|
+
worstAt: StateListEnd;
|
|
19
|
+
}
|
|
20
|
+
export declare enum StateListEnd {
|
|
21
|
+
Top = "Top",
|
|
22
|
+
Bottom = "Bottom"
|
|
27
23
|
}
|
|
28
24
|
export declare const STATE_LISTS: Record<StateListType, StateListDefinition>;
|
|
25
|
+
export declare const getStateListOfTable: (tableName: string | null | undefined) => StateListDefinition | null;
|
|
29
26
|
export interface StateListRow {
|
|
30
27
|
id: string;
|
|
31
28
|
name: string;
|