@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
package/Utils/Rum/UrlScrubber.js
CHANGED
|
@@ -41,6 +41,25 @@ const LONG_DIGIT_SEGMENT = /^\d{9,}$/;
|
|
|
41
41
|
*/
|
|
42
42
|
const OPAQUE_TOKEN_SEGMENT = /^[A-Za-z0-9_-]{32,}$/;
|
|
43
43
|
const REDACTED = "[redacted]";
|
|
44
|
+
/*
|
|
45
|
+
* A fragment that is a route rather than an in-page anchor. Hash routers
|
|
46
|
+
* (Angular's HashLocationStrategy, React's HashRouter, Vue's hash mode,
|
|
47
|
+
* every "#/"-routed admin tool) keep the whole route there:
|
|
48
|
+
* "https://shop.example.com/#/orders/42", or "#!/orders/42".
|
|
49
|
+
*/
|
|
50
|
+
const HASH_ROUTE_PATTERN = /^#!?\//;
|
|
51
|
+
/* One escaped byte: "%c3", "%2F". */
|
|
52
|
+
const ESCAPED_BYTE = /^%[0-9A-Fa-f]{2}$/;
|
|
53
|
+
/*
|
|
54
|
+
* Text with no ASCII in it. An escaped character is written composed only
|
|
55
|
+
* when it stays beyond ASCII composed: NFC turns three into ASCII, U+037E
|
|
56
|
+
* into ";", U+1FEF into "`" and U+212A into "K".
|
|
57
|
+
*/
|
|
58
|
+
const BEYOND_ASCII = /^[\u0080-\uffff]+$/;
|
|
59
|
+
/* An escape, or a character beyond ASCII: a path with a spelling to settle. */
|
|
60
|
+
const SPELLED_CHARACTER = /[%\u0080-\uffff]/;
|
|
61
|
+
/* Characters beyond ASCII, which the URL parser escapes. */
|
|
62
|
+
const NON_ASCII_RUN = /[\u0080-\uffff]+/g;
|
|
44
63
|
class UrlScrubber {
|
|
45
64
|
/*
|
|
46
65
|
* Reduce a URL to origin + scrubbed path. Query and fragment are
|
|
@@ -49,6 +68,16 @@ class UrlScrubber {
|
|
|
49
68
|
* tell "this page was loaded with a coupon code" from "it wasn't",
|
|
50
69
|
* without recording which code.
|
|
51
70
|
*
|
|
71
|
+
* The one fragment kept is a hash router's route (scrubHashRoute): it
|
|
72
|
+
* is the page, as much as the path is. Without it every page of a
|
|
73
|
+
* hash-routed app was stored as "https://shop.example.com/", and the
|
|
74
|
+
* app reported one page per session. Any other fragment - an anchor
|
|
75
|
+
* ("#pricing"), a token ("#access_token=...") - is still dropped.
|
|
76
|
+
*
|
|
77
|
+
* The browser recorder and the ingest both run this, the ingest again
|
|
78
|
+
* over whatever the recorder sent, so it has to keep what it keeps
|
|
79
|
+
* when it runs over its own output.
|
|
80
|
+
*
|
|
52
81
|
* Never throws: a URL that will not parse is reduced to a constant
|
|
53
82
|
* rather than propagating an exception into the recorder's hot path or
|
|
54
83
|
* being passed through unscrubbed. Failing closed matters more here
|
|
@@ -77,14 +106,125 @@ class UrlScrubber {
|
|
|
77
106
|
const base = isRelativeInput
|
|
78
107
|
? scrubbedPath
|
|
79
108
|
: `${parsed.origin}${scrubbedPath}`;
|
|
80
|
-
|
|
109
|
+
const hashRoute = UrlScrubber.scrubHashRoute(parsed.hash);
|
|
110
|
+
return `${query ? `${base}?${query}` : base}${hashRoute}`;
|
|
111
|
+
}
|
|
112
|
+
/*
|
|
113
|
+
* A hash router's route, scrubbed as a path is: "#/orders/42?token=x" ->
|
|
114
|
+
* "#/orders/42", "#!/u/someone@example.com" -> "#!/u/[redacted]". Empty
|
|
115
|
+
* for any other fragment, which is dropped.
|
|
116
|
+
*/
|
|
117
|
+
static scrubHashRoute(hash) {
|
|
118
|
+
const route = UrlScrubber.getHashRoute(hash);
|
|
119
|
+
if (route === null) {
|
|
120
|
+
return "";
|
|
121
|
+
}
|
|
122
|
+
return `${hash.slice(0, hash.indexOf("/"))}${UrlScrubber.scrubPath(route)}`;
|
|
123
|
+
}
|
|
124
|
+
/*
|
|
125
|
+
* The path of a hash router's route, without the query a route can
|
|
126
|
+
* carry inside the fragment: "#/orders/42?tab=open" and "#!/orders/42"
|
|
127
|
+
* are "/orders/42". Null when the fragment is not a route.
|
|
128
|
+
*/
|
|
129
|
+
static getHashRoute(hash) {
|
|
130
|
+
if (!HASH_ROUTE_PATTERN.test(hash)) {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
const route = hash.slice(hash.indexOf("/"));
|
|
134
|
+
const queryIndex = route.indexOf("?");
|
|
135
|
+
return queryIndex === -1 ? route : route.slice(0, queryIndex);
|
|
136
|
+
}
|
|
137
|
+
/*
|
|
138
|
+
* A path in the one spelling the URL parser writes for its words.
|
|
139
|
+
*
|
|
140
|
+
* The parser escapes every character beyond ASCII as UTF-8 in upper-case
|
|
141
|
+
* hex ("/café" is "/caf%C3%A9"), but keeps an escape it is given as
|
|
142
|
+
* written. So one page reached through a link to "/caf%c3%a9" (lower-case
|
|
143
|
+
* hex, as .NET's HttpUtility.UrlEncode and WordPress write it), or
|
|
144
|
+
* through "/café" with its accent decomposed (an "e" and U+0301, as macOS
|
|
145
|
+
* writes file names: "/cafe%CC%81"), was stored, and shown on User Flows,
|
|
146
|
+
* as two or three pages, each named "/café". Here every escape is written
|
|
147
|
+
* in upper-case hex (RFC 3986, 6.2.2.1), and the escaped characters
|
|
148
|
+
* beyond ASCII are decoded, composed (NFC) and escaped again as the
|
|
149
|
+
* parser escapes them: all three are "/caf%C3%A9".
|
|
150
|
+
*
|
|
151
|
+
* Nothing that can name another page is merged. Every other escape keeps
|
|
152
|
+
* its place: an escaped "/", "?", "#" or "%" ("/a%2Fb" is not "/a/b") and
|
|
153
|
+
* any other escape of an ASCII character, bytes that are not UTF-8, and
|
|
154
|
+
* the three characters NFC would turn into ASCII (BEYOND_ASCII), so an
|
|
155
|
+
* escape never passes for a character the parser writes plainly. Each
|
|
156
|
+
* also ends the text an accent is composed with, so it never takes one
|
|
157
|
+
* ("%2F" and U+0307 would compose the "F" into U+1E1E). Case outside
|
|
158
|
+
* escapes stays: "/Cart" is not "/cart". (User Flows draws the words
|
|
159
|
+
* decoded for a person: getUserFlowPageText.)
|
|
160
|
+
*
|
|
161
|
+
* No Unicode property escape decides it: the recorder inlines this
|
|
162
|
+
* module, and a browser that cannot parse one would not load it at all.
|
|
163
|
+
*
|
|
164
|
+
* Running it over its own result changes nothing, so the ingest's second
|
|
165
|
+
* scrub keeps the recorder's spelling.
|
|
166
|
+
*/
|
|
167
|
+
static normalizePathSpelling(path) {
|
|
168
|
+
if (!SPELLED_CHARACTER.test(path)) {
|
|
169
|
+
return path;
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
let spelled = "";
|
|
173
|
+
// The words since the last escape kept as written, decoded.
|
|
174
|
+
let words = "";
|
|
175
|
+
let index = 0;
|
|
176
|
+
while (index < path.length) {
|
|
177
|
+
const escape = path.slice(index, index + 3);
|
|
178
|
+
if (!ESCAPED_BYTE.test(escape)) {
|
|
179
|
+
words += path.charAt(index);
|
|
180
|
+
index += 1;
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
// A character's escapes: 2 to 4 bytes, as many as its first says.
|
|
184
|
+
const lead = parseInt(escape.slice(1), 16);
|
|
185
|
+
const length = lead < 0xc2 ? 0 : lead < 0xe0 ? 6 : lead < 0xf0 ? 9 : 12;
|
|
186
|
+
let character = "";
|
|
187
|
+
try {
|
|
188
|
+
character = length
|
|
189
|
+
? decodeURIComponent(path.slice(index, index + length))
|
|
190
|
+
: "";
|
|
191
|
+
}
|
|
192
|
+
catch (_a) {
|
|
193
|
+
// Not UTF-8: cut short, written too long, a surrogate.
|
|
194
|
+
}
|
|
195
|
+
if (BEYOND_ASCII.test(character.normalize("NFC"))) {
|
|
196
|
+
words += character;
|
|
197
|
+
index += length;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
spelled += UrlScrubber.spellWords(words) + escape.toUpperCase();
|
|
201
|
+
words = "";
|
|
202
|
+
index += 3;
|
|
203
|
+
}
|
|
204
|
+
return spelled + UrlScrubber.spellWords(words);
|
|
205
|
+
}
|
|
206
|
+
catch (_b) {
|
|
207
|
+
// A lone surrogate, which only a path the parser never read holds.
|
|
208
|
+
return path;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// Composed, and every character beyond ASCII escaped as the parser does.
|
|
212
|
+
static spellWords(words) {
|
|
213
|
+
return words
|
|
214
|
+
.normalize("NFC")
|
|
215
|
+
.replace(NON_ASCII_RUN, (run) => {
|
|
216
|
+
return encodeURIComponent(run);
|
|
217
|
+
});
|
|
81
218
|
}
|
|
82
|
-
/*
|
|
219
|
+
/*
|
|
220
|
+
* Replace identifier-shaped segments, preserving route structure, in
|
|
221
|
+
* the path's one spelling (normalizePathSpelling).
|
|
222
|
+
*/
|
|
83
223
|
static scrubPath(pathname) {
|
|
84
224
|
if (!pathname || pathname === "/") {
|
|
85
225
|
return pathname || "/";
|
|
86
226
|
}
|
|
87
|
-
const segments = pathname.split("/");
|
|
227
|
+
const segments = UrlScrubber.normalizePathSpelling(pathname).split("/");
|
|
88
228
|
const scrubbed = segments.map((segment) => {
|
|
89
229
|
if (!segment) {
|
|
90
230
|
return segment;
|
|
@@ -132,17 +272,23 @@ class UrlScrubber {
|
|
|
132
272
|
return kept.join("&");
|
|
133
273
|
}
|
|
134
274
|
/*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
275
|
+
* The page a URL is, without its origin or query: the scrubbed path and,
|
|
276
|
+
* for a hash router, the route scrub keeps ("/#/orders/[redacted]",
|
|
277
|
+
* "/app/#!/cart"). The refresh-rage log compares it across page loads,
|
|
278
|
+
* and the support bundle names the page by it.
|
|
279
|
+
*
|
|
280
|
+
* The path alone was the page before: every route of a hash-routed app
|
|
281
|
+
* has the path "/", so a full load of #/a and then of #/b was counted as
|
|
282
|
+
* two reloads of one page, and raised refresh rage.
|
|
137
283
|
*/
|
|
138
|
-
static
|
|
284
|
+
static getScrubbedPage(rawUrl) {
|
|
139
285
|
const scrubbed = UrlScrubber.scrub(rawUrl);
|
|
140
286
|
if (!scrubbed || scrubbed === REDACTED) {
|
|
141
287
|
return REDACTED;
|
|
142
288
|
}
|
|
143
289
|
try {
|
|
144
290
|
const parsed = new URL(scrubbed, "https://redacted.invalid");
|
|
145
|
-
return parsed.pathname;
|
|
291
|
+
return parsed.pathname + parsed.hash;
|
|
146
292
|
}
|
|
147
293
|
catch (_a) {
|
|
148
294
|
return REDACTED;
|
package/Utils/Rum/UserFlow.d.mts
CHANGED
|
@@ -164,7 +164,7 @@ export declare function toUserFlowPageKey(rawUrl: string, options: {
|
|
|
164
164
|
}): string;
|
|
165
165
|
export declare function spansMultipleHosts(rawUrls: Array<string>): boolean;
|
|
166
166
|
export declare function toSessionListUrlPrefix(page: string): string;
|
|
167
|
-
export declare function
|
|
167
|
+
export declare function getUserFlowPageText(page: string): string;
|
|
168
168
|
export declare function buildUserFlowJourneys(response: UserFlowJourneysResponseDto, options: Pick<UserFlowOptions, "groupDynamicSegments" | "hiddenPages" | "sessionFilter" | "deviceType">): {
|
|
169
169
|
journeys: Array<UserFlowJourney>;
|
|
170
170
|
includesHost: boolean;
|
package/Utils/Rum/UserFlow.d.ts
CHANGED
|
@@ -164,7 +164,7 @@ export declare function toUserFlowPageKey(rawUrl: string, options: {
|
|
|
164
164
|
}): string;
|
|
165
165
|
export declare function spansMultipleHosts(rawUrls: Array<string>): boolean;
|
|
166
166
|
export declare function toSessionListUrlPrefix(page: string): string;
|
|
167
|
-
export declare function
|
|
167
|
+
export declare function getUserFlowPageText(page: string): string;
|
|
168
168
|
export declare function buildUserFlowJourneys(response: UserFlowJourneysResponseDto, options: Pick<UserFlowOptions, "groupDynamicSegments" | "hiddenPages" | "sessionFilter" | "deviceType">): {
|
|
169
169
|
journeys: Array<UserFlowJourney>;
|
|
170
170
|
includesHost: boolean;
|
package/Utils/Rum/UserFlow.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.DEFAULT_USER_FLOW_OPTIONS = exports.USER_FLOW_MAX_OTHER_PAGES = exports.USER_FLOW_MAX_LOOPS = exports.USER_FLOW_MAX_NEIGHBOURS = exports.USER_FLOW_MAX_PATHS = exports.USER_FLOW_MAX_PATH_LENGTH = exports.USER_FLOW_SAMPLE_SESSIONS = exports.USER_FLOW_DEFAULT_PAGES_PER_STEP = exports.USER_FLOW_MAX_PAGES_PER_STEP = exports.USER_FLOW_MIN_PAGES_PER_STEP = exports.USER_FLOW_DEFAULT_STEPS = exports.USER_FLOW_MAX_STEPS = exports.USER_FLOW_MIN_STEPS = exports.OTHER_PAGES_LABEL = exports.OTHER_PAGES_KEY = void 0;
|
|
4
7
|
exports.isDynamicPathSegment = isDynamicPathSegment;
|
|
5
8
|
exports.toUserFlowPageKey = toUserFlowPageKey;
|
|
6
9
|
exports.spansMultipleHosts = spansMultipleHosts;
|
|
7
10
|
exports.toSessionListUrlPrefix = toSessionListUrlPrefix;
|
|
8
|
-
exports.
|
|
11
|
+
exports.getUserFlowPageText = getUserFlowPageText;
|
|
9
12
|
exports.buildUserFlowJourneys = buildUserFlowJourneys;
|
|
10
13
|
exports.buildUserFlowJourneySteps = buildUserFlowJourneySteps;
|
|
11
14
|
exports.sliceJourneyForMap = sliceJourneyForMap;
|
|
@@ -17,6 +20,8 @@ exports.buildUserFlowSummary = buildUserFlowSummary;
|
|
|
17
20
|
exports.buildUserFlowInsights = buildUserFlowInsights;
|
|
18
21
|
exports.normalizeUserFlowOptions = normalizeUserFlowOptions;
|
|
19
22
|
exports.analyzeUserFlow = analyzeUserFlow;
|
|
23
|
+
const PathInSentence_1 = require("./PathInSentence");
|
|
24
|
+
const UrlScrubber_1 = __importDefault(require("./UrlScrubber"));
|
|
20
25
|
/*
|
|
21
26
|
* The User Flows engine: recorded session journeys in, everything the page
|
|
22
27
|
* draws out - the step-by-step flow map, the most common paths, per-page
|
|
@@ -32,7 +37,9 @@ exports.analyzeUserFlow = analyzeUserFlow;
|
|
|
32
37
|
* - page: a flow-map key. The scrubbed URL without origin, query or
|
|
33
38
|
* trailing slash ("/cart"), optionally with id-shaped segments grouped
|
|
34
39
|
* ("/product/:id"), and with the host kept only when the application
|
|
35
|
-
* spans more than one ("shop.example.com/cart").
|
|
40
|
+
* spans more than one ("shop.example.com/cart"). Escaped as the URL
|
|
41
|
+
* parser escapes it ("/caf%C3%A9"); getUserFlowPageText is what a
|
|
42
|
+
* person reads ("/café").
|
|
36
43
|
* - journey: one session's pages in order, after grouping and hiding,
|
|
37
44
|
* with back-to-back repeats collapsed.
|
|
38
45
|
* - step: a column of the flow map. Step 0 is the session's first page,
|
|
@@ -115,15 +122,17 @@ function parsePageUrl(rawUrl) {
|
|
|
115
122
|
const parsed = new URL(trimmed, RELATIVE_BASE);
|
|
116
123
|
const isRelative = parsed.origin === RELATIVE_BASE && !trimmed.startsWith(RELATIVE_BASE);
|
|
117
124
|
/*
|
|
118
|
-
* A hash router keeps its route in the fragment ("/#/orders"
|
|
119
|
-
*
|
|
120
|
-
*
|
|
125
|
+
* A hash router keeps its route in the fragment ("/#/orders",
|
|
126
|
+
* "/#!/orders"), and the scrubber keeps that route in every URL it
|
|
127
|
+
* stores. The route is the page, so those apps do not collapse onto
|
|
128
|
+
* "/"; the query a route can carry inside the fragment is left out,
|
|
129
|
+
* as a path's query is.
|
|
121
130
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
const hashRoute = UrlScrubber_1.default.getHashRoute(parsed.hash);
|
|
132
|
+
return {
|
|
133
|
+
host: isRelative ? "" : parsed.host,
|
|
134
|
+
path: hashRoute === null ? parsed.pathname || "/" : hashRoute,
|
|
135
|
+
};
|
|
127
136
|
}
|
|
128
137
|
catch (_a) {
|
|
129
138
|
return { host: "", path: trimmed };
|
|
@@ -153,10 +162,15 @@ function normalizePath(path, groupDynamicSegments) {
|
|
|
153
162
|
* The flow-map key for one stored URL. Query strings are dropped (the
|
|
154
163
|
* scrubber keeps only redacted allowlisted parameters, which would split
|
|
155
164
|
* one page into two), and the host is kept only when asked.
|
|
165
|
+
*
|
|
166
|
+
* The path is in its one spelling (UrlScrubber.normalizePathSpelling):
|
|
167
|
+
* "/caf%c3%a9", "/cafe%CC%81" and "/caf%C3%A9" are one page, "/a%2Fb" and
|
|
168
|
+
* "/a/b" two. The scrubber stores that spelling; a URL stored before it
|
|
169
|
+
* did is keyed the same way here.
|
|
156
170
|
*/
|
|
157
171
|
function toUserFlowPageKey(rawUrl, options) {
|
|
158
172
|
const parsed = parsePageUrl(rawUrl);
|
|
159
|
-
const path = normalizePath(parsed.path, options.groupDynamicSegments);
|
|
173
|
+
const path = normalizePath(UrlScrubber_1.default.normalizePathSpelling(parsed.path), options.groupDynamicSegments);
|
|
160
174
|
if (options.includeHost && parsed.host) {
|
|
161
175
|
return `${parsed.host}${path}`;
|
|
162
176
|
}
|
|
@@ -182,7 +196,9 @@ function spansMultipleHosts(rawUrls) {
|
|
|
182
196
|
/*
|
|
183
197
|
* The URL-path prefix that selects a page key in the session list's
|
|
184
198
|
* urlPrefix filter: "/product/:id" -> "/product/", host dropped. The list
|
|
185
|
-
* matches prefixes, so a grouped key is widened to its static head.
|
|
199
|
+
* matches prefixes, so a grouped key is widened to its static head. It
|
|
200
|
+
* matches every spelling of the key's path, as a key reads them
|
|
201
|
+
* (SessionReplayReadService's url arms).
|
|
186
202
|
*/
|
|
187
203
|
function toSessionListUrlPrefix(page) {
|
|
188
204
|
if (!page || page === exports.OTHER_PAGES_KEY) {
|
|
@@ -196,8 +212,143 @@ function toSessionListUrlPrefix(page) {
|
|
|
196
212
|
}
|
|
197
213
|
return path;
|
|
198
214
|
}
|
|
199
|
-
|
|
200
|
-
|
|
215
|
+
/* ------------------------------------------------------------------ */
|
|
216
|
+
/* A page as a person reads it */
|
|
217
|
+
/* ------------------------------------------------------------------ */
|
|
218
|
+
// One escaped byte: "%D8".
|
|
219
|
+
const ESCAPED_BYTE_REGEX = /^%[0-9A-Fa-f]{2}$/;
|
|
220
|
+
// A letter, a mark (an accent, a vowel sign) or a digit, of any script.
|
|
221
|
+
const WORD_CHARACTER_REGEX = /^[\p{L}\p{M}\p{N}]$/u;
|
|
222
|
+
// Drawn with no width at all: a filler that looks like nothing, a selector.
|
|
223
|
+
const NO_WIDTH_CHARACTER_REGEX = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
224
|
+
/*
|
|
225
|
+
* ZERO WIDTH NON-JOINER and ZERO WIDTH JOINER have no width either, but
|
|
226
|
+
* they are part of a word: Persian keeps the parts of one word apart
|
|
227
|
+
* with the first, and Hindi parts and joins its letters with both.
|
|
228
|
+
*/
|
|
229
|
+
const WORD_JOINERS = [
|
|
230
|
+
String.fromCharCode(0x200c),
|
|
231
|
+
String.fromCharCode(0x200d),
|
|
232
|
+
];
|
|
233
|
+
/*
|
|
234
|
+
* How many bytes the character led by `byte` takes in UTF-8: 2 to 4, or 0
|
|
235
|
+
* for an ASCII byte, a byte in the middle of a character and a lead UTF-8
|
|
236
|
+
* never writes ("%C0%AF" is "/" written too long, which no decoder takes).
|
|
237
|
+
*/
|
|
238
|
+
function getUtf8Length(byte) {
|
|
239
|
+
if (byte >= 0xc2 && byte <= 0xdf) {
|
|
240
|
+
return 2;
|
|
241
|
+
}
|
|
242
|
+
if (byte >= 0xe0 && byte <= 0xef) {
|
|
243
|
+
return 3;
|
|
244
|
+
}
|
|
245
|
+
if (byte >= 0xf0 && byte <= 0xf4) {
|
|
246
|
+
return 4;
|
|
247
|
+
}
|
|
248
|
+
return 0;
|
|
249
|
+
}
|
|
250
|
+
/*
|
|
251
|
+
* The character `escapes` spell, when it is one a person reads as part of
|
|
252
|
+
* a word; null for anything else, and for bytes that are not UTF-8: a
|
|
253
|
+
* sequence cut short, one written too long, a surrogate
|
|
254
|
+
* (decodeURIComponent refuses each).
|
|
255
|
+
*/
|
|
256
|
+
function decodeWordCharacter(escapes) {
|
|
257
|
+
for (let at = 0; at < escapes.length; at += 3) {
|
|
258
|
+
if (!ESCAPED_BYTE_REGEX.test(escapes.slice(at, at + 3))) {
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
let character;
|
|
263
|
+
try {
|
|
264
|
+
character = decodeURIComponent(escapes);
|
|
265
|
+
}
|
|
266
|
+
catch (_a) {
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
if (WORD_JOINERS.includes(character)) {
|
|
270
|
+
return character;
|
|
271
|
+
}
|
|
272
|
+
return WORD_CHARACTER_REGEX.test(character) &&
|
|
273
|
+
!NO_WIDTH_CHARACTER_REGEX.test(character)
|
|
274
|
+
? character
|
|
275
|
+
: null;
|
|
276
|
+
}
|
|
277
|
+
// `path` with each escape of a word's letter decoded (getUserFlowPageText).
|
|
278
|
+
function decodeWordEscapes(path) {
|
|
279
|
+
if (!path.includes("%")) {
|
|
280
|
+
return path;
|
|
281
|
+
}
|
|
282
|
+
let decoded = "";
|
|
283
|
+
let index = 0;
|
|
284
|
+
while (index < path.length) {
|
|
285
|
+
const escape = path.slice(index, index + 3);
|
|
286
|
+
if (!ESCAPED_BYTE_REGEX.test(escape)) {
|
|
287
|
+
decoded += path.charAt(index);
|
|
288
|
+
index += 1;
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
const length = getUtf8Length(parseInt(escape.slice(1), 16)) * 3;
|
|
292
|
+
const character = length > 0
|
|
293
|
+
? decodeWordCharacter(path.slice(index, index + length))
|
|
294
|
+
: null;
|
|
295
|
+
if (character === null) {
|
|
296
|
+
decoded += escape;
|
|
297
|
+
index += 3;
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
decoded += character;
|
|
301
|
+
index += length;
|
|
302
|
+
}
|
|
303
|
+
return decoded;
|
|
304
|
+
}
|
|
305
|
+
/*
|
|
306
|
+
* A PAGE AS A PERSON READS IT: what the map, its tooltips, the panel, the
|
|
307
|
+
* tables, the journeys and every sentence about a page draw for its key.
|
|
308
|
+
*
|
|
309
|
+
* A key is the path as the URL parser writes it, and the parser escapes
|
|
310
|
+
* every letter outside ASCII: "/الرئيسية" is "/%D8%A7%D9%84...", "/café"
|
|
311
|
+
* is "/caf%C3%A9". The key stays so. The session list matches it against
|
|
312
|
+
* the stored URLs, which the browser escaped the same way
|
|
313
|
+
* (toSessionListUrlPrefix); the anchor, the hidden pages and the link to
|
|
314
|
+
* this page hold it. Only the words drawn for it are decoded.
|
|
315
|
+
*
|
|
316
|
+
* Only an escape of a letter, a mark or a digit beyond ASCII is decoded:
|
|
317
|
+
* the words of a path in Arabic, Persian, Chinese or with accents, and the
|
|
318
|
+
* joiners inside a Persian or Hindi word. None of them is a separator, so
|
|
319
|
+
* decoding one never changes which page a key names. The same words
|
|
320
|
+
* written two ways - in lower-case escapes ("%c3%a9", as WordPress writes
|
|
321
|
+
* them) and upper-case ones ("%C3%A9"), or with an accent composed and
|
|
322
|
+
* decomposed - are one key, so one row (toUserFlowPageKey). The rest is
|
|
323
|
+
* drawn as written:
|
|
324
|
+
* - an escaped "/", "?", "#" or "%", which would read as a separator, a
|
|
325
|
+
* query, a fragment or another escape: "/a%2Fb" is one page, and not
|
|
326
|
+
* "/a/b", which may be another;
|
|
327
|
+
* - any other escape of an ASCII character, which a key can hold
|
|
328
|
+
* unescaped too: "%20" stays "%20";
|
|
329
|
+
* - punctuation and symbols, among them the signs drawn like a slash
|
|
330
|
+
* ("∕", "/"); spaces, controls and the marks that turn text round,
|
|
331
|
+
* which would move the words drawn round the path; and characters with
|
|
332
|
+
* no width, which would hide part of it;
|
|
333
|
+
* - bytes that are not UTF-8: a lone "%", "%E0%A4" cut short.
|
|
334
|
+
*
|
|
335
|
+
* A path reads from the left on every page, its "/" first, and the Arabic
|
|
336
|
+
* or Persian words in it still read from the right (RFC 3987's
|
|
337
|
+
* bidirectional IRIs, as a browser's address bar draws them). Read the
|
|
338
|
+
* way its letters do, "/الرئيسية" would be drawn "الرئيسية/". So a path
|
|
339
|
+
* with a letter of a script read from the right is set apart, left to
|
|
340
|
+
* right (LRI ... PDI), and reads so wherever it is drawn: in a box of its
|
|
341
|
+
* own, in a sentence, on either side of a transition's arrow, in an
|
|
342
|
+
* option. A path in letters read from the left needs nothing, and comes
|
|
343
|
+
* back exactly as before. The fold comes back as its English name, which
|
|
344
|
+
* the Dashboard words in the reader's language.
|
|
345
|
+
*/
|
|
346
|
+
function getUserFlowPageText(page) {
|
|
347
|
+
if (page === exports.OTHER_PAGES_KEY) {
|
|
348
|
+
return exports.OTHER_PAGES_LABEL;
|
|
349
|
+
}
|
|
350
|
+
// A line read from the left sets a value apart for its right-to-left letters.
|
|
351
|
+
return (0, PathInSentence_1.setPathApartInSentence)(decodeWordEscapes(page));
|
|
201
352
|
}
|
|
202
353
|
/* ------------------------------------------------------------------ */
|
|
203
354
|
/* Journeys */
|
|
@@ -442,7 +593,7 @@ function buildUserFlowGraph(journeys, options) {
|
|
|
442
593
|
id: id,
|
|
443
594
|
step: step,
|
|
444
595
|
page: key,
|
|
445
|
-
label:
|
|
596
|
+
label: getUserFlowPageText(key),
|
|
446
597
|
isOther: isOther,
|
|
447
598
|
otherPages: [],
|
|
448
599
|
sessions: 0,
|
|
@@ -827,7 +978,8 @@ function sessionsNoun(count) {
|
|
|
827
978
|
/*
|
|
828
979
|
* At most one finding per kind, each over the sample floor, ordered by how
|
|
829
980
|
* much they should worry someone. Every number in the copy is one the page
|
|
830
|
-
* also shows, so a finding can always be checked against the map
|
|
981
|
+
* also shows, so a finding can always be checked against the map, and each
|
|
982
|
+
* page is named as the map names it (getUserFlowPageText).
|
|
831
983
|
*/
|
|
832
984
|
function buildUserFlowInsights(journeys, pages, loops) {
|
|
833
985
|
var _a;
|
|
@@ -862,15 +1014,16 @@ function buildUserFlowInsights(journeys, pages, loops) {
|
|
|
862
1014
|
}
|
|
863
1015
|
const count = pick(page);
|
|
864
1016
|
const share = ratio(count, page.sessions);
|
|
1017
|
+
const name = getUserFlowPageText(page.page);
|
|
865
1018
|
insights.push({
|
|
866
1019
|
kind: kind,
|
|
867
1020
|
tone: kind === "error-hotspot" ? "danger" : "warning",
|
|
868
1021
|
title: kind === "error-hotspot"
|
|
869
|
-
? `Errors concentrate on ${
|
|
870
|
-
: `Frustration concentrates on ${
|
|
1022
|
+
? `Errors concentrate on ${name}`
|
|
1023
|
+
: `Frustration concentrates on ${name}`,
|
|
871
1024
|
detail: kind === "error-hotspot"
|
|
872
|
-
? `${formatShare(share)} of the sessions that visited ${
|
|
873
|
-
: `${formatShare(share)} of the sessions that visited ${
|
|
1025
|
+
? `${formatShare(share)} of the sessions that visited ${name} hit an error there (${sessionsNoun(count)}).`
|
|
1026
|
+
: `${formatShare(share)} of the sessions that visited ${name} rage-clicked, dead-clicked or reloaded in frustration there (${sessionsNoun(count)}).`,
|
|
874
1027
|
page: page.page,
|
|
875
1028
|
focusDirection: "forward",
|
|
876
1029
|
sessions: count,
|
|
@@ -908,11 +1061,12 @@ function buildUserFlowInsights(journeys, pages, loops) {
|
|
|
908
1061
|
if (dropOff) {
|
|
909
1062
|
const leftAfterNavigating = dropOff.exits - dropOff.bounces;
|
|
910
1063
|
const share = ratio(leftAfterNavigating, dropOff.sessions - dropOff.bounces);
|
|
1064
|
+
const name = getUserFlowPageText(dropOff.page);
|
|
911
1065
|
insights.push({
|
|
912
1066
|
kind: "drop-off",
|
|
913
1067
|
tone: share >= 0.5 ? "danger" : "warning",
|
|
914
|
-
title: `Journeys end on ${
|
|
915
|
-
detail: `${formatShare(share)} of the sessions that navigated to ${
|
|
1068
|
+
title: `Journeys end on ${name}`,
|
|
1069
|
+
detail: `${formatShare(share)} of the sessions that navigated to ${name} left the application there (${sessionsNoun(leftAfterNavigating)}).`,
|
|
916
1070
|
page: dropOff.page,
|
|
917
1071
|
focusDirection: "backward",
|
|
918
1072
|
sessions: leftAfterNavigating,
|
|
@@ -927,7 +1081,7 @@ function buildUserFlowInsights(journeys, pages, loops) {
|
|
|
927
1081
|
insights.push({
|
|
928
1082
|
kind: "loop",
|
|
929
1083
|
tone: "warning",
|
|
930
|
-
title: `Visitors go back and forth between ${loop.pageA} and ${loop.pageB}`,
|
|
1084
|
+
title: `Visitors go back and forth between ${getUserFlowPageText(loop.pageA)} and ${getUserFlowPageText(loop.pageB)}`,
|
|
931
1085
|
detail: `${formatShare(loop.share)} of sessions (${sessionsNoun(loop.sessions)}) left one of these pages for the other and came straight back - often a sign that what they needed was not where they looked first.`,
|
|
932
1086
|
page: loop.pageA,
|
|
933
1087
|
secondaryPage: loop.pageB,
|
|
@@ -950,11 +1104,12 @@ function buildUserFlowInsights(journeys, pages, loops) {
|
|
|
950
1104
|
entry.entries > 0 &&
|
|
951
1105
|
((_a = byEntries[1]) === null || _a === void 0 ? void 0 : _a.entries) !== entry.entries) {
|
|
952
1106
|
const share = ratio(entry.entries, total);
|
|
1107
|
+
const name = getUserFlowPageText(entry.page);
|
|
953
1108
|
insights.push({
|
|
954
1109
|
kind: "top-entry",
|
|
955
1110
|
tone: "neutral",
|
|
956
|
-
title: `Most sessions start on ${
|
|
957
|
-
detail: `${formatShare(share)} of sessions (${sessionsNoun(entry.entries)}) landed on ${
|
|
1111
|
+
title: `Most sessions start on ${name}`,
|
|
1112
|
+
detail: `${formatShare(share)} of sessions (${sessionsNoun(entry.entries)}) landed on ${name}; ${formatShare(ratio(entry.bounces, entry.entries))} of them saw no other page.`,
|
|
958
1113
|
page: entry.page,
|
|
959
1114
|
focusDirection: "forward",
|
|
960
1115
|
sessions: entry.entries,
|
|
@@ -966,12 +1121,30 @@ function buildUserFlowInsights(journeys, pages, loops) {
|
|
|
966
1121
|
/* ------------------------------------------------------------------ */
|
|
967
1122
|
/* Entry point */
|
|
968
1123
|
/* ------------------------------------------------------------------ */
|
|
1124
|
+
/*
|
|
1125
|
+
* The anchor and the hidden pages are page keys, in the key's one spelling
|
|
1126
|
+
* (UrlScrubber.normalizePathSpelling, as toUserFlowPageKey writes them). A
|
|
1127
|
+
* link made before the keys had one spelling still holds the spelling its
|
|
1128
|
+
* session was stored in - "/caf%c3%a9", "/cafe%CC%81" - which no row has any
|
|
1129
|
+
* more: the anchor was lost and the hidden page shown again. Read in the
|
|
1130
|
+
* key's spelling, it names the row it named, and the page writes the link
|
|
1131
|
+
* back in that spelling.
|
|
1132
|
+
*/
|
|
969
1133
|
function normalizeUserFlowOptions(options) {
|
|
970
1134
|
const merged = Object.assign(Object.assign({}, exports.DEFAULT_USER_FLOW_OPTIONS), options);
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1135
|
+
const anchorPage = merged.anchorPage
|
|
1136
|
+
? UrlScrubber_1.default.normalizePathSpelling(merged.anchorPage)
|
|
1137
|
+
: null;
|
|
1138
|
+
/* Once each, in the order given: a pasted link can repeat a key. */
|
|
1139
|
+
const hiddenPages = new Set();
|
|
1140
|
+
for (const page of merged.hiddenPages || []) {
|
|
1141
|
+
const key = page ? UrlScrubber_1.default.normalizePathSpelling(page) : "";
|
|
1142
|
+
/* The anchor cannot be hidden: the map would have nothing to draw. */
|
|
1143
|
+
if (key && key !== anchorPage) {
|
|
1144
|
+
hiddenPages.add(key);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
return Object.assign(Object.assign({}, merged), { anchorPage: anchorPage, direction: merged.direction === "backward" ? "backward" : "forward", steps: clamp(merged.steps, exports.USER_FLOW_MIN_STEPS, exports.USER_FLOW_MAX_STEPS), pagesPerStep: clamp(merged.pagesPerStep, exports.USER_FLOW_MIN_PAGES_PER_STEP, exports.USER_FLOW_MAX_PAGES_PER_STEP), hiddenPages: Array.from(hiddenPages) });
|
|
975
1148
|
}
|
|
976
1149
|
function analyzeUserFlow(response, partialOptions = {}) {
|
|
977
1150
|
const options = normalizeUserFlowOptions(partialOptions);
|
package/Utils/Rum/UserFlow.mjs
CHANGED
|
@@ -23,7 +23,7 @@ export const buildUserFlowLoops = commonJsModule.buildUserFlowLoops;
|
|
|
23
23
|
export const buildUserFlowPageStats = commonJsModule.buildUserFlowPageStats;
|
|
24
24
|
export const buildUserFlowPaths = commonJsModule.buildUserFlowPaths;
|
|
25
25
|
export const buildUserFlowSummary = commonJsModule.buildUserFlowSummary;
|
|
26
|
-
export const
|
|
26
|
+
export const getUserFlowPageText = commonJsModule.getUserFlowPageText;
|
|
27
27
|
export const isDynamicPathSegment = commonJsModule.isDynamicPathSegment;
|
|
28
28
|
export const normalizeUserFlowOptions = commonJsModule.normalizeUserFlowOptions;
|
|
29
29
|
export const sliceJourneyForMap = commonJsModule.sliceJourneyForMap;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getRunbookStepsSignature = void 0;
|
|
7
|
+
const StableStringify_1 = __importDefault(require("../StableStringify"));
|
|
8
|
+
/*
|
|
9
|
+
* A runbook's steps as Save Steps writes them, in one string: in the order
|
|
10
|
+
* they run, each numbered by its place (Save Steps writes order 0, 1, 2...),
|
|
11
|
+
* with every object's keys sorted and a key left undefined left out, as
|
|
12
|
+
* JSON leaves it out.
|
|
13
|
+
*
|
|
14
|
+
* The same steps give the same string however their objects were built - a
|
|
15
|
+
* step handed back by an editor unchanged, a config spread into a copy in
|
|
16
|
+
* another order. Any change Save Steps would write gives another: a step
|
|
17
|
+
* added, removed, moved or edited, a switch flipped.
|
|
18
|
+
*
|
|
19
|
+
* The Steps page compares its steps with the ones last loaded or saved: a
|
|
20
|
+
* change undone - a step moved and moved back, a switch flipped twice -
|
|
21
|
+
* leaves nothing unsaved, so Save Steps rests, no "Unsaved changes" shows,
|
|
22
|
+
* and leaving asks nothing.
|
|
23
|
+
*/
|
|
24
|
+
const getRunbookStepsSignature = (steps) => {
|
|
25
|
+
return (0, StableStringify_1.default)(steps.map((step, index) => {
|
|
26
|
+
return Object.assign(Object.assign({}, step), { order: index });
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
exports.getRunbookStepsSignature = getRunbookStepsSignature;
|
|
30
|
+
exports.default = exports.getRunbookStepsSignature;
|
|
@@ -70,6 +70,12 @@ function getPhoneSchema() {
|
|
|
70
70
|
}).openapi({
|
|
71
71
|
type: "object",
|
|
72
72
|
description: "Phone object",
|
|
73
|
+
/*
|
|
74
|
+
* Machine-readable marker, as on the DateTime wrapper: the Terraform
|
|
75
|
+
* provider generator writes a phone number as a plain string, compared
|
|
76
|
+
* as OneUptime keeps it (as written, or as its digits).
|
|
77
|
+
*/
|
|
78
|
+
"x-oneuptime-type": JSON_1.ObjectType.Phone,
|
|
73
79
|
example: { _type: JSON_1.ObjectType.Phone, value: "+1-555-123-4567" },
|
|
74
80
|
});
|
|
75
81
|
}
|