@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
|
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
|
|
|
27
27
|
private _hasMore;
|
|
28
28
|
get hasMore(): boolean | undefined;
|
|
29
29
|
set hasMore(v: boolean | undefined);
|
|
30
|
+
private _isCountCapped;
|
|
31
|
+
get isCountCapped(): boolean | undefined;
|
|
32
|
+
set isCountCapped(v: boolean | undefined);
|
|
30
33
|
constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
|
|
31
34
|
isSuccess(): boolean;
|
|
32
35
|
isFailure(): boolean;
|
|
@@ -54,6 +54,12 @@ class HTTPResponse {
|
|
|
54
54
|
set hasMore(v) {
|
|
55
55
|
this._hasMore = v;
|
|
56
56
|
}
|
|
57
|
+
get isCountCapped() {
|
|
58
|
+
return this._isCountCapped;
|
|
59
|
+
}
|
|
60
|
+
set isCountCapped(v) {
|
|
61
|
+
this._isCountCapped = v;
|
|
62
|
+
}
|
|
57
63
|
constructor(statusCode, data, headers) {
|
|
58
64
|
this._statusCode = -1;
|
|
59
65
|
this._headers = {};
|
|
@@ -66,6 +72,12 @@ class HTTPResponse {
|
|
|
66
72
|
* is only a lower bound — UI should drive next/prev from `hasMore`.
|
|
67
73
|
*/
|
|
68
74
|
this._hasMore = undefined;
|
|
75
|
+
/*
|
|
76
|
+
* Optional. True when a list read asked for its count up to a cap
|
|
77
|
+
* (countUpTo) and more records match: `count` is the cap, a lower bound,
|
|
78
|
+
* and records follow this page. Undefined when the count is exact.
|
|
79
|
+
*/
|
|
80
|
+
this._isCountCapped = undefined;
|
|
69
81
|
this.statusCode = statusCode;
|
|
70
82
|
if (!Array.isArray(data) &&
|
|
71
83
|
Object.keys(data).includes("count") &&
|
|
@@ -78,6 +90,9 @@ class HTTPResponse {
|
|
|
78
90
|
if (Object.keys(data).includes("hasMore")) {
|
|
79
91
|
this.hasMore = data["hasMore"];
|
|
80
92
|
}
|
|
93
|
+
if (data["isCountCapped"] === true) {
|
|
94
|
+
this.isCountCapped = true;
|
|
95
|
+
}
|
|
81
96
|
this.jsonData = JSONFunctions_1.default.deserializeArray(data["data"]);
|
|
82
97
|
}
|
|
83
98
|
else if (Array.isArray(data)) {
|
|
@@ -5,20 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getAuditLogActionLabel = exports.AUDIT_LOG_ACTION_LABELS = void 0;
|
|
7
7
|
const AuditLogAction_1 = __importDefault(require("./AuditLogAction"));
|
|
8
|
+
/*
|
|
9
|
+
* Marks an English text as a key of the Dashboard's locales - the same
|
|
10
|
+
* marker as Common/UI/Utils/TranslateTemplate's translationKey, kept here
|
|
11
|
+
* so this file stays free of the UI. It returns the text unchanged.
|
|
12
|
+
*/
|
|
13
|
+
const translationKey = (text) => {
|
|
14
|
+
return text;
|
|
15
|
+
};
|
|
8
16
|
/*
|
|
9
17
|
* How each action reads where people read the audit log: its table, its
|
|
10
18
|
* filter and an entry's details. An entry, the API and an export carry the
|
|
11
|
-
* action itself ("SignIn"); these are its words ("Sign In")
|
|
19
|
+
* action itself ("SignIn"); these are its words ("Sign In"), keys of the
|
|
20
|
+
* Dashboard's locales (its extractor reads this file as a "keys" root),
|
|
21
|
+
* looked up in the reader's language wherever they are drawn.
|
|
12
22
|
*/
|
|
13
23
|
exports.AUDIT_LOG_ACTION_LABELS = {
|
|
14
|
-
[AuditLogAction_1.default.Create]: "Create",
|
|
15
|
-
[AuditLogAction_1.default.Update]: "Update",
|
|
16
|
-
[AuditLogAction_1.default.Delete]: "Delete",
|
|
17
|
-
[AuditLogAction_1.default.Download]: "Download",
|
|
18
|
-
[AuditLogAction_1.default.SignIn]: "Sign In",
|
|
19
|
-
[AuditLogAction_1.default.SignOut]: "Sign Out",
|
|
20
|
-
[AuditLogAction_1.default.SessionTimeout]: "Session Timeout",
|
|
21
|
-
[AuditLogAction_1.default.SessionRevoked]: "Session Revoked",
|
|
24
|
+
[AuditLogAction_1.default.Create]: translationKey("Create"),
|
|
25
|
+
[AuditLogAction_1.default.Update]: translationKey("Update"),
|
|
26
|
+
[AuditLogAction_1.default.Delete]: translationKey("Delete"),
|
|
27
|
+
[AuditLogAction_1.default.Download]: translationKey("Download"),
|
|
28
|
+
[AuditLogAction_1.default.SignIn]: translationKey("Sign In"),
|
|
29
|
+
[AuditLogAction_1.default.SignOut]: translationKey("Sign Out"),
|
|
30
|
+
[AuditLogAction_1.default.SessionTimeout]: translationKey("Session Timeout"),
|
|
31
|
+
[AuditLogAction_1.default.SessionRevoked]: translationKey("Session Revoked"),
|
|
22
32
|
};
|
|
23
33
|
// The words of an action, or the action as it is when it is not one this release knows.
|
|
24
34
|
const getAuditLogActionLabel = (action) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GroupBy from "../../Server/Types/Database/GroupBy.mjs";
|
|
2
2
|
import GenericObject from "../GenericObject.mjs";
|
|
3
|
+
import Timezone from "../Timezone.mjs";
|
|
3
4
|
import AggregationInterval from "./AggregationInterval.mjs";
|
|
4
5
|
import AggregationType from "./AggregationType.mjs";
|
|
5
6
|
import Query from "./Query.mjs";
|
|
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
|
|
|
18
19
|
* rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
|
|
19
20
|
*/
|
|
20
21
|
aggregationInterval?: AggregationInterval | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The time zone whose calendar the Day, Week, Month and Year buckets
|
|
24
|
+
* follow: a day bucket runs from midnight to midnight there, a week from
|
|
25
|
+
* Monday, a month from its 1st and a year from 1 January, and each
|
|
26
|
+
* bucket's timestamp is that start. The dashboard sends the reader's zone
|
|
27
|
+
* (the one User Settings picked) whenever the bucket is a day or longer,
|
|
28
|
+
* so a chart that draws its days on the reader's calendar gets each day's
|
|
29
|
+
* total under its own day (issue #7277). Omitted, those buckets follow
|
|
30
|
+
* UTC, as they always have. An hour and shorter, and Total, are the same
|
|
31
|
+
* in every zone and ignore it. Only a name in the Timezone list is
|
|
32
|
+
* accepted; anything else is refused with a 400 in
|
|
33
|
+
* AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
|
|
34
|
+
* a bound parameter, never as text.
|
|
35
|
+
*/
|
|
36
|
+
timezone?: Timezone | undefined;
|
|
21
37
|
aggregationTimestampColumnName: keyof TBaseModel;
|
|
22
38
|
startTimestamp: Date;
|
|
23
39
|
endTimestamp: Date;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import GroupBy from "../../Server/Types/Database/GroupBy";
|
|
2
2
|
import GenericObject from "../GenericObject";
|
|
3
|
+
import Timezone from "../Timezone";
|
|
3
4
|
import AggregationInterval from "./AggregationInterval";
|
|
4
5
|
import AggregationType from "./AggregationType";
|
|
5
6
|
import Query from "./Query";
|
|
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
|
|
|
18
19
|
* rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
|
|
19
20
|
*/
|
|
20
21
|
aggregationInterval?: AggregationInterval | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The time zone whose calendar the Day, Week, Month and Year buckets
|
|
24
|
+
* follow: a day bucket runs from midnight to midnight there, a week from
|
|
25
|
+
* Monday, a month from its 1st and a year from 1 January, and each
|
|
26
|
+
* bucket's timestamp is that start. The dashboard sends the reader's zone
|
|
27
|
+
* (the one User Settings picked) whenever the bucket is a day or longer,
|
|
28
|
+
* so a chart that draws its days on the reader's calendar gets each day's
|
|
29
|
+
* total under its own day (issue #7277). Omitted, those buckets follow
|
|
30
|
+
* UTC, as they always have. An hour and shorter, and Total, are the same
|
|
31
|
+
* in every zone and ignore it. Only a name in the Timezone list is
|
|
32
|
+
* accepted; anything else is refused with a 400 in
|
|
33
|
+
* AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
|
|
34
|
+
* a bound parameter, never as text.
|
|
35
|
+
*/
|
|
36
|
+
timezone?: Timezone | undefined;
|
|
21
37
|
aggregationTimestampColumnName: keyof TBaseModel;
|
|
22
38
|
startTimestamp: Date;
|
|
23
39
|
endTimestamp: Date;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import AggregationInterval from "./AggregationInterval.mjs";
|
|
2
|
+
import { CalendarUnit } from "../Date.mjs";
|
|
3
|
+
import Timezone from "../Timezone.mjs";
|
|
4
|
+
export interface AggregateWindow {
|
|
5
|
+
startTimestamp?: Date | undefined;
|
|
6
|
+
endTimestamp?: Date | undefined;
|
|
7
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
8
|
+
timezone?: Timezone | undefined;
|
|
9
|
+
}
|
|
2
10
|
export declare class AggregationIntervalUtil {
|
|
3
11
|
static getAggregationIntervalForWindow(data: {
|
|
4
12
|
startDate: Date;
|
|
@@ -11,11 +19,34 @@ export declare class AggregationIntervalUtil {
|
|
|
11
19
|
*/
|
|
12
20
|
aggregationInterval?: AggregationInterval | undefined;
|
|
13
21
|
}): AggregationInterval;
|
|
22
|
+
static isCalendarInterval(interval: AggregationInterval): boolean;
|
|
23
|
+
static getCalendarUnit(interval: AggregationInterval): CalendarUnit | undefined;
|
|
24
|
+
static getBucketEnd(data: {
|
|
25
|
+
bucketStart: Date;
|
|
26
|
+
interval: AggregationInterval;
|
|
27
|
+
timezone?: Timezone | undefined;
|
|
28
|
+
}): Date;
|
|
29
|
+
static getListedReaderTimezone(): Timezone | undefined;
|
|
30
|
+
static readRequestedTimezone(value: unknown): Timezone | undefined;
|
|
31
|
+
static getTimezoneForWindow(data: {
|
|
32
|
+
startDate: Date;
|
|
33
|
+
endDate: Date;
|
|
34
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
35
|
+
timezone: Timezone | undefined;
|
|
36
|
+
}): Timezone | undefined;
|
|
37
|
+
static getReaderTimezone(data: {
|
|
38
|
+
startDate: Date;
|
|
39
|
+
endDate: Date;
|
|
40
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
41
|
+
}): Timezone | undefined;
|
|
42
|
+
static withTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest, timezone: Timezone | undefined): TRequest;
|
|
43
|
+
static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
|
|
14
44
|
static getAggregationIntervalMs(interval: AggregationInterval): number;
|
|
15
|
-
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval): Date;
|
|
45
|
+
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
|
|
16
46
|
static getIntervalAlignedWindow(data: {
|
|
17
47
|
startDate: Date;
|
|
18
48
|
endDate: Date;
|
|
49
|
+
timezone?: Timezone | undefined;
|
|
19
50
|
}): {
|
|
20
51
|
startDate: Date;
|
|
21
52
|
endDate: Date;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import AggregationInterval from "./AggregationInterval";
|
|
2
|
+
import { CalendarUnit } from "../Date";
|
|
3
|
+
import Timezone from "../Timezone";
|
|
4
|
+
export interface AggregateWindow {
|
|
5
|
+
startTimestamp?: Date | undefined;
|
|
6
|
+
endTimestamp?: Date | undefined;
|
|
7
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
8
|
+
timezone?: Timezone | undefined;
|
|
9
|
+
}
|
|
2
10
|
export declare class AggregationIntervalUtil {
|
|
3
11
|
static getAggregationIntervalForWindow(data: {
|
|
4
12
|
startDate: Date;
|
|
@@ -11,11 +19,34 @@ export declare class AggregationIntervalUtil {
|
|
|
11
19
|
*/
|
|
12
20
|
aggregationInterval?: AggregationInterval | undefined;
|
|
13
21
|
}): AggregationInterval;
|
|
22
|
+
static isCalendarInterval(interval: AggregationInterval): boolean;
|
|
23
|
+
static getCalendarUnit(interval: AggregationInterval): CalendarUnit | undefined;
|
|
24
|
+
static getBucketEnd(data: {
|
|
25
|
+
bucketStart: Date;
|
|
26
|
+
interval: AggregationInterval;
|
|
27
|
+
timezone?: Timezone | undefined;
|
|
28
|
+
}): Date;
|
|
29
|
+
static getListedReaderTimezone(): Timezone | undefined;
|
|
30
|
+
static readRequestedTimezone(value: unknown): Timezone | undefined;
|
|
31
|
+
static getTimezoneForWindow(data: {
|
|
32
|
+
startDate: Date;
|
|
33
|
+
endDate: Date;
|
|
34
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
35
|
+
timezone: Timezone | undefined;
|
|
36
|
+
}): Timezone | undefined;
|
|
37
|
+
static getReaderTimezone(data: {
|
|
38
|
+
startDate: Date;
|
|
39
|
+
endDate: Date;
|
|
40
|
+
aggregationInterval?: AggregationInterval | undefined;
|
|
41
|
+
}): Timezone | undefined;
|
|
42
|
+
static withTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest, timezone: Timezone | undefined): TRequest;
|
|
43
|
+
static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
|
|
14
44
|
static getAggregationIntervalMs(interval: AggregationInterval): number;
|
|
15
|
-
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval): Date;
|
|
45
|
+
static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
|
|
16
46
|
static getIntervalAlignedWindow(data: {
|
|
17
47
|
startDate: Date;
|
|
18
48
|
endDate: Date;
|
|
49
|
+
timezone?: Timezone | undefined;
|
|
19
50
|
}): {
|
|
20
51
|
startDate: Date;
|
|
21
52
|
endDate: Date;
|
|
@@ -6,6 +6,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.AggregationIntervalUtil = void 0;
|
|
7
7
|
const AggregationInterval_1 = __importDefault(require("./AggregationInterval"));
|
|
8
8
|
const Date_1 = __importDefault(require("../Date"));
|
|
9
|
+
const Timezone_1 = __importDefault(require("../Timezone"));
|
|
10
|
+
const TimezoneAlias_1 = __importDefault(require("../TimezoneAlias"));
|
|
11
|
+
/*
|
|
12
|
+
* The intervals whose buckets are units of a calendar: a day from midnight,
|
|
13
|
+
* a week from Monday, a month from its 1st, a year from 1 January. Where
|
|
14
|
+
* those begin depends on the time zone they are read in. An hour and
|
|
15
|
+
* shorter are counted from the epoch, the same instants in every zone, and
|
|
16
|
+
* Total is no bucket at all.
|
|
17
|
+
*/
|
|
18
|
+
const CALENDAR_INTERVALS = [
|
|
19
|
+
AggregationInterval_1.default.Day,
|
|
20
|
+
AggregationInterval_1.default.Week,
|
|
21
|
+
AggregationInterval_1.default.Month,
|
|
22
|
+
AggregationInterval_1.default.Year,
|
|
23
|
+
];
|
|
24
|
+
/*
|
|
25
|
+
* The calendar unit each of those buckets is (OneUptimeDate's): a week is
|
|
26
|
+
* an ISO week, from Monday, as the server's toStartOfInterval starts it.
|
|
27
|
+
*/
|
|
28
|
+
const CALENDAR_UNIT_OF_INTERVAL = {
|
|
29
|
+
[AggregationInterval_1.default.Day]: "day",
|
|
30
|
+
[AggregationInterval_1.default.Week]: "week",
|
|
31
|
+
[AggregationInterval_1.default.Month]: "month",
|
|
32
|
+
[AggregationInterval_1.default.Year]: "year",
|
|
33
|
+
};
|
|
9
34
|
/*
|
|
10
35
|
* Single source of truth for "which time-bucket size does the
|
|
11
36
|
* analytics aggregate API use for a given query window". The server
|
|
@@ -65,6 +90,164 @@ class AggregationIntervalUtil {
|
|
|
65
90
|
}
|
|
66
91
|
return AggregationInterval_1.default.Year;
|
|
67
92
|
}
|
|
93
|
+
/*
|
|
94
|
+
* True for Day, Week, Month and Year: the buckets that start at the
|
|
95
|
+
* reader's midnight, Monday, 1st or 1 January when an aggregate carries
|
|
96
|
+
* the reader's zone (AggregateBy.timezone), and in UTC otherwise.
|
|
97
|
+
*/
|
|
98
|
+
static isCalendarInterval(interval) {
|
|
99
|
+
return CALENDAR_INTERVALS.includes(interval);
|
|
100
|
+
}
|
|
101
|
+
/*
|
|
102
|
+
* The calendar unit a day, week, month or year bucket is: "day", "week"
|
|
103
|
+
* (from Monday), "month" or "year". Undefined for an hour and shorter,
|
|
104
|
+
* which are fixed lengths of time, and for Total.
|
|
105
|
+
*/
|
|
106
|
+
static getCalendarUnit(interval) {
|
|
107
|
+
return CALENDAR_UNIT_OF_INTERVAL[interval];
|
|
108
|
+
}
|
|
109
|
+
/*
|
|
110
|
+
* The instant a bucket of `interval` starting at `bucketStart` ends: the
|
|
111
|
+
* one the next bucket starts at, which is where a bucket closes (issue
|
|
112
|
+
* #7924). An hour and shorter are their fixed length. A day, a week, a
|
|
113
|
+
* month and a year end where the next one starts on the calendar of
|
|
114
|
+
* `timezone`, the zone the bucket was cut in - its request's
|
|
115
|
+
* AggregateBy.timezone, UTC when it named none: a day is 23 or 25 hours
|
|
116
|
+
* where the clocks change (23.5 or 24.5 on Lord Howe Island), a month 28
|
|
117
|
+
* to 31 days, a year 365 or 366, none of them the nominal width
|
|
118
|
+
* getAggregationIntervalMs gives.
|
|
119
|
+
*
|
|
120
|
+
* The next unit is the one holding the instant one and a half nominal
|
|
121
|
+
* units on from the start of the unit holding `bucketStart`: no real unit
|
|
122
|
+
* is half a nominal one shorter or longer than it, so that instant is in
|
|
123
|
+
* the next unit, never in the one after it. HeartbeatAvailabilityUtil has
|
|
124
|
+
* walked the server's calendar buckets this way since issue #7277.
|
|
125
|
+
*/
|
|
126
|
+
static getBucketEnd(data) {
|
|
127
|
+
const startMs = Date_1.default.fromString(data.bucketStart).getTime();
|
|
128
|
+
const nominalMs = this.getAggregationIntervalMs(data.interval);
|
|
129
|
+
const unit = this.getCalendarUnit(data.interval);
|
|
130
|
+
if (!unit || !Number.isFinite(startMs)) {
|
|
131
|
+
return new Date(startMs + nominalMs);
|
|
132
|
+
}
|
|
133
|
+
/*
|
|
134
|
+
* In its current name, as the server cuts it (AggregateUtil
|
|
135
|
+
* .getBucketTimezone): moment no longer knows US/Pacific-New, and
|
|
136
|
+
* would read its days as UTC's.
|
|
137
|
+
*/
|
|
138
|
+
const timezone = data.timezone
|
|
139
|
+
? TimezoneAlias_1.default.getCanonicalTimezone(data.timezone)
|
|
140
|
+
: Timezone_1.default.UTC;
|
|
141
|
+
const unitStart = Date_1.default.getStartOfCalendarUnit(new Date(startMs), unit, timezone);
|
|
142
|
+
return Date_1.default.getStartOfCalendarUnit(new Date(unitStart.getTime() + nominalMs * 1.5), unit, timezone);
|
|
143
|
+
}
|
|
144
|
+
/*
|
|
145
|
+
* The reader's zone - OneUptimeDate.getCurrentTimezone(): the zone User
|
|
146
|
+
* Settings picked, else the browser's - when the Timezone list names it,
|
|
147
|
+
* else undefined. It is the zone a request from the dashboard asks the
|
|
148
|
+
* server to cut its days in. The server takes no zone the list does not
|
|
149
|
+
* name, and a browser can report one newer than the list, so such a
|
|
150
|
+
* request names none and its days stay UTC's, as before, rather than
|
|
151
|
+
* failing.
|
|
152
|
+
*/
|
|
153
|
+
static getListedReaderTimezone() {
|
|
154
|
+
const timezone = Date_1.default.getCurrentTimezone();
|
|
155
|
+
return TimezoneAlias_1.default.isListedName(timezone) ? timezone : undefined;
|
|
156
|
+
}
|
|
157
|
+
/*
|
|
158
|
+
* The zone a request names for the days a route cuts on the server - an
|
|
159
|
+
* Ask AI question's charts (issue #7922), the Security and Data Security
|
|
160
|
+
* overviews' day bars (issue #7925) - read as the hint it is: its current
|
|
161
|
+
* name (TimezoneAlias) when the Timezone list names it, the rule an
|
|
162
|
+
* aggregate's AggregateBy.timezone is held to (AggregateUtil
|
|
163
|
+
* .readTimezone), and undefined for anything else: nothing, a typo, a
|
|
164
|
+
* zone newer than the list, a number, text written to be SQL. Such a
|
|
165
|
+
* request is answered on UTC's days, as one that names no zone is; the
|
|
166
|
+
* question or the page it asks for is never refused over it.
|
|
167
|
+
*/
|
|
168
|
+
static readRequestedTimezone(value) {
|
|
169
|
+
if (!TimezoneAlias_1.default.isListedName(value)) {
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
return TimezoneAlias_1.default.getCanonicalTimezone(value);
|
|
173
|
+
}
|
|
174
|
+
/*
|
|
175
|
+
* The zone an aggregate over this window asks its buckets to follow, of
|
|
176
|
+
* the one its buckets should follow (`timezone`): that zone when the
|
|
177
|
+
* buckets are days, weeks, months or years and the Timezone list names
|
|
178
|
+
* it, else undefined. An hour and shorter and Total are moved by no zone,
|
|
179
|
+
* so their requests stay exactly as they were, and the server refuses a
|
|
180
|
+
* zone the list does not name, so those buckets follow UTC instead.
|
|
181
|
+
*/
|
|
182
|
+
static getTimezoneForWindow(data) {
|
|
183
|
+
const interval = this.getAggregationIntervalForWindow(data);
|
|
184
|
+
if (!this.isCalendarInterval(interval)) {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
return TimezoneAlias_1.default.isListedName(data.timezone)
|
|
188
|
+
? data.timezone
|
|
189
|
+
: undefined;
|
|
190
|
+
}
|
|
191
|
+
/*
|
|
192
|
+
* The zone an aggregate over this window asks its buckets to follow: the
|
|
193
|
+
* reader's (OneUptimeDate.getCurrentTimezone(), the zone User Settings
|
|
194
|
+
* picked, or the browser's), when its buckets are days, weeks, months or
|
|
195
|
+
* years. A chart draws those on the reader's calendar, so their buckets
|
|
196
|
+
* must start where the reader's days do (issue #7277).
|
|
197
|
+
*
|
|
198
|
+
* Undefined for an hour and shorter and for Total, which no zone moves,
|
|
199
|
+
* so those requests stay exactly as they were. Undefined too for a zone
|
|
200
|
+
* the Timezone list does not name - a browser can report a zone newer
|
|
201
|
+
* than the list, and the server refuses any other - so those buckets
|
|
202
|
+
* follow UTC, as before, rather than the chart failing.
|
|
203
|
+
*/
|
|
204
|
+
static getReaderTimezone(data) {
|
|
205
|
+
return this.getTimezoneForWindow(Object.assign(Object.assign({}, data), { timezone: Date_1.default.getCurrentTimezone() }));
|
|
206
|
+
}
|
|
207
|
+
/*
|
|
208
|
+
* The request with `timezone` on it when its buckets are days, weeks,
|
|
209
|
+
* months or years (getTimezoneForWindow): a new object, the one given
|
|
210
|
+
* left as it is. A request that names its zone keeps it - a cloud's cost
|
|
211
|
+
* is for a UTC day, and its readers ask for Timezone.UTC - and one with
|
|
212
|
+
* no window to read an interval from, or no zone to add, comes back
|
|
213
|
+
* unchanged. The dashboard sends every aggregate with the reader's zone
|
|
214
|
+
* (withReaderTimezone), and Ask AI's tools read theirs with the asker's
|
|
215
|
+
* (ToolContext.readerTimezone, issue #7922).
|
|
216
|
+
*/
|
|
217
|
+
static withTimezone(aggregateBy, timezone) {
|
|
218
|
+
if (!aggregateBy ||
|
|
219
|
+
(aggregateBy.timezone !== undefined && aggregateBy.timezone !== null)) {
|
|
220
|
+
return aggregateBy;
|
|
221
|
+
}
|
|
222
|
+
let bucketTimezone = undefined;
|
|
223
|
+
try {
|
|
224
|
+
bucketTimezone = this.getTimezoneForWindow({
|
|
225
|
+
startDate: aggregateBy.startTimestamp,
|
|
226
|
+
endDate: aggregateBy.endTimestamp,
|
|
227
|
+
aggregationInterval: aggregateBy.aggregationInterval,
|
|
228
|
+
timezone: timezone,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
catch (_a) {
|
|
232
|
+
/*
|
|
233
|
+
* No window to read an interval from (fromString throws on a missing
|
|
234
|
+
* date): the request goes as it is, and the server answers it as it
|
|
235
|
+
* always has.
|
|
236
|
+
*/
|
|
237
|
+
return aggregateBy;
|
|
238
|
+
}
|
|
239
|
+
if (!bucketTimezone) {
|
|
240
|
+
return aggregateBy;
|
|
241
|
+
}
|
|
242
|
+
return Object.assign(Object.assign({}, aggregateBy), { timezone: bucketTimezone });
|
|
243
|
+
}
|
|
244
|
+
/*
|
|
245
|
+
* The request with the reader's zone on it (getReaderTimezone), as the
|
|
246
|
+
* dashboard sends every aggregate (withTimezone).
|
|
247
|
+
*/
|
|
248
|
+
static withReaderTimezone(aggregateBy) {
|
|
249
|
+
return this.withTimezone(aggregateBy, Date_1.default.getCurrentTimezone());
|
|
250
|
+
}
|
|
68
251
|
/*
|
|
69
252
|
* Nominal bucket width in milliseconds. Month and Year are
|
|
70
253
|
* calendar-variable in ClickHouse (`toStartOfInterval` snaps to
|
|
@@ -124,8 +307,15 @@ class AggregationIntervalUtil {
|
|
|
124
307
|
* server-side, which a fixed-ms grid can't reproduce, so those (and
|
|
125
308
|
* `Total`) are returned UNCHANGED rather than risk shifting the gap for
|
|
126
309
|
* long windows — their pre-existing behavior is preserved.
|
|
310
|
+
*
|
|
311
|
+
* `timezone` is the zone the request's buckets follow (its
|
|
312
|
+
* AggregateBy.timezone, see getReaderTimezone): a Day then floors to that
|
|
313
|
+
* zone's midnight, where the server starts the day, and not to UTC's - in
|
|
314
|
+
* New York a UTC midnight is 19:00 the evening before, so the window's
|
|
315
|
+
* first day would hold five hours of it. Every finer interval is the same
|
|
316
|
+
* in every zone and ignores it.
|
|
127
317
|
*/
|
|
128
|
-
static floorDateToIntervalGrid(date, interval) {
|
|
318
|
+
static floorDateToIntervalGrid(date, interval, timezone) {
|
|
129
319
|
const ms = Date_1.default.fromString(date).getTime();
|
|
130
320
|
const alignableIntervals = [
|
|
131
321
|
AggregationInterval_1.default.Minute,
|
|
@@ -138,6 +328,9 @@ class AggregationIntervalUtil {
|
|
|
138
328
|
if (!alignableIntervals.includes(interval)) {
|
|
139
329
|
return new Date(ms);
|
|
140
330
|
}
|
|
331
|
+
if (interval === AggregationInterval_1.default.Day && timezone) {
|
|
332
|
+
return Date_1.default.getStartOfDay(new Date(ms), timezone);
|
|
333
|
+
}
|
|
141
334
|
const bucketMs = this.getAggregationIntervalMs(interval);
|
|
142
335
|
if (!Number.isFinite(bucketMs) || bucketMs <= 0) {
|
|
143
336
|
return new Date(ms);
|
|
@@ -154,6 +347,10 @@ class AggregationIntervalUtil {
|
|
|
154
347
|
* is floored DOWN so the first bucket is complete and lands on the axis
|
|
155
348
|
* origin (removing the leading gap); the end is left untouched so the
|
|
156
349
|
* latest, still-in-progress bucket and its live data continue to show.
|
|
350
|
+
*
|
|
351
|
+
* `timezone` is the zone the window's request will carry (see
|
|
352
|
+
* floorDateToIntervalGrid); the caller reads it with getReaderTimezone,
|
|
353
|
+
* as the request does, so the two always agree.
|
|
157
354
|
*/
|
|
158
355
|
static getIntervalAlignedWindow(data) {
|
|
159
356
|
const interval = this.getAggregationIntervalForWindow({
|
|
@@ -161,7 +358,7 @@ class AggregationIntervalUtil {
|
|
|
161
358
|
endDate: data.endDate,
|
|
162
359
|
});
|
|
163
360
|
return {
|
|
164
|
-
startDate: this.floorDateToIntervalGrid(data.startDate, interval),
|
|
361
|
+
startDate: this.floorDateToIntervalGrid(data.startDate, interval, data.timezone),
|
|
165
362
|
endDate: Date_1.default.fromString(data.endDate),
|
|
166
363
|
interval,
|
|
167
364
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Phone from "../Phone.mjs";
|
|
2
|
+
import { TwilioConfigUse } from "./TwilioConfigUse.mjs";
|
|
3
|
+
export declare enum ServerTwilioEnvironmentVariable {
|
|
4
|
+
AccountSid = "GLOBAL_TWILIO_ACCOUNT_SID",
|
|
5
|
+
AuthToken = "GLOBAL_TWILIO_AUTH_TOKEN",
|
|
6
|
+
UsedFor = "GLOBAL_TWILIO_USED_FOR",
|
|
7
|
+
PrimaryPhoneNumber = "GLOBAL_TWILIO_PRIMARY_PHONE_NUMBER",
|
|
8
|
+
SecondaryPhoneNumbers = "GLOBAL_TWILIO_SECONDARY_PHONE_NUMBERS",
|
|
9
|
+
SmsPhoneNumbers = "GLOBAL_TWILIO_SMS_PHONE_NUMBERS"
|
|
10
|
+
}
|
|
11
|
+
export declare const SERVER_TWILIO_ENVIRONMENT_VARIABLES: ReadonlyArray<ServerTwilioEnvironmentVariable>;
|
|
12
|
+
export declare const SERVER_TWILIO_USED_FOR_VALUES: Readonly<Record<TwilioConfigUse, string>>;
|
|
13
|
+
export declare const SERVER_TWILIO_ENVIRONMENT_ROUTE: string;
|
|
14
|
+
export declare const SERVER_TWILIO_SET_BY_ENVIRONMENT_MESSAGE: string;
|
|
15
|
+
export interface ServerTwilioEnvironmentAccount {
|
|
16
|
+
twilioAccountSID: string;
|
|
17
|
+
twilioAuthToken: string;
|
|
18
|
+
twilioUsedFor: TwilioConfigUse;
|
|
19
|
+
twilioPrimaryPhoneNumber?: Phone | undefined;
|
|
20
|
+
twilioSecondaryPhoneNumbers: string;
|
|
21
|
+
twilioSmsPhoneNumbers: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ServerTwilioEnvironmentReading {
|
|
24
|
+
isSet: boolean;
|
|
25
|
+
account: ServerTwilioEnvironmentAccount | null;
|
|
26
|
+
problems: Array<string>;
|
|
27
|
+
}
|
|
28
|
+
export interface ServerTwilioEnvironmentAnswer {
|
|
29
|
+
isSetByEnvironment: boolean;
|
|
30
|
+
usedFor: TwilioConfigUse | null;
|
|
31
|
+
accountSid: string | null;
|
|
32
|
+
hasAuthToken: boolean;
|
|
33
|
+
primaryPhoneNumber: string | null;
|
|
34
|
+
secondaryPhoneNumbers: string | null;
|
|
35
|
+
smsPhoneNumbers: string | null;
|
|
36
|
+
problems: Array<string>;
|
|
37
|
+
}
|
|
38
|
+
export type ServerTwilioEnvironmentValues = Readonly<Record<string, string | undefined>>;
|
|
39
|
+
export default class ServerTwilioEnvironment {
|
|
40
|
+
static readUse(value: string | undefined): TwilioConfigUse | null;
|
|
41
|
+
static read(environment: ServerTwilioEnvironmentValues): ServerTwilioEnvironmentReading;
|
|
42
|
+
static isUsable(reading: ServerTwilioEnvironmentReading): boolean;
|
|
43
|
+
static toAnswer(reading: ServerTwilioEnvironmentReading): ServerTwilioEnvironmentAnswer;
|
|
44
|
+
static answerFromJSON(json: unknown): ServerTwilioEnvironmentAnswer;
|
|
45
|
+
static getStartupNotice(reading: ServerTwilioEnvironmentReading): string | null;
|
|
46
|
+
static getStartupWarning(reading: ServerTwilioEnvironmentReading): string | null;
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Phone from "../Phone";
|
|
2
|
+
import { TwilioConfigUse } from "./TwilioConfigUse";
|
|
3
|
+
export declare enum ServerTwilioEnvironmentVariable {
|
|
4
|
+
AccountSid = "GLOBAL_TWILIO_ACCOUNT_SID",
|
|
5
|
+
AuthToken = "GLOBAL_TWILIO_AUTH_TOKEN",
|
|
6
|
+
UsedFor = "GLOBAL_TWILIO_USED_FOR",
|
|
7
|
+
PrimaryPhoneNumber = "GLOBAL_TWILIO_PRIMARY_PHONE_NUMBER",
|
|
8
|
+
SecondaryPhoneNumbers = "GLOBAL_TWILIO_SECONDARY_PHONE_NUMBERS",
|
|
9
|
+
SmsPhoneNumbers = "GLOBAL_TWILIO_SMS_PHONE_NUMBERS"
|
|
10
|
+
}
|
|
11
|
+
export declare const SERVER_TWILIO_ENVIRONMENT_VARIABLES: ReadonlyArray<ServerTwilioEnvironmentVariable>;
|
|
12
|
+
export declare const SERVER_TWILIO_USED_FOR_VALUES: Readonly<Record<TwilioConfigUse, string>>;
|
|
13
|
+
export declare const SERVER_TWILIO_ENVIRONMENT_ROUTE: string;
|
|
14
|
+
export declare const SERVER_TWILIO_SET_BY_ENVIRONMENT_MESSAGE: string;
|
|
15
|
+
export interface ServerTwilioEnvironmentAccount {
|
|
16
|
+
twilioAccountSID: string;
|
|
17
|
+
twilioAuthToken: string;
|
|
18
|
+
twilioUsedFor: TwilioConfigUse;
|
|
19
|
+
twilioPrimaryPhoneNumber?: Phone | undefined;
|
|
20
|
+
twilioSecondaryPhoneNumbers: string;
|
|
21
|
+
twilioSmsPhoneNumbers: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ServerTwilioEnvironmentReading {
|
|
24
|
+
isSet: boolean;
|
|
25
|
+
account: ServerTwilioEnvironmentAccount | null;
|
|
26
|
+
problems: Array<string>;
|
|
27
|
+
}
|
|
28
|
+
export interface ServerTwilioEnvironmentAnswer {
|
|
29
|
+
isSetByEnvironment: boolean;
|
|
30
|
+
usedFor: TwilioConfigUse | null;
|
|
31
|
+
accountSid: string | null;
|
|
32
|
+
hasAuthToken: boolean;
|
|
33
|
+
primaryPhoneNumber: string | null;
|
|
34
|
+
secondaryPhoneNumbers: string | null;
|
|
35
|
+
smsPhoneNumbers: string | null;
|
|
36
|
+
problems: Array<string>;
|
|
37
|
+
}
|
|
38
|
+
export type ServerTwilioEnvironmentValues = Readonly<Record<string, string | undefined>>;
|
|
39
|
+
export default class ServerTwilioEnvironment {
|
|
40
|
+
static readUse(value: string | undefined): TwilioConfigUse | null;
|
|
41
|
+
static read(environment: ServerTwilioEnvironmentValues): ServerTwilioEnvironmentReading;
|
|
42
|
+
static isUsable(reading: ServerTwilioEnvironmentReading): boolean;
|
|
43
|
+
static toAnswer(reading: ServerTwilioEnvironmentReading): ServerTwilioEnvironmentAnswer;
|
|
44
|
+
static answerFromJSON(json: unknown): ServerTwilioEnvironmentAnswer;
|
|
45
|
+
static getStartupNotice(reading: ServerTwilioEnvironmentReading): string | null;
|
|
46
|
+
static getStartupWarning(reading: ServerTwilioEnvironmentReading): string | null;
|
|
47
|
+
}
|