@oneuptime/common 9.4.7 → 9.4.8

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 (304) hide show
  1. package/Models/DatabaseModels/Alert.ts +76 -0
  2. package/Models/DatabaseModels/AlertEpisode.ts +1201 -0
  3. package/Models/DatabaseModels/AlertEpisodeFeed.ts +529 -0
  4. package/Models/DatabaseModels/AlertEpisodeInternalNote.ts +455 -0
  5. package/Models/DatabaseModels/AlertEpisodeMember.ts +586 -0
  6. package/Models/DatabaseModels/AlertEpisodeOwnerTeam.ts +421 -0
  7. package/Models/DatabaseModels/AlertEpisodeOwnerUser.ts +419 -0
  8. package/Models/DatabaseModels/AlertEpisodeStateTimeline.ts +523 -0
  9. package/Models/DatabaseModels/AlertFeed.ts +1 -0
  10. package/Models/DatabaseModels/AlertGroupingRule.ts +1432 -0
  11. package/Models/DatabaseModels/Index.ts +18 -0
  12. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +70 -0
  13. package/Models/DatabaseModels/StatusPageDomain.ts +2 -0
  14. package/Models/DatabaseModels/WorkspaceNotificationLog.ts +57 -0
  15. package/Server/API/SlackAPI.ts +21 -0
  16. package/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.ts +751 -0
  17. package/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.ts +41 -0
  18. package/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.ts +29 -0
  19. package/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.ts +177 -0
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.ts +71 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.ts +35 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.ts +29 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.ts +29 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.ts +35 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.ts +47 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +20 -0
  27. package/Server/Services/AlertEpisodeFeedService.ts +94 -0
  28. package/Server/Services/AlertEpisodeInternalNoteService.ts +71 -0
  29. package/Server/Services/AlertEpisodeMemberService.ts +267 -0
  30. package/Server/Services/AlertEpisodeOwnerTeamService.ts +10 -0
  31. package/Server/Services/AlertEpisodeOwnerUserService.ts +10 -0
  32. package/Server/Services/AlertEpisodeService.ts +988 -0
  33. package/Server/Services/AlertEpisodeStateTimelineService.ts +557 -0
  34. package/Server/Services/AlertGroupingEngineService.ts +1120 -0
  35. package/Server/Services/AlertGroupingRuleService.ts +14 -0
  36. package/Server/Services/AlertService.ts +12 -0
  37. package/Server/Services/CallService.ts +2 -0
  38. package/Server/Services/Index.ts +21 -0
  39. package/Server/Services/MailService.ts +5 -0
  40. package/Server/Services/OnCallDutyPolicyService.ts +5 -0
  41. package/Server/Services/SmsService.ts +2 -0
  42. package/Server/Services/UserNotificationSettingService.ts +23 -0
  43. package/Server/Services/WhatsAppService.ts +5 -0
  44. package/Server/Services/WorkspaceNotificationRuleService.ts +26 -0
  45. package/Server/Utils/AnalyticsDatabase/Statement.ts +6 -2
  46. package/Server/Utils/WhatsAppTemplateUtil.ts +13 -0
  47. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +18 -0
  48. package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +689 -0
  49. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +16 -0
  50. package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +11 -0
  51. package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +915 -0
  52. package/Server/Utils/Workspace/Slack/Messages/AlertEpisode.ts +120 -0
  53. package/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.ts +74 -0
  54. package/Tests/Server/Services/AlertEpisodeMemberService.test.ts +200 -0
  55. package/Tests/Server/Services/AlertEpisodeService.test.ts +240 -0
  56. package/Tests/Server/Services/AlertGroupingEngineService.test.ts +542 -0
  57. package/Tests/Server/Services/AlertGroupingRuleService.test.ts +383 -0
  58. package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +1 -1
  59. package/Tests/UI/Components/Input.test.tsx +1 -1
  60. package/Tests/UI/Components/TextArea.test.tsx +2 -2
  61. package/Types/BaseDatabase/SortOrder.ts +9 -0
  62. package/Types/Email/EmailTemplateType.ts +5 -0
  63. package/Types/NotificationRule/NotificationRuleType.ts +1 -0
  64. package/Types/NotificationSetting/NotificationSettingEventType.ts +7 -0
  65. package/Types/Permission.ts +309 -0
  66. package/Types/UserNotification/UserNotificationEventType.ts +1 -0
  67. package/Types/WhatsApp/WhatsAppTemplates.ts +20 -0
  68. package/Types/Workspace/NotificationRules/EventType.ts +1 -0
  69. package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +32 -3
  70. package/UI/Components/Accordion/Accordion.tsx +20 -2
  71. package/UI/Components/Alerts/Alert.tsx +1 -0
  72. package/UI/Components/Button/Button.tsx +29 -0
  73. package/UI/Components/CardSelect/CardSelect.tsx +5 -1
  74. package/UI/Components/Checkbox/Checkbox.tsx +7 -3
  75. package/UI/Components/ColorCircle/ColorCircle.tsx +2 -0
  76. package/UI/Components/ColorViewer/ColorViewer.tsx +19 -3
  77. package/UI/Components/CopyableButton/CopyableButton.tsx +22 -5
  78. package/UI/Components/Detail/Detail.tsx +1 -1
  79. package/UI/Components/Dropdown/Dropdown.tsx +14 -1
  80. package/UI/Components/Forms/Fields/FormField.tsx +28 -0
  81. package/UI/Components/FullPageModal/FullPageModal.tsx +35 -4
  82. package/UI/Components/Input/Input.tsx +14 -2
  83. package/UI/Components/Link/Link.tsx +1 -0
  84. package/UI/Components/Loader/Loader.tsx +8 -2
  85. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +76 -1
  86. package/UI/Components/Modal/Modal.tsx +47 -3
  87. package/UI/Components/ModelTable/BaseModelTable.tsx +42 -1
  88. package/UI/Components/MoreMenu/MoreMenu.tsx +84 -2
  89. package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +30 -8
  90. package/UI/Components/Pagination/Pagination.tsx +113 -8
  91. package/UI/Components/ProgressBar/ProgressBar.tsx +12 -2
  92. package/UI/Components/Radio/Radio.tsx +21 -3
  93. package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +54 -27
  94. package/UI/Components/StatusBubble/StatusBubble.tsx +7 -2
  95. package/UI/Components/Table/TableHeader.tsx +20 -3
  96. package/UI/Components/Tabs/Tab.tsx +16 -1
  97. package/UI/Components/Tabs/Tabs.tsx +12 -1
  98. package/UI/Components/TextArea/TextArea.tsx +12 -2
  99. package/UI/Components/Toggle/Toggle.tsx +14 -3
  100. package/UI/Components/Tooltip/Tooltip.tsx +11 -1
  101. package/UI/Components/TopAlert/TopAlert.tsx +2 -0
  102. package/build/dist/Models/DatabaseModels/Alert.js +77 -0
  103. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  104. package/build/dist/Models/DatabaseModels/AlertEpisode.js +1225 -0
  105. package/build/dist/Models/DatabaseModels/AlertEpisode.js.map +1 -0
  106. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js +553 -0
  107. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js.map +1 -0
  108. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js +467 -0
  109. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js.map +1 -0
  110. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js +607 -0
  111. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js.map +1 -0
  112. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js +437 -0
  113. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js.map +1 -0
  114. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js +436 -0
  115. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js.map +1 -0
  116. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +546 -0
  117. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -0
  118. package/build/dist/Models/DatabaseModels/AlertFeed.js +1 -0
  119. package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
  120. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js +1437 -0
  121. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js.map +1 -0
  122. package/build/dist/Models/DatabaseModels/Index.js +16 -0
  123. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  124. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +69 -0
  125. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
  126. package/build/dist/Models/DatabaseModels/StatusPageDomain.js +2 -0
  127. package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
  128. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js +58 -0
  129. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js.map +1 -1
  130. package/build/dist/Server/API/SlackAPI.js +18 -0
  131. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  132. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js +266 -0
  133. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js.map +1 -0
  134. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js +20 -0
  135. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js.map +1 -0
  136. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js +16 -0
  137. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js.map +1 -0
  138. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js +68 -0
  139. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js.map +1 -0
  140. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js +30 -0
  141. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js.map +1 -0
  142. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js +18 -0
  143. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js.map +1 -0
  144. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js +16 -0
  145. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js.map +1 -0
  146. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js +16 -0
  147. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js.map +1 -0
  148. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js +18 -0
  149. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js.map +1 -0
  150. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js +22 -0
  151. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js.map +1 -0
  152. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +20 -0
  153. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  154. package/build/dist/Server/Services/AlertEpisodeFeedService.js +83 -0
  155. package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -0
  156. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js +70 -0
  157. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js.map +1 -0
  158. package/build/dist/Server/Services/AlertEpisodeMemberService.js +256 -0
  159. package/build/dist/Server/Services/AlertEpisodeMemberService.js.map +1 -0
  160. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js +9 -0
  161. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js.map +1 -0
  162. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js +9 -0
  163. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js.map +1 -0
  164. package/build/dist/Server/Services/AlertEpisodeService.js +885 -0
  165. package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -0
  166. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +494 -0
  167. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -0
  168. package/build/dist/Server/Services/AlertGroupingEngineService.js +893 -0
  169. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -0
  170. package/build/dist/Server/Services/AlertGroupingRuleService.js +13 -0
  171. package/build/dist/Server/Services/AlertGroupingRuleService.js.map +1 -0
  172. package/build/dist/Server/Services/AlertService.js +11 -0
  173. package/build/dist/Server/Services/AlertService.js.map +1 -1
  174. package/build/dist/Server/Services/CallService.js +11 -10
  175. package/build/dist/Server/Services/CallService.js.map +1 -1
  176. package/build/dist/Server/Services/Index.js +18 -0
  177. package/build/dist/Server/Services/Index.js.map +1 -1
  178. package/build/dist/Server/Services/MailService.js +3 -0
  179. package/build/dist/Server/Services/MailService.js.map +1 -1
  180. package/build/dist/Server/Services/OnCallDutyPolicyService.js +3 -0
  181. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  182. package/build/dist/Server/Services/SmsService.js +11 -10
  183. package/build/dist/Server/Services/SmsService.js.map +1 -1
  184. package/build/dist/Server/Services/UserNotificationSettingService.js +9 -0
  185. package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
  186. package/build/dist/Server/Services/WhatsAppService.js +3 -0
  187. package/build/dist/Server/Services/WhatsAppService.js.map +1 -1
  188. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +25 -0
  189. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  190. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
  191. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  192. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js +8 -0
  193. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js.map +1 -1
  194. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +17 -0
  195. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
  196. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +545 -0
  197. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -0
  198. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +13 -0
  199. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  200. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +10 -0
  201. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
  202. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +651 -0
  203. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -0
  204. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js +100 -0
  205. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js.map +1 -0
  206. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js +70 -0
  207. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js.map +1 -0
  208. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js +165 -0
  209. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js.map +1 -0
  210. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js +193 -0
  211. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js.map +1 -0
  212. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js +412 -0
  213. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js.map +1 -0
  214. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js +308 -0
  215. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js.map +1 -0
  216. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +1 -1
  217. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
  218. package/build/dist/Tests/UI/Components/Input.test.js +1 -1
  219. package/build/dist/Tests/UI/Components/Input.test.js.map +1 -1
  220. package/build/dist/Tests/UI/Components/TextArea.test.js +2 -2
  221. package/build/dist/Tests/UI/Components/TextArea.test.js.map +1 -1
  222. package/build/dist/Types/BaseDatabase/SortOrder.js +5 -0
  223. package/build/dist/Types/BaseDatabase/SortOrder.js.map +1 -1
  224. package/build/dist/Types/Email/EmailTemplateType.js +4 -0
  225. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  226. package/build/dist/Types/NotificationRule/NotificationRuleType.js +1 -0
  227. package/build/dist/Types/NotificationRule/NotificationRuleType.js.map +1 -1
  228. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +5 -0
  229. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
  230. package/build/dist/Types/Permission.js +264 -0
  231. package/build/dist/Types/Permission.js.map +1 -1
  232. package/build/dist/Types/UserNotification/UserNotificationEventType.js +1 -0
  233. package/build/dist/Types/UserNotification/UserNotificationEventType.js.map +1 -1
  234. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js +12 -0
  235. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js.map +1 -1
  236. package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -0
  237. package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
  238. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +28 -3
  239. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
  240. package/build/dist/UI/Components/Accordion/Accordion.js +10 -3
  241. package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
  242. package/build/dist/UI/Components/Alerts/Alert.js +1 -1
  243. package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
  244. package/build/dist/UI/Components/Button/Button.js +8 -2
  245. package/build/dist/UI/Components/Button/Button.js.map +1 -1
  246. package/build/dist/UI/Components/CardSelect/CardSelect.js +1 -1
  247. package/build/dist/UI/Components/CardSelect/CardSelect.js.map +1 -1
  248. package/build/dist/UI/Components/Checkbox/Checkbox.js +2 -2
  249. package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
  250. package/build/dist/UI/Components/ColorCircle/ColorCircle.js +1 -1
  251. package/build/dist/UI/Components/ColorCircle/ColorCircle.js.map +1 -1
  252. package/build/dist/UI/Components/ColorViewer/ColorViewer.js +12 -3
  253. package/build/dist/UI/Components/ColorViewer/ColorViewer.js.map +1 -1
  254. package/build/dist/UI/Components/CopyableButton/CopyableButton.js +12 -5
  255. package/build/dist/UI/Components/CopyableButton/CopyableButton.js.map +1 -1
  256. package/build/dist/UI/Components/Detail/Detail.js +1 -1
  257. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  258. package/build/dist/UI/Components/Dropdown/Dropdown.js +5 -3
  259. package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
  260. package/build/dist/UI/Components/Forms/Fields/FormField.js +19 -1
  261. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  262. package/build/dist/UI/Components/FullPageModal/FullPageModal.js +24 -5
  263. package/build/dist/UI/Components/FullPageModal/FullPageModal.js.map +1 -1
  264. package/build/dist/UI/Components/Input/Input.js +3 -3
  265. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  266. package/build/dist/UI/Components/Link/Link.js +1 -1
  267. package/build/dist/UI/Components/Link/Link.js.map +1 -1
  268. package/build/dist/UI/Components/Loader/Loader.js +6 -4
  269. package/build/dist/UI/Components/Loader/Loader.js.map +1 -1
  270. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +56 -3
  271. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  272. package/build/dist/UI/Components/Modal/Modal.js +28 -3
  273. package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
  274. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +23 -1
  275. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  276. package/build/dist/UI/Components/MoreMenu/MoreMenu.js +67 -6
  277. package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
  278. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +14 -3
  279. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
  280. package/build/dist/UI/Components/Pagination/Pagination.js +69 -13
  281. package/build/dist/UI/Components/Pagination/Pagination.js.map +1 -1
  282. package/build/dist/UI/Components/ProgressBar/ProgressBar.js +2 -2
  283. package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
  284. package/build/dist/UI/Components/Radio/Radio.js +8 -5
  285. package/build/dist/UI/Components/Radio/Radio.js.map +1 -1
  286. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +23 -4
  287. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
  288. package/build/dist/UI/Components/StatusBubble/StatusBubble.js +2 -2
  289. package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
  290. package/build/dist/UI/Components/Table/TableHeader.js +12 -4
  291. package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
  292. package/build/dist/UI/Components/Tabs/Tab.js +8 -1
  293. package/build/dist/UI/Components/Tabs/Tab.js.map +1 -1
  294. package/build/dist/UI/Components/Tabs/Tabs.js +4 -3
  295. package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
  296. package/build/dist/UI/Components/TextArea/TextArea.js +3 -3
  297. package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
  298. package/build/dist/UI/Components/Toggle/Toggle.js +7 -4
  299. package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
  300. package/build/dist/UI/Components/Tooltip/Tooltip.js +4 -1
  301. package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
  302. package/build/dist/UI/Components/TopAlert/TopAlert.js +1 -1
  303. package/build/dist/UI/Components/TopAlert/TopAlert.js.map +1 -1
  304. package/package.json +2 -1
