@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,41 @@
|
|
|
1
|
+
import { JSONObject } from "../JSON";
|
|
2
|
+
import ObjectID from "../ObjectID";
|
|
3
|
+
export declare const MOVE_IN_LIST_ROUTE: string;
|
|
4
|
+
export declare const getMoveInListRoute: (rowId: string) => string;
|
|
5
|
+
export interface MoveInListRequest {
|
|
6
|
+
placeOfId: ObjectID;
|
|
7
|
+
}
|
|
8
|
+
export interface ListPlace {
|
|
9
|
+
id: string;
|
|
10
|
+
order: number | null | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface MoveInListResult {
|
|
13
|
+
changedRows: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
order: number;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export type MoveInListChanges = {
|
|
19
|
+
kind: "moved";
|
|
20
|
+
changedRows: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
order: number;
|
|
23
|
+
}>;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "rowNotInList";
|
|
26
|
+
} | {
|
|
27
|
+
kind: "placeNotInList";
|
|
28
|
+
};
|
|
29
|
+
export default class MoveInListUtil {
|
|
30
|
+
static compare(a: ListPlace, b: ListPlace): number;
|
|
31
|
+
static sort<TPlace extends ListPlace>(rows: ReadonlyArray<TPlace>): Array<TPlace>;
|
|
32
|
+
static getChanges(data: {
|
|
33
|
+
rows: ReadonlyArray<ListPlace>;
|
|
34
|
+
rowId: string;
|
|
35
|
+
placeOfId: string;
|
|
36
|
+
}): MoveInListChanges;
|
|
37
|
+
static parseRequest(body: unknown): MoveInListRequest;
|
|
38
|
+
static requestToJSON(request: MoveInListRequest): JSONObject;
|
|
39
|
+
static resultToJSON(result: MoveInListResult): JSONObject;
|
|
40
|
+
static resultFromJSON(json: unknown): MoveInListResult;
|
|
41
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
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.getMoveInListRoute = exports.MOVE_IN_LIST_ROUTE = void 0;
|
|
7
|
+
const BadDataException_1 = __importDefault(require("../Exception/BadDataException"));
|
|
8
|
+
const ObjectID_1 = __importDefault(require("../ObjectID"));
|
|
9
|
+
/*
|
|
10
|
+
* MOVING A ROW OF A NUMBERED LIST TO ANOTHER ROW'S PLACE (issue #9573).
|
|
11
|
+
*
|
|
12
|
+
* Five lists are numbered by an `order` column: the escalation rules of an
|
|
13
|
+
* on-call policy, the layers of a schedule, the people of a layer, the
|
|
14
|
+
* groups of a status page and the resources of a status page (or of one of
|
|
15
|
+
* its groups). Lower numbers come first; rows that share a number come in
|
|
16
|
+
* the order of their ids, as the database reads them.
|
|
17
|
+
*
|
|
18
|
+
* Writing a row's `order` - creating it at a number, changing its number -
|
|
19
|
+
* places that row and moves no other (Server/Utils/Database/
|
|
20
|
+
* ContiguousOrder). That is what Terraform, and anything else that numbers a
|
|
21
|
+
* whole list, needs: it writes every row's number on its own, all at once,
|
|
22
|
+
* in no set order, and every row must end at the number written.
|
|
23
|
+
*
|
|
24
|
+
* Moving a row is a request of its own, which the Dashboard sends when
|
|
25
|
+
* someone drags a row, or moves it up or down:
|
|
26
|
+
*
|
|
27
|
+
* POST /<the list's path>/:id/move
|
|
28
|
+
* { "placeOfId": "<the row whose place it takes>" }
|
|
29
|
+
* -> { "changedRows": [{ "_id": "<id>", "order": 2 }, ...] }
|
|
30
|
+
*
|
|
31
|
+
* The row takes the place of the row named, and the rows between them step
|
|
32
|
+
* one place towards where it was - so a row moved up lands just above the
|
|
33
|
+
* row named, and a row moved down just below it. The list is then numbered
|
|
34
|
+
* 1..n in its new order, which in a list numbered 1..n changes only the
|
|
35
|
+
* rows between the two places; a list with gaps or shared numbers (written
|
|
36
|
+
* through the API) comes out tidy. The server does it in one transaction
|
|
37
|
+
* holding the list's rows, so moves at once run one after another and
|
|
38
|
+
* never leave two rows at one number. `changedRows` are the rows given
|
|
39
|
+
* another number, the moved row among them; none when it was there already.
|
|
40
|
+
*
|
|
41
|
+
* Read by the server and the Dashboard, so it imports nothing that needs a
|
|
42
|
+
* server or React.
|
|
43
|
+
*/
|
|
44
|
+
// The route, under the list's own API path, for the row `:id`.
|
|
45
|
+
exports.MOVE_IN_LIST_ROUTE = "/:id/move";
|
|
46
|
+
// The route for one row, as the Dashboard calls it.
|
|
47
|
+
const getMoveInListRoute = (rowId) => {
|
|
48
|
+
return `/${rowId}/move`;
|
|
49
|
+
};
|
|
50
|
+
exports.getMoveInListRoute = getMoveInListRoute;
|
|
51
|
+
const normalizeId = (id) => {
|
|
52
|
+
return id.trim().toLowerCase();
|
|
53
|
+
};
|
|
54
|
+
// A row's number, or null when it holds none: those come after the numbered.
|
|
55
|
+
const toNumber = (order) => {
|
|
56
|
+
const value = typeof order === "number" ? order : Number(order);
|
|
57
|
+
return order === null ||
|
|
58
|
+
order === undefined ||
|
|
59
|
+
order === "" ||
|
|
60
|
+
!Number.isFinite(value)
|
|
61
|
+
? null
|
|
62
|
+
: value;
|
|
63
|
+
};
|
|
64
|
+
class MoveInListUtil {
|
|
65
|
+
/*
|
|
66
|
+
* The order a list is read in: by number, lowest first, rows without one
|
|
67
|
+
* last; rows that share a number by id - as the database reads them
|
|
68
|
+
* (DatabaseService breaks every tie by the primary key), so the server,
|
|
69
|
+
* the Dashboard and the status page put twins the same way round.
|
|
70
|
+
*/
|
|
71
|
+
static compare(a, b) {
|
|
72
|
+
const aOrder = toNumber(a.order);
|
|
73
|
+
const bOrder = toNumber(b.order);
|
|
74
|
+
if (aOrder !== null && bOrder === null) {
|
|
75
|
+
return -1;
|
|
76
|
+
}
|
|
77
|
+
if (aOrder === null && bOrder !== null) {
|
|
78
|
+
return 1;
|
|
79
|
+
}
|
|
80
|
+
if (aOrder !== null && bOrder !== null && aOrder !== bOrder) {
|
|
81
|
+
return aOrder - bOrder;
|
|
82
|
+
}
|
|
83
|
+
const aId = normalizeId(a.id);
|
|
84
|
+
const bId = normalizeId(b.id);
|
|
85
|
+
if (aId < bId) {
|
|
86
|
+
return -1;
|
|
87
|
+
}
|
|
88
|
+
return aId > bId ? 1 : 0;
|
|
89
|
+
}
|
|
90
|
+
// A copy of the rows in the order the list is read in.
|
|
91
|
+
static sort(rows) {
|
|
92
|
+
return [...rows].sort((a, b) => {
|
|
93
|
+
return MoveInListUtil.compare(a, b);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/*
|
|
97
|
+
* The rows a move gives another number: the list in the order it is read
|
|
98
|
+
* in, the moved row taken out and put where the row named stands - just
|
|
99
|
+
* above it when it came from below, just below it when it came from
|
|
100
|
+
* above - and the list numbered 1..n. Only the rows whose number changes
|
|
101
|
+
* are given; a move to the row's own place changes none.
|
|
102
|
+
*/
|
|
103
|
+
static getChanges(data) {
|
|
104
|
+
const list = MoveInListUtil.sort(data.rows);
|
|
105
|
+
const rowId = normalizeId(data.rowId);
|
|
106
|
+
const placeOfId = normalizeId(data.placeOfId);
|
|
107
|
+
const from = list.findIndex((row) => {
|
|
108
|
+
return normalizeId(row.id) === rowId;
|
|
109
|
+
});
|
|
110
|
+
if (from < 0) {
|
|
111
|
+
return { kind: "rowNotInList" };
|
|
112
|
+
}
|
|
113
|
+
const to = list.findIndex((row) => {
|
|
114
|
+
return normalizeId(row.id) === placeOfId;
|
|
115
|
+
});
|
|
116
|
+
if (to < 0) {
|
|
117
|
+
return { kind: "placeNotInList" };
|
|
118
|
+
}
|
|
119
|
+
if (from === to) {
|
|
120
|
+
return { kind: "moved", changedRows: [] };
|
|
121
|
+
}
|
|
122
|
+
const moved = [...list];
|
|
123
|
+
const [row] = moved.splice(from, 1);
|
|
124
|
+
moved.splice(to, 0, row);
|
|
125
|
+
const changedRows = [];
|
|
126
|
+
moved.forEach((place, index) => {
|
|
127
|
+
if (toNumber(place.order) !== index + 1) {
|
|
128
|
+
changedRows.push({ id: place.id, order: index + 1 });
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return { kind: "moved", changedRows: changedRows };
|
|
132
|
+
}
|
|
133
|
+
// A move as the server reads it: the row whose place the moved row takes.
|
|
134
|
+
static parseRequest(body) {
|
|
135
|
+
const record = body && typeof body === "object" && !Array.isArray(body)
|
|
136
|
+
? body
|
|
137
|
+
: null;
|
|
138
|
+
const placeOfId = record === null || record === void 0 ? void 0 : record["placeOfId"];
|
|
139
|
+
if (typeof placeOfId !== "string" ||
|
|
140
|
+
!ObjectID_1.default.isValidUUID(placeOfId.trim())) {
|
|
141
|
+
throw new BadDataException_1.default('Send placeOfId: the ID of the row whose place this row takes, as { "placeOfId": "<id>" }.');
|
|
142
|
+
}
|
|
143
|
+
return { placeOfId: new ObjectID_1.default(placeOfId.trim()) };
|
|
144
|
+
}
|
|
145
|
+
static requestToJSON(request) {
|
|
146
|
+
return { placeOfId: request.placeOfId.toString() };
|
|
147
|
+
}
|
|
148
|
+
static resultToJSON(result) {
|
|
149
|
+
return {
|
|
150
|
+
changedRows: result.changedRows.map((row) => {
|
|
151
|
+
return { _id: row.id, order: row.order };
|
|
152
|
+
}),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static resultFromJSON(json) {
|
|
156
|
+
const record = json && typeof json === "object" && !Array.isArray(json)
|
|
157
|
+
? json
|
|
158
|
+
: null;
|
|
159
|
+
const rows = record === null || record === void 0 ? void 0 : record["changedRows"];
|
|
160
|
+
if (!Array.isArray(rows)) {
|
|
161
|
+
return { changedRows: [] };
|
|
162
|
+
}
|
|
163
|
+
const changedRows = [];
|
|
164
|
+
for (const item of rows) {
|
|
165
|
+
if (!item || typeof item !== "object") {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const id = item["_id"];
|
|
169
|
+
const order = toNumber(item["order"]);
|
|
170
|
+
if (typeof id === "string" && order !== null) {
|
|
171
|
+
changedRows.push({ id: id, order: order });
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return { changedRows: changedRows };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
exports.default = MoveInListUtil;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SERVER_EMAIL_LOG_ROUTE: string;
|
|
2
|
+
export declare const SERVER_EMAIL_LOG_FAILED_ONLY_QUERY: string;
|
|
3
|
+
export declare const SERVER_EMAIL_LOG_SKIP_QUERY: string;
|
|
4
|
+
export declare const SERVER_EMAIL_LOG_PAGE_SIZE: number;
|
|
5
|
+
export declare const MAX_SERVER_EMAIL_LOG_SKIP: number;
|
|
6
|
+
export declare const SERVER_EMAIL_LOG_RETENTION_IN_DAYS: number;
|
|
7
|
+
export declare const CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS: number;
|
|
8
|
+
export declare const getServerEmailLogRetentionInDays: (isBillingEnabled: boolean) => number;
|
|
9
|
+
export declare enum ServerEmailLogStatus {
|
|
10
|
+
Sent = "sent",
|
|
11
|
+
Failed = "failed"
|
|
12
|
+
}
|
|
13
|
+
export interface ServerEmailLogEntry {
|
|
14
|
+
id: string;
|
|
15
|
+
at: string;
|
|
16
|
+
toEmail: string;
|
|
17
|
+
subject: string | null;
|
|
18
|
+
templateName: string | null;
|
|
19
|
+
status: ServerEmailLogStatus;
|
|
20
|
+
statusMessage: string | null;
|
|
21
|
+
projectId: string | null;
|
|
22
|
+
projectName: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ServerEmailLogAnswer {
|
|
25
|
+
entries: Array<ServerEmailLogEntry>;
|
|
26
|
+
hasMore: boolean;
|
|
27
|
+
retentionInDays: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ServerEmailLogQuery {
|
|
30
|
+
failedOnly: boolean;
|
|
31
|
+
skip: number;
|
|
32
|
+
}
|
|
33
|
+
export default class ServerEmailLogUtil {
|
|
34
|
+
static toQueryParams(query: ServerEmailLogQuery): {
|
|
35
|
+
[name: string]: string;
|
|
36
|
+
};
|
|
37
|
+
static readQuery(query: {
|
|
38
|
+
[name: string]: unknown;
|
|
39
|
+
}): ServerEmailLogQuery;
|
|
40
|
+
static parseAnswer(value: unknown): ServerEmailLogAnswer | null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SERVER_EMAIL_LOG_ROUTE: string;
|
|
2
|
+
export declare const SERVER_EMAIL_LOG_FAILED_ONLY_QUERY: string;
|
|
3
|
+
export declare const SERVER_EMAIL_LOG_SKIP_QUERY: string;
|
|
4
|
+
export declare const SERVER_EMAIL_LOG_PAGE_SIZE: number;
|
|
5
|
+
export declare const MAX_SERVER_EMAIL_LOG_SKIP: number;
|
|
6
|
+
export declare const SERVER_EMAIL_LOG_RETENTION_IN_DAYS: number;
|
|
7
|
+
export declare const CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS: number;
|
|
8
|
+
export declare const getServerEmailLogRetentionInDays: (isBillingEnabled: boolean) => number;
|
|
9
|
+
export declare enum ServerEmailLogStatus {
|
|
10
|
+
Sent = "sent",
|
|
11
|
+
Failed = "failed"
|
|
12
|
+
}
|
|
13
|
+
export interface ServerEmailLogEntry {
|
|
14
|
+
id: string;
|
|
15
|
+
at: string;
|
|
16
|
+
toEmail: string;
|
|
17
|
+
subject: string | null;
|
|
18
|
+
templateName: string | null;
|
|
19
|
+
status: ServerEmailLogStatus;
|
|
20
|
+
statusMessage: string | null;
|
|
21
|
+
projectId: string | null;
|
|
22
|
+
projectName: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ServerEmailLogAnswer {
|
|
25
|
+
entries: Array<ServerEmailLogEntry>;
|
|
26
|
+
hasMore: boolean;
|
|
27
|
+
retentionInDays: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ServerEmailLogQuery {
|
|
30
|
+
failedOnly: boolean;
|
|
31
|
+
skip: number;
|
|
32
|
+
}
|
|
33
|
+
export default class ServerEmailLogUtil {
|
|
34
|
+
static toQueryParams(query: ServerEmailLogQuery): {
|
|
35
|
+
[name: string]: string;
|
|
36
|
+
};
|
|
37
|
+
static readQuery(query: {
|
|
38
|
+
[name: string]: unknown;
|
|
39
|
+
}): ServerEmailLogQuery;
|
|
40
|
+
static parseAnswer(value: unknown): ServerEmailLogAnswer | null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServerEmailLogStatus = exports.getServerEmailLogRetentionInDays = exports.CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS = exports.SERVER_EMAIL_LOG_RETENTION_IN_DAYS = exports.MAX_SERVER_EMAIL_LOG_SKIP = exports.SERVER_EMAIL_LOG_PAGE_SIZE = exports.SERVER_EMAIL_LOG_SKIP_QUERY = exports.SERVER_EMAIL_LOG_FAILED_ONLY_QUERY = exports.SERVER_EMAIL_LOG_ROUTE = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* THE SERVER'S EMAIL LOG, AS ITS MASTER ADMINS READ IT (#6878).
|
|
6
|
+
*
|
|
7
|
+
* "Did the password reset go out?" had no answer: an email that belongs to
|
|
8
|
+
* no project - a sign-up's verification, a password reset, a sign-in link,
|
|
9
|
+
* an invitation, an email to the server's admins - left no row anywhere,
|
|
10
|
+
* and the banner only ever said the last thing the mail server answered.
|
|
11
|
+
*
|
|
12
|
+
* So the server keeps a row (Models/DatabaseModels/ServerEmailLog) for
|
|
13
|
+
* every email it sends through its own email settings that belongs to no
|
|
14
|
+
* project, and for every email of a project it failed to send through
|
|
15
|
+
* them. Who it went to, what it was (its subject - with any link taken
|
|
16
|
+
* out - or, for a project's, its template), when, whether it went, and
|
|
17
|
+
* the mail service's answer: never the message, which in a password reset
|
|
18
|
+
* or a verification carries a link that signs its holder in.
|
|
19
|
+
*
|
|
20
|
+
* Settings > Emails in the Admin Dashboard lists them, newest first, all of
|
|
21
|
+
* them or the failed ones only, a page at a time:
|
|
22
|
+
*
|
|
23
|
+
* GET /global-config/email-log?failedOnly=true&skip=25
|
|
24
|
+
* -> { entries, hasMore, retentionInDays }
|
|
25
|
+
*
|
|
26
|
+
* Master admins only: an address is personal data. Rows are deleted
|
|
27
|
+
* getServerEmailLogRetentionInDays days after they were written.
|
|
28
|
+
*/
|
|
29
|
+
exports.SERVER_EMAIL_LOG_ROUTE = "/global-config/email-log";
|
|
30
|
+
// The query the route reads: the failed emails only, and how many to skip.
|
|
31
|
+
exports.SERVER_EMAIL_LOG_FAILED_ONLY_QUERY = "failedOnly";
|
|
32
|
+
exports.SERVER_EMAIL_LOG_SKIP_QUERY = "skip";
|
|
33
|
+
// The rows one read returns, at most.
|
|
34
|
+
exports.SERVER_EMAIL_LOG_PAGE_SIZE = 25;
|
|
35
|
+
// How far a read may skip: the log is a month of one server's emails.
|
|
36
|
+
exports.MAX_SERVER_EMAIL_LOG_SKIP = 100000;
|
|
37
|
+
/*
|
|
38
|
+
* How long a row is kept. On OneUptime Cloud a project's Email Logs keep
|
|
39
|
+
* theirs 3 days, and so does this; a self-hosted server keeps them 30.
|
|
40
|
+
*/
|
|
41
|
+
exports.SERVER_EMAIL_LOG_RETENTION_IN_DAYS = 30;
|
|
42
|
+
exports.CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS = 3;
|
|
43
|
+
const getServerEmailLogRetentionInDays = (isBillingEnabled) => {
|
|
44
|
+
return isBillingEnabled
|
|
45
|
+
? exports.CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS
|
|
46
|
+
: exports.SERVER_EMAIL_LOG_RETENTION_IN_DAYS;
|
|
47
|
+
};
|
|
48
|
+
exports.getServerEmailLogRetentionInDays = getServerEmailLogRetentionInDays;
|
|
49
|
+
var ServerEmailLogStatus;
|
|
50
|
+
(function (ServerEmailLogStatus) {
|
|
51
|
+
ServerEmailLogStatus["Sent"] = "sent";
|
|
52
|
+
ServerEmailLogStatus["Failed"] = "failed";
|
|
53
|
+
})(ServerEmailLogStatus || (exports.ServerEmailLogStatus = ServerEmailLogStatus = {}));
|
|
54
|
+
const readText = (value) => {
|
|
55
|
+
return typeof value === "string" && value ? value : null;
|
|
56
|
+
};
|
|
57
|
+
const readEntry = (value) => {
|
|
58
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const json = value;
|
|
62
|
+
const id = readText(json["id"]);
|
|
63
|
+
const at = readText(json["at"]);
|
|
64
|
+
const toEmail = readText(json["toEmail"]);
|
|
65
|
+
const status = json["status"];
|
|
66
|
+
if (!id ||
|
|
67
|
+
!at ||
|
|
68
|
+
Number.isNaN(Date.parse(at)) ||
|
|
69
|
+
!toEmail ||
|
|
70
|
+
!Object.values(ServerEmailLogStatus).includes(status)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
id,
|
|
75
|
+
at,
|
|
76
|
+
toEmail,
|
|
77
|
+
subject: readText(json["subject"]),
|
|
78
|
+
templateName: readText(json["templateName"]),
|
|
79
|
+
status: status,
|
|
80
|
+
statusMessage: readText(json["statusMessage"]),
|
|
81
|
+
projectId: readText(json["projectId"]),
|
|
82
|
+
projectName: readText(json["projectName"]),
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
class ServerEmailLogUtil {
|
|
86
|
+
// The query that asks the route for one page.
|
|
87
|
+
static toQueryParams(query) {
|
|
88
|
+
const params = {};
|
|
89
|
+
if (query.failedOnly) {
|
|
90
|
+
params[exports.SERVER_EMAIL_LOG_FAILED_ONLY_QUERY] = "true";
|
|
91
|
+
}
|
|
92
|
+
if (query.skip > 0) {
|
|
93
|
+
params[exports.SERVER_EMAIL_LOG_SKIP_QUERY] = String(query.skip);
|
|
94
|
+
}
|
|
95
|
+
return params;
|
|
96
|
+
}
|
|
97
|
+
/*
|
|
98
|
+
* The page a request asks for: anything but "true" asks for every email,
|
|
99
|
+
* and anything but a whole number from 0 skips none.
|
|
100
|
+
*/
|
|
101
|
+
static readQuery(query) {
|
|
102
|
+
const skip = Number(query[exports.SERVER_EMAIL_LOG_SKIP_QUERY]);
|
|
103
|
+
return {
|
|
104
|
+
failedOnly: query[exports.SERVER_EMAIL_LOG_FAILED_ONLY_QUERY] === "true",
|
|
105
|
+
skip: Number.isInteger(skip) && skip > 0
|
|
106
|
+
? Math.min(skip, exports.MAX_SERVER_EMAIL_LOG_SKIP)
|
|
107
|
+
: 0,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
// The route's answer, or null for anything it would not answer.
|
|
111
|
+
static parseAnswer(value) {
|
|
112
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
const json = value;
|
|
116
|
+
const entries = json["entries"];
|
|
117
|
+
const retentionInDays = json["retentionInDays"];
|
|
118
|
+
if (!Array.isArray(entries) ||
|
|
119
|
+
typeof json["hasMore"] !== "boolean" ||
|
|
120
|
+
typeof retentionInDays !== "number" ||
|
|
121
|
+
!Number.isInteger(retentionInDays) ||
|
|
122
|
+
retentionInDays <= 0) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
entries: entries
|
|
127
|
+
.map(readEntry)
|
|
128
|
+
.filter((entry) => {
|
|
129
|
+
return entry !== null;
|
|
130
|
+
}),
|
|
131
|
+
hasMore: json["hasMore"],
|
|
132
|
+
retentionInDays: retentionInDays,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.default = ServerEmailLogUtil;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import commonJsModule from "./ServerEmailLog.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS = commonJsModule.CLOUD_SERVER_EMAIL_LOG_RETENTION_IN_DAYS;
|
|
4
|
+
export const MAX_SERVER_EMAIL_LOG_SKIP = commonJsModule.MAX_SERVER_EMAIL_LOG_SKIP;
|
|
5
|
+
export const SERVER_EMAIL_LOG_FAILED_ONLY_QUERY = commonJsModule.SERVER_EMAIL_LOG_FAILED_ONLY_QUERY;
|
|
6
|
+
export const SERVER_EMAIL_LOG_PAGE_SIZE = commonJsModule.SERVER_EMAIL_LOG_PAGE_SIZE;
|
|
7
|
+
export const SERVER_EMAIL_LOG_RETENTION_IN_DAYS = commonJsModule.SERVER_EMAIL_LOG_RETENTION_IN_DAYS;
|
|
8
|
+
export const SERVER_EMAIL_LOG_ROUTE = commonJsModule.SERVER_EMAIL_LOG_ROUTE;
|
|
9
|
+
export const SERVER_EMAIL_LOG_SKIP_QUERY = commonJsModule.SERVER_EMAIL_LOG_SKIP_QUERY;
|
|
10
|
+
export const ServerEmailLogStatus = commonJsModule.ServerEmailLogStatus;
|
|
11
|
+
export const getServerEmailLogRetentionInDays = commonJsModule.getServerEmailLogRetentionInDays;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import ForbiddenException from "./ForbiddenException.mjs";
|
|
2
|
+
import ProductKey from "../Product/ProductKey.mjs";
|
|
3
|
+
import { ServerProductOffReason } from "../Product/ServerProducts.mjs";
|
|
4
|
+
export default class ProductSwitchedOffException extends ForbiddenException {
|
|
5
|
+
readonly product: ProductKey;
|
|
6
|
+
readonly reason: ServerProductOffReason;
|
|
7
|
+
constructor(data: {
|
|
8
|
+
product: ProductKey;
|
|
9
|
+
reason: ServerProductOffReason;
|
|
10
|
+
});
|
|
11
|
+
static isException(error: unknown): error is ProductSwitchedOffException;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import ForbiddenException from "./ForbiddenException";
|
|
2
|
+
import ProductKey from "../Product/ProductKey";
|
|
3
|
+
import { ServerProductOffReason } from "../Product/ServerProducts";
|
|
4
|
+
export default class ProductSwitchedOffException extends ForbiddenException {
|
|
5
|
+
readonly product: ProductKey;
|
|
6
|
+
readonly reason: ServerProductOffReason;
|
|
7
|
+
constructor(data: {
|
|
8
|
+
product: ProductKey;
|
|
9
|
+
reason: ServerProductOffReason;
|
|
10
|
+
});
|
|
11
|
+
static isException(error: unknown): error is ProductSwitchedOffException;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
const ForbiddenException_1 = __importDefault(require("./ForbiddenException"));
|
|
7
|
+
const ServerProducts_1 = require("../Product/ServerProducts");
|
|
8
|
+
/*
|
|
9
|
+
* A write refused because the product it belongs to is switched off on the
|
|
10
|
+
* server (#6815, #7479): Admin Dashboard > Settings > Products, or
|
|
11
|
+
* DISABLE_TELEMETRY_INGESTION for the telemetry products. Its words say what
|
|
12
|
+
* happened and who can switch it on (getProductOffMessage), the same words
|
|
13
|
+
* wherever it is refused: the API, a workflow's step, the Slack, Microsoft
|
|
14
|
+
* Teams and Mattermost apps.
|
|
15
|
+
*
|
|
16
|
+
* A 403, as ForbiddenException: nothing is wrong with the caller's session,
|
|
17
|
+
* and a 401 would sign the Dashboard out. The product it names lets a chat
|
|
18
|
+
* or a run log tell it apart from other refusals, by its type.
|
|
19
|
+
*/
|
|
20
|
+
class ProductSwitchedOffException extends ForbiddenException_1.default {
|
|
21
|
+
constructor(data) {
|
|
22
|
+
super((0, ServerProducts_1.getProductOffMessage)(data));
|
|
23
|
+
this.product = data.product;
|
|
24
|
+
this.reason = data.reason;
|
|
25
|
+
}
|
|
26
|
+
// Whether an error is one, by its fields, so one from another realm is too.
|
|
27
|
+
static isException(error) {
|
|
28
|
+
if (error instanceof ProductSwitchedOffException) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return Boolean(error &&
|
|
32
|
+
typeof error === "object" &&
|
|
33
|
+
typeof error.product === "string" &&
|
|
34
|
+
typeof error.reason === "string" &&
|
|
35
|
+
error instanceof ForbiddenException_1.default);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = ProductSwitchedOffException;
|
|
@@ -45,6 +45,13 @@ export declare const UnexplainedErrorWords: {
|
|
|
45
45
|
loadFailed: string;
|
|
46
46
|
pageDidNotLoadTitle: string;
|
|
47
47
|
};
|
|
48
|
+
export declare const WHERE_TO_LOOK_COMMANDS: ReadonlyArray<string>;
|
|
49
|
+
export interface WhereToLookParts {
|
|
50
|
+
before: string;
|
|
51
|
+
command: string;
|
|
52
|
+
after: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const splitAtWhereToLookCommand: (text: string | null | undefined) => WhereToLookParts | null;
|
|
48
55
|
export declare const getUnexplainedServerErrorMessage: (reference: string | null | undefined) => string;
|
|
49
56
|
export interface UnexplainedError {
|
|
50
57
|
kind: UnexplainedErrorKind;
|
|
@@ -45,6 +45,13 @@ export declare const UnexplainedErrorWords: {
|
|
|
45
45
|
loadFailed: string;
|
|
46
46
|
pageDidNotLoadTitle: string;
|
|
47
47
|
};
|
|
48
|
+
export declare const WHERE_TO_LOOK_COMMANDS: ReadonlyArray<string>;
|
|
49
|
+
export interface WhereToLookParts {
|
|
50
|
+
before: string;
|
|
51
|
+
command: string;
|
|
52
|
+
after: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const splitAtWhereToLookCommand: (text: string | null | undefined) => WhereToLookParts | null;
|
|
48
55
|
export declare const getUnexplainedServerErrorMessage: (reference: string | null | undefined) => string;
|
|
49
56
|
export interface UnexplainedError {
|
|
50
57
|
kind: UnexplainedErrorKind;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getExplanationWords = exports.readUnexplainedError = exports.getUnexplainedServerErrorMessage = exports.UnexplainedErrorWords = exports.UNEXPLAINED_ERROR_MESSAGES = exports.SERVER_DOWN_MESSAGE = exports.UnexplainedErrorKind = exports.isErrorReference = exports.toErrorReference = exports.ERROR_REFERENCE_LENGTH = exports.ERROR_REFERENCE_FIELD = void 0;
|
|
3
|
+
exports.getExplanationWords = exports.readUnexplainedError = exports.getUnexplainedServerErrorMessage = exports.splitAtWhereToLookCommand = exports.WHERE_TO_LOOK_COMMANDS = exports.UnexplainedErrorWords = exports.UNEXPLAINED_ERROR_MESSAGES = exports.SERVER_DOWN_MESSAGE = exports.UnexplainedErrorKind = exports.isErrorReference = exports.toErrorReference = exports.ERROR_REFERENCE_LENGTH = exports.ERROR_REFERENCE_FIELD = void 0;
|
|
4
4
|
const Translator_1 = require("../Translator");
|
|
5
5
|
/*
|
|
6
6
|
* An error nobody explained (#6836): the server failed in a way no message
|
|
@@ -155,6 +155,41 @@ exports.UnexplainedErrorWords = {
|
|
|
155
155
|
loadFailed: (0, Translator_1.translationKey)("The {{itemName}} could not be loaded."),
|
|
156
156
|
pageDidNotLoadTitle: (0, Translator_1.translationKey)("Page Did Not Load"),
|
|
157
157
|
};
|
|
158
|
+
/*
|
|
159
|
+
* The commands where-to-look names (#7539), drawn as commands: one unbroken
|
|
160
|
+
* box of code, left to right in every script, with a copy button beside it,
|
|
161
|
+
* like the reference. Drawn as words, "npm run doctor -- --logs" broke
|
|
162
|
+
* across lines in a narrow card, its halves sat at opposite ends of two
|
|
163
|
+
* lines on an Arabic or Persian page, and there was nothing to copy.
|
|
164
|
+
*
|
|
165
|
+
* Each sentence stays one translation key: every locale writes the command
|
|
166
|
+
* exactly as it is here (Locales/ARABIC.md), so the translated sentence is
|
|
167
|
+
* split at it. Longest first: one holds the other.
|
|
168
|
+
*/
|
|
169
|
+
exports.WHERE_TO_LOOK_COMMANDS = [
|
|
170
|
+
"npm run doctor -- --logs",
|
|
171
|
+
"npm run doctor",
|
|
172
|
+
];
|
|
173
|
+
/*
|
|
174
|
+
* A where-to-look sentence, in any language, split at the command it names;
|
|
175
|
+
* null when it names none (a proxy's limit, or a locale that wrote the
|
|
176
|
+
* command some other way), which is then drawn as words.
|
|
177
|
+
*/
|
|
178
|
+
const splitAtWhereToLookCommand = (text) => {
|
|
179
|
+
const sentence = text || "";
|
|
180
|
+
for (const command of exports.WHERE_TO_LOOK_COMMANDS) {
|
|
181
|
+
const at = sentence.indexOf(command);
|
|
182
|
+
if (at !== -1) {
|
|
183
|
+
return {
|
|
184
|
+
before: sentence.substring(0, at),
|
|
185
|
+
command: command,
|
|
186
|
+
after: sentence.substring(at + command.length),
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return null;
|
|
191
|
+
};
|
|
192
|
+
exports.splitAtWhereToLookCommand = splitAtWhereToLookCommand;
|
|
158
193
|
// The server's answer for a failure it could not explain, in English.
|
|
159
194
|
const getUnexplainedServerErrorMessage = (reference) => {
|
|
160
195
|
return (0, exports.isErrorReference)(reference)
|
|
@@ -5,8 +5,10 @@ export const SERVER_DOWN_MESSAGE = commonJsModule.SERVER_DOWN_MESSAGE;
|
|
|
5
5
|
export const UNEXPLAINED_ERROR_MESSAGES = commonJsModule.UNEXPLAINED_ERROR_MESSAGES;
|
|
6
6
|
export const UnexplainedErrorKind = commonJsModule.UnexplainedErrorKind;
|
|
7
7
|
export const UnexplainedErrorWords = commonJsModule.UnexplainedErrorWords;
|
|
8
|
+
export const WHERE_TO_LOOK_COMMANDS = commonJsModule.WHERE_TO_LOOK_COMMANDS;
|
|
8
9
|
export const getExplanationWords = commonJsModule.getExplanationWords;
|
|
9
10
|
export const getUnexplainedServerErrorMessage = commonJsModule.getUnexplainedServerErrorMessage;
|
|
10
11
|
export const isErrorReference = commonJsModule.isErrorReference;
|
|
11
12
|
export const readUnexplainedError = commonJsModule.readUnexplainedError;
|
|
13
|
+
export const splitAtWhereToLookCommand = commonJsModule.splitAtWhereToLookCommand;
|
|
12
14
|
export const toErrorReference = commonJsModule.toErrorReference;
|