@oneuptime/common 16.0.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/AnalyticsModels/RumProductAnalyticsEvent.js +15 -6
- package/Models/AnalyticsModels/RumProductAnalyticsSession.js +27 -10
- package/Models/AnalyticsModels/RumProductAnalyticsUser.js +16 -4
- package/Models/AnalyticsModels/RumSession.js +12 -0
- package/Models/DatabaseModels/AlertSeverity.js +12 -3
- package/Models/DatabaseModels/DataAsset.d.mts +1 -0
- package/Models/DatabaseModels/DataAsset.d.ts +1 -0
- package/Models/DatabaseModels/DataAsset.js +23 -0
- package/Models/DatabaseModels/DataBiConnection.d.mts +2 -1
- package/Models/DatabaseModels/DataBiConnection.d.ts +2 -1
- package/Models/DatabaseModels/DataBiConnection.js +15 -0
- package/Models/DatabaseModels/DataCheck.d.mts +3 -0
- package/Models/DatabaseModels/DataCheck.d.ts +3 -0
- package/Models/DatabaseModels/DataCheck.js +49 -0
- package/Models/DatabaseModels/DataDashboard.d.mts +1 -0
- package/Models/DatabaseModels/DataDashboard.d.ts +1 -0
- package/Models/DatabaseModels/DataDashboard.js +15 -0
- package/Models/DatabaseModels/DataPipeline.d.mts +1 -0
- package/Models/DatabaseModels/DataPipeline.d.ts +1 -0
- package/Models/DatabaseModels/DataPipeline.js +25 -0
- package/Models/DatabaseModels/DataPipelineOwnerTeam.d.mts +19 -0
- package/Models/DatabaseModels/DataPipelineOwnerTeam.d.ts +19 -0
- package/Models/DatabaseModels/DataPipelineOwnerTeam.js +477 -0
- package/Models/DatabaseModels/DataPipelineOwnerTeam.mjs +2 -0
- package/Models/DatabaseModels/DataPipelineOwnerUser.d.mts +18 -0
- package/Models/DatabaseModels/DataPipelineOwnerUser.d.ts +18 -0
- package/Models/DatabaseModels/DataPipelineOwnerUser.js +476 -0
- package/Models/DatabaseModels/DataPipelineOwnerUser.mjs +2 -0
- package/Models/DatabaseModels/DataStore.d.mts +1 -0
- package/Models/DatabaseModels/DataStore.d.ts +1 -0
- package/Models/DatabaseModels/DataStore.js +23 -0
- package/Models/DatabaseModels/DataStoreFinding.d.mts +2 -0
- package/Models/DatabaseModels/DataStoreFinding.d.ts +2 -0
- package/Models/DatabaseModels/DataStoreFinding.js +21 -0
- package/Models/DatabaseModels/EmailLog.d.mts +1 -0
- package/Models/DatabaseModels/EmailLog.d.ts +1 -0
- package/Models/DatabaseModels/EmailLog.js +35 -0
- package/Models/DatabaseModels/GlobalConfig.d.mts +5 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +5 -0
- package/Models/DatabaseModels/GlobalConfig.js +128 -0
- package/Models/DatabaseModels/GlobalOidc.d.mts +1 -0
- package/Models/DatabaseModels/GlobalOidc.d.ts +1 -0
- package/Models/DatabaseModels/GlobalOidc.js +29 -0
- package/Models/DatabaseModels/IncidentSeverity.js +12 -3
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/Monitor.js +18 -0
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +49 -0
- package/Models/DatabaseModels/NetworkDeviceAutoImportRule.js +2 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.mts +6 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.d.ts +6 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +156 -1
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +1 -1
- package/Models/DatabaseModels/Probe.d.mts +4 -0
- package/Models/DatabaseModels/Probe.d.ts +4 -0
- package/Models/DatabaseModels/Probe.js +100 -0
- package/Models/DatabaseModels/ProductFeedback.d.mts +2 -1
- package/Models/DatabaseModels/ProductFeedback.d.ts +2 -1
- package/Models/DatabaseModels/ProductFeedback.js +34 -2
- package/Models/DatabaseModels/Project.d.mts +4 -1
- package/Models/DatabaseModels/Project.d.ts +4 -1
- package/Models/DatabaseModels/Project.js +147 -7
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +8 -2
- package/Models/DatabaseModels/ProjectOidc.d.mts +1 -0
- package/Models/DatabaseModels/ProjectOidc.d.ts +1 -0
- package/Models/DatabaseModels/ProjectOidc.js +46 -0
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +12 -3
- package/Models/DatabaseModels/RumApplication.d.mts +1 -0
- package/Models/DatabaseModels/RumApplication.d.ts +1 -0
- package/Models/DatabaseModels/RumApplication.js +58 -0
- package/Models/DatabaseModels/RumSessionErasureRequest.d.mts +1 -0
- package/Models/DatabaseModels/RumSessionErasureRequest.d.ts +1 -0
- package/Models/DatabaseModels/RumSessionErasureRequest.js +40 -0
- package/Models/DatabaseModels/SecurityCaseTask.d.mts +1 -0
- package/Models/DatabaseModels/SecurityCaseTask.d.ts +1 -0
- package/Models/DatabaseModels/SecurityCaseTask.js +27 -0
- package/Models/DatabaseModels/ServerEmailLog.d.mts +12 -0
- package/Models/DatabaseModels/ServerEmailLog.d.ts +12 -0
- package/Models/DatabaseModels/ServerEmailLog.js +206 -0
- package/Models/DatabaseModels/ServerEmailLog.mjs +2 -0
- package/Models/DatabaseModels/StatusPageGroup.js +1 -1
- package/Models/DatabaseModels/StatusPageResource.js +1 -1
- package/Models/DatabaseModels/TelemetryException.js +15 -2
- package/Models/DatabaseModels/TelemetryIngestionKey.js +10 -0
- package/Models/DatabaseModels/User.d.mts +3 -0
- package/Models/DatabaseModels/User.d.ts +3 -0
- package/Models/DatabaseModels/User.js +66 -0
- package/Models/DatabaseModels/UserSession.d.mts +1 -0
- package/Models/DatabaseModels/UserSession.d.ts +1 -0
- package/Models/DatabaseModels/UserSession.js +32 -0
- package/Models/DatabaseModels/WorkspaceLiveMessage.js +21 -15
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +17 -9
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +8 -2
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Server/Services/DatabaseService.d.mts +6 -0
- package/Server/Services/DatabaseService.d.ts +6 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.mts +1 -0
- package/Server/Utils/Workspace/WorkspaceBase.d.ts +1 -0
- package/Types/AI/AIActionWords.js +1 -0
- package/Types/AI/AIChatPageContext.d.mts +1 -0
- package/Types/AI/AIChatPageContext.d.ts +1 -0
- package/Types/AI/AIChatPageContext.js +6 -0
- package/Types/AI/AIRunProducts.d.mts +14 -0
- package/Types/AI/AIRunProducts.d.ts +14 -0
- package/Types/AI/AIRunProducts.js +40 -0
- package/Types/AI/AIRunProducts.mjs +2 -0
- package/Types/AI/AskAiRatings.d.mts +31 -0
- package/Types/AI/AskAiRatings.d.ts +31 -0
- package/Types/AI/AskAiRatings.js +173 -0
- package/Types/AI/AskAiRatings.mjs +13 -0
- package/Types/Accounts/SignUpInvitation.d.mts +12 -0
- package/Types/Accounts/SignUpInvitation.d.ts +12 -0
- package/Types/Accounts/SignUpInvitation.js +84 -0
- package/Types/Accounts/SignUpInvitation.mjs +5 -0
- package/Types/Analytics/ActivationMilestone.d.mts +2 -1
- package/Types/Analytics/ActivationMilestone.d.ts +2 -1
- package/Types/Analytics/ActivationMilestone.js +11 -0
- package/Types/Analytics/ProductEvent.d.mts +11 -0
- package/Types/Analytics/ProductEvent.d.ts +11 -0
- package/Types/Analytics/ProductEvent.js +166 -13
- package/Types/Analytics/ProductEvent.mjs +3 -0
- package/Types/Backup/BackupScriptRun.d.mts +17 -0
- package/Types/Backup/BackupScriptRun.d.ts +17 -0
- package/Types/Backup/BackupScriptRun.js +96 -0
- package/Types/Backup/BackupScriptRun.mjs +6 -0
- package/Types/BaseDatabase/DatabaseCommonInteractionProps.d.mts +2 -0
- package/Types/BaseDatabase/DatabaseCommonInteractionProps.d.ts +2 -0
- package/Types/BaseDatabase/ReadAudience.d.mts +9 -0
- package/Types/BaseDatabase/ReadAudience.d.ts +9 -0
- package/Types/BaseDatabase/ReadAudience.js +2 -0
- package/Types/BaseDatabase/ReadAudience.mjs +1 -0
- package/Types/Cloud/CloudKeyMetricGroup.d.mts +17 -0
- package/Types/Cloud/CloudKeyMetricGroup.d.ts +17 -0
- package/Types/Cloud/CloudKeyMetricGroup.js +84 -0
- package/Types/Cloud/CloudKeyMetricGroup.mjs +5 -0
- package/Types/Cloud/CloudKeyMetrics.d.mts +28 -1
- package/Types/Cloud/CloudKeyMetrics.d.ts +28 -1
- package/Types/Cloud/CloudKeyMetrics.js +1209 -206
- package/Types/Cloud/CloudKeyMetrics.mjs +6 -0
- package/Types/Cloud/CloudResourceCatalog.js +43 -12
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.mts +1 -0
- package/Types/CloudConnection/CloudConnectionSetupCommands.d.ts +1 -0
- package/Types/CloudConnection/CloudConnectionSetupCommands.js +49 -6
- package/Types/CloudConnection/CloudConnectionSetupCommands.mjs +1 -0
- package/Types/CloudConnection/CloudStreamTemplate.js +6 -2
- package/Types/CreateFormAddress.d.mts +3 -0
- package/Types/CreateFormAddress.d.ts +3 -0
- package/Types/CreateFormAddress.js +17 -0
- package/Types/CreateFormAddress.mjs +4 -0
- package/Types/DataObservability/DataAssetFreshness.d.mts +5 -0
- package/Types/DataObservability/DataAssetFreshness.d.ts +5 -0
- package/Types/DataObservability/DataAssetFreshness.js +28 -5
- package/Types/DataObservability/DataAssetFreshness.mjs +1 -0
- package/Types/DataObservability/DataBiLineage.d.mts +69 -0
- package/Types/DataObservability/DataBiLineage.d.ts +69 -0
- package/Types/DataObservability/DataBiLineage.js +198 -0
- package/Types/DataObservability/DataBiLineage.mjs +13 -0
- package/Types/DataObservability/DataLineageColumnTrail.d.mts +2 -1
- package/Types/DataObservability/DataLineageColumnTrail.d.ts +2 -1
- package/Types/DataObservability/DataLineageColumnTrail.js +41 -3
- package/Types/DataObservability/DataLineageColumnTrail.mjs +1 -0
- package/Types/DataObservability/DataLineageMap.d.mts +67 -1
- package/Types/DataObservability/DataLineageMap.d.ts +67 -1
- package/Types/DataObservability/DataLineageMap.js +335 -3
- package/Types/DataObservability/DataLineageMap.mjs +14 -0
- package/Types/DataObservability/DataObservabilityApiTypes.d.mts +42 -2
- package/Types/DataObservability/DataObservabilityApiTypes.d.ts +42 -2
- package/Types/DataObservability/DataObservabilityApiTypes.js +21 -1
- package/Types/DataObservability/DataObservabilityApiTypes.mjs +4 -0
- package/Types/DataObservability/DataObservabilityAttention.d.mts +5 -0
- package/Types/DataObservability/DataObservabilityAttention.d.ts +5 -0
- package/Types/DataObservability/DataObservabilityAttention.js +48 -1
- package/Types/DataObservability/DataObservabilityAttention.mjs +5 -0
- package/Types/DataObservability/DataPipelineSchedule.d.mts +4 -0
- package/Types/DataObservability/DataPipelineSchedule.d.ts +4 -0
- package/Types/DataObservability/DataPipelineSchedule.js +26 -6
- package/Types/DataObservability/DataPipelineSchedule.mjs +1 -0
- package/Types/DataObservability/DataTableLineage.d.mts +6 -0
- package/Types/DataObservability/DataTableLineage.d.ts +6 -0
- package/Types/DataSecurity/DataSecurityApiTypes.d.mts +24 -0
- package/Types/DataSecurity/DataSecurityApiTypes.d.ts +24 -0
- package/Types/DataSecurity/DataSecurityApiTypes.js +21 -1
- package/Types/DataSecurity/DataSecurityApiTypes.mjs +2 -0
- package/Types/DataSecurity/FindingSampleRecord.d.mts +16 -0
- package/Types/DataSecurity/FindingSampleRecord.d.ts +16 -0
- package/Types/DataSecurity/FindingSampleRecord.js +112 -0
- package/Types/DataSecurity/FindingSampleRecord.mjs +6 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +6 -0
- package/Types/Database/MoveInList.d.mts +41 -0
- package/Types/Database/MoveInList.d.ts +41 -0
- package/Types/Database/MoveInList.js +177 -0
- package/Types/Database/MoveInList.mjs +4 -0
- package/Types/Email/ServerEmailLog.d.mts +41 -0
- package/Types/Email/ServerEmailLog.d.ts +41 -0
- package/Types/Email/ServerEmailLog.js +136 -0
- package/Types/Email/ServerEmailLog.mjs +11 -0
- package/Types/Exception/ProductSwitchedOffException.d.mts +12 -0
- package/Types/Exception/ProductSwitchedOffException.d.ts +12 -0
- package/Types/Exception/ProductSwitchedOffException.js +38 -0
- package/Types/Exception/ProductSwitchedOffException.mjs +2 -0
- package/Types/Exception/UnexplainedError.d.mts +7 -0
- package/Types/Exception/UnexplainedError.d.ts +7 -0
- package/Types/Exception/UnexplainedError.js +36 -1
- package/Types/Exception/UnexplainedError.mjs +2 -0
- package/Types/InstallationHealth/InstallationHealth.d.mts +39 -0
- package/Types/InstallationHealth/InstallationHealth.d.ts +39 -0
- package/Types/InstallationHealth/InstallationHealth.js +163 -0
- package/Types/Kubernetes/KubernetesHealth.d.mts +16 -0
- package/Types/Kubernetes/KubernetesHealth.d.ts +16 -0
- package/Types/Kubernetes/KubernetesHealth.js +128 -6
- package/Types/Kubernetes/KubernetesHealth.mjs +2 -0
- package/Types/Monitor/CloudAppAlertTemplates.d.mts +3 -13
- package/Types/Monitor/CloudAppAlertTemplates.d.ts +3 -13
- package/Types/Monitor/CloudAppAlertTemplates.js +13 -199
- package/Types/Monitor/CriteriaFilter.d.mts +2 -1
- package/Types/Monitor/CriteriaFilter.d.ts +2 -1
- package/Types/Monitor/CriteriaFilter.js +9 -1
- package/Types/Monitor/CriteriaFilterTerms.js +1 -0
- package/Types/Monitor/MessageQueueAlertTemplates.d.mts +6 -0
- package/Types/Monitor/MessageQueueAlertTemplates.d.ts +6 -0
- package/Types/Monitor/MessageQueueAlertTemplates.js +32 -0
- package/Types/Monitor/MessageQueueAlertTemplates.mjs +2 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.mts +2 -0
- package/Types/Monitor/MonitorCriteriaInstance.d.ts +2 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +52 -0
- package/Types/Monitor/MonitorMetricType.d.mts +2 -1
- package/Types/Monitor/MonitorMetricType.d.ts +2 -1
- package/Types/Monitor/MonitorMetricType.js +1 -0
- package/Types/Monitor/MonitorStepLimit.d.mts +8 -0
- package/Types/Monitor/MonitorStepLimit.d.ts +8 -0
- package/Types/Monitor/MonitorStepLimit.js +62 -0
- package/Types/Monitor/MonitorStepLimit.mjs +3 -0
- package/Types/Monitor/MonitorSteps.js +5 -0
- package/Types/Monitor/MonitorType.js +2 -1
- package/Types/Monitor/ProbeStatusMonitor/ProbeStatusMonitorResponse.d.mts +5 -0
- package/Types/Monitor/ProbeStatusMonitor/ProbeStatusMonitorResponse.d.ts +5 -0
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.d.mts +1 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.d.ts +1 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationCatalog.js +111 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.mts +7 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.d.ts +7 -1
- package/Types/Monitor/Recommendation/MonitorRecommendationTypes.js +15 -0
- package/Types/Monitor/RequestHealthAlertTemplates.d.mts +66 -0
- package/Types/Monitor/RequestHealthAlertTemplates.d.ts +66 -0
- package/Types/Monitor/RequestHealthAlertTemplates.js +227 -0
- package/Types/Monitor/RequestHealthAlertTemplates.mjs +4 -0
- package/Types/Monitor/ServerlessAlertTemplates.d.mts +23 -0
- package/Types/Monitor/ServerlessAlertTemplates.d.ts +23 -0
- package/Types/Monitor/ServerlessAlertTemplates.js +111 -0
- package/Types/Monitor/ServerlessAlertTemplates.mjs +7 -0
- package/Types/Monitor/ServiceAlertTemplates.d.mts +3 -0
- package/Types/Monitor/ServiceAlertTemplates.d.ts +3 -0
- package/Types/Monitor/ServiceAlertTemplates.js +61 -0
- package/Types/Monitor/ServiceAlertTemplates.mjs +2 -0
- package/Types/Monitor/TelemetryRulePreview.js +18 -6
- package/Types/Monitor/WhoIsTold.d.mts +71 -0
- package/Types/Monitor/WhoIsTold.d.ts +71 -0
- package/Types/Monitor/WhoIsTold.js +348 -121
- package/Types/Monitor/WhoIsTold.mjs +7 -0
- package/Types/NetworkAutomation/RuleRunResult.js +9 -5
- package/Types/NetworkDevice/DiscoveredDevice.d.mts +40 -0
- package/Types/NetworkDevice/DiscoveredDevice.d.ts +40 -0
- package/Types/NetworkDevice/DiscoveredDevice.js +205 -1
- package/Types/NetworkDevice/DiscoveredDevice.mjs +9 -0
- package/Types/NetworkDevice/DiscoveryImport.js +8 -3
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.mts +26 -3
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.d.ts +26 -3
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.js +75 -3
- package/Types/NetworkDevice/NetworkDeviceDiscoveredDetails.mjs +2 -0
- package/Types/Notification/WhoWasTold.d.mts +190 -0
- package/Types/Notification/WhoWasTold.d.ts +190 -0
- package/Types/Notification/WhoWasTold.js +662 -0
- package/Types/Notification/WhoWasTold.mjs +16 -0
- package/Types/NotificationRule/PagingLadderDefault.d.mts +75 -0
- package/Types/NotificationRule/PagingLadderDefault.d.ts +75 -0
- package/Types/NotificationRule/PagingLadderDefault.js +529 -0
- package/Types/NotificationRule/PagingLadderDefault.mjs +24 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.mts +7 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.d.ts +7 -0
- package/Types/OnCallDutyPolicy/EveryNewEventRules.js +53 -2
- package/Types/OnCallDutyPolicy/EveryNewEventRules.mjs +3 -0
- package/Types/OnCallDutyPolicy/NotificationSetupToFinish.d.mts +6 -0
- package/Types/OnCallDutyPolicy/NotificationSetupToFinish.d.ts +6 -0
- package/Types/OnCallDutyPolicy/NotificationSetupToFinish.js +27 -0
- package/Types/OnCallDutyPolicy/NotificationSetupToFinish.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallFireDrill.d.mts +83 -0
- package/Types/OnCallDutyPolicy/OnCallFireDrill.d.ts +83 -0
- package/Types/OnCallDutyPolicy/OnCallFireDrill.js +105 -0
- package/Types/OnCallDutyPolicy/OnCallFireDrill.mjs +9 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.js +12 -4
- package/Types/OnCallDutyPolicy/OnCallRunLevel.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallRunLevel.js +69 -8
- package/Types/OnCallDutyPolicy/OnCallRunLevel.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +20 -7
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +2 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +2 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +2 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +14 -1
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +2 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +63 -1
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +4 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +21 -1
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +21 -1
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +46 -2
- package/Types/Permission.d.mts +8 -0
- package/Types/Permission.d.ts +8 -0
- package/Types/Permission.js +84 -0
- package/Types/Probe/ProbeBehind.d.mts +48 -0
- package/Types/Probe/ProbeBehind.d.ts +48 -0
- package/Types/Probe/ProbeBehind.js +196 -0
- package/Types/Probe/ProbeBehind.mjs +6 -0
- package/Types/Product/ProductRecordTables.d.mts +8 -0
- package/Types/Product/ProductRecordTables.d.ts +8 -0
- package/Types/Product/ProductRecordTables.js +847 -0
- package/Types/Product/ProductRecordTables.mjs +5 -0
- package/Types/Product/ProductUsage.d.mts +2 -0
- package/Types/Product/ProductUsage.d.ts +2 -0
- package/Types/Product/ProductUsage.js +41 -6
- package/Types/Product/ProductUsage.mjs +2 -0
- package/Types/Product/ServerProductOffReason.d.mts +4 -0
- package/Types/Product/ServerProductOffReason.d.ts +4 -0
- package/Types/Product/ServerProductOffReason.js +19 -0
- package/Types/Product/ServerProductOffReason.mjs +2 -0
- package/Types/Product/ServerProducts.d.mts +2 -4
- package/Types/Product/ServerProducts.d.ts +2 -4
- package/Types/Product/ServerProducts.js +19 -17
- package/Types/ProductFeedback/ProductFeedback.d.mts +45 -1
- package/Types/ProductFeedback/ProductFeedback.d.ts +45 -1
- package/Types/ProductFeedback/ProductFeedback.js +185 -5
- package/Types/ProductFeedback/ProductFeedback.mjs +11 -0
- package/Types/PushNotification/PushNotificationCategory.d.mts +1 -0
- package/Types/PushNotification/PushNotificationCategory.d.ts +1 -0
- package/Types/PushNotification/PushNotificationCategory.js +17 -6
- package/Types/PushNotification/PushNotificationCategory.mjs +1 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.d.mts +18 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.d.ts +18 -0
- package/Types/Rules/RuleCriteriaFieldRegistry.js +34 -1
- package/Types/Rules/RuleCriteriaFieldRegistry.mjs +4 -0
- package/Types/Rum/ProductAnalytics.d.mts +9 -0
- package/Types/Rum/ProductAnalytics.d.ts +9 -0
- package/Types/Rum/ProductAnalytics.js +56 -8
- package/Types/Rum/ProductAnalytics.mjs +6 -0
- package/Types/Rum/ProductAnalyticsEvents.js +2 -1
- package/Types/Rum/SessionReplay.d.mts +3 -0
- package/Types/Rum/SessionReplay.d.ts +3 -0
- package/Types/Rum/SessionReplay.js +35 -1
- package/Types/Rum/SessionReplay.mjs +2 -0
- package/Types/Runbook/RunbookTriggerType.d.mts +1 -0
- package/Types/Runbook/RunbookTriggerType.d.ts +1 -0
- package/Types/Runbook/RunbookTriggerType.js +19 -1
- package/Types/Runbook/RunbookTriggerType.mjs +1 -0
- package/Types/SSO/IdentityProviderSignOut.d.mts +24 -0
- package/Types/SSO/IdentityProviderSignOut.d.ts +24 -0
- package/Types/SSO/IdentityProviderSignOut.js +124 -0
- package/Types/SSO/IdentityProviderSignOut.mjs +10 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.mts +4 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.d.ts +4 -0
- package/Types/SecurityCase/SecurityCaseEventEvidence.js +12 -0
- package/Types/SecurityCase/SecurityCaseMatches.d.mts +78 -0
- package/Types/SecurityCase/SecurityCaseMatches.d.ts +78 -0
- package/Types/SecurityCase/SecurityCaseMatches.js +252 -0
- package/Types/SecurityCase/SecurityCaseMatches.mjs +17 -0
- package/Types/ServerSending/ProjectCanSend.d.mts +10 -0
- package/Types/ServerSending/ProjectCanSend.d.ts +10 -0
- package/Types/ServerSending/ProjectCanSend.js +49 -0
- package/Types/ServerSending/ProjectCanSend.mjs +4 -0
- package/Types/ServerSending/ServerAlerts.d.mts +78 -0
- package/Types/ServerSending/ServerAlerts.d.ts +78 -0
- package/Types/ServerSending/ServerAlerts.js +393 -0
- package/Types/ServerSending/ServerAlerts.mjs +8 -0
- package/Types/ServerSending/ServerSendingStatus.d.mts +6 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +6 -0
- package/Types/ServerSending/ServerSendingStatus.js +23 -0
- package/Types/ServerSending/ServerSetUpProblem.d.mts +46 -0
- package/Types/ServerSending/ServerSetUpProblem.d.ts +46 -0
- package/Types/ServerSending/ServerSetUpProblem.js +164 -0
- package/Types/ServerSending/ServerSetUpProblem.mjs +6 -0
- package/Types/ServerSetup/ServerSetupChecklist.d.mts +35 -1
- package/Types/ServerSetup/ServerSetupChecklist.d.ts +35 -1
- package/Types/ServerSetup/ServerSetupChecklist.js +270 -33
- package/Types/ServerSetup/ServerSetupChecklist.mjs +5 -0
- package/Types/ServerSetup/ServerTestSend.d.mts +11 -0
- package/Types/ServerSetup/ServerTestSend.d.ts +11 -0
- package/Types/ServerSetup/ServerTestSend.js +60 -3
- package/Types/ServerSetup/ServerTestSend.mjs +2 -0
- package/Types/ServiceLevelObjective/SloStatus.d.mts +3 -0
- package/Types/ServiceLevelObjective/SloStatus.d.ts +3 -0
- package/Types/ServiceLevelObjective/SloStatus.js +38 -0
- package/Types/ServiceLevelObjective/SloStatus.mjs +2 -0
- package/Types/ServiceLevelObjective/SloStatusChange.d.mts +10 -0
- package/Types/ServiceLevelObjective/SloStatusChange.d.ts +10 -0
- package/Types/ServiceLevelObjective/SloStatusChange.js +71 -0
- package/Types/ServiceLevelObjective/SloStatusChange.mjs +5 -0
- package/Types/SetupHealth/SetupHealth.d.mts +31 -3
- package/Types/SetupHealth/SetupHealth.d.ts +31 -3
- package/Types/SetupHealth/SetupHealth.js +333 -4
- package/Types/SetupHealth/SetupHealth.mjs +5 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +8 -5
- package/Types/StatusPage/StatusPagePublicName.d.mts +6 -0
- package/Types/StatusPage/StatusPagePublicName.d.ts +6 -0
- package/Types/StatusPage/StatusPagePublicName.js +32 -0
- package/Types/StatusPage/StatusPagePublicName.mjs +3 -0
- package/Types/Team/InvitationEmailsNotSent.d.mts +28 -0
- package/Types/Team/InvitationEmailsNotSent.d.ts +28 -0
- package/Types/Team/InvitationEmailsNotSent.js +261 -0
- package/Types/Team/InvitationEmailsNotSent.mjs +13 -0
- package/Types/Team/ProjectMemberSearch.d.mts +15 -0
- package/Types/Team/ProjectMemberSearch.d.ts +15 -0
- package/Types/Team/ProjectMemberSearch.js +180 -0
- package/Types/Team/ProjectMemberSearch.mjs +10 -0
- package/Types/Team/ProjectRemovalReach.d.mts +15 -0
- package/Types/Team/ProjectRemovalReach.d.ts +15 -0
- package/Types/Team/ProjectRemovalReach.js +154 -0
- package/Types/Team/ProjectRemovalReach.mjs +8 -0
- package/Types/Team/ResendInvitation.d.mts +27 -0
- package/Types/Team/ResendInvitation.d.ts +27 -0
- package/Types/Team/ResendInvitation.js +123 -0
- package/Types/Team/ResendInvitation.mjs +12 -0
- package/Types/UsedBy/UsedBy.d.mts +1 -0
- package/Types/UsedBy/UsedBy.d.ts +1 -0
- package/Types/UsedBy/UsedBy.js +2 -0
- package/Types/UsedBy/UsedByServerProducts.js +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +27 -4
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +27 -4
- package/Types/WelcomeChecklist/WelcomeChecklist.js +166 -42
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +8 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +4 -1
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +4 -1
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +175 -33
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.mjs +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.d.mts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.d.ts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistState.js +30 -1
- package/Types/WelcomeChecklist/WelcomeChecklistState.mjs +1 -0
- package/Types/Workflow/Component.d.mts +0 -1
- package/Types/Workflow/Component.d.ts +0 -1
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +1 -1
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +1 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +23 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +23 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +12 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +12 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +106 -4
- package/Types/Workspace/WorkspaceMessagePayload.d.mts +2 -0
- package/Types/Workspace/WorkspaceMessagePayload.d.ts +2 -0
- package/Types/Workspace/WorkspaceMessagePayload.js +6 -1
- package/Types/Workspace/WorkspaceMessagePayload.mjs +1 -0
- package/UI/Components/Dropdown/Dropdown.d.mts +2 -0
- package/UI/Components/Dropdown/Dropdown.d.ts +2 -0
- package/Utils/Dashboard/Components/DashboardProductAnalyticsFunnelComponent.js +6 -1
- package/Utils/Dashboard/Components/DashboardProductAnalyticsRetentionComponent.js +6 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +4 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +4 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +9 -4
- package/Utils/DataSecurity/CustomDataTypeDetector.js +3 -1
- package/Utils/DataSecurity/DetectorPrefilter.d.mts +9 -0
- package/Utils/DataSecurity/DetectorPrefilter.d.ts +9 -0
- package/Utils/DataSecurity/DetectorPrefilter.js +471 -0
- package/Utils/DataSecurity/DetectorPrefilter.mjs +6 -0
- package/Utils/DataSecurity/FieldClassifier.d.mts +2 -0
- package/Utils/DataSecurity/FieldClassifier.d.ts +2 -0
- package/Utils/DataSecurity/FieldClassifier.js +38 -8
- package/Utils/DataSecurity/OccurrenceExcerpt.d.mts +22 -0
- package/Utils/DataSecurity/OccurrenceExcerpt.d.ts +22 -0
- package/Utils/DataSecurity/OccurrenceExcerpt.js +270 -0
- package/Utils/DataSecurity/OccurrenceExcerpt.mjs +5 -0
- package/Utils/DataSecurity/TextScanner.d.mts +4 -0
- package/Utils/DataSecurity/TextScanner.d.ts +4 -0
- package/Utils/Monitor/DeviceMonitorDuplicates.d.mts +34 -0
- package/Utils/Monitor/DeviceMonitorDuplicates.d.ts +34 -0
- package/Utils/Monitor/DeviceMonitorDuplicates.js +134 -0
- package/Utils/Monitor/DeviceMonitorDuplicates.mjs +7 -0
- package/Utils/Monitor/DeviceMonitorTemplateUtil.d.mts +4 -0
- package/Utils/Monitor/DeviceMonitorTemplateUtil.d.ts +4 -0
- package/Utils/Monitor/DeviceMonitorTemplateUtil.js +33 -6
- package/Utils/Monitor/MonitorMetricType.js +11 -1
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +21 -3
- package/Utils/Monitor/ProbeFailureCauses.js +4 -1
- package/Utils/Monitor/ProbeStatusMonitorUtil.d.mts +5 -1
- package/Utils/Monitor/ProbeStatusMonitorUtil.d.ts +5 -1
- package/Utils/Monitor/ProbeStatusMonitorUtil.js +106 -0
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.mts +3 -0
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.d.ts +3 -0
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.js +33 -4
- package/Utils/NetworkDevice/NetworkDeviceAssetFacts.mjs +1 -0
- package/Utils/NetworkDevice/NetworkDeviceStoredManufacturer.d.mts +33 -0
- package/Utils/NetworkDevice/NetworkDeviceStoredManufacturer.d.ts +33 -0
- package/Utils/NetworkDevice/NetworkDeviceStoredManufacturer.js +105 -0
- package/Utils/NetworkDevice/NetworkDeviceStoredManufacturer.mjs +8 -0
- package/Utils/NetworkDevice/SnmpCredentialUtil.d.mts +5 -0
- package/Utils/NetworkDevice/SnmpCredentialUtil.d.ts +5 -0
- package/Utils/NetworkDevice/SnmpCredentialUtil.js +28 -3
- package/Utils/NetworkDevice/SnmpCredentialUtil.mjs +3 -0
- package/Utils/NetworkDiscovery/DiscoveredEndpointDeviceBuilder.d.mts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredEndpointDeviceBuilder.d.ts +1 -0
- package/Utils/NetworkDiscovery/DiscoveredEndpointDeviceBuilder.js +20 -1
- package/Utils/Rules/RuleCriteriaMatcher.d.mts +1 -0
- package/Utils/Rules/RuleCriteriaMatcher.d.ts +1 -0
- package/Utils/Rules/RuleCriteriaMatcher.js +6 -0
- package/Utils/Rules/RuleCriteriaOwnerMatch.d.mts +10 -0
- package/Utils/Rules/RuleCriteriaOwnerMatch.d.ts +10 -0
- package/Utils/Rules/RuleCriteriaOwnerMatch.js +83 -0
- package/Utils/Rules/RuleCriteriaOwnerMatch.mjs +4 -0
- package/Utils/SecurityCase/SecurityCaseMatchRules.d.mts +27 -0
- package/Utils/SecurityCase/SecurityCaseMatchRules.d.ts +27 -0
- package/Utils/SecurityCase/SecurityCaseMatchRules.js +377 -0
- package/Utils/SecurityCase/SecurityCaseMatchRules.mjs +9 -0
- package/Utils/Slo/SloBulkRecommendedPolicy.d.mts +35 -0
- package/Utils/Slo/SloBulkRecommendedPolicy.d.ts +35 -0
- package/Utils/Slo/SloBulkRecommendedPolicy.js +168 -0
- package/Utils/Slo/SloBulkRecommendedPolicy.mjs +6 -0
- package/Utils/Slo/SloBurnRateRuleState.js +3 -6
- package/Utils/Slo/SloErrorBudgetPolicy.d.mts +17 -0
- package/Utils/Slo/SloErrorBudgetPolicy.d.ts +17 -0
- package/Utils/Slo/SloErrorBudgetPolicy.js +72 -1
- package/Utils/Slo/SloErrorBudgetPolicy.mjs +4 -0
- package/Utils/Slo/SloFeedMarkdown.d.mts +5 -2
- package/Utils/Slo/SloFeedMarkdown.d.ts +5 -2
- package/Utils/Slo/SloFeedMarkdown.js +19 -7
- package/Utils/Slo/SloFeedMarkdown.mjs +1 -0
- package/Utils/Slo/SloHealth.d.mts +5 -0
- package/Utils/Slo/SloHealth.d.ts +5 -0
- package/Utils/Slo/SloHealth.js +27 -0
- package/Utils/Slo/SloListWidgetFormat.js +5 -3
- package/Utils/Slo/SloMetricType.js +6 -5
- package/Utils/Slo/SloMonitorsFirstCheck.d.mts +13 -0
- package/Utils/Slo/SloMonitorsFirstCheck.d.ts +13 -0
- package/Utils/Slo/SloMonitorsFirstCheck.js +78 -0
- package/Utils/Slo/SloMonitorsFirstCheck.mjs +3 -0
- package/Utils/Slo/SloOverviewText.js +7 -0
- package/Utils/Slo/SloStatusColor.d.mts +3 -0
- package/Utils/Slo/SloStatusColor.d.ts +3 -0
- package/Utils/Slo/SloStatusColor.js +3 -0
- package/Utils/Slo/SloStatusPosts.d.mts +18 -0
- package/Utils/Slo/SloStatusPosts.d.ts +18 -0
- package/Utils/Slo/SloStatusPosts.js +95 -0
- package/Utils/Slo/SloStatusPosts.mjs +3 -0
- package/Utils/StatusPage/GridAxisValues.d.mts +2 -0
- package/Utils/StatusPage/GridAxisValues.d.ts +2 -0
- package/Utils/StatusPage/GridAxisValues.js +33 -0
- package/Utils/StatusPage/GridAxisValues.mjs +3 -0
- package/Utils/StatusPage/GroupHierarchyView.d.mts +2 -2
- package/Utils/StatusPage/GroupHierarchyView.d.ts +2 -2
- package/Utils/StatusPage/GroupHierarchyView.js +13 -12
- package/Utils/StatusPage/GroupNestingLayout.d.mts +1 -0
- package/Utils/StatusPage/GroupNestingLayout.d.ts +1 -0
- package/Utils/StatusPage/GroupNestingLayout.js +25 -5
- package/Utils/StatusPage/ResourceExplorer.d.mts +2 -2
- package/Utils/StatusPage/ResourceExplorer.d.ts +2 -2
- package/Utils/StatusPage/ResourceExplorer.js +15 -21
- package/Utils/StatusPage/StatusColorsOnDark.d.mts +5 -3
- package/Utils/StatusPage/StatusColorsOnDark.d.ts +5 -3
- package/Utils/StatusPage/StatusColorsOnDark.js +18 -6
- package/Utils/StatusPage/StatusColorsOnDark.mjs +1 -0
- package/Utils/Telemetry/MobileAppFaults.d.mts +8 -0
- package/Utils/Telemetry/MobileAppFaults.d.ts +8 -0
- package/Utils/Telemetry/MobileAppFaults.js +69 -0
- package/Utils/Telemetry/MobileAppFaults.mjs +6 -0
- package/Utils/Workspace/WorkspaceRefusal.d.mts +108 -0
- package/Utils/Workspace/WorkspaceRefusal.d.ts +108 -0
- package/Utils/Workspace/WorkspaceRefusal.js +769 -0
- package/Utils/Workspace/WorkspaceRefusal.mjs +50 -0
- package/package.json +4 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.EXCERPT_CONTEXT_AFTER = exports.EXCERPT_CONTEXT_BEFORE = void 0;
|
|
37
|
+
exports.toReadableText = toReadableText;
|
|
38
|
+
exports.buildOccurrenceExcerpt = buildOccurrenceExcerpt;
|
|
39
|
+
const DataSecurityApiTypes_1 = require("../../Types/DataSecurity/DataSecurityApiTypes");
|
|
40
|
+
const Index_1 = __importStar(require("./Detectors/Index"));
|
|
41
|
+
const FieldNameHints_1 = require("./FieldNameHints");
|
|
42
|
+
const Masking_1 = require("./Masking");
|
|
43
|
+
const TextScanner_1 = require("./TextScanner");
|
|
44
|
+
/*
|
|
45
|
+
* A RECORD'S VALUE, AROUND THE DATA A FINDING IS ABOUT, MASKED.
|
|
46
|
+
*
|
|
47
|
+
* "Show maybe actual log lines where things are found and highlight
|
|
48
|
+
* sections" (issue #9549). The value a telemetry record holds at a
|
|
49
|
+
* finding's location - a log line, an exception's message, an attribute, a
|
|
50
|
+
* prompt - cut to the part around the finding's data, so a person sees
|
|
51
|
+
* what the line was doing with it: "Ping to 34.***.***.*** took 120 ms".
|
|
52
|
+
*
|
|
53
|
+
* - The finding's own data is found with its own detectors, as the scan
|
|
54
|
+
* found it (the project's hints, turned-off types and allowed values),
|
|
55
|
+
* and marked. A value found by its shape or its field's name alone - a
|
|
56
|
+
* cvv field's "123", a first name - is the whole value, masked.
|
|
57
|
+
* - Every other sensitive value any detector finds in it is masked too, so
|
|
58
|
+
* the excerpt never shows a raw value of any type, whatever the project
|
|
59
|
+
* turned off.
|
|
60
|
+
* - Masking is a finding's samples' (Masking.ts). The text in between is
|
|
61
|
+
* the record's own, shown only to someone who may read that telemetry,
|
|
62
|
+
* with control characters (a terminal's colour codes) taken out.
|
|
63
|
+
* - The cut never falls inside a sensitive value: a value the edge would
|
|
64
|
+
* cut is taken whole, so half of one is never shown unmasked.
|
|
65
|
+
*/
|
|
66
|
+
// How much of the value before the finding's data, and after it, is kept.
|
|
67
|
+
exports.EXCERPT_CONTEXT_BEFORE = 80;
|
|
68
|
+
exports.EXCERPT_CONTEXT_AFTER = 160;
|
|
69
|
+
// How far an edge may move to fall between words instead of inside one.
|
|
70
|
+
const WORD_EDGE_REACH = 16;
|
|
71
|
+
function isWhitespace(code) {
|
|
72
|
+
return code === 0x20 || code === 0x09 || code === 0x0a || code === 0x0d;
|
|
73
|
+
}
|
|
74
|
+
function isLowSurrogate(code) {
|
|
75
|
+
return code >= 0xdc00 && code <= 0xdfff;
|
|
76
|
+
}
|
|
77
|
+
// An edge moved back or on to the nearest space within reach, if there is one.
|
|
78
|
+
function toWordEdge(value, edge, direction, limit) {
|
|
79
|
+
for (let step = 0; step <= WORD_EDGE_REACH; step++) {
|
|
80
|
+
const position = edge + step * direction;
|
|
81
|
+
if (direction === 1 ? position >= limit : position <= limit) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
if (isWhitespace(value.charCodeAt(direction === 1 ? position - 1 : position))) {
|
|
85
|
+
return position;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return edge;
|
|
89
|
+
}
|
|
90
|
+
/*
|
|
91
|
+
* The record's own text between sensitive values, as a page can draw it:
|
|
92
|
+
* one kind of line break, no control characters, no terminal escapes.
|
|
93
|
+
*/
|
|
94
|
+
function toReadableText(text) {
|
|
95
|
+
let readable = "";
|
|
96
|
+
let index = 0;
|
|
97
|
+
while (index < text.length) {
|
|
98
|
+
const code = text.charCodeAt(index);
|
|
99
|
+
// A terminal's escape: ESC [ ... a letter.
|
|
100
|
+
if (code === 0x1b) {
|
|
101
|
+
let end = index + 1;
|
|
102
|
+
if (text[end] === "[") {
|
|
103
|
+
end++;
|
|
104
|
+
while (end < text.length && end - index < 32) {
|
|
105
|
+
const inner = text.charCodeAt(end);
|
|
106
|
+
end++;
|
|
107
|
+
if ((inner >= 0x40 && inner <= 0x7e) || inner < 0x20) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
index = end;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (code === 0x0d) {
|
|
116
|
+
readable += "\n";
|
|
117
|
+
index += text[index + 1] === "\n" ? 2 : 1;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if ((code < 0x20 && code !== 0x0a && code !== 0x09) || code === 0x7f) {
|
|
121
|
+
index++;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
readable += text[index];
|
|
125
|
+
index++;
|
|
126
|
+
}
|
|
127
|
+
return readable;
|
|
128
|
+
}
|
|
129
|
+
function withoutOverlaps(kept, candidates) {
|
|
130
|
+
return candidates.filter((candidate) => {
|
|
131
|
+
return !kept.some((match) => {
|
|
132
|
+
return candidate.start < match.end && match.start < candidate.end;
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/*
|
|
137
|
+
* The excerpt of `value`, the value a record holds at `location`, around
|
|
138
|
+
* the first place it holds `dataTypeId`.
|
|
139
|
+
*/
|
|
140
|
+
function buildOccurrenceExcerpt(data) {
|
|
141
|
+
const value = data.value;
|
|
142
|
+
const options = data.options || {};
|
|
143
|
+
const customDetectors = options.customDetectors || [];
|
|
144
|
+
const hinted = (0, FieldNameHints_1.getHintedDataTypeIds)(data.location, options.extraHints);
|
|
145
|
+
const builtIn = (0, Index_1.getBuiltInDetectorsOf)(data.dataTypeId);
|
|
146
|
+
const ownDetectors = builtIn.length > 0
|
|
147
|
+
? builtIn
|
|
148
|
+
: customDetectors.filter((detector) => {
|
|
149
|
+
return detector.dataTypeId === data.dataTypeId;
|
|
150
|
+
});
|
|
151
|
+
const named = (parts) => {
|
|
152
|
+
const excerpt = {
|
|
153
|
+
parts,
|
|
154
|
+
isCutAtStart: false,
|
|
155
|
+
isCutAtEnd: false,
|
|
156
|
+
};
|
|
157
|
+
if (data.field) {
|
|
158
|
+
excerpt.field = data.field;
|
|
159
|
+
}
|
|
160
|
+
if (data.event) {
|
|
161
|
+
excerpt.event = data.event;
|
|
162
|
+
}
|
|
163
|
+
return excerpt;
|
|
164
|
+
};
|
|
165
|
+
// The finding's own data, found as the scan found it.
|
|
166
|
+
const own = ownDetectors.length > 0
|
|
167
|
+
? (0, TextScanner_1.findSensitiveValues)(value, {
|
|
168
|
+
detectors: ownDetectors,
|
|
169
|
+
hintedDataTypeIds: hinted,
|
|
170
|
+
disabledDataTypeIds: options.disabledDataTypeIds,
|
|
171
|
+
allowedValues: options.allowedValues,
|
|
172
|
+
})
|
|
173
|
+
.filter((match) => {
|
|
174
|
+
return match.dataTypeId === data.dataTypeId && !match.isTestValue;
|
|
175
|
+
})
|
|
176
|
+
.map((match) => {
|
|
177
|
+
return {
|
|
178
|
+
start: match.start,
|
|
179
|
+
end: match.end,
|
|
180
|
+
dataTypeId: match.dataTypeId,
|
|
181
|
+
kind: DataSecurityApiTypes_1.DataSecurityOccurrenceExcerptPartKind.Match,
|
|
182
|
+
};
|
|
183
|
+
})
|
|
184
|
+
: [];
|
|
185
|
+
if (own.length === 0) {
|
|
186
|
+
// Found by its shape or its field's name: the whole value is the data.
|
|
187
|
+
return named([
|
|
188
|
+
{
|
|
189
|
+
kind: DataSecurityApiTypes_1.DataSecurityOccurrenceExcerptPartKind.Match,
|
|
190
|
+
text: (0, Masking_1.maskValue)(data.dataTypeId, value.trim()),
|
|
191
|
+
},
|
|
192
|
+
]);
|
|
193
|
+
}
|
|
194
|
+
// Every other sensitive value, of any type, whatever the project turned off.
|
|
195
|
+
const others = withoutOverlaps(own, (0, TextScanner_1.findSensitiveValues)(value, {
|
|
196
|
+
detectors: customDetectors.length > 0
|
|
197
|
+
? [...Index_1.default, ...customDetectors]
|
|
198
|
+
: Index_1.default,
|
|
199
|
+
hintedDataTypeIds: hinted,
|
|
200
|
+
}).map((match) => {
|
|
201
|
+
return {
|
|
202
|
+
start: match.start,
|
|
203
|
+
end: match.end,
|
|
204
|
+
dataTypeId: match.dataTypeId,
|
|
205
|
+
kind: DataSecurityApiTypes_1.DataSecurityOccurrenceExcerptPartKind.Masked,
|
|
206
|
+
};
|
|
207
|
+
}));
|
|
208
|
+
const matches = [...own, ...others].sort((a, b) => {
|
|
209
|
+
return a.start - b.start;
|
|
210
|
+
});
|
|
211
|
+
const anchor = own[0];
|
|
212
|
+
let start = Math.max(0, anchor.start - exports.EXCERPT_CONTEXT_BEFORE);
|
|
213
|
+
let end = Math.min(value.length, anchor.end + exports.EXCERPT_CONTEXT_AFTER);
|
|
214
|
+
if (start > 0) {
|
|
215
|
+
start = toWordEdge(value, start, 1, anchor.start);
|
|
216
|
+
}
|
|
217
|
+
if (end < value.length) {
|
|
218
|
+
end = toWordEdge(value, end, -1, anchor.end);
|
|
219
|
+
}
|
|
220
|
+
// A sensitive value the edges would cut is taken whole.
|
|
221
|
+
for (const match of matches) {
|
|
222
|
+
if (match.start < start && match.end > start) {
|
|
223
|
+
start = match.start;
|
|
224
|
+
}
|
|
225
|
+
if (match.start < end && match.end > end) {
|
|
226
|
+
end = match.end;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// Never half of a character beyond U+FFFF.
|
|
230
|
+
if (start > 0 && isLowSurrogate(value.charCodeAt(start))) {
|
|
231
|
+
start--;
|
|
232
|
+
}
|
|
233
|
+
if (end < value.length && isLowSurrogate(value.charCodeAt(end))) {
|
|
234
|
+
end++;
|
|
235
|
+
}
|
|
236
|
+
const parts = [];
|
|
237
|
+
let position = start;
|
|
238
|
+
const addText = (text) => {
|
|
239
|
+
const readable = toReadableText(text);
|
|
240
|
+
if (!readable) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const last = parts[parts.length - 1];
|
|
244
|
+
if ((last === null || last === void 0 ? void 0 : last.kind) === DataSecurityApiTypes_1.DataSecurityOccurrenceExcerptPartKind.Text) {
|
|
245
|
+
last.text += readable;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
parts.push({
|
|
249
|
+
kind: DataSecurityApiTypes_1.DataSecurityOccurrenceExcerptPartKind.Text,
|
|
250
|
+
text: readable,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
for (const match of matches) {
|
|
255
|
+
if (match.end <= start || match.start >= end) {
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
addText(value.slice(position, match.start));
|
|
259
|
+
parts.push({
|
|
260
|
+
kind: match.kind,
|
|
261
|
+
text: (0, Masking_1.maskValue)(match.dataTypeId, value.slice(match.start, match.end)),
|
|
262
|
+
});
|
|
263
|
+
position = match.end;
|
|
264
|
+
}
|
|
265
|
+
addText(value.slice(position, end));
|
|
266
|
+
const excerpt = named(parts);
|
|
267
|
+
excerpt.isCutAtStart = start > 0;
|
|
268
|
+
excerpt.isCutAtEnd = end < value.length;
|
|
269
|
+
return excerpt;
|
|
270
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./OccurrenceExcerpt.js";
|
|
2
|
+
export const EXCERPT_CONTEXT_AFTER = commonJsModule.EXCERPT_CONTEXT_AFTER;
|
|
3
|
+
export const EXCERPT_CONTEXT_BEFORE = commonJsModule.EXCERPT_CONTEXT_BEFORE;
|
|
4
|
+
export const buildOccurrenceExcerpt = commonJsModule.buildOccurrenceExcerpt;
|
|
5
|
+
export const toReadableText = commonJsModule.toReadableText;
|
|
@@ -10,6 +10,10 @@ export interface CandidateFinder {
|
|
|
10
10
|
end: number;
|
|
11
11
|
value: string;
|
|
12
12
|
}>;
|
|
13
|
+
patternSource?: {
|
|
14
|
+
source: string;
|
|
15
|
+
flags: string;
|
|
16
|
+
} | undefined;
|
|
13
17
|
}
|
|
14
18
|
export type ScanDetector = DataTypeDetector | (Omit<DataTypeDetector, "pattern"> & CandidateFinder);
|
|
15
19
|
export interface TextScanOptions {
|
|
@@ -10,6 +10,10 @@ export interface CandidateFinder {
|
|
|
10
10
|
end: number;
|
|
11
11
|
value: string;
|
|
12
12
|
}>;
|
|
13
|
+
patternSource?: {
|
|
14
|
+
source: string;
|
|
15
|
+
flags: string;
|
|
16
|
+
} | undefined;
|
|
13
17
|
}
|
|
14
18
|
export type ScanDetector = DataTypeDetector | (Omit<DataTypeDetector, "pattern"> & CandidateFinder);
|
|
15
19
|
export interface TextScanOptions {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Monitor from "../../Models/DatabaseModels/Monitor.mjs";
|
|
2
|
+
import { JSONObject } from "../../Types/JSON.mjs";
|
|
3
|
+
import MonitorSteps from "../../Types/Monitor/MonitorSteps.mjs";
|
|
4
|
+
import MonitorType from "../../Types/Monitor/MonitorType.mjs";
|
|
5
|
+
export interface DeviceMonitorFacts {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
monitorType: string;
|
|
9
|
+
monitorTemplateId?: string | undefined;
|
|
10
|
+
checkKeys: Array<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface DeviceMonitorCandidate {
|
|
13
|
+
monitorType: string;
|
|
14
|
+
monitorTemplateId?: string | undefined;
|
|
15
|
+
checkKeys: Array<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare const NTP_DEFAULT_PORT: number;
|
|
18
|
+
export declare const DEVICE_ADDRESS_CHECK_KEY: string;
|
|
19
|
+
export declare function getDeviceMonitorCheckKeys(data: {
|
|
20
|
+
monitorType: MonitorType | string | null | undefined;
|
|
21
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
22
|
+
}): Array<string>;
|
|
23
|
+
export declare function toDeviceMonitorFacts(monitor: Monitor): DeviceMonitorFacts;
|
|
24
|
+
export declare function toDeviceMonitorCandidate(data: {
|
|
25
|
+
monitorType: MonitorType | string | null | undefined;
|
|
26
|
+
monitorTemplateId: {
|
|
27
|
+
toString(): string;
|
|
28
|
+
} | string | null | undefined;
|
|
29
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
30
|
+
}): DeviceMonitorCandidate;
|
|
31
|
+
export declare function findDuplicateDeviceMonitor(data: {
|
|
32
|
+
candidate: DeviceMonitorCandidate;
|
|
33
|
+
monitors: ReadonlyArray<DeviceMonitorFacts>;
|
|
34
|
+
}): DeviceMonitorFacts | null;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Monitor from "../../Models/DatabaseModels/Monitor";
|
|
2
|
+
import { JSONObject } from "../../Types/JSON";
|
|
3
|
+
import MonitorSteps from "../../Types/Monitor/MonitorSteps";
|
|
4
|
+
import MonitorType from "../../Types/Monitor/MonitorType";
|
|
5
|
+
export interface DeviceMonitorFacts {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
monitorType: string;
|
|
9
|
+
monitorTemplateId?: string | undefined;
|
|
10
|
+
checkKeys: Array<string>;
|
|
11
|
+
}
|
|
12
|
+
export interface DeviceMonitorCandidate {
|
|
13
|
+
monitorType: string;
|
|
14
|
+
monitorTemplateId?: string | undefined;
|
|
15
|
+
checkKeys: Array<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare const NTP_DEFAULT_PORT: number;
|
|
18
|
+
export declare const DEVICE_ADDRESS_CHECK_KEY: string;
|
|
19
|
+
export declare function getDeviceMonitorCheckKeys(data: {
|
|
20
|
+
monitorType: MonitorType | string | null | undefined;
|
|
21
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
22
|
+
}): Array<string>;
|
|
23
|
+
export declare function toDeviceMonitorFacts(monitor: Monitor): DeviceMonitorFacts;
|
|
24
|
+
export declare function toDeviceMonitorCandidate(data: {
|
|
25
|
+
monitorType: MonitorType | string | null | undefined;
|
|
26
|
+
monitorTemplateId: {
|
|
27
|
+
toString(): string;
|
|
28
|
+
} | string | null | undefined;
|
|
29
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
30
|
+
}): DeviceMonitorCandidate;
|
|
31
|
+
export declare function findDuplicateDeviceMonitor(data: {
|
|
32
|
+
candidate: DeviceMonitorCandidate;
|
|
33
|
+
monitors: ReadonlyArray<DeviceMonitorFacts>;
|
|
34
|
+
}): DeviceMonitorFacts | null;
|
|
@@ -0,0 +1,134 @@
|
|
|
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.DEVICE_ADDRESS_CHECK_KEY = exports.NTP_DEFAULT_PORT = void 0;
|
|
7
|
+
exports.getDeviceMonitorCheckKeys = getDeviceMonitorCheckKeys;
|
|
8
|
+
exports.toDeviceMonitorFacts = toDeviceMonitorFacts;
|
|
9
|
+
exports.toDeviceMonitorCandidate = toDeviceMonitorCandidate;
|
|
10
|
+
exports.findDuplicateDeviceMonitor = findDuplicateDeviceMonitor;
|
|
11
|
+
const MonitorSteps_1 = __importDefault(require("../../Types/Monitor/MonitorSteps"));
|
|
12
|
+
const MonitorType_1 = __importDefault(require("../../Types/Monitor/MonitorType"));
|
|
13
|
+
const DeviceMonitorTemplateUtil_1 = require("./DeviceMonitorTemplateUtil");
|
|
14
|
+
// The port an NTP step asks on when it names none.
|
|
15
|
+
exports.NTP_DEFAULT_PORT = 123;
|
|
16
|
+
/*
|
|
17
|
+
* The one thing a Ping or IP monitor of a device checks: the device itself.
|
|
18
|
+
* Its address is the device's, so two of them check the same thing.
|
|
19
|
+
*/
|
|
20
|
+
exports.DEVICE_ADDRESS_CHECK_KEY = "address";
|
|
21
|
+
function readSteps(monitorSteps) {
|
|
22
|
+
var _a;
|
|
23
|
+
if (!monitorSteps) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const steps = monitorSteps instanceof MonitorSteps_1.default
|
|
28
|
+
? monitorSteps
|
|
29
|
+
: MonitorSteps_1.default.fromJSON(monitorSteps);
|
|
30
|
+
return ((_a = steps.data) === null || _a === void 0 ? void 0 : _a.monitorStepsInstanceArray) || [];
|
|
31
|
+
}
|
|
32
|
+
catch (_b) {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function readStepPort(step) {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
const port = Number((_c = (_b = (_a = step.data) === null || _a === void 0 ? void 0 : _a.monitorDestinationPort) === null || _b === void 0 ? void 0 : _b.toNumber) === null || _c === void 0 ? void 0 : _c.call(_b));
|
|
39
|
+
return Number.isInteger(port) && port > 0 ? port : null;
|
|
40
|
+
}
|
|
41
|
+
/*
|
|
42
|
+
* What a monitor of this kind, with these steps, checks on a device, as keys
|
|
43
|
+
* two monitors share when they check the same thing:
|
|
44
|
+
*
|
|
45
|
+
* - Ping, IP: one key. A device has one address, so any two check it.
|
|
46
|
+
* - Port: each port its steps ask on.
|
|
47
|
+
* - NTP: each port its steps ask on, 123 for a step that names none.
|
|
48
|
+
* - Any other kind: none. Only its template decides (findDuplicate...).
|
|
49
|
+
*/
|
|
50
|
+
function getDeviceMonitorCheckKeys(data) {
|
|
51
|
+
var _a;
|
|
52
|
+
const monitorType = String(data.monitorType || "");
|
|
53
|
+
if (monitorType === MonitorType_1.default.Ping || monitorType === MonitorType_1.default.IP) {
|
|
54
|
+
return [exports.DEVICE_ADDRESS_CHECK_KEY];
|
|
55
|
+
}
|
|
56
|
+
if (monitorType !== MonitorType_1.default.Port && monitorType !== MonitorType_1.default.NTP) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
const keys = [];
|
|
60
|
+
for (const step of readSteps(data.monitorSteps)) {
|
|
61
|
+
const port = (_a = readStepPort(step)) !== null && _a !== void 0 ? _a : (monitorType === MonitorType_1.default.NTP ? exports.NTP_DEFAULT_PORT : null);
|
|
62
|
+
if (port !== null && !keys.includes(String(port))) {
|
|
63
|
+
keys.push(String(port));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return keys;
|
|
67
|
+
}
|
|
68
|
+
/*
|
|
69
|
+
* A monitor as the rule reads it. Its template id and type are whatever was
|
|
70
|
+
* selected; a monitor read without its steps has no check keys, so it can
|
|
71
|
+
* still be a duplicate by its template, never by what it checks.
|
|
72
|
+
*/
|
|
73
|
+
function toDeviceMonitorFacts(monitor) {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
return {
|
|
76
|
+
id: ((_a = monitor.id) === null || _a === void 0 ? void 0 : _a.toString()) || ((_b = monitor._id) === null || _b === void 0 ? void 0 : _b.toString()) || "",
|
|
77
|
+
name: monitor.name || "",
|
|
78
|
+
monitorType: String(monitor.monitorType || ""),
|
|
79
|
+
monitorTemplateId: ((_c = monitor.monitorTemplateId) === null || _c === void 0 ? void 0 : _c.toString()) || undefined,
|
|
80
|
+
checkKeys: getDeviceMonitorCheckKeys({
|
|
81
|
+
monitorType: monitor.monitorType,
|
|
82
|
+
monitorSteps: monitor.monitorSteps,
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/*
|
|
87
|
+
* The monitor a template's monitor for this device would make, in the
|
|
88
|
+
* rule's terms: its type and template, and what its steps check.
|
|
89
|
+
*/
|
|
90
|
+
function toDeviceMonitorCandidate(data) {
|
|
91
|
+
return {
|
|
92
|
+
monitorType: String(data.monitorType || ""),
|
|
93
|
+
monitorTemplateId: data.monitorTemplateId
|
|
94
|
+
? data.monitorTemplateId.toString()
|
|
95
|
+
: undefined,
|
|
96
|
+
checkKeys: getDeviceMonitorCheckKeys({
|
|
97
|
+
monitorType: data.monitorType,
|
|
98
|
+
monitorSteps: data.monitorSteps,
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function isSameTemplate(candidate, monitor) {
|
|
103
|
+
return Boolean(candidate.monitorTemplateId &&
|
|
104
|
+
monitor.monitorTemplateId &&
|
|
105
|
+
candidate.monitorTemplateId.toLowerCase() ===
|
|
106
|
+
monitor.monitorTemplateId.toLowerCase());
|
|
107
|
+
}
|
|
108
|
+
function checksTheSameThing(candidate, monitor) {
|
|
109
|
+
if (!(0, DeviceMonitorTemplateUtil_1.isDeviceAddressMonitorType)(candidate.monitorType) ||
|
|
110
|
+
monitor.monitorType !== candidate.monitorType) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
return candidate.checkKeys.some((key) => {
|
|
114
|
+
return monitor.checkKeys.includes(key);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/*
|
|
118
|
+
* The monitor of the device's that the candidate would duplicate, or null
|
|
119
|
+
* when it would duplicate none (see the rules at the top). One made from the
|
|
120
|
+
* same template is preferred to one that only checks the same thing; among
|
|
121
|
+
* equals, the first in the order handed in - the server hands them oldest
|
|
122
|
+
* first.
|
|
123
|
+
*/
|
|
124
|
+
function findDuplicateDeviceMonitor(data) {
|
|
125
|
+
const sameTemplate = data.monitors.find((monitor) => {
|
|
126
|
+
return isSameTemplate(data.candidate, monitor);
|
|
127
|
+
});
|
|
128
|
+
if (sameTemplate) {
|
|
129
|
+
return sameTemplate;
|
|
130
|
+
}
|
|
131
|
+
return (data.monitors.find((monitor) => {
|
|
132
|
+
return checksTheSameThing(data.candidate, monitor);
|
|
133
|
+
}) || null);
|
|
134
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import commonJsModule from "./DeviceMonitorDuplicates.js";
|
|
2
|
+
export const DEVICE_ADDRESS_CHECK_KEY = commonJsModule.DEVICE_ADDRESS_CHECK_KEY;
|
|
3
|
+
export const NTP_DEFAULT_PORT = commonJsModule.NTP_DEFAULT_PORT;
|
|
4
|
+
export const findDuplicateDeviceMonitor = commonJsModule.findDuplicateDeviceMonitor;
|
|
5
|
+
export const getDeviceMonitorCheckKeys = commonJsModule.getDeviceMonitorCheckKeys;
|
|
6
|
+
export const toDeviceMonitorCandidate = commonJsModule.toDeviceMonitorCandidate;
|
|
7
|
+
export const toDeviceMonitorFacts = commonJsModule.toDeviceMonitorFacts;
|
|
@@ -37,6 +37,10 @@ export default class DeviceMonitorTemplateUtil {
|
|
|
37
37
|
networkDeviceId: ObjectID | string;
|
|
38
38
|
}): void;
|
|
39
39
|
static buildMonitor(data: BuildDeviceMonitorData): Monitor;
|
|
40
|
+
static assertAddressTemplateSteps(data: {
|
|
41
|
+
monitorType: MonitorType | string | null | undefined;
|
|
42
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
43
|
+
}): void;
|
|
40
44
|
static readPorts(monitorSteps: MonitorSteps | JSONObject | null | undefined): Array<number>;
|
|
41
45
|
private static readSteps;
|
|
42
46
|
private static readTargetDestination;
|
|
@@ -37,6 +37,10 @@ export default class DeviceMonitorTemplateUtil {
|
|
|
37
37
|
networkDeviceId: ObjectID | string;
|
|
38
38
|
}): void;
|
|
39
39
|
static buildMonitor(data: BuildDeviceMonitorData): Monitor;
|
|
40
|
+
static assertAddressTemplateSteps(data: {
|
|
41
|
+
monitorType: MonitorType | string | null | undefined;
|
|
42
|
+
monitorSteps: MonitorSteps | JSONObject | null | undefined;
|
|
43
|
+
}): void;
|
|
40
44
|
static readPorts(monitorSteps: MonitorSteps | JSONObject | null | undefined): Array<number>;
|
|
41
45
|
private static readSteps;
|
|
42
46
|
private static readTargetDestination;
|
|
@@ -21,7 +21,8 @@ const NetworkDeviceMonitorTemplateUtil_1 = __importDefault(require("./NetworkDev
|
|
|
21
21
|
* A MONITOR FOR ONE NETWORK DEVICE, FROM A TEMPLATE (OneUptime issue #5145).
|
|
22
22
|
*
|
|
23
23
|
* A discovery import gives every device it brings in one monitor from a
|
|
24
|
-
* template the person picks
|
|
24
|
+
* template the person picks, and so does an auto import rule for every host
|
|
25
|
+
* it imports (issue #9510). Two kinds of template can do that, because two
|
|
25
26
|
* kinds of monitor can check a device:
|
|
26
27
|
*
|
|
27
28
|
* - A Network Device template: its monitor reads the device's own polls -
|
|
@@ -35,11 +36,13 @@ const NetworkDeviceMonitorTemplateUtil_1 = __importDefault(require("./NetworkDev
|
|
|
35
36
|
* NTP template asks on, timeouts, retries and every criterion.
|
|
36
37
|
*
|
|
37
38
|
* Until #5145 the import offered Network Device templates only, so a
|
|
38
|
-
* customer's own Ping template never showed
|
|
39
|
-
*
|
|
40
|
-
* or
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* customer's own Ping template never showed, and an auto import rule did
|
|
40
|
+
* the same until #9510. Templates of any other type stay out of both: a
|
|
41
|
+
* Website, API or SSL Certificate template checks a URL, a DNS or Domain
|
|
42
|
+
* template a name, a database template a connection with its own
|
|
43
|
+
* credentials, a telemetry template a query, a Manual or Incoming Request
|
|
44
|
+
* template checks nothing at all - none of them has an address the device's
|
|
45
|
+
* can stand in for.
|
|
43
46
|
*
|
|
44
47
|
* Both kinds of monitor carry the same provenance: the template they were
|
|
45
48
|
* made from and the device they were made for (autoProvisionedNetworkDeviceId).
|
|
@@ -225,6 +228,30 @@ class DeviceMonitorTemplateUtil {
|
|
|
225
228
|
monitor.autoProvisionedNetworkDeviceId = new ObjectID_1.default(device.id.toString());
|
|
226
229
|
return monitor;
|
|
227
230
|
}
|
|
231
|
+
/*
|
|
232
|
+
* What a Ping, IP, Port or NTP template must have before a rule may give
|
|
233
|
+
* devices monitors from it (issue #9510): a step to check each device's
|
|
234
|
+
* address with, and, in a Port template, the port each step asks on - a
|
|
235
|
+
* Port monitor with none checks nothing. Said when the rule is saved,
|
|
236
|
+
* rather than by every monitor the rule then fails to make.
|
|
237
|
+
*/
|
|
238
|
+
static assertAddressTemplateSteps(data) {
|
|
239
|
+
if (!isDeviceAddressMonitorType(data.monitorType)) {
|
|
240
|
+
throw new BadDataException_1.default(exports.DEVICE_MONITOR_TEMPLATE_TYPE_REFUSAL);
|
|
241
|
+
}
|
|
242
|
+
const steps = this.readSteps(data.monitorSteps);
|
|
243
|
+
if (steps.length === 0) {
|
|
244
|
+
throw new BadDataException_1.default("This monitor template has no steps, so a monitor made from it would check nothing. Add a step to the template, then pick it again.");
|
|
245
|
+
}
|
|
246
|
+
if (data.monitorType === MonitorType_1.default.Port &&
|
|
247
|
+
steps.some((step) => {
|
|
248
|
+
var _a, _b, _c;
|
|
249
|
+
const port = Number((_c = (_b = (_a = step.data) === null || _a === void 0 ? void 0 : _a.monitorDestinationPort) === null || _b === void 0 ? void 0 : _b.toNumber) === null || _c === void 0 ? void 0 : _c.call(_b));
|
|
250
|
+
return !Number.isInteger(port) || port <= 0;
|
|
251
|
+
})) {
|
|
252
|
+
throw new BadDataException_1.default("Every step of a Port monitor template must name the port it checks. Add the port to the template, then pick it again.");
|
|
253
|
+
}
|
|
254
|
+
}
|
|
228
255
|
/*
|
|
229
256
|
* The ports a Port or NTP template's steps ask on, in step order and each
|
|
230
257
|
* once: what the import says each device's monitor checks. An NTP step
|
|
@@ -140,6 +140,7 @@ class MonitorMetricTypeUtil {
|
|
|
140
140
|
case MonitorMetricType_1.default.ConnectedProbes:
|
|
141
141
|
return AggregationType_1.default.Min;
|
|
142
142
|
case MonitorMetricType_1.default.DisconnectedProbes:
|
|
143
|
+
case MonitorMetricType_1.default.ProbesBehind:
|
|
143
144
|
return AggregationType_1.default.Max;
|
|
144
145
|
default:
|
|
145
146
|
throw new Error("Invalid MonitorMetricType value");
|
|
@@ -230,6 +231,8 @@ class MonitorMetricTypeUtil {
|
|
|
230
231
|
return MonitorMetricType_1.default.ConnectedProbes;
|
|
231
232
|
case CriteriaFilter_1.CheckOn.DisconnectedProbes:
|
|
232
233
|
return MonitorMetricType_1.default.DisconnectedProbes;
|
|
234
|
+
case CriteriaFilter_1.CheckOn.ProbesBehind:
|
|
235
|
+
return MonitorMetricType_1.default.ProbesBehind;
|
|
233
236
|
default:
|
|
234
237
|
throw new Error("Invalid CheckOn value");
|
|
235
238
|
}
|
|
@@ -336,6 +339,7 @@ class MonitorMetricTypeUtil {
|
|
|
336
339
|
return [
|
|
337
340
|
MonitorMetricType_1.default.ConnectedProbes,
|
|
338
341
|
MonitorMetricType_1.default.DisconnectedProbes,
|
|
342
|
+
MonitorMetricType_1.default.ProbesBehind,
|
|
339
343
|
];
|
|
340
344
|
}
|
|
341
345
|
if (monitorType === MonitorType_1.default.Database) {
|
|
@@ -496,10 +500,11 @@ class MonitorMetricTypeUtil {
|
|
|
496
500
|
return [
|
|
497
501
|
{
|
|
498
502
|
title: "Probes",
|
|
499
|
-
description: "How many of the probes this monitor watches were connected and
|
|
503
|
+
description: "How many of the probes this monitor watches were connected, disconnected and behind, minute by minute.",
|
|
500
504
|
metrics: [
|
|
501
505
|
MonitorMetricType_1.default.ConnectedProbes,
|
|
502
506
|
MonitorMetricType_1.default.DisconnectedProbes,
|
|
507
|
+
MonitorMetricType_1.default.ProbesBehind,
|
|
503
508
|
],
|
|
504
509
|
},
|
|
505
510
|
];
|
|
@@ -635,6 +640,8 @@ class MonitorMetricTypeUtil {
|
|
|
635
640
|
return (0, Translator_1.translationKey)("Connected Probes");
|
|
636
641
|
case MonitorMetricType_1.default.DisconnectedProbes:
|
|
637
642
|
return (0, Translator_1.translationKey)("Disconnected Probes");
|
|
643
|
+
case MonitorMetricType_1.default.ProbesBehind:
|
|
644
|
+
return (0, Translator_1.translationKey)("Probes Behind");
|
|
638
645
|
default:
|
|
639
646
|
return "";
|
|
640
647
|
}
|
|
@@ -729,6 +736,7 @@ class MonitorMetricTypeUtil {
|
|
|
729
736
|
return "processes";
|
|
730
737
|
case MonitorMetricType_1.default.ConnectedProbes:
|
|
731
738
|
case MonitorMetricType_1.default.DisconnectedProbes:
|
|
739
|
+
case MonitorMetricType_1.default.ProbesBehind:
|
|
732
740
|
return "probes";
|
|
733
741
|
default:
|
|
734
742
|
return "";
|
|
@@ -846,6 +854,8 @@ class MonitorMetricTypeUtil {
|
|
|
846
854
|
return (0, Translator_1.translationKey)("Probes with a heartbeat in the last three minutes, at each evaluation.");
|
|
847
855
|
case MonitorMetricType_1.default.DisconnectedProbes:
|
|
848
856
|
return (0, Translator_1.translationKey)("Probes with no heartbeat for three minutes, at each evaluation.");
|
|
857
|
+
case MonitorMetricType_1.default.ProbesBehind:
|
|
858
|
+
return (0, Translator_1.translationKey)("Connected probes whose monitors or network devices wait more than a minute past their time, at each evaluation.");
|
|
849
859
|
default:
|
|
850
860
|
return "";
|
|
851
861
|
}
|