@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,456 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ALWAYS_POSTED_UPDATE_KINDS = exports.NotificationRuleUpdatesChoice = exports.NotificationRuleUpdateKind = void 0;
|
|
7
|
+
const EventType_1 = __importDefault(require("./EventType"));
|
|
8
|
+
const NotificationRuleWorkspaceChannel_1 = require("./NotificationRuleWorkspaceChannel");
|
|
9
|
+
/*
|
|
10
|
+
* WHICH UPDATES A WORKSPACE NOTIFICATION RULE POSTS (issue #7581).
|
|
11
|
+
*
|
|
12
|
+
* A record's channels hear of everything that happens to it: every state
|
|
13
|
+
* change, note, owner, page and edit. A channel for the people working the
|
|
14
|
+
* incident wants that. A quiet one - #executive-alerts - wants to hear that
|
|
15
|
+
* an incident was declared and resolved, and little else, and every
|
|
16
|
+
* granular update buried those two. So an incident, alert, episode or
|
|
17
|
+
* scheduled maintenance rule says which updates it posts:
|
|
18
|
+
*
|
|
19
|
+
* Which updates to post
|
|
20
|
+
* (o) Every update
|
|
21
|
+
* ( ) Key updates only Resolved and reopened, severity changes,
|
|
22
|
+
* public notes and the postmortem.
|
|
23
|
+
* ( ) Choose updates [x] Resolved and reopened [ ] Private notes ...
|
|
24
|
+
*
|
|
25
|
+
* The choice is stored on the rule, as the kinds of update it posts
|
|
26
|
+
* (BaseNotificationRule.updatesToPost). No list - every rule saved before
|
|
27
|
+
* there was a choice, and every new rule until somebody makes one - posts
|
|
28
|
+
* every update, as rules always did. An empty list posts only what every
|
|
29
|
+
* rule posts (ALWAYS_POSTED_UPDATE_KINDS): the record's first message -
|
|
30
|
+
* declared, created or scheduled - which is what the channel is about, and
|
|
31
|
+
* a video call's Join button, which a rule's Video Call step promises
|
|
32
|
+
* "wherever the rule posts".
|
|
33
|
+
*
|
|
34
|
+
* Every entry of a record's feed is one kind of update
|
|
35
|
+
* (Server/Utils/Feed/FeedUpdateKinds), and so is an on-call policy's run
|
|
36
|
+
* message (Paging). A message is posted in a channel only when a rule the
|
|
37
|
+
* channel is for wants one of its kinds (wantsUpdate, isWantedInChannel). A
|
|
38
|
+
* message can be of more than one kind - an edit that changes the severity
|
|
39
|
+
* and the title is a severity change and an edit - and is posted where any
|
|
40
|
+
* of them is wanted.
|
|
41
|
+
*
|
|
42
|
+
* An on-call policy rule chooses too (issue #7549), from updates of its
|
|
43
|
+
* own: who is on call now, who is next, nobody on call, overrides, changes
|
|
44
|
+
* to the policy and its owners. A handoff is one message - "📞 @Ana is now
|
|
45
|
+
* on call for Payments until Fri at 5:50 PM" - that names who is next only
|
|
46
|
+
* where a rule asks for it (OnCallHandoffPosts). A NEW on-call rule starts
|
|
47
|
+
* with the key updates ticked (getNewRuleUpdatesToPost): who is on call
|
|
48
|
+
* now, and when nobody is.
|
|
49
|
+
*
|
|
50
|
+
* Monitor, security and SLO rules post every update; they have no choice
|
|
51
|
+
* yet (getChoosableKinds is empty for them).
|
|
52
|
+
*/
|
|
53
|
+
var NotificationRuleUpdateKind;
|
|
54
|
+
(function (NotificationRuleUpdateKind) {
|
|
55
|
+
// The record's first message: declared, created or scheduled. Always posted.
|
|
56
|
+
NotificationRuleUpdateKind["Created"] = "Created";
|
|
57
|
+
// A video call started for the record, with its Join button. Always posted.
|
|
58
|
+
NotificationRuleUpdateKind["VideoCallStarted"] = "VideoCallStarted";
|
|
59
|
+
// Resolved, or reopened after it was resolved.
|
|
60
|
+
NotificationRuleUpdateKind["ResolvedAndReopened"] = "ResolvedAndReopened";
|
|
61
|
+
/*
|
|
62
|
+
* Any other move between states: acknowledged, investigating, or on from
|
|
63
|
+
* one resolved state to another. A scheduled maintenance event's every
|
|
64
|
+
* state change.
|
|
65
|
+
*/
|
|
66
|
+
NotificationRuleUpdateKind["StateChanges"] = "StateChanges";
|
|
67
|
+
NotificationRuleUpdateKind["SeverityChanges"] = "SeverityChanges";
|
|
68
|
+
// Notes shown on status pages.
|
|
69
|
+
NotificationRuleUpdateKind["PublicNotes"] = "PublicNotes";
|
|
70
|
+
NotificationRuleUpdateKind["PrivateNotes"] = "PrivateNotes";
|
|
71
|
+
// Owners added and removed; an incident's roles - Incident Commander - too.
|
|
72
|
+
NotificationRuleUpdateKind["Owners"] = "Owners";
|
|
73
|
+
// An on-call policy's run: who was paged, who acknowledged, who was not reached.
|
|
74
|
+
NotificationRuleUpdateKind["Paging"] = "Paging";
|
|
75
|
+
// An episode's incidents (or alerts) added and removed.
|
|
76
|
+
NotificationRuleUpdateKind["EpisodeMembers"] = "EpisodeMembers";
|
|
77
|
+
// The postmortem's note, its draft and its status.
|
|
78
|
+
NotificationRuleUpdateKind["Postmortem"] = "Postmortem";
|
|
79
|
+
// AI root cause analyses, call summaries and automatic fixes.
|
|
80
|
+
NotificationRuleUpdateKind["AI"] = "AI";
|
|
81
|
+
// The title, description, labels, custom fields and other fields.
|
|
82
|
+
NotificationRuleUpdateKind["Edits"] = "Edits";
|
|
83
|
+
// Everything else: linked records, reminders, delivery problems.
|
|
84
|
+
NotificationRuleUpdateKind["Other"] = "Other";
|
|
85
|
+
/*
|
|
86
|
+
* An on-call policy's updates (issue #7549). Each of its feed entries is
|
|
87
|
+
* one of these, or Owners (FeedUpdateKinds).
|
|
88
|
+
*/
|
|
89
|
+
// A handoff: who is on call now in one of the policy's schedules, until when.
|
|
90
|
+
NotificationRuleUpdateKind["OnCallNow"] = "OnCallNow";
|
|
91
|
+
// Who takes over at the next handoff.
|
|
92
|
+
NotificationRuleUpdateKind["OnCallNext"] = "OnCallNext";
|
|
93
|
+
// A schedule with nobody on call: alerts that reach it page no one.
|
|
94
|
+
NotificationRuleUpdateKind["NobodyOnCall"] = "NobodyOnCall";
|
|
95
|
+
// Somebody covering for somebody else, and covers taken back.
|
|
96
|
+
NotificationRuleUpdateKind["Overrides"] = "Overrides";
|
|
97
|
+
/*
|
|
98
|
+
* Schedules, people and teams added to or removed from the policy's
|
|
99
|
+
* escalation rules.
|
|
100
|
+
*/
|
|
101
|
+
NotificationRuleUpdateKind["PolicyChanges"] = "PolicyChanges";
|
|
102
|
+
})(NotificationRuleUpdateKind || (exports.NotificationRuleUpdateKind = NotificationRuleUpdateKind = {}));
|
|
103
|
+
// What a rule picks on its Updates step.
|
|
104
|
+
var NotificationRuleUpdatesChoice;
|
|
105
|
+
(function (NotificationRuleUpdatesChoice) {
|
|
106
|
+
NotificationRuleUpdatesChoice["EveryUpdate"] = "EveryUpdate";
|
|
107
|
+
NotificationRuleUpdatesChoice["KeyUpdates"] = "KeyUpdates";
|
|
108
|
+
NotificationRuleUpdatesChoice["ChosenUpdates"] = "ChosenUpdates";
|
|
109
|
+
})(NotificationRuleUpdatesChoice || (exports.NotificationRuleUpdatesChoice = NotificationRuleUpdatesChoice = {}));
|
|
110
|
+
/*
|
|
111
|
+
* Posted wherever a record's messages go, whatever a rule chose: the first
|
|
112
|
+
* message, and a video call's Join button.
|
|
113
|
+
*/
|
|
114
|
+
exports.ALWAYS_POSTED_UPDATE_KINDS = [
|
|
115
|
+
NotificationRuleUpdateKind.Created,
|
|
116
|
+
NotificationRuleUpdateKind.VideoCallStarted,
|
|
117
|
+
];
|
|
118
|
+
/*
|
|
119
|
+
* The updates each kind of rule can choose, in the order its Updates step
|
|
120
|
+
* lists them. Only what that kind of record posts: an alert has no public
|
|
121
|
+
* notes or postmortem, an episode's severity changes stay in its feed, a
|
|
122
|
+
* scheduled maintenance event's owners are not posted.
|
|
123
|
+
*/
|
|
124
|
+
const CHOOSABLE_UPDATE_KINDS = {
|
|
125
|
+
[EventType_1.default.Incident]: [
|
|
126
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
127
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
128
|
+
NotificationRuleUpdateKind.SeverityChanges,
|
|
129
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
130
|
+
NotificationRuleUpdateKind.PrivateNotes,
|
|
131
|
+
NotificationRuleUpdateKind.Owners,
|
|
132
|
+
NotificationRuleUpdateKind.Paging,
|
|
133
|
+
NotificationRuleUpdateKind.Postmortem,
|
|
134
|
+
NotificationRuleUpdateKind.AI,
|
|
135
|
+
NotificationRuleUpdateKind.Edits,
|
|
136
|
+
NotificationRuleUpdateKind.Other,
|
|
137
|
+
],
|
|
138
|
+
[EventType_1.default.Alert]: [
|
|
139
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
140
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
141
|
+
NotificationRuleUpdateKind.SeverityChanges,
|
|
142
|
+
NotificationRuleUpdateKind.PrivateNotes,
|
|
143
|
+
NotificationRuleUpdateKind.Owners,
|
|
144
|
+
NotificationRuleUpdateKind.Paging,
|
|
145
|
+
NotificationRuleUpdateKind.AI,
|
|
146
|
+
NotificationRuleUpdateKind.Edits,
|
|
147
|
+
NotificationRuleUpdateKind.Other,
|
|
148
|
+
],
|
|
149
|
+
[EventType_1.default.IncidentEpisode]: [
|
|
150
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
151
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
152
|
+
NotificationRuleUpdateKind.EpisodeMembers,
|
|
153
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
154
|
+
NotificationRuleUpdateKind.PrivateNotes,
|
|
155
|
+
NotificationRuleUpdateKind.Owners,
|
|
156
|
+
NotificationRuleUpdateKind.Paging,
|
|
157
|
+
NotificationRuleUpdateKind.Other,
|
|
158
|
+
],
|
|
159
|
+
[EventType_1.default.AlertEpisode]: [
|
|
160
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
161
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
162
|
+
NotificationRuleUpdateKind.EpisodeMembers,
|
|
163
|
+
NotificationRuleUpdateKind.PrivateNotes,
|
|
164
|
+
NotificationRuleUpdateKind.Owners,
|
|
165
|
+
NotificationRuleUpdateKind.Paging,
|
|
166
|
+
NotificationRuleUpdateKind.Other,
|
|
167
|
+
],
|
|
168
|
+
[EventType_1.default.ScheduledMaintenance]: [
|
|
169
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
170
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
171
|
+
NotificationRuleUpdateKind.PrivateNotes,
|
|
172
|
+
NotificationRuleUpdateKind.Other,
|
|
173
|
+
],
|
|
174
|
+
// Everything an on-call policy's feed posts: nothing is Everything else.
|
|
175
|
+
[EventType_1.default.OnCallDutyPolicy]: [
|
|
176
|
+
NotificationRuleUpdateKind.OnCallNow,
|
|
177
|
+
NotificationRuleUpdateKind.OnCallNext,
|
|
178
|
+
NotificationRuleUpdateKind.NobodyOnCall,
|
|
179
|
+
NotificationRuleUpdateKind.Overrides,
|
|
180
|
+
NotificationRuleUpdateKind.PolicyChanges,
|
|
181
|
+
NotificationRuleUpdateKind.Owners,
|
|
182
|
+
],
|
|
183
|
+
};
|
|
184
|
+
/*
|
|
185
|
+
* Key updates only: what a quiet channel wants to hear, beside the first
|
|
186
|
+
* message - that the record is over (or is not, after all), how bad it is,
|
|
187
|
+
* what its status page says and, for an incident, what was learned.
|
|
188
|
+
*/
|
|
189
|
+
const KEY_UPDATE_KINDS = {
|
|
190
|
+
[EventType_1.default.Incident]: [
|
|
191
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
192
|
+
NotificationRuleUpdateKind.SeverityChanges,
|
|
193
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
194
|
+
NotificationRuleUpdateKind.Postmortem,
|
|
195
|
+
],
|
|
196
|
+
[EventType_1.default.Alert]: [
|
|
197
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
198
|
+
NotificationRuleUpdateKind.SeverityChanges,
|
|
199
|
+
],
|
|
200
|
+
[EventType_1.default.IncidentEpisode]: [
|
|
201
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
202
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
203
|
+
],
|
|
204
|
+
[EventType_1.default.AlertEpisode]: [
|
|
205
|
+
NotificationRuleUpdateKind.ResolvedAndReopened,
|
|
206
|
+
],
|
|
207
|
+
[EventType_1.default.ScheduledMaintenance]: [
|
|
208
|
+
NotificationRuleUpdateKind.StateChanges,
|
|
209
|
+
NotificationRuleUpdateKind.PublicNotes,
|
|
210
|
+
],
|
|
211
|
+
/*
|
|
212
|
+
* Who is on call: each handoff, and a schedule left with nobody on call -
|
|
213
|
+
* the two things an on-call channel is for (issue #7549).
|
|
214
|
+
*/
|
|
215
|
+
[EventType_1.default.OnCallDutyPolicy]: [
|
|
216
|
+
NotificationRuleUpdateKind.OnCallNow,
|
|
217
|
+
NotificationRuleUpdateKind.NobodyOnCall,
|
|
218
|
+
],
|
|
219
|
+
};
|
|
220
|
+
/*
|
|
221
|
+
* What a NEW rule of a kind starts with, when that is not every update. An
|
|
222
|
+
* on-call channel used to hear of every handoff three times over, and of
|
|
223
|
+
* every schedule, person and team added to the policy (issue #7549): a new
|
|
224
|
+
* on-call rule starts on the key updates instead - who is on call now, and
|
|
225
|
+
* when nobody is - and its Updates step offers the rest. Rules saved
|
|
226
|
+
* before keep posting every update.
|
|
227
|
+
*/
|
|
228
|
+
const NEW_RULE_UPDATE_KINDS = {
|
|
229
|
+
[EventType_1.default.OnCallDutyPolicy]: [
|
|
230
|
+
NotificationRuleUpdateKind.OnCallNow,
|
|
231
|
+
NotificationRuleUpdateKind.NobodyOnCall,
|
|
232
|
+
],
|
|
233
|
+
};
|
|
234
|
+
class NotificationRuleUpdates {
|
|
235
|
+
static isUpdateKind(value) {
|
|
236
|
+
return (typeof value === "string" &&
|
|
237
|
+
Object.values(NotificationRuleUpdateKind).includes(value));
|
|
238
|
+
}
|
|
239
|
+
static isAlwaysPosted(kind) {
|
|
240
|
+
return exports.ALWAYS_POSTED_UPDATE_KINDS.includes(kind);
|
|
241
|
+
}
|
|
242
|
+
// The updates a kind of rule can choose, in order: none when it has no choice.
|
|
243
|
+
static getChoosableKinds(eventType) {
|
|
244
|
+
return eventType ? [...(CHOOSABLE_UPDATE_KINDS[eventType] || [])] : [];
|
|
245
|
+
}
|
|
246
|
+
// Whether a kind of rule chooses which updates it posts.
|
|
247
|
+
static canChooseUpdates(eventType) {
|
|
248
|
+
return this.getChoosableKinds(eventType).length > 0;
|
|
249
|
+
}
|
|
250
|
+
/*
|
|
251
|
+
* The updates a new rule of this kind starts with, or undefined when it
|
|
252
|
+
* starts posting every update (NEW_RULE_UPDATE_KINDS).
|
|
253
|
+
*/
|
|
254
|
+
static getNewRuleUpdatesToPost(eventType) {
|
|
255
|
+
const kinds = eventType ? NEW_RULE_UPDATE_KINDS[eventType] : undefined;
|
|
256
|
+
return kinds ? [...kinds] : undefined;
|
|
257
|
+
}
|
|
258
|
+
/*
|
|
259
|
+
* A new rule's JSON, as far as its updates go: the updates its kind
|
|
260
|
+
* starts with, or nothing - every update.
|
|
261
|
+
*/
|
|
262
|
+
static getNewRuleUpdates(eventType) {
|
|
263
|
+
const kinds = this.getNewRuleUpdatesToPost(eventType);
|
|
264
|
+
return kinds ? { updatesToPost: kinds } : {};
|
|
265
|
+
}
|
|
266
|
+
// Key updates only, in the order the Updates step lists them.
|
|
267
|
+
static getKeyKinds(eventType) {
|
|
268
|
+
return eventType ? [...(KEY_UPDATE_KINDS[eventType] || [])] : [];
|
|
269
|
+
}
|
|
270
|
+
/*
|
|
271
|
+
* The updates a rule chose, as stored: undefined when it chose none, which
|
|
272
|
+
* is every update. A value that is not a kind - typed by hand into the
|
|
273
|
+
* JSON, or a kind a later version took out - is left out.
|
|
274
|
+
*/
|
|
275
|
+
static getChosenKinds(rule) {
|
|
276
|
+
const stored = rule === null || rule === void 0 ? void 0 : rule.updatesToPost;
|
|
277
|
+
if (!Array.isArray(stored)) {
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
const kinds = [];
|
|
281
|
+
for (const value of stored) {
|
|
282
|
+
if (this.isUpdateKind(value) && !kinds.includes(value)) {
|
|
283
|
+
kinds.push(value);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return kinds;
|
|
287
|
+
}
|
|
288
|
+
/*
|
|
289
|
+
* What the rule picked on its Updates step. A list that is exactly Key
|
|
290
|
+
* updates only reads as that choice, in whatever order it was stored.
|
|
291
|
+
*/
|
|
292
|
+
static getChoice(data) {
|
|
293
|
+
const chosen = this.getChosenKinds(data.rule);
|
|
294
|
+
if (!chosen || !this.canChooseUpdates(data.eventType)) {
|
|
295
|
+
return NotificationRuleUpdatesChoice.EveryUpdate;
|
|
296
|
+
}
|
|
297
|
+
if (this.isSameKinds(chosen, this.getKeyKinds(data.eventType))) {
|
|
298
|
+
return NotificationRuleUpdatesChoice.KeyUpdates;
|
|
299
|
+
}
|
|
300
|
+
return NotificationRuleUpdatesChoice.ChosenUpdates;
|
|
301
|
+
}
|
|
302
|
+
/*
|
|
303
|
+
* The updates the rule posts, of those its kind can choose, in their
|
|
304
|
+
* order: every one when it chose none.
|
|
305
|
+
*/
|
|
306
|
+
static getPostedKinds(data) {
|
|
307
|
+
const choosable = this.getChoosableKinds(data.eventType);
|
|
308
|
+
const chosen = this.getChosenKinds(data.rule);
|
|
309
|
+
if (!chosen) {
|
|
310
|
+
return choosable;
|
|
311
|
+
}
|
|
312
|
+
return choosable.filter((kind) => {
|
|
313
|
+
return chosen.includes(kind);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
/*
|
|
317
|
+
* The rule with `kinds` as the updates it posts, put in the order its
|
|
318
|
+
* Updates step lists them. Every update - no list, or every kind its
|
|
319
|
+
* Updates step lists - takes the list out, so the rule goes on posting
|
|
320
|
+
* every update, the kinds a later version adds included.
|
|
321
|
+
*/
|
|
322
|
+
static withChosenKinds(data) {
|
|
323
|
+
const rule = Object.assign({}, (data.rule || {}));
|
|
324
|
+
const choosable = this.getChoosableKinds(data.eventType);
|
|
325
|
+
const kinds = data.kinds
|
|
326
|
+
? choosable.filter((kind) => {
|
|
327
|
+
return data.kinds.includes(kind);
|
|
328
|
+
})
|
|
329
|
+
: undefined;
|
|
330
|
+
if (!kinds || choosable.length === 0 || kinds.length === choosable.length) {
|
|
331
|
+
delete rule.updatesToPost;
|
|
332
|
+
return rule;
|
|
333
|
+
}
|
|
334
|
+
rule.updatesToPost = kinds;
|
|
335
|
+
return rule;
|
|
336
|
+
}
|
|
337
|
+
// The rule as a choice on its Updates step sets it.
|
|
338
|
+
static withChoice(data) {
|
|
339
|
+
if (data.choice === NotificationRuleUpdatesChoice.EveryUpdate) {
|
|
340
|
+
return this.withChosenKinds({
|
|
341
|
+
rule: data.rule,
|
|
342
|
+
eventType: data.eventType,
|
|
343
|
+
kinds: undefined,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
if (data.choice === NotificationRuleUpdatesChoice.KeyUpdates) {
|
|
347
|
+
return this.withChosenKinds({
|
|
348
|
+
rule: data.rule,
|
|
349
|
+
eventType: data.eventType,
|
|
350
|
+
kinds: this.getKeyKinds(data.eventType),
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
return this.withChosenKinds({
|
|
354
|
+
rule: data.rule,
|
|
355
|
+
eventType: data.eventType,
|
|
356
|
+
kinds: data.kinds || [],
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/*
|
|
360
|
+
* Whether a message of these kinds goes wherever the record's messages
|
|
361
|
+
* go, whatever the rules chose: one that says nothing of its kind - a
|
|
362
|
+
* monitor's - or one every rule posts.
|
|
363
|
+
*/
|
|
364
|
+
static isPostedEverywhere(updateKinds) {
|
|
365
|
+
return (!updateKinds ||
|
|
366
|
+
updateKinds.length === 0 ||
|
|
367
|
+
updateKinds.some((kind) => {
|
|
368
|
+
return this.isAlwaysPosted(kind);
|
|
369
|
+
}));
|
|
370
|
+
}
|
|
371
|
+
/*
|
|
372
|
+
* Whether a rule posts a message of these kinds: one posted everywhere
|
|
373
|
+
* (isPostedEverywhere), or one of the updates it chose - every one when
|
|
374
|
+
* it chose none.
|
|
375
|
+
*/
|
|
376
|
+
static wantsUpdate(data) {
|
|
377
|
+
if (!data.updateKinds || this.isPostedEverywhere(data.updateKinds)) {
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
const chosen = this.getChosenKinds(data.rule);
|
|
381
|
+
if (!chosen) {
|
|
382
|
+
return true;
|
|
383
|
+
}
|
|
384
|
+
return data.updateKinds.some((kind) => {
|
|
385
|
+
return chosen.includes(kind);
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/*
|
|
389
|
+
* Whether a message of these kinds is posted in a channel OneUptime
|
|
390
|
+
* created for a record: when one of the rules that asked for the channel
|
|
391
|
+
* wants it. A channel stored before its rules were recorded, or whose
|
|
392
|
+
* every rule was deleted since, has no rule left to ask, and gets every
|
|
393
|
+
* update, as it always did.
|
|
394
|
+
*/
|
|
395
|
+
static isWantedInChannel(data) {
|
|
396
|
+
const rulesOfChannel = data.rules.filter((rule) => {
|
|
397
|
+
return NotificationRuleWorkspaceChannel_1.NotificationRuleWorkspaceChannelUtil.isChannelOfRule({
|
|
398
|
+
channel: data.channel,
|
|
399
|
+
notificationRuleId: rule.id,
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
if (rulesOfChannel.length === 0) {
|
|
403
|
+
return true;
|
|
404
|
+
}
|
|
405
|
+
return rulesOfChannel.some((rule) => {
|
|
406
|
+
return this.wantsUpdate({
|
|
407
|
+
rule: rule.rule,
|
|
408
|
+
updateKinds: data.updateKinds,
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
/*
|
|
413
|
+
* Which update a move between states is: resolving the record, or
|
|
414
|
+
* reopening it, is Resolved and reopened; any other - acknowledged,
|
|
415
|
+
* investigating, or on from one resolved state to another ("Resolved" to
|
|
416
|
+
* "Closed") - is another state change.
|
|
417
|
+
*/
|
|
418
|
+
static getStateChangeKind(data) {
|
|
419
|
+
return data.isResolved !== data.wasResolved
|
|
420
|
+
? NotificationRuleUpdateKind.ResolvedAndReopened
|
|
421
|
+
: NotificationRuleUpdateKind.StateChanges;
|
|
422
|
+
}
|
|
423
|
+
/*
|
|
424
|
+
* What is wrong with the updates a rule is saved with, through the API or
|
|
425
|
+
* the Dashboard, or null when nothing is: a list of the kinds its kind of
|
|
426
|
+
* rule can choose, or nothing at all.
|
|
427
|
+
*/
|
|
428
|
+
static getValidationError(data) {
|
|
429
|
+
if (data.updatesToPost === undefined || data.updatesToPost === null) {
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
const choosable = this.getChoosableKinds(data.eventType);
|
|
433
|
+
if (choosable.length === 0) {
|
|
434
|
+
return `${data.eventType || "These"} rules post every update: leave updatesToPost out.`;
|
|
435
|
+
}
|
|
436
|
+
if (!Array.isArray(data.updatesToPost)) {
|
|
437
|
+
return `updatesToPost is a list of the updates the rule posts, any of: ${choosable.join(", ")}. Leave it out to post every update.`;
|
|
438
|
+
}
|
|
439
|
+
for (const value of data.updatesToPost) {
|
|
440
|
+
if (!this.isUpdateKind(value) ||
|
|
441
|
+
!choosable.includes(value)) {
|
|
442
|
+
// A value typed by hand can be anything: only its start is repeated.
|
|
443
|
+
const shown = String(JSON.stringify(value)).substring(0, 80);
|
|
444
|
+
return `updatesToPost lists ${shown}, which ${data.eventType} rules cannot choose. They choose any of: ${choosable.join(", ")}.`;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
}
|
|
449
|
+
static isSameKinds(first, second) {
|
|
450
|
+
return (first.length === second.length &&
|
|
451
|
+
first.every((kind) => {
|
|
452
|
+
return second.includes(kind);
|
|
453
|
+
}));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
exports.default = NotificationRuleUpdates;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./NotificationRuleUpdates.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const ALWAYS_POSTED_UPDATE_KINDS = commonJsModule.ALWAYS_POSTED_UPDATE_KINDS;
|
|
4
|
+
export const NotificationRuleUpdateKind = commonJsModule.NotificationRuleUpdateKind;
|
|
5
|
+
export const NotificationRuleUpdatesChoice = commonJsModule.NotificationRuleUpdatesChoice;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const MAX_TEXT_LENGTH: number;
|
|
2
|
+
export declare const MIN_MEANING_SIMILARITY: number;
|
|
3
|
+
export declare const MIN_SHARED_WORDS: number;
|
|
4
|
+
export declare const MAX_SHARED_TERMS: number;
|
|
5
|
+
export interface MeaningConcept {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
}
|
|
10
|
+
export declare const MEANING_CONCEPTS: ReadonlyArray<MeaningConcept>;
|
|
11
|
+
export interface MeaningTerms {
|
|
12
|
+
weights: Map<string, number>;
|
|
13
|
+
labels: Map<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export interface MeaningScore {
|
|
16
|
+
similarity: number;
|
|
17
|
+
sharedTerms: Array<string>;
|
|
18
|
+
sharedConceptCount: number;
|
|
19
|
+
sharedWordCount: number;
|
|
20
|
+
}
|
|
21
|
+
export default class MeaningMatch {
|
|
22
|
+
static read(text: string | null | undefined): MeaningTerms;
|
|
23
|
+
static rank(data: {
|
|
24
|
+
query: MeaningTerms;
|
|
25
|
+
documents: Array<MeaningTerms>;
|
|
26
|
+
}): Array<MeaningScore>;
|
|
27
|
+
static isMatch(score: MeaningScore): boolean;
|
|
28
|
+
static compare(query: string | null | undefined, document: string | null | undefined): MeaningScore;
|
|
29
|
+
static stem(word: string): string;
|
|
30
|
+
private static clean;
|
|
31
|
+
private static isMeaningfulWord;
|
|
32
|
+
private static undouble;
|
|
33
|
+
private static add;
|
|
34
|
+
private static vector;
|
|
35
|
+
private static norm;
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const MAX_TEXT_LENGTH: number;
|
|
2
|
+
export declare const MIN_MEANING_SIMILARITY: number;
|
|
3
|
+
export declare const MIN_SHARED_WORDS: number;
|
|
4
|
+
export declare const MAX_SHARED_TERMS: number;
|
|
5
|
+
export interface MeaningConcept {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
}
|
|
10
|
+
export declare const MEANING_CONCEPTS: ReadonlyArray<MeaningConcept>;
|
|
11
|
+
export interface MeaningTerms {
|
|
12
|
+
weights: Map<string, number>;
|
|
13
|
+
labels: Map<string, string>;
|
|
14
|
+
}
|
|
15
|
+
export interface MeaningScore {
|
|
16
|
+
similarity: number;
|
|
17
|
+
sharedTerms: Array<string>;
|
|
18
|
+
sharedConceptCount: number;
|
|
19
|
+
sharedWordCount: number;
|
|
20
|
+
}
|
|
21
|
+
export default class MeaningMatch {
|
|
22
|
+
static read(text: string | null | undefined): MeaningTerms;
|
|
23
|
+
static rank(data: {
|
|
24
|
+
query: MeaningTerms;
|
|
25
|
+
documents: Array<MeaningTerms>;
|
|
26
|
+
}): Array<MeaningScore>;
|
|
27
|
+
static isMatch(score: MeaningScore): boolean;
|
|
28
|
+
static compare(query: string | null | undefined, document: string | null | undefined): MeaningScore;
|
|
29
|
+
static stem(word: string): string;
|
|
30
|
+
private static clean;
|
|
31
|
+
private static isMeaningfulWord;
|
|
32
|
+
private static undouble;
|
|
33
|
+
private static add;
|
|
34
|
+
private static vector;
|
|
35
|
+
private static norm;
|
|
36
|
+
}
|