@oneuptime/common 8.0.5239 → 8.0.5285

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 (359) hide show
  1. package/Models/DatabaseModels/Index.ts +4 -2
  2. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts +5 -3
  3. package/Models/DatabaseModels/Project.ts +4 -2
  4. package/Models/DatabaseModels/ProjectSmtpConfig.ts +4 -2
  5. package/Models/DatabaseModels/StatusPageDomain.ts +6 -4
  6. package/Models/DatabaseModels/User.ts +0 -46
  7. package/Models/DatabaseModels/{UserTwoFactorAuth.ts → UserTotpAuth.ts} +16 -16
  8. package/Models/DatabaseModels/UserWebAuthn.ts +244 -0
  9. package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +21 -0
  10. package/Server/API/BaseAPI.ts +4 -2
  11. package/Server/API/GlobalConfigAPI.ts +16 -12
  12. package/Server/API/MicrosoftTeamsAPI.ts +1240 -0
  13. package/Server/API/ProjectAPI.ts +4 -2
  14. package/Server/API/ResellerPlanAPI.ts +4 -2
  15. package/Server/API/SlackAPI.ts +54 -48
  16. package/Server/API/StatusPageAPI.ts +5 -3
  17. package/Server/API/UserOnCallLogTimelineAPI.ts +5 -3
  18. package/Server/API/{UserTwoFactorAuthAPI.ts → UserTotpAuthAPI.ts} +20 -20
  19. package/Server/API/UserWebAuthnAPI.ts +103 -0
  20. package/Server/EnvironmentConfig.ts +6 -0
  21. package/Server/Images/MicrosoftTeams/color.png +0 -0
  22. package/Server/Images/MicrosoftTeams/outline.png +0 -0
  23. package/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.ts +4 -2
  24. package/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.ts +27 -0
  25. package/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.ts +25 -0
  26. package/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.ts +15 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
  28. package/Server/Infrastructure/Queue.ts +4 -2
  29. package/Server/Infrastructure/SocketIO.ts +4 -2
  30. package/Server/Middleware/ProjectAuthorization.ts +5 -3
  31. package/Server/Middleware/SlackAuthorization.ts +2 -2
  32. package/Server/Middleware/TelemetryIngest.ts +12 -6
  33. package/Server/Services/AlertStateTimelineService.ts +34 -18
  34. package/Server/Services/BillingInvoiceService.ts +8 -4
  35. package/Server/Services/BillingService.ts +13 -9
  36. package/Server/Services/DatabaseService.ts +42 -30
  37. package/Server/Services/IncidentService.ts +5 -3
  38. package/Server/Services/IncidentStateTimelineService.ts +34 -18
  39. package/Server/Services/Index.ts +4 -2
  40. package/Server/Services/MonitorStatusTimelineService.ts +34 -18
  41. package/Server/Services/OnCallDutyPolicyScheduleService.ts +4 -2
  42. package/Server/Services/ProjectService.ts +6 -4
  43. package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +26 -14
  44. package/Server/Services/StatusPageService.ts +4 -2
  45. package/Server/Services/UserService.ts +21 -5
  46. package/Server/Services/{UserTwoFactorAuthService.ts → UserTotpAuthService.ts} +26 -7
  47. package/Server/Services/UserWebAuthnService.ts +419 -0
  48. package/Server/Services/WorkspaceNotificationRuleService.ts +257 -77
  49. package/Server/Services/WorkspaceProjectAuthTokenService.ts +2 -2
  50. package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -5
  51. package/Server/Types/Database/Permissions/BasePermission.ts +4 -2
  52. package/Server/Types/Database/Permissions/TenantPermission.ts +5 -3
  53. package/Server/Types/Database/QueryHelper.ts +4 -2
  54. package/Server/Types/Markdown.ts +6 -4
  55. package/Server/Types/Workflow/ComponentCode.ts +4 -2
  56. package/Server/Types/Workflow/Components/Conditions/IfElse.ts +5 -3
  57. package/Server/Types/Workflow/Components/JavaScript.ts +5 -3
  58. package/Server/Types/Workflow/TriggerCode.ts +4 -2
  59. package/Server/Utils/AnalyticsDatabase/Statement.ts +4 -2
  60. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +21 -11
  61. package/Server/Utils/Browser.ts +6 -4
  62. package/Server/Utils/CodeRepository/GitHub/GitHub.ts +4 -2
  63. package/Server/Utils/LocalFile.ts +14 -0
  64. package/Server/Utils/Monitor/MonitorResource.ts +17 -9
  65. package/Server/Utils/Realtime.ts +4 -2
  66. package/Server/Utils/StartServer.ts +1 -1
  67. package/Server/Utils/Telemetry.ts +15 -9
  68. package/Server/Utils/{TwoFactorAuth.ts → TotpAuth.ts} +2 -2
  69. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +75 -16
  70. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +649 -0
  71. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +237 -0
  72. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +1321 -0
  73. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +155 -0
  74. package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +119 -0
  75. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +959 -0
  76. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.ts +16 -14
  77. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.ts +17 -14
  78. package/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.ts +18 -13
  79. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +2547 -14
  80. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +4 -2
  81. package/Server/Utils/Workspace/Slack/Actions/Auth.ts +4 -2
  82. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +14 -10
  83. package/Server/Utils/Workspace/Slack/Actions/Monitor.ts +4 -2
  84. package/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.ts +4 -2
  85. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +14 -10
  86. package/Server/Utils/Workspace/Slack/Messages/Alert.ts +9 -7
  87. package/Server/Utils/Workspace/Slack/Messages/Incident.ts +9 -7
  88. package/Server/Utils/Workspace/Slack/Messages/Monitor.ts +9 -7
  89. package/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.ts +9 -7
  90. package/Server/Utils/Workspace/Slack/Slack.ts +6 -0
  91. package/Server/Utils/Workspace/Workspace.ts +13 -10
  92. package/Server/Utils/Workspace/WorkspaceBase.ts +9 -0
  93. package/Tests/Server/API/BaseAPI.test.ts +64 -52
  94. package/Tests/Server/Services/BillingService.test.ts +4 -4
  95. package/Tests/Server/Services/TeamMemberService.test.ts +20 -12
  96. package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +2 -2
  97. package/Tests/Types/OnCallDutyPolicy/LayerUtil.test.ts +8 -4
  98. package/Tests/UI/Components/DictionaryOfStrings.test.tsx +4 -2
  99. package/Tests/UI/Components/FilePicker.test.tsx +2 -2
  100. package/Tests/Utils/API.test.ts +9 -8
  101. package/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.ts +5 -3
  102. package/Types/Html.ts +5 -3
  103. package/Types/JSONFunctions.ts +5 -5
  104. package/Types/Metrics/MetricsQuery.ts +6 -4
  105. package/Types/Monitor/MonitorType.ts +8 -6
  106. package/Types/OnCallDutyPolicy/Layer.ts +29 -17
  107. package/Types/Phone.ts +5 -3
  108. package/Types/Workspace/NotificationRules/BaseNotificationRule.ts +1 -0
  109. package/Types/Workspace/NotificationRules/CreateChannelNotificationRule.ts +5 -2
  110. package/Types/Workspace/WorkspaceMessagePayload.ts +1 -0
  111. package/Types/Workspace/WorkspaceType.ts +13 -0
  112. package/UI/Components/Charts/Utils/DataPoint.ts +8 -6
  113. package/UI/Components/Detail/Detail.tsx +4 -1
  114. package/UI/Components/FilePicker/FilePicker.tsx +1 -1
  115. package/UI/Components/Forms/Types/Field.ts +4 -2
  116. package/UI/Components/Image/Image.tsx +1 -1
  117. package/UI/Components/JSONTable/JSONTable.tsx +4 -2
  118. package/UI/Components/ModelTable/BaseModelTable.tsx +5 -3
  119. package/UI/Components/SideMenu/SideMenu.tsx +4 -2
  120. package/UI/Components/SideMenu/SideMenuItem.tsx +69 -45
  121. package/UI/Config.ts +3 -0
  122. package/UI/Utils/API/API.ts +5 -3
  123. package/UI/Utils/Countries.ts +5 -3
  124. package/UI/Utils/Login.ts +6 -1
  125. package/Utils/Base64.ts +13 -0
  126. package/Utils/Schema/ModelSchema.ts +4 -2
  127. package/build/dist/Models/DatabaseModels/Index.js +4 -2
  128. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  129. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +5 -3
  130. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js.map +1 -1
  131. package/build/dist/Models/DatabaseModels/Project.js +4 -2
  132. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  133. package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js +4 -2
  134. package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js.map +1 -1
  135. package/build/dist/Models/DatabaseModels/StatusPageDomain.js +6 -4
  136. package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
  137. package/build/dist/Models/DatabaseModels/User.js +0 -49
  138. package/build/dist/Models/DatabaseModels/User.js.map +1 -1
  139. package/build/dist/Models/DatabaseModels/{UserTwoFactorAuth.js → UserTotpAuth.js} +27 -27
  140. package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -0
  141. package/build/dist/Models/DatabaseModels/UserWebAuthn.js +270 -0
  142. package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -0
  143. package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
  144. package/build/dist/Server/API/BaseAPI.js +4 -2
  145. package/build/dist/Server/API/BaseAPI.js.map +1 -1
  146. package/build/dist/Server/API/GlobalConfigAPI.js +16 -12
  147. package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
  148. package/build/dist/Server/API/MicrosoftTeamsAPI.js +771 -0
  149. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -0
  150. package/build/dist/Server/API/ProjectAPI.js +4 -2
  151. package/build/dist/Server/API/ProjectAPI.js.map +1 -1
  152. package/build/dist/Server/API/ResellerPlanAPI.js +4 -2
  153. package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
  154. package/build/dist/Server/API/SlackAPI.js +53 -47
  155. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  156. package/build/dist/Server/API/StatusPageAPI.js +5 -3
  157. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  158. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +5 -3
  159. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
  160. package/build/dist/Server/API/{UserTwoFactorAuthAPI.js → UserTotpAuthAPI.js} +16 -16
  161. package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -0
  162. package/build/dist/Server/API/UserWebAuthnAPI.js +65 -0
  163. package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -0
  164. package/build/dist/Server/EnvironmentConfig.js +3 -0
  165. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  166. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js +4 -2
  167. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js.map +1 -1
  168. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js +16 -0
  169. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js.map +1 -0
  170. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js +16 -0
  171. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js.map +1 -0
  172. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js +12 -0
  173. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js.map +1 -0
  174. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
  175. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  176. package/build/dist/Server/Infrastructure/Queue.js +4 -2
  177. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  178. package/build/dist/Server/Infrastructure/SocketIO.js +4 -2
  179. package/build/dist/Server/Infrastructure/SocketIO.js.map +1 -1
  180. package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -3
  181. package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
  182. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  183. package/build/dist/Server/Middleware/TelemetryIngest.js +12 -6
  184. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  185. package/build/dist/Server/Services/AlertStateTimelineService.js +34 -18
  186. package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
  187. package/build/dist/Server/Services/BillingInvoiceService.js +8 -4
  188. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  189. package/build/dist/Server/Services/BillingService.js +13 -9
  190. package/build/dist/Server/Services/BillingService.js.map +1 -1
  191. package/build/dist/Server/Services/DatabaseService.js +40 -28
  192. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  193. package/build/dist/Server/Services/IncidentService.js +5 -3
  194. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  195. package/build/dist/Server/Services/IncidentStateTimelineService.js +34 -18
  196. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  197. package/build/dist/Server/Services/Index.js +4 -2
  198. package/build/dist/Server/Services/Index.js.map +1 -1
  199. package/build/dist/Server/Services/MonitorStatusTimelineService.js +34 -18
  200. package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
  201. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +4 -2
  202. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
  203. package/build/dist/Server/Services/ProjectService.js +6 -4
  204. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  205. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +26 -14
  206. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
  207. package/build/dist/Server/Services/StatusPageService.js +4 -2
  208. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  209. package/build/dist/Server/Services/UserService.js +16 -3
  210. package/build/dist/Server/Services/UserService.js.map +1 -1
  211. package/build/dist/Server/Services/{UserTwoFactorAuthService.js → UserTotpAuthService.js} +22 -8
  212. package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -0
  213. package/build/dist/Server/Services/UserWebAuthnService.js +365 -0
  214. package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -0
  215. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +142 -51
  216. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  217. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -5
  218. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
  219. package/build/dist/Server/Types/Database/Permissions/BasePermission.js +4 -2
  220. package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
  221. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +5 -3
  222. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
  223. package/build/dist/Server/Types/Database/QueryHelper.js +4 -2
  224. package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
  225. package/build/dist/Server/Types/Markdown.js +6 -4
  226. package/build/dist/Server/Types/Markdown.js.map +1 -1
  227. package/build/dist/Server/Types/Workflow/ComponentCode.js +4 -2
  228. package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
  229. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +5 -3
  230. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
  231. package/build/dist/Server/Types/Workflow/Components/JavaScript.js +5 -3
  232. package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
  233. package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
  234. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
  235. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  236. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +21 -11
  237. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  238. package/build/dist/Server/Utils/Browser.js +6 -4
  239. package/build/dist/Server/Utils/Browser.js.map +1 -1
  240. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +4 -2
  241. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
  242. package/build/dist/Server/Utils/LocalFile.js +16 -0
  243. package/build/dist/Server/Utils/LocalFile.js.map +1 -1
  244. package/build/dist/Server/Utils/Monitor/MonitorResource.js +17 -9
  245. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  246. package/build/dist/Server/Utils/Realtime.js +4 -2
  247. package/build/dist/Server/Utils/Realtime.js.map +1 -1
  248. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  249. package/build/dist/Server/Utils/Telemetry.js +6 -4
  250. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  251. package/build/dist/Server/Utils/{TwoFactorAuth.js → TotpAuth.js} +8 -8
  252. package/build/dist/Server/Utils/TotpAuth.js.map +1 -0
  253. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +86 -36
  254. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
  255. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +531 -0
  256. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -0
  257. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +206 -0
  258. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -0
  259. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +1102 -0
  260. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -0
  261. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +136 -0
  262. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -0
  263. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +107 -0
  264. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -0
  265. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +795 -0
  266. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -0
  267. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js +16 -14
  268. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js.map +1 -1
  269. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js +16 -14
  270. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js.map +1 -1
  271. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js +15 -13
  272. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js.map +1 -1
  273. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +1982 -13
  274. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  275. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +4 -2
  276. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  277. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +4 -2
  278. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
  279. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +14 -10
  280. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  281. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js +4 -2
  282. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js.map +1 -1
  283. package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js +4 -2
  284. package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js.map +1 -1
  285. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +14 -10
  286. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  287. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js +9 -7
  288. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js.map +1 -1
  289. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js +9 -7
  290. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js.map +1 -1
  291. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js +9 -7
  292. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js.map +1 -1
  293. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js +9 -7
  294. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js.map +1 -1
  295. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +5 -0
  296. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  297. package/build/dist/Server/Utils/Workspace/Workspace.js +12 -10
  298. package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
  299. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  300. package/build/dist/Tests/Server/API/BaseAPI.test.js +59 -47
  301. package/build/dist/Tests/Server/API/BaseAPI.test.js.map +1 -1
  302. package/build/dist/Tests/Server/Services/BillingService.test.js +4 -4
  303. package/build/dist/Tests/Server/Services/BillingService.test.js.map +1 -1
  304. package/build/dist/Tests/Server/Services/TeamMemberService.test.js +20 -12
  305. package/build/dist/Tests/Server/Services/TeamMemberService.test.js.map +1 -1
  306. package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js +2 -2
  307. package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js.map +1 -1
  308. package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js +8 -4
  309. package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js.map +1 -1
  310. package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js +4 -2
  311. package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js.map +1 -1
  312. package/build/dist/Tests/UI/Components/FilePicker.test.js +2 -2
  313. package/build/dist/Tests/UI/Components/FilePicker.test.js.map +1 -1
  314. package/build/dist/Tests/Utils/API.test.js +8 -7
  315. package/build/dist/Tests/Utils/API.test.js.map +1 -1
  316. package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js +5 -3
  317. package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js.map +1 -1
  318. package/build/dist/Types/Html.js +5 -3
  319. package/build/dist/Types/Html.js.map +1 -1
  320. package/build/dist/Types/JSONFunctions.js +5 -5
  321. package/build/dist/Types/JSONFunctions.js.map +1 -1
  322. package/build/dist/Types/Monitor/MonitorType.js +8 -6
  323. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  324. package/build/dist/Types/OnCallDutyPolicy/Layer.js +29 -17
  325. package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
  326. package/build/dist/Types/Phone.js +5 -3
  327. package/build/dist/Types/Phone.js.map +1 -1
  328. package/build/dist/Types/Workspace/WorkspaceType.js +9 -0
  329. package/build/dist/Types/Workspace/WorkspaceType.js.map +1 -1
  330. package/build/dist/UI/Components/Charts/Utils/DataPoint.js +8 -6
  331. package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
  332. package/build/dist/UI/Components/Detail/Detail.js +4 -1
  333. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  334. package/build/dist/UI/Components/FilePicker/FilePicker.js +1 -1
  335. package/build/dist/UI/Components/FilePicker/FilePicker.js.map +1 -1
  336. package/build/dist/UI/Components/Image/Image.js +1 -1
  337. package/build/dist/UI/Components/Image/Image.js.map +1 -1
  338. package/build/dist/UI/Components/JSONTable/JSONTable.js.map +1 -1
  339. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  340. package/build/dist/UI/Components/SideMenu/SideMenu.js +4 -2
  341. package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
  342. package/build/dist/UI/Components/SideMenu/SideMenuItem.js +62 -38
  343. package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
  344. package/build/dist/UI/Config.js +1 -0
  345. package/build/dist/UI/Config.js.map +1 -1
  346. package/build/dist/UI/Utils/API/API.js +5 -3
  347. package/build/dist/UI/Utils/API/API.js.map +1 -1
  348. package/build/dist/UI/Utils/Countries.js.map +1 -1
  349. package/build/dist/UI/Utils/Login.js +6 -1
  350. package/build/dist/UI/Utils/Login.js.map +1 -1
  351. package/build/dist/Utils/Base64.js +12 -0
  352. package/build/dist/Utils/Base64.js.map +1 -0
  353. package/build/dist/Utils/Schema/ModelSchema.js +4 -2
  354. package/build/dist/Utils/Schema/ModelSchema.js.map +1 -1
  355. package/package.json +5 -1
  356. package/build/dist/Models/DatabaseModels/UserTwoFactorAuth.js.map +0 -1
  357. package/build/dist/Server/API/UserTwoFactorAuthAPI.js.map +0 -1
  358. package/build/dist/Server/Services/UserTwoFactorAuthService.js.map +0 -1
  359. package/build/dist/Server/Utils/TwoFactorAuth.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserWebAuthnService.js","sourceRoot":"","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QACH,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,EAAE;SACjB,CAAC;IACJ,CAAC;CACF;AApYc;IADZ,WAAW,EAAE;;;;0DAiFb;AAGY;IADZ,WAAW,EAAE;;;;iDAkDb;AAGY;IADZ,WAAW,EAAE;;;;4DA0Db;AAGY;IADZ,WAAW,EAAE;;;;mDAyEb;AAGwB;IADxB,WAAW,EAAE;;;;6CAoCb;AAGwB;IADxB,WAAW,EAAE;;;;6CAgFb;AAGH,eAAe,IAAI,OAAO,EAAE,CAAC"}
