@oneuptime/common 14.0.110 → 14.1.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 (322) 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.js +18 -2
  6. package/Models/DatabaseModels/DataStore.js +9 -0
  7. package/Models/DatabaseModels/EmailLog.js +2 -2
  8. package/Models/DatabaseModels/Form.js +3 -3
  9. package/Models/DatabaseModels/FormSubmission.js +4 -4
  10. package/Models/DatabaseModels/GlobalConfig.js +46 -45
  11. package/Models/DatabaseModels/Incident.js +18 -2
  12. package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
  13. package/Models/DatabaseModels/Index.js +4 -0
  14. package/Models/DatabaseModels/InventoryItem.js +11 -0
  15. package/Models/DatabaseModels/Monitor.js +51 -17
  16. package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
  17. package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
  18. package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
  19. package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
  20. package/Models/DatabaseModels/MonitorProbe.js +22 -5
  21. package/Models/DatabaseModels/NetworkDevice.js +23 -7
  22. package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
  23. package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
  24. package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
  25. package/Models/DatabaseModels/NetworkInterface.js +5 -5
  26. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
  27. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
  28. package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
  29. package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
  30. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
  31. package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
  32. package/Models/DatabaseModels/Project.d.mts +1 -0
  33. package/Models/DatabaseModels/Project.d.ts +1 -0
  34. package/Models/DatabaseModels/Project.js +46 -3
  35. package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
  36. package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
  37. package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
  38. package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
  39. package/Models/DatabaseModels/RunbookExecution.js +2 -2
  40. package/Models/DatabaseModels/RunbookRule.js +6 -6
  41. package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
  42. package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
  43. package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
  44. package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
  45. package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
  46. package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
  47. package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
  48. package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
  49. package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
  50. package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
  51. package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
  52. package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
  53. package/Models/DatabaseModels/TeamMember.js +10 -1
  54. package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
  55. package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
  56. package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
  57. package/Server/Services/DatabaseService.d.mts +4 -1
  58. package/Server/Services/DatabaseService.d.ts +4 -1
  59. package/Server/Types/Database/CountBy.d.mts +1 -0
  60. package/Server/Types/Database/CountBy.d.ts +1 -0
  61. package/Server/Types/Database/UpdateLimit.d.mts +6 -0
  62. package/Server/Types/Database/UpdateLimit.d.ts +6 -0
  63. package/Types/AI/AIActionWords.d.mts +25 -1
  64. package/Types/AI/AIActionWords.d.ts +25 -1
  65. package/Types/AI/AIActionWords.js +166 -3
  66. package/Types/AI/AIActionWords.mjs +6 -0
  67. package/Types/AI/AIChatTypes.d.mts +2 -1
  68. package/Types/AI/AIChatTypes.d.ts +2 -1
  69. package/Types/AI/AiOutcomes.d.mts +57 -0
  70. package/Types/AI/AiOutcomes.d.ts +57 -0
  71. package/Types/AI/AiOutcomes.js +67 -0
  72. package/Types/AI/AiOutcomes.mjs +10 -0
  73. package/Types/AI/AiRunRefusal.d.mts +45 -0
  74. package/Types/AI/AiRunRefusal.d.ts +45 -0
  75. package/Types/AI/AiRunRefusal.js +187 -0
  76. package/Types/AI/AiRunRefusal.mjs +12 -0
  77. package/Types/AI/InvestigationRecording.d.mts +46 -0
  78. package/Types/AI/InvestigationRecording.d.ts +46 -0
  79. package/Types/AI/InvestigationRecording.js +42 -0
  80. package/Types/AI/InvestigationRecording.mjs +7 -0
  81. package/Types/API/HTTPResponse.d.mts +3 -0
  82. package/Types/API/HTTPResponse.d.ts +3 -0
  83. package/Types/API/HTTPResponse.js +15 -0
  84. package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
  85. package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
  86. package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +16 -1
  87. package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +16 -1
  88. package/Types/BaseDatabase/AggregationIntervalUtil.js +92 -2
  89. package/Types/BaseDatabase/ListResult.d.mts +1 -0
  90. package/Types/BaseDatabase/ListResult.d.ts +1 -0
  91. package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
  92. package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
  93. package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
  94. package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
  95. package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
  96. package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
  97. package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
  98. package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
  99. package/Types/Date.d.mts +6 -1
  100. package/Types/Date.d.ts +6 -1
  101. package/Types/Date.js +39 -7
  102. package/Types/Date.mjs +1 -0
  103. package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
  104. package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
  105. package/Types/Email/ServerEmailEnvironment.js +793 -0
  106. package/Types/Email/ServerEmailEnvironment.mjs +14 -0
  107. package/Types/Exception/AiRunRefusalException.d.mts +6 -0
  108. package/Types/Exception/AiRunRefusalException.d.ts +6 -0
  109. package/Types/Exception/AiRunRefusalException.js +23 -0
  110. package/Types/Exception/AiRunRefusalException.mjs +2 -0
  111. package/Types/Form/FormTargetCatalog.js +2 -2
  112. package/Types/Form/FormTargetType.js +2 -2
  113. package/Types/ListData.d.mts +2 -0
  114. package/Types/ListData.d.ts +2 -0
  115. package/Types/ListData.js +4 -0
  116. package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
  117. package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
  118. package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
  119. package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
  120. package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
  121. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
  122. package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
  123. package/Types/Monitor/UptimeHistoryLabels.js +2 -2
  124. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
  125. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
  126. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
  127. package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
  128. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
  129. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
  130. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
  131. package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
  132. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
  133. package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
  134. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
  135. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
  136. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
  137. package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
  138. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
  139. package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
  140. package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
  141. package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
  142. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
  143. package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
  144. package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
  145. package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
  146. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
  147. package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
  148. package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
  149. package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
  150. package/Types/Permission.js +2 -2
  151. package/Types/Probe/ProbeCapability.d.mts +2 -1
  152. package/Types/Probe/ProbeCapability.d.ts +2 -1
  153. package/Types/Probe/ProbeCapability.js +10 -0
  154. package/Types/ReaderLanguage.d.mts +1 -0
  155. package/Types/ReaderLanguage.d.ts +1 -0
  156. package/Types/ReaderLanguage.js +13 -1
  157. package/Types/ReaderLanguage.mjs +1 -0
  158. package/Types/Rules/RuleRun.js +2 -2
  159. package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
  160. package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
  161. package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
  162. package/Types/ServerSending/ServerSendingStatus.js +49 -2
  163. package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
  164. package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
  165. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
  166. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
  167. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
  168. package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
  169. package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
  170. package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
  171. package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
  172. package/Types/Telemetry/CompatibleIngest.js +123 -0
  173. package/Types/Telemetry/CompatibleIngest.mjs +21 -0
  174. package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
  175. package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
  176. package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
  177. package/Types/TimezoneAlias.d.mts +1 -0
  178. package/Types/TimezoneAlias.d.ts +1 -0
  179. package/Types/TimezoneAlias.js +13 -0
  180. package/Types/Translator.js +374 -48
  181. package/Types/Workflow/RunRecord.js +1 -1
  182. package/Types/Workflow/Templates.js +2 -2
  183. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
  184. package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
  185. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
  186. package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
  187. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
  188. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
  189. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
  190. package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
  191. package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
  192. package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
  193. package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
  194. package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
  195. package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
  196. package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
  197. package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
  198. package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
  199. package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
  200. package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
  201. package/Utils/HostAddressUtil.d.mts +1 -0
  202. package/Utils/HostAddressUtil.d.ts +1 -0
  203. package/Utils/HostAddressUtil.js +30 -0
  204. package/Utils/LinearRegExp/LinearRegExp.js +5 -1
  205. package/Utils/Milliseconds.d.mts +7 -0
  206. package/Utils/Milliseconds.d.ts +7 -0
  207. package/Utils/Milliseconds.js +60 -0
  208. package/Utils/Milliseconds.mjs +4 -0
  209. package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
  210. package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
  211. package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
  212. package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
  213. package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
  214. package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
  215. package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
  216. package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
  217. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
  218. package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
  219. package/Utils/Monitor/MonitorRootCauseWording.d.mts +2 -0
  220. package/Utils/Monitor/MonitorRootCauseWording.d.ts +2 -0
  221. package/Utils/Monitor/MonitorRootCauseWording.js +58 -4
  222. package/Utils/Monitor/MonitoringOff.d.mts +2 -0
  223. package/Utils/Monitor/MonitoringOff.d.ts +2 -0
  224. package/Utils/Monitor/MonitoringOff.js +21 -0
  225. package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
  226. package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
  227. package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
  228. package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
  229. package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
  230. package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
  231. package/Utils/Monitor/ProbeFailureReading.d.mts +14 -0
  232. package/Utils/Monitor/ProbeFailureReading.d.ts +14 -0
  233. package/Utils/Monitor/ProbeFailureReading.js +137 -0
  234. package/Utils/Monitor/ProbeFailureReading.mjs +7 -0
  235. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
  236. package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
  237. package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
  238. package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
  239. package/Utils/Project/NextNumber.js +1 -1
  240. package/Utils/PromQL/PromQLAst.d.mts +159 -0
  241. package/Utils/PromQL/PromQLAst.d.ts +159 -0
  242. package/Utils/PromQL/PromQLAst.js +118 -0
  243. package/Utils/PromQL/PromQLAst.mjs +12 -0
  244. package/Utils/PromQL/PromQLDuration.d.mts +2 -0
  245. package/Utils/PromQL/PromQLDuration.d.ts +2 -0
  246. package/Utils/PromQL/PromQLDuration.js +78 -0
  247. package/Utils/PromQL/PromQLDuration.mjs +3 -0
  248. package/Utils/PromQL/PromQLEngine.d.mts +15 -0
  249. package/Utils/PromQL/PromQLEngine.d.ts +15 -0
  250. package/Utils/PromQL/PromQLEngine.js +965 -0
  251. package/Utils/PromQL/PromQLEngine.mjs +7 -0
  252. package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
  253. package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
  254. package/Utils/PromQL/PromQLEngineTypes.js +10 -0
  255. package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
  256. package/Utils/PromQL/PromQLError.d.mts +11 -0
  257. package/Utils/PromQL/PromQLError.d.ts +11 -0
  258. package/Utils/PromQL/PromQLError.js +27 -0
  259. package/Utils/PromQL/PromQLError.mjs +3 -0
  260. package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
  261. package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
  262. package/Utils/PromQL/PromQLFunctionEvaluators.js +773 -0
  263. package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
  264. package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
  265. package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
  266. package/Utils/PromQL/PromQLFunctions.js +127 -0
  267. package/Utils/PromQL/PromQLFunctions.mjs +4 -0
  268. package/Utils/PromQL/PromQLLabels.d.mts +11 -0
  269. package/Utils/PromQL/PromQLLabels.d.ts +11 -0
  270. package/Utils/PromQL/PromQLLabels.js +218 -0
  271. package/Utils/PromQL/PromQLLabels.mjs +9 -0
  272. package/Utils/PromQL/PromQLLexer.d.mts +39 -0
  273. package/Utils/PromQL/PromQLLexer.d.ts +39 -0
  274. package/Utils/PromQL/PromQLLexer.js +391 -0
  275. package/Utils/PromQL/PromQLLexer.mjs +3 -0
  276. package/Utils/PromQL/PromQLMath.d.mts +19 -0
  277. package/Utils/PromQL/PromQLMath.d.ts +19 -0
  278. package/Utils/PromQL/PromQLMath.js +200 -0
  279. package/Utils/PromQL/PromQLMath.mjs +9 -0
  280. package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
  281. package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
  282. package/Utils/PromQL/PromQLMetricNames.js +199 -0
  283. package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
  284. package/Utils/PromQL/PromQLParser.d.mts +4 -0
  285. package/Utils/PromQL/PromQLParser.d.ts +4 -0
  286. package/Utils/PromQL/PromQLParser.js +831 -0
  287. package/Utils/PromQL/PromQLParser.mjs +4 -0
  288. package/Utils/PromQL/PromQLRegex.d.mts +9 -0
  289. package/Utils/PromQL/PromQLRegex.d.ts +9 -0
  290. package/Utils/PromQL/PromQLRegex.js +74 -0
  291. package/Utils/PromQL/PromQLRegex.mjs +2 -0
  292. package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
  293. package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
  294. package/Utils/PromQL/PrometheusResponse.js +90 -0
  295. package/Utils/PromQL/PrometheusResponse.mjs +3 -0
  296. package/Utils/Rum/PathInSentence.d.mts +5 -0
  297. package/Utils/Rum/PathInSentence.d.ts +5 -0
  298. package/Utils/Rum/PathInSentence.js +46 -0
  299. package/Utils/Rum/PathInSentence.mjs +6 -0
  300. package/Utils/Rum/UrlScrubber.d.mts +4 -0
  301. package/Utils/Rum/UrlScrubber.d.ts +4 -0
  302. package/Utils/Rum/UrlScrubber.js +143 -3
  303. package/Utils/Rum/UserFlow.d.mts +1 -1
  304. package/Utils/Rum/UserFlow.d.ts +1 -1
  305. package/Utils/Rum/UserFlow.js +180 -25
  306. package/Utils/Rum/UserFlow.mjs +1 -1
  307. package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
  308. package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
  309. package/Utils/Runbook/RunbookStepsSignature.js +30 -0
  310. package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
  311. package/Utils/Schema/TypeSchemas.js +6 -0
  312. package/Utils/Slo/SloDuration.d.mts +5 -2
  313. package/Utils/Slo/SloDuration.d.ts +5 -2
  314. package/Utils/Slo/SloDuration.js +11 -6
  315. package/Utils/Slo/SloHealth.js +1 -1
  316. package/Utils/StateOrder.js +1 -4
  317. package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
  318. package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
  319. package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
  320. package/Utils/Telemetry/HeartbeatAvailability.js +118 -26
  321. package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
  322. package/package.json +1 -1
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_RUN_REFUSAL_CODE_FIELD = exports.AI_RUN_REFUSALS = exports.AiRunRefusalCode = void 0;
4
+ exports.isAiRunRefusalCode = isAiRunRefusalCode;
5
+ exports.getAiRunRefusalMessage = getAiRunRefusalMessage;
6
+ exports.readAiRunRefusalCode = readAiRunRefusalCode;
7
+ exports.getRecordNotFoundRefusal = getRecordNotFoundRefusal;
8
+ exports.getNotAllowedRefusal = getNotAllowedRefusal;
9
+ exports.getNoInvestigationRefusal = getNoInvestigationRefusal;
10
+ exports.getInvestigationRunningRefusal = getInvestigationRunningRefusal;
11
+ exports.getRecordAiTokenLimitRefusal = getRecordAiTokenLimitRefusal;
12
+ const Translator_1 = require("../Translator");
13
+ const RecordAiTokenLimit_1 = require("./RecordAiTokenLimit");
14
+ /*
15
+ * WHY ONEUPTIME AI DID NOT START A RUN SOMEONE ASKED FOR, AS A CODE AND
16
+ * ONE SENTENCE (#7359).
17
+ *
18
+ * An incident's or alert's AI card has two buttons that ask the server to
19
+ * start an investigation - Try again on the failure notice, and Investigate
20
+ * now while a rule waits - and an AI insight's card has Try again for its
21
+ * triage. When the server refuses, the card shows why under the button.
22
+ *
23
+ * The server answers the refusal as bad data (400) with its English
24
+ * sentence as the message, for the API and for older Dashboards, and with
25
+ * the refusal's code beside it (AI_RUN_REFUSAL_CODE_FIELD). The Dashboard
26
+ * words the code itself, in the reader's language (AiRunFailureWords'
27
+ * describeAiRunRefusal): the sentences below are its translation keys, so a
28
+ * sentence changed here is a new key every language must word before the
29
+ * Dashboard's extract test passes. A refusal of who may (403, no code) is
30
+ * one of these sentences too, and is worded by its text.
31
+ *
32
+ * Every refusal is one whole sentence per code - incident and alert each
33
+ * have their own, so a language words each its own way - and none carries
34
+ * a number or a name, so none needs values. The sentences that other
35
+ * messages share (the AI credits, the project's daily AI limits, a
36
+ * record's own daily AI token limit) are those messages, word for word: a
37
+ * test holds each to its source.
38
+ *
39
+ * Pure, with no Node or browser APIs: the server and the Dashboard both
40
+ * read it.
41
+ */
42
+ var AiRunRefusalCode;
43
+ (function (AiRunRefusalCode) {
44
+ // The record is gone, or the person may not read it.
45
+ AiRunRefusalCode["IncidentNotFound"] = "incident_not_found";
46
+ AiRunRefusalCode["AlertNotFound"] = "alert_not_found";
47
+ // The person may read the record but not change it (403).
48
+ AiRunRefusalCode["IncidentTryAgainNotAllowed"] = "incident_try_again_not_allowed";
49
+ AiRunRefusalCode["AlertTryAgainNotAllowed"] = "alert_try_again_not_allowed";
50
+ AiRunRefusalCode["IncidentInvestigateNowNotAllowed"] = "incident_investigate_now_not_allowed";
51
+ AiRunRefusalCode["AlertInvestigateNowNotAllowed"] = "alert_investigate_now_not_allowed";
52
+ // An investigation's Try again.
53
+ AiRunRefusalCode["IncidentHasNoInvestigation"] = "incident_has_no_investigation";
54
+ AiRunRefusalCode["AlertHasNoInvestigation"] = "alert_has_no_investigation";
55
+ AiRunRefusalCode["IncidentInvestigationRunning"] = "incident_investigation_running";
56
+ AiRunRefusalCode["AlertInvestigationRunning"] = "alert_investigation_running";
57
+ AiRunRefusalCode["InvestigationFinished"] = "investigation_finished";
58
+ AiRunRefusalCode["InvestigationNotQueued"] = "investigation_not_queued";
59
+ // Investigate now, while an investigation rule waits.
60
+ AiRunRefusalCode["NotWaiting"] = "not_waiting";
61
+ AiRunRefusalCode["AlreadyInvestigated"] = "already_investigated";
62
+ AiRunRefusalCode["InvestigationNotStarted"] = "investigation_not_started";
63
+ // What stops OneUptime AI for the whole project.
64
+ AiRunRefusalCode["AiOff"] = "ai_off";
65
+ AiRunRefusalCode["NoProviderToInvestigate"] = "no_provider_to_investigate";
66
+ AiRunRefusalCode["AiCreditsUsedUp"] = "ai_credits_used_up";
67
+ AiRunRefusalCode["ProjectDailyLimitReached"] = "project_daily_limit_reached";
68
+ // The incident's (alert's) own daily AI token limit (#7157).
69
+ AiRunRefusalCode["IncidentTokenLimitPaused"] = "incident_token_limit_paused";
70
+ AiRunRefusalCode["IncidentTokenLimitUsedUp"] = "incident_token_limit_used_up";
71
+ AiRunRefusalCode["AlertTokenLimitPaused"] = "alert_token_limit_paused";
72
+ AiRunRefusalCode["AlertTokenLimitUsedUp"] = "alert_token_limit_used_up";
73
+ // An AI insight's triage Try again.
74
+ AiRunRefusalCode["InsightNotFound"] = "insight_not_found";
75
+ AiRunRefusalCode["InsightTriageRunning"] = "insight_triage_running";
76
+ AiRunRefusalCode["TriageFinished"] = "triage_finished";
77
+ AiRunRefusalCode["InsightsOff"] = "insights_off";
78
+ AiRunRefusalCode["NoProviderToTriage"] = "no_provider_to_triage";
79
+ AiRunRefusalCode["TriageNotQueued"] = "triage_not_queued";
80
+ AiRunRefusalCode["TriageNotStarted"] = "triage_not_started";
81
+ })(AiRunRefusalCode || (exports.AiRunRefusalCode = AiRunRefusalCode = {}));
82
+ // Each refusal's sentence: the server's message, and the Dashboard's key.
83
+ exports.AI_RUN_REFUSALS = {
84
+ [AiRunRefusalCode.IncidentNotFound]: (0, Translator_1.translationKey)("Incident not found (or you do not have access to it)."),
85
+ [AiRunRefusalCode.AlertNotFound]: (0, Translator_1.translationKey)("Alert not found (or you do not have access to it)."),
86
+ [AiRunRefusalCode.IncidentTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation again."),
87
+ [AiRunRefusalCode.AlertTryAgainNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation again."),
88
+ [AiRunRefusalCode.IncidentInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this incident, so you cannot start its investigation."),
89
+ [AiRunRefusalCode.AlertInvestigateNowNotAllowed]: (0, Translator_1.translationKey)("You do not have permission to change this alert, so you cannot start its investigation."),
90
+ [AiRunRefusalCode.IncidentHasNoInvestigation]: (0, Translator_1.translationKey)("This incident has no investigation to try again."),
91
+ [AiRunRefusalCode.AlertHasNoInvestigation]: (0, Translator_1.translationKey)("This alert has no investigation to try again."),
92
+ [AiRunRefusalCode.IncidentInvestigationRunning]: (0, Translator_1.translationKey)("This incident's investigation is queued or running already."),
93
+ [AiRunRefusalCode.AlertInvestigationRunning]: (0, Translator_1.translationKey)("This alert's investigation is queued or running already."),
94
+ [AiRunRefusalCode.InvestigationFinished]: (0, Translator_1.translationKey)("Only an investigation that did not finish can be tried again."),
95
+ [AiRunRefusalCode.InvestigationNotQueued]: (0, Translator_1.translationKey)("The investigation could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
96
+ [AiRunRefusalCode.NotWaiting]: (0, Translator_1.translationKey)("OneUptime AI is no longer waiting to investigate this. Refresh to see where it stands."),
97
+ [AiRunRefusalCode.AlreadyInvestigated]: (0, Translator_1.translationKey)("OneUptime AI has already started investigating this."),
98
+ [AiRunRefusalCode.InvestigationNotStarted]: (0, Translator_1.translationKey)("The investigation could not be started. Try again in a moment."),
99
+ [AiRunRefusalCode.AiOff]: (0, Translator_1.translationKey)("OneUptime AI is switched off for this project. A project owner or someone with Manage Billing can turn it on in Project Settings > AI > AI Features."),
100
+ [AiRunRefusalCode.NoProviderToInvestigate]: (0, Translator_1.translationKey)("This project has no LLM provider to investigate with. Add one in Project Settings > AI > LLM Providers, then try again."),
101
+ // PROJECT_AI_CREDITS_USED_UP_MESSAGE (Utils/Project/ProjectBalance).
102
+ [AiRunRefusalCode.AiCreditsUsedUp]: (0, Translator_1.translationKey)("This project's AI credits are used up. A project owner or someone with Manage Billing can add AI credits in Project Settings → AI → AI Credits."),
103
+ // Ends with ProjectAiDailyLimits.getWhoCanChangeSentence().
104
+ [AiRunRefusalCode.ProjectDailyLimitReached]: (0, Translator_1.translationKey)("The project reached its daily AI limit. OneUptime AI starts again at midnight UTC. A project owner or someone with Manage Billing can raise or remove the limit in Project Settings → AI → AI Features → More settings."),
105
+ // getRecordAiTokenLimitMessage (Types/AI/RecordAiTokenLimit), each kind.
106
+ [AiRunRefusalCode.IncidentTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Incident AI Token Limit is set to 0, which pauses automatic AI work for incidents. Raise it above 0 under Incidents → AI → Settings → More settings, or clear it, then try again."),
107
+ [AiRunRefusalCode.IncidentTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for incidents used up today's Daily Incident AI Token Limit. Raise or clear it under Incidents → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
108
+ [AiRunRefusalCode.AlertTokenLimitPaused]: (0, Translator_1.translationKey)("The Daily Alert AI Token Limit is set to 0, which pauses automatic AI work for alerts. Raise it above 0 under Alerts → AI → Settings → More settings, or clear it, then try again."),
109
+ [AiRunRefusalCode.AlertTokenLimitUsedUp]: (0, Translator_1.translationKey)("Automatic AI work for alerts used up today's Daily Alert AI Token Limit. Raise or clear it under Alerts → AI → Settings → More settings, or wait until midnight UTC, when it resets. Then try again."),
110
+ [AiRunRefusalCode.InsightNotFound]: (0, Translator_1.translationKey)("This AI insight no longer exists."),
111
+ [AiRunRefusalCode.InsightTriageRunning]: (0, Translator_1.translationKey)("This insight is being triaged already."),
112
+ [AiRunRefusalCode.TriageFinished]: (0, Translator_1.translationKey)("Only a triage that did not finish can be tried again."),
113
+ /*
114
+ * Only AI Insights' own switch is left to be off: a telemetry product's
115
+ * AI that works on the insight's kind is on (getLaneWorkingOn).
116
+ */
117
+ [AiRunRefusalCode.InsightsOff]: (0, Translator_1.translationKey)("AI Insights is switched off for this project, so no insight is triaged. A project owner or admin can turn on Watch telemetry for problems in AI → Insights → Settings."),
118
+ [AiRunRefusalCode.NoProviderToTriage]: (0, Translator_1.translationKey)("This project has no LLM provider to triage with. Add one in Project Settings > AI > LLM Providers, then try again."),
119
+ [AiRunRefusalCode.TriageNotQueued]: (0, Translator_1.translationKey)("The triage could not start: the project may have reached its daily AI limit, which resets at midnight UTC. Try again later."),
120
+ [AiRunRefusalCode.TriageNotStarted]: (0, Translator_1.translationKey)("The triage could not start. Try again in a moment."),
121
+ };
122
+ /*
123
+ * The field of a refused request's answer that carries the code, beside
124
+ * its message: { message: "...", refusalCode: "ai_off" }.
125
+ */
126
+ exports.AI_RUN_REFUSAL_CODE_FIELD = "refusalCode";
127
+ const AI_RUN_REFUSAL_CODES = new Set(Object.values(AiRunRefusalCode));
128
+ function isAiRunRefusalCode(value) {
129
+ return typeof value === "string" && AI_RUN_REFUSAL_CODES.has(value);
130
+ }
131
+ function getAiRunRefusalMessage(code) {
132
+ return exports.AI_RUN_REFUSALS[code];
133
+ }
134
+ /*
135
+ * The code of a refused request's answer, or null when it has none or one
136
+ * this version does not know (a newer server): the message is said then.
137
+ */
138
+ function readAiRunRefusalCode(body) {
139
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
140
+ return null;
141
+ }
142
+ const code = body[exports.AI_RUN_REFUSAL_CODE_FIELD];
143
+ return isAiRunRefusalCode(code) ? code : null;
144
+ }
145
+ // The record is gone, or the person may not read it.
146
+ function getRecordNotFoundRefusal(subject) {
147
+ return subject === "alert"
148
+ ? AiRunRefusalCode.AlertNotFound
149
+ : AiRunRefusalCode.IncidentNotFound;
150
+ }
151
+ // The person may read the record, not change it: which button they pressed.
152
+ function getNotAllowedRefusal(subject, action) {
153
+ if (action === "try_again") {
154
+ return subject === "alert"
155
+ ? AiRunRefusalCode.AlertTryAgainNotAllowed
156
+ : AiRunRefusalCode.IncidentTryAgainNotAllowed;
157
+ }
158
+ return subject === "alert"
159
+ ? AiRunRefusalCode.AlertInvestigateNowNotAllowed
160
+ : AiRunRefusalCode.IncidentInvestigateNowNotAllowed;
161
+ }
162
+ function getNoInvestigationRefusal(subject) {
163
+ return subject === "alert"
164
+ ? AiRunRefusalCode.AlertHasNoInvestigation
165
+ : AiRunRefusalCode.IncidentHasNoInvestigation;
166
+ }
167
+ function getInvestigationRunningRefusal(subject) {
168
+ return subject === "alert"
169
+ ? AiRunRefusalCode.AlertInvestigationRunning
170
+ : AiRunRefusalCode.IncidentInvestigationRunning;
171
+ }
172
+ /*
173
+ * The record's own daily AI token limit: paused (a limit of 0 or below)
174
+ * until someone raises it, or used up until midnight UTC. Without a state
175
+ * the limit is taken as used up, as getRecordAiTokenLimitMessage does.
176
+ */
177
+ function getRecordAiTokenLimitRefusal(kind, state) {
178
+ const isPaused = (0, RecordAiTokenLimit_1.isRecordAiTokenLimitPaused)(state === null || state === void 0 ? void 0 : state.limitInTokens);
179
+ if (kind === "alert") {
180
+ return isPaused
181
+ ? AiRunRefusalCode.AlertTokenLimitPaused
182
+ : AiRunRefusalCode.AlertTokenLimitUsedUp;
183
+ }
184
+ return isPaused
185
+ ? AiRunRefusalCode.IncidentTokenLimitPaused
186
+ : AiRunRefusalCode.IncidentTokenLimitUsedUp;
187
+ }
@@ -0,0 +1,12 @@
1
+ import commonJsModule from "./AiRunRefusal.js";
2
+ export const AI_RUN_REFUSALS = commonJsModule.AI_RUN_REFUSALS;
3
+ export const AI_RUN_REFUSAL_CODE_FIELD = commonJsModule.AI_RUN_REFUSAL_CODE_FIELD;
4
+ export const AiRunRefusalCode = commonJsModule.AiRunRefusalCode;
5
+ export const getAiRunRefusalMessage = commonJsModule.getAiRunRefusalMessage;
6
+ export const getInvestigationRunningRefusal = commonJsModule.getInvestigationRunningRefusal;
7
+ export const getNoInvestigationRefusal = commonJsModule.getNoInvestigationRefusal;
8
+ export const getNotAllowedRefusal = commonJsModule.getNotAllowedRefusal;
9
+ export const getRecordAiTokenLimitRefusal = commonJsModule.getRecordAiTokenLimitRefusal;
10
+ export const getRecordNotFoundRefusal = commonJsModule.getRecordNotFoundRefusal;
11
+ export const isAiRunRefusalCode = commonJsModule.isAiRunRefusalCode;
12
+ export const readAiRunRefusalCode = commonJsModule.readAiRunRefusalCode;
@@ -0,0 +1,46 @@
1
+ import { JSONObject } from "../JSON.mjs";
2
+ import { AIAgentRunLimits } from "./AIAgentRunLimits.mjs";
3
+ import { AIChatCitationTarget } from "./AIChatTypes.mjs";
4
+ import { AiContextActivity } from "./AiContext.mjs";
5
+ export declare const INVESTIGATION_RECORDING_VERSION: number;
6
+ export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
7
+ export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
8
+ export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
9
+ export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
10
+ export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
11
+ export interface InvestigationRecordedToolDefinition {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: JSONObject;
15
+ }
16
+ export interface InvestigationRecordingInputs {
17
+ contextText: string;
18
+ additionalInstructions?: string | undefined;
19
+ personaOverride?: string | undefined;
20
+ questionOverride?: string | undefined;
21
+ aiContext: AiContextActivity | null;
22
+ promptTime: string;
23
+ runLimits: AIAgentRunLimits;
24
+ maxOutputTokens: number;
25
+ excludedToolNames: Array<string>;
26
+ extraTools: Array<InvestigationRecordedToolDefinition>;
27
+ providerName?: string | undefined;
28
+ modelName?: string | undefined;
29
+ }
30
+ export interface InvestigationRecordedToolCall {
31
+ toolName: string;
32
+ arguments: JSONObject;
33
+ success: boolean;
34
+ text: string | null;
35
+ rowCount?: number | undefined;
36
+ citationLabel?: string | undefined;
37
+ citationTarget?: AIChatCitationTarget | undefined;
38
+ isTruncated?: boolean | undefined;
39
+ durationMs?: number | undefined;
40
+ }
41
+ export interface InvestigationRecording {
42
+ version: number;
43
+ inputs: InvestigationRecordingInputs;
44
+ toolCalls: Array<InvestigationRecordedToolCall>;
45
+ toolCallsNotKept: number;
46
+ }
@@ -0,0 +1,46 @@
1
+ import { JSONObject } from "../JSON";
2
+ import { AIAgentRunLimits } from "./AIAgentRunLimits";
3
+ import { AIChatCitationTarget } from "./AIChatTypes";
4
+ import { AiContextActivity } from "./AiContext";
5
+ export declare const INVESTIGATION_RECORDING_VERSION: number;
6
+ export declare const INVESTIGATION_RECORDING_RETENTION_IN_DAYS: number;
7
+ export declare const INVESTIGATION_RECORDING_MAX_TOOL_CALLS: number;
8
+ export declare const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS: number;
9
+ export declare const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS: number;
10
+ export declare const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS: number;
11
+ export interface InvestigationRecordedToolDefinition {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: JSONObject;
15
+ }
16
+ export interface InvestigationRecordingInputs {
17
+ contextText: string;
18
+ additionalInstructions?: string | undefined;
19
+ personaOverride?: string | undefined;
20
+ questionOverride?: string | undefined;
21
+ aiContext: AiContextActivity | null;
22
+ promptTime: string;
23
+ runLimits: AIAgentRunLimits;
24
+ maxOutputTokens: number;
25
+ excludedToolNames: Array<string>;
26
+ extraTools: Array<InvestigationRecordedToolDefinition>;
27
+ providerName?: string | undefined;
28
+ modelName?: string | undefined;
29
+ }
30
+ export interface InvestigationRecordedToolCall {
31
+ toolName: string;
32
+ arguments: JSONObject;
33
+ success: boolean;
34
+ text: string | null;
35
+ rowCount?: number | undefined;
36
+ citationLabel?: string | undefined;
37
+ citationTarget?: AIChatCitationTarget | undefined;
38
+ isTruncated?: boolean | undefined;
39
+ durationMs?: number | undefined;
40
+ }
41
+ export interface InvestigationRecording {
42
+ version: number;
43
+ inputs: InvestigationRecordingInputs;
44
+ toolCalls: Array<InvestigationRecordedToolCall>;
45
+ toolCallsNotKept: number;
46
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = exports.INVESTIGATION_RECORDING_VERSION = void 0;
4
+ /*
5
+ * What an AI investigation saw, kept so it can be run again later on exactly
6
+ * the same data with another prompt or another model (issue #6800): the
7
+ * starting context the model was given, and every tool call it made with
8
+ * the text it was handed back. A replay (Server/Utils/AI/Eval/
9
+ * ReplayInvestigation) builds today's prompt around the same context and
10
+ * answers each tool call from here - never from the project's live data,
11
+ * which has moved on or aged out by then - so a change is scored on the
12
+ * evidence the original run had.
13
+ *
14
+ * Kept by the server only (AIRunRecording: no API reads it, no person can),
15
+ * for INVESTIGATION_RECORDING_RETENTION_IN_DAYS, and held to the caps below.
16
+ * What the model read is what the toolbox already redacted and cut to size,
17
+ * so nothing is kept that the model was not shown.
18
+ */
19
+ // The shape of a recording; a replay reads only the versions it knows.
20
+ exports.INVESTIGATION_RECORDING_VERSION = 1;
21
+ /*
22
+ * How long a recording is kept. Long enough to replay last month's
23
+ * investigations after a prompt or model change; short enough that what the
24
+ * tools returned does not outlive the telemetry it came from by much.
25
+ */
26
+ exports.INVESTIGATION_RECORDING_RETENTION_IN_DAYS = 30;
27
+ /*
28
+ * The caps. A run is recorded until one is reached; a tool call past them is
29
+ * kept without its text, or not kept at all, and a replay that comes to it
30
+ * counts it as not recorded rather than inventing an answer.
31
+ */
32
+ // The most tool calls one recording keeps.
33
+ exports.INVESTIGATION_RECORDING_MAX_TOOL_CALLS = 300;
34
+ /*
35
+ * The most characters of one tool result: well above what the toolbox hands
36
+ * the model (64 KB, Toolbox/Serializer), so a normal result always fits.
37
+ */
38
+ exports.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = 100000;
39
+ // The most characters of tool results one recording keeps, together.
40
+ exports.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = 1000000;
41
+ // The most characters of one tool call's arguments, as JSON.
42
+ exports.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = 10000;
@@ -0,0 +1,7 @@
1
+ import commonJsModule from "./InvestigationRecording.js";
2
+ export const INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_ARGUMENT_CHARACTERS;
3
+ export const INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_RESULT_CHARACTERS;
4
+ export const INVESTIGATION_RECORDING_MAX_TOOL_CALLS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOOL_CALLS;
5
+ export const INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS = commonJsModule.INVESTIGATION_RECORDING_MAX_TOTAL_CHARACTERS;
6
+ export const INVESTIGATION_RECORDING_RETENTION_IN_DAYS = commonJsModule.INVESTIGATION_RECORDING_RETENTION_IN_DAYS;
7
+ export const INVESTIGATION_RECORDING_VERSION = commonJsModule.INVESTIGATION_RECORDING_VERSION;
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
27
27
  private _hasMore;
28
28
  get hasMore(): boolean | undefined;
29
29
  set hasMore(v: boolean | undefined);
30
+ private _isCountCapped;
31
+ get isCountCapped(): boolean | undefined;
32
+ set isCountCapped(v: boolean | undefined);
30
33
  constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
31
34
  isSuccess(): boolean;
32
35
  isFailure(): boolean;
@@ -27,6 +27,9 @@ export default class HTTPResponse<T extends JSONObjectOrArray | BaseModel | Arra
27
27
  private _hasMore;
28
28
  get hasMore(): boolean | undefined;
29
29
  set hasMore(v: boolean | undefined);
30
+ private _isCountCapped;
31
+ get isCountCapped(): boolean | undefined;
32
+ set isCountCapped(v: boolean | undefined);
30
33
  constructor(statusCode: number, data: JSONObject | Array<JSONObject>, headers: Headers);
31
34
  isSuccess(): boolean;
32
35
  isFailure(): boolean;
@@ -54,6 +54,12 @@ class HTTPResponse {
54
54
  set hasMore(v) {
55
55
  this._hasMore = v;
56
56
  }
57
+ get isCountCapped() {
58
+ return this._isCountCapped;
59
+ }
60
+ set isCountCapped(v) {
61
+ this._isCountCapped = v;
62
+ }
57
63
  constructor(statusCode, data, headers) {
58
64
  this._statusCode = -1;
59
65
  this._headers = {};
@@ -66,6 +72,12 @@ class HTTPResponse {
66
72
  * is only a lower bound — UI should drive next/prev from `hasMore`.
67
73
  */
68
74
  this._hasMore = undefined;
75
+ /*
76
+ * Optional. True when a list read asked for its count up to a cap
77
+ * (countUpTo) and more records match: `count` is the cap, a lower bound,
78
+ * and records follow this page. Undefined when the count is exact.
79
+ */
80
+ this._isCountCapped = undefined;
69
81
  this.statusCode = statusCode;
70
82
  if (!Array.isArray(data) &&
71
83
  Object.keys(data).includes("count") &&
@@ -78,6 +90,9 @@ class HTTPResponse {
78
90
  if (Object.keys(data).includes("hasMore")) {
79
91
  this.hasMore = data["hasMore"];
80
92
  }
93
+ if (data["isCountCapped"] === true) {
94
+ this.isCountCapped = true;
95
+ }
81
96
  this.jsonData = JSONFunctions_1.default.deserializeArray(data["data"]);
82
97
  }
83
98
  else if (Array.isArray(data)) {
@@ -1,5 +1,6 @@
1
1
  import GroupBy from "../../Server/Types/Database/GroupBy.mjs";
2
2
  import GenericObject from "../GenericObject.mjs";
3
+ import Timezone from "../Timezone.mjs";
3
4
  import AggregationInterval from "./AggregationInterval.mjs";
4
5
  import AggregationType from "./AggregationType.mjs";
5
6
  import Query from "./Query.mjs";
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
18
19
  * rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
19
20
  */
20
21
  aggregationInterval?: AggregationInterval | undefined;
22
+ /**
23
+ * The time zone whose calendar the Day, Week, Month and Year buckets
24
+ * follow: a day bucket runs from midnight to midnight there, a week from
25
+ * Monday, a month from its 1st and a year from 1 January, and each
26
+ * bucket's timestamp is that start. The dashboard sends the reader's zone
27
+ * (the one User Settings picked) whenever the bucket is a day or longer,
28
+ * so a chart that draws its days on the reader's calendar gets each day's
29
+ * total under its own day (issue #7277). Omitted, those buckets follow
30
+ * UTC, as they always have. An hour and shorter, and Total, are the same
31
+ * in every zone and ignore it. Only a name in the Timezone list is
32
+ * accepted; anything else is refused with a 400 in
33
+ * AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
34
+ * a bound parameter, never as text.
35
+ */
36
+ timezone?: Timezone | undefined;
21
37
  aggregationTimestampColumnName: keyof TBaseModel;
22
38
  startTimestamp: Date;
23
39
  endTimestamp: Date;
@@ -1,5 +1,6 @@
1
1
  import GroupBy from "../../Server/Types/Database/GroupBy";
2
2
  import GenericObject from "../GenericObject";
3
+ import Timezone from "../Timezone";
3
4
  import AggregationInterval from "./AggregationInterval";
4
5
  import AggregationType from "./AggregationType";
5
6
  import Query from "./Query";
@@ -18,6 +19,21 @@ export default interface AggregateBy<TBaseModel extends GenericObject> {
18
19
  * rejected with a 400 in AnalyticsDatabaseService.aggregateBy.
19
20
  */
20
21
  aggregationInterval?: AggregationInterval | undefined;
22
+ /**
23
+ * The time zone whose calendar the Day, Week, Month and Year buckets
24
+ * follow: a day bucket runs from midnight to midnight there, a week from
25
+ * Monday, a month from its 1st and a year from 1 January, and each
26
+ * bucket's timestamp is that start. The dashboard sends the reader's zone
27
+ * (the one User Settings picked) whenever the bucket is a day or longer,
28
+ * so a chart that draws its days on the reader's calendar gets each day's
29
+ * total under its own day (issue #7277). Omitted, those buckets follow
30
+ * UTC, as they always have. An hour and shorter, and Total, are the same
31
+ * in every zone and ignore it. Only a name in the Timezone list is
32
+ * accepted; anything else is refused with a 400 in
33
+ * AnalyticsDatabaseService.aggregateBy, and the name reaches the query as
34
+ * a bound parameter, never as text.
35
+ */
36
+ timezone?: Timezone | undefined;
21
37
  aggregationTimestampColumnName: keyof TBaseModel;
22
38
  startTimestamp: Date;
23
39
  endTimestamp: Date;
@@ -1,4 +1,11 @@
1
1
  import AggregationInterval from "./AggregationInterval.mjs";
2
+ import Timezone from "../Timezone.mjs";
3
+ export interface AggregateWindow {
4
+ startTimestamp?: Date | undefined;
5
+ endTimestamp?: Date | undefined;
6
+ aggregationInterval?: AggregationInterval | undefined;
7
+ timezone?: Timezone | undefined;
8
+ }
2
9
  export declare class AggregationIntervalUtil {
3
10
  static getAggregationIntervalForWindow(data: {
4
11
  startDate: Date;
@@ -11,11 +18,19 @@ export declare class AggregationIntervalUtil {
11
18
  */
12
19
  aggregationInterval?: AggregationInterval | undefined;
13
20
  }): AggregationInterval;
21
+ static isCalendarInterval(interval: AggregationInterval): boolean;
22
+ static getReaderTimezone(data: {
23
+ startDate: Date;
24
+ endDate: Date;
25
+ aggregationInterval?: AggregationInterval | undefined;
26
+ }): Timezone | undefined;
27
+ static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
14
28
  static getAggregationIntervalMs(interval: AggregationInterval): number;
15
- static floorDateToIntervalGrid(date: Date, interval: AggregationInterval): Date;
29
+ static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
16
30
  static getIntervalAlignedWindow(data: {
17
31
  startDate: Date;
18
32
  endDate: Date;
33
+ timezone?: Timezone | undefined;
19
34
  }): {
20
35
  startDate: Date;
21
36
  endDate: Date;
@@ -1,4 +1,11 @@
1
1
  import AggregationInterval from "./AggregationInterval";
2
+ import Timezone from "../Timezone";
3
+ export interface AggregateWindow {
4
+ startTimestamp?: Date | undefined;
5
+ endTimestamp?: Date | undefined;
6
+ aggregationInterval?: AggregationInterval | undefined;
7
+ timezone?: Timezone | undefined;
8
+ }
2
9
  export declare class AggregationIntervalUtil {
3
10
  static getAggregationIntervalForWindow(data: {
4
11
  startDate: Date;
@@ -11,11 +18,19 @@ export declare class AggregationIntervalUtil {
11
18
  */
12
19
  aggregationInterval?: AggregationInterval | undefined;
13
20
  }): AggregationInterval;
21
+ static isCalendarInterval(interval: AggregationInterval): boolean;
22
+ static getReaderTimezone(data: {
23
+ startDate: Date;
24
+ endDate: Date;
25
+ aggregationInterval?: AggregationInterval | undefined;
26
+ }): Timezone | undefined;
27
+ static withReaderTimezone<TRequest extends AggregateWindow>(aggregateBy: TRequest): TRequest;
14
28
  static getAggregationIntervalMs(interval: AggregationInterval): number;
15
- static floorDateToIntervalGrid(date: Date, interval: AggregationInterval): Date;
29
+ static floorDateToIntervalGrid(date: Date, interval: AggregationInterval, timezone?: Timezone | undefined): Date;
16
30
  static getIntervalAlignedWindow(data: {
17
31
  startDate: Date;
18
32
  endDate: Date;
33
+ timezone?: Timezone | undefined;
19
34
  }): {
20
35
  startDate: Date;
21
36
  endDate: Date;