@oneuptime/common 9.4.7 → 9.4.9

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 (342) 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/OnCallDutyPolicyExecutionLogTimeline.ts +59 -0
  14. package/Models/DatabaseModels/StatusPageDomain.ts +2 -0
  15. package/Models/DatabaseModels/UserOnCallLog.ts +48 -0
  16. package/Models/DatabaseModels/UserOnCallLogTimeline.ts +49 -0
  17. package/Models/DatabaseModels/WorkspaceNotificationLog.ts +57 -0
  18. package/Server/API/SlackAPI.ts +21 -0
  19. package/Server/API/UserOnCallLogTimelineAPI.ts +65 -25
  20. package/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.ts +751 -0
  21. package/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.ts +41 -0
  22. package/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.ts +29 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.ts +177 -0
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.ts +71 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.ts +35 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.ts +29 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.ts +29 -0
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.ts +35 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.ts +47 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.ts +71 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts +67 -0
  32. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +24 -0
  33. package/Server/Services/AlertEpisodeFeedService.ts +94 -0
  34. package/Server/Services/AlertEpisodeInternalNoteService.ts +71 -0
  35. package/Server/Services/AlertEpisodeMemberService.ts +267 -0
  36. package/Server/Services/AlertEpisodeOwnerTeamService.ts +10 -0
  37. package/Server/Services/AlertEpisodeOwnerUserService.ts +10 -0
  38. package/Server/Services/AlertEpisodeService.ts +1096 -0
  39. package/Server/Services/AlertEpisodeStateTimelineService.ts +557 -0
  40. package/Server/Services/AlertGroupingEngineService.ts +1120 -0
  41. package/Server/Services/AlertGroupingRuleService.ts +14 -0
  42. package/Server/Services/AlertService.ts +12 -0
  43. package/Server/Services/CallService.ts +2 -0
  44. package/Server/Services/Index.ts +21 -0
  45. package/Server/Services/MailService.ts +5 -0
  46. package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +18 -1
  47. package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +64 -2
  48. package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +27 -1
  49. package/Server/Services/OnCallDutyPolicyService.ts +16 -1
  50. package/Server/Services/PushNotificationService.ts +1 -0
  51. package/Server/Services/SmsService.ts +2 -0
  52. package/Server/Services/UserNotificationRuleService.ts +641 -10
  53. package/Server/Services/UserNotificationSettingService.ts +23 -0
  54. package/Server/Services/UserOnCallLogService.ts +58 -14
  55. package/Server/Services/WhatsAppService.ts +5 -0
  56. package/Server/Services/WorkspaceNotificationRuleService.ts +26 -0
  57. package/Server/Utils/AnalyticsDatabase/Statement.ts +6 -2
  58. package/Server/Utils/PushNotificationUtil.ts +75 -16
  59. package/Server/Utils/WhatsAppTemplateUtil.ts +13 -0
  60. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +18 -0
  61. package/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.ts +689 -0
  62. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +16 -0
  63. package/Server/Utils/Workspace/Slack/Actions/ActionTypes.ts +11 -0
  64. package/Server/Utils/Workspace/Slack/Actions/AlertEpisode.ts +915 -0
  65. package/Server/Utils/Workspace/Slack/Messages/AlertEpisode.ts +120 -0
  66. package/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.ts +74 -0
  67. package/Tests/Server/Services/AlertEpisodeMemberService.test.ts +200 -0
  68. package/Tests/Server/Services/AlertEpisodeService.test.ts +240 -0
  69. package/Tests/Server/Services/AlertGroupingEngineService.test.ts +542 -0
  70. package/Tests/Server/Services/AlertGroupingRuleService.test.ts +383 -0
  71. package/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.ts +1 -1
  72. package/Tests/UI/Components/Input.test.tsx +1 -1
  73. package/Tests/UI/Components/TextArea.test.tsx +2 -2
  74. package/Types/BaseDatabase/SortOrder.ts +9 -0
  75. package/Types/Email/EmailTemplateType.ts +6 -0
  76. package/Types/NotificationRule/NotificationRuleType.ts +3 -1
  77. package/Types/NotificationSetting/NotificationSettingEventType.ts +7 -0
  78. package/Types/Permission.ts +309 -0
  79. package/Types/UserNotification/UserNotificationEventType.ts +1 -0
  80. package/Types/WhatsApp/WhatsAppTemplates.ts +24 -0
  81. package/Types/Workspace/NotificationRules/EventType.ts +1 -0
  82. package/Types/Workspace/NotificationRules/NotificationRuleCondition.ts +32 -3
  83. package/UI/Components/Accordion/Accordion.tsx +20 -2
  84. package/UI/Components/Alerts/Alert.tsx +1 -0
  85. package/UI/Components/Button/Button.tsx +29 -0
  86. package/UI/Components/CardSelect/CardSelect.tsx +5 -1
  87. package/UI/Components/Checkbox/Checkbox.tsx +7 -3
  88. package/UI/Components/ColorCircle/ColorCircle.tsx +2 -0
  89. package/UI/Components/ColorViewer/ColorViewer.tsx +19 -3
  90. package/UI/Components/CopyableButton/CopyableButton.tsx +22 -5
  91. package/UI/Components/Detail/Detail.tsx +1 -1
  92. package/UI/Components/Dropdown/Dropdown.tsx +14 -1
  93. package/UI/Components/Forms/Fields/FormField.tsx +28 -0
  94. package/UI/Components/FullPageModal/FullPageModal.tsx +35 -4
  95. package/UI/Components/Input/Input.tsx +14 -2
  96. package/UI/Components/Link/Link.tsx +1 -0
  97. package/UI/Components/Loader/Loader.tsx +8 -2
  98. package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +76 -1
  99. package/UI/Components/Modal/Modal.tsx +47 -3
  100. package/UI/Components/ModelTable/BaseModelTable.tsx +42 -1
  101. package/UI/Components/MoreMenu/MoreMenu.tsx +84 -2
  102. package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +30 -8
  103. package/UI/Components/Pagination/Pagination.tsx +113 -8
  104. package/UI/Components/ProgressBar/ProgressBar.tsx +12 -2
  105. package/UI/Components/Radio/Radio.tsx +21 -3
  106. package/UI/Components/SideMenu/CountModelSideMenuItem.tsx +54 -27
  107. package/UI/Components/StatusBubble/StatusBubble.tsx +7 -2
  108. package/UI/Components/Table/TableHeader.tsx +20 -3
  109. package/UI/Components/Tabs/Tab.tsx +16 -1
  110. package/UI/Components/Tabs/Tabs.tsx +12 -1
  111. package/UI/Components/TextArea/TextArea.tsx +12 -2
  112. package/UI/Components/Toggle/Toggle.tsx +14 -3
  113. package/UI/Components/Tooltip/Tooltip.tsx +11 -1
  114. package/UI/Components/TopAlert/TopAlert.tsx +2 -0
  115. package/build/dist/Models/DatabaseModels/Alert.js +77 -0
  116. package/build/dist/Models/DatabaseModels/Alert.js.map +1 -1
  117. package/build/dist/Models/DatabaseModels/AlertEpisode.js +1225 -0
  118. package/build/dist/Models/DatabaseModels/AlertEpisode.js.map +1 -0
  119. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js +553 -0
  120. package/build/dist/Models/DatabaseModels/AlertEpisodeFeed.js.map +1 -0
  121. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js +467 -0
  122. package/build/dist/Models/DatabaseModels/AlertEpisodeInternalNote.js.map +1 -0
  123. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js +607 -0
  124. package/build/dist/Models/DatabaseModels/AlertEpisodeMember.js.map +1 -0
  125. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js +437 -0
  126. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerTeam.js.map +1 -0
  127. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js +436 -0
  128. package/build/dist/Models/DatabaseModels/AlertEpisodeOwnerUser.js.map +1 -0
  129. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js +546 -0
  130. package/build/dist/Models/DatabaseModels/AlertEpisodeStateTimeline.js.map +1 -0
  131. package/build/dist/Models/DatabaseModels/AlertFeed.js +1 -0
  132. package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -1
  133. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js +1437 -0
  134. package/build/dist/Models/DatabaseModels/AlertGroupingRule.js.map +1 -0
  135. package/build/dist/Models/DatabaseModels/Index.js +16 -0
  136. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  137. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +69 -0
  138. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
  139. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +58 -0
  140. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js.map +1 -1
  141. package/build/dist/Models/DatabaseModels/StatusPageDomain.js +2 -0
  142. package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
  143. package/build/dist/Models/DatabaseModels/UserOnCallLog.js +47 -0
  144. package/build/dist/Models/DatabaseModels/UserOnCallLog.js.map +1 -1
  145. package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js +48 -0
  146. package/build/dist/Models/DatabaseModels/UserOnCallLogTimeline.js.map +1 -1
  147. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js +58 -0
  148. package/build/dist/Models/DatabaseModels/WorkspaceNotificationLog.js.map +1 -1
  149. package/build/dist/Server/API/SlackAPI.js +18 -0
  150. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  151. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +55 -15
  152. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
  153. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js +266 -0
  154. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1768938069147-MigrationName.js.map +1 -0
  155. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js +20 -0
  156. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769125561322-MigrationName.js.map +1 -0
  157. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js +16 -0
  158. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769170578688-MigrationName.js.map +1 -0
  159. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js +68 -0
  160. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769172358833-MigrationName.js.map +1 -0
  161. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js +30 -0
  162. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769176450526-MigrationName.js.map +1 -0
  163. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js +18 -0
  164. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769190495840-MigrationName.js.map +1 -0
  165. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js +16 -0
  166. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769199303656-MigrationName.js.map +1 -0
  167. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js +16 -0
  168. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769202898645-MigrationName.js.map +1 -0
  169. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js +18 -0
  170. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428619414-MigrationName.js.map +1 -0
  171. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js +22 -0
  172. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769428821686-MigrationName.js.map +1 -0
  173. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.js +30 -0
  174. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769469813786-MigrationName.js.map +1 -0
  175. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.js +67 -0
  176. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.js.map +1 -0
  177. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +24 -0
  178. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  179. package/build/dist/Server/Services/AlertEpisodeFeedService.js +83 -0
  180. package/build/dist/Server/Services/AlertEpisodeFeedService.js.map +1 -0
  181. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js +70 -0
  182. package/build/dist/Server/Services/AlertEpisodeInternalNoteService.js.map +1 -0
  183. package/build/dist/Server/Services/AlertEpisodeMemberService.js +256 -0
  184. package/build/dist/Server/Services/AlertEpisodeMemberService.js.map +1 -0
  185. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js +9 -0
  186. package/build/dist/Server/Services/AlertEpisodeOwnerTeamService.js.map +1 -0
  187. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js +9 -0
  188. package/build/dist/Server/Services/AlertEpisodeOwnerUserService.js.map +1 -0
  189. package/build/dist/Server/Services/AlertEpisodeService.js +973 -0
  190. package/build/dist/Server/Services/AlertEpisodeService.js.map +1 -0
  191. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js +494 -0
  192. package/build/dist/Server/Services/AlertEpisodeStateTimelineService.js.map +1 -0
  193. package/build/dist/Server/Services/AlertGroupingEngineService.js +893 -0
  194. package/build/dist/Server/Services/AlertGroupingEngineService.js.map +1 -0
  195. package/build/dist/Server/Services/AlertGroupingRuleService.js +13 -0
  196. package/build/dist/Server/Services/AlertGroupingRuleService.js.map +1 -0
  197. package/build/dist/Server/Services/AlertService.js +11 -0
  198. package/build/dist/Server/Services/AlertService.js.map +1 -1
  199. package/build/dist/Server/Services/CallService.js +11 -10
  200. package/build/dist/Server/Services/CallService.js.map +1 -1
  201. package/build/dist/Server/Services/Index.js +18 -0
  202. package/build/dist/Server/Services/Index.js.map +1 -1
  203. package/build/dist/Server/Services/MailService.js +3 -0
  204. package/build/dist/Server/Services/MailService.js.map +1 -1
  205. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +10 -1
  206. package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
  207. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +49 -2
  208. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
  209. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +21 -1
  210. package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
  211. package/build/dist/Server/Services/OnCallDutyPolicyService.js +9 -1
  212. package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
  213. package/build/dist/Server/Services/PushNotificationService.js.map +1 -1
  214. package/build/dist/Server/Services/SmsService.js +11 -10
  215. package/build/dist/Server/Services/SmsService.js.map +1 -1
  216. package/build/dist/Server/Services/UserNotificationRuleService.js +521 -43
  217. package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
  218. package/build/dist/Server/Services/UserNotificationSettingService.js +9 -0
  219. package/build/dist/Server/Services/UserNotificationSettingService.js.map +1 -1
  220. package/build/dist/Server/Services/UserOnCallLogService.js +48 -12
  221. package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
  222. package/build/dist/Server/Services/WhatsAppService.js +3 -0
  223. package/build/dist/Server/Services/WhatsAppService.js.map +1 -1
  224. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +25 -0
  225. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  226. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
  227. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  228. package/build/dist/Server/Utils/PushNotificationUtil.js +51 -16
  229. package/build/dist/Server/Utils/PushNotificationUtil.js.map +1 -1
  230. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js +8 -0
  231. package/build/dist/Server/Utils/WhatsAppTemplateUtil.js.map +1 -1
  232. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +17 -0
  233. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
  234. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js +545 -0
  235. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/AlertEpisode.js.map +1 -0
  236. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +13 -0
  237. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  238. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js +10 -0
  239. package/build/dist/Server/Utils/Workspace/Slack/Actions/ActionTypes.js.map +1 -1
  240. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js +651 -0
  241. package/build/dist/Server/Utils/Workspace/Slack/Actions/AlertEpisode.js.map +1 -0
  242. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js +100 -0
  243. package/build/dist/Server/Utils/Workspace/Slack/Messages/AlertEpisode.js.map +1 -0
  244. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js +70 -0
  245. package/build/dist/Server/Utils/Workspace/WorkspaceMessages/AlertEpisode.js.map +1 -0
  246. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js +165 -0
  247. package/build/dist/Tests/Server/Services/AlertEpisodeMemberService.test.js.map +1 -0
  248. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js +193 -0
  249. package/build/dist/Tests/Server/Services/AlertEpisodeService.test.js.map +1 -0
  250. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js +412 -0
  251. package/build/dist/Tests/Server/Services/AlertGroupingEngineService.test.js.map +1 -0
  252. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js +308 -0
  253. package/build/dist/Tests/Server/Services/AlertGroupingRuleService.test.js.map +1 -0
  254. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js +1 -1
  255. package/build/dist/Tests/Server/Utils/AnalyticsDatabase/StatementGenerator.test.js.map +1 -1
  256. package/build/dist/Tests/UI/Components/Input.test.js +1 -1
  257. package/build/dist/Tests/UI/Components/Input.test.js.map +1 -1
  258. package/build/dist/Tests/UI/Components/TextArea.test.js +2 -2
  259. package/build/dist/Tests/UI/Components/TextArea.test.js.map +1 -1
  260. package/build/dist/Types/BaseDatabase/SortOrder.js +5 -0
  261. package/build/dist/Types/BaseDatabase/SortOrder.js.map +1 -1
  262. package/build/dist/Types/Email/EmailTemplateType.js +5 -0
  263. package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
  264. package/build/dist/Types/NotificationRule/NotificationRuleType.js +3 -1
  265. package/build/dist/Types/NotificationRule/NotificationRuleType.js.map +1 -1
  266. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js +5 -0
  267. package/build/dist/Types/NotificationSetting/NotificationSettingEventType.js.map +1 -1
  268. package/build/dist/Types/Permission.js +264 -0
  269. package/build/dist/Types/Permission.js.map +1 -1
  270. package/build/dist/Types/UserNotification/UserNotificationEventType.js +1 -0
  271. package/build/dist/Types/UserNotification/UserNotificationEventType.js.map +1 -1
  272. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js +15 -0
  273. package/build/dist/Types/WhatsApp/WhatsAppTemplates.js.map +1 -1
  274. package/build/dist/Types/Workspace/NotificationRules/EventType.js +1 -0
  275. package/build/dist/Types/Workspace/NotificationRules/EventType.js.map +1 -1
  276. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js +28 -3
  277. package/build/dist/Types/Workspace/NotificationRules/NotificationRuleCondition.js.map +1 -1
  278. package/build/dist/UI/Components/Accordion/Accordion.js +10 -3
  279. package/build/dist/UI/Components/Accordion/Accordion.js.map +1 -1
  280. package/build/dist/UI/Components/Alerts/Alert.js +1 -1
  281. package/build/dist/UI/Components/Alerts/Alert.js.map +1 -1
  282. package/build/dist/UI/Components/Button/Button.js +8 -2
  283. package/build/dist/UI/Components/Button/Button.js.map +1 -1
  284. package/build/dist/UI/Components/CardSelect/CardSelect.js +1 -1
  285. package/build/dist/UI/Components/CardSelect/CardSelect.js.map +1 -1
  286. package/build/dist/UI/Components/Checkbox/Checkbox.js +2 -2
  287. package/build/dist/UI/Components/Checkbox/Checkbox.js.map +1 -1
  288. package/build/dist/UI/Components/ColorCircle/ColorCircle.js +1 -1
  289. package/build/dist/UI/Components/ColorCircle/ColorCircle.js.map +1 -1
  290. package/build/dist/UI/Components/ColorViewer/ColorViewer.js +12 -3
  291. package/build/dist/UI/Components/ColorViewer/ColorViewer.js.map +1 -1
  292. package/build/dist/UI/Components/CopyableButton/CopyableButton.js +12 -5
  293. package/build/dist/UI/Components/CopyableButton/CopyableButton.js.map +1 -1
  294. package/build/dist/UI/Components/Detail/Detail.js +1 -1
  295. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  296. package/build/dist/UI/Components/Dropdown/Dropdown.js +5 -3
  297. package/build/dist/UI/Components/Dropdown/Dropdown.js.map +1 -1
  298. package/build/dist/UI/Components/Forms/Fields/FormField.js +19 -1
  299. package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
  300. package/build/dist/UI/Components/FullPageModal/FullPageModal.js +24 -5
  301. package/build/dist/UI/Components/FullPageModal/FullPageModal.js.map +1 -1
  302. package/build/dist/UI/Components/Input/Input.js +3 -3
  303. package/build/dist/UI/Components/Input/Input.js.map +1 -1
  304. package/build/dist/UI/Components/Link/Link.js +1 -1
  305. package/build/dist/UI/Components/Link/Link.js.map +1 -1
  306. package/build/dist/UI/Components/Loader/Loader.js +6 -4
  307. package/build/dist/UI/Components/Loader/Loader.js.map +1 -1
  308. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +56 -3
  309. package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
  310. package/build/dist/UI/Components/Modal/Modal.js +28 -3
  311. package/build/dist/UI/Components/Modal/Modal.js.map +1 -1
  312. package/build/dist/UI/Components/ModelTable/BaseModelTable.js +23 -1
  313. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  314. package/build/dist/UI/Components/MoreMenu/MoreMenu.js +67 -6
  315. package/build/dist/UI/Components/MoreMenu/MoreMenu.js.map +1 -1
  316. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +14 -3
  317. package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
  318. package/build/dist/UI/Components/Pagination/Pagination.js +69 -13
  319. package/build/dist/UI/Components/Pagination/Pagination.js.map +1 -1
  320. package/build/dist/UI/Components/ProgressBar/ProgressBar.js +2 -2
  321. package/build/dist/UI/Components/ProgressBar/ProgressBar.js.map +1 -1
  322. package/build/dist/UI/Components/Radio/Radio.js +8 -5
  323. package/build/dist/UI/Components/Radio/Radio.js.map +1 -1
  324. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js +23 -4
  325. package/build/dist/UI/Components/SideMenu/CountModelSideMenuItem.js.map +1 -1
  326. package/build/dist/UI/Components/StatusBubble/StatusBubble.js +2 -2
  327. package/build/dist/UI/Components/StatusBubble/StatusBubble.js.map +1 -1
  328. package/build/dist/UI/Components/Table/TableHeader.js +12 -4
  329. package/build/dist/UI/Components/Table/TableHeader.js.map +1 -1
  330. package/build/dist/UI/Components/Tabs/Tab.js +8 -1
  331. package/build/dist/UI/Components/Tabs/Tab.js.map +1 -1
  332. package/build/dist/UI/Components/Tabs/Tabs.js +4 -3
  333. package/build/dist/UI/Components/Tabs/Tabs.js.map +1 -1
  334. package/build/dist/UI/Components/TextArea/TextArea.js +3 -3
  335. package/build/dist/UI/Components/TextArea/TextArea.js.map +1 -1
  336. package/build/dist/UI/Components/Toggle/Toggle.js +7 -4
  337. package/build/dist/UI/Components/Toggle/Toggle.js.map +1 -1
  338. package/build/dist/UI/Components/Tooltip/Tooltip.js +4 -1
  339. package/build/dist/UI/Components/Tooltip/Tooltip.js.map +1 -1
  340. package/build/dist/UI/Components/TopAlert/TopAlert.js +1 -1
  341. package/build/dist/UI/Components/TopAlert/TopAlert.js.map +1 -1
  342. 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