@@ -108,7 +108,7 @@ export class Service extends DatabaseService {
108
108
  },
109
109
  ],
110
110
  });
111
- let existingChannelNames = [];
111
+ let existingChannels = [];
112
112
  let createdChannels = [];
113
113
  if (notificationRule.shouldCreateNewChannel) {
114
114
  const generateRandomString = Text.generateRandomText(5);
@@ -139,19 +139,29 @@ export class Service extends DatabaseService {
139
139
  }
140
140
  }
141
141
  if (notificationRule.shouldPostToExistingChannel) {
142
- existingChannelNames = this.getExistingChannelNamesFromNotificationRules({
142
+ existingChannels = this.getExistingChannelNamesFromNotificationRules({
143
143
  notificationRules: [notificationRule],
144
+ workspaceType: rule.workspaceType,
144
145
  });
145
- for (const channelName of existingChannelNames) {
146
+ for (const channel of existingChannels) {
146
147
  try {
147
148
  // check if these channels exist.
148
- const channelExists = await WorkspaceUtil.getWorkspaceTypeUtil(rule.workspaceType).doesChannelExist({
149
+ const doesChannelExistData = {
149
150
  authToken: projectAuthToken,
150
- channelName: channelName,
151
+ channelName: channel.name,
151
152
  projectId: data.projectId,
152
- });
153
+ };
154
+ // Add teamId for Microsoft Teams
155
+ if (rule.workspaceType === WorkspaceType.MicrosoftTeams) {
156
+ const teamId = channel.teamId;
157
+ if (!teamId) {
158
+ throw new BadDataException("Microsoft Teams integration requires a team to be selected for posting to existing channels. Please edit the notification rule and select a team.");
159
+ }
160
+ doesChannelExistData.teamId = teamId;
161
+ }
162
+ const channelExists = await WorkspaceUtil.getWorkspaceTypeUtil(rule.workspaceType).doesChannelExist(doesChannelExistData);
153
163
  if (!channelExists) {
154
- throw new BadDataException(`Channel ${channelName} does not exist. If this channel is private, you need to invite OneUptime bot to the channel and try again.`);
164
+ throw new BadDataException(`Channel ${channel.name} does not exist. If this channel is private, you need to invite OneUptime bot to the channel and try again.`);
155
165
  }
156
166
  }
157
167
  catch (err) {
@@ -164,13 +174,15 @@ export class Service extends DatabaseService {
164
174
  const responses = await WorkspaceUtil.postMessageToAllWorkspaceChannelsAsBot({
165
175
  projectId: data.projectId,
166
176
  messagePayloadsByWorkspace: messageBlocksByWorkspaceTypes.map((messageBlocksByWorkspaceType) => {
167
- return {
177
+ const payload = {
168
178
  _type: "WorkspaceMessagePayload",
169
179
  workspaceType: messageBlocksByWorkspaceType.workspaceType,
170
180
  messageBlocks: messageBlocksByWorkspaceType.messageBlocks,
171
181
  channelNames: [],
172
182
  channelIds: [createdChannel.id],
183
+ teamId: notificationRule.existingTeam,
173
184
  };
185
+ return payload;
174
186
  }),
175
187
  });
176
188
  // Log results for test sends (created channels)
@@ -194,6 +206,13 @@ export class Service extends DatabaseService {
194
206
  };
195
207
  for (const res of responses) {
196
208
  const messageSummary = getMessageSummary(res.workspaceType);
209
+ // Check for errors in the response
210
+ if (res.errors && res.errors.length > 0) {
211
+ const errorMessages = res.errors.map((error) => {
212
+ return `Channel ${error.channel.name}: ${error.error}`;
213
+ });
214
+ throw new BadDataException(`Failed to send test message to some channels: ${errorMessages.join("; ")}`);
215
+ }
197
216
  for (const thread of res.threads) {
198
217
  const log = new WorkspaceNotificationLog();
199
218
  log.projectId = data.projectId;
@@ -217,18 +236,23 @@ export class Service extends DatabaseService {
217
236
  throw new BadDataException("Cannot post message to channel. " + (err === null || err === void 0 ? void 0 : err.message));
218
237
  }
219
238
  }
220
- for (const existingChannelName of existingChannelNames) {
239
+ for (const channel of existingChannels) {
221
240
  try {
222
241
  const responses = await WorkspaceUtil.postMessageToAllWorkspaceChannelsAsBot({
223
242
  projectId: data.projectId,
224
243
  messagePayloadsByWorkspace: messageBlocksByWorkspaceTypes.map((messageBlocksByWorkspaceType) => {
225
- return {
244
+ const payload = {
226
245
  _type: "WorkspaceMessagePayload",
227
246
  workspaceType: messageBlocksByWorkspaceType.workspaceType,
228
247
  messageBlocks: messageBlocksByWorkspaceType.messageBlocks,
229
- channelNames: [existingChannelName],
248
+ channelNames: [channel.name],
230
249
  channelIds: [],
231
250
  };
251
+ if (messageBlocksByWorkspaceType.workspaceType ===
252
+ WorkspaceType.MicrosoftTeams) {
253
+ payload.teamId = channel.teamId;
254
+ }
255
+ return payload;
232
256
  }),
233
257
  });
234
258
  // Log results for test sends (existing channels)
@@ -252,6 +276,13 @@ export class Service extends DatabaseService {
252
276
  };
253
277
  for (const res of responses) {
254
278
  const messageSummary = getMessageSummary(res.workspaceType);
279
+ // Check for errors in the response
280
+ if (res.errors && res.errors.length > 0) {
281
+ const errorMessages = res.errors.map((error) => {
282
+ return `Channel ${error.channel.name}: ${error.error}`;
283
+ });
284
+ throw new BadDataException(`Failed to send test message to some channels: ${errorMessages.join("; ")}`);
285
+ }
255
286
  for (const thread of res.threads) {
256
287
  const log = new WorkspaceNotificationLog();
257
288
  log.projectId = data.projectId;
@@ -369,16 +400,28 @@ export class Service extends DatabaseService {
369
400
  notificationFor: data.notificationFor,
370
401
  workspaceType: messageBlocksByWorkspaceType.workspaceType,
371
402
  });
372
- const workspaceMessagePayload = {
373
- _type: "WorkspaceMessagePayload",
374
- workspaceType: messageBlocksByWorkspaceType.workspaceType,
375
- messageBlocks: messageBlocksByWorkspaceType.messageBlocks,
376
- channelNames: existingChannels,
377
- channelIds: monitorChannels.map((channel) => {
378
- return channel.id;
379
- }) || [],
380
- };
381
- workspaceNotificationPaylaods.push(workspaceMessagePayload);
403
+ for (const monitorChannel of monitorChannels) {
404
+ const workspaceMessagePayload = {
405
+ _type: "WorkspaceMessagePayload",
406
+ workspaceType: messageBlocksByWorkspaceType.workspaceType,
407
+ messageBlocks: messageBlocksByWorkspaceType.messageBlocks,
408
+ channelNames: [],
409
+ channelIds: [monitorChannel.id], // we use channel ids here as channel names can change,
410
+ teamId: monitorChannel.teamId,
411
+ };
412
+ workspaceNotificationPaylaods.push(workspaceMessagePayload);
413
+ }
414
+ for (const existingChannel of existingChannels) {
415
+ const workspaceMessagePayload = {
416
+ _type: "WorkspaceMessagePayload",
417
+ workspaceType: messageBlocksByWorkspaceType.workspaceType,
418
+ messageBlocks: messageBlocksByWorkspaceType.messageBlocks,
419
+ channelNames: [existingChannel.name],
420
+ channelIds: [], // we use channel names here as we don't have channel ids.
421
+ teamId: existingChannel.teamId,
422
+ };
423
+ workspaceNotificationPaylaods.push(workspaceMessagePayload);
424
+ }
382
425
  }
383
426
  const responses = await WorkspaceUtil.postMessageToAllWorkspaceChannelsAsBot({
384
427
  projectId: data.projectId,
@@ -525,14 +568,15 @@ export class Service extends DatabaseService {
525
568
  });
526
569
  logger.debug("Notification rules retrieved:");
527
570
  logger.debug(notificationRules);
528
- const existingChannelNames = this.getExistingChannelNamesFromNotificationRules({
571
+ const existingChannels = this.getExistingChannelNamesFromNotificationRules({
529
572
  notificationRules: notificationRules.map((rule) => {
530
573
  return rule.notificationRule;
531
574
  }),
575
+ workspaceType: data.workspaceType,
532
576
  }) || [];
533
- logger.debug("Existing channel names:");
534
- logger.debug(existingChannelNames);
535
- return existingChannelNames;
577
+ logger.debug("Existing channels:");
578
+ logger.debug(existingChannels);
579
+ return existingChannels;
536
580
  }
537
581
  async createChannelsAndInviteUsersToChannelsBasedOnRules(data) {
538
582
  try {
@@ -590,21 +634,25 @@ export class Service extends DatabaseService {
590
634
  notificationChannels: createdWorkspaceChannels,
591
635
  });
592
636
  logger.debug("Getting existing channel names from notification rules");
593
- const existingChannelNames = this.getExistingChannelNamesFromNotificationRules({
637
+ const existingChannels = this.getExistingChannelNamesFromNotificationRules({
594
638
  notificationRules: notificationRules.map((rule) => {
595
639
  return rule.notificationRule;
596
640
  }),
641
+ workspaceType: workspaceType,
597
642
  }) || [];
598
- logger.debug("Existing channel names:");
599
- logger.debug(existingChannelNames);
643
+ logger.debug("Existing channels:");
644
+ logger.debug(existingChannels);
600
645
  logger.debug("Adding created channel names to existing channel names");
646
+ const allChannelNames = existingChannels.map((c) => {
647
+ return c.name;
648
+ });
601
649
  for (const channel of createdWorkspaceChannels) {
602
- if (!existingChannelNames.includes(channel.name)) {
603
- existingChannelNames.push(channel.name);
650
+ if (!allChannelNames.includes(channel.name)) {
651
+ allChannelNames.push(channel.name);
604
652
  }
605
653
  }
606
654
  logger.debug("Final list of channel names to post messages to:");
607
- logger.debug(existingChannelNames);
655
+ logger.debug(allChannelNames);
608
656
  logger.debug("Posting messages to workspace channels");
609
657
  logger.debug("Channels created:");
610
658
  logger.debug(createdWorkspaceChannels);
@@ -666,7 +714,7 @@ export class Service extends DatabaseService {
666
714
  return result;
667
715
  }
668
716
  async inviteUsersAndTeamsToChannelsBasedOnRules(data) {
669
- var _a, _b;
717
+ var _a, _b, _c;
670
718
  logger.debug("inviteUsersAndTeamsToChannelsBasedOnRules called with data:");
671
719
  logger.debug(data);
672
720
  const inviteUserPayloads = await this.getUsersIdsToInviteToChannel({
@@ -697,7 +745,7 @@ export class Service extends DatabaseService {
697
745
  })) || [];
698
746
  logger.debug("Channel IDs to send message to:");
699
747
  logger.debug(channelIds);
700
- await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).sendMessage({
748
+ const sendMessageData = {
701
749
  userId: data.projectAuth.workspaceProjectId,
702
750
  authToken: data.projectAuth.authToken,
703
751
  workspaceMessagePayload: {
@@ -716,7 +764,13 @@ export class Service extends DatabaseService {
716
764
  ],
717
765
  },
718
766
  projectId: data.projectId,
719
- });
767
+ };
768
+ // Add teamId for Microsoft Teams
769
+ if (data.workspaceType === WorkspaceType.MicrosoftTeams &&
770
+ ((_c = data.projectAuth.miscData) === null || _c === void 0 ? void 0 : _c["teamId"])) {
771
+ sendMessageData.teamId = data.projectAuth.miscData["teamId"];
772
+ }
773
+ await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).sendMessage(sendMessageData);
720
774
  }
721
775
  catch (e) {
722
776
  logger.error("Error in sending message to channel");
@@ -745,6 +799,7 @@ export class Service extends DatabaseService {
745
799
  logger.debug("Users invited to channels successfully");
746
800
  }
747
801
  async inviteUsersBasedOnRulesAndWorkspaceChannels(data) {
802
+ var _a;
748
803
  // if no rules then return.
749
804
  if (data.notificationRules.length === 0) {
750
805
  logger.debug("No notification rules found. Returning.");
@@ -812,7 +867,7 @@ export class Service extends DatabaseService {
812
867
  });
813
868
  logger.debug("Channel IDs to send message to:");
814
869
  logger.debug(channelIds);
815
- await WorkspaceUtil.getWorkspaceTypeUtil(workspaceType).sendMessage({
870
+ const sendMessageData = {
816
871
  userId: projectAuth.workspaceProjectId,
817
872
  authToken: projectAuth.authToken,
818
873
  workspaceMessagePayload: {
@@ -831,7 +886,13 @@ export class Service extends DatabaseService {
831
886
  ],
832
887
  },
833
888
  projectId: data.projectId,
834
- });
889
+ };
890
+ // Add teamId for Microsoft Teams
891
+ if (workspaceType === WorkspaceType.MicrosoftTeams &&
892
+ ((_a = projectAuth.miscData) === null || _a === void 0 ? void 0 : _a["teamId"])) {
893
+ sendMessageData.teamId = projectAuth.miscData["teamId"];
894
+ }
895
+ await WorkspaceUtil.getWorkspaceTypeUtil(workspaceType).sendMessage(sendMessageData);
835
896
  }
836
897
  catch (e) {
837
898
  logger.error("Error in sending message to channel");
@@ -922,7 +983,7 @@ export class Service extends DatabaseService {
922
983
  return ((_a = userAuth.workspaceUserId) === null || _a === void 0 ? void 0 : _a.toString()) || null;
923
984
  }
924
985
  async createChannelsBasedOnRules(data) {
925
- var _a, _b, _c, _d;
986
+ var _a, _b, _c, _d, _e;
926
987
  logger.debug("createChannelsBasedOnRules called with data:");
927
988
  logger.debug(data);
928
989
  const createdWorkspaceChannels = [];
@@ -934,6 +995,14 @@ export class Service extends DatabaseService {
934
995
  });
935
996
  logger.debug("New channel names to be created:");
936
997
  logger.debug(notificationChannels);
998
+ // Get project auth to access teamId for Microsoft Teams
999
+ const projectAuth = await WorkspaceProjectAuthTokenService.getProjectAuth({
1000
+ projectId: data.projectId,
1001
+ workspaceType: data.workspaceType,
1002
+ });
1003
+ if (!projectAuth) {
1004
+ throw new BadDataException("Project auth not found for workspace type " + data.workspaceType);
1005
+ }
937
1006
  if (!notificationChannels || notificationChannels.length === 0) {
938
1007
  logger.debug("No new channel names found. Returning empty array.");
939
1008
  return [];
@@ -946,11 +1015,24 @@ export class Service extends DatabaseService {
946
1015
  continue;
947
1016
  }
948
1017
  logger.debug(`Creating new channel with name: ${notificationChannel.channelName}`);
949
- const channel = await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).createChannel({
1018
+ const createChannelData = {
950
1019
  authToken: data.projectOrUserAuthTokenForWorkspace,
951
1020
  channelName: notificationChannel.channelName,
952
1021
  projectId: data.projectId,
953
- });
1022
+ };
1023
+ if (notificationChannel.teamId) {
1024
+ createChannelData.teamId = notificationChannel.teamId;
1025
+ }
1026
+ else if (data.workspaceType === WorkspaceType.MicrosoftTeams &&
1027
+ ((_a = projectAuth.miscData) === null || _a === void 0 ? void 0 : _a["teamId"])) {
1028
+ createChannelData.teamId = projectAuth.miscData["teamId"];
1029
+ }
1030
+ // Ensure teamId is set for Microsoft Teams
1031
+ if (data.workspaceType === WorkspaceType.MicrosoftTeams &&
1032
+ !createChannelData.teamId) {
1033
+ throw new BadDataException("teamId is required for Microsoft Teams channels");
1034
+ }
1035
+ const channel = await WorkspaceUtil.getWorkspaceTypeUtil(data.workspaceType).createChannel(createChannelData);
954
1036
  const notificationWorkspaceChannel = Object.assign(Object.assign({}, channel), { notificationRuleId: notificationChannel.notificationRuleId });
955
1037
  logger.debug("Channel created:");
956
1038
  logger.debug(channel);
@@ -963,17 +1045,17 @@ export class Service extends DatabaseService {
963
1045
  channelName: channel.name,
964
1046
  };
965
1047
  // Add resource associations only if they exist
966
- if ((_a = data.notificationFor) === null || _a === void 0 ? void 0 : _a.incidentId) {
1048
+ if ((_b = data.notificationFor) === null || _b === void 0 ? void 0 : _b.incidentId) {
967
1049
  logData.incidentId = data.notificationFor.incidentId;
968
1050
  }
969
- if ((_b = data.notificationFor) === null || _b === void 0 ? void 0 : _b.alertId) {
1051
+ if ((_c = data.notificationFor) === null || _c === void 0 ? void 0 : _c.alertId) {
970
1052
  logData.alertId = data.notificationFor.alertId;
971
1053
  }
972
- if ((_c = data.notificationFor) === null || _c === void 0 ? void 0 : _c.scheduledMaintenanceId) {
1054
+ if ((_d = data.notificationFor) === null || _d === void 0 ? void 0 : _d.scheduledMaintenanceId) {
973
1055
  logData.scheduledMaintenanceId =
974
1056
  data.notificationFor.scheduledMaintenanceId;
975
1057
  }
976
- if ((_d = data.notificationFor) === null || _d === void 0 ? void 0 : _d.onCallDutyPolicyId) {
1058
+ if ((_e = data.notificationFor) === null || _e === void 0 ? void 0 : _e.onCallDutyPolicyId) {
977
1059
  logData.onCallDutyPolicyId = data.notificationFor.onCallDutyPolicyId;
978
1060
  }
979
1061
  await WorkspaceNotificationLogService.logCreateChannel(logData, {
@@ -1052,7 +1134,7 @@ export class Service extends DatabaseService {
1052
1134
  getExistingChannelNamesFromNotificationRules(data) {
1053
1135
  logger.debug("getExistingChannelNamesFromNotificationRules called with data:");
1054
1136
  logger.debug(data);
1055
- const channelNames = [];
1137
+ const channels = [];
1056
1138
  for (const notificationRule of data.notificationRules) {
1057
1139
  const workspaceRules = notificationRule;
1058
1140
  if (workspaceRules.shouldPostToExistingChannel) {
@@ -1064,15 +1146,20 @@ export class Service extends DatabaseService {
1064
1146
  logger.debug("Empty channel name found. Skipping.");
1065
1147
  continue;
1066
1148
  }
1067
- if (!channelNames.includes(channelName)) {
1068
- channelNames.push(channelName);
1149
+ const channel = Object.assign({ id: channelName, name: channelName, workspaceType: data.workspaceType }, (workspaceRules.existingTeam && {
1150
+ teamId: workspaceRules.existingTeam,
1151
+ }));
1152
+ if (!channels.some((c) => {
1153
+ return c.name === channelName;
1154
+ })) {
1155
+ channels.push(channel);
1069
1156
  }
1070
1157
  }
1071
1158
  }
1072
1159
  }
1073
- logger.debug("Final list of existing channel names:");
1074
- logger.debug(channelNames);
1075
- return channelNames;
1160
+ logger.debug("Final list of existing channels:");
1161
+ logger.debug(channels);
1162
+ return channels;
1076
1163
  }
1077
1164
  getnotificationChannelssFromNotificationRules(data) {
1078
1165
  logger.debug("getnotificationChannelssFromNotificationRules called with data:");
@@ -1095,10 +1182,14 @@ export class Service extends DatabaseService {
1095
1182
  return name.channelName === channelName;
1096
1183
  }).length === 0) {
1097
1184
  // if channel name is not already added then add it.
1098
- channels.push({
1185
+ const channelData = {
1099
1186
  channelName: channelName,
1100
1187
  notificationRuleId: notificationRule.id.toString() || "",
1101
- });
1188
+ };
1189
+ if (workspaceRules.teamToCreateChannelIn) {
1190
+ channelData.teamId = workspaceRules.teamToCreateChannelIn;
1191
+ }
1192
+ channels.push(channelData);
1102
1193
  logger.debug(`Channel name ${channelName} added to the list.`);
1103
1194
  }
1104
1195
  else {