@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.
Files changed (527) hide show
  1. package/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
  2. package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
  3. package/Models/DatabaseModels/AIRunRecording.js +181 -0
  4. package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
  5. package/Models/DatabaseModels/Alert.d.mts +1 -0
  6. package/Models/DatabaseModels/Alert.d.ts +1 -0
  7. package/Models/DatabaseModels/Alert.js +52 -2
  8. package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
  9. package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
  10. package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
  11. package/Models/DatabaseModels/DataStore.js +9 -0
  12. package/Models/DatabaseModels/EmailLog.js +2 -2
  13. package/Models/DatabaseModels/Form.js +3 -3
  14. package/Models/DatabaseModels/FormSubmission.js +4 -4
  15. package/Models/DatabaseModels/GlobalConfig.js +46 -45
  16. package/Models/DatabaseModels/Incident.d.mts +1 -0
  17. package/Models/DatabaseModels/Incident.d.ts +1 -0
  18. package/Models/DatabaseModels/Incident.js +53 -2
  19. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
  20. package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
  21. package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
  22. package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
  23. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  24. package/Models/DatabaseModels/Index.js +6 -0
  25. package/Models/DatabaseModels/InventoryItem.js +11 -0
  26. package/Models/DatabaseModels/Monitor.js +51 -17
  27. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  28. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  29. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  30. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  31. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  32. package/Models/DatabaseModels/NetworkDevice.js +23 -7
  33. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  34. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  35. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  36. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  37. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
  38. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  39. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  40. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
  41. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  42. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  43. package/Models/DatabaseModels/Project.d.mts +1 -0
  44. package/Models/DatabaseModels/Project.d.ts +1 -0
  45. package/Models/DatabaseModels/Project.js +46 -3
  46. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  47. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  48. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  49. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  50. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  51. package/Models/DatabaseModels/RunbookRule.js +6 -6
  52. package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
  53. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  54. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  55. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  56. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
  57. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  58. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  59. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  60. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
  61. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  62. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
  63. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  64. package/Models/DatabaseModels/TeamMember.js +10 -1
  65. package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
  66. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  67. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  68. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  69. package/Server/Services/DatabaseService.d.mts +4 -1
  70. package/Server/Services/DatabaseService.d.ts +4 -1
  71. package/Server/Types/Database/CountBy.d.mts +1 -0
  72. package/Server/Types/Database/CountBy.d.ts +1 -0
  73. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  74. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  75. package/Types/AI/AIActionWords.d.mts +28 -2
  76. package/Types/AI/AIActionWords.d.ts +28 -2
  77. package/Types/AI/AIActionWords.js +235 -3
  78. package/Types/AI/AIActionWords.mjs +8 -0
  79. package/Types/AI/AIChatTypes.d.mts +3 -1
  80. package/Types/AI/AIChatTypes.d.ts +3 -1
  81. package/Types/AI/AIReadTableWords.d.mts +192 -0
  82. package/Types/AI/AIReadTableWords.d.ts +192 -0
  83. package/Types/AI/AIReadTableWords.js +368 -0
  84. package/Types/AI/AIReadTableWords.mjs +18 -0
  85. package/Types/AI/AiOutcomes.d.mts +57 -0
  86. package/Types/AI/AiOutcomes.d.ts +57 -0
  87. package/Types/AI/AiOutcomes.js +67 -0
  88. package/Types/AI/AiOutcomes.mjs +10 -0
  89. package/Types/AI/AiRunRefusal.d.mts +48 -0
  90. package/Types/AI/AiRunRefusal.d.ts +48 -0
  91. package/Types/AI/AiRunRefusal.js +208 -0
  92. package/Types/AI/AiRunRefusal.mjs +12 -0
  93. package/Types/AI/InvestigationRecording.d.mts +46 -0
  94. package/Types/AI/InvestigationRecording.d.ts +46 -0
  95. package/Types/AI/InvestigationRecording.js +42 -0
  96. package/Types/AI/InvestigationRecording.mjs +7 -0
  97. package/Types/AI/ResourceAiAccessPermissions.js +7 -18
  98. package/Types/API/HTTPResponse.d.mts +3 -0
  99. package/Types/API/HTTPResponse.d.ts +3 -0
  100. package/Types/API/HTTPResponse.js +15 -0
  101. package/Types/AuditLog/AuditLogActionLabel.js +19 -9
  102. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  103. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  104. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
  105. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
  106. package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -2
  107. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  108. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  109. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  110. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  111. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  112. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  113. package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
  114. package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
  115. package/Types/Cloud/CloudResourceHealth.js +405 -13
  116. package/Types/Cloud/CloudResourceHealth.mjs +28 -0
  117. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  118. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  119. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  120. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  121. package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
  122. package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
  123. package/Types/DataObservability/DataCheckRefusals.js +77 -0
  124. package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
  125. package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
  126. package/Types/Date.d.mts +8 -1
  127. package/Types/Date.d.ts +8 -1
  128. package/Types/Date.js +61 -7
  129. package/Types/Date.mjs +1 -0
  130. package/Types/DateLanguage.d.mts +2 -0
  131. package/Types/DateLanguage.d.ts +2 -0
  132. package/Types/DateLanguage.js +8 -5
  133. package/Types/Email/EmailTemplateType.d.mts +1 -0
  134. package/Types/Email/EmailTemplateType.d.ts +1 -0
  135. package/Types/Email/EmailTemplateType.js +2 -0
  136. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  137. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  138. package/Types/Email/ServerEmailEnvironment.js +793 -0
  139. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  140. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  141. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  142. package/Types/Exception/AiRunRefusalException.js +23 -0
  143. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  144. package/Types/Exception/EgressGuardException.js +1 -1
  145. package/Types/Exception/ErrorMessageRule.d.mts +1 -0
  146. package/Types/Exception/ErrorMessageRule.d.ts +1 -0
  147. package/Types/Exception/ErrorMessageRule.js +67 -13
  148. package/Types/Exception/ErrorMessageRule.mjs +1 -0
  149. package/Types/Exception/ExceptionMessages.d.mts +2 -0
  150. package/Types/Exception/ExceptionMessages.d.ts +2 -0
  151. package/Types/Exception/ExceptionMessages.js +2 -0
  152. package/Types/Form/FormTargetCatalog.js +2 -2
  153. package/Types/Form/FormTargetType.js +2 -2
  154. package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
  155. package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
  156. package/Types/Incident/PostmortemActionItemStatus.js +74 -0
  157. package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
  158. package/Types/JSONFunctions.js +10 -3
  159. package/Types/Link.d.mts +1 -0
  160. package/Types/Link.d.ts +1 -0
  161. package/Types/ListData.d.mts +2 -0
  162. package/Types/ListData.d.ts +2 -0
  163. package/Types/ListData.js +4 -0
  164. package/Types/MeaningKeys.d.mts +4 -0
  165. package/Types/MeaningKeys.d.ts +4 -0
  166. package/Types/MeaningKeys.js +74 -0
  167. package/Types/MeaningKeys.mjs +5 -0
  168. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  169. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  170. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  171. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  172. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  173. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  174. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  175. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  176. package/Types/Monitor/WhoIsTold.d.mts +3 -0
  177. package/Types/Monitor/WhoIsTold.d.ts +3 -0
  178. package/Types/Monitor/WhoIsTold.js +63 -13
  179. package/Types/NoBreakSpaces.d.mts +16 -0
  180. package/Types/NoBreakSpaces.d.ts +16 -0
  181. package/Types/NoBreakSpaces.js +419 -0
  182. package/Types/NoBreakSpaces.mjs +9 -0
  183. package/Types/NotificationRule/PagingLadder.d.mts +12 -0
  184. package/Types/NotificationRule/PagingLadder.d.ts +12 -0
  185. package/Types/NotificationRule/PagingLadder.js +159 -11
  186. package/Types/NotificationRule/PagingLadder.mjs +3 -0
  187. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  188. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  189. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  190. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  191. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  192. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  193. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  194. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  195. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  196. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  197. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
  198. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
  199. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
  200. package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
  201. package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
  202. package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
  203. package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
  204. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
  205. package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
  206. package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
  207. package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
  208. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  209. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  210. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  211. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  212. package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
  213. package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
  214. package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
  215. package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
  216. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  217. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  218. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  219. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  220. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  221. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  222. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  223. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  224. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  225. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  226. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  227. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  228. package/Types/OpenStack/OpenStackCapacity.js +12 -5
  229. package/Types/Permission.d.mts +4 -0
  230. package/Types/Permission.d.ts +4 -0
  231. package/Types/Permission.js +66 -10
  232. package/Types/Probe/ProbeCapability.d.mts +2 -1
  233. package/Types/Probe/ProbeCapability.d.ts +2 -1
  234. package/Types/Probe/ProbeCapability.js +10 -0
  235. package/Types/Product/ProductUsage.js +2 -1
  236. package/Types/Product/ProjectProductsAnswer.js +2 -1
  237. package/Types/ReaderLanguage.d.mts +1 -0
  238. package/Types/ReaderLanguage.d.ts +1 -0
  239. package/Types/ReaderLanguage.js +13 -1
  240. package/Types/ReaderLanguage.mjs +1 -0
  241. package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
  242. package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
  243. package/Types/ResourceAiAgent/AiResourceType.js +12 -0
  244. package/Types/Rules/RuleRun.js +2 -2
  245. package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
  246. package/Types/Rum/ProductAnalyticsEvents.js +13 -1
  247. package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
  248. package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
  249. package/Types/Rum/SessionReplayCustomEvents.js +12 -0
  250. package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
  251. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  252. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  253. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  254. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  255. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  256. package/Types/SetupHealth/SetupHealth.d.mts +1 -0
  257. package/Types/SetupHealth/SetupHealth.d.ts +1 -0
  258. package/Types/SetupHealth/SetupHealth.js +13 -5
  259. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  260. package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
  261. package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
  262. package/Types/StatusPage/DefaultStatusNames.js +74 -28
  263. package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
  264. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  265. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  266. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  267. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  268. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  269. package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
  270. package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
  271. package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
  272. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  273. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  274. package/Types/Telemetry/CompatibleIngest.js +123 -0
  275. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  276. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  277. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  278. package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
  279. package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
  280. package/Types/TimezoneAlias.d.mts +1 -0
  281. package/Types/TimezoneAlias.d.ts +1 -0
  282. package/Types/TimezoneAlias.js +13 -0
  283. package/Types/Translator.d.mts +1 -0
  284. package/Types/Translator.d.ts +1 -0
  285. package/Types/Translator.js +470 -63
  286. package/Types/Translator.mjs +1 -0
  287. package/Types/UserSession/SessionLength.d.mts +33 -0
  288. package/Types/UserSession/SessionLength.d.ts +33 -0
  289. package/Types/UserSession/SessionLength.js +134 -5
  290. package/Types/UserSession/SessionLength.mjs +5 -0
  291. package/Types/Workflow/RunRecord.js +1 -1
  292. package/Types/Workflow/Templates.js +2 -2
  293. package/Types/Workflow/WorkflowStatus.js +21 -10
  294. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  295. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  296. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
  297. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
  298. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  299. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  300. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  301. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  302. package/Utils/AI/InvestigationReport.js +2 -2
  303. package/Utils/API.d.mts +0 -11
  304. package/Utils/API.d.ts +0 -11
  305. package/Utils/API.js +0 -432
  306. package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
  307. package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
  308. package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
  309. package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
  310. package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
  311. package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
  312. package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
  313. package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
  314. package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
  315. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  316. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  317. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  318. package/Utils/DefaultRecordNames.d.mts +6 -0
  319. package/Utils/DefaultRecordNames.d.ts +6 -0
  320. package/Utils/DefaultRecordNames.js +122 -0
  321. package/Utils/DefaultRecordNames.mjs +6 -0
  322. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  323. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  324. package/Utils/Grok/Grok.js +7 -4
  325. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  326. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  327. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  328. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  329. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  330. package/Utils/HostAddressUtil.d.mts +1 -0
  331. package/Utils/HostAddressUtil.d.ts +1 -0
  332. package/Utils/HostAddressUtil.js +30 -0
  333. package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
  334. package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
  335. package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
  336. package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
  337. package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
  338. package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
  339. package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
  340. package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
  341. package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
  342. package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
  343. package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
  344. package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
  345. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  346. package/Utils/LookupTable.d.mts +3 -0
  347. package/Utils/LookupTable.d.ts +3 -0
  348. package/Utils/LookupTable.js +61 -0
  349. package/Utils/LookupTable.mjs +3 -0
  350. package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
  351. package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
  352. package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
  353. package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
  354. package/Utils/Markdown/OverLongText.js +296 -2
  355. package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
  356. package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
  357. package/Utils/Markdown/SlowMarkdown.js +354 -4
  358. package/Utils/Markdown/SlowMarkdown.mjs +1 -0
  359. package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
  360. package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
  361. package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
  362. package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
  363. package/Utils/Metrics/MetricSeriesScope.js +5 -1
  364. package/Utils/Milliseconds.d.mts +7 -0
  365. package/Utils/Milliseconds.d.ts +7 -0
  366. package/Utils/Milliseconds.js +60 -0
  367. package/Utils/Milliseconds.mjs +4 -0
  368. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  369. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  370. package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
  371. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  372. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  373. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  374. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  375. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  376. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  377. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  378. package/Utils/Monitor/MonitorRootCauseWording.d.mts +5 -0
  379. package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
  380. package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
  381. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  382. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  383. package/Utils/Monitor/MonitoringOff.js +21 -0
  384. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  385. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  386. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  387. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  388. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  389. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  390. package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
  391. package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
  392. package/Utils/Monitor/ProbeAgreementRule.js +58 -0
  393. package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
  394. package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
  395. package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
  396. package/Utils/Monitor/ProbeFailureReading.js +166 -0
  397. package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
  398. package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
  399. package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
  400. package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
  401. package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
  402. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  403. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  404. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  405. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  406. package/Utils/Project/NextNumber.js +1 -1
  407. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  408. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  409. package/Utils/PromQL/PromQLAst.js +118 -0
  410. package/Utils/PromQL/PromQLAst.mjs +12 -0
  411. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  412. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  413. package/Utils/PromQL/PromQLDuration.js +78 -0
  414. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  415. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  416. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  417. package/Utils/PromQL/PromQLEngine.js +974 -0
  418. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  419. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  420. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  421. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  422. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  423. package/Utils/PromQL/PromQLError.d.mts +11 -0
  424. package/Utils/PromQL/PromQLError.d.ts +11 -0
  425. package/Utils/PromQL/PromQLError.js +27 -0
  426. package/Utils/PromQL/PromQLError.mjs +3 -0
  427. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  428. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  429. package/Utils/PromQL/PromQLFunctionEvaluators.js +829 -0
  430. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  431. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  432. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  433. package/Utils/PromQL/PromQLFunctions.js +127 -0
  434. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  435. package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
  436. package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
  437. package/Utils/PromQL/PromQLLabelOrder.js +212 -0
  438. package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
  439. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  440. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  441. package/Utils/PromQL/PromQLLabels.js +219 -0
  442. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  443. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  444. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  445. package/Utils/PromQL/PromQLLexer.js +391 -0
  446. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  447. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  448. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  449. package/Utils/PromQL/PromQLMath.js +200 -0
  450. package/Utils/PromQL/PromQLMath.mjs +9 -0
  451. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  452. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  453. package/Utils/PromQL/PromQLMetricNames.js +205 -0
  454. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  455. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  456. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  457. package/Utils/PromQL/PromQLParser.js +836 -0
  458. package/Utils/PromQL/PromQLParser.mjs +4 -0
  459. package/Utils/PromQL/PromQLRegex.d.mts +20 -0
  460. package/Utils/PromQL/PromQLRegex.d.ts +20 -0
  461. package/Utils/PromQL/PromQLRegex.js +1014 -0
  462. package/Utils/PromQL/PromQLRegex.mjs +5 -0
  463. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  464. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  465. package/Utils/PromQL/PrometheusResponse.js +92 -0
  466. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  467. package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
  468. package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
  469. package/Utils/PromQL/RE2CharacterClass.js +532 -0
  470. package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
  471. package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
  472. package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
  473. package/Utils/RequestFailedDetailsUtil.js +452 -0
  474. package/Utils/RequestFailedDetailsUtil.mjs +2 -0
  475. package/Utils/Rum/PathInSentence.d.mts +5 -0
  476. package/Utils/Rum/PathInSentence.d.ts +5 -0
  477. package/Utils/Rum/PathInSentence.js +46 -0
  478. package/Utils/Rum/PathInSentence.mjs +6 -0
  479. package/Utils/Rum/UrlScrubber.d.mts +5 -1
  480. package/Utils/Rum/UrlScrubber.d.ts +5 -1
  481. package/Utils/Rum/UrlScrubber.js +153 -7
  482. package/Utils/Rum/UserFlow.d.mts +1 -1
  483. package/Utils/Rum/UserFlow.d.ts +1 -1
  484. package/Utils/Rum/UserFlow.js +202 -29
  485. package/Utils/Rum/UserFlow.mjs +1 -1
  486. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  487. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  488. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  489. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  490. package/Utils/Schema/TypeSchemas.js +6 -0
  491. package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
  492. package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
  493. package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
  494. package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
  495. package/Utils/Slo/SloDuration.d.mts +5 -2
  496. package/Utils/Slo/SloDuration.d.ts +5 -2
  497. package/Utils/Slo/SloDuration.js +11 -6
  498. package/Utils/Slo/SloHealth.js +1 -1
  499. package/Utils/Sms/OnCallPageSms.d.mts +2 -0
  500. package/Utils/Sms/OnCallPageSms.d.ts +2 -0
  501. package/Utils/Sms/OnCallPageSms.js +3 -1
  502. package/Utils/StateListType.d.mts +11 -0
  503. package/Utils/StateListType.d.ts +11 -0
  504. package/Utils/StateListType.js +21 -0
  505. package/Utils/StateListType.mjs +2 -0
  506. package/Utils/StateOrder.d.mts +8 -11
  507. package/Utils/StateOrder.d.ts +8 -11
  508. package/Utils/StateOrder.js +50 -88
  509. package/Utils/StateOrder.mjs +2 -0
  510. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  511. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
  512. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
  513. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
  514. package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
  515. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
  516. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
  517. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
  518. package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
  519. package/Utils/Syslog/SyslogMessageParser.js +16 -6
  520. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  521. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  522. package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
  523. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  524. package/Utils/ValueFormatter.d.mts +1 -0
  525. package/Utils/ValueFormatter.d.ts +1 -0
  526. package/Utils/ValueFormatter.js +258 -18
  527. package/package.json +1 -1
