@oneuptime/common 10.0.53 → 10.0.54

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 (380) hide show
  1. package/Models/AnalyticsModels/Metric.ts +78 -0
  2. package/Server/API/AIAgentDataAPI.ts +6 -1
  3. package/Server/API/BillingAPI.ts +28 -6
  4. package/Server/API/CommonAPI.ts +11 -0
  5. package/Server/API/DashboardAPI.ts +6 -2
  6. package/Server/API/DashboardDomainAPI.ts +10 -3
  7. package/Server/API/GitHubAPI.ts +58 -14
  8. package/Server/API/MicrosoftTeamsAPI.ts +97 -33
  9. package/Server/API/OpenSourceDeploymentAPI.ts +2 -2
  10. package/Server/API/SlackAPI.ts +107 -36
  11. package/Server/API/StatusAPI.ts +37 -16
  12. package/Server/API/StatusPageAPI.ts +97 -23
  13. package/Server/API/StatusPageDomainAPI.ts +6 -3
  14. package/Server/API/UserAPI.ts +3 -3
  15. package/Server/API/UserCallAPI.ts +5 -2
  16. package/Server/API/UserEmailAPI.ts +5 -2
  17. package/Server/API/UserPushAPI.ts +9 -3
  18. package/Server/API/UserSmsAPI.ts +5 -2
  19. package/Server/API/UserWhatsAppAPI.ts +5 -2
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.ts +47 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.ts +35 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
  23. package/Server/Middleware/NotificationMiddleware.ts +2 -2
  24. package/Server/Middleware/ProjectAuthorization.ts +6 -0
  25. package/Server/Middleware/SCIMAuthorization.ts +2 -1
  26. package/Server/Middleware/SlackAuthorization.ts +28 -10
  27. package/Server/Middleware/TelemetryIngest.ts +16 -3
  28. package/Server/Middleware/UserAuthorization.ts +22 -5
  29. package/Server/Middleware/WhatsAppAuthorization.ts +15 -4
  30. package/Server/Services/AIAgentService.ts +13 -6
  31. package/Server/Services/AIService.ts +9 -3
  32. package/Server/Services/AlertEpisodeFeedService.ts +17 -5
  33. package/Server/Services/AlertEpisodeService.ts +34 -3
  34. package/Server/Services/AlertEpisodeStateTimelineService.ts +80 -22
  35. package/Server/Services/AlertFeedService.ts +17 -5
  36. package/Server/Services/AlertGroupingEngineService.ts +36 -7
  37. package/Server/Services/AlertService.ts +60 -8
  38. package/Server/Services/AlertStateTimelineService.ts +29 -7
  39. package/Server/Services/AnalyticsDatabaseService.ts +59 -25
  40. package/Server/Services/BillingInvoiceService.ts +7 -3
  41. package/Server/Services/BillingService.ts +9 -2
  42. package/Server/Services/DashboardDomainService.ts +56 -22
  43. package/Server/Services/DashboardService.ts +11 -4
  44. package/Server/Services/DatabaseService.ts +31 -11
  45. package/Server/Services/IncidentEpisodeFeedService.ts +17 -5
  46. package/Server/Services/IncidentEpisodeService.ts +34 -3
  47. package/Server/Services/IncidentEpisodeStateTimelineService.ts +80 -22
  48. package/Server/Services/IncidentFeedService.ts +33 -9
  49. package/Server/Services/IncidentGroupingEngineService.ts +35 -6
  50. package/Server/Services/IncidentService.ts +103 -9
  51. package/Server/Services/IncidentSlaRuleService.ts +16 -4
  52. package/Server/Services/IncidentSlaService.ts +20 -4
  53. package/Server/Services/IncidentStateTimelineService.ts +120 -31
  54. package/Server/Services/KubernetesClusterService.ts +62 -14
  55. package/Server/Services/MonitorFeedService.ts +33 -9
  56. package/Server/Services/MonitorProbeService.ts +4 -2
  57. package/Server/Services/MonitorService.ts +35 -4
  58. package/Server/Services/MonitorStatusTimelineService.ts +68 -20
  59. package/Server/Services/NotificationService.ts +4 -2
  60. package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +53 -9
  61. package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +9 -2
  62. package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +29 -8
  63. package/Server/Services/OnCallDutyPolicyFeedService.ts +33 -8
  64. package/Server/Services/OnCallDutyPolicyScheduleService.ts +97 -24
  65. package/Server/Services/OnCallDutyPolicyService.ts +2 -1
  66. package/Server/Services/OpenTelemetryIngestService.ts +51 -20
  67. package/Server/Services/ProbeService.ts +16 -7
  68. package/Server/Services/ProjectService.ts +21 -7
  69. package/Server/Services/ScheduledMaintenanceFeedService.ts +17 -4
  70. package/Server/Services/ScheduledMaintenanceService.ts +52 -6
  71. package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +72 -20
  72. package/Server/Services/StatusPageDomainService.ts +59 -23
  73. package/Server/Services/StatusPageService.ts +26 -8
  74. package/Server/Services/StatusPageSubscriberService.ts +382 -111
  75. package/Server/Services/TeamMemberService.ts +9 -3
  76. package/Server/Services/UserNotificationRuleService.ts +9 -3
  77. package/Server/Services/UserService.ts +6 -4
  78. package/Server/Services/UserWhatsAppService.ts +9 -3
  79. package/Server/Services/WorkflowService.ts +7 -3
  80. package/Server/Services/WorkspaceNotificationRuleService.ts +398 -156
  81. package/Server/Types/Domain.ts +15 -5
  82. package/Server/Types/Workflow/Components/API/Post.ts +22 -8
  83. package/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.ts +12 -4
  84. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +10 -0
  85. package/Server/Utils/CodeRepository/CodeRepository.ts +62 -13
  86. package/Server/Utils/Express.ts +1 -0
  87. package/Server/Utils/Greenlock/Greenlock.ts +75 -20
  88. package/Server/Utils/LLM/LLMService.ts +22 -7
  89. package/Server/Utils/Logger.ts +93 -13
  90. package/Server/Utils/Monitor/MonitorAlert.ts +15 -3
  91. package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +15 -5
  92. package/Server/Utils/Monitor/MonitorIncident.ts +17 -3
  93. package/Server/Utils/Monitor/MonitorStatusTimeline.ts +6 -1
  94. package/Server/Utils/Profiling.ts +11 -5
  95. package/Server/Utils/Realtime.ts +90 -31
  96. package/Server/Utils/Response.ts +2 -2
  97. package/Server/Utils/StartServer.ts +43 -9
  98. package/Server/Utils/Telemetry/SpanUtil.ts +90 -0
  99. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +58 -15
  100. package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +58 -15
  101. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +19 -3
  102. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +87 -22
  103. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +12 -3
  104. package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +25 -7
  105. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +55 -8
  106. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +100 -22
  107. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +35 -9
  108. package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +32 -8
  109. package/Server/Utils/Workspace/Slack/Actions/Auth.ts +3 -1
  110. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +52 -11
  111. package/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.ts +4 -1
  112. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +89 -20
  113. package/Server/Utils/Workspace/Slack/Slack.ts +498 -247
  114. package/Server/Utils/Workspace/Workspace.ts +33 -11
  115. package/Server/Utils/Workspace/WorkspaceBase.ts +3 -1
  116. package/Server/Utils/Workspace/WorkspaceMessages/Alert.ts +8 -2
  117. package/Tests/Server/Middleware/UserAuthorization.test.ts +1 -1
  118. package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +12 -3
  119. package/UI/Components/Charts/Area/AreaChart.tsx +35 -1
  120. package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +7 -0
  121. package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +33 -0
  122. package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +33 -0
  123. package/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.ts +14 -0
  124. package/UI/Components/Charts/Line/LineChart.tsx +35 -1
  125. package/UI/Components/Charts/Types/ExemplarPoint.ts +6 -0
  126. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +3 -3
  127. package/UI/Components/Navbar/NavBar.tsx +10 -0
  128. package/build/dist/Models/AnalyticsModels/Metric.js +70 -0
  129. package/build/dist/Models/AnalyticsModels/Metric.js.map +1 -1
  130. package/build/dist/Server/API/AIAgentDataAPI.js +6 -6
  131. package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
  132. package/build/dist/Server/API/BillingAPI.js +13 -13
  133. package/build/dist/Server/API/BillingAPI.js.map +1 -1
  134. package/build/dist/Server/API/CommonAPI.js +5 -0
  135. package/build/dist/Server/API/CommonAPI.js.map +1 -1
  136. package/build/dist/Server/API/DashboardAPI.js +2 -2
  137. package/build/dist/Server/API/DashboardAPI.js.map +1 -1
  138. package/build/dist/Server/API/DashboardDomainAPI.js +3 -3
  139. package/build/dist/Server/API/DashboardDomainAPI.js.map +1 -1
  140. package/build/dist/Server/API/GitHubAPI.js +19 -19
  141. package/build/dist/Server/API/GitHubAPI.js.map +1 -1
  142. package/build/dist/Server/API/MicrosoftTeamsAPI.js +34 -34
  143. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
  144. package/build/dist/Server/API/OpenSourceDeploymentAPI.js +2 -2
  145. package/build/dist/Server/API/OpenSourceDeploymentAPI.js.map +1 -1
  146. package/build/dist/Server/API/SlackAPI.js +38 -38
  147. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  148. package/build/dist/Server/API/StatusAPI.js +16 -16
  149. package/build/dist/Server/API/StatusAPI.js.map +1 -1
  150. package/build/dist/Server/API/StatusPageAPI.js +52 -52
  151. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  152. package/build/dist/Server/API/StatusPageDomainAPI.js +3 -3
  153. package/build/dist/Server/API/StatusPageDomainAPI.js.map +1 -1
  154. package/build/dist/Server/API/UserAPI.js +3 -3
  155. package/build/dist/Server/API/UserAPI.js.map +1 -1
  156. package/build/dist/Server/API/UserCallAPI.js +2 -2
  157. package/build/dist/Server/API/UserCallAPI.js.map +1 -1
  158. package/build/dist/Server/API/UserEmailAPI.js +2 -2
  159. package/build/dist/Server/API/UserEmailAPI.js.map +1 -1
  160. package/build/dist/Server/API/UserPushAPI.js +3 -3
  161. package/build/dist/Server/API/UserPushAPI.js.map +1 -1
  162. package/build/dist/Server/API/UserSmsAPI.js +2 -2
  163. package/build/dist/Server/API/UserSmsAPI.js.map +1 -1
  164. package/build/dist/Server/API/UserWhatsAppAPI.js +2 -2
  165. package/build/dist/Server/API/UserWhatsAppAPI.js.map +1 -1
  166. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js +40 -0
  167. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1774559064921-MigrationName.js.map +1 -0
  168. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js +18 -0
  169. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1775735059360-MigrationName.js.map +1 -0
  170. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
  171. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  172. package/build/dist/Server/Middleware/NotificationMiddleware.js +2 -2
  173. package/build/dist/Server/Middleware/NotificationMiddleware.js.map +1 -1
  174. package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -0
  175. package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
  176. package/build/dist/Server/Middleware/SCIMAuthorization.js +2 -2
  177. package/build/dist/Server/Middleware/SCIMAuthorization.js.map +1 -1
  178. package/build/dist/Server/Middleware/SlackAuthorization.js +10 -10
  179. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  180. package/build/dist/Server/Middleware/TelemetryIngest.js +9 -4
  181. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  182. package/build/dist/Server/Middleware/UserAuthorization.js +10 -5
  183. package/build/dist/Server/Middleware/UserAuthorization.js.map +1 -1
  184. package/build/dist/Server/Middleware/WhatsAppAuthorization.js +6 -6
  185. package/build/dist/Server/Middleware/WhatsAppAuthorization.js.map +1 -1
  186. package/build/dist/Server/Services/AIAgentService.js +13 -7
  187. package/build/dist/Server/Services/AIAgentService.js.map +1 -1
  188. package/build/dist/Server/Services/AIService.js +9 -2
  189. package/build/dist/Server/Services/AIService.js.map +1 -1
  190. package/build/dist/Server/Services/AlertEpisodeFeedService.js +17 -5
  191. package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -1
  192. package/build/dist/Server/Services/AlertEpisodeService.js +40 -10
  193. package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -1
  194. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +81 -24
  195. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -1
  196. package/build/dist/Server/Services/AlertFeedService.js +17 -5
  197. package/build/dist/Server/Services/AlertFeedService.js.map +1 -1
  198. package/build/dist/Server/Services/AlertGroupingEngineService.js +44 -28
  199. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -1
  200. package/build/dist/Server/Services/AlertService.js +72 -20
  201. package/build/dist/Server/Services/AlertService.js.map +1 -1
  202. package/build/dist/Server/Services/AlertStateTimelineService.js +36 -13
  203. package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
  204. package/build/dist/Server/Services/AnalyticsDatabaseService.js +52 -28
  205. package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
  206. package/build/dist/Server/Services/BillingInvoiceService.js +7 -2
  207. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  208. package/build/dist/Server/Services/BillingService.js +8 -8
  209. package/build/dist/Server/Services/BillingService.js.map +1 -1
  210. package/build/dist/Server/Services/DashboardDomainService.js +49 -27
  211. package/build/dist/Server/Services/DashboardDomainService.js.map +1 -1
  212. package/build/dist/Server/Services/DashboardService.js +11 -4
  213. package/build/dist/Server/Services/DashboardService.js.map +1 -1
  214. package/build/dist/Server/Services/DatabaseService.js +32 -12
  215. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  216. package/build/dist/Server/Services/IncidentEpisodeFeedService.js +17 -5
  217. package/build/dist/Server/Services/IncidentEpisodeFeedService.js.map +1 -1
  218. package/build/dist/Server/Services/IncidentEpisodeService.js +40 -10
  219. package/build/dist/Server/Services/IncidentEpisodeService.js.map +1 -1
  220. package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js +81 -24
  221. package/build/dist/Server/Services/IncidentEpisodeStateTimelineService.js.map +1 -1
  222. package/build/dist/Server/Services/IncidentFeedService.js +34 -10
  223. package/build/dist/Server/Services/IncidentFeedService.js.map +1 -1
  224. package/build/dist/Server/Services/IncidentGroupingEngineService.js +43 -29
  225. package/build/dist/Server/Services/IncidentGroupingEngineService.js.map +1 -1
  226. package/build/dist/Server/Services/IncidentService.js +116 -28
  227. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  228. package/build/dist/Server/Services/IncidentSlaRuleService.js +19 -11
  229. package/build/dist/Server/Services/IncidentSlaRuleService.js.map +1 -1
  230. package/build/dist/Server/Services/IncidentSlaService.js +21 -14
  231. package/build/dist/Server/Services/IncidentSlaService.js.map +1 -1
  232. package/build/dist/Server/Services/IncidentStateTimelineService.js +130 -37
  233. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  234. package/build/dist/Server/Services/KubernetesClusterService.js +51 -14
  235. package/build/dist/Server/Services/KubernetesClusterService.js.map +1 -1
  236. package/build/dist/Server/Services/MonitorFeedService.js +34 -10
  237. package/build/dist/Server/Services/MonitorFeedService.js.map +1 -1
  238. package/build/dist/Server/Services/MonitorProbeService.js +4 -2
  239. package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
  240. package/build/dist/Server/Services/MonitorService.js +42 -11
  241. package/build/dist/Server/Services/MonitorService.js.map +1 -1
  242. package/build/dist/Server/Services/MonitorStatusTimelineService.js +69 -21
  243. package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
  244. package/build/dist/Server/Services/NotificationService.js +4 -3
  245. package/build/dist/Server/Services/NotificationService.js.map +1 -1
  246. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +49 -12
  247. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
  248. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +9 -3
  249. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
  250. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +26 -11
  251. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
  252. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js +34 -10
  253. package/build/dist/Server/Services/OnCallDutyPolicyFeedService.js.map +1 -1
  254. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +94 -37
  255. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
  256. package/build/dist/Server/Services/OnCallDutyPolicyService.js +1 -1
  257. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  258. package/build/dist/Server/Services/OpenTelemetryIngestService.js +45 -17
  259. package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
  260. package/build/dist/Server/Services/ProbeService.js +13 -7
  261. package/build/dist/Server/Services/ProbeService.js.map +1 -1
  262. package/build/dist/Server/Services/ProjectService.js +33 -17
  263. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  264. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +17 -5
  265. package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -1
  266. package/build/dist/Server/Services/ScheduledMaintenanceService.js +71 -24
  267. package/build/dist/Server/Services/ScheduledMaintenanceService.js.map +1 -1
  268. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +72 -24
  269. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
  270. package/build/dist/Server/Services/StatusPageDomainService.js +55 -29
  271. package/build/dist/Server/Services/StatusPageDomainService.js.map +1 -1
  272. package/build/dist/Server/Services/StatusPageService.js +29 -9
  273. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  274. package/build/dist/Server/Services/StatusPageSubscriberService.js +393 -130
  275. package/build/dist/Server/Services/StatusPageSubscriberService.js.map +1 -1
  276. package/build/dist/Server/Services/TeamMemberService.js +10 -2
  277. package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
  278. package/build/dist/Server/Services/UserNotificationRuleService.js +10 -2
  279. package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
  280. package/build/dist/Server/Services/UserService.js +8 -3
  281. package/build/dist/Server/Services/UserService.js.map +1 -1
  282. package/build/dist/Server/Services/UserWhatsAppService.js +10 -2
  283. package/build/dist/Server/Services/UserWhatsAppService.js.map +1 -1
  284. package/build/dist/Server/Services/WorkflowService.js +7 -2
  285. package/build/dist/Server/Services/WorkflowService.js.map +1 -1
  286. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +367 -180
  287. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  288. package/build/dist/Server/Types/Domain.js +12 -6
  289. package/build/dist/Server/Types/Domain.js.map +1 -1
  290. package/build/dist/Server/Types/Workflow/Components/API/Post.js +11 -7
  291. package/build/dist/Server/Types/Workflow/Components/API/Post.js.map +1 -1
  292. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js +11 -4
  293. package/build/dist/Server/Types/Workflow/Components/BaseModel/OnTriggerBaseModel.js.map +1 -1
  294. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +7 -0
  295. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  296. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js +45 -17
  297. package/build/dist/Server/Utils/CodeRepository/CodeRepository.js.map +1 -1
  298. package/build/dist/Server/Utils/Express.js.map +1 -1
  299. package/build/dist/Server/Utils/Greenlock/Greenlock.js +36 -29
  300. package/build/dist/Server/Utils/Greenlock/Greenlock.js.map +1 -1
  301. package/build/dist/Server/Utils/LLM/LLMService.js +18 -6
  302. package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
  303. package/build/dist/Server/Utils/Logger.js +61 -13
  304. package/build/dist/Server/Utils/Logger.js.map +1 -1
  305. package/build/dist/Server/Utils/Monitor/MonitorAlert.js +23 -20
  306. package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
  307. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +13 -4
  308. package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
  309. package/build/dist/Server/Utils/Monitor/MonitorIncident.js +25 -22
  310. package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
  311. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js +6 -3
  312. package/build/dist/Server/Utils/Monitor/MonitorStatusTimeline.js.map +1 -1
  313. package/build/dist/Server/Utils/Profiling.js +9 -6
  314. package/build/dist/Server/Utils/Profiling.js.map +1 -1
  315. package/build/dist/Server/Utils/Realtime.js +50 -34
  316. package/build/dist/Server/Utils/Realtime.js.map +1 -1
  317. package/build/dist/Server/Utils/Response.js +2 -2
  318. package/build/dist/Server/Utils/Response.js.map +1 -1
  319. package/build/dist/Server/Utils/StartServer.js +23 -11
  320. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  321. package/build/dist/Server/Utils/Telemetry/SpanUtil.js +52 -0
  322. package/build/dist/Server/Utils/Telemetry/SpanUtil.js.map +1 -0
  323. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +58 -15
  324. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -1
  325. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +58 -15
  326. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -1
  327. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +19 -5
  328. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -1
  329. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +90 -26
  330. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -1
  331. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +12 -3
  332. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -1
  333. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +25 -7
  334. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -1
  335. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +58 -19
  336. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -1
  337. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +102 -29
  338. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  339. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +38 -9
  340. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  341. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +34 -8
  342. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -1
  343. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +3 -1
  344. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
  345. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +55 -13
  346. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  347. package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js +5 -1
  348. package/build/dist/Server/Utils/Workspace/Slack/Actions/IncidentEpisode.js.map +1 -1
  349. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +91 -26
  350. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  351. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +355 -270
  352. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  353. package/build/dist/Server/Utils/Workspace/Workspace.js +21 -12
  354. package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
  355. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js +3 -1
  356. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  357. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js +9 -2
  358. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/Alert.js.map +1 -1
  359. package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js +1 -1
  360. package/build/dist/Tests/Server/Middleware/UserAuthorization.test.js.map +1 -1
  361. package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js +12 -6
  362. package/build/dist/Tests/Server/Services/AnalyticsDatabaseService.test.js.map +1 -1
  363. package/build/dist/UI/Components/Charts/Area/AreaChart.js +20 -2
  364. package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
  365. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +2 -2
  366. package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
  367. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +9 -2
  368. package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
  369. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +9 -2
  370. package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
  371. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js +2 -0
  372. package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedExemplarPoint.js.map +1 -0
  373. package/build/dist/UI/Components/Charts/Line/LineChart.js +20 -2
  374. package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
  375. package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js +2 -0
  376. package/build/dist/UI/Components/Charts/Types/ExemplarPoint.js.map +1 -0
  377. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +3 -3
  378. package/build/dist/UI/Components/Navbar/NavBar.js +9 -1
  379. package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
  380. package/package.json +1 -1