@@ -0,0 +1,41 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769125561322 implements MigrationInterface {
4
+ public name = "MigrationName1769125561322";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertGroupingRule" ADD "enableResolveDelay" boolean NOT NULL DEFAULT false`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "AlertGroupingRule" ADD "enableReopenWindow" boolean NOT NULL DEFAULT false`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "AlertGroupingRule" ADD "enableInactivityTimeout" boolean NOT NULL DEFAULT false`,
15
+ );
16
+ await queryRunner.query(
17
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
18
+ );
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
21
+ );
22
+ }
23
+
24
+ public async down(queryRunner: QueryRunner): Promise<void> {
25
+ await queryRunner.query(
26
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
27
+ );
28
+ await queryRunner.query(
29
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "enableInactivityTimeout"`,
33
+ );
34
+ await queryRunner.query(
35
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "enableReopenWindow"`,
36
+ );
37
+ await queryRunner.query(
38
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "enableResolveDelay"`,
39
+ );
40
+ }
41
+ }
@@ -0,0 +1,29 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769170578688 implements MigrationInterface {
4
+ public name = "MigrationName1769170578688";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertGroupingRule" ADD "enableTimeWindow" boolean NOT NULL DEFAULT false`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
15
+ );
16
+ }
17
+
18
+ public async down(queryRunner: QueryRunner): Promise<void> {
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
21
+ );
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
24
+ );
25
+ await queryRunner.query(
26
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "enableTimeWindow"`,
27
+ );
28
+ }
29
+ }
@@ -0,0 +1,177 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769172358833 implements MigrationInterface {
4
+ public name = "MigrationName1769172358833";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `CREATE TABLE "AlertGroupingRuleMonitor" ("alertGroupingRuleId" uuid NOT NULL, "monitorId" uuid NOT NULL, CONSTRAINT "PK_2b6faf923556df2242a16b93fb7" PRIMARY KEY ("alertGroupingRuleId", "monitorId"))`,
9
+ );
10
+ await queryRunner.query(
11
+ `CREATE INDEX "IDX_91b40cc6d343526075015f05a9" ON "AlertGroupingRuleMonitor" ("alertGroupingRuleId") `,
12
+ );
13
+ await queryRunner.query(
14
+ `CREATE INDEX "IDX_a819b7733a603696cfcaadba35" ON "AlertGroupingRuleMonitor" ("monitorId") `,
15
+ );
16
+ await queryRunner.query(
17
+ `CREATE TABLE "AlertGroupingRuleAlertSeverity" ("alertGroupingRuleId" uuid NOT NULL, "alertSeverityId" uuid NOT NULL, CONSTRAINT "PK_5178f1e1963b8496beda60f330d" PRIMARY KEY ("alertGroupingRuleId", "alertSeverityId"))`,
18
+ );
19
+ await queryRunner.query(
20
+ `CREATE INDEX "IDX_0e7726fda2f3288da32acd33a1" ON "AlertGroupingRuleAlertSeverity" ("alertGroupingRuleId") `,
21
+ );
22
+ await queryRunner.query(
23
+ `CREATE INDEX "IDX_c1d82dcbc353eb227ab2a05984" ON "AlertGroupingRuleAlertSeverity" ("alertSeverityId") `,
24
+ );
25
+ await queryRunner.query(
26
+ `CREATE TABLE "AlertGroupingRuleAlertLabel" ("alertGroupingRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_b01145322bb355d6817b9c99045" PRIMARY KEY ("alertGroupingRuleId", "labelId"))`,
27
+ );
28
+ await queryRunner.query(
29
+ `CREATE INDEX "IDX_fc256e6b1e63df61175380f97b" ON "AlertGroupingRuleAlertLabel" ("alertGroupingRuleId") `,
30
+ );
31
+ await queryRunner.query(
32
+ `CREATE INDEX "IDX_12620c464765c622c231d7c459" ON "AlertGroupingRuleAlertLabel" ("labelId") `,
33
+ );
34
+ await queryRunner.query(
35
+ `CREATE TABLE "AlertGroupingRuleMonitorLabel" ("alertGroupingRuleId" uuid NOT NULL, "labelId" uuid NOT NULL, CONSTRAINT "PK_443ced6f783a0180e4eb8e0ce80" PRIMARY KEY ("alertGroupingRuleId", "labelId"))`,
36
+ );
37
+ await queryRunner.query(
38
+ `CREATE INDEX "IDX_8bb9e0543ad8ddb67480add741" ON "AlertGroupingRuleMonitorLabel" ("alertGroupingRuleId") `,
39
+ );
40
+ await queryRunner.query(
41
+ `CREATE INDEX "IDX_38332de99fcc4c051440602bfc" ON "AlertGroupingRuleMonitorLabel" ("labelId") `,
42
+ );
43
+ await queryRunner.query(
44
+ `ALTER TABLE "AlertGroupingRule" ADD "alertTitlePattern" character varying(500)`,
45
+ );
46
+ await queryRunner.query(
47
+ `ALTER TABLE "AlertGroupingRule" ADD "alertDescriptionPattern" character varying(500)`,
48
+ );
49
+ await queryRunner.query(
50
+ `ALTER TABLE "AlertGroupingRule" ADD "monitorNamePattern" character varying(500)`,
51
+ );
52
+ await queryRunner.query(
53
+ `ALTER TABLE "AlertGroupingRule" ADD "monitorDescriptionPattern" character varying(500)`,
54
+ );
55
+ await queryRunner.query(
56
+ `ALTER TABLE "AlertGroupingRule" ADD "groupByMonitor" boolean NOT NULL DEFAULT true`,
57
+ );
58
+ await queryRunner.query(
59
+ `ALTER TABLE "AlertGroupingRule" ADD "groupBySeverity" boolean NOT NULL DEFAULT false`,
60
+ );
61
+ await queryRunner.query(
62
+ `ALTER TABLE "AlertGroupingRule" ADD "groupByAlertTitle" boolean NOT NULL DEFAULT false`,
63
+ );
64
+ await queryRunner.query(
65
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
66
+ );
67
+ await queryRunner.query(
68
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
69
+ );
70
+ await queryRunner.query(
71
+ `ALTER TABLE "AlertGroupingRuleMonitor" ADD CONSTRAINT "FK_91b40cc6d343526075015f05a9a" FOREIGN KEY ("alertGroupingRuleId") REFERENCES "AlertGroupingRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
72
+ );
73
+ await queryRunner.query(
74
+ `ALTER TABLE "AlertGroupingRuleMonitor" ADD CONSTRAINT "FK_a819b7733a603696cfcaadba356" FOREIGN KEY ("monitorId") REFERENCES "Monitor"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
75
+ );
76
+ await queryRunner.query(
77
+ `ALTER TABLE "AlertGroupingRuleAlertSeverity" ADD CONSTRAINT "FK_0e7726fda2f3288da32acd33a10" FOREIGN KEY ("alertGroupingRuleId") REFERENCES "AlertGroupingRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
78
+ );
79
+ await queryRunner.query(
80
+ `ALTER TABLE "AlertGroupingRuleAlertSeverity" ADD CONSTRAINT "FK_c1d82dcbc353eb227ab2a059847" FOREIGN KEY ("alertSeverityId") REFERENCES "AlertSeverity"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
81
+ );
82
+ await queryRunner.query(
83
+ `ALTER TABLE "AlertGroupingRuleAlertLabel" ADD CONSTRAINT "FK_fc256e6b1e63df61175380f97b7" FOREIGN KEY ("alertGroupingRuleId") REFERENCES "AlertGroupingRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
84
+ );
85
+ await queryRunner.query(
86
+ `ALTER TABLE "AlertGroupingRuleAlertLabel" ADD CONSTRAINT "FK_12620c464765c622c231d7c459e" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
87
+ );
88
+ await queryRunner.query(
89
+ `ALTER TABLE "AlertGroupingRuleMonitorLabel" ADD CONSTRAINT "FK_8bb9e0543ad8ddb67480add741f" FOREIGN KEY ("alertGroupingRuleId") REFERENCES "AlertGroupingRule"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
90
+ );
91
+ await queryRunner.query(
92
+ `ALTER TABLE "AlertGroupingRuleMonitorLabel" ADD CONSTRAINT "FK_38332de99fcc4c051440602bfc0" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
93
+ );
94
+ }
95
+
96
+ public async down(queryRunner: QueryRunner): Promise<void> {
97
+ await queryRunner.query(
98
+ `ALTER TABLE "AlertGroupingRuleMonitorLabel" DROP CONSTRAINT "FK_38332de99fcc4c051440602bfc0"`,
99
+ );
100
+ await queryRunner.query(
101
+ `ALTER TABLE "AlertGroupingRuleMonitorLabel" DROP CONSTRAINT "FK_8bb9e0543ad8ddb67480add741f"`,
102
+ );
103
+ await queryRunner.query(
104
+ `ALTER TABLE "AlertGroupingRuleAlertLabel" DROP CONSTRAINT "FK_12620c464765c622c231d7c459e"`,
105
+ );
106
+ await queryRunner.query(
107
+ `ALTER TABLE "AlertGroupingRuleAlertLabel" DROP CONSTRAINT "FK_fc256e6b1e63df61175380f97b7"`,
108
+ );
109
+ await queryRunner.query(
110
+ `ALTER TABLE "AlertGroupingRuleAlertSeverity" DROP CONSTRAINT "FK_c1d82dcbc353eb227ab2a059847"`,
111
+ );
112
+ await queryRunner.query(
113
+ `ALTER TABLE "AlertGroupingRuleAlertSeverity" DROP CONSTRAINT "FK_0e7726fda2f3288da32acd33a10"`,
114
+ );
115
+ await queryRunner.query(
116
+ `ALTER TABLE "AlertGroupingRuleMonitor" DROP CONSTRAINT "FK_a819b7733a603696cfcaadba356"`,
117
+ );
118
+ await queryRunner.query(
119
+ `ALTER TABLE "AlertGroupingRuleMonitor" DROP CONSTRAINT "FK_91b40cc6d343526075015f05a9a"`,
120
+ );
121
+ await queryRunner.query(
122
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
123
+ );
124
+ await queryRunner.query(
125
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
126
+ );
127
+ await queryRunner.query(
128
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "groupByAlertTitle"`,
129
+ );
130
+ await queryRunner.query(
131
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "groupBySeverity"`,
132
+ );
133
+ await queryRunner.query(
134
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "groupByMonitor"`,
135
+ );
136
+ await queryRunner.query(
137
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "monitorDescriptionPattern"`,
138
+ );
139
+ await queryRunner.query(
140
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "monitorNamePattern"`,
141
+ );
142
+ await queryRunner.query(
143
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "alertDescriptionPattern"`,
144
+ );
145
+ await queryRunner.query(
146
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "alertTitlePattern"`,
147
+ );
148
+ await queryRunner.query(
149
+ `DROP INDEX "public"."IDX_38332de99fcc4c051440602bfc"`,
150
+ );
151
+ await queryRunner.query(
152
+ `DROP INDEX "public"."IDX_8bb9e0543ad8ddb67480add741"`,
153
+ );
154
+ await queryRunner.query(`DROP TABLE "AlertGroupingRuleMonitorLabel"`);
155
+ await queryRunner.query(
156
+ `DROP INDEX "public"."IDX_12620c464765c622c231d7c459"`,
157
+ );
158
+ await queryRunner.query(
159
+ `DROP INDEX "public"."IDX_fc256e6b1e63df61175380f97b"`,
160
+ );
161
+ await queryRunner.query(`DROP TABLE "AlertGroupingRuleAlertLabel"`);
162
+ await queryRunner.query(
163
+ `DROP INDEX "public"."IDX_c1d82dcbc353eb227ab2a05984"`,
164
+ );
165
+ await queryRunner.query(
166
+ `DROP INDEX "public"."IDX_0e7726fda2f3288da32acd33a1"`,
167
+ );
168
+ await queryRunner.query(`DROP TABLE "AlertGroupingRuleAlertSeverity"`);
169
+ await queryRunner.query(
170
+ `DROP INDEX "public"."IDX_a819b7733a603696cfcaadba35"`,
171
+ );
172
+ await queryRunner.query(
173
+ `DROP INDEX "public"."IDX_91b40cc6d343526075015f05a9"`,
174
+ );
175
+ await queryRunner.query(`DROP TABLE "AlertGroupingRuleMonitor"`);
176
+ }
177
+ }
@@ -0,0 +1,71 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769176450526 implements MigrationInterface {
4
+ public name = "MigrationName1769176450526";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "OnCallDutyPolicyExecutionLog" ADD "triggeredByAlertEpisodeId" uuid`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "WorkspaceNotificationLog" ADD "alertEpisodeId" uuid`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "AlertEpisodeInternalNote" ADD "postedFromSlackMessageId" character varying`,
15
+ );
16
+ await queryRunner.query(
17
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
18
+ );
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
21
+ );
22
+ await queryRunner.query(
23
+ `CREATE INDEX "IDX_71a74e4141a9de6626e3710f2d" ON "OnCallDutyPolicyExecutionLog" ("triggeredByAlertEpisodeId") `,
24
+ );
25
+ await queryRunner.query(
26
+ `CREATE INDEX "IDX_4eee6dbdf00be2aec7c6cdbcb3" ON "WorkspaceNotificationLog" ("alertEpisodeId") `,
27
+ );
28
+ await queryRunner.query(
29
+ `CREATE INDEX "IDX_26bd01eb674e2e659fe6409423" ON "AlertEpisodeInternalNote" ("postedFromSlackMessageId") `,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "OnCallDutyPolicyExecutionLog" ADD CONSTRAINT "FK_71a74e4141a9de6626e3710f2d7" FOREIGN KEY ("triggeredByAlertEpisodeId") REFERENCES "AlertEpisode"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
33
+ );
34
+ await queryRunner.query(
35
+ `ALTER TABLE "WorkspaceNotificationLog" ADD CONSTRAINT "FK_4eee6dbdf00be2aec7c6cdbcb33" FOREIGN KEY ("alertEpisodeId") REFERENCES "AlertEpisode"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
36
+ );
37
+ }
38
+
39
+ public async down(queryRunner: QueryRunner): Promise<void> {
40
+ await queryRunner.query(
41
+ `ALTER TABLE "WorkspaceNotificationLog" DROP CONSTRAINT "FK_4eee6dbdf00be2aec7c6cdbcb33"`,
42
+ );
43
+ await queryRunner.query(
44
+ `ALTER TABLE "OnCallDutyPolicyExecutionLog" DROP CONSTRAINT "FK_71a74e4141a9de6626e3710f2d7"`,
45
+ );
46
+ await queryRunner.query(
47
+ `DROP INDEX "public"."IDX_26bd01eb674e2e659fe6409423"`,
48
+ );
49
+ await queryRunner.query(
50
+ `DROP INDEX "public"."IDX_4eee6dbdf00be2aec7c6cdbcb3"`,
51
+ );
52
+ await queryRunner.query(
53
+ `DROP INDEX "public"."IDX_71a74e4141a9de6626e3710f2d"`,
54
+ );
55
+ await queryRunner.query(
56
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
57
+ );
58
+ await queryRunner.query(
59
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
60
+ );
61
+ await queryRunner.query(
62
+ `ALTER TABLE "AlertEpisodeInternalNote" DROP COLUMN "postedFromSlackMessageId"`,
63
+ );
64
+ await queryRunner.query(
65
+ `ALTER TABLE "WorkspaceNotificationLog" DROP COLUMN "alertEpisodeId"`,
66
+ );
67
+ await queryRunner.query(
68
+ `ALTER TABLE "OnCallDutyPolicyExecutionLog" DROP COLUMN "triggeredByAlertEpisodeId"`,
69
+ );
70
+ }
71
+ }
@@ -0,0 +1,35 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769190495840 implements MigrationInterface {
4
+ public name = "MigrationName1769190495840";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertEpisode" ADD "remediationNotes" text`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "AlertEpisode" ADD "postUpdatesToWorkspaceChannels" jsonb`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
15
+ );
16
+ await queryRunner.query(
17
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
18
+ );
19
+ }
20
+
21
+ public async down(queryRunner: QueryRunner): Promise<void> {
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
24
+ );
25
+ await queryRunner.query(
26
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
27
+ );
28
+ await queryRunner.query(
29
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "postUpdatesToWorkspaceChannels"`,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "remediationNotes"`,
33
+ );
34
+ }
35
+ }
@@ -0,0 +1,29 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769199303656 implements MigrationInterface {
4
+ public name = "MigrationName1769199303656";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertGroupingRule" ADD "groupByService" boolean NOT NULL DEFAULT false`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
15
+ );
16
+ }
17
+
18
+ public async down(queryRunner: QueryRunner): Promise<void> {
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
21
+ );
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
24
+ );
25
+ await queryRunner.query(
26
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "groupByService"`,
27
+ );
28
+ }
29
+ }
@@ -0,0 +1,29 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769202898645 implements MigrationInterface {
4
+ public name = "MigrationName1769202898645";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertGroupingRule" ADD "episodeDescriptionTemplate" character varying`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
15
+ );
16
+ }
17
+
18
+ public async down(queryRunner: QueryRunner): Promise<void> {
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
21
+ );
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
24
+ );
25
+ await queryRunner.query(
26
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "episodeDescriptionTemplate"`,
27
+ );
28
+ }
29
+ }
@@ -0,0 +1,35 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769428619414 implements MigrationInterface {
4
+ public name = "MigrationName1769428619414";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertEpisode" ADD "titleTemplate" character varying(100)`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "AlertEpisode" ADD "descriptionTemplate" character varying`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
15
+ );
16
+ await queryRunner.query(
17
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
18
+ );
19
+ }
20
+
21
+ public async down(queryRunner: QueryRunner): Promise<void> {
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
24
+ );
25
+ await queryRunner.query(
26
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
27
+ );
28
+ await queryRunner.query(
29
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "descriptionTemplate"`,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "titleTemplate"`,
33
+ );
34
+ }
35
+ }
@@ -0,0 +1,47 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769428821686 implements MigrationInterface {
4
+ public name = "MigrationName1769428821686";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "episodeTitleTemplate"`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "AlertGroupingRule" ADD "episodeTitleTemplate" character varying`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "titleTemplate"`,
15
+ );
16
+ await queryRunner.query(
17
+ `ALTER TABLE "AlertEpisode" ADD "titleTemplate" character varying`,
18
+ );
19
+ await queryRunner.query(
20
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
21
+ );
22
+ await queryRunner.query(
23
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
24
+ );
25
+ }
26
+
27
+ public async down(queryRunner: QueryRunner): Promise<void> {
28
+ await queryRunner.query(
29
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
33
+ );
34
+ await queryRunner.query(
35
+ `ALTER TABLE "AlertEpisode" DROP COLUMN "titleTemplate"`,
36
+ );
37
+ await queryRunner.query(
38
+ `ALTER TABLE "AlertEpisode" ADD "titleTemplate" character varying(100)`,
39
+ );
40
+ await queryRunner.query(
41
+ `ALTER TABLE "AlertGroupingRule" DROP COLUMN "episodeTitleTemplate"`,
42
+ );
43
+ await queryRunner.query(
44
+ `ALTER TABLE "AlertGroupingRule" ADD "episodeTitleTemplate" character varying(100)`,
45
+ );
46
+ }
47
+ }
@@ -223,7 +223,17 @@ import { AddIncomingEmailMonitor1768335589018 } from "./1768335589018-AddIncomin
223
223
  import { MigrationName1768422356713 } from "./1768422356713-MigrationName";
