@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DASHBOARD_AUTO_REFRESH_LINK_PARAMETER = exports.DASHBOARD_AUTO_REFRESH_PROBLEM = exports.DASHBOARD_AUTO_REFRESH_INTERVALS = exports.DASHBOARD_AUTO_REFRESH_FALLBACK = exports.DASHBOARD_AUTO_REFRESH_FIELD = void 0;
|
|
4
|
+
exports.formatAutoRefreshInterval = formatAutoRefreshInterval;
|
|
4
5
|
exports.isDashboardAutoRefreshInterval = isDashboardAutoRefreshInterval;
|
|
5
6
|
exports.parseDashboardAutoRefreshInterval = parseDashboardAutoRefreshInterval;
|
|
6
7
|
exports.getDashboardAutoRefreshProblem = getDashboardAutoRefreshProblem;
|
|
@@ -8,6 +9,7 @@ exports.parseDashboardLinkAutoRefreshInterval = parseDashboardLinkAutoRefreshInt
|
|
|
8
9
|
exports.getDashboardLinkAutoRefreshIntervalFromSearch = getDashboardLinkAutoRefreshIntervalFromSearch;
|
|
9
10
|
exports.getDashboardAutoRefreshInterval = getDashboardAutoRefreshInterval;
|
|
10
11
|
const DashboardViewConfig_1 = require("./DashboardViewConfig");
|
|
12
|
+
const SloDuration_1 = require("../../Utils/Slo/SloDuration");
|
|
11
13
|
const DashboardViewerChoice_1 = require("./DashboardViewerChoice");
|
|
12
14
|
/*
|
|
13
15
|
* A dashboard's auto-refresh: how often every widget on it reads its data
|
|
@@ -41,6 +43,25 @@ const DashboardViewerChoice_1 = require("./DashboardViewerChoice");
|
|
|
41
43
|
exports.DASHBOARD_AUTO_REFRESH_FIELD = "refreshInterval";
|
|
42
44
|
// What a dashboard that names no auto-refresh opens with: off.
|
|
43
45
|
exports.DASHBOARD_AUTO_REFRESH_FALLBACK = DashboardViewConfig_1.AutoRefreshInterval.OFF;
|
|
46
|
+
/*
|
|
47
|
+
* An interval as the auto-refresh pickers name it, in `language`: "30s" and
|
|
48
|
+
* "1m" in English - getAutoRefreshIntervalLabel's short forms, word for word
|
|
49
|
+
* - and the language's own short duration elsewhere: "30 Sek." in German,
|
|
50
|
+
* "۳۰ ثانیه" in Persian, "30 秒" in Japanese. It goes into a sentence
|
|
51
|
+
* ("Every {{interval}}") in that sentence's language: a Persian picker read
|
|
52
|
+
* "هر 30s", English digits and letters beside Persian ones everywhere else
|
|
53
|
+
* on the page.
|
|
54
|
+
*
|
|
55
|
+
* Off is no duration: null, and the picker says Off in its own words.
|
|
56
|
+
* Without a language, the page's (the date display language).
|
|
57
|
+
*/
|
|
58
|
+
function formatAutoRefreshInterval(interval, language) {
|
|
59
|
+
const intervalMs = (0, DashboardViewConfig_1.getAutoRefreshIntervalInMs)(interval);
|
|
60
|
+
if (intervalMs === null) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
return (0, SloDuration_1.formatDurationCompactInLanguage)(intervalMs / 1000, language);
|
|
64
|
+
}
|
|
44
65
|
// The intervals, in the order the auto-refresh menu offers them.
|
|
45
66
|
exports.DASHBOARD_AUTO_REFRESH_INTERVALS = [
|
|
46
67
|
DashboardViewConfig_1.AutoRefreshInterval.OFF,
|
|
@@ -4,6 +4,7 @@ export const DASHBOARD_AUTO_REFRESH_FIELD = commonJsModule.DASHBOARD_AUTO_REFRES
|
|
|
4
4
|
export const DASHBOARD_AUTO_REFRESH_INTERVALS = commonJsModule.DASHBOARD_AUTO_REFRESH_INTERVALS;
|
|
5
5
|
export const DASHBOARD_AUTO_REFRESH_LINK_PARAMETER = commonJsModule.DASHBOARD_AUTO_REFRESH_LINK_PARAMETER;
|
|
6
6
|
export const DASHBOARD_AUTO_REFRESH_PROBLEM = commonJsModule.DASHBOARD_AUTO_REFRESH_PROBLEM;
|
|
7
|
+
export const formatAutoRefreshInterval = commonJsModule.formatAutoRefreshInterval;
|
|
7
8
|
export const getDashboardAutoRefreshInterval = commonJsModule.getDashboardAutoRefreshInterval;
|
|
8
9
|
export const getDashboardAutoRefreshProblem = commonJsModule.getDashboardAutoRefreshProblem;
|
|
9
10
|
export const getDashboardLinkAutoRefreshIntervalFromSearch = commonJsModule.getDashboardLinkAutoRefreshIntervalFromSearch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RefusalWithValues } from "../Exception/RefusalWithValues.mjs";
|
|
2
|
+
export declare const DataCheckFromSentenceRefusal: {
|
|
3
|
+
noRule: string;
|
|
4
|
+
tableNotFound: string;
|
|
5
|
+
engineNotChecked: string;
|
|
6
|
+
answerNotACheck: string;
|
|
7
|
+
queryNamesNoValue: string;
|
|
8
|
+
pipelineNamesNoValue: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RULE_NOT_A_CHECK_REFUSAL: RefusalWithValues;
|
|
11
|
+
export declare const CHECK_NOT_WRITTEN_REFUSAL: RefusalWithValues;
|
|
12
|
+
export declare const CustomSqlRefusal: {
|
|
13
|
+
noQuery: string;
|
|
14
|
+
tooLong: string;
|
|
15
|
+
notSingleQuery: string;
|
|
16
|
+
notARead: string;
|
|
17
|
+
writes: string;
|
|
18
|
+
dataverseNoWith: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const MongoPipelineRefusal: {
|
|
21
|
+
noPipeline: string;
|
|
22
|
+
tooLong: string;
|
|
23
|
+
notJson: string;
|
|
24
|
+
writes: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const DataReconciliationRefusal: {
|
|
27
|
+
notFound: string;
|
|
28
|
+
sourceNeedsTable: string;
|
|
29
|
+
targetNeedsTable: string;
|
|
30
|
+
missingStatuses: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const DATA_CHECK_REFUSALS_WITH_VALUES: ReadonlyArray<RefusalWithValues>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RefusalWithValues } from "../Exception/RefusalWithValues";
|
|
2
|
+
export declare const DataCheckFromSentenceRefusal: {
|
|
3
|
+
noRule: string;
|
|
4
|
+
tableNotFound: string;
|
|
5
|
+
engineNotChecked: string;
|
|
6
|
+
answerNotACheck: string;
|
|
7
|
+
queryNamesNoValue: string;
|
|
8
|
+
pipelineNamesNoValue: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RULE_NOT_A_CHECK_REFUSAL: RefusalWithValues;
|
|
11
|
+
export declare const CHECK_NOT_WRITTEN_REFUSAL: RefusalWithValues;
|
|
12
|
+
export declare const CustomSqlRefusal: {
|
|
13
|
+
noQuery: string;
|
|
14
|
+
tooLong: string;
|
|
15
|
+
notSingleQuery: string;
|
|
16
|
+
notARead: string;
|
|
17
|
+
writes: string;
|
|
18
|
+
dataverseNoWith: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const MongoPipelineRefusal: {
|
|
21
|
+
noPipeline: string;
|
|
22
|
+
tooLong: string;
|
|
23
|
+
notJson: string;
|
|
24
|
+
writes: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const DataReconciliationRefusal: {
|
|
27
|
+
notFound: string;
|
|
28
|
+
sourceNeedsTable: string;
|
|
29
|
+
targetNeedsTable: string;
|
|
30
|
+
missingStatuses: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const DATA_CHECK_REFUSALS_WITH_VALUES: ReadonlyArray<RefusalWithValues>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DATA_CHECK_REFUSALS_WITH_VALUES = exports.DataReconciliationRefusal = exports.MongoPipelineRefusal = exports.CustomSqlRefusal = exports.CHECK_NOT_WRITTEN_REFUSAL = exports.RULE_NOT_A_CHECK_REFUSAL = exports.DataCheckFromSentenceRefusal = void 0;
|
|
4
|
+
const Translator_1 = require("../Translator");
|
|
5
|
+
/*
|
|
6
|
+
* WHY A DATA CHECK OR A RECONCILIATION WAS NOT WRITTEN, ADDED OR SET UP
|
|
7
|
+
* (#7530).
|
|
8
|
+
*
|
|
9
|
+
* The server refuses in these English sentences: an API client, the CLI
|
|
10
|
+
* and Terraform read them as they are. Write a Check from a Sentence,
|
|
11
|
+
* Suggested Checks and the Reconciliations page show them under their
|
|
12
|
+
* buttons, where they read English on every page. Each is a key of the
|
|
13
|
+
* Dashboard's locales now (this file is a "keys" root of its string
|
|
14
|
+
* extractor), so the Dashboard says it in the reader's language
|
|
15
|
+
* (ErrorLine, Common/UI/Utils/ErrorInSentence).
|
|
16
|
+
*
|
|
17
|
+
* Two carry a value: why the model could not make the rule a check, and
|
|
18
|
+
* why its answer could not be run. They are RefusalWithValues: the
|
|
19
|
+
* Dashboard reads the value back out of the English and says the sentence
|
|
20
|
+
* in the reader's language around it. The model writes its own why in the
|
|
21
|
+
* reader's language (DataCheckFromSentence's language line), and a why of
|
|
22
|
+
* OneUptime's own - one of the sentences below - is looked up as a key.
|
|
23
|
+
*
|
|
24
|
+
* React-free and server-safe: the server throws these, the Dashboard reads
|
|
25
|
+
* them.
|
|
26
|
+
*/
|
|
27
|
+
// Write a Check from a Sentence (DataCheckFromSentence).
|
|
28
|
+
exports.DataCheckFromSentenceRefusal = {
|
|
29
|
+
noRule: (0, Translator_1.translationKey)("Say the rule the check should hold to."),
|
|
30
|
+
tableNotFound: (0, Translator_1.translationKey)("The table was not found."),
|
|
31
|
+
engineNotChecked: (0, Translator_1.translationKey)("Data Observability does not run checks on this table's database."),
|
|
32
|
+
answerNotACheck: (0, Translator_1.translationKey)("The AI's answer was not a check. Say the rule another way, or write the check yourself."),
|
|
33
|
+
queryNamesNoValue: (0, Translator_1.translationKey)("The AI's query does not name its number value. Say the rule another way, or write the check yourself."),
|
|
34
|
+
pipelineNamesNoValue: (0, Translator_1.translationKey)("The AI's pipeline does not name its number value. Say the rule another way, or write the check yourself."),
|
|
35
|
+
};
|
|
36
|
+
/*
|
|
37
|
+
* The model said the rule cannot be checked with the table's columns, and
|
|
38
|
+
* why: in the reader's language, as it was asked to write it.
|
|
39
|
+
*/
|
|
40
|
+
exports.RULE_NOT_A_CHECK_REFUSAL = {
|
|
41
|
+
template: (0, Translator_1.translationKey)("The rule could not be made a check: {{reason}}"),
|
|
42
|
+
terms: [],
|
|
43
|
+
};
|
|
44
|
+
/*
|
|
45
|
+
* The model answered twice with something OneUptime cannot run. The reason
|
|
46
|
+
* is OneUptime's own sentence for what was wrong with the last answer (one
|
|
47
|
+
* of the sentences in this file), said in the reader's language too.
|
|
48
|
+
*/
|
|
49
|
+
exports.CHECK_NOT_WRITTEN_REFUSAL = {
|
|
50
|
+
template: (0, Translator_1.translationKey)("OneUptime AI could not write a check OneUptime can run for that rule ({{reason}}) Say it another way, or write the check yourself."),
|
|
51
|
+
terms: ["reason"],
|
|
52
|
+
};
|
|
53
|
+
// Why a Custom SQL check's query is refused before it is sent (checkCustomSql).
|
|
54
|
+
exports.CustomSqlRefusal = {
|
|
55
|
+
noQuery: (0, Translator_1.translationKey)("Custom SQL needs a query."),
|
|
56
|
+
tooLong: (0, Translator_1.translationKey)("Custom SQL is too long."),
|
|
57
|
+
notSingleQuery: (0, Translator_1.translationKey)("Custom SQL must be a single query."),
|
|
58
|
+
notARead: (0, Translator_1.translationKey)("Custom SQL must start with SELECT or WITH."),
|
|
59
|
+
writes: (0, Translator_1.translationKey)("Custom SQL may only read."),
|
|
60
|
+
dataverseNoWith: (0, Translator_1.translationKey)("Dataverse's SQL has no WITH: write the query as one SELECT, with a subquery where it needs one."),
|
|
61
|
+
};
|
|
62
|
+
// Why a MongoDB custom check's pipeline is refused (checkMongoPipeline).
|
|
63
|
+
exports.MongoPipelineRefusal = {
|
|
64
|
+
noPipeline: (0, Translator_1.translationKey)("A custom check needs an aggregation pipeline."),
|
|
65
|
+
tooLong: (0, Translator_1.translationKey)("The aggregation pipeline is too long."),
|
|
66
|
+
notJson: (0, Translator_1.translationKey)('A MongoDB custom check is an aggregation pipeline as JSON: [{ "$match": ... }, { "$count": "value" }].'),
|
|
67
|
+
writes: (0, Translator_1.translationKey)("The aggregation pipeline may only read: no $out, $merge, $function, $accumulator or $where."),
|
|
68
|
+
};
|
|
69
|
+
// Why a reconciliation's checks and monitor were not set up (DataReconciliationSync).
|
|
70
|
+
exports.DataReconciliationRefusal = {
|
|
71
|
+
notFound: (0, Translator_1.translationKey)("Reconciliation not found."),
|
|
72
|
+
sourceNeedsTable: (0, Translator_1.translationKey)("The reconciliation's source needs a table."),
|
|
73
|
+
targetNeedsTable: (0, Translator_1.translationKey)("The reconciliation's target needs a table."),
|
|
74
|
+
missingStatuses: (0, Translator_1.translationKey)("This project is missing an operational or offline monitor status, or an incident or alert severity. Add them in Settings, then save the reconciliation again."),
|
|
75
|
+
};
|
|
76
|
+
// The refusals with a value in them, for the Dashboard to read back.
|
|
77
|
+
exports.DATA_CHECK_REFUSALS_WITH_VALUES = [exports.RULE_NOT_A_CHECK_REFUSAL, exports.CHECK_NOT_WRITTEN_REFUSAL];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import commonJsModule from "./DataCheckRefusals.js";
|
|
2
|
+
export const CHECK_NOT_WRITTEN_REFUSAL = commonJsModule.CHECK_NOT_WRITTEN_REFUSAL;
|
|
3
|
+
export const CustomSqlRefusal = commonJsModule.CustomSqlRefusal;
|
|
4
|
+
export const DATA_CHECK_REFUSALS_WITH_VALUES = commonJsModule.DATA_CHECK_REFUSALS_WITH_VALUES;
|
|
5
|
+
export const DataCheckFromSentenceRefusal = commonJsModule.DataCheckFromSentenceRefusal;
|
|
6
|
+
export const DataReconciliationRefusal = commonJsModule.DataReconciliationRefusal;
|
|
7
|
+
export const MongoPipelineRefusal = commonJsModule.MongoPipelineRefusal;
|
|
8
|
+
export const RULE_NOT_A_CHECK_REFUSAL = commonJsModule.RULE_NOT_A_CHECK_REFUSAL;
|
|
@@ -123,6 +123,7 @@ const NARROWED_BY_LABELS_AND_OWNERS = [
|
|
|
123
123
|
Permission_1.default.CreateIncidentMember,
|
|
124
124
|
Permission_1.default.CreateIncidentOwnerTeam,
|
|
125
125
|
Permission_1.default.CreateIncidentOwnerUser,
|
|
126
|
+
Permission_1.default.CreateIncidentPostmortemActionItem,
|
|
126
127
|
Permission_1.default.CreateIncidentPublicNote,
|
|
127
128
|
Permission_1.default.CreateIncidentSla,
|
|
128
129
|
Permission_1.default.CreateIncidentStateTimeline,
|
|
@@ -309,6 +310,7 @@ const NARROWED_BY_LABELS_AND_OWNERS = [
|
|
|
309
310
|
Permission_1.default.DeleteIncidentMember,
|
|
310
311
|
Permission_1.default.DeleteIncidentOwnerTeam,
|
|
311
312
|
Permission_1.default.DeleteIncidentOwnerUser,
|
|
313
|
+
Permission_1.default.DeleteIncidentPostmortemActionItem,
|
|
312
314
|
Permission_1.default.DeleteIncidentPublicNote,
|
|
313
315
|
Permission_1.default.DeleteIncidentSla,
|
|
314
316
|
Permission_1.default.DeleteIncidentStateTimeline,
|
|
@@ -482,6 +484,7 @@ const NARROWED_BY_LABELS_AND_OWNERS = [
|
|
|
482
484
|
Permission_1.default.EditIncidentMember,
|
|
483
485
|
Permission_1.default.EditIncidentOwnerTeam,
|
|
484
486
|
Permission_1.default.EditIncidentOwnerUser,
|
|
487
|
+
Permission_1.default.EditIncidentPostmortemActionItem,
|
|
485
488
|
Permission_1.default.EditIncidentPublicNote,
|
|
486
489
|
Permission_1.default.EditIncidentSla,
|
|
487
490
|
Permission_1.default.EditIncidentStateTimeline,
|
|
@@ -651,6 +654,7 @@ const NARROWED_BY_LABELS_AND_OWNERS = [
|
|
|
651
654
|
Permission_1.default.ReadIncidentInternalNote,
|
|
652
655
|
Permission_1.default.ReadIncidentMeasurementValue,
|
|
653
656
|
Permission_1.default.ReadIncidentMember,
|
|
657
|
+
Permission_1.default.ReadIncidentPostmortemActionItem,
|
|
654
658
|
Permission_1.default.ReadIncidentPublicNote,
|
|
655
659
|
Permission_1.default.ReadIncidentSla,
|
|
656
660
|
Permission_1.default.ReadIncidentStateTimeline,
|
package/Types/Date.d.mts
CHANGED
|
@@ -12,6 +12,11 @@ export interface ExactUnixNano {
|
|
|
12
12
|
export declare const DATE_TIME_SEPARATOR: string;
|
|
13
13
|
export declare const ARABIC_DATE_TIME_SEPARATOR: string;
|
|
14
14
|
export type CalendarUnit = "hour" | "day" | "week" | "month" | "year";
|
|
15
|
+
export interface FriendlyTimeOptions {
|
|
16
|
+
maxUnits?: number | undefined;
|
|
17
|
+
writesZero?: boolean | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const ZERO_FRIENDLY_TIME_TEXT: string;
|
|
15
20
|
export default class OneUptimeDate {
|
|
16
21
|
private static userTimezone;
|
|
17
22
|
private static padDatePart;
|
|
@@ -329,6 +334,7 @@ export default class OneUptimeDate {
|
|
|
329
334
|
static areOnTheSameWeek(date1: Date, date2: Date): boolean;
|
|
330
335
|
static addRemoveMinutes(date: Date, minutes: number): Date;
|
|
331
336
|
static addRemoveDays(date: Date, days: number, timezone?: string | undefined): Date;
|
|
337
|
+
static addRemoveDurationInDays(date: Date, days: number): Date;
|
|
332
338
|
static addRemoveHours(date: Date, hours: number): Date;
|
|
333
339
|
static addRemoveYears(date: Date, years: number, timezone?: string | undefined): Date;
|
|
334
340
|
static addRemoveMonths(date: Date, months: number, timezone?: string | undefined): Date;
|
|
@@ -351,7 +357,7 @@ export default class OneUptimeDate {
|
|
|
351
357
|
static getSomeDaysAfter(days: PositiveNumber | number): Date;
|
|
352
358
|
static secondsToFormattedTimeString(seconds: number): string;
|
|
353
359
|
static toUnixTimestamp(date: Date): number;
|
|
354
|
-
static secondsToFormattedFriendlyTimeString(seconds: number): string;
|
|
360
|
+
static secondsToFormattedFriendlyTimeString(seconds: number, options?: FriendlyTimeOptions | undefined): string;
|
|
355
361
|
private static getFriendlyTimeParts;
|
|
356
362
|
static getGreaterDate(a: Date, b: Date): Date;
|
|
357
363
|
static getLesserDate(a: Date, b: Date): Date;
|
|
@@ -366,6 +372,7 @@ export default class OneUptimeDate {
|
|
|
366
372
|
static getStartOfDay(date: Date, timezone?: string | undefined): Date;
|
|
367
373
|
static getEndOfDay(date: Date, timezone?: string | undefined): Date;
|
|
368
374
|
static getStartOfMinute(date: Date | string): Date;
|
|
375
|
+
static getEndOfMinute(date: Date | string): Date;
|
|
369
376
|
private static toMomentCalendarUnit;
|
|
370
377
|
private static inTimezone;
|
|
371
378
|
static getStartOfCalendarUnit(date: Date, unit: CalendarUnit, timezone?: string | undefined): Date;
|
package/Types/Date.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export interface ExactUnixNano {
|
|
|
12
12
|
export declare const DATE_TIME_SEPARATOR: string;
|
|
13
13
|
export declare const ARABIC_DATE_TIME_SEPARATOR: string;
|
|
14
14
|
export type CalendarUnit = "hour" | "day" | "week" | "month" | "year";
|
|
15
|
+
export interface FriendlyTimeOptions {
|
|
16
|
+
maxUnits?: number | undefined;
|
|
17
|
+
writesZero?: boolean | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const ZERO_FRIENDLY_TIME_TEXT: string;
|
|
15
20
|
export default class OneUptimeDate {
|
|
16
21
|
private static userTimezone;
|
|
17
22
|
private static padDatePart;
|
|
@@ -329,6 +334,7 @@ export default class OneUptimeDate {
|
|
|
329
334
|
static areOnTheSameWeek(date1: Date, date2: Date): boolean;
|
|
330
335
|
static addRemoveMinutes(date: Date, minutes: number): Date;
|
|
331
336
|
static addRemoveDays(date: Date, days: number, timezone?: string | undefined): Date;
|
|
337
|
+
static addRemoveDurationInDays(date: Date, days: number): Date;
|
|
332
338
|
static addRemoveHours(date: Date, hours: number): Date;
|
|
333
339
|
static addRemoveYears(date: Date, years: number, timezone?: string | undefined): Date;
|
|
334
340
|
static addRemoveMonths(date: Date, months: number, timezone?: string | undefined): Date;
|
|
@@ -351,7 +357,7 @@ export default class OneUptimeDate {
|
|
|
351
357
|
static getSomeDaysAfter(days: PositiveNumber | number): Date;
|
|
352
358
|
static secondsToFormattedTimeString(seconds: number): string;
|
|
353
359
|
static toUnixTimestamp(date: Date): number;
|
|
354
|
-
static secondsToFormattedFriendlyTimeString(seconds: number): string;
|
|
360
|
+
static secondsToFormattedFriendlyTimeString(seconds: number, options?: FriendlyTimeOptions | undefined): string;
|
|
355
361
|
private static getFriendlyTimeParts;
|
|
356
362
|
static getGreaterDate(a: Date, b: Date): Date;
|
|
357
363
|
static getLesserDate(a: Date, b: Date): Date;
|
|
@@ -366,6 +372,7 @@ export default class OneUptimeDate {
|
|
|
366
372
|
static getStartOfDay(date: Date, timezone?: string | undefined): Date;
|
|
367
373
|
static getEndOfDay(date: Date, timezone?: string | undefined): Date;
|
|
368
374
|
static getStartOfMinute(date: Date | string): Date;
|
|
375
|
+
static getEndOfMinute(date: Date | string): Date;
|
|
369
376
|
private static toMomentCalendarUnit;
|
|
370
377
|
private static inTimezone;
|
|
371
378
|
static getStartOfCalendarUnit(date: Date, unit: CalendarUnit, timezone?: string | undefined): Date;
|
package/Types/Date.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ARABIC_DATE_TIME_SEPARATOR = exports.DATE_TIME_SEPARATOR = exports.Moment = void 0;
|
|
39
|
+
exports.ZERO_FRIENDLY_TIME_TEXT = exports.ARABIC_DATE_TIME_SEPARATOR = exports.DATE_TIME_SEPARATOR = exports.Moment = void 0;
|
|
40
40
|
const InBetween_1 = __importDefault(require("./BaseDatabase/InBetween"));
|
|
41
41
|
const DayOfWeek_1 = __importStar(require("./Day/DayOfWeek"));
|
|
42
42
|
const BadDataException_1 = __importDefault(require("./Exception/BadDataException"));
|
|
@@ -51,8 +51,11 @@ exports.Moment = moment_timezone_1.default;
|
|
|
51
51
|
/*
|
|
52
52
|
* The custom shapes (getDateAsCustomFormattedStringInTimezone) a date's words
|
|
53
53
|
* are written in the reader's language for, as Intl asks for them. A shape
|
|
54
|
-
* with no words in it
|
|
55
|
-
*
|
|
54
|
+
* with no words in it still takes the reader's digits: "HH:mm" here
|
|
55
|
+
* ("۲۲:۲۷" on a Persian page), and READER_DIGIT_CUSTOM_DATE_FORMATS, whose
|
|
56
|
+
* shapes keep moment's marks. A shape in neither list is moment's, in
|
|
57
|
+
* English and in Latin digits ("YYYY-MM-DD", which callers compare rather
|
|
58
|
+
* than show), so a shape a page shows belongs in one of them.
|
|
56
59
|
*
|
|
57
60
|
* English's "hh" keeps a 12-hour time's zero ("05:01 PM"), as moment writes
|
|
58
61
|
* it; no other language writes one there ("오후 5:01", "5:01 م"), so the
|
|
@@ -72,6 +75,19 @@ const LOCALIZED_CUSTOM_DATE_FORMATS = {
|
|
|
72
75
|
// A 24-hour time of day, in the reader's digits: "۲۲:۲۷" on a Persian page.
|
|
73
76
|
"HH:mm": { hour: "2-digit", minute: "2-digit", hourCycle: "h23" },
|
|
74
77
|
};
|
|
78
|
+
/*
|
|
79
|
+
* The custom shapes with no words in them that are written as moment writes
|
|
80
|
+
* them, in the reader's digits (inReaderDigits) - the digits "HH:mm" takes:
|
|
81
|
+
* Persian's own, and the Latin ones of every other language of the
|
|
82
|
+
* product, Arabic too. Only the digits change, so the shape is the same in
|
|
83
|
+
* every language; Intl would put a comma before the milliseconds in German
|
|
84
|
+
* ("11:55:59,120") and dots between the hours, minutes and seconds in
|
|
85
|
+
* Danish ("11.55.59,120").
|
|
86
|
+
*/
|
|
87
|
+
const READER_DIGIT_CUSTOM_DATE_FORMATS = [
|
|
88
|
+
// An exception breadcrumb's Clock time: "۱۱:۵۵:۵۹.۱۲۰" on a Persian page.
|
|
89
|
+
"HH:mm:ss.SSS",
|
|
90
|
+
];
|
|
75
91
|
// A whole number of nanoseconds, as fromUnixNano reads one exactly.
|
|
76
92
|
const UNIX_NANO_INTEGER_PATTERN = /^[+-]?\d+$/;
|
|
77
93
|
/*
|
|
@@ -128,6 +144,8 @@ const CLICKHOUSE_DATE_TIME_MEMO_SLOTS = 256;
|
|
|
128
144
|
// NaN never equals a second, so an empty slot is never read.
|
|
129
145
|
const clickhouseDateTimeMemoSeconds = new Float64Array(CLICKHOUSE_DATE_TIME_MEMO_SLOTS).fill(Number.NaN);
|
|
130
146
|
const clickhouseDateTimeMemoTexts = new Array(CLICKHOUSE_DATE_TIME_MEMO_SLOTS).fill("");
|
|
147
|
+
// What a duration of nothing reads in English, with writesZero.
|
|
148
|
+
exports.ZERO_FRIENDLY_TIME_TEXT = "0 secs";
|
|
131
149
|
class OneUptimeDate {
|
|
132
150
|
static padDatePart(value) {
|
|
133
151
|
return value.toString().padStart(2, "0");
|
|
@@ -818,7 +836,9 @@ class OneUptimeDate {
|
|
|
818
836
|
};
|
|
819
837
|
const options = LOCALIZED_CUSTOM_DATE_FORMATS[data.format];
|
|
820
838
|
if (!options) {
|
|
821
|
-
return
|
|
839
|
+
return READER_DIGIT_CUSTOM_DATE_FORMATS.includes(data.format)
|
|
840
|
+
? this.inReaderDigits(english)
|
|
841
|
+
: english();
|
|
822
842
|
}
|
|
823
843
|
return (0, DateLanguage_1.writeInDateDisplayLanguage)(english, (_language, locale) => {
|
|
824
844
|
const format = (0, DateLanguage_1.getDateTimeFormat)({
|
|
@@ -1395,6 +1415,18 @@ class OneUptimeDate {
|
|
|
1395
1415
|
}
|
|
1396
1416
|
return (0, moment_timezone_1.default)(date).add(days, "days").toDate();
|
|
1397
1417
|
}
|
|
1418
|
+
/*
|
|
1419
|
+
* `days` days as a length of time: days x 24 hours, the same in every
|
|
1420
|
+
* zone. For a range such as "the last 7 days" of a read, which is a span
|
|
1421
|
+
* of time rather than calendar days somewhere. addRemoveDays without a
|
|
1422
|
+
* zone steps the server's calendar, so on a server outside UTC a week
|
|
1423
|
+
* that crosses a clock change comes out an hour short or long (issue
|
|
1424
|
+
* #7623).
|
|
1425
|
+
*/
|
|
1426
|
+
static addRemoveDurationInDays(date, days) {
|
|
1427
|
+
date = this.fromString(date);
|
|
1428
|
+
return new Date(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
1429
|
+
}
|
|
1398
1430
|
static addRemoveHours(date, hours) {
|
|
1399
1431
|
date = this.fromString(date);
|
|
1400
1432
|
return (0, moment_timezone_1.default)(date).add(hours, "hours").toDate();
|
|
@@ -1526,10 +1558,22 @@ class OneUptimeDate {
|
|
|
1526
1558
|
/*
|
|
1527
1559
|
* "1 year 2 months 3 days 4 hours 5 mins 6 secs", each unit that is not
|
|
1528
1560
|
* zero, counted on the calendar from the epoch - and in the reader's
|
|
1529
|
-
* language when a frontend set one ("1 J. 2 Mon. 3 Tg.").
|
|
1561
|
+
* language when a frontend set one ("1 J. 2 Mon. 3 Tg."). `options` keeps
|
|
1562
|
+
* only the largest units, and writes a duration of nothing.
|
|
1530
1563
|
*/
|
|
1531
|
-
static secondsToFormattedFriendlyTimeString(seconds) {
|
|
1532
|
-
const
|
|
1564
|
+
static secondsToFormattedFriendlyTimeString(seconds, options) {
|
|
1565
|
+
const maxUnits = options === null || options === void 0 ? void 0 : options.maxUnits;
|
|
1566
|
+
const allParts = this.getFriendlyTimeParts(seconds);
|
|
1567
|
+
const parts = maxUnits !== undefined && maxUnits >= 1
|
|
1568
|
+
? allParts.slice(0, Math.floor(maxUnits))
|
|
1569
|
+
: allParts;
|
|
1570
|
+
if (parts.length === 0 && (options === null || options === void 0 ? void 0 : options.writesZero)) {
|
|
1571
|
+
return (0, DateLanguage_1.writeInDateDisplayLanguage)(() => {
|
|
1572
|
+
return exports.ZERO_FRIENDLY_TIME_TEXT;
|
|
1573
|
+
}, (_language, locale) => {
|
|
1574
|
+
return this.formatLocalizedDuration([{ count: 0, unit: "second" }], locale, "short", "narrow");
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1533
1577
|
return (0, DateLanguage_1.writeInDateDisplayLanguage)(() => {
|
|
1534
1578
|
return parts
|
|
1535
1579
|
.map((part) => {
|
|
@@ -1650,6 +1694,16 @@ class OneUptimeDate {
|
|
|
1650
1694
|
return new Date(Math.floor(instant.getTime() / millisecondsInAMinute) *
|
|
1651
1695
|
millisecondsInAMinute);
|
|
1652
1696
|
}
|
|
1697
|
+
/*
|
|
1698
|
+
* The last millisecond of the minute `date` falls in: 11:15:59.999 for
|
|
1699
|
+
* anything from 11:15:00.000 on, as getEndOfDay is a day's 23:59:59.999.
|
|
1700
|
+
* With getStartOfMinute, the whole minute a field shows (11:15), so a
|
|
1701
|
+
* filter on "11:15" holds a row stamped 11:15:42 (#7719).
|
|
1702
|
+
*/
|
|
1703
|
+
static getEndOfMinute(date) {
|
|
1704
|
+
const millisecondsInAMinute = 60 * 1000;
|
|
1705
|
+
return new Date(this.getStartOfMinute(date).getTime() + millisecondsInAMinute - 1);
|
|
1706
|
+
}
|
|
1653
1707
|
/*
|
|
1654
1708
|
* Calendar arithmetic - "the previous calendar month", "add 3 calendar
|
|
1655
1709
|
* months" - as opposed to the fixed-length arithmetic the rest of this class
|
package/Types/Date.mjs
CHANGED
|
@@ -3,3 +3,4 @@ export default commonJsModule.default;
|
|
|
3
3
|
export const ARABIC_DATE_TIME_SEPARATOR = commonJsModule.ARABIC_DATE_TIME_SEPARATOR;
|
|
4
4
|
export const DATE_TIME_SEPARATOR = commonJsModule.DATE_TIME_SEPARATOR;
|
|
5
5
|
export const Moment = commonJsModule.Moment;
|
|
6
|
+
export const ZERO_FRIENDLY_TIME_TEXT = commonJsModule.ZERO_FRIENDLY_TIME_TEXT;
|
package/Types/DateLanguage.d.mts
CHANGED
|
@@ -46,6 +46,7 @@ export declare const formatDateText: (data: {
|
|
|
46
46
|
shape: DateTextShape;
|
|
47
47
|
}) => string | null;
|
|
48
48
|
export type RelativeDateUnit = "second" | "minute" | "hour" | "day" | "month" | "year";
|
|
49
|
+
export type RelativeDateStyle = "long" | "short" | "narrow";
|
|
49
50
|
export interface RelativeDistance {
|
|
50
51
|
isNow: boolean;
|
|
51
52
|
count: number;
|
|
@@ -63,6 +64,7 @@ export declare const formatRelativeAmount: (data: {
|
|
|
63
64
|
unit: RelativeDateUnit;
|
|
64
65
|
isFuture: boolean;
|
|
65
66
|
locale: string;
|
|
67
|
+
style?: RelativeDateStyle | undefined;
|
|
66
68
|
}) => string | null;
|
|
67
69
|
export type DurationTextUnit = "year" | "month" | "week" | "day" | "hour" | "minute" | "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
68
70
|
export interface DurationTextPart {
|
package/Types/DateLanguage.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare const formatDateText: (data: {
|
|
|
46
46
|
shape: DateTextShape;
|
|
47
47
|
}) => string | null;
|
|
48
48
|
export type RelativeDateUnit = "second" | "minute" | "hour" | "day" | "month" | "year";
|
|
49
|
+
export type RelativeDateStyle = "long" | "short" | "narrow";
|
|
49
50
|
export interface RelativeDistance {
|
|
50
51
|
isNow: boolean;
|
|
51
52
|
count: number;
|
|
@@ -63,6 +64,7 @@ export declare const formatRelativeAmount: (data: {
|
|
|
63
64
|
unit: RelativeDateUnit;
|
|
64
65
|
isFuture: boolean;
|
|
65
66
|
locale: string;
|
|
67
|
+
style?: RelativeDateStyle | undefined;
|
|
66
68
|
}) => string | null;
|
|
67
69
|
export type DurationTextUnit = "year" | "month" | "week" | "day" | "hour" | "minute" | "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
68
70
|
export interface DurationTextPart {
|
package/Types/DateLanguage.js
CHANGED
|
@@ -474,8 +474,8 @@ const formatDateText = (data) => {
|
|
|
474
474
|
};
|
|
475
475
|
exports.formatDateText = formatDateText;
|
|
476
476
|
const relativeTimeFormatCache = new Map();
|
|
477
|
-
const getRelativeTimeFormatter = (locale, numeric) => {
|
|
478
|
-
const key = `${locale}|${numeric}`;
|
|
477
|
+
const getRelativeTimeFormatter = (locale, numeric, style = "long") => {
|
|
478
|
+
const key = `${locale}|${numeric}|${style}`;
|
|
479
479
|
if (relativeTimeFormatCache.has(key)) {
|
|
480
480
|
return relativeTimeFormatCache.get(key) || null;
|
|
481
481
|
}
|
|
@@ -485,7 +485,7 @@ const getRelativeTimeFormatter = (locale, numeric) => {
|
|
|
485
485
|
if (RelativeTimeFormat) {
|
|
486
486
|
formatter = new RelativeTimeFormat((0, exports.getNumberLocale)(locale) || locale, {
|
|
487
487
|
numeric: numeric,
|
|
488
|
-
style:
|
|
488
|
+
style: style,
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
}
|
|
@@ -574,10 +574,13 @@ exports.formatRelativeDate = formatRelativeDate;
|
|
|
574
574
|
* "in 2 Stunden", "قبل 3 أيام" - `count` `unit`s ahead of now, or behind it
|
|
575
575
|
* when `isFuture` is false, in `locale`: for a caller that counts its own
|
|
576
576
|
* units (a maintenance window's "in 2 hours", its minutes floored). Null
|
|
577
|
-
* when this engine has no Intl.RelativeTimeFormat.
|
|
577
|
+
* when this engine has no Intl.RelativeTimeFormat. `style` "short" writes
|
|
578
|
+
* the unit as its language shortens it, for a narrow column: "vor 5 Min.",
|
|
579
|
+
* "il y a 5 min"; "long" when left out. A count of 0 behind now is the
|
|
580
|
+
* past: "vor 0 Sek.", never "in 0 Sek.".
|
|
578
581
|
*/
|
|
579
582
|
const formatRelativeAmount = (data) => {
|
|
580
|
-
const always = getRelativeTimeFormatter(data.locale, "always");
|
|
583
|
+
const always = getRelativeTimeFormatter(data.locale, "always", data.style || "long");
|
|
581
584
|
if (!always) {
|
|
582
585
|
return null;
|
|
583
586
|
}
|
|
@@ -4,6 +4,7 @@ declare enum EmailTemplateType {
|
|
|
4
4
|
MagicLink = "MagicLink.hbs",
|
|
5
5
|
ProbeOffline = "ProbeOffline.hbs",
|
|
6
6
|
SignupWelcomeEmail = "SignupWelcomeEmail.hbs",
|
|
7
|
+
SignupAccountReadyEmail = "SignupAccountReadyEmail.hbs",
|
|
7
8
|
CompleteRegistration = "CompleteRegistration.hbs",
|
|
8
9
|
ConfirmProjectSsoSignIn = "ConfirmProjectSsoSignIn.hbs",
|
|
9
10
|
ProbeConnectionStatusChange = "ProbeConnectionStatusChange.hbs",
|
|
@@ -4,6 +4,7 @@ declare enum EmailTemplateType {
|
|
|
4
4
|
MagicLink = "MagicLink.hbs",
|
|
5
5
|
ProbeOffline = "ProbeOffline.hbs",
|
|
6
6
|
SignupWelcomeEmail = "SignupWelcomeEmail.hbs",
|
|
7
|
+
SignupAccountReadyEmail = "SignupAccountReadyEmail.hbs",
|
|
7
8
|
CompleteRegistration = "CompleteRegistration.hbs",
|
|
8
9
|
ConfirmProjectSsoSignIn = "ConfirmProjectSsoSignIn.hbs",
|
|
9
10
|
ProbeConnectionStatusChange = "ProbeConnectionStatusChange.hbs",
|
|
@@ -8,6 +8,8 @@ var EmailTemplateType;
|
|
|
8
8
|
EmailTemplateType["MagicLink"] = "MagicLink.hbs";
|
|
9
9
|
EmailTemplateType["ProbeOffline"] = "ProbeOffline.hbs";
|
|
10
10
|
EmailTemplateType["SignupWelcomeEmail"] = "SignupWelcomeEmail.hbs";
|
|
11
|
+
// The welcome of an account that is ready at sign-up (self-hosted): nothing to verify.
|
|
12
|
+
EmailTemplateType["SignupAccountReadyEmail"] = "SignupAccountReadyEmail.hbs";
|
|
11
13
|
EmailTemplateType["CompleteRegistration"] = "CompleteRegistration.hbs";
|
|
12
14
|
EmailTemplateType["ConfirmProjectSsoSignIn"] = "ConfirmProjectSsoSignIn.hbs";
|
|
13
15
|
EmailTemplateType["ProbeConnectionStatusChange"] = "ProbeConnectionStatusChange.hbs";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import GlobalConfig, { EmailServerType } from "../../Models/DatabaseModels/GlobalConfig.mjs";
|
|
2
|
+
import AmazonSesAuthenticationType from "./AmazonSesAuthenticationType.mjs";
|
|
3
|
+
import MailgunRegion from "./MailgunRegion.mjs";
|
|
4
|
+
import MailTransportType from "./MailTransportType.mjs";
|
|
5
|
+
import OAuthProviderType from "./OAuthProviderType.mjs";
|
|
6
|
+
import SMTPAuthenticationType from "./SMTPAuthenticationType.mjs";
|
|
7
|
+
export declare enum ServerEmailEnvironmentVariable {
|
|
8
|
+
ServerType = "GLOBAL_EMAIL_SERVER_TYPE",
|
|
9
|
+
FromEmail = "GLOBAL_EMAIL_FROM_EMAIL",
|
|
10
|
+
FromName = "GLOBAL_EMAIL_FROM_NAME",
|
|
11
|
+
SmtpTransport = "GLOBAL_EMAIL_SMTP_TRANSPORT",
|
|
12
|
+
SmtpHost = "GLOBAL_EMAIL_SMTP_HOST",
|
|
13
|
+
SmtpPort = "GLOBAL_EMAIL_SMTP_PORT",
|
|
14
|
+
SmtpRequireTls = "GLOBAL_EMAIL_SMTP_REQUIRE_TLS",
|
|
15
|
+
SmtpAuthType = "GLOBAL_EMAIL_SMTP_AUTH_TYPE",
|
|
16
|
+
SmtpUsername = "GLOBAL_EMAIL_SMTP_USERNAME",
|
|
17
|
+
SmtpPassword = "GLOBAL_EMAIL_SMTP_PASSWORD",
|
|
18
|
+
SmtpOAuthProviderType = "GLOBAL_EMAIL_SMTP_OAUTH_PROVIDER_TYPE",
|
|
19
|
+
SmtpOAuthClientId = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_ID",
|
|
20
|
+
SmtpOAuthClientSecret = "GLOBAL_EMAIL_SMTP_OAUTH_CLIENT_SECRET",
|
|
21
|
+
SmtpOAuthTokenUrl = "GLOBAL_EMAIL_SMTP_OAUTH_TOKEN_URL",
|
|
22
|
+
SmtpOAuthScope = "GLOBAL_EMAIL_SMTP_OAUTH_SCOPE",
|
|
23
|
+
SendgridApiKey = "GLOBAL_EMAIL_SENDGRID_API_KEY",
|
|
24
|
+
AmazonSesAuthenticationType = "GLOBAL_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE",
|
|
25
|
+
AmazonSesAccessKeyId = "GLOBAL_EMAIL_AMAZON_SES_ACCESS_KEY_ID",
|
|
26
|
+
AmazonSesSecretAccessKey = "GLOBAL_EMAIL_AMAZON_SES_SECRET_ACCESS_KEY",
|
|
27
|
+
AmazonSesRegion = "GLOBAL_EMAIL_AMAZON_SES_REGION",
|
|
28
|
+
MailgunApiKey = "GLOBAL_EMAIL_MAILGUN_API_KEY",
|
|
29
|
+
MailgunDomain = "GLOBAL_EMAIL_MAILGUN_DOMAIN",
|
|
30
|
+
MailgunRegion = "GLOBAL_EMAIL_MAILGUN_REGION",
|
|
31
|
+
PostmarkServerToken = "GLOBAL_EMAIL_POSTMARK_SERVER_TOKEN",
|
|
32
|
+
ResendApiKey = "GLOBAL_EMAIL_RESEND_API_KEY"
|
|
33
|
+
}
|
|
34
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
35
|
+
export declare const SERVER_EMAIL_SECRET_VARIABLES: ReadonlyArray<ServerEmailEnvironmentVariable>;
|
|
36
|
+
export declare const SERVER_EMAIL_SERVER_TYPE_VALUES: Readonly<Record<EmailServerType, string>>;
|
|
37
|
+
export type ServerEmailSmtpTransport = MailTransportType.SMTP | MailTransportType.MicrosoftGraph;
|
|
38
|
+
export declare const SERVER_EMAIL_SMTP_TRANSPORT_VALUES: Readonly<Record<ServerEmailSmtpTransport, string>>;
|
|
39
|
+
export declare const SERVER_EMAIL_SMTP_AUTH_TYPE_VALUES: Readonly<Record<SMTPAuthenticationType, string>>;
|
|
40
|
+
export declare const SERVER_EMAIL_SMTP_OAUTH_PROVIDER_TYPE_VALUES: Readonly<Record<OAuthProviderType, string>>;
|
|
41
|
+
export declare const SERVER_EMAIL_AMAZON_SES_AUTHENTICATION_TYPE_VALUES: Readonly<Record<AmazonSesAuthenticationType, string>>;
|
|
42
|
+
export declare const SERVER_EMAIL_MAILGUN_REGION_VALUES: Readonly<Record<MailgunRegion, string>>;
|
|
43
|
+
export declare const SERVER_EMAIL_ENVIRONMENT_ROUTE: string;
|
|
44
|
+
export declare const SERVER_EMAIL_SET_BY_ENVIRONMENT_MESSAGE: string;
|
|
45
|
+
export type ServerEmailColumn = "emailServerType" | "isSMTPSecure" | "smtpTransportType" | "smtpAuthType" | "smtpHost" | "smtpPort" | "smtpUsername" | "smtpPassword" | "smtpFromEmail" | "smtpFromName" | "smtpClientId" | "smtpClientSecret" | "smtpTokenUrl" | "smtpScope" | "smtpOAuthProviderType" | "sendgridApiKey" | "sendgridFromEmail" | "sendgridFromName" | "amazonSesAuthenticationType" | "amazonSesAccessKeyId" | "amazonSesSecretAccessKey" | "amazonSesRegion" | "amazonSesFromEmail" | "amazonSesFromName" | "mailgunApiKey" | "mailgunDomain" | "mailgunRegion" | "mailgunFromEmail" | "mailgunFromName" | "postmarkServerToken" | "postmarkFromEmail" | "postmarkFromName" | "resendApiKey" | "resendFromEmail" | "resendFromName";
|
|
46
|
+
export declare const SERVER_EMAIL_COLUMNS: ReadonlyArray<ServerEmailColumn>;
|
|
47
|
+
export type ServerEmailSettings = Partial<Pick<GlobalConfig, ServerEmailColumn>>;
|
|
48
|
+
export interface ServerEmailEnvironmentReading {
|
|
49
|
+
isSet: boolean;
|
|
50
|
+
serverType: EmailServerType | null;
|
|
51
|
+
settings: ServerEmailSettings | null;
|
|
52
|
+
problems: Array<string>;
|
|
53
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
54
|
+
values: Readonly<Partial<Record<ServerEmailEnvironmentVariable, string>>>;
|
|
55
|
+
}
|
|
56
|
+
export interface ServerEmailEnvironmentField {
|
|
57
|
+
variable: ServerEmailEnvironmentVariable;
|
|
58
|
+
value: string | null;
|
|
59
|
+
isSecret: boolean;
|
|
60
|
+
isSet: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface ServerEmailEnvironmentAnswer {
|
|
63
|
+
isSetByEnvironment: boolean;
|
|
64
|
+
serverType: EmailServerType | null;
|
|
65
|
+
fields: Array<ServerEmailEnvironmentField>;
|
|
66
|
+
problems: Array<string>;
|
|
67
|
+
ignored: Array<ServerEmailEnvironmentVariable>;
|
|
68
|
+
}
|
|
69
|
+
export type ServerEmailEnvironmentValues = Readonly<Record<string, string | undefined>>;
|
|
70
|
+
export default class ServerEmailEnvironment {
|
|
71
|
+
static readChoice<T extends string>(value: string | undefined, values: Readonly<Record<T, string>>, defaultChoice: T | null, aliases?: Readonly<Record<string, T>>): T | null;
|
|
72
|
+
static readServerType(value: string | undefined): EmailServerType | null;
|
|
73
|
+
static isSecret(variable: ServerEmailEnvironmentVariable): boolean;
|
|
74
|
+
static isBareHost(value: string): boolean;
|
|
75
|
+
static isTokenUrl(value: string): boolean;
|
|
76
|
+
static read(environment: ServerEmailEnvironmentValues): ServerEmailEnvironmentReading;
|
|
77
|
+
private static variableOrderOf;
|
|
78
|
+
static isUsable(reading: ServerEmailEnvironmentReading): boolean;
|
|
79
|
+
static getReadVariables(reading: ServerEmailEnvironmentReading): Array<ServerEmailEnvironmentVariable>;
|
|
80
|
+
static toAnswer(reading: ServerEmailEnvironmentReading): ServerEmailEnvironmentAnswer;
|
|
81
|
+
static answerFromJSON(json: unknown): ServerEmailEnvironmentAnswer;
|
|
82
|
+
static getStartupNotice(reading: ServerEmailEnvironmentReading): string | null;
|
|
83
|
+
static getIgnoredMessage(reading: ServerEmailEnvironmentReading): string | null;
|
|
84
|
+
static getStartupWarning(reading: ServerEmailEnvironmentReading): string | null;
|
|
85
|
+
}
|