@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,75 @@
|
|
|
1
|
+
import { PagingLadderStep, PagingMethodColumn } from "./PagingLadder.mjs";
|
|
2
|
+
import PushNotificationLevel from "./PushNotificationLevel.mjs";
|
|
3
|
+
import { JSONArray } from "../JSON.mjs";
|
|
4
|
+
import Permission from "../Permission.mjs";
|
|
5
|
+
import { OnCallPageChannel } from "../OnCallDutyPolicy/OnCallPageChannel.mjs";
|
|
6
|
+
export declare const PAGING_LADDER_APPLY_DEFAULT_ROUTE: string;
|
|
7
|
+
export declare const PAGING_LADDER_ADMIN_PERMISSIONS: ReadonlyArray<Permission>;
|
|
8
|
+
export declare const MAX_PAGING_LADDER_DEFAULT_MEMBERS: number;
|
|
9
|
+
export declare const MAX_PAGING_LADDER_DEFAULT_STEPS: number;
|
|
10
|
+
export declare const PAGING_LADDER_DEFAULT_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
11
|
+
export declare const PHONE_PAGING_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
12
|
+
export interface PagingLadderDefaultStep {
|
|
13
|
+
channel: OnCallPageChannel;
|
|
14
|
+
notifyAfterMinutes: number;
|
|
15
|
+
pushNotificationLevel?: PushNotificationLevel | undefined;
|
|
16
|
+
repeatEveryMinutes?: number | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare const isPagingLadderDefaultChannel: (value: unknown) => value is OnCallPageChannel;
|
|
19
|
+
export declare const toPagingLadderStepOfChannel: (step: PagingLadderDefaultStep) => PagingLadderStep;
|
|
20
|
+
export declare const toPagingLadderDefaultStep: (step: PagingLadderStep) => PagingLadderDefaultStep | null;
|
|
21
|
+
export declare const getPagingLadderDefaultProblem: (value: unknown) => string | null;
|
|
22
|
+
export declare const readPagingLadderDefault: (value: unknown) => Array<PagingLadderDefaultStep>;
|
|
23
|
+
export declare const toPagingLadderDefaultJSON: (steps: ReadonlyArray<PagingLadderDefaultStep>) => JSONArray | null;
|
|
24
|
+
export declare const getPagingLadderDefaultChannels: (steps: ReadonlyArray<PagingLadderDefaultStep>) => Array<OnCallPageChannel>;
|
|
25
|
+
export declare const getPagingLadderDefaultStepsForChannel: (data: {
|
|
26
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
27
|
+
channel: OnCallPageChannel | string;
|
|
28
|
+
}) => Array<PagingLadderDefaultStep>;
|
|
29
|
+
export interface PagingLadderMethodReference {
|
|
30
|
+
methodColumn: PagingMethodColumn;
|
|
31
|
+
methodId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PagingLadderFromDefault {
|
|
34
|
+
steps: Array<PagingLadderStep>;
|
|
35
|
+
appliedSteps: Array<PagingLadderDefaultStep>;
|
|
36
|
+
leftOutChannels: Array<OnCallPageChannel>;
|
|
37
|
+
keptSteps: Array<PagingLadderStep>;
|
|
38
|
+
}
|
|
39
|
+
export declare const getPagingLadderFromDefault: (data: {
|
|
40
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
41
|
+
methods: ReadonlyArray<PagingLadderMethodReference>;
|
|
42
|
+
currentSteps?: ReadonlyArray<PagingLadderStep> | undefined;
|
|
43
|
+
}) => PagingLadderFromDefault;
|
|
44
|
+
export declare const isSamePagingLadder: (first: ReadonlyArray<PagingLadderStep>, second: ReadonlyArray<PagingLadderStep>) => boolean;
|
|
45
|
+
export declare const getPagingLadderDefaultStart: (data: {
|
|
46
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
47
|
+
methods: ReadonlyArray<PagingLadderMethodReference>;
|
|
48
|
+
currentSteps: ReadonlyArray<PagingLadderStep>;
|
|
49
|
+
}) => PagingLadderFromDefault | null;
|
|
50
|
+
export declare const isMissingRequiredPhoneMethod: (data: {
|
|
51
|
+
isRequired: boolean | null | undefined;
|
|
52
|
+
verifiedChannels: ReadonlyArray<OnCallPageChannel | string>;
|
|
53
|
+
}) => boolean;
|
|
54
|
+
export declare enum PagingLadderDefaultOutcome {
|
|
55
|
+
Applied = "Applied",
|
|
56
|
+
Skipped = "Skipped",
|
|
57
|
+
Failed = "Failed"
|
|
58
|
+
}
|
|
59
|
+
export interface PagingLadderDefaultMemberResult {
|
|
60
|
+
userId: string;
|
|
61
|
+
outcome: PagingLadderDefaultOutcome;
|
|
62
|
+
appliedSteps: Array<PagingLadderDefaultStep>;
|
|
63
|
+
leftOutChannels: Array<OnCallPageChannel>;
|
|
64
|
+
keptChannels: Array<OnCallPageChannel>;
|
|
65
|
+
changedRuleCount: number;
|
|
66
|
+
message: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const readPagingLadderDefaultMemberResults: (value: unknown) => Array<PagingLadderDefaultMemberResult>;
|
|
69
|
+
export declare const PAGING_LADDER_DEFAULT_SKIPPED_MESSAGE: string;
|
|
70
|
+
export declare const getChannelsOfPagingLadderSteps: (steps: ReadonlyArray<PagingLadderStep>) => Array<OnCallPageChannel>;
|
|
71
|
+
export declare const describePagingLadderDefaultResult: (data: {
|
|
72
|
+
outcome: PagingLadderDefaultOutcome;
|
|
73
|
+
leftOutChannels: ReadonlyArray<OnCallPageChannel>;
|
|
74
|
+
keptChannels: ReadonlyArray<OnCallPageChannel>;
|
|
75
|
+
}) => string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { PagingLadderStep, PagingMethodColumn } from "./PagingLadder";
|
|
2
|
+
import PushNotificationLevel from "./PushNotificationLevel";
|
|
3
|
+
import { JSONArray } from "../JSON";
|
|
4
|
+
import Permission from "../Permission";
|
|
5
|
+
import { OnCallPageChannel } from "../OnCallDutyPolicy/OnCallPageChannel";
|
|
6
|
+
export declare const PAGING_LADDER_APPLY_DEFAULT_ROUTE: string;
|
|
7
|
+
export declare const PAGING_LADDER_ADMIN_PERMISSIONS: ReadonlyArray<Permission>;
|
|
8
|
+
export declare const MAX_PAGING_LADDER_DEFAULT_MEMBERS: number;
|
|
9
|
+
export declare const MAX_PAGING_LADDER_DEFAULT_STEPS: number;
|
|
10
|
+
export declare const PAGING_LADDER_DEFAULT_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
11
|
+
export declare const PHONE_PAGING_CHANNELS: ReadonlyArray<OnCallPageChannel>;
|
|
12
|
+
export interface PagingLadderDefaultStep {
|
|
13
|
+
channel: OnCallPageChannel;
|
|
14
|
+
notifyAfterMinutes: number;
|
|
15
|
+
pushNotificationLevel?: PushNotificationLevel | undefined;
|
|
16
|
+
repeatEveryMinutes?: number | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare const isPagingLadderDefaultChannel: (value: unknown) => value is OnCallPageChannel;
|
|
19
|
+
export declare const toPagingLadderStepOfChannel: (step: PagingLadderDefaultStep) => PagingLadderStep;
|
|
20
|
+
export declare const toPagingLadderDefaultStep: (step: PagingLadderStep) => PagingLadderDefaultStep | null;
|
|
21
|
+
export declare const getPagingLadderDefaultProblem: (value: unknown) => string | null;
|
|
22
|
+
export declare const readPagingLadderDefault: (value: unknown) => Array<PagingLadderDefaultStep>;
|
|
23
|
+
export declare const toPagingLadderDefaultJSON: (steps: ReadonlyArray<PagingLadderDefaultStep>) => JSONArray | null;
|
|
24
|
+
export declare const getPagingLadderDefaultChannels: (steps: ReadonlyArray<PagingLadderDefaultStep>) => Array<OnCallPageChannel>;
|
|
25
|
+
export declare const getPagingLadderDefaultStepsForChannel: (data: {
|
|
26
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
27
|
+
channel: OnCallPageChannel | string;
|
|
28
|
+
}) => Array<PagingLadderDefaultStep>;
|
|
29
|
+
export interface PagingLadderMethodReference {
|
|
30
|
+
methodColumn: PagingMethodColumn;
|
|
31
|
+
methodId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PagingLadderFromDefault {
|
|
34
|
+
steps: Array<PagingLadderStep>;
|
|
35
|
+
appliedSteps: Array<PagingLadderDefaultStep>;
|
|
36
|
+
leftOutChannels: Array<OnCallPageChannel>;
|
|
37
|
+
keptSteps: Array<PagingLadderStep>;
|
|
38
|
+
}
|
|
39
|
+
export declare const getPagingLadderFromDefault: (data: {
|
|
40
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
41
|
+
methods: ReadonlyArray<PagingLadderMethodReference>;
|
|
42
|
+
currentSteps?: ReadonlyArray<PagingLadderStep> | undefined;
|
|
43
|
+
}) => PagingLadderFromDefault;
|
|
44
|
+
export declare const isSamePagingLadder: (first: ReadonlyArray<PagingLadderStep>, second: ReadonlyArray<PagingLadderStep>) => boolean;
|
|
45
|
+
export declare const getPagingLadderDefaultStart: (data: {
|
|
46
|
+
defaultSteps: ReadonlyArray<PagingLadderDefaultStep>;
|
|
47
|
+
methods: ReadonlyArray<PagingLadderMethodReference>;
|
|
48
|
+
currentSteps: ReadonlyArray<PagingLadderStep>;
|
|
49
|
+
}) => PagingLadderFromDefault | null;
|
|
50
|
+
export declare const isMissingRequiredPhoneMethod: (data: {
|
|
51
|
+
isRequired: boolean | null | undefined;
|
|
52
|
+
verifiedChannels: ReadonlyArray<OnCallPageChannel | string>;
|
|
53
|
+
}) => boolean;
|
|
54
|
+
export declare enum PagingLadderDefaultOutcome {
|
|
55
|
+
Applied = "Applied",
|
|
56
|
+
Skipped = "Skipped",
|
|
57
|
+
Failed = "Failed"
|
|
58
|
+
}
|
|
59
|
+
export interface PagingLadderDefaultMemberResult {
|
|
60
|
+
userId: string;
|
|
61
|
+
outcome: PagingLadderDefaultOutcome;
|
|
62
|
+
appliedSteps: Array<PagingLadderDefaultStep>;
|
|
63
|
+
leftOutChannels: Array<OnCallPageChannel>;
|
|
64
|
+
keptChannels: Array<OnCallPageChannel>;
|
|
65
|
+
changedRuleCount: number;
|
|
66
|
+
message: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const readPagingLadderDefaultMemberResults: (value: unknown) => Array<PagingLadderDefaultMemberResult>;
|
|
69
|
+
export declare const PAGING_LADDER_DEFAULT_SKIPPED_MESSAGE: string;
|
|
70
|
+
export declare const getChannelsOfPagingLadderSteps: (steps: ReadonlyArray<PagingLadderStep>) => Array<OnCallPageChannel>;
|
|
71
|
+
export declare const describePagingLadderDefaultResult: (data: {
|
|
72
|
+
outcome: PagingLadderDefaultOutcome;
|
|
73
|
+
leftOutChannels: ReadonlyArray<OnCallPageChannel>;
|
|
74
|
+
keptChannels: ReadonlyArray<OnCallPageChannel>;
|
|
75
|
+
}) => string;
|
|
@@ -0,0 +1,529 @@
|
|
|
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.describePagingLadderDefaultResult = exports.getChannelsOfPagingLadderSteps = exports.PAGING_LADDER_DEFAULT_SKIPPED_MESSAGE = exports.readPagingLadderDefaultMemberResults = exports.PagingLadderDefaultOutcome = exports.isMissingRequiredPhoneMethod = exports.getPagingLadderDefaultStart = exports.isSamePagingLadder = exports.getPagingLadderFromDefault = exports.getPagingLadderDefaultStepsForChannel = exports.getPagingLadderDefaultChannels = exports.toPagingLadderDefaultJSON = exports.readPagingLadderDefault = exports.getPagingLadderDefaultProblem = exports.toPagingLadderDefaultStep = exports.toPagingLadderStepOfChannel = exports.isPagingLadderDefaultChannel = exports.PHONE_PAGING_CHANNELS = exports.PAGING_LADDER_DEFAULT_CHANNELS = exports.MAX_PAGING_LADDER_DEFAULT_STEPS = exports.MAX_PAGING_LADDER_DEFAULT_MEMBERS = exports.PAGING_LADDER_ADMIN_PERMISSIONS = exports.PAGING_LADDER_APPLY_DEFAULT_ROUTE = void 0;
|
|
7
|
+
const PagingLadder_1 = require("./PagingLadder");
|
|
8
|
+
const PushNotificationLevel_1 = require("./PushNotificationLevel");
|
|
9
|
+
const NotificationRepeat_1 = require("./NotificationRepeat");
|
|
10
|
+
const Permission_1 = __importDefault(require("../Permission"));
|
|
11
|
+
const OnCallPageChannel_1 = require("../OnCallDutyPolicy/OnCallPageChannel");
|
|
12
|
+
/*
|
|
13
|
+
* THE PROJECT'S DEFAULT LADDER (#7449, #7450), AND ITS ASK FOR A PHONE.
|
|
14
|
+
*
|
|
15
|
+
* How to Reach Me (#6820, PagingLadder) is one person's ladder: "push and
|
|
16
|
+
* SMS at once, then a call after 5 minutes", each step one of their own
|
|
17
|
+
* verified methods. A project admin can say the same once for everybody,
|
|
18
|
+
* by channel instead of by method: the project's default ladder
|
|
19
|
+
* (Project.defaultPagingLadder). It is used in two places:
|
|
20
|
+
*
|
|
21
|
+
* - As members verify a way to be reached (UserNotificationRuleService.
|
|
22
|
+
* addDefaultNotificationRulesForVerifiedMethod), and as a new member's
|
|
23
|
+
* email is verified when they join: a method of a channel the default
|
|
24
|
+
* names gets its rules at the default's waits in every card, instead
|
|
25
|
+
* of "at once"; a channel the default leaves out gets no on-call rules
|
|
26
|
+
* (the on-call and off-call shift rules stay, and the project's
|
|
27
|
+
* fallback still reaches somebody who has no rule at all). It never
|
|
28
|
+
* rewrites a rule anybody has: setting a default changes nobody.
|
|
29
|
+
*
|
|
30
|
+
* - From On-Call > Readiness, an admin applies it to members they pick
|
|
31
|
+
* (PagingLadderService.applyDefaultLadder): each member's ladder becomes
|
|
32
|
+
* the default, mapped to the methods they have verified
|
|
33
|
+
* (getPagingLadderFromDefault), saved through applyLadder with its
|
|
34
|
+
* checks, its audit entries and its one email.
|
|
35
|
+
*
|
|
36
|
+
* Custom channels are nobody's own and are never part of a default: one
|
|
37
|
+
* that pages everyone keeps paging everyone.
|
|
38
|
+
*
|
|
39
|
+
* "People on an on-call policy need a phone method" (Project.
|
|
40
|
+
* requirePhoneMethodForOnCall) is the default's companion: nobody is locked
|
|
41
|
+
* out by it. Readiness names, on each responder, whether they have no
|
|
42
|
+
* verified SMS, phone call or WhatsApp method while the project asks for
|
|
43
|
+
* one (isMissingRequiredPhoneMethod), Setup health lists them from that
|
|
44
|
+
* answer, and the setup reminder and How to Reach Me ask them to add one.
|
|
45
|
+
*
|
|
46
|
+
* Pure: no models, no database, no React.
|
|
47
|
+
*/
|
|
48
|
+
// Where the Dashboard applies the default to a member (Server/API/PagingLadderAPI).
|
|
49
|
+
exports.PAGING_LADDER_APPLY_DEFAULT_ROUTE = `${PagingLadder_1.PAGING_LADDER_API_PATH}/apply-default`;
|
|
50
|
+
/*
|
|
51
|
+
* Who, besides the person, may change their rules - and so who may apply the
|
|
52
|
+
* project's default to members: the write list of UserNotificationRule
|
|
53
|
+
* without CurrentUser, which every signed-in caller holds
|
|
54
|
+
* (PagingLadderService pins the two to each other). The Dashboard offers
|
|
55
|
+
* Readiness's Apply Default Ladder to them alone; the server asks again.
|
|
56
|
+
*/
|
|
57
|
+
exports.PAGING_LADDER_ADMIN_PERMISSIONS = [
|
|
58
|
+
Permission_1.default.ProjectOwner,
|
|
59
|
+
Permission_1.default.ProjectAdmin,
|
|
60
|
+
Permission_1.default.EditProjectUserNotificationRule,
|
|
61
|
+
];
|
|
62
|
+
// How many members one request may name.
|
|
63
|
+
exports.MAX_PAGING_LADDER_DEFAULT_MEMBERS = 100;
|
|
64
|
+
// How many steps a default may hold.
|
|
65
|
+
exports.MAX_PAGING_LADDER_DEFAULT_STEPS = 20;
|
|
66
|
+
/*
|
|
67
|
+
* The channels a default may name: every way a person is reached that is
|
|
68
|
+
* their own, gentlest first, as the ladder lists steps that go together.
|
|
69
|
+
*/
|
|
70
|
+
exports.PAGING_LADDER_DEFAULT_CHANNELS = [
|
|
71
|
+
OnCallPageChannel_1.OnCallPageChannel.Push,
|
|
72
|
+
OnCallPageChannel_1.OnCallPageChannel.Email,
|
|
73
|
+
OnCallPageChannel_1.OnCallPageChannel.SMS,
|
|
74
|
+
OnCallPageChannel_1.OnCallPageChannel.Call,
|
|
75
|
+
OnCallPageChannel_1.OnCallPageChannel.WhatsApp,
|
|
76
|
+
OnCallPageChannel_1.OnCallPageChannel.Telegram,
|
|
77
|
+
OnCallPageChannel_1.OnCallPageChannel.Slack,
|
|
78
|
+
OnCallPageChannel_1.OnCallPageChannel.MicrosoftTeams,
|
|
79
|
+
OnCallPageChannel_1.OnCallPageChannel.Mattermost,
|
|
80
|
+
OnCallPageChannel_1.OnCallPageChannel.Webhook,
|
|
81
|
+
];
|
|
82
|
+
/*
|
|
83
|
+
* What "a phone method" is, for the project's ask: a number that is
|
|
84
|
+
* texted, rung or messaged on WhatsApp.
|
|
85
|
+
*/
|
|
86
|
+
exports.PHONE_PAGING_CHANNELS = [
|
|
87
|
+
OnCallPageChannel_1.OnCallPageChannel.SMS,
|
|
88
|
+
OnCallPageChannel_1.OnCallPageChannel.Call,
|
|
89
|
+
OnCallPageChannel_1.OnCallPageChannel.WhatsApp,
|
|
90
|
+
];
|
|
91
|
+
const isPagingLadderDefaultChannel = (value) => {
|
|
92
|
+
return exports.PAGING_LADDER_DEFAULT_CHANNELS.includes(value);
|
|
93
|
+
};
|
|
94
|
+
exports.isPagingLadderDefaultChannel = isPagingLadderDefaultChannel;
|
|
95
|
+
/*
|
|
96
|
+
* A default step as a step of a ladder whose "method" is the channel itself:
|
|
97
|
+
* the editor draws a default with the person's editor, and the default is
|
|
98
|
+
* ordered, tidied and compared with the ladder's own rules.
|
|
99
|
+
*/
|
|
100
|
+
const toPagingLadderStepOfChannel = (step) => {
|
|
101
|
+
const ladderStep = {
|
|
102
|
+
methodColumn: (0, PagingLadder_1.getPagingMethodColumnForChannel)(step.channel),
|
|
103
|
+
methodId: step.channel,
|
|
104
|
+
notifyAfterMinutes: step.notifyAfterMinutes,
|
|
105
|
+
};
|
|
106
|
+
if (step.channel === OnCallPageChannel_1.OnCallPageChannel.Push) {
|
|
107
|
+
ladderStep.pushNotificationLevel = step.pushNotificationLevel;
|
|
108
|
+
ladderStep.repeatEveryMinutes = step.repeatEveryMinutes;
|
|
109
|
+
}
|
|
110
|
+
return ladderStep;
|
|
111
|
+
};
|
|
112
|
+
exports.toPagingLadderStepOfChannel = toPagingLadderStepOfChannel;
|
|
113
|
+
// A ladder step whose method is a channel, back as a default step; null for any other.
|
|
114
|
+
const toPagingLadderDefaultStep = (step) => {
|
|
115
|
+
if (!(0, PagingLadder_1.isPagingMethodColumn)(step.methodColumn)) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const channel = (0, PagingLadder_1.getChannelForPagingMethodColumn)(step.methodColumn);
|
|
119
|
+
if (!(0, exports.isPagingLadderDefaultChannel)(channel)) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
const defaultStep = {
|
|
123
|
+
channel: channel,
|
|
124
|
+
notifyAfterMinutes: step.notifyAfterMinutes,
|
|
125
|
+
};
|
|
126
|
+
if (channel === OnCallPageChannel_1.OnCallPageChannel.Push) {
|
|
127
|
+
defaultStep.pushNotificationLevel = step.pushNotificationLevel;
|
|
128
|
+
defaultStep.repeatEveryMinutes = step.repeatEveryMinutes;
|
|
129
|
+
}
|
|
130
|
+
return defaultStep;
|
|
131
|
+
};
|
|
132
|
+
exports.toPagingLadderDefaultStep = toPagingLadderDefaultStep;
|
|
133
|
+
/*
|
|
134
|
+
* Why a default sent to the server cannot be saved, as a sentence that says
|
|
135
|
+
* what to do; null when it can. Nothing (null, or no steps) is a default
|
|
136
|
+
* turned off, and can always be saved.
|
|
137
|
+
*/
|
|
138
|
+
const getPagingLadderDefaultProblem = (value) => {
|
|
139
|
+
if (value === undefined || value === null) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
if (!Array.isArray(value)) {
|
|
143
|
+
return "The default ladder was not sent in a way OneUptime can read. Reload the page, then save again.";
|
|
144
|
+
}
|
|
145
|
+
if (value.length > exports.MAX_PAGING_LADDER_DEFAULT_STEPS) {
|
|
146
|
+
return `A default ladder has at most ${exports.MAX_PAGING_LADDER_DEFAULT_STEPS} steps. Remove some, then save.`;
|
|
147
|
+
}
|
|
148
|
+
for (const entry of value) {
|
|
149
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
150
|
+
return "Each step of the default ladder needs a way to reach people and a wait. Choose both, then save.";
|
|
151
|
+
}
|
|
152
|
+
const step = entry;
|
|
153
|
+
if (!(0, exports.isPagingLadderDefaultChannel)(step["channel"])) {
|
|
154
|
+
return "A step of the default ladder names a way to reach people that a default cannot use. Choose push, email, SMS, a phone call or another listed way, then save.";
|
|
155
|
+
}
|
|
156
|
+
const wait = step["notifyAfterMinutes"];
|
|
157
|
+
if (typeof wait !== "number" ||
|
|
158
|
+
!Number.isInteger(wait) ||
|
|
159
|
+
wait < 0 ||
|
|
160
|
+
wait > PagingLadder_1.MAX_PAGING_LADDER_WAIT_IN_MINUTES) {
|
|
161
|
+
return "A step's wait must be a whole number of minutes from 0 to 1440 (a day). Choose another wait, then save.";
|
|
162
|
+
}
|
|
163
|
+
const level = step["pushNotificationLevel"];
|
|
164
|
+
if (level !== undefined &&
|
|
165
|
+
level !== null &&
|
|
166
|
+
!PushNotificationLevel_1.PUSH_NOTIFICATION_LEVELS.includes(level)) {
|
|
167
|
+
return "A push step must sound as a Critical alert or a Standard notification. Choose one, then save.";
|
|
168
|
+
}
|
|
169
|
+
const repeat = step["repeatEveryMinutes"];
|
|
170
|
+
if (repeat !== undefined &&
|
|
171
|
+
repeat !== null &&
|
|
172
|
+
repeat !== NotificationRepeat_1.NO_NOTIFICATION_REPEAT &&
|
|
173
|
+
!NotificationRepeat_1.REPEAT_EVERY_MINUTES_OPTIONS.includes(repeat)) {
|
|
174
|
+
return "A push step repeats every 1, 2, 3, 5, 10, 15 or 30 minutes, or not at all. Choose one, then save.";
|
|
175
|
+
}
|
|
176
|
+
if (step["channel"] !== OnCallPageChannel_1.OnCallPageChannel.Push &&
|
|
177
|
+
typeof repeat === "number" &&
|
|
178
|
+
repeat !== NotificationRepeat_1.NO_NOTIFICATION_REPEAT) {
|
|
179
|
+
return "Only a push step can repeat until acknowledged. Turn repeating off for the other steps, then save.";
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return null;
|
|
183
|
+
};
|
|
184
|
+
exports.getPagingLadderDefaultProblem = getPagingLadderDefaultProblem;
|
|
185
|
+
/*
|
|
186
|
+
* A default as it is kept: the steps that can be read, each said once (a
|
|
187
|
+
* channel at one wait), push settings made explicit on a push step and left
|
|
188
|
+
* off the others, in the order they page - by wait, then gentlest first.
|
|
189
|
+
* Anything that cannot be read is no step: a value stored by hand, or by a
|
|
190
|
+
* build that knew a channel this one does not, never pages anybody wrongly.
|
|
191
|
+
* Empty when the project has no default.
|
|
192
|
+
*/
|
|
193
|
+
const readPagingLadderDefault = (value) => {
|
|
194
|
+
if (!Array.isArray(value)) {
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
const steps = [];
|
|
198
|
+
for (const entry of value) {
|
|
199
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
const step = entry;
|
|
203
|
+
const channel = step["channel"];
|
|
204
|
+
const wait = step["notifyAfterMinutes"];
|
|
205
|
+
if (!(0, exports.isPagingLadderDefaultChannel)(channel) ||
|
|
206
|
+
typeof wait !== "number" ||
|
|
207
|
+
!Number.isFinite(wait) ||
|
|
208
|
+
wait < 0 ||
|
|
209
|
+
wait > PagingLadder_1.MAX_PAGING_LADDER_WAIT_IN_MINUTES) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
steps.push((0, exports.toPagingLadderStepOfChannel)({
|
|
213
|
+
channel: channel,
|
|
214
|
+
notifyAfterMinutes: wait,
|
|
215
|
+
pushNotificationLevel: step["pushNotificationLevel"],
|
|
216
|
+
repeatEveryMinutes: step["repeatEveryMinutes"],
|
|
217
|
+
}));
|
|
218
|
+
}
|
|
219
|
+
return (0, PagingLadder_1.normalizePagingLadderSteps)(steps)
|
|
220
|
+
.map(exports.toPagingLadderDefaultStep)
|
|
221
|
+
.filter((step) => {
|
|
222
|
+
return step !== null;
|
|
223
|
+
})
|
|
224
|
+
.slice(0, exports.MAX_PAGING_LADDER_DEFAULT_STEPS);
|
|
225
|
+
};
|
|
226
|
+
exports.readPagingLadderDefault = readPagingLadderDefault;
|
|
227
|
+
/*
|
|
228
|
+
* A default as it is stored on the project: its steps as JSON, or null for
|
|
229
|
+
* none - which turns the default off.
|
|
230
|
+
*/
|
|
231
|
+
const toPagingLadderDefaultJSON = (steps) => {
|
|
232
|
+
const normalized = (0, exports.readPagingLadderDefault)(steps);
|
|
233
|
+
if (normalized.length === 0) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return normalized.map((step) => {
|
|
237
|
+
const json = {
|
|
238
|
+
channel: step.channel,
|
|
239
|
+
notifyAfterMinutes: step.notifyAfterMinutes,
|
|
240
|
+
};
|
|
241
|
+
if (step.channel === OnCallPageChannel_1.OnCallPageChannel.Push) {
|
|
242
|
+
if (step.pushNotificationLevel) {
|
|
243
|
+
json["pushNotificationLevel"] = step.pushNotificationLevel;
|
|
244
|
+
}
|
|
245
|
+
if (step.repeatEveryMinutes !== undefined) {
|
|
246
|
+
json["repeatEveryMinutes"] = step.repeatEveryMinutes;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return json;
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
exports.toPagingLadderDefaultJSON = toPagingLadderDefaultJSON;
|
|
253
|
+
// The default's channels, each once, in the order it names them.
|
|
254
|
+
const getPagingLadderDefaultChannels = (steps) => {
|
|
255
|
+
const channels = [];
|
|
256
|
+
for (const step of steps) {
|
|
257
|
+
if (!channels.includes(step.channel)) {
|
|
258
|
+
channels.push(step.channel);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return channels;
|
|
262
|
+
};
|
|
263
|
+
exports.getPagingLadderDefaultChannels = getPagingLadderDefaultChannels;
|
|
264
|
+
/*
|
|
265
|
+
* The default's steps for one channel - a method of it just verified gets a
|
|
266
|
+
* rule at each one's wait in every card. Empty when the default leaves the
|
|
267
|
+
* channel out (or there is no default: the caller tells the two apart).
|
|
268
|
+
*/
|
|
269
|
+
const getPagingLadderDefaultStepsForChannel = (data) => {
|
|
270
|
+
return (0, exports.readPagingLadderDefault)(data.defaultSteps).filter((step) => {
|
|
271
|
+
return step.channel === data.channel;
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
exports.getPagingLadderDefaultStepsForChannel = getPagingLadderDefaultStepsForChannel;
|
|
275
|
+
/*
|
|
276
|
+
* A MEMBER'S LADDER FROM THE PROJECT'S DEFAULT (#7450).
|
|
277
|
+
*
|
|
278
|
+
* Each default step becomes a step for every method the member has
|
|
279
|
+
* verified of its channel: "SMS at once" is both their numbers at once.
|
|
280
|
+
* A channel they have verified no method of is left out, and named.
|
|
281
|
+
*
|
|
282
|
+
* Their own steps are replaced, but for two kinds:
|
|
283
|
+
*
|
|
284
|
+
* - a custom channel's steps stay, always: a custom channel is nobody's
|
|
285
|
+
* own, and one that pages everyone was put in everybody's rules by the
|
|
286
|
+
* project (AddCustomChannelToEveryonesRules);
|
|
287
|
+
* - while a channel of the default is left out, they keep their own steps
|
|
288
|
+
* of the channels the default does not name. Somebody with no verified
|
|
289
|
+
* phone keeps their email at once in place of the SMS and the call they
|
|
290
|
+
* cannot have yet: applying the default never leaves them reachable by
|
|
291
|
+
* less than before.
|
|
292
|
+
*
|
|
293
|
+
* A member who has verified none of the default's channels gets nothing:
|
|
294
|
+
* their rules stay as they are, and they are named.
|
|
295
|
+
*/
|
|
296
|
+
const getPagingLadderFromDefault = (data) => {
|
|
297
|
+
const defaultSteps = (0, exports.readPagingLadderDefault)(data.defaultSteps);
|
|
298
|
+
// The member's methods by channel, each once, in the order given.
|
|
299
|
+
const methodsByChannel = new Map();
|
|
300
|
+
const verifiedKeys = new Set();
|
|
301
|
+
for (const method of data.methods) {
|
|
302
|
+
if (!(0, PagingLadder_1.isPagingMethodColumn)(method.methodColumn) ||
|
|
303
|
+
method.methodColumn === "customNotificationChannelId") {
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
const methodId = (0, PagingLadder_1.readPagingId)(method.methodId);
|
|
307
|
+
const key = (0, PagingLadder_1.getPagingLadderMethodKey)({
|
|
308
|
+
methodColumn: method.methodColumn,
|
|
309
|
+
methodId: methodId,
|
|
310
|
+
});
|
|
311
|
+
if (!methodId || verifiedKeys.has(key)) {
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
verifiedKeys.add(key);
|
|
315
|
+
const channel = (0, PagingLadder_1.getChannelForPagingMethodColumn)(method.methodColumn);
|
|
316
|
+
const list = methodsByChannel.get(channel) || [];
|
|
317
|
+
list.push({ methodColumn: method.methodColumn, methodId: methodId });
|
|
318
|
+
methodsByChannel.set(channel, list);
|
|
319
|
+
}
|
|
320
|
+
const mapped = [];
|
|
321
|
+
const appliedSteps = [];
|
|
322
|
+
const leftOutChannels = [];
|
|
323
|
+
for (const defaultStep of defaultSteps) {
|
|
324
|
+
const methods = methodsByChannel.get(defaultStep.channel) || [];
|
|
325
|
+
if (methods.length === 0) {
|
|
326
|
+
if (!leftOutChannels.includes(defaultStep.channel)) {
|
|
327
|
+
leftOutChannels.push(defaultStep.channel);
|
|
328
|
+
}
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
appliedSteps.push({ ...defaultStep });
|
|
332
|
+
for (const method of methods) {
|
|
333
|
+
const step = {
|
|
334
|
+
methodColumn: method.methodColumn,
|
|
335
|
+
methodId: method.methodId,
|
|
336
|
+
notifyAfterMinutes: defaultStep.notifyAfterMinutes,
|
|
337
|
+
};
|
|
338
|
+
if (method.methodColumn === "userPushId") {
|
|
339
|
+
step.pushNotificationLevel = defaultStep.pushNotificationLevel;
|
|
340
|
+
step.repeatEveryMinutes = defaultStep.repeatEveryMinutes;
|
|
341
|
+
}
|
|
342
|
+
mapped.push(step);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (appliedSteps.length === 0) {
|
|
346
|
+
return {
|
|
347
|
+
steps: [],
|
|
348
|
+
appliedSteps: [],
|
|
349
|
+
leftOutChannels: leftOutChannels,
|
|
350
|
+
keptSteps: [],
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
const defaultChannels = (0, exports.getPagingLadderDefaultChannels)(defaultSteps);
|
|
354
|
+
const keptSteps = (0, PagingLadder_1.normalizePagingLadderSteps)((data.currentSteps || []).filter((step) => {
|
|
355
|
+
if (step.methodColumn === "customNotificationChannelId") {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
if (leftOutChannels.length === 0) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
return (!defaultChannels.includes((0, PagingLadder_1.getChannelForPagingMethodColumn)(step.methodColumn)) && verifiedKeys.has((0, PagingLadder_1.getPagingLadderMethodKey)(step)));
|
|
362
|
+
}));
|
|
363
|
+
return {
|
|
364
|
+
steps: (0, PagingLadder_1.normalizePagingLadderSteps)([...mapped, ...keptSteps]),
|
|
365
|
+
appliedSteps: appliedSteps,
|
|
366
|
+
leftOutChannels: leftOutChannels,
|
|
367
|
+
keptSteps: keptSteps,
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
exports.getPagingLadderFromDefault = getPagingLadderFromDefault;
|
|
371
|
+
// Whether two ladders page the same way: the same steps, push settings included.
|
|
372
|
+
const isSamePagingLadder = (first, second) => {
|
|
373
|
+
const signature = (steps) => {
|
|
374
|
+
return (0, PagingLadder_1.normalizePagingLadderSteps)(steps)
|
|
375
|
+
.map(PagingLadder_1.getPagingLadderStepKey)
|
|
376
|
+
.join(",");
|
|
377
|
+
};
|
|
378
|
+
return signature(first) === signature(second);
|
|
379
|
+
};
|
|
380
|
+
exports.isSamePagingLadder = isSamePagingLadder;
|
|
381
|
+
/*
|
|
382
|
+
* START FROM THE PROJECT'S DEFAULT, ON HOW TO REACH ME (#9445).
|
|
383
|
+
*
|
|
384
|
+
* Somebody who joined before the project had a default ladder, or who has
|
|
385
|
+
* changed theirs since, can put the default into their own ladder without
|
|
386
|
+
* asking an admin: their steps are filled with it, mapped to their verified
|
|
387
|
+
* methods as Readiness's Apply Default Ladder maps it
|
|
388
|
+
* (getPagingLadderFromDefault: a channel they have not verified is left out
|
|
389
|
+
* and named, and they keep their own steps in its place). Nothing is saved
|
|
390
|
+
* until they press Save Changes: their own change, through the ladder's own
|
|
391
|
+
* save. An admin on a member's page gets the same draft, saved for the
|
|
392
|
+
* member with its audit entries and its one email.
|
|
393
|
+
*
|
|
394
|
+
* Offered only when it would change their steps: the project has a default,
|
|
395
|
+
* they have verified a method of one of its channels, and their ladder is
|
|
396
|
+
* not already what the default gives them. Null when it is not offered.
|
|
397
|
+
*/
|
|
398
|
+
const getPagingLadderDefaultStart = (data) => {
|
|
399
|
+
if ((0, exports.readPagingLadderDefault)(data.defaultSteps).length === 0) {
|
|
400
|
+
return null;
|
|
401
|
+
}
|
|
402
|
+
const fromDefault = (0, exports.getPagingLadderFromDefault)({
|
|
403
|
+
defaultSteps: data.defaultSteps,
|
|
404
|
+
methods: data.methods,
|
|
405
|
+
currentSteps: data.currentSteps,
|
|
406
|
+
});
|
|
407
|
+
if (fromDefault.steps.length === 0 ||
|
|
408
|
+
(0, exports.isSamePagingLadder)(fromDefault.steps, data.currentSteps)) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
return fromDefault;
|
|
412
|
+
};
|
|
413
|
+
exports.getPagingLadderDefaultStart = getPagingLadderDefaultStart;
|
|
414
|
+
/*
|
|
415
|
+
* Whether somebody is missing the phone method their project asks people on
|
|
416
|
+
* call to have: the ask is on, and none of their verified methods is a
|
|
417
|
+
* number texted, rung or messaged on WhatsApp. Readiness answers it once per
|
|
418
|
+
* responder; Setup health, the setup reminder and the Readiness page read
|
|
419
|
+
* that answer.
|
|
420
|
+
*/
|
|
421
|
+
const isMissingRequiredPhoneMethod = (data) => {
|
|
422
|
+
if (data.isRequired !== true) {
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
return !data.verifiedChannels.some((channel) => {
|
|
426
|
+
return exports.PHONE_PAGING_CHANNELS.includes(channel);
|
|
427
|
+
});
|
|
428
|
+
};
|
|
429
|
+
exports.isMissingRequiredPhoneMethod = isMissingRequiredPhoneMethod;
|
|
430
|
+
// What applying the default did for one member.
|
|
431
|
+
var PagingLadderDefaultOutcome;
|
|
432
|
+
(function (PagingLadderDefaultOutcome) {
|
|
433
|
+
// Their ladder is now the default, as far as their methods go.
|
|
434
|
+
PagingLadderDefaultOutcome["Applied"] = "Applied";
|
|
435
|
+
// Nothing was changed: they have none of the default's channels verified.
|
|
436
|
+
PagingLadderDefaultOutcome["Skipped"] = "Skipped";
|
|
437
|
+
// Refused or failed: nothing was changed for them.
|
|
438
|
+
PagingLadderDefaultOutcome["Failed"] = "Failed";
|
|
439
|
+
})(PagingLadderDefaultOutcome || (exports.PagingLadderDefaultOutcome = PagingLadderDefaultOutcome = {}));
|
|
440
|
+
/*
|
|
441
|
+
* A request's answer, as the Dashboard reads it: each member's result, with
|
|
442
|
+
* what cannot be read left out - an outcome it does not know is no result.
|
|
443
|
+
*/
|
|
444
|
+
const readPagingLadderDefaultMemberResults = (value) => {
|
|
445
|
+
const results = value && typeof value === "object"
|
|
446
|
+
? value["results"]
|
|
447
|
+
: undefined;
|
|
448
|
+
if (!Array.isArray(results)) {
|
|
449
|
+
return [];
|
|
450
|
+
}
|
|
451
|
+
const channelsOf = (list) => {
|
|
452
|
+
return Array.isArray(list)
|
|
453
|
+
? list.filter((channel) => {
|
|
454
|
+
return Object.values(OnCallPageChannel_1.OnCallPageChannel).includes(channel);
|
|
455
|
+
})
|
|
456
|
+
: [];
|
|
457
|
+
};
|
|
458
|
+
const read = [];
|
|
459
|
+
for (const entry of results) {
|
|
460
|
+
if (!entry || typeof entry !== "object") {
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
const result = entry;
|
|
464
|
+
const outcome = result["outcome"];
|
|
465
|
+
if (!Object.values(PagingLadderDefaultOutcome).includes(outcome)) {
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
read.push({
|
|
469
|
+
userId: (0, PagingLadder_1.readPagingId)(result["userId"]),
|
|
470
|
+
outcome: outcome,
|
|
471
|
+
appliedSteps: (0, exports.readPagingLadderDefault)(result["appliedSteps"]),
|
|
472
|
+
leftOutChannels: channelsOf(result["leftOutChannels"]),
|
|
473
|
+
keptChannels: channelsOf(result["keptChannels"]),
|
|
474
|
+
changedRuleCount: Number(result["changedRuleCount"]) || 0,
|
|
475
|
+
message: typeof result["message"] === "string"
|
|
476
|
+
? result["message"]
|
|
477
|
+
: "",
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
return read;
|
|
481
|
+
};
|
|
482
|
+
exports.readPagingLadderDefaultMemberResults = readPagingLadderDefaultMemberResults;
|
|
483
|
+
exports.PAGING_LADDER_DEFAULT_SKIPPED_MESSAGE = "Skipped: they have verified none of the ways the default ladder uses, so their own rules stay as they are.";
|
|
484
|
+
// The channels of steps, each once, in the order given.
|
|
485
|
+
const getChannelsOfPagingLadderSteps = (steps) => {
|
|
486
|
+
const channels = [];
|
|
487
|
+
for (const step of steps) {
|
|
488
|
+
if (!(0, PagingLadder_1.isPagingMethodColumn)(step.methodColumn)) {
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
const channel = (0, PagingLadder_1.getChannelForPagingMethodColumn)(step.methodColumn);
|
|
492
|
+
if (!channels.includes(channel)) {
|
|
493
|
+
channels.push(channel);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return channels;
|
|
497
|
+
};
|
|
498
|
+
exports.getChannelsOfPagingLadderSteps = getChannelsOfPagingLadderSteps;
|
|
499
|
+
/*
|
|
500
|
+
* What happened to one member, in English for the API's `message`: the
|
|
501
|
+
* Dashboard says it in the reader's words from the codes beside it.
|
|
502
|
+
*/
|
|
503
|
+
const describePagingLadderDefaultResult = (data) => {
|
|
504
|
+
if (data.outcome === PagingLadderDefaultOutcome.Skipped) {
|
|
505
|
+
return exports.PAGING_LADDER_DEFAULT_SKIPPED_MESSAGE;
|
|
506
|
+
}
|
|
507
|
+
const sentences = [
|
|
508
|
+
"Applied the default ladder to their rules for every severity.",
|
|
509
|
+
];
|
|
510
|
+
if (data.leftOutChannels.length > 0) {
|
|
511
|
+
sentences.push(`Left out ${describeChannels(data.leftOutChannels)}: they have not verified ${data.leftOutChannels.length === 1 ? "it" : "them"} yet.`);
|
|
512
|
+
}
|
|
513
|
+
const keptOwn = data.keptChannels.filter((channel) => {
|
|
514
|
+
return channel !== OnCallPageChannel_1.OnCallPageChannel.CustomChannel;
|
|
515
|
+
});
|
|
516
|
+
if (keptOwn.length > 0) {
|
|
517
|
+
sentences.push(`Kept their own ${describeChannels(keptOwn)} steps meanwhile.`);
|
|
518
|
+
}
|
|
519
|
+
return sentences.join(" ");
|
|
520
|
+
};
|
|
521
|
+
exports.describePagingLadderDefaultResult = describePagingLadderDefaultResult;
|
|
522
|
+
// Channels in an English sentence: "SMS and phone call".
|
|
523
|
+
function describeChannels(channels) {
|
|
524
|
+
const names = channels.map(OnCallPageChannel_1.getOnCallPageChannelName);
|
|
525
|
+
if (names.length <= 1) {
|
|
526
|
+
return names.join("");
|
|
527
|
+
}
|
|
528
|
+
return `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
|
|
529
|
+
}
|