@@ -8,7 +8,7 @@ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
8
8
  import Select from "../Types/Database/Select";
9
9
  import UpdateBy from "../Types/Database/UpdateBy";
10
10
  import Errors from "../Utils/Errors";
11
- import logger from "../Utils/Logger";
11
+ import logger, { LogAttributes } from "../Utils/Logger";
12
12
  import AccessTokenService from "./AccessTokenService";
13
13
  import BillingService from "./BillingService";
14
14
  import DatabaseService from "./DatabaseService";
@@ -180,7 +180,10 @@ export class TeamMemberService extends DatabaseService<TeamMember> {
180
180
  userId: user.id!,
181
181
  },
182
182
  ).catch((err: Error) => {
183
- logger.error(err);
183
+ logger.error(err, {
184
+ projectId: createBy.data.projectId?.toString(),
185
+ userId: user?.id?.toString(),
186
+ } as LogAttributes);
184
187
  });
185
188
  }
186
189
  }
@@ -326,7 +329,10 @@ export class TeamMemberService extends DatabaseService<TeamMember> {
326
329
  userId: member.userId!,
327
330
  endsAt: OneUptimeDate.getCurrentDate(),
328
331
  }).catch((err: Error) => {
329
- logger.error(err);
332
+ logger.error(err, {
333
+ projectId: member.projectId?.toString(),
334
+ userId: member.userId?.toString(),
335
+ } as LogAttributes);
330
336
  });