@@ -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
- return query ? `${base}?${query}` : base;
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
- /* Replace identifier-shaped segments, preserving route structure. */
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
- * Path-only form, used for the refresh-rage detector, which needs to
136
- * compare "the same page" across reloads without the origin.
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 getScrubbedPathname(rawUrl) {
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;
@@ -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 getUserFlowPageLabel(page: string): string;
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;
@@ -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 getUserFlowPageLabel(page: string): string;
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;
@@ -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.getUserFlowPageLabel = getUserFlowPageLabel;
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"). The
119
- * recorder stores such URLs with the fragment when it can; treat
120
- * "#/..." as the path so those apps do not collapse onto "/".
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
- let path = parsed.pathname || "/";
123
- if (parsed.hash.startsWith("#/")) {
124
- path = parsed.hash.slice(1);
125
- }
126
- return { host: isRelative ? "" : parsed.host, path: path };
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
- function getUserFlowPageLabel(page) {
200
- return page === exports.OTHER_PAGES_KEY ? exports.OTHER_PAGES_LABEL : page;
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: getUserFlowPageLabel(key),
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 ${page.page}`
870
- : `Frustration concentrates on ${page.page}`,
1022
+ ? `Errors concentrate on ${name}`
1023
+ : `Frustration concentrates on ${name}`,
871
1024
  detail: kind === "error-hotspot"
872
- ? `${formatShare(share)} of the sessions that visited ${page.page} hit an error there (${sessionsNoun(count)}).`
873
- : `${formatShare(share)} of the sessions that visited ${page.page} rage-clicked, dead-clicked or reloaded in frustration there (${sessionsNoun(count)}).`,
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 ${dropOff.page}`,
915
- detail: `${formatShare(share)} of the sessions that navigated to ${dropOff.page} left the application there (${sessionsNoun(leftAfterNavigating)}).`,
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 ${entry.page}`,
957
- detail: `${formatShare(share)} of sessions (${sessionsNoun(entry.entries)}) landed on ${entry.page}; ${formatShare(ratio(entry.bounces, entry.entries))} of them saw no other page.`,
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
- return Object.assign(Object.assign({}, merged), { anchorPage: merged.anchorPage || null, 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: (merged.hiddenPages || []).filter((page) => {
972
- /* The anchor cannot be hidden: the map would have nothing to draw. */
973
- return Boolean(page) && page !== merged.anchorPage;
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);
@@ -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 getUserFlowPageLabel = commonJsModule.getUserFlowPageLabel;
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,3 @@
1
+ import { RunbookStep } from "../../Types/Runbook/RunbookStep.mjs";
2
+ export declare const getRunbookStepsSignature: (steps: ReadonlyArray<RunbookStep>) => string;
3
+ export default getRunbookStepsSignature;
@@ -0,0 +1,3 @@
1
+ import { RunbookStep } from "../../Types/Runbook/RunbookStep";
2
+ export declare const getRunbookStepsSignature: (steps: ReadonlyArray<RunbookStep>) => string;
3
+ export default getRunbookStepsSignature;
@@ -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;
@@ -0,0 +1,3 @@
1
+ import commonJsModule from "./RunbookStepsSignature.js";
2
+ export default commonJsModule.default;
3
+ export const getRunbookStepsSignature = commonJsModule.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
  }