+ }
@@ -0,0 +1,71 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class MigrationName1769469813786 implements MigrationInterface {
4
+ public name = "MigrationName1769469813786";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE "OnCallDutyPolicyExecutionLogTimeline" ADD "triggeredByAlertEpisodeId" uuid`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE "UserOnCallLog" ADD "triggeredByAlertEpisodeId" uuid`,
12
+ );
13
+ await queryRunner.query(
14
+ `ALTER TABLE "UserOnCallLogTimeline" ADD "triggeredByAlertEpisodeId" uuid`,
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_1fda33fffd89b95dafa537f3be" ON "OnCallDutyPolicyExecutionLogTimeline" ("triggeredByAlertEpisodeId") `,
24
+ );
25
+ await queryRunner.query(
26
+ `CREATE INDEX "IDX_2c98f4eeddf1d00ec073b49352" ON "UserOnCallLogTimeline" ("triggeredByAlertEpisodeId") `,
27
+ );
28
+ await queryRunner.query(
29
+ `ALTER TABLE "OnCallDutyPolicyExecutionLogTimeline" ADD CONSTRAINT "FK_1fda33fffd89b95dafa537f3bef" FOREIGN KEY ("triggeredByAlertEpisodeId") REFERENCES "AlertEpisode"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
30
+ );
31
+ await queryRunner.query(
32
+ `ALTER TABLE "UserOnCallLog" ADD CONSTRAINT "FK_114aa962f2bc3c6736a1469df36" FOREIGN KEY ("triggeredByAlertEpisodeId") REFERENCES "AlertEpisode"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
33
+ );
34
+ await queryRunner.query(
35
+ `ALTER TABLE "UserOnCallLogTimeline" ADD CONSTRAINT "FK_2c98f4eeddf1d00ec073b493525" FOREIGN KEY ("triggeredByAlertEpisodeId") 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 "UserOnCallLogTimeline" DROP CONSTRAINT "FK_2c98f4eeddf1d00ec073b493525"`,
42
+ );
43
+ await queryRunner.query(
44
+ `ALTER TABLE "UserOnCallLog" DROP CONSTRAINT "FK_114aa962f2bc3c6736a1469df36"`,
45
+ );
46
+ await queryRunner.query(
47
+ `ALTER TABLE "OnCallDutyPolicyExecutionLogTimeline" DROP CONSTRAINT "FK_1fda33fffd89b95dafa537f3bef"`,
48
+ );
49
+ await queryRunner.query(
50
+ `DROP INDEX "public"."IDX_2c98f4eeddf1d00ec073b49352"`,
51
+ );
52
+ await queryRunner.query(
53
+ `DROP INDEX "public"."IDX_1fda33fffd89b95dafa537f3be"`,
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 "UserOnCallLogTimeline" DROP COLUMN "triggeredByAlertEpisodeId"`,
63
+ );
64
+ await queryRunner.query(
65
+ `ALTER TABLE "UserOnCallLog" DROP COLUMN "triggeredByAlertEpisodeId"`,
66
+ );
67
+ await queryRunner.query(
68
+ `ALTER TABLE "OnCallDutyPolicyExecutionLogTimeline" DROP COLUMN "triggeredByAlertEpisodeId"`,
69
+ );
70
+ }
71
+ }
@@ -0,0 +1,67 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ import CaptureSpan from "../../../Utils/Telemetry/CaptureSpan";
3
+
4
+ export class RenameNotificationRuleTypes1769517677937
5
+ implements MigrationInterface
6
+ {
7
+ public name = "RenameNotificationRuleTypes1769517677937";
8
+
9
+ @CaptureSpan()
10
+ public async up(queryRunner: QueryRunner): Promise<void> {
11
+ /*
12
+ * 1. Update rules with "When on-call policy is executed" and incidentSeverityId (not null)
13
+ * to "When incident on-call policy is executed"
14
+ */
15
+ await queryRunner.query(
16
+ `UPDATE "UserNotificationRule"
17
+ SET "ruleType" = 'When incident on-call policy is executed'
18
+ WHERE "ruleType" = 'When on-call policy is executed'
19
+ AND "incidentSeverityId" IS NOT NULL`,
20
+ );
21
+
22
+ /*
23
+ * 2. Update rules with "When on-call policy is executed" and alertSeverityId (not null)
24
+ * to "When alert on-call policy is executed"
25
+ */
26
+ await queryRunner.query(
27
+ `UPDATE "UserNotificationRule"
28
+ SET "ruleType" = 'When alert on-call policy is executed'
29
+ WHERE "ruleType" = 'When on-call policy is executed'
30
+ AND "alertSeverityId" IS NOT NULL`,
31
+ );
32
+
33
+ /*
34
+ * 3. Update rules with "When episode on-call policy is executed"
35
+ * to "When alert episode on-call policy is executed"
36
+ */
37
+ await queryRunner.query(
38
+ `UPDATE "UserNotificationRule"
39
+ SET "ruleType" = 'When alert episode on-call policy is executed'
40
+ WHERE "ruleType" = 'When episode on-call policy is executed'`,
41
+ );
42
+ }
43
+
44
+ @CaptureSpan()
45
+ public async down(queryRunner: QueryRunner): Promise<void> {
46
+ // Revert "When incident on-call policy is executed" back to "When on-call policy is executed"
47
+ await queryRunner.query(
48
+ `UPDATE "UserNotificationRule"
49
+ SET "ruleType" = 'When on-call policy is executed'
50
+ WHERE "ruleType" = 'When incident on-call policy is executed'`,
51
+ );
52
+
53
+ // Revert "When alert on-call policy is executed" back to "When on-call policy is executed"
54
+ await queryRunner.query(
55
+ `UPDATE "UserNotificationRule"
56
+ SET "ruleType" = 'When on-call policy is executed'
57
+ WHERE "ruleType" = 'When alert on-call policy is executed'`,
58
+ );
59
+
60
+ // Revert "When alert episode on-call policy is executed" back to "When episode on-call policy is executed"
61
+ await queryRunner.query(
62
+ `UPDATE "UserNotificationRule"
63
+ SET "ruleType" = 'When episode on-call policy is executed'
64
+ WHERE "ruleType" = 'When alert episode on-call policy is executed'`,
65
+ );
66
+ }
67
+ }