331
337
 
332
338
  if (member.team?.shouldHaveAtLeastOneMember) {
@@ -66,7 +66,7 @@ import NotificationRuleEventType from "../../Types/Workspace/NotificationRules/E
66
66
  import NotificationRuleWorkspaceChannel from "../../Types/Workspace/NotificationRules/NotificationRuleWorkspaceChannel";
67
67
  import PushNotificationUtil from "../Utils/PushNotificationUtil";
68
68
  import PushNotificationMessage from "../../Types/PushNotification/PushNotificationMessage";
69
- import logger from "../Utils/Logger";
69
+ import logger, { LogAttributes } from "../Utils/Logger";
70
70
  import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
71
71
 
72
72
  export interface NotificationMethodDescriptor {
@@ -2207,7 +2207,10 @@ export class Service extends DatabaseService<Model> {
2207
2207
  incidentId: options.triggeredByIncidentId,
2208
2208
  userId: userId,
2209
2209
  }).catch((error: Error) => {
2210
- logger.error(error);
2210
+ logger.error(error, {
2211
+ projectId: options.projectId?.toString(),
2212
+ userId: userId?.toString(),
2213
+ } as LogAttributes);
2211
2214
  });
2212
2215
  }
2213
2216
 
@@ -2266,7 +2269,10 @@ export class Service extends DatabaseService<Model> {
2266
2269
  userIds: [data.userId],
2267
2270
  },
