@oneuptime/common 14.0.110 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.d.mts +1 -0
- package/Models/DatabaseModels/Alert.d.ts +1 -0
- package/Models/DatabaseModels/Alert.js +52 -2
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.d.mts +1 -0
- package/Models/DatabaseModels/Incident.d.ts +1 -0
- package/Models/DatabaseModels/Incident.js +53 -2
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.js +23 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +28 -2
- package/Types/AI/AIActionWords.d.ts +28 -2
- package/Types/AI/AIActionWords.js +235 -3
- package/Types/AI/AIActionWords.mjs +8 -0
- package/Types/AI/AIChatTypes.d.mts +3 -1
- package/Types/AI/AIChatTypes.d.ts +3 -1
- package/Types/AI/AIReadTableWords.d.mts +192 -0
- package/Types/AI/AIReadTableWords.d.ts +192 -0
- package/Types/AI/AIReadTableWords.js +368 -0
- package/Types/AI/AIReadTableWords.mjs +18 -0
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +48 -0
- package/Types/AI/AiRunRefusal.d.ts +48 -0
- package/Types/AI/AiRunRefusal.js +208 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/AI/ResourceAiAccessPermissions.js +7 -18
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/AuditLog/AuditLogActionLabel.js +19 -9
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
- package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
- package/Types/Cloud/CloudResourceHealth.js +405 -13
- package/Types/Cloud/CloudResourceHealth.mjs +28 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
- package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
- package/Types/DataObservability/DataCheckRefusals.js +77 -0
- package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
- package/Types/Date.d.mts +8 -1
- package/Types/Date.d.ts +8 -1
- package/Types/Date.js +61 -7
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +8 -5
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Exception/EgressGuardException.js +1 -1
- package/Types/Exception/ErrorMessageRule.d.mts +1 -0
- package/Types/Exception/ErrorMessageRule.d.ts +1 -0
- package/Types/Exception/ErrorMessageRule.js +67 -13
- package/Types/Exception/ErrorMessageRule.mjs +1 -0
- package/Types/Exception/ExceptionMessages.d.mts +2 -0
- package/Types/Exception/ExceptionMessages.d.ts +2 -0
- package/Types/Exception/ExceptionMessages.js +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.js +74 -0
- package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
- package/Types/JSONFunctions.js +10 -3
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/MeaningKeys.d.mts +4 -0
- package/Types/MeaningKeys.d.ts +4 -0
- package/Types/MeaningKeys.js +74 -0
- package/Types/MeaningKeys.mjs +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/Monitor/WhoIsTold.d.mts +3 -0
- package/Types/Monitor/WhoIsTold.d.ts +3 -0
- package/Types/Monitor/WhoIsTold.js +63 -13
- package/Types/NoBreakSpaces.d.mts +16 -0
- package/Types/NoBreakSpaces.d.ts +16 -0
- package/Types/NoBreakSpaces.js +419 -0
- package/Types/NoBreakSpaces.mjs +9 -0
- package/Types/NotificationRule/PagingLadder.d.mts +12 -0
- package/Types/NotificationRule/PagingLadder.d.ts +12 -0
- package/Types/NotificationRule/PagingLadder.js +159 -11
- package/Types/NotificationRule/PagingLadder.mjs +3 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/OpenStack/OpenStackCapacity.js +12 -5
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +66 -10
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/Product/ProductUsage.js +2 -1
- package/Types/Product/ProjectProductsAnswer.js +2 -1
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.js +12 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
- package/Types/Rum/ProductAnalyticsEvents.js +13 -1
- package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.js +12 -0
- package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/SetupHealth/SetupHealth.d.mts +1 -0
- package/Types/SetupHealth/SetupHealth.d.ts +1 -0
- package/Types/SetupHealth/SetupHealth.js +13 -5
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
- package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
- package/Types/StatusPage/DefaultStatusNames.js +74 -28
- package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
- package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +470 -63
- package/Types/Translator.mjs +1 -0
- package/Types/UserSession/SessionLength.d.mts +33 -0
- package/Types/UserSession/SessionLength.d.ts +33 -0
- package/Types/UserSession/SessionLength.js +134 -5
- package/Types/UserSession/SessionLength.mjs +5 -0
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workflow/WorkflowStatus.js +21 -10
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/AI/InvestigationReport.js +2 -2
- package/Utils/API.d.mts +0 -11
- package/Utils/API.d.ts +0 -11
- package/Utils/API.js +0 -432
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
- package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
- package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DefaultRecordNames.d.mts +6 -0
- package/Utils/DefaultRecordNames.d.ts +6 -0
- package/Utils/DefaultRecordNames.js +122 -0
- package/Utils/DefaultRecordNames.mjs +6 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/Grok/Grok.js +7 -4
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
- package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/LookupTable.d.mts +3 -0
- package/Utils/LookupTable.d.ts +3 -0
- package/Utils/LookupTable.js +61 -0
- package/Utils/LookupTable.mjs +3 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
- package/Utils/Markdown/OverLongText.js +296 -2
- package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
- package/Utils/Markdown/SlowMarkdown.js +354 -4
- package/Utils/Markdown/SlowMarkdown.mjs +1 -0
- package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
- package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
- package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
- package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
- package/Utils/Metrics/MetricSeriesScope.js +5 -1
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.js +58 -0
- package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
- package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
- package/Utils/Monitor/ProbeFailureReading.js +166 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
- package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +974 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +829 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.js +212 -0
- package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +219 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +205 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +836 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +20 -0
- package/Utils/PromQL/PromQLRegex.d.ts +20 -0
- package/Utils/PromQL/PromQLRegex.js +1014 -0
- package/Utils/PromQL/PromQLRegex.mjs +5 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +92 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
- package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
- package/Utils/PromQL/RE2CharacterClass.js +532 -0
- package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
- package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
- package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
- package/Utils/RequestFailedDetailsUtil.js +452 -0
- package/Utils/RequestFailedDetailsUtil.mjs +2 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +5 -1
- package/Utils/Rum/UrlScrubber.d.ts +5 -1
- package/Utils/Rum/UrlScrubber.js +153 -7
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +202 -29
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
- package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +3 -1
- package/Utils/StateListType.d.mts +11 -0
- package/Utils/StateListType.d.ts +11 -0
- package/Utils/StateListType.js +21 -0
- package/Utils/StateListType.mjs +2 -0
- package/Utils/StateOrder.d.mts +8 -11
- package/Utils/StateOrder.d.ts +8 -11
- package/Utils/StateOrder.js +50 -88
- package/Utils/StateOrder.mjs +2 -0
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
- package/Utils/Syslog/SyslogMessageParser.js +16 -6
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/ValueFormatter.d.mts +1 -0
- package/Utils/ValueFormatter.d.ts +1 -0
- package/Utils/ValueFormatter.js +258 -18
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import commonJsModule from "./ServerEmailEnvironment.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const SERVER_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE_VALUES = commonJsModule.SERVER_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE_VALUES;
|
|
4
|
+
export const SERVER_EMAIL_COLUMNS = commonJsModule.SERVER_EMAIL_COLUMNS;
|
|
5
|
+
export const SERVER_EMAIL_ENVIRONMENT_ROUTE = commonJsModule.SERVER_EMAIL_ENVIRONMENT_ROUTE;
|
|
6
|
+
export const SERVER_EMAIL_ENVIRONMENT_VARIABLES = commonJsModule.SERVER_EMAIL_ENVIRONMENT_VARIABLES;
|
|
7
|
+
export const SERVER_EMAIL_MAILGUN_REGION_VALUES = commonJsModule.SERVER_EMAIL_MAILGUN_REGION_VALUES;
|
|
8
|
+
export const SERVER_EMAIL_SECRET_VARIABLES = commonJsModule.SERVER_EMAIL_SECRET_VARIABLES;
|
|
9
|
+
export const SERVER_EMAIL_SERVER_TYPE_VALUES = commonJsModule.SERVER_EMAIL_SERVER_TYPE_VALUES;
|
|
10
|
+
export const SERVER_EMAIL_SET_BY_ENVIRONMENT_MESSAGE = commonJsModule.SERVER_EMAIL_SET_BY_ENVIRONMENT_MESSAGE;
|
|
11
|
+
export const SERVER_EMAIL_SMTP_AUTH_TYPE_VALUES = commonJsModule.SERVER_EMAIL_SMTP_AUTH_TYPE_VALUES;
|
|
12
|
+
export const SERVER_EMAIL_SMTP_OAUTH_PROVIDER_TYPE_VALUES = commonJsModule.SERVER_EMAIL_SMTP_OAUTH_PROVIDER_TYPE_VALUES;
|
|
13
|
+
export const SERVER_EMAIL_SMTP_TRANSPORT_VALUES = commonJsModule.SERVER_EMAIL_SMTP_TRANSPORT_VALUES;
|
|
14
|
+
export const ServerEmailEnvironmentVariable = commonJsModule.ServerEmailEnvironmentVariable;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BadDataExceptionWithDetails from "./BadDataExceptionWithDetails.mjs";
|
|
2
|
+
import { AiRunRefusalCode } from "../AI/AiRunRefusal.mjs";
|
|
3
|
+
export default class AiRunRefusalException extends BadDataExceptionWithDetails {
|
|
4
|
+
readonly refusalCode: AiRunRefusalCode;
|
|
5
|
+
constructor(refusalCode: AiRunRefusalCode);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BadDataExceptionWithDetails from "./BadDataExceptionWithDetails";
|
|
2
|
+
import { AiRunRefusalCode } from "../AI/AiRunRefusal";
|
|
3
|
+
export default class AiRunRefusalException extends BadDataExceptionWithDetails {
|
|
4
|
+
readonly refusalCode: AiRunRefusalCode;
|
|
5
|
+
constructor(refusalCode: AiRunRefusalCode);
|
|
6
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 BadDataExceptionWithDetails_1 = __importDefault(require("./BadDataExceptionWithDetails"));
|
|
7
|
+
const AiRunRefusal_1 = require("../AI/AiRunRefusal");
|
|
8
|
+
/*
|
|
9
|
+
* OneUptime AI did not start a run someone asked for (#7359): bad data
|
|
10
|
+
* (400) whose message is the refusal's English sentence, for the API and
|
|
11
|
+
* older Dashboards, with its code beside it -
|
|
12
|
+
* { message: "...", refusalCode: "ai_off" } - for the Dashboard to word
|
|
13
|
+
* in the reader's language.
|
|
14
|
+
*/
|
|
15
|
+
class AiRunRefusalException extends BadDataExceptionWithDetails_1.default {
|
|
16
|
+
constructor(refusalCode) {
|
|
17
|
+
super((0, AiRunRefusal_1.getAiRunRefusalMessage)(refusalCode), {
|
|
18
|
+
[AiRunRefusal_1.AI_RUN_REFUSAL_CODE_FIELD]: refusalCode,
|
|
19
|
+
});
|
|
20
|
+
this.refusalCode = refusalCode;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = AiRunRefusalException;
|
|
@@ -15,7 +15,7 @@ const BadDataException_1 = __importDefault(require("./BadDataException"));
|
|
|
15
15
|
* names. That is correct, and this type does not weaken it.
|
|
16
16
|
*
|
|
17
17
|
* What it fixes is the collateral damage. Callers downstream had nothing but
|
|
18
|
-
* that sanitized string to reason about, so
|
|
18
|
+
* that sanitized string to reason about, so RequestFailedDetailsUtil.getRequestFailedDetails matched
|
|
19
19
|
* none of its patterns and reported monitor failures as "Unknown" with no
|
|
20
20
|
* actionable detail. Carrying the STAGE on the exception restores the one bit
|
|
21
21
|
* every caller legitimately needs without reopening the oracle: when detail is
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const EMPTY_ERROR_PHRASES: ReadonlyArray<string>;
|
|
2
2
|
export declare const isEmptyErrorPhrase: (message: string | undefined | null) => boolean;
|
|
3
|
+
export declare const isErrorPage: (message: string | undefined | null) => boolean;
|
|
3
4
|
export declare const isErrorSentence: (message: string | undefined | null) => boolean;
|
|
4
5
|
export declare const meetsErrorMessageRule: (message: string | undefined | null) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const EMPTY_ERROR_PHRASES: ReadonlyArray<string>;
|
|
2
2
|
export declare const isEmptyErrorPhrase: (message: string | undefined | null) => boolean;
|
|
3
|
+
export declare const isErrorPage: (message: string | undefined | null) => boolean;
|
|
3
4
|
export declare const isErrorSentence: (message: string | undefined | null) => boolean;
|
|
4
5
|
export declare const meetsErrorMessageRule: (message: string | undefined | null) => boolean;
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
*
|
|
13
13
|
* The UI uses the first to treat an empty answer from the server as one the
|
|
14
14
|
* server did not explain (API.getFriendlyMessage), and ErrorMessagesGuard
|
|
15
|
-
* holds every message the code throws to both.
|
|
15
|
+
* holds every message the code throws to both. Both read a message in any
|
|
16
|
+
* script: a message in Persian, Japanese or Hindi says something (#7536).
|
|
17
|
+
* React-free and server-safe.
|
|
16
18
|
*/
|
|
17
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.meetsErrorMessageRule = exports.isErrorSentence = exports.isEmptyErrorPhrase = exports.EMPTY_ERROR_PHRASES = void 0;
|
|
20
|
+
exports.meetsErrorMessageRule = exports.isErrorSentence = exports.isErrorPage = exports.isEmptyErrorPhrase = exports.EMPTY_ERROR_PHRASES = void 0;
|
|
19
21
|
/*
|
|
20
22
|
* The phrases that say only that something failed. Compared without case,
|
|
21
23
|
* without the punctuation around them and without a trailing "Please try
|
|
@@ -48,18 +50,40 @@ const TRAILING_TRY_AGAIN = [
|
|
|
48
50
|
"try again later",
|
|
49
51
|
"try again",
|
|
50
52
|
];
|
|
53
|
+
/*
|
|
54
|
+
* A letter of any script (#7536). It used to be a character whose upper and
|
|
55
|
+
* lower case differ, which only Latin, Greek, Cyrillic and a few other
|
|
56
|
+
* scripts have: a message written in Arabic, Persian, Hebrew, Chinese,
|
|
57
|
+
* Japanese, Korean, Hindi or Thai had no letters at all, so it read as an
|
|
58
|
+
* empty message and was replaced with the English sentence for a failure
|
|
59
|
+
* nobody explained. Each test reads one character, in linear time.
|
|
60
|
+
*/
|
|
61
|
+
const LETTER = /^\p{L}$/u;
|
|
62
|
+
// A digit of any script: "404", Arabic-Indic "٤٠٤", full-width "503".
|
|
63
|
+
const DIGIT = /^\p{Nd}$/u;
|
|
64
|
+
/*
|
|
65
|
+
* What else a word is written with: any other number ("½", "Ⅻ") and the
|
|
66
|
+
* marks a letter carries (Hindi's and Thai's vowel signs, Arabic's
|
|
67
|
+
* harakat), so a word in those scripts is not cut in pieces.
|
|
68
|
+
*/
|
|
69
|
+
const NUMBER_OR_MARK = /^[\p{N}\p{M}]$/u;
|
|
51
70
|
const isLetter = (character) => {
|
|
52
|
-
return
|
|
71
|
+
return LETTER.test(character);
|
|
72
|
+
};
|
|
73
|
+
const isDigit = (character) => {
|
|
74
|
+
return DIGIT.test(character);
|
|
53
75
|
};
|
|
54
76
|
/*
|
|
55
77
|
* The words of a message, lower case, with everything that is not a letter,
|
|
56
|
-
* a
|
|
57
|
-
* something went wrong." reads "oops something went wrong".
|
|
78
|
+
* a number, a mark or a space turned into a space and the spaces squeezed:
|
|
79
|
+
* "Oops, something went wrong." reads "oops something went wrong". A message
|
|
80
|
+
* of punctuation and symbols alone ("...", "—", "❌") has no words, so it
|
|
81
|
+
* says nothing in any language.
|
|
58
82
|
*/
|
|
59
83
|
const toWords = (message) => {
|
|
60
84
|
let words = "";
|
|
61
85
|
for (const character of message.toLowerCase()) {
|
|
62
|
-
const isWordCharacter = isLetter(character) || (character
|
|
86
|
+
const isWordCharacter = isLetter(character) || NUMBER_OR_MARK.test(character);
|
|
63
87
|
words += isWordCharacter ? character : " ";
|
|
64
88
|
}
|
|
65
89
|
return words.split(" ").filter(Boolean).join(" ");
|
|
@@ -83,19 +107,47 @@ const isEmptyErrorPhrase = (message) => {
|
|
|
83
107
|
return words.length === 0 || exports.EMPTY_ERROR_PHRASES.includes(words);
|
|
84
108
|
};
|
|
85
109
|
exports.isEmptyErrorPhrase = isEmptyErrorPhrase;
|
|
110
|
+
/*
|
|
111
|
+
* Whether the "message" is a page rather than a message: the HTML (or XML)
|
|
112
|
+
* a gateway, a proxy or a web server answers with - nginx's "<html><head>
|
|
113
|
+
* <title>502 Bad Gateway</title>...", a load balancer's 503, a CDN's error
|
|
114
|
+
* page, the app's own index.html on a route that is not the API's. It
|
|
115
|
+
* starts with a tag or a doctype and ends with a tag. Its words are markup
|
|
116
|
+
* and a server's name, nothing a person can act on, so the UI says what
|
|
117
|
+
* happened instead (API.getFriendlyMessage). A message that only starts
|
|
118
|
+
* with a tag ("<script> is not allowed in a name.") is a message.
|
|
119
|
+
*/
|
|
120
|
+
const isErrorPage = (message) => {
|
|
121
|
+
const text = (message || "").trim();
|
|
122
|
+
if (!text.startsWith("<") || !text.endsWith(">")) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
const second = text.charAt(1);
|
|
126
|
+
return (second === "!" ||
|
|
127
|
+
second === "?" ||
|
|
128
|
+
(second.toLowerCase() >= "a" && second.toLowerCase() <= "z"));
|
|
129
|
+
};
|
|
130
|
+
exports.isErrorPage = isErrorPage;
|
|
86
131
|
// What may close a sentence after its full stop: a quote or a bracket.
|
|
87
|
-
const CLOSING_MARKS = `"'”’)]
|
|
132
|
+
const CLOSING_MARKS = `"'”’)]»」』`;
|
|
88
133
|
// What may open a sentence before its first word.
|
|
89
|
-
const OPENING_MARKS = `"'
|
|
90
|
-
|
|
91
|
-
|
|
134
|
+
const OPENING_MARKS = `"'“‘„([«¿¡「『`;
|
|
135
|
+
/*
|
|
136
|
+
* The marks a sentence may end with, in the scripts OneUptime is read in:
|
|
137
|
+
* also Japanese's and Chinese's full stops, Arabic's and Persian's question
|
|
138
|
+
* mark, Urdu's full stop and Hindi's danda.
|
|
139
|
+
*/
|
|
140
|
+
const SENTENCE_ENDS = ".!?…。!?.。؟۔।॥";
|
|
92
141
|
/*
|
|
93
142
|
* Whether the message is a sentence: it starts with a capital letter, a
|
|
94
143
|
* digit or a value, and ends with a full stop, a question mark or an
|
|
95
144
|
* exclamation mark (a closing quote or bracket may follow it). A value is
|
|
96
145
|
* written as {{name}} or ${...}: "{{name}} is already taken." is a sentence.
|
|
97
146
|
* A message that is several sentences counts as one when its first starts
|
|
98
|
-
* and its last ends that way.
|
|
147
|
+
* and its last ends that way. A letter of a script with no capitals (Arabic,
|
|
148
|
+
* Chinese, Hindi) starts a sentence as a capital does (#7536):
|
|
149
|
+
* ErrorMessagesGuard still holds OneUptime's own English messages to a
|
|
150
|
+
* capital, since a lower-case Latin letter is not one.
|
|
99
151
|
*/
|
|
100
152
|
const isErrorSentence = (message) => {
|
|
101
153
|
const text = (message || "").trim();
|
|
@@ -109,9 +161,11 @@ const isErrorSentence = (message) => {
|
|
|
109
161
|
}
|
|
110
162
|
const rest = text.substring(start);
|
|
111
163
|
const startsWithValue = rest.startsWith("{{") || rest.startsWith("${");
|
|
112
|
-
|
|
164
|
+
// The whole first character, also one outside the Basic Multilingual Plane.
|
|
165
|
+
const firstCodePoint = rest.codePointAt(0);
|
|
166
|
+
const first = firstCodePoint === undefined ? "" : String.fromCodePoint(firstCodePoint);
|
|
113
167
|
const startsRight = startsWithValue ||
|
|
114
|
-
(first
|
|
168
|
+
isDigit(first) ||
|
|
115
169
|
(isLetter(first) && first === first.toUpperCase());
|
|
116
170
|
if (!startsRight) {
|
|
117
171
|
return false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import commonJsModule from "./ErrorMessageRule.js";
|
|
2
2
|
export const EMPTY_ERROR_PHRASES = commonJsModule.EMPTY_ERROR_PHRASES;
|
|
3
3
|
export const isEmptyErrorPhrase = commonJsModule.isEmptyErrorPhrase;
|
|
4
|
+
export const isErrorPage = commonJsModule.isErrorPage;
|
|
4
5
|
export const isErrorSentence = commonJsModule.isErrorSentence;
|
|
5
6
|
export const meetsErrorMessageRule = commonJsModule.meetsErrorMessageRule;
|
|
@@ -2,6 +2,8 @@ declare enum ExceptionMessages {
|
|
|
2
2
|
MonitorNotFound = "Monitor not found.",
|
|
3
3
|
MonitorDisabled = "Monitor is disabled. Please enable it to start monitoring again.",
|
|
4
4
|
MonitorArchived = "Monitor is archived. Unarchive it to start monitoring again.",
|
|
5
|
+
MonitorDisabledBecauseOfManualIncident = "Monitor is disabled because an incident which is created manually is not resolved. Please resolve the incident to start monitoring again.",
|
|
6
|
+
MonitorDisabledBecauseOfScheduledMaintenanceEvent = "Monitor is disabled because one of the maintenance events this monitor is attached to has not ended. Please end that maintenance event to start monitoring again.",
|
|
5
7
|
ProbeNotAssignedToMonitor = "Probe is not assigned to this monitor",
|
|
6
8
|
UserBlocked = "Your account has been blocked. Please contact your administrator.",
|
|
7
9
|
ProjectBlocked = "This project has been blocked. Please contact your administrator."
|
|
@@ -2,6 +2,8 @@ declare enum ExceptionMessages {
|
|
|
2
2
|
MonitorNotFound = "Monitor not found.",
|
|
3
3
|
MonitorDisabled = "Monitor is disabled. Please enable it to start monitoring again.",
|
|
4
4
|
MonitorArchived = "Monitor is archived. Unarchive it to start monitoring again.",
|
|
5
|
+
MonitorDisabledBecauseOfManualIncident = "Monitor is disabled because an incident which is created manually is not resolved. Please resolve the incident to start monitoring again.",
|
|
6
|
+
MonitorDisabledBecauseOfScheduledMaintenanceEvent = "Monitor is disabled because one of the maintenance events this monitor is attached to has not ended. Please end that maintenance event to start monitoring again.",
|
|
5
7
|
ProbeNotAssignedToMonitor = "Probe is not assigned to this monitor",
|
|
6
8
|
UserBlocked = "Your account has been blocked. Please contact your administrator.",
|
|
7
9
|
ProjectBlocked = "This project has been blocked. Please contact your administrator."
|
|
@@ -5,6 +5,8 @@ var ExceptionMessages;
|
|
|
5
5
|
ExceptionMessages["MonitorNotFound"] = "Monitor not found.";
|
|
6
6
|
ExceptionMessages["MonitorDisabled"] = "Monitor is disabled. Please enable it to start monitoring again.";
|
|
7
7
|
ExceptionMessages["MonitorArchived"] = "Monitor is archived. Unarchive it to start monitoring again.";
|
|
8
|
+
ExceptionMessages["MonitorDisabledBecauseOfManualIncident"] = "Monitor is disabled because an incident which is created manually is not resolved. Please resolve the incident to start monitoring again.";
|
|
9
|
+
ExceptionMessages["MonitorDisabledBecauseOfScheduledMaintenanceEvent"] = "Monitor is disabled because one of the maintenance events this monitor is attached to has not ended. Please end that maintenance event to start monitoring again.";
|
|
8
10
|
ExceptionMessages["ProbeNotAssignedToMonitor"] = "Probe is not assigned to this monitor";
|
|
9
11
|
ExceptionMessages["UserBlocked"] = "Your account has been blocked. Please contact your administrator.";
|
|
10
12
|
ExceptionMessages["ProjectBlocked"] = "This project has been blocked. Please contact your administrator.";
|
|
@@ -115,7 +115,7 @@ const SCHEDULED_MAINTENANCE_FIELDS = [
|
|
|
115
115
|
{
|
|
116
116
|
key: "title",
|
|
117
117
|
title: "Title",
|
|
118
|
-
description: "A one-line summary that becomes the
|
|
118
|
+
description: "A one-line summary that becomes the maintenance event's title.",
|
|
119
119
|
defaultLabel: "Title",
|
|
120
120
|
defaultHelpText: "A short summary of the maintenance.",
|
|
121
121
|
inputType: CustomFieldType_1.default.Text,
|
|
@@ -126,7 +126,7 @@ const SCHEDULED_MAINTENANCE_FIELDS = [
|
|
|
126
126
|
{
|
|
127
127
|
key: "description",
|
|
128
128
|
title: "Description",
|
|
129
|
-
description: "Rich text that becomes the
|
|
129
|
+
description: "Rich text that becomes the maintenance event's description.",
|
|
130
130
|
defaultLabel: "Description",
|
|
131
131
|
defaultHelpText: "What will change, and what people should expect.",
|
|
132
132
|
inputType: CustomFieldType_1.default.Markdown,
|
|
@@ -41,8 +41,8 @@ exports.FORM_TARGET_TYPE_TEXT = {
|
|
|
41
41
|
},
|
|
42
42
|
[FormTargetType.ScheduledMaintenance]: {
|
|
43
43
|
title: "Scheduled Maintenance",
|
|
44
|
-
noun: "
|
|
45
|
-
nounWithArticle: "a
|
|
44
|
+
noun: "maintenance event",
|
|
45
|
+
nounWithArticle: "a maintenance event",
|
|
46
46
|
description: "Each submission schedules a maintenance event. Use it for change and maintenance requests.",
|
|
47
47
|
},
|
|
48
48
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare enum PostmortemActionItemStatus {
|
|
2
|
+
Open = "Open",
|
|
3
|
+
Done = "Done",
|
|
4
|
+
WontDo = "WontDo"
|
|
5
|
+
}
|
|
6
|
+
export default PostmortemActionItemStatus;
|
|
7
|
+
export declare const ALL_POSTMORTEM_ACTION_ITEM_STATUSES: ReadonlyArray<PostmortemActionItemStatus>;
|
|
8
|
+
export declare const POSTMORTEM_ACTION_ITEM_STATUS_NAMES: Readonly<Record<PostmortemActionItemStatus, string>>;
|
|
9
|
+
export declare class PostmortemActionItemStatusUtil {
|
|
10
|
+
static parse(value: unknown): PostmortemActionItemStatus;
|
|
11
|
+
static isClosed(status: PostmortemActionItemStatus | undefined): boolean;
|
|
12
|
+
static isOverdue(data: {
|
|
13
|
+
status: PostmortemActionItemStatus | undefined;
|
|
14
|
+
dueDate: Date | string | null | undefined;
|
|
15
|
+
now: Date;
|
|
16
|
+
}): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare enum PostmortemActionItemStatus {
|
|
2
|
+
Open = "Open",
|
|
3
|
+
Done = "Done",
|
|
4
|
+
WontDo = "WontDo"
|
|
5
|
+
}
|
|
6
|
+
export default PostmortemActionItemStatus;
|
|
7
|
+
export declare const ALL_POSTMORTEM_ACTION_ITEM_STATUSES: ReadonlyArray<PostmortemActionItemStatus>;
|
|
8
|
+
export declare const POSTMORTEM_ACTION_ITEM_STATUS_NAMES: Readonly<Record<PostmortemActionItemStatus, string>>;
|
|
9
|
+
export declare class PostmortemActionItemStatusUtil {
|
|
10
|
+
static parse(value: unknown): PostmortemActionItemStatus;
|
|
11
|
+
static isClosed(status: PostmortemActionItemStatus | undefined): boolean;
|
|
12
|
+
static isOverdue(data: {
|
|
13
|
+
status: PostmortemActionItemStatus | undefined;
|
|
14
|
+
dueDate: Date | string | null | undefined;
|
|
15
|
+
now: Date;
|
|
16
|
+
}): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostmortemActionItemStatusUtil = exports.POSTMORTEM_ACTION_ITEM_STATUS_NAMES = exports.ALL_POSTMORTEM_ACTION_ITEM_STATUSES = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* WHERE A POSTMORTEM'S ACTION ITEM STANDS (issue #6801).
|
|
6
|
+
*
|
|
7
|
+
* - Open: still to do. A new action item starts open, and so does one
|
|
8
|
+
* reopened.
|
|
9
|
+
* - Done: done - ticked off by a person, or by OneUptime when the pull
|
|
10
|
+
* request OneUptime AI opened for it merges, or the monitor made for it
|
|
11
|
+
* is created.
|
|
12
|
+
* - Won't Do: the team decided not to do it. It is no longer owed, and
|
|
13
|
+
* says so instead of being deleted, so the postmortem keeps the
|
|
14
|
+
* decision.
|
|
15
|
+
*
|
|
16
|
+
* Done and Won't Do both close the item: who closed it and when are
|
|
17
|
+
* OneUptime's to write (IncidentPostmortemActionItemService), and reopening
|
|
18
|
+
* it clears them. "In progress" is not a status: a pull request OneUptime AI
|
|
19
|
+
* is writing or has opened says so on the item itself.
|
|
20
|
+
*/
|
|
21
|
+
var PostmortemActionItemStatus;
|
|
22
|
+
(function (PostmortemActionItemStatus) {
|
|
23
|
+
PostmortemActionItemStatus["Open"] = "Open";
|
|
24
|
+
PostmortemActionItemStatus["Done"] = "Done";
|
|
25
|
+
PostmortemActionItemStatus["WontDo"] = "WontDo";
|
|
26
|
+
})(PostmortemActionItemStatus || (PostmortemActionItemStatus = {}));
|
|
27
|
+
exports.default = PostmortemActionItemStatus;
|
|
28
|
+
const ONE_DAY_IN_MS = 24 * 60 * 60 * 1000;
|
|
29
|
+
exports.ALL_POSTMORTEM_ACTION_ITEM_STATUSES = [
|
|
30
|
+
PostmortemActionItemStatus.Open,
|
|
31
|
+
PostmortemActionItemStatus.Done,
|
|
32
|
+
PostmortemActionItemStatus.WontDo,
|
|
33
|
+
];
|
|
34
|
+
/*
|
|
35
|
+
* Each status as people read it, in English: the Dashboard looks each up in
|
|
36
|
+
* the reader's language. Open reads "To Do": in many languages "Open" is
|
|
37
|
+
* the verb, a button's word, and a status that says "Open!" is a command.
|
|
38
|
+
*/
|
|
39
|
+
exports.POSTMORTEM_ACTION_ITEM_STATUS_NAMES = {
|
|
40
|
+
[PostmortemActionItemStatus.Open]: "To Do",
|
|
41
|
+
[PostmortemActionItemStatus.Done]: "Done",
|
|
42
|
+
[PostmortemActionItemStatus.WontDo]: "Won't Do",
|
|
43
|
+
};
|
|
44
|
+
class PostmortemActionItemStatusUtil {
|
|
45
|
+
// Reads a status off the wire: anything this build does not know is Open.
|
|
46
|
+
static parse(value) {
|
|
47
|
+
if (typeof value === "string" &&
|
|
48
|
+
exports.ALL_POSTMORTEM_ACTION_ITEM_STATUSES.includes(value)) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return PostmortemActionItemStatus.Open;
|
|
52
|
+
}
|
|
53
|
+
// Done or Won't Do: no longer owed.
|
|
54
|
+
static isClosed(status) {
|
|
55
|
+
return (status === PostmortemActionItemStatus.Done ||
|
|
56
|
+
status === PostmortemActionItemStatus.WontDo);
|
|
57
|
+
}
|
|
58
|
+
/*
|
|
59
|
+
* Whether an item is past its due date: open, and its due day is over. A
|
|
60
|
+
* due date is the start of its day in the time zone of whoever set it
|
|
61
|
+
* (the Due Date picker), so the day is over a day after it.
|
|
62
|
+
*/
|
|
63
|
+
static isOverdue(data) {
|
|
64
|
+
if (PostmortemActionItemStatusUtil.isClosed(data.status) || !data.dueDate) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const due = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
|
|
68
|
+
if (isNaN(due.getTime())) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
return data.now.getTime() >= due.getTime() + ONE_DAY_IN_MS;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.PostmortemActionItemStatusUtil = PostmortemActionItemStatusUtil;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./PostmortemActionItemStatus.js";
|
|
2
|
+
export default commonJsModule.default;
|
|
3
|
+
export const ALL_POSTMORTEM_ACTION_ITEM_STATUSES = commonJsModule.ALL_POSTMORTEM_ACTION_ITEM_STATUSES;
|
|
4
|
+
export const POSTMORTEM_ACTION_ITEM_STATUS_NAMES = commonJsModule.POSTMORTEM_ACTION_ITEM_STATUS_NAMES;
|
|
5
|
+
export const PostmortemActionItemStatusUtil = commonJsModule.PostmortemActionItemStatusUtil;
|
package/Types/JSONFunctions.js
CHANGED
|
@@ -12,6 +12,7 @@ const SerializableObject_1 = __importDefault(require("./SerializableObject"));
|
|
|
12
12
|
const SerializableObjectDictionary_1 = __importDefault(require("./SerializableObjectDictionary"));
|
|
13
13
|
const Typeof_1 = __importDefault(require("./Typeof"));
|
|
14
14
|
const json5_1 = __importDefault(require("json5"));
|
|
15
|
+
const LookupTable_1 = require("../Utils/LookupTable");
|
|
15
16
|
class JSONFunctions {
|
|
16
17
|
static createSafeJSONObject() {
|
|
17
18
|
return Object.create(null);
|
|
@@ -272,22 +273,28 @@ class JSONFunctions {
|
|
|
272
273
|
// this function serializes JSON with Common Objects to JSON that can be stringified.
|
|
273
274
|
static serialize(val) {
|
|
274
275
|
const newVal = {};
|
|
276
|
+
/*
|
|
277
|
+
* Each key is written as the copy's own (writeOwnValue). A value read
|
|
278
|
+
* from a store can hold a key named __proto__ - a log's attribute, a
|
|
279
|
+
* series' label - and assigning it dropped it from the JSON, or made an
|
|
280
|
+
* object under it the copy's prototype, which hid it the same way.
|
|
281
|
+
*/
|
|
275
282
|
for (const key in val) {
|
|
276
283
|
if (val[key] === undefined) {
|
|
277
284
|
continue;
|
|
278
285
|
}
|
|
279
286
|
if (val[key] === null) {
|
|
280
|
-
newVal
|
|
287
|
+
(0, LookupTable_1.writeOwnValue)(newVal, key, val[key]);
|
|
281
288
|
}
|
|
282
289
|
if (Array.isArray(val[key])) {
|
|
283
290
|
const arraySerialize = [];
|
|
284
291
|
for (const arrVal of val[key]) {
|
|
285
292
|
arraySerialize.push(this.serializeValue(arrVal));
|
|
286
293
|
}
|
|
287
|
-
newVal
|
|
294
|
+
(0, LookupTable_1.writeOwnValue)(newVal, key, arraySerialize);
|
|
288
295
|
}
|
|
289
296
|
else {
|
|
290
|
-
newVal
|
|
297
|
+
(0, LookupTable_1.writeOwnValue)(newVal, key, this.serializeValue(val[key]));
|
|
291
298
|
}
|
|
292
299
|
}
|
|
293
300
|
return newVal;
|
package/Types/Link.d.mts
CHANGED
package/Types/Link.d.ts
CHANGED
package/Types/ListData.d.mts
CHANGED
|
@@ -7,11 +7,13 @@ export default class ListData {
|
|
|
7
7
|
skip: PositiveNumber;
|
|
8
8
|
limit: PositiveNumber;
|
|
9
9
|
hasMore?: boolean | undefined;
|
|
10
|
+
isCountCapped?: boolean | undefined;
|
|
10
11
|
});
|
|
11
12
|
data: JSONArray;
|
|
12
13
|
count: PositiveNumber;
|
|
13
14
|
skip: PositiveNumber;
|
|
14
15
|
limit: PositiveNumber;
|
|
15
16
|
hasMore?: boolean | undefined;
|
|
17
|
+
isCountCapped?: boolean | undefined;
|
|
16
18
|
toJSON(): JSONObject;
|
|
17
19
|
}
|
package/Types/ListData.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ export default class ListData {
|
|
|
7
7
|
skip: PositiveNumber;
|
|
8
8
|
limit: PositiveNumber;
|
|
9
9
|
hasMore?: boolean | undefined;
|
|
10
|
+
isCountCapped?: boolean | undefined;
|
|
10
11
|
});
|
|
11
12
|
data: JSONArray;
|
|
12
13
|
count: PositiveNumber;
|
|
13
14
|
skip: PositiveNumber;
|
|
14
15
|
limit: PositiveNumber;
|
|
15
16
|
hasMore?: boolean | undefined;
|
|
17
|
+
isCountCapped?: boolean | undefined;
|
|
16
18
|
toJSON(): JSONObject;
|
|
17
19
|
}
|
package/Types/ListData.js
CHANGED
|
@@ -7,6 +7,7 @@ class ListData {
|
|
|
7
7
|
this.skip = obj.skip;
|
|
8
8
|
this.limit = obj.limit;
|
|
9
9
|
this.hasMore = obj.hasMore;
|
|
10
|
+
this.isCountCapped = obj.isCountCapped;
|
|
10
11
|
}
|
|
11
12
|
toJSON() {
|
|
12
13
|
const json = {
|
|
@@ -18,6 +19,9 @@ class ListData {
|
|
|
18
19
|
if (this.hasMore !== undefined) {
|
|
19
20
|
json["hasMore"] = this.hasMore;
|
|
20
21
|
}
|
|
22
|
+
if (this.isCountCapped) {
|
|
23
|
+
json["isCountCapped"] = true;
|
|
24
|
+
}
|
|
21
25
|
return json;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const MEANING_KEYS: ReadonlyArray<string>;
|
|
2
|
+
export declare const MEANING_KEY_PATTERN: RegExp;
|
|
3
|
+
export declare function getWordOfMeaningKey(text: string | undefined): string | undefined;
|
|
4
|
+
export declare function withMeaningKeyAsItsWord(text: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const MEANING_KEYS: ReadonlyArray<string>;
|
|
2
|
+
export declare const MEANING_KEY_PATTERN: RegExp;
|
|
3
|
+
export declare function getWordOfMeaningKey(text: string | undefined): string | undefined;
|
|
4
|
+
export declare function withMeaningKeyAsItsWord(text: string): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MEANING_KEY_PATTERN = exports.MEANING_KEYS = void 0;
|
|
4
|
+
exports.getWordOfMeaningKey = getWordOfMeaningKey;
|
|
5
|
+
exports.withMeaningKeyAsItsWord = withMeaningKeyAsItsWord;
|
|
6
|
+
/*
|
|
7
|
+
* KEYS THAT NAME THEIR MEANING.
|
|
8
|
+
*
|
|
9
|
+
* A key of the Dashboard's locales is its English text, so an English word
|
|
10
|
+
* that means two things is worded one way in each language, for every place
|
|
11
|
+
* that looks it up. "Open" is every Open button's verb, so an open invoice
|
|
12
|
+
* read "Abrir" ("open it") in Spanish; "View" is the View buttons' verb, so a
|
|
13
|
+
* database's view read "Ver"; "Change" is the Change buttons' verb, so a
|
|
14
|
+
* schema change read "Cambiar".
|
|
15
|
+
*
|
|
16
|
+
* Such a meaning takes a key of its own: the word, then what it means in
|
|
17
|
+
* brackets, for the translator - "Open (invoice status)", "View (database
|
|
18
|
+
* object)" - worded as that meaning in every language ("Pendiente",
|
|
19
|
+
* "Vista"). English reads the word alone, "Open" or "View", and so does a
|
|
20
|
+
* language whose locale has no wording of the key yet.
|
|
21
|
+
*
|
|
22
|
+
* The translator knows the keys listed here: wherever one is looked up with
|
|
23
|
+
* no wording of its own - Translator's translateText and translateTerm, a
|
|
24
|
+
* value of an English sentence, the front ends' translateString - it reads as
|
|
25
|
+
* its word. So such a key can be anything a key can be: a column's or a
|
|
26
|
+
* filter's title, a dropdown's option, a pill's text, drawn by any component.
|
|
27
|
+
*
|
|
28
|
+
* A key is listed here once its meaning is checked against every place that
|
|
29
|
+
* looks it up (App/Tests/Dashboard/OneMeaningPerKey). A key that only looks
|
|
30
|
+
* like one - "Description (optional)", "Retention (days)" - is not, and reads
|
|
31
|
+
* as its whole text.
|
|
32
|
+
*/
|
|
33
|
+
exports.MEANING_KEYS = [
|
|
34
|
+
// A data security issue that is still open (DataSecurityPills).
|
|
35
|
+
"Open (status)",
|
|
36
|
+
// An invoice that is issued and not paid yet (Settings > Invoices).
|
|
37
|
+
"Open (invoice status)",
|
|
38
|
+
// What an import did with a row (ImportResultWords).
|
|
39
|
+
"Created (import result)",
|
|
40
|
+
// A data asset's kind: a database's view and table (DataAssetKindWords).
|
|
41
|
+
"View (database object)",
|
|
42
|
+
"Table (database object)",
|
|
43
|
+
// The Schema Changes list's Change filter and column.
|
|
44
|
+
"Change (schema change)",
|
|
45
|
+
/*
|
|
46
|
+
* The storage array a hardware component or a volume is in: the storage
|
|
47
|
+
* widgets' column, a tile's row and the Sort setting's choice (#7522).
|
|
48
|
+
* The bare "Array" read as a programming array in six languages (配列,
|
|
49
|
+
* Matriz, Tableau, 배열, 数组, Matrise).
|
|
50
|
+
*/
|
|
51
|
+
"Array (storage array)",
|
|
52
|
+
];
|
|
53
|
+
// "<word> (<what it means>)": the word, and its meaning in brackets.
|
|
54
|
+
exports.MEANING_KEY_PATTERN = /^(\S(?:.*\S)?) \(([^()]+)\)$/;
|
|
55
|
+
const WORD_OF_MEANING_KEY = new Map(exports.MEANING_KEYS.map((key) => {
|
|
56
|
+
const match = key.match(exports.MEANING_KEY_PATTERN);
|
|
57
|
+
return [key, match ? match[1] : key];
|
|
58
|
+
}));
|
|
59
|
+
/*
|
|
60
|
+
* What a listed key reads as where the reader's language has no wording of
|
|
61
|
+
* its own: "Open" for "Open (invoice status)". Undefined for any other text,
|
|
62
|
+
* which reads as it is written.
|
|
63
|
+
*/
|
|
64
|
+
function getWordOfMeaningKey(text) {
|
|
65
|
+
if (typeof text !== "string" || text.length === 0) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
return WORD_OF_MEANING_KEY.get(text);
|
|
69
|
+
}
|
|
70
|
+
// The text as English draws it: a listed key's word, any other text itself.
|
|
71
|
+
function withMeaningKeyAsItsWord(text) {
|
|
72
|
+
var _a;
|
|
73
|
+
return (_a = getWordOfMeaningKey(text)) !== null && _a !== void 0 ? _a : text;
|
|
74
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import commonJsModule from "./MeaningKeys.js";
|
|
2
|
+
export const MEANING_KEYS = commonJsModule.MEANING_KEYS;
|
|
3
|
+
export const MEANING_KEY_PATTERN = commonJsModule.MEANING_KEY_PATTERN;
|
|
4
|
+
export const getWordOfMeaningKey = commonJsModule.getWordOfMeaningKey;
|
|
5
|
+
export const withMeaningKeyAsItsWord = commonJsModule.withMeaningKeyAsItsWord;
|
|
@@ -132,6 +132,15 @@ class MonitorCriteriaInstance extends DatabaseProperty_1.default {
|
|
|
132
132
|
* Dashboard/scripts/i18n/ExtractStrings.ts reads this file as a "keys"
|
|
133
133
|
* root: every template passed to translateTemplate, or marked with
|
|
134
134
|
* translationKey, is a key of the Dashboard's locale files.
|
|
135
|
+
*
|
|
136
|
+
* The server writes them in a person's language too, when it makes a
|
|
137
|
+
* monitor for them (Ask AI's set_up_website_monitoring, #7247): this file
|
|
138
|
+
* is one of the server locale set's DASHBOARD_SHARED_TEXT_SOURCES
|
|
139
|
+
* (Common/Scripts/I18n/ServerLocales), so after changing a sentence here
|
|
140
|
+
* and translating it in the Dashboard's files, run
|
|
141
|
+
* `npm run i18n:server-sync` from the repository's root: it copies the
|
|
142
|
+
* Dashboard's wording into Common/Server/Locales, and
|
|
143
|
+
* Tests/Server/Locales/ServerLocales fails until it is run.
|
|
135
144
|
*/
|
|
136
145
|
static getWordsTranslator(translator) {
|
|
137
146
|
return translator || ENGLISH_WORDS;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare enum MonitorNotCheckedReason {
|
|
2
|
+
MonitoringOff = "monitoringOff",
|
|
3
|
+
MonitorArchived = "monitorArchived"
|
|
4
|
+
}
|
|
5
|
+
export default MonitorNotCheckedReason;
|
|
6
|
+
export declare const MONITOR_NOT_CHECKED_REASONS: ReadonlyArray<MonitorNotCheckedReason>;
|
|
7
|
+
export declare function isMonitorNotCheckedReason(value: unknown): value is MonitorNotCheckedReason;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare enum MonitorNotCheckedReason {
|
|
2
|
+
MonitoringOff = "monitoringOff",
|
|
3
|
+
MonitorArchived = "monitorArchived"
|
|
4
|
+
}
|
|
5
|
+
export default MonitorNotCheckedReason;
|
|
6
|
+
export declare const MONITOR_NOT_CHECKED_REASONS: ReadonlyArray<MonitorNotCheckedReason>;
|
|
7
|
+
export declare function isMonitorNotCheckedReason(value: unknown): value is MonitorNotCheckedReason;
|