@oneuptime/common 8.0.5239 → 8.0.5283

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
@@ -58,7 +58,7 @@ const mockCreateResponse: MockCreateResponseFunction = async (
58
58
  return new HTTPResponse(
59
59
  200,
60
60
  {
61
- file: (await file.arrayBuffer()) as Buffer,
61
+ file: Buffer.from(await file.arrayBuffer()),
62
62
  name: file.name,
63
63
  type: file.type as MimeType,
64
64
  slug: file.name,
@@ -78,7 +78,7 @@ const mockFileModel: MockFileModelFunction = async (
78
78
  fileModel.fileType = file.type as MimeType;
79
79
  fileModel.slug = file.name;
80
80
  fileModel.isPublic = true;
81
- fileModel.file = (await file.arrayBuffer()) as Buffer;
81
+ fileModel.file = Buffer.from(await file.arrayBuffer());
82
82
  return fileModel;
83
83
  };
84
84
 
@@ -32,12 +32,11 @@ jest.mock("axios", () => {
32
32
  return Object.assign(jest.fn(), jest.requireActual("axios"));
33
33
  });
34
34
 
35
- // Mock axios(config) top level function
36
- // Ignore type error
37
- // Property 'lastCall' is optional in type MockFunctionState but required in type MockContext
38
- // @ts-ignore
39
- const mockedAxios: jest.MockedFunctionDeep<typeof axios> =
40
- jest.mocked<AxiosStatic>(axios);
35
+ /*
36
+ * Mock axios(config) top level function
37
+ */
38
+ const mockedAxios: jest.MockedFunction<AxiosStatic> =
39
+ axios as jest.MockedFunction<typeof axios>;
41
40
 
42
41
  // Spy on calls to HTTPErrorResponse
43
42
  jest.mock("../../Types/API/HTTPErrorResponse");
@@ -342,8 +341,10 @@ interface HTTPMethodType {
342
341
  method: HTTPMethod;
343
342
  }
344
343
 
345
- // Set up table-driven tests for
346
- // .get(), .post(), .put(), .delete(), get(), post(), put(), delete()
344
+ /*
345
+ * Set up table-driven tests for
346
+ * .get(), .post(), .put(), .delete(), get(), post(), put(), delete()
347
+ */
347
348
  const httpMethodTests: Array<HTTPMethodType> = [
348
349
  {
349
350
  name: "get",
@@ -11,9 +11,11 @@ export default class DatabaseCommonInteractionPropsUtil {
11
11
  props: DatabaseCommonInteractionProps,
12
12
  permissionType: PermissionType,
13
13
  ): Array<UserPermission> {
14
- // Check first if the user has Global Permissions.
15
- // Global permissions includes all the tenantId user has access to.
16
- // and it includes all the global permissions that applies to all the tenant, like PUBLIC.
14
+ /*
15
+ * Check first if the user has Global Permissions.
16
+ * Global permissions includes all the tenantId user has access to.
17
+ * and it includes all the global permissions that applies to all the tenant, like PUBLIC.
18
+ */
17
19
  if (!props.userGlobalAccessPermission) {
18
20
  props.userGlobalAccessPermission = {
19
21
  globalPermissions: [Permission.Public],
package/Types/Html.ts CHANGED
@@ -18,9 +18,11 @@ export default class HTML {
18
18
  public static isHtml(text: string): boolean {
19
19
  // Check if the text is HTML
20
20
 
21
- // Example usage const htmlString = '<div>Hello, World!</div>'; const notHtmlString = 'Just a regular string'
22
- // console.log(HTML.isHtml(htmlString)); // true
23
- // console.log(HTML.isHtml(notHtmlString)); // false
21
+ /*
22
+ * Example usage const htmlString = '<div>Hello, World!</div>'; const notHtmlString = 'Just a regular string'
23
+ * console.log(HTML.isHtml(htmlString)); // true
24
+ * console.log(HTML.isHtml(notHtmlString)); // false
25
+ */
24
26
 
25
27
  const htmlPattern: RegExp = /<\/?[a-z][\s\S]*>/i;
26
28
  return htmlPattern.test(text);
@@ -27,11 +27,11 @@ export default class JSONFunctions {
27
27
  // obj could be in this format:
28
28
 
29
29
  /**
30
- * {
31
- "http.url.protocol": "http",
32
- "http.url.hostname": "localhost",
33
- "http.host": "localhost",
34
- */
30
+ * {
31
+ *"http.url.protocol": "http",
32
+ *"http.url.hostname": "localhost",
33
+ *"http.host": "localhost",
34
+ */
35
35
 
36
36
  // we want to convert it to this format:
37
37
 
@@ -7,10 +7,12 @@ export default interface MetricsQuery {
7
7
  aggegationType: MetricsAggregationType;
8
8
  aggregateBy: Dictionary<boolean>;
9
9
 
10
- // This is used for example for probes.
11
- // To display US probe and EU probe in chart for example.
12
- // In this case groupByAttribute is "probeId"
13
- // and attributeValueToLegendMap is { "xx-xx-xx-xx": "US Probe", "yy-yyy-yyy-yy-yy": "EU Probe" }
10
+ /*
11
+ * This is used for example for probes.
12
+ * To display US probe and EU probe in chart for example.
13
+ * In this case groupByAttribute is "probeId"
14
+ * and attributeValueToLegendMap is { "xx-xx-xx-xx": "US Probe", "yy-yyy-yyy-yy-yy": "EU Probe" }
15
+ */
14
16
 
15
17
  groupByAttribute?: string | undefined;
16
18
  attributeValueToLegendMap?: Dictionary<string>;
@@ -69,12 +69,14 @@ export class MonitorTypeHelper {
69
69
  description:
70
70
  "This monitor type does the basic ping test of an endpoint.",
71
71
  },
72
- // {
73
- // monitorType: MonitorType.Kubernetes,
74
- // title: 'Kubernetes',
75
- // description:
76
- // 'This monitor types lets you monitor Kubernetes clusters.',
77
- // },
72
+ /*
73
+ * {
74
+ * monitorType: MonitorType.Kubernetes,
75
+ * title: 'Kubernetes',
76
+ * description:
77
+ * 'This monitor types lets you monitor Kubernetes clusters.',
78
+ * },
79
+ */
78
80
  {
79
81
  monitorType: MonitorType.IP,
80
82
  title: "IP",
@@ -663,9 +663,11 @@ export default class LayerUtil {
663
663
  // if start time is after end time, we need to add one week to the end time
664
664
 
665
665
  if (OneUptimeDate.isAfter(startTime, endTime)) {
666
- // in this case the restriction is towards the ends of the week and not in the middle so we need to add two objects to the array.
667
- // One for start of the week
668
- // and the other for end of the week .
666
+ /*
667
+ * in this case the restriction is towards the ends of the week and not in the middle so we need to add two objects to the array.
668
+ * One for start of the week
669
+ * and the other for end of the week .
670
+ */
669
671
 
670
672
  const startOfWeek: Date = data.eventStartTime;
671
673
  // add 7 days to the end time to get the end of the week
@@ -718,11 +720,13 @@ export default class LayerUtil {
718
720
  let restrictionStartTime: Date = dayRestrictionTimes.startTime;
719
721
  let restrictionEndTime: Date = dayRestrictionTimes.endTime;
720
722
 
721
- // Special Case: Overnight (wrap-around) window where end time is logically on the next day.
722
- // Example: 23:00 -> 11:00 (next day). Existing algorithm assumed end >= start within same day
723
- // and returned no events. We explicitly expand such windows into two segments per day:
724
- // 1) start -> endOfDay(start)
725
- // 2) startOfNextDay -> end (moved to next day)
723
+ /*
724
+ * Special Case: Overnight (wrap-around) window where end time is logically on the next day.
725
+ * Example: 23:00 -> 11:00 (next day). Existing algorithm assumed end >= start within same day
726
+ * and returned no events. We explicitly expand such windows into two segments per day:
727
+ * 1) start -> endOfDay(start)
728
+ * 2) startOfNextDay -> end (moved to next day)
729
+ */
726
730
  if (OneUptimeDate.isBefore(restrictionEndTime, restrictionStartTime)) {
727
731
  const results: Array<StartAndEndTime> = [];
728
732
 
@@ -1012,9 +1016,11 @@ export default class LayerUtil {
1012
1016
  public removeOverlappingEvents(
1013
1017
  events: PriorityCalendarEvents[],
1014
1018
  ): CalendarEvent[] {
1015
- // now remove overlapping events by priority and trim them by priority. Lower priority number will be kept and higher priority number will be trimmed.
1016
- // so if there are two events with the same start and end time, we will keep the one with the lower priority number and remove the one with the higher priority number.
1017
- // if there are overlapping events, we will trim the one with the higher priority number.
1019
+ /*
1020
+ * now remove overlapping events by priority and trim them by priority. Lower priority number will be kept and higher priority number will be trimmed.
1021
+ * so if there are two events with the same start and end time, we will keep the one with the lower priority number and remove the one with the higher priority number.
1022
+ * if there are overlapping events, we will trim the one with the higher priority number.
1023
+ */
1018
1024
 
1019
1025
  // sort the events by priority
1020
1026
 
@@ -1078,14 +1084,18 @@ export default class LayerUtil {
1078
1084
  ) {
1079
1085
  // if the current event has a higher priority than the final event, we need to trim the final event
1080
1086
  if (event.priority < finalEvent.priority) {
1081
- // trim the final event based on the current event
1082
- // end time of the final event will be the start time of the current event - 1 second
1087
+ /*
1088
+ * trim the final event based on the current event
1089
+ * end time of the final event will be the start time of the current event - 1 second
1090
+ */
1083
1091
  const tempFinalEventEnd: Date = finalEvent.end;
1084
1092
 
1085
1093
  finalEvent.end = OneUptimeDate.addRemoveSeconds(event.start, -1);
1086
1094
 
1087
- // check if the final event end time is before the start time of the current event
1088
- // if it is, we need to remove the final event from the final events array
1095
+ /*
1096
+ * check if the final event end time is before the start time of the current event
1097
+ * if it is, we need to remove the final event from the final events array
1098
+ */
1089
1099
  if (OneUptimeDate.isBefore(finalEvent.end, finalEvent.start)) {
1090
1100
  finalEvents.splice(i, 1);
1091
1101
  i--; // Adjust index after removal
@@ -1115,8 +1125,10 @@ export default class LayerUtil {
1115
1125
  }
1116
1126
  }
1117
1127
  } else {
1118
- // trim the current event based on the final event
1119
- // start time of the current event will be the end time of the final event + 1 second
1128
+ /*
1129
+ * trim the current event based on the final event
1130
+ * start time of the current event will be the end time of the final event + 1 second
1131
+ */
1120
1132
  event.start = OneUptimeDate.addRemoveSeconds(finalEvent.end, 1);
1121
1133
  }
1122
1134
  }
package/Types/Phone.ts CHANGED
@@ -15,9 +15,11 @@ export default class Phone extends DatabaseProperty {
15
15
  primaryPhoneNumberToPickFrom: Phone | string;
16
16
  seocndaryPhoneNumbersToPickFrom: Phone[] | string[];
17
17
  }): Phone {
18
- // convert all to string, so that we can compare them
19
- // if the country code matches in secondary phone numbers, then pick that number
20
- // if no country code matches, then pick the primary phone number and return it.
18
+ /*
19
+ * convert all to string, so that we can compare them
20
+ * if the country code matches in secondary phone numbers, then pick that number
21
+ * if no country code matches, then pick the primary phone number and return it.
22
+ */
21
23
 
22
24
  const to: string =
23
25
  typeof data.to === "string" ? data.to : data.to.toString();
@@ -9,4 +9,5 @@ export default interface BaseNotificationRule {
9
9
 
10
10
  shouldPostToExistingChannel: boolean;
11
11
  existingChannelNames: string; // separate by comma
12
+ existingTeam?: string; // team to post to (for MS Teams only)
12
13
  }
@@ -7,12 +7,15 @@ export default interface CreateChannelNotificationRule
7
7
 
8
8
  // if filters match then do:
9
9
  shouldCreateNewChannel: boolean;
10
+ teamToCreateChannelIn?: string; // team to create new channel in (for MS Teams)
10
11
  inviteTeamsToNewChannel: Array<ObjectID>;
11
12
  inviteUsersToNewChannel: Array<ObjectID>;
12
13
  shouldInviteOwnersToNewChannel: boolean;
13
14
  newChannelTemplateName: string;
14
15
 
15
- // if selected this would archive channel when incident, alert, scheduled maintenance reaches the last state (is resolved)
16
- // This would only archive the channel which was created.
16
+ /*
17
+ * if selected this would archive channel when incident, alert, scheduled maintenance reaches the last state (is resolved)
18
+ * This would only archive the channel which was created.
19
+ */
17
20
  archiveChannelAutomatically: boolean;
18
21
  }
@@ -105,4 +105,5 @@ export default interface WorkspaceMessagePayload {
105
105
  channelIds: Array<string>; // Channel ids to send message to.
106
106
  messageBlocks: Array<WorkspaceMessageBlock>; // Message to add to blocks.
107
107
  workspaceType: WorkspaceType;
108
+ teamId?: string | undefined; // Team ID for Microsoft Teams
108
109
  }
@@ -3,4 +3,17 @@ enum WorkspaceType {
3
3
  MicrosoftTeams = "MicrosoftTeams",
4
4
  }
5
5
 
6
+ export function getWorkspaceTypeDisplayName(
7
+ workspaceType: WorkspaceType,
8
+ ): string {
9
+ if (workspaceType === WorkspaceType.MicrosoftTeams) {
10
+ return "Microsoft Teams";
11
+ }
12
+
13
+ if (workspaceType === WorkspaceType.Slack) {
14
+ return "Slack";
15
+ }
16
+ return workspaceType;
17
+ }
18
+
6
19
  export default WorkspaceType;
@@ -1,9 +1,11 @@
1
- /// ChartDataPoint is in the format of:
2
- // {
3
- // date: "Feb 22",
4
- // SolarPanels: 2756,
5
- // Inverters: 2103,
6
- // }
1
+ /*
2
+ * ChartDataPoint is in the format of:
3
+ * {
4
+ * date: "Feb 22",
5
+ * SolarPanels: 2756,
6
+ * Inverters: 2103,
7
+ * }
8
+ */
7
9
 
8
10
  import BadDataException from "../../../../Types/Exception/BadDataException";
9
11
  import ChartDataPoint from "../ChartLibrary/Types/ChartDataPoint";
@@ -261,7 +261,10 @@ const Detail: DetailFunction = <T extends GenericObject>(
261
261
  (props.item[fieldKey] as unknown as FileModel).fileType
262
262
  ) {
263
263
  const blob: Blob = new Blob(
264
- [(props.item[fieldKey] as unknown as FileModel).file as Uint8Array],
264
+ [
265
+ (props.item[fieldKey] as unknown as FileModel).file!
266
+ .buffer as ArrayBuffer,
267
+ ],
265
268
  {
266
269
  type: (props.item[fieldKey] as unknown as FileModel)
267
270
  .fileType as string,
@@ -131,7 +131,7 @@ const FilePicker: FunctionComponent<ComponentProps> = (
131
131
  return <></>;
132
132
  }
133
133
 
134
- const blob: Blob = new Blob([file.file as Uint8Array], {
134
+ const blob: Blob = new Blob([file.file!.buffer as ArrayBuffer], {
135
135
  type: file.fileType as string,
136
136
  });
137
137
  const url: string = URL.createObjectURL(blob);
@@ -114,8 +114,10 @@ export default interface Field<TEntity> {
114
114
 
115
115
  hideOptionalLabel?: boolean | undefined;
116
116
 
117
- // Spell check configuration (primarily for Markdown and text fields)
118
- // Default: false (spell check enabled). Set to true to disable spell check.
117
+ /*
118
+ * Spell check configuration (primarily for Markdown and text fields)
119
+ * Default: false (spell check enabled). Set to true to disable spell check.
120
+ */
119
121
  disableSpellCheck?: boolean | undefined;
120
122
 
121
123
  getSummaryElement?: (item: FormValues<TEntity>) => ReactElement | undefined;
@@ -18,7 +18,7 @@ export interface ComponentProps {
18
18
 
19
19
  export class ImageFunctions {
20
20
  public static getImageURL(file: File): string {
21
- const blob: Blob = new Blob([file.file as Uint8Array], {
21
+ const blob: Blob = new Blob([file.file!.buffer as ArrayBuffer], {
22
22
  type: (file as File).fileType as string,
23
23
  });
24
24
 
@@ -46,8 +46,10 @@ const JSONTable: FunctionComponent<JSONTableProps> = (
46
46
  JSONFunctions.nestJson(json),
47
47
  ) as { [key: string]: any };
48
48
 
49
- // Post-process flattened keys to group primitive arrays: prefix.0, prefix.1 => prefix: [v0, v1]
50
- // We ONLY group if all matching keys are simple (no deeper nesting like prefix.0.field)
49
+ /*
50
+ * Post-process flattened keys to group primitive arrays: prefix.0, prefix.1 => prefix: [v0, v1]
51
+ * We ONLY group if all matching keys are simple (no deeper nesting like prefix.0.field)
52
+ */
51
53
  type GroupEntry = { index: number; value: unknown };
52
54
  type GroupMap = { [prefix: string]: Array<GroupEntry> };
53
55
  const groupMap: GroupMap = {};
@@ -224,9 +224,11 @@ export interface BaseTableProps<
224
224
 
225
225
  formSummary?: FormSummaryConfig | undefined;
226
226
 
227
- // this key is used to save table user preferences in local storage.
228
- // If you provide this key, the table will save the user preferences in local storage.
229
- // If you do not provide this key, the table will not save the user preferences in local storage.
227
+ /*
228
+ * this key is used to save table user preferences in local storage.
229
+ * If you provide this key, the table will save the user preferences in local storage.
230
+ * If you do not provide this key, the table will not save the user preferences in local storage.
231
+ */
230
232
  userPreferencesKey: string;
231
233
  }
232
234
 
@@ -132,8 +132,10 @@ const SideMenu: FunctionComponent<ComponentProps> = (props: ComponentProps) => {
132
132
 
133
133
  // Re-run active item detection when location changes
134
134
  useEffect(() => {
135
- // This will trigger a re-render when navigation changes
136
- // The activeItem will be recalculated
135
+ /*
136
+ * This will trigger a re-render when navigation changes
137
+ * The activeItem will be recalculated
138
+ */
137
139
  }, [Navigation.getCurrentPath().toString()]);
138
140
 
139
141
  // Render function for the menu content
@@ -35,32 +35,44 @@ const SideMenuItem: FunctionComponent<ComponentProps> = (
35
35
  subItemLinkClassName = `bg-gray-100 text-indigo-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
36
36
  }
37
37
 
38
- // if(props.badge && props.badge > 0){
39
- // if(props.badgeType === BadgeType.DANGER){
40
- // linkClassName = `text-red-400 hover:text-red-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
38
+ /*
39
+ * if(props.badge && props.badge > 0){
40
+ * if(props.badgeType === BadgeType.DANGER){
41
+ * linkClassName = `text-red-400 hover:text-red-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
42
+ */
43
+
44
+ /*
45
+ * if(Navigation.isOnThisPage(props.link.to)){
46
+ * linkClassName = `bg-gray-100 text-red-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
47
+ * }
48
+ */
41
49
 
42
- // if(Navigation.isOnThisPage(props.link.to)){
43
- // linkClassName = `bg-gray-100 text-red-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
44
- // }
45
-
46
- // }
47
-
48
- // if(props.badgeType === BadgeType.WARNING){
49
- // linkClassName = `text-yellow-400 hover:text-yellow-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
50
-
51
- // if(Navigation.isOnThisPage(props.link.to)){
52
- // linkClassName = `bg-gray-100 text-yellow-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
53
- // }
54
50
  // }
55
51
 
56
- // if(props.badgeType === BadgeType.SUCCESS){
57
- // linkClassName = `text-emerald-400 hover:text-emerald-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
58
-
59
- // if(Navigation.isOnThisPage(props.link.to)){
60
- // linkClassName = `bg-gray-100 text-emerald-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
61
- // }
62
- // }
63
- // }
52
+ /*
53
+ * if(props.badgeType === BadgeType.WARNING){
54
+ * linkClassName = `text-yellow-400 hover:text-yellow-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
55
+ */
56
+
57
+ /*
58
+ * if(Navigation.isOnThisPage(props.link.to)){
59
+ * linkClassName = `bg-gray-100 text-yellow-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
60
+ * }
61
+ * }
62
+ */
63
+
64
+ /*
65
+ * if(props.badgeType === BadgeType.SUCCESS){
66
+ * linkClassName = `text-emerald-400 hover:text-emerald-600 hover:bg-gray-100 group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
67
+ */
68
+
69
+ /*
70
+ * if(Navigation.isOnThisPage(props.link.to)){
71
+ * linkClassName = `bg-gray-100 text-emerald-600 hover:bg-white group rounded-md px-3 py-2 flex items-center text-sm font-medium`;
72
+ * }
73
+ * }
74
+ * }
75
+ */
64
76
 
65
77
  let iconClassName: string =
66
78
  "text-gray-400 group-hover:text-gray-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6";
@@ -76,32 +88,44 @@ const SideMenuItem: FunctionComponent<ComponentProps> = (
76
88
  subItemIconClassName = "text-indigo-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6";
77
89
  }
78
90
 
79
- // if(props.badge && props.badge > 0){
80
- // if(props.badgeType === BadgeType.DANGER){
81
- // iconClassName = `text-red-400 group-hover:text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
91
+ /*
92
+ * if(props.badge && props.badge > 0){
93
+ * if(props.badgeType === BadgeType.DANGER){
94
+ * iconClassName = `text-red-400 group-hover:text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
95
+ */
82
96
 
83
- // if(Navigation.isOnThisPage(props.link.to)){
84
- // iconClassName = `text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
85
- // }
97
+ /*
98
+ * if(Navigation.isOnThisPage(props.link.to)){
99
+ * iconClassName = `text-red-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
100
+ * }
101
+ */
86
102
 
87
103
  // }
88
104
 
89
- // if(props.badgeType === BadgeType.WARNING){
90
- // iconClassName = `text-yellow-400 group-hover:text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
91
-
92
- // if(Navigation.isOnThisPage(props.link.to)){
93
- // iconClassName = `text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
94
- // }
95
- // }
96
-
97
- // if(props.badgeType === BadgeType.SUCCESS){
98
- // iconClassName = `text-emerald-400 group-hover:text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
99
-
100
- // if(Navigation.isOnThisPage(props.link.to)){
101
- // iconClassName = `text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
102
- // }
103
- // }
104
- // }
105
+ /*
106
+ * if(props.badgeType === BadgeType.WARNING){
107
+ * iconClassName = `text-yellow-400 group-hover:text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
108
+ */
109
+
110
+ /*
111
+ * if(Navigation.isOnThisPage(props.link.to)){
112
+ * iconClassName = `text-yellow-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
113
+ * }
114
+ * }
115
+ */
116
+
117
+ /*
118
+ * if(props.badgeType === BadgeType.SUCCESS){
119
+ * iconClassName = `text-emerald-400 group-hover:text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
120
+ */
121
+
122
+ /*
123
+ * if(Navigation.isOnThisPage(props.link.to)){
124
+ * iconClassName = `text-emerald-500 flex-shrink-0 -ml-1 mr-3 h-6 w-6`;
125
+ * }
126
+ * }
127
+ * }
128
+ */
105
129
 
106
130
  return (
107
131
  <>
package/UI/Config.ts CHANGED
@@ -246,3 +246,6 @@ export const DisableTelemetry: boolean = env("DISABLE_TELEMETRY") === "true";
246
246
 
247
247
  export const SlackAppClientId: string | null =
248
248
  env("SLACK_APP_CLIENT_ID") || null;
249
+
250
+ export const MicrosoftTeamsAppClientId: string | null =
251
+ env("MICROSOFT_TEAMS_APP_CLIENT_ID") || null;
@@ -98,9 +98,11 @@ class BaseAPI extends API {
98
98
  public static override handleError(
99
99
  error: HTTPErrorResponse | APIException,
100
100
  ): HTTPErrorResponse | APIException {
101
- // 405 Status - Tenant not found. If Project was deleted.
102
- // 401 Status - User is not logged in.
103
- // 403 Status - Forbidden. If the IP address is not whitelisted (for example).
101
+ /*
102
+ * 405 Status - Tenant not found. If Project was deleted.
103
+ * 401 Status - User is not logged in.
104
+ * 403 Status - Forbidden. If the IP address is not whitelisted (for example).
105
+ */
104
106
  if (
105
107
  error instanceof HTTPErrorResponse &&
106
108
  (error.statusCode === 401 || error.statusCode === 405)
@@ -1,6 +1,8 @@
1
- // ISO 3166-1 alpha-2 country codes and names.
2
- // Limited to widely recognized sovereign states and territories supported by Stripe.
3
- // If needed, expand or adjust for specific business logic.
1
+ /*
2
+ * ISO 3166-1 alpha-2 country codes and names.
3
+ * Limited to widely recognized sovereign states and territories supported by Stripe.
4
+ * If needed, expand or adjust for specific business logic.
5
+ */
4
6
  export interface CountryOption {
5
7
  value: string;
6
8
  label: string;
package/UI/Utils/Login.ts CHANGED
@@ -22,7 +22,12 @@ export default abstract class LoginUtil {
22
22
  if (user.timezone) {
23
23
  UserUtil.setSavedUserTimezone(user.timezone);
24
24
  }
25
- UserUtil.setIsMasterAdmin(user.isMasterAdmin as boolean);
25
+
26
+ if (user.isMasterAdmin) {
27
+ UserUtil.setIsMasterAdmin(user.isMasterAdmin as boolean);
28
+ } else {
29
+ UserUtil.setIsMasterAdmin(false);
30
+ }
26
31
 
27
32
  if (user.profilePictureId) {
28
33
  UserUtil.setProfilePicId(user.profilePictureId);
@@ -0,0 +1,13 @@
1
+ class Base64 {
2
+ public static base64UrlToUint8Array(base64Url: string): Uint8Array {
3
+ const base64: string = base64Url.replace(/-/g, "+").replace(/_/g, "/");
4
+ return Buffer.from(base64, "base64") as Uint8Array;
5
+ }
6
+
7
+ public static uint8ArrayToBase64Url(uint8Array: Uint8Array): string {
8
+ const base64: string = Buffer.from(uint8Array).toString("base64");
9
+ return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/[=]/g, "");
10
+ }
11
+ }
12
+
13
+ export default Base64;
@@ -1157,8 +1157,10 @@ export class ModelSchema extends BaseSchema {
1157
1157
  data.disableOpenApiSchema || false,
1158
1158
  );
1159
1159
 
1160
- // Check if the column is required and make it optional if not
1161
- // Also make columns with default values optional in create schemas
1160
+ /*
1161
+ * Check if the column is required and make it optional if not
1162
+ * Also make columns with default values optional in create schemas
1163
+ */
1162
1164
  if (column.isDefaultValueColumn) {
1163
1165
  // should be optional
1164
1166
  zodType = zodType.optional();