2268
2271
  ).catch((error: Error) => {
2269
- logger.error(error);
2272
+ logger.error(error, {
2273
+ projectId: data.projectId?.toString(),
2274
+ userId: data.userId?.toString(),
2275
+ } as LogAttributes);
2270
2276
  });
2271
2277
  }
2272
2278
 
@@ -6,7 +6,7 @@ import {
6
6
  import { OnCreate, OnDelete, OnUpdate } from "../Types/Database/Hooks";
7
7
  import UpdateBy from "../Types/Database/UpdateBy";
8
8
  import DeleteBy from "../Types/Database/DeleteBy";
9
- import logger from "../Utils/Logger";
9
+ import logger, { LogAttributes } from "../Utils/Logger";
10
10
  import DatabaseService from "./DatabaseService";
11
11
  import EmailVerificationTokenService from "./EmailVerificationTokenService";
12
12
  import MailService from "./MailService";
@@ -97,7 +97,9 @@ export class Service extends DatabaseService<Model> {
97
97
  *Company:* ${createdItem.companyName?.toString() || "N/A"}`,
98
98
  }).catch((err: Error) => {
99
99
  // log this error but do not throw it. Not important enough to stop the process.
100
- logger.error(err);
100
+ logger.error(err, {
101
+ userId: createdItem.id?.toString(),
102
+ } as LogAttributes);
101
103
  });
102
104
  }
103
105
 
@@ -267,7 +269,7 @@ export class Service extends DatabaseService<Model> {
267
269
  homeURL: new URL(httpProtocol, host).toString(),
268
270
  },
269
271
  }).catch((err: Error) => {
270
- logger.error(err);
272
+ logger.error(err, { userId: user.id?.toString() } as LogAttributes);
271
273
  });
272
274
  }
273
275
  }
@@ -378,7 +380,7 @@ export class Service extends DatabaseService<Model> {
378
380
  homeUrl: new URL(httpProtocol, host).toString(),
379
381
  },
380
382
  }).catch((err: Error) => {
381
- logger.error(err);
383
+ logger.error(err, { userId: user.id?.toString() } as LogAttributes);
382
384
  });
383
385
 
384
386
  await this.updateOneBy({
@@ -2,7 +2,7 @@ import { IsBillingEnabled } from "../EnvironmentConfig";
2
2
  import CreateBy from "../Types/Database/CreateBy";
3
3
  import DeleteBy from "../Types/Database/DeleteBy";
4
4
  import { OnCreate, OnDelete } from "../Types/Database/Hooks";
5
- import logger from "../Utils/Logger";
5
+ import logger, { LogAttributes } from "../Utils/Logger";
6
6
  import DatabaseService from "./DatabaseService";
7
7
  import ProjectService from "./ProjectService";
8
8
  import UserNotificationRuleService from "./UserNotificationRuleService";
@@ -117,7 +117,10 @@ export class Service extends DatabaseService<Model> {
117
117
  ): Promise<Model> {
118
118
  if (!createdItem.isVerified) {
119
119
  this.sendVerificationCode(createdItem).catch((error: Error) => {
120
- logger.error(error);
120
+ logger.error(error, {
121
+ projectId: createdItem.projectId?.toString(),
122
+ userId: createdItem.userId?.toString(),
123
+ } as LogAttributes);
121
124
  });
122
125
  }
123
126
 
@@ -167,7 +170,10 @@ export class Service extends DatabaseService<Model> {
167
170
 
168
171
  public async sendVerificationCode(item: Model): Promise<void> {
169
172
  if (!item.projectId || !item.userId || !item.phone) {
170
- logger.warn("Cannot send WhatsApp verification code. Missing data.");
173
+ logger.warn("Cannot send WhatsApp verification code. Missing data.", {
174
+ projectId: item.projectId?.toString(),
175
+ userId: item.userId?.toString(),
176
+ } as LogAttributes);
171
177
  throw new BadDataException(
172
178
  "Unable to send WhatsApp verification code. Please remove this number and add it again.",
173
179
  );
@@ -16,7 +16,7 @@ import {
16
16
  } from "../../Types/Workflow/Component";
17
17
  import API from "../../Utils/API";
18
18
  import Model from "../../Models/DatabaseModels/Workflow";
19
- import logger from "../Utils/Logger";
19
+ import logger, { LogAttributes } from "../Utils/Logger";
20
20
  import UUID from "../../Utils/UUID";
21
21
 
22
22
  export class Service extends DatabaseService<Model> {
@@ -93,7 +93,9 @@ export class Service extends DatabaseService<Model> {
93
93
  });
94
94
  }
95
95
 
96
- logger.debug("Updating workflow on the workflow service");
96
+ logger.debug("Updating workflow on the workflow service", {
97
+ workflowId: onUpdate.updateBy.query._id?.toString(),
98
+ } as LogAttributes);
97
99
 
98
100
  await API.post<EmptyResponseData>({
99
101
  url: new URL(
@@ -107,7 +109,9 @@ export class Service extends DatabaseService<Model> {
107
109
  },
108
110
  });
109
111
 
110
- logger.debug("Updated workflow on the workflow service");
112
+ logger.debug("Updated workflow on the workflow service", {
113
+ workflowId: onUpdate.updateBy.query._id?.toString(),
114
+ } as LogAttributes);
111
115
 
112
116
  return onUpdate;
113
117
  }