224
224
  import { MigrationName1768583966447 } from "./1768583966447-MigrationName";
225
225
  import { MigrationName1768825402472 } from "./1768825402472-MigrationName";
226
+ import { MigrationName1768938069147 } from "./1768938069147-MigrationName";
227
+ import { MigrationName1769125561322 } from "./1769125561322-MigrationName";
226
228
  import { MigrationName1769169355244 } from "./1769169355244-MigrationName";
229
+ import { MigrationName1769170578688 } from "./1769170578688-MigrationName";
230
+ import { MigrationName1769172358833 } from "./1769172358833-MigrationName";
231
+ import { MigrationName1769176450526 } from "./1769176450526-MigrationName";
232
+ import { MigrationName1769190495840 } from "./1769190495840-MigrationName";
233
+ import { MigrationName1769199303656 } from "./1769199303656-MigrationName";
234
+ import { MigrationName1769202898645 } from "./1769202898645-MigrationName";
235
+ import { MigrationName1769428619414 } from "./1769428619414-MigrationName";
236
+ import { MigrationName1769428821686 } from "./1769428821686-MigrationName";
227
237
 
228
238
  export default [
229
239
  InitialMigration,
@@ -452,4 +462,14 @@ export default [
452
462
  MigrationName1768583966447,
453
463
  MigrationName1768825402472,
454
464
  MigrationName1769169355244,
465
+ MigrationName1768938069147,
466
+ MigrationName1769125561322,
467
+ MigrationName1769170578688,
468
+ MigrationName1769172358833,
469
+ MigrationName1769176450526,
470
+ MigrationName1769190495840,
471
+ MigrationName1769199303656,
472
+ MigrationName1769202898645,
473
+ MigrationName1769428619414,
474
+ MigrationName1769428821686,
455
475
  ];
@@ -0,0 +1,94 @@
1
+ import { Blue500 } from "../../Types/BrandColors";
2
+ import Color from "../../Types/Color";
3
+ import OneUptimeDate from "../../Types/Date";
4
+ import BadDataException from "../../Types/Exception/BadDataException";
5
+ import ObjectID from "../../Types/ObjectID";
6
+ import { IsBillingEnabled } from "../EnvironmentConfig";
7
+ import logger from "../Utils/Logger";
8
+ import DatabaseService from "./DatabaseService";
9
+ import Model, {
10
+ AlertEpisodeFeedEventType,
11
+ } from "../../Models/DatabaseModels/AlertEpisodeFeed";
12
+ import CaptureSpan from "../Utils/Telemetry/CaptureSpan";
13
+
14
+ export class Service extends DatabaseService<Model> {
15
+ public constructor() {
16
+ super(Model);
17
+
18
+ if (IsBillingEnabled) {
19
+ this.hardDeleteItemsOlderThanInDays("createdAt", 3 * 365); // 3 years
20
+ }
21
+ }
22
+
23
+ @CaptureSpan()
24
+ public async createAlertEpisodeFeedItem(data: {
25
+ alertEpisodeId: ObjectID;
26
+ feedInfoInMarkdown: string;
27
+ alertEpisodeFeedEventType: AlertEpisodeFeedEventType;
28
+ projectId: ObjectID;
29
+ moreInformationInMarkdown?: string | undefined;
30
+ displayColor?: Color | undefined;
31
+ userId?: ObjectID | undefined;
32
+ postedAt?: Date | undefined;
33
+ }): Promise<void> {
34
+ try {
35
+ if (!data.alertEpisodeId) {
36
+ throw new BadDataException("Alert Episode ID is required");
37
+ }
38
+
39
+ if (!data.feedInfoInMarkdown) {
40
+ throw new BadDataException("Log in markdown is required");
41
+ }
42
+
43
+ if (!data.alertEpisodeFeedEventType) {
44
+ throw new BadDataException("Alert episode log event is required");
45
+ }
46
+
47
+ if (!data.projectId) {
48
+ throw new BadDataException("Project ID is required");
49
+ }
50
+
51
+ const alertEpisodeFeed: Model = new Model();
52
+
53
+ if (!data.displayColor) {
54
+ data.displayColor = Blue500;
55
+ }
56
+
57
+ if (data.userId) {
58
+ alertEpisodeFeed.userId = data.userId;
59
+ }
60
+
61
+ alertEpisodeFeed.displayColor = data.displayColor;
62
+
63
+ alertEpisodeFeed.alertEpisodeId = data.alertEpisodeId;
64
+ alertEpisodeFeed.feedInfoInMarkdown = data.feedInfoInMarkdown;
65
+ alertEpisodeFeed.alertEpisodeFeedEventType =
66
+ data.alertEpisodeFeedEventType;
67
+ alertEpisodeFeed.projectId = data.projectId;
68
+
69
+ if (!data.postedAt) {
70
+ alertEpisodeFeed.postedAt = OneUptimeDate.getCurrentDate();
71
+ } else {
72
+ alertEpisodeFeed.postedAt = data.postedAt;
73
+ }
74
+
75
+ if (data.moreInformationInMarkdown) {
76
+ alertEpisodeFeed.moreInformationInMarkdown =
77
+ data.moreInformationInMarkdown;
78
+ }
79
+
80
+ await this.create({
81
+ data: alertEpisodeFeed,
82
+ props: {
83
+ isRoot: true,
84
+ },
85
+ });
86
+ } catch (error) {
87
+ logger.error("AlertEpisodeFeedService.createAlertEpisodeFeedItem");
88
+ logger.error(error);
89
+ // we dont want to throw the error here, as this is a non-critical operation
90
+ }
91
+ }
92
+ }
93
+
94
+ export default new Service();