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