@oneuptime/common 8.0.5237 → 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 (371) hide show
  1. package/Models/DatabaseModels/Index.ts +4 -2
  2. package/Models/DatabaseModels/OnCallDutyPolicy.ts +7 -0
  3. package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +7 -0
  4. package/Models/DatabaseModels/OnCallDutyPolicySchedule.ts +7 -0
  5. package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.ts +7 -0
  6. package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts +5 -3
  7. package/Models/DatabaseModels/Project.ts +4 -2
  8. package/Models/DatabaseModels/ProjectSmtpConfig.ts +4 -2
  9. package/Models/DatabaseModels/StatusPageDomain.ts +6 -4
  10. package/Models/DatabaseModels/User.ts +0 -46
  11. package/Models/DatabaseModels/{UserTwoFactorAuth.ts → UserTotpAuth.ts} +16 -16
  12. package/Models/DatabaseModels/UserWebAuthn.ts +244 -0
  13. package/Models/DatabaseModels/WorkspaceProjectAuthToken.ts +21 -0
  14. package/Server/API/BaseAPI.ts +4 -2
  15. package/Server/API/GlobalConfigAPI.ts +16 -12
  16. package/Server/API/MicrosoftTeamsAPI.ts +1240 -0
  17. package/Server/API/ProjectAPI.ts +4 -2
  18. package/Server/API/ResellerPlanAPI.ts +4 -2
  19. package/Server/API/SlackAPI.ts +54 -48
  20. package/Server/API/StatusPageAPI.ts +5 -3
  21. package/Server/API/UserOnCallLogTimelineAPI.ts +5 -3
  22. package/Server/API/{UserTwoFactorAuthAPI.ts → UserTotpAuthAPI.ts} +20 -20
  23. package/Server/API/UserWebAuthnAPI.ts +103 -0
  24. package/Server/EnvironmentConfig.ts +6 -0
  25. package/Server/Images/MicrosoftTeams/color.png +0 -0
  26. package/Server/Images/MicrosoftTeams/outline.png +0 -0
  27. package/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.ts +4 -2
  28. package/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.ts +27 -0
  29. package/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.ts +25 -0
  30. package/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.ts +15 -0
  31. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +6 -0
  32. package/Server/Infrastructure/Queue.ts +4 -2
  33. package/Server/Infrastructure/SocketIO.ts +4 -2
  34. package/Server/Middleware/ProjectAuthorization.ts +5 -3
  35. package/Server/Middleware/SlackAuthorization.ts +2 -2
  36. package/Server/Middleware/TelemetryIngest.ts +12 -6
  37. package/Server/Services/AlertStateTimelineService.ts +34 -18
  38. package/Server/Services/BillingInvoiceService.ts +8 -4
  39. package/Server/Services/BillingService.ts +13 -9
  40. package/Server/Services/DatabaseService.ts +42 -30
  41. package/Server/Services/IncidentService.ts +5 -3
  42. package/Server/Services/IncidentStateTimelineService.ts +34 -18
  43. package/Server/Services/Index.ts +4 -2
  44. package/Server/Services/MonitorStatusTimelineService.ts +34 -18
  45. package/Server/Services/OnCallDutyPolicyScheduleService.ts +4 -2
  46. package/Server/Services/ProjectService.ts +6 -4
  47. package/Server/Services/ScheduledMaintenanceStateTimelineService.ts +26 -14
  48. package/Server/Services/StatusPageService.ts +4 -2
  49. package/Server/Services/UserService.ts +21 -5
  50. package/Server/Services/{UserTwoFactorAuthService.ts → UserTotpAuthService.ts} +26 -7
  51. package/Server/Services/UserWebAuthnService.ts +419 -0
  52. package/Server/Services/WorkspaceNotificationRuleService.ts +257 -77
  53. package/Server/Services/WorkspaceProjectAuthTokenService.ts +2 -2
  54. package/Server/Types/AnalyticsDatabase/ModelPermission.ts +9 -5
  55. package/Server/Types/Database/Permissions/BasePermission.ts +4 -2
  56. package/Server/Types/Database/Permissions/TenantPermission.ts +5 -3
  57. package/Server/Types/Database/QueryHelper.ts +4 -2
  58. package/Server/Types/Markdown.ts +6 -4
  59. package/Server/Types/Workflow/ComponentCode.ts +4 -2
  60. package/Server/Types/Workflow/Components/Conditions/IfElse.ts +5 -3
  61. package/Server/Types/Workflow/Components/JavaScript.ts +5 -3
  62. package/Server/Types/Workflow/TriggerCode.ts +4 -2
  63. package/Server/Utils/AnalyticsDatabase/Statement.ts +4 -2
  64. package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +21 -11
  65. package/Server/Utils/Browser.ts +6 -4
  66. package/Server/Utils/CodeRepository/GitHub/GitHub.ts +4 -2
  67. package/Server/Utils/LocalFile.ts +14 -0
  68. package/Server/Utils/Monitor/MonitorResource.ts +17 -9
  69. package/Server/Utils/Realtime.ts +4 -2
  70. package/Server/Utils/StartServer.ts +1 -1
  71. package/Server/Utils/Telemetry.ts +15 -9
  72. package/Server/Utils/{TwoFactorAuth.ts → TotpAuth.ts} +2 -2
  73. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.ts +75 -16
  74. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.ts +649 -0
  75. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.ts +237 -0
  76. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.ts +1321 -0
  77. package/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.ts +155 -0
  78. package/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.ts +119 -0
  79. package/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.ts +959 -0
  80. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.ts +16 -14
  81. package/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.ts +17 -14
  82. package/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.ts +18 -13
  83. package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +2547 -14
  84. package/Server/Utils/Workspace/Slack/Actions/Alert.ts +4 -2
  85. package/Server/Utils/Workspace/Slack/Actions/Auth.ts +4 -2
  86. package/Server/Utils/Workspace/Slack/Actions/Incident.ts +14 -10
  87. package/Server/Utils/Workspace/Slack/Actions/Monitor.ts +4 -2
  88. package/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.ts +4 -2
  89. package/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.ts +14 -10
  90. package/Server/Utils/Workspace/Slack/Messages/Alert.ts +9 -7
  91. package/Server/Utils/Workspace/Slack/Messages/Incident.ts +9 -7
  92. package/Server/Utils/Workspace/Slack/Messages/Monitor.ts +9 -7
  93. package/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.ts +9 -7
  94. package/Server/Utils/Workspace/Slack/Slack.ts +6 -0
  95. package/Server/Utils/Workspace/Workspace.ts +13 -10
  96. package/Server/Utils/Workspace/WorkspaceBase.ts +9 -0
  97. package/Tests/Server/API/BaseAPI.test.ts +64 -52
  98. package/Tests/Server/Services/BillingService.test.ts +4 -4
  99. package/Tests/Server/Services/TeamMemberService.test.ts +20 -12
  100. package/Tests/Server/TestingUtils/Services/BillingServiceHelper.ts +2 -2
  101. package/Tests/Types/OnCallDutyPolicy/LayerUtil.test.ts +8 -4
  102. package/Tests/UI/Components/DictionaryOfStrings.test.tsx +4 -2
  103. package/Tests/UI/Components/FilePicker.test.tsx +2 -2
  104. package/Tests/Utils/API.test.ts +9 -8
  105. package/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.ts +5 -3
  106. package/Types/Html.ts +5 -3
  107. package/Types/JSONFunctions.ts +5 -5
  108. package/Types/Metrics/MetricsQuery.ts +6 -4
  109. package/Types/Monitor/MonitorType.ts +8 -6
  110. package/Types/OnCallDutyPolicy/Layer.ts +29 -17
  111. package/Types/Phone.ts +5 -3
  112. package/Types/Workspace/NotificationRules/BaseNotificationRule.ts +1 -0
  113. package/Types/Workspace/NotificationRules/CreateChannelNotificationRule.ts +5 -2
  114. package/Types/Workspace/WorkspaceMessagePayload.ts +1 -0
  115. package/Types/Workspace/WorkspaceType.ts +13 -0
  116. package/UI/Components/Charts/Utils/DataPoint.ts +8 -6
  117. package/UI/Components/Detail/Detail.tsx +4 -1
  118. package/UI/Components/FilePicker/FilePicker.tsx +1 -1
  119. package/UI/Components/Forms/Types/Field.ts +4 -2
  120. package/UI/Components/Image/Image.tsx +1 -1
  121. package/UI/Components/JSONTable/JSONTable.tsx +4 -2
  122. package/UI/Components/ModelTable/BaseModelTable.tsx +5 -3
  123. package/UI/Components/SideMenu/SideMenu.tsx +4 -2
  124. package/UI/Components/SideMenu/SideMenuItem.tsx +69 -45
  125. package/UI/Config.ts +3 -0
  126. package/UI/Utils/API/API.ts +5 -3
  127. package/UI/Utils/Countries.ts +5 -3
  128. package/UI/Utils/Login.ts +6 -1
  129. package/Utils/Base64.ts +13 -0
  130. package/Utils/Schema/ModelSchema.ts +4 -2
  131. package/build/dist/Models/DatabaseModels/Index.js +4 -2
  132. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  133. package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js +7 -0
  134. package/build/dist/Models/DatabaseModels/OnCallDutyPolicy.js.map +1 -1
  135. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +7 -0
  136. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
  137. package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js +7 -0
  138. package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js.map +1 -1
  139. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +7 -0
  140. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js.map +1 -1
  141. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +5 -3
  142. package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js.map +1 -1
  143. package/build/dist/Models/DatabaseModels/Project.js +4 -2
  144. package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
  145. package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js +4 -2
  146. package/build/dist/Models/DatabaseModels/ProjectSmtpConfig.js.map +1 -1
  147. package/build/dist/Models/DatabaseModels/StatusPageDomain.js +6 -4
  148. package/build/dist/Models/DatabaseModels/StatusPageDomain.js.map +1 -1
  149. package/build/dist/Models/DatabaseModels/User.js +0 -49
  150. package/build/dist/Models/DatabaseModels/User.js.map +1 -1
  151. package/build/dist/Models/DatabaseModels/{UserTwoFactorAuth.js → UserTotpAuth.js} +27 -27
  152. package/build/dist/Models/DatabaseModels/UserTotpAuth.js.map +1 -0
  153. package/build/dist/Models/DatabaseModels/UserWebAuthn.js +270 -0
  154. package/build/dist/Models/DatabaseModels/UserWebAuthn.js.map +1 -0
  155. package/build/dist/Models/DatabaseModels/WorkspaceProjectAuthToken.js.map +1 -1
  156. package/build/dist/Server/API/BaseAPI.js +4 -2
  157. package/build/dist/Server/API/BaseAPI.js.map +1 -1
  158. package/build/dist/Server/API/GlobalConfigAPI.js +16 -12
  159. package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
  160. package/build/dist/Server/API/MicrosoftTeamsAPI.js +771 -0
  161. package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -0
  162. package/build/dist/Server/API/ProjectAPI.js +4 -2
  163. package/build/dist/Server/API/ProjectAPI.js.map +1 -1
  164. package/build/dist/Server/API/ResellerPlanAPI.js +4 -2
  165. package/build/dist/Server/API/ResellerPlanAPI.js.map +1 -1
  166. package/build/dist/Server/API/SlackAPI.js +53 -47
  167. package/build/dist/Server/API/SlackAPI.js.map +1 -1
  168. package/build/dist/Server/API/StatusPageAPI.js +5 -3
  169. package/build/dist/Server/API/StatusPageAPI.js.map +1 -1
  170. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js +5 -3
  171. package/build/dist/Server/API/UserOnCallLogTimelineAPI.js.map +1 -1
  172. package/build/dist/Server/API/{UserTwoFactorAuthAPI.js → UserTotpAuthAPI.js} +16 -16
  173. package/build/dist/Server/API/UserTotpAuthAPI.js.map +1 -0
  174. package/build/dist/Server/API/UserWebAuthnAPI.js +65 -0
  175. package/build/dist/Server/API/UserWebAuthnAPI.js.map +1 -0
  176. package/build/dist/Server/EnvironmentConfig.js +3 -0
  177. package/build/dist/Server/EnvironmentConfig.js.map +1 -1
  178. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js +4 -2
  179. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753131488925-AddEnableCustomSubscriberEmailNotificationFooterText.js.map +1 -1
  180. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js +16 -0
  181. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759175457008-MigrationName.js.map +1 -0
  182. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js +16 -0
  183. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759232954703-MigrationName.js.map +1 -0
  184. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js +12 -0
  185. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1759234532998-MigrationName.js.map +1 -0
  186. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +6 -0
  187. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  188. package/build/dist/Server/Infrastructure/Queue.js +4 -2
  189. package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
  190. package/build/dist/Server/Infrastructure/SocketIO.js +4 -2
  191. package/build/dist/Server/Infrastructure/SocketIO.js.map +1 -1
  192. package/build/dist/Server/Middleware/ProjectAuthorization.js +5 -3
  193. package/build/dist/Server/Middleware/ProjectAuthorization.js.map +1 -1
  194. package/build/dist/Server/Middleware/SlackAuthorization.js.map +1 -1
  195. package/build/dist/Server/Middleware/TelemetryIngest.js +12 -6
  196. package/build/dist/Server/Middleware/TelemetryIngest.js.map +1 -1
  197. package/build/dist/Server/Services/AlertStateTimelineService.js +34 -18
  198. package/build/dist/Server/Services/AlertStateTimelineService.js.map +1 -1
  199. package/build/dist/Server/Services/BillingInvoiceService.js +8 -4
  200. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  201. package/build/dist/Server/Services/BillingService.js +13 -9
  202. package/build/dist/Server/Services/BillingService.js.map +1 -1
  203. package/build/dist/Server/Services/DatabaseService.js +40 -28
  204. package/build/dist/Server/Services/DatabaseService.js.map +1 -1
  205. package/build/dist/Server/Services/IncidentService.js +5 -3
  206. package/build/dist/Server/Services/IncidentService.js.map +1 -1
  207. package/build/dist/Server/Services/IncidentStateTimelineService.js +34 -18
  208. package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
  209. package/build/dist/Server/Services/Index.js +4 -2
  210. package/build/dist/Server/Services/Index.js.map +1 -1
  211. package/build/dist/Server/Services/MonitorStatusTimelineService.js +34 -18
  212. package/build/dist/Server/Services/MonitorStatusTimelineService.js.map +1 -1
  213. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +4 -2
  214. package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
  215. package/build/dist/Server/Services/ProjectService.js +6 -4
  216. package/build/dist/Server/Services/ProjectService.js.map +1 -1
  217. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js +26 -14
  218. package/build/dist/Server/Services/ScheduledMaintenanceStateTimelineService.js.map +1 -1
  219. package/build/dist/Server/Services/StatusPageService.js +4 -2
  220. package/build/dist/Server/Services/StatusPageService.js.map +1 -1
  221. package/build/dist/Server/Services/UserService.js +16 -3
  222. package/build/dist/Server/Services/UserService.js.map +1 -1
  223. package/build/dist/Server/Services/{UserTwoFactorAuthService.js → UserTotpAuthService.js} +22 -8
  224. package/build/dist/Server/Services/UserTotpAuthService.js.map +1 -0
  225. package/build/dist/Server/Services/UserWebAuthnService.js +365 -0
  226. package/build/dist/Server/Services/UserWebAuthnService.js.map +1 -0
  227. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js +142 -51
  228. package/build/dist/Server/Services/WorkspaceNotificationRuleService.js.map +1 -1
  229. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +9 -5
  230. package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
  231. package/build/dist/Server/Types/Database/Permissions/BasePermission.js +4 -2
  232. package/build/dist/Server/Types/Database/Permissions/BasePermission.js.map +1 -1
  233. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js +5 -3
  234. package/build/dist/Server/Types/Database/Permissions/TenantPermission.js.map +1 -1
  235. package/build/dist/Server/Types/Database/QueryHelper.js +4 -2
  236. package/build/dist/Server/Types/Database/QueryHelper.js.map +1 -1
  237. package/build/dist/Server/Types/Markdown.js +6 -4
  238. package/build/dist/Server/Types/Markdown.js.map +1 -1
  239. package/build/dist/Server/Types/Workflow/ComponentCode.js +4 -2
  240. package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
  241. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js +5 -3
  242. package/build/dist/Server/Types/Workflow/Components/Conditions/IfElse.js.map +1 -1
  243. package/build/dist/Server/Types/Workflow/Components/JavaScript.js +5 -3
  244. package/build/dist/Server/Types/Workflow/Components/JavaScript.js.map +1 -1
  245. package/build/dist/Server/Types/Workflow/TriggerCode.js.map +1 -1
  246. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js +4 -2
  247. package/build/dist/Server/Utils/AnalyticsDatabase/Statement.js.map +1 -1
  248. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +21 -11
  249. package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
  250. package/build/dist/Server/Utils/Browser.js +6 -4
  251. package/build/dist/Server/Utils/Browser.js.map +1 -1
  252. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +4 -2
  253. package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
  254. package/build/dist/Server/Utils/LocalFile.js +16 -0
  255. package/build/dist/Server/Utils/LocalFile.js.map +1 -1
  256. package/build/dist/Server/Utils/Monitor/MonitorResource.js +17 -9
  257. package/build/dist/Server/Utils/Monitor/MonitorResource.js.map +1 -1
  258. package/build/dist/Server/Utils/Realtime.js +4 -2
  259. package/build/dist/Server/Utils/Realtime.js.map +1 -1
  260. package/build/dist/Server/Utils/StartServer.js.map +1 -1
  261. package/build/dist/Server/Utils/Telemetry.js +6 -4
  262. package/build/dist/Server/Utils/Telemetry.js.map +1 -1
  263. package/build/dist/Server/Utils/{TwoFactorAuth.js → TotpAuth.js} +8 -8
  264. package/build/dist/Server/Utils/TotpAuth.js.map +1 -0
  265. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js +86 -36
  266. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ActionTypes.js.map +1 -1
  267. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js +531 -0
  268. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Alert.js.map +1 -0
  269. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js +206 -0
  270. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Auth.js.map +1 -0
  271. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js +1102 -0
  272. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Incident.js.map +1 -0
  273. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js +136 -0
  274. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/Monitor.js.map +1 -0
  275. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js +107 -0
  276. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/OnCallDutyPolicy.js.map +1 -0
  277. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js +795 -0
  278. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Actions/ScheduledMaintenance.js.map +1 -0
  279. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js +16 -14
  280. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Alert.js.map +1 -1
  281. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js +16 -14
  282. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/Incident.js.map +1 -1
  283. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js +15 -13
  284. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/Messages/ScheduledMaintenance.js.map +1 -1
  285. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +1982 -13
  286. package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
  287. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js +4 -2
  288. package/build/dist/Server/Utils/Workspace/Slack/Actions/Alert.js.map +1 -1
  289. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js +4 -2
  290. package/build/dist/Server/Utils/Workspace/Slack/Actions/Auth.js.map +1 -1
  291. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js +14 -10
  292. package/build/dist/Server/Utils/Workspace/Slack/Actions/Incident.js.map +1 -1
  293. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js +4 -2
  294. package/build/dist/Server/Utils/Workspace/Slack/Actions/Monitor.js.map +1 -1
  295. package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js +4 -2
  296. package/build/dist/Server/Utils/Workspace/Slack/Actions/OnCallDutyPolicy.js.map +1 -1
  297. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js +14 -10
  298. package/build/dist/Server/Utils/Workspace/Slack/Actions/ScheduledMaintenance.js.map +1 -1
  299. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js +9 -7
  300. package/build/dist/Server/Utils/Workspace/Slack/Messages/Alert.js.map +1 -1
  301. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js +9 -7
  302. package/build/dist/Server/Utils/Workspace/Slack/Messages/Incident.js.map +1 -1
  303. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js +9 -7
  304. package/build/dist/Server/Utils/Workspace/Slack/Messages/Monitor.js.map +1 -1
  305. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js +9 -7
  306. package/build/dist/Server/Utils/Workspace/Slack/Messages/ScheduledMaintenance.js.map +1 -1
  307. package/build/dist/Server/Utils/Workspace/Slack/Slack.js +5 -0
  308. package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
  309. package/build/dist/Server/Utils/Workspace/Workspace.js +12 -10
  310. package/build/dist/Server/Utils/Workspace/Workspace.js.map +1 -1
  311. package/build/dist/Server/Utils/Workspace/WorkspaceBase.js.map +1 -1
  312. package/build/dist/Tests/Server/API/BaseAPI.test.js +59 -47
  313. package/build/dist/Tests/Server/API/BaseAPI.test.js.map +1 -1
  314. package/build/dist/Tests/Server/Services/BillingService.test.js +4 -4
  315. package/build/dist/Tests/Server/Services/BillingService.test.js.map +1 -1
  316. package/build/dist/Tests/Server/Services/TeamMemberService.test.js +20 -12
  317. package/build/dist/Tests/Server/Services/TeamMemberService.test.js.map +1 -1
  318. package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js +2 -2
  319. package/build/dist/Tests/Server/TestingUtils/Services/BillingServiceHelper.js.map +1 -1
  320. package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js +8 -4
  321. package/build/dist/Tests/Types/OnCallDutyPolicy/LayerUtil.test.js.map +1 -1
  322. package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js +4 -2
  323. package/build/dist/Tests/UI/Components/DictionaryOfStrings.test.js.map +1 -1
  324. package/build/dist/Tests/UI/Components/FilePicker.test.js +2 -2
  325. package/build/dist/Tests/UI/Components/FilePicker.test.js.map +1 -1
  326. package/build/dist/Tests/Utils/API.test.js +8 -7
  327. package/build/dist/Tests/Utils/API.test.js.map +1 -1
  328. package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js +5 -3
  329. package/build/dist/Types/BaseDatabase/DatabaseCommonInteractionPropsUtil.js.map +1 -1
  330. package/build/dist/Types/Html.js +5 -3
  331. package/build/dist/Types/Html.js.map +1 -1
  332. package/build/dist/Types/JSONFunctions.js +5 -5
  333. package/build/dist/Types/JSONFunctions.js.map +1 -1
  334. package/build/dist/Types/Monitor/MonitorType.js +8 -6
  335. package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
  336. package/build/dist/Types/OnCallDutyPolicy/Layer.js +29 -17
  337. package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
  338. package/build/dist/Types/Phone.js +5 -3
  339. package/build/dist/Types/Phone.js.map +1 -1
  340. package/build/dist/Types/Workspace/WorkspaceType.js +9 -0
  341. package/build/dist/Types/Workspace/WorkspaceType.js.map +1 -1
  342. package/build/dist/UI/Components/Charts/Utils/DataPoint.js +8 -6
  343. package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
  344. package/build/dist/UI/Components/Detail/Detail.js +4 -1
  345. package/build/dist/UI/Components/Detail/Detail.js.map +1 -1
  346. package/build/dist/UI/Components/FilePicker/FilePicker.js +1 -1
  347. package/build/dist/UI/Components/FilePicker/FilePicker.js.map +1 -1
  348. package/build/dist/UI/Components/Image/Image.js +1 -1
  349. package/build/dist/UI/Components/Image/Image.js.map +1 -1
  350. package/build/dist/UI/Components/JSONTable/JSONTable.js.map +1 -1
  351. package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
  352. package/build/dist/UI/Components/SideMenu/SideMenu.js +4 -2
  353. package/build/dist/UI/Components/SideMenu/SideMenu.js.map +1 -1
  354. package/build/dist/UI/Components/SideMenu/SideMenuItem.js +62 -38
  355. package/build/dist/UI/Components/SideMenu/SideMenuItem.js.map +1 -1
  356. package/build/dist/UI/Config.js +1 -0
  357. package/build/dist/UI/Config.js.map +1 -1
  358. package/build/dist/UI/Utils/API/API.js +5 -3
  359. package/build/dist/UI/Utils/API/API.js.map +1 -1
  360. package/build/dist/UI/Utils/Countries.js.map +1 -1
  361. package/build/dist/UI/Utils/Login.js +6 -1
  362. package/build/dist/UI/Utils/Login.js.map +1 -1
  363. package/build/dist/Utils/Base64.js +12 -0
  364. package/build/dist/Utils/Base64.js.map +1 -0
  365. package/build/dist/Utils/Schema/ModelSchema.js +4 -2
  366. package/build/dist/Utils/Schema/ModelSchema.js.map +1 -1
  367. package/package.json +5 -1
  368. package/build/dist/Models/DatabaseModels/UserTwoFactorAuth.js.map +0 -1
  369. package/build/dist/Server/API/UserTwoFactorAuthAPI.js.map +0 -1
  370. package/build/dist/Server/Services/UserTwoFactorAuthService.js.map +0 -1
  371. package/build/dist/Server/Utils/TwoFactorAuth.js.map +0 -1
@@ -146,7 +146,8 @@ import ServiceCatalogDependency from "./ServiceCatalogDependency";
146
146
  import ServiceCatalogMonitor from "./ServiceCatalogMonitor";
147
147
  import ServiceCatalogTelemetryService from "./ServiceCatalogTelemetryService";
148
148
 
149
- import UserTwoFactorAuth from "./UserTwoFactorAuth";
149
+ import UserTotpAuth from "./UserTotpAuth";
150
+ import UserWebAuthn from "./UserWebAuthn";
150
151
 
151
152
  import TelemetryIngestionKey from "./TelemetryIngestionKey";
152
153
 
@@ -366,7 +367,8 @@ const AllModelTypes: Array<{
366
367
  ProbeOwnerTeam,
367
368
  ProbeOwnerUser,
368
369
 
369
- UserTwoFactorAuth,
370
+ UserTotpAuth,
371
+ UserWebAuthn,
370
372
 
371
373
  TelemetryIngestionKey,
372
374
 
@@ -29,10 +29,17 @@ import {
29
29
  ManyToOne,
30
30
  } from "typeorm";
31
31
  import NotificationRuleWorkspaceChannel from "../../Types/Workspace/NotificationRules/NotificationRuleWorkspaceChannel";
32
+ import EnableWorkflow from "../../Types/Database/EnableWorkflow";
32
33
 
33
34
  @EnableDocumentation()
34
35
  @AccessControlColumn("labels")
35
36
  @TenantColumn("projectId")
37
+ @EnableWorkflow({
38
+ create: true,
39
+ delete: true,
40
+ update: true,
41
+ read: true,
42
+ })
36
43
  @TableAccessControl({
37
44
  create: [
38
45
  Permission.ProjectOwner,
@@ -25,6 +25,7 @@ import Permission from "../../Types/Permission";
25
25
  import UserNotificationEventType from "../../Types/UserNotification/UserNotificationEventType";
26
26
  import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
27
27
  import Alert from "./Alert";
28
+ import EnableWorkflow from "../../Types/Database/EnableWorkflow";
28
29
 
29
30
  @TableBillingAccessControl({
30
31
  create: PlanType.Growth,
@@ -32,6 +33,12 @@ import Alert from "./Alert";
32
33
  update: PlanType.Growth,
33
34
  delete: PlanType.Growth,
34
35
  })
36
+ @EnableWorkflow({
37
+ create: true,
38
+ delete: true,
39
+ update: true,
40
+ read: true,
41
+ })
35
42
  @EnableDocumentation()
36
43
  @TenantColumn("projectId")
37
44
  @TableAccessControl({
@@ -29,6 +29,7 @@ import {
29
29
  ManyToMany,
30
30
  ManyToOne,
31
31
  } from "typeorm";
32
+ import EnableWorkflow from "../../Types/Database/EnableWorkflow";
32
33
 
33
34
  @EnableDocumentation()
34
35
  @TableBillingAccessControl({
@@ -37,6 +38,12 @@ import {
37
38
  update: PlanType.Growth,
38
39
  delete: PlanType.Growth,
39
40
  })
41
+ @EnableWorkflow({
42
+ create: true,
43
+ delete: true,
44
+ update: true,
45
+ read: true,
46
+ })
40
47
  @AccessControlColumn("labels")
41
48
  @TenantColumn("projectId")
42
49
  @TableAccessControl({
@@ -17,6 +17,7 @@ import Permission from "../../Types/Permission";
17
17
  import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
18
18
  import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
19
19
  import { PlanType } from "../../Types/Billing/SubscriptionPlan";
20
+ import EnableWorkflow from "../../Types/Database/EnableWorkflow";
20
21
 
21
22
  @EnableDocumentation()
22
23
  @TableBillingAccessControl({
@@ -26,6 +27,12 @@ import { PlanType } from "../../Types/Billing/SubscriptionPlan";
26
27
  delete: PlanType.Growth,
27
28
  })
28
29
  @TenantColumn("projectId")
30
+ @EnableWorkflow({
31
+ create: true,
32
+ delete: true,
33
+ update: true,
34
+ read: true,
35
+ })
29
36
  @TableAccessControl({
30
37
  create: [
31
38
  Permission.ProjectOwner,
@@ -132,9 +132,11 @@ export default class OnCallDutyPolicyUserOverride extends BaseModel {
132
132
  })
133
133
  public projectId?: ObjectID = undefined;
134
134
 
135
- // If this is null then it's a global override
136
- // If this is set then it's a policy specific override
137
- // Policy specifc override will take precedence over global override
135
+ /*
136
+ * If this is null then it's a global override
137
+ * If this is set then it's a policy specific override
138
+ * Policy specifc override will take precedence over global override
139
+ */
138
140
 
139
141
  @ColumnAccessControl({
140
142
  create: [
@@ -1292,8 +1292,10 @@ export default class Project extends TenantModel {
1292
1292
  })
1293
1293
  public letCustomerSupportAccessProject?: boolean = undefined;
1294
1294
 
1295
- // This is an internal field. This is used for internal analytics for example: Metabase.
1296
- // Values can be between 0 and 100.
1295
+ /*
1296
+ * This is an internal field. This is used for internal analytics for example: Metabase.
1297
+ * Values can be between 0 and 100.
1298
+ */
1297
1299
  @ColumnAccessControl({
1298
1300
  create: [],
1299
1301
  read: [],
@@ -336,8 +336,10 @@ export default class ProjectSmtpConfig extends BaseModel {
336
336
  })
337
337
  public deletedByUserId?: ObjectID = undefined;
338
338
 
339
- // This is not required because some SMTP servers do not require authentication.
340
- // eg: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#option-2-send-mail-directly-from-your-printer-or-application-to-microsoft-365-or-office-365-direct-send
339
+ /*
340
+ * This is not required because some SMTP servers do not require authentication.
341
+ * eg: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#option-2-send-mail-directly-from-your-printer-or-application-to-microsoft-365-or-office-365-direct-send
342
+ */
341
343
  @ColumnAccessControl({
342
344
  create: [
343
345
  Permission.ProjectOwner,
@@ -420,10 +420,12 @@ export default class StatusPageDomain extends BaseModel {
420
420
  @JoinColumn({ name: "deletedByUserId" })
421
421
  public deletedByUser?: User = undefined;
422
422
 
423
- // This token is used by the Worker.
424
- // worker pings the status page of customers - eg: status.company.com/verify-token/:id
425
- // and the end point on Status Page project returns 200.
426
- // when that happens the isCnameVerified is set to True and the certificate is added to Greenlock.
423
+ /*
424
+ * This token is used by the Worker.
425
+ * worker pings the status page of customers - eg: status.company.com/verify-token/:id
426
+ * and the end point on Status Page project returns 200.
427
+ * when that happens the isCnameVerified is set to True and the certificate is added to Greenlock.
428
+ */
427
429
  @ColumnAccessControl({
428
430
  create: [
429
431
  Permission.ProjectOwner,
@@ -1,7 +1,6 @@
1
1
  import File from "./File";
2
2
  import UserModel from "../../Models/DatabaseModels/DatabaseBaseModel/UserModel";
3
3
  import Route from "../../Types/API/Route";
4
- import URL from "../../Types/API/URL";
5
4
  import CompanySize from "../../Types/Company/CompanySize";
6
5
  import JobRole from "../../Types/Company/JobRole";
7
6
  import AllowAccessIfSubscriptionIsUnpaid from "../../Types/Database/AccessControl/AllowAccessIfSubscriptionIsUnpaid";
@@ -301,51 +300,6 @@ class User extends UserModel {
301
300
  })
302
301
  public twoFactorAuthEnabled?: boolean = undefined;
303
302
 
304
- @ColumnAccessControl({
305
- create: [],
306
- read: [],
307
-
308
- update: [],
309
- })
310
- @TableColumn({ type: TableColumnType.ShortText })
311
- @Column({
312
- type: ColumnType.ShortText,
313
- length: ColumnLength.ShortText,
314
- nullable: true,
315
- unique: false,
316
- })
317
- public twoFactorSecretCode?: string = undefined;
318
-
319
- @ColumnAccessControl({
320
- create: [],
321
- read: [],
322
-
323
- update: [],
324
- })
325
- @TableColumn({ type: TableColumnType.ShortURL })
326
- @Column({
327
- type: ColumnType.ShortURL,
328
- length: ColumnLength.ShortURL,
329
- nullable: true,
330
- unique: false,
331
- transformer: URL.getDatabaseTransformer(),
332
- })
333
- public twoFactorAuthUrl?: URL = undefined;
334
-
335
- @ColumnAccessControl({
336
- create: [],
337
- read: [Permission.CurrentUser],
338
-
339
- update: [],
340
- })
341
- @TableColumn({ type: TableColumnType.Array })
342
- @Column({
343
- type: ColumnType.Array,
344
- nullable: true,
345
- unique: false,
346
- })
347
- public backupCodes?: Array<string> = undefined;
348
-
349
303
  @ColumnAccessControl({
350
304
  create: [],
351
305
  read: [],
@@ -27,19 +27,19 @@ import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
27
27
  delete: [Permission.CurrentUser],
28
28
  update: [Permission.CurrentUser],
29
29
  })
30
- @CrudApiEndpoint(new Route("/user-two-factor-auth"))
30
+ @CrudApiEndpoint(new Route("/user-totp-auth"))
31
31
  @Entity({
32
- name: "UserTwoFactorAuth",
32
+ name: "UserTotpAuth",
33
33
  })
34
34
  @TableMetadata({
35
- tableName: "UserTwoFactorAuth",
36
- singularName: "Two Factor Auth",
37
- pluralName: "Two Factor Auth",
35
+ tableName: "UserTotpAuth",
36
+ singularName: "TOTP Auth",
37
+ pluralName: "TOTP Auth",
38
38
  icon: IconProp.ShieldCheck,
39
- tableDescription: "Two Factor Authentication for users",
39
+ tableDescription: "TOTP Authentication for users",
40
40
  })
41
41
  @CurrentUserCanAccessRecordBy("userId")
42
- class UserTwoFactorAuth extends BaseModel {
42
+ class UserTotpAuth extends BaseModel {
43
43
  @ColumnAccessControl({
44
44
  create: [Permission.CurrentUser],
45
45
  read: [Permission.CurrentUser],
@@ -48,8 +48,8 @@ class UserTwoFactorAuth extends BaseModel {
48
48
  @TableColumn({
49
49
  type: TableColumnType.ShortText,
50
50
  canReadOnRelationQuery: true,
51
- title: "Two Factor Auth Name",
52
- description: "Name of the two factor authentication",
51
+ title: "TOTP Auth Name",
52
+ description: "Name of the TOTP authentication",
53
53
  })
54
54
  @Column({
55
55
  type: ColumnType.ShortText,
@@ -67,8 +67,8 @@ class UserTwoFactorAuth extends BaseModel {
67
67
  @TableColumn({
68
68
  type: TableColumnType.VeryLongText,
69
69
  canReadOnRelationQuery: false,
70
- title: "Two Factor Auth Secret",
71
- description: "Secret of the two factor authentication",
70
+ title: "TOTP Auth Secret",
71
+ description: "Secret of the TOTP authentication",
72
72
  })
73
73
  @Column({
74
74
  type: ColumnType.VeryLongText,
@@ -85,8 +85,8 @@ class UserTwoFactorAuth extends BaseModel {
85
85
  @TableColumn({
86
86
  type: TableColumnType.VeryLongText,
87
87
  canReadOnRelationQuery: false,
88
- title: "Two Factor Auth OTP URL",
89
- description: "OTP URL of the two factor authentication",
88
+ title: "TOTP Auth OTP URL",
89
+ description: "OTP URL of the TOTP authentication",
90
90
  })
91
91
  @Column({
92
92
  type: ColumnType.VeryLongText,
@@ -106,7 +106,7 @@ class UserTwoFactorAuth extends BaseModel {
106
106
  title: "Is Verified",
107
107
  isDefaultValueColumn: true,
108
108
  description:
109
- "Is this two factor authentication verified and validated (has user entered the tokent to verify it)",
109
+ "Is this TOTP authentication verified and validated (has user entered the token to verify it)",
110
110
  defaultValue: false,
111
111
  })
112
112
  @Column({
@@ -171,7 +171,7 @@ class UserTwoFactorAuth extends BaseModel {
171
171
  manyToOneRelationColumn: "userId",
172
172
  type: TableColumnType.Entity,
173
173
  title: "User",
174
- description: "Relation to User who owns this two factor authentication",
174
+ description: "Relation to User who owns this TOTP authentication",
175
175
  })
176
176
  @ManyToOne(
177
177
  () => {
@@ -207,4 +207,4 @@ class UserTwoFactorAuth extends BaseModel {
207
207
  public userId?: ObjectID = undefined;
208
208
  }
209
209
 
210
- export default UserTwoFactorAuth;
210
+ export default UserTotpAuth;
@@ -0,0 +1,244 @@
1
+ import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
2
+ import User from "./User";
3
+ import Route from "../../Types/API/Route";
4
+ import AllowAccessIfSubscriptionIsUnpaid from "../../Types/Database/AccessControl/AllowAccessIfSubscriptionIsUnpaid";
5
+ import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
6
+ import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
7
+ import ColumnLength from "../../Types/Database/ColumnLength";
8
+ import ColumnType from "../../Types/Database/ColumnType";
9
+ import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
10
+ import CurrentUserCanAccessRecordBy from "../../Types/Database/CurrentUserCanAccessRecordBy";
11
+ import EnableDocumentation from "../../Types/Database/EnableDocumentation";
12
+ import TableColumn from "../../Types/Database/TableColumn";
13
+ import TableColumnType from "../../Types/Database/TableColumnType";
14
+ import TableMetadata from "../../Types/Database/TableMetadata";
15
+ import IconProp from "../../Types/Icon/IconProp";
16
+ import ObjectID from "../../Types/ObjectID";
17
+ import Permission from "../../Types/Permission";
18
+ import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
19
+
20
+ @EnableDocumentation({
21
+ isMasterAdminApiDocs: true,
22
+ })
23
+ @AllowAccessIfSubscriptionIsUnpaid()
24
+ @TableAccessControl({
25
+ create: [Permission.CurrentUser],
26
+ read: [Permission.CurrentUser],
27
+ delete: [Permission.CurrentUser],
28
+ update: [Permission.CurrentUser],
29
+ })
30
+ @CrudApiEndpoint(new Route("/user-webauthn"))
31
+ @Entity({
32
+ name: "UserWebAuthn",
33
+ })
34
+ @TableMetadata({
35
+ tableName: "UserWebAuthn",
36
+ singularName: "WebAuthn Credential",
37
+ pluralName: "WebAuthn Credentials",
38
+ icon: IconProp.ShieldCheck,
39
+ tableDescription: "WebAuthn credentials for users (security keys)",
40
+ })
41
+ @CurrentUserCanAccessRecordBy("userId")
42
+ class UserWebAuthn extends BaseModel {
43
+ @ColumnAccessControl({
44
+ create: [Permission.CurrentUser],
45
+ read: [Permission.CurrentUser],
46
+ update: [Permission.CurrentUser],
47
+ })
48
+ @TableColumn({
49
+ type: TableColumnType.ShortText,
50
+ canReadOnRelationQuery: true,
51
+ title: "Credential Name",
52
+ description: "Name of the WebAuthn credential",
53
+ })
54
+ @Column({
55
+ type: ColumnType.ShortText,
56
+ length: ColumnLength.ShortText,
57
+ nullable: false,
58
+ unique: false,
59
+ })
60
+ public name?: string = undefined;
61
+
62
+ @ColumnAccessControl({
63
+ create: [Permission.CurrentUser],
64
+ read: [],
65
+ update: [],
66
+ })
67
+ @TableColumn({
68
+ type: TableColumnType.VeryLongText,
69
+ canReadOnRelationQuery: false,
70
+ title: "Credential ID",
71
+ description: "Unique identifier for the WebAuthn credential",
72
+ })
73
+ @Column({
74
+ type: ColumnType.VeryLongText,
75
+ nullable: false,
76
+ unique: true,
77
+ })
78
+ public credentialId?: string = undefined;
79
+
80
+ @ColumnAccessControl({
81
+ create: [Permission.CurrentUser],
82
+ read: [],
83
+ update: [],
84
+ })
85
+ @TableColumn({
86
+ type: TableColumnType.VeryLongText,
87
+ canReadOnRelationQuery: false,
88
+ title: "Public Key",
89
+ description: "Public key of the WebAuthn credential",
90
+ })
91
+ @Column({
92
+ type: ColumnType.VeryLongText,
93
+ nullable: false,
94
+ unique: false,
95
+ })
96
+ public publicKey?: string = undefined;
97
+
98
+ @ColumnAccessControl({
99
+ create: [Permission.CurrentUser],
100
+ read: [],
101
+ update: [],
102
+ })
103
+ @TableColumn({
104
+ type: TableColumnType.VeryLongText,
105
+ canReadOnRelationQuery: false,
106
+ title: "Counter",
107
+ description: "Counter for the WebAuthn credential",
108
+ })
109
+ @Column({
110
+ type: ColumnType.VeryLongText,
111
+ nullable: false,
112
+ unique: false,
113
+ })
114
+ public counter?: string = undefined;
115
+
116
+ @ColumnAccessControl({
117
+ create: [Permission.CurrentUser],
118
+ read: [],
119
+ update: [],
120
+ })
121
+ @TableColumn({
122
+ type: TableColumnType.VeryLongText,
123
+ canReadOnRelationQuery: false,
124
+ title: "Transports",
125
+ description: "Transports supported by the WebAuthn credential",
126
+ })
127
+ @Column({
128
+ type: ColumnType.VeryLongText,
129
+ nullable: true,
130
+ unique: false,
131
+ })
132
+ public transports?: string = undefined;
133
+
134
+ @ColumnAccessControl({
135
+ create: [Permission.CurrentUser],
136
+ read: [Permission.CurrentUser],
137
+ update: [],
138
+ })
139
+ @TableColumn({
140
+ type: TableColumnType.Boolean,
141
+ canReadOnRelationQuery: true,
142
+ title: "Is Verified",
143
+ isDefaultValueColumn: true,
144
+ description: "Is this WebAuthn credential verified and validated",
145
+ defaultValue: false,
146
+ })
147
+ @Column({
148
+ type: ColumnType.Boolean,
149
+ nullable: false,
150
+ default: false,
151
+ })
152
+ public isVerified?: boolean = undefined;
153
+
154
+ @ColumnAccessControl({
155
+ create: [],
156
+ read: [],
157
+ update: [],
158
+ })
159
+ @TableColumn({
160
+ manyToOneRelationColumn: "deletedByUserId",
161
+ type: TableColumnType.Entity,
162
+ title: "Deleted by User",
163
+ modelType: User,
164
+ description:
165
+ "Relation to User who deleted this object (if this object was deleted by a User)",
166
+ })
167
+ @ManyToOne(
168
+ () => {
169
+ return User;
170
+ },
171
+ {
172
+ cascade: false,
173
+ eager: false,
174
+ nullable: true,
175
+ onDelete: "SET NULL",
176
+ orphanedRowAction: "nullify",
177
+ },
178
+ )
179
+ @JoinColumn({ name: "deletedByUserId" })
180
+ public deletedByUser?: User = undefined;
181
+
182
+ @ColumnAccessControl({
183
+ create: [],
184
+ read: [],
185
+ update: [],
186
+ })
187
+ @TableColumn({
188
+ type: TableColumnType.ObjectID,
189
+ title: "Deleted by User ID",
190
+ description:
191
+ "User ID who deleted this object (if this object was deleted by a User)",
192
+ })
193
+ @Column({
194
+ type: ColumnType.ObjectID,
195
+ nullable: true,
196
+ transformer: ObjectID.getDatabaseTransformer(),
197
+ })
198
+ public deletedByUserId?: ObjectID = undefined;
199
+
200
+ @ColumnAccessControl({
201
+ create: [Permission.CurrentUser],
202
+ read: [Permission.CurrentUser],
203
+ update: [Permission.CurrentUser],
204
+ })
205
+ @TableColumn({
206
+ manyToOneRelationColumn: "userId",
207
+ type: TableColumnType.Entity,
208
+ title: "User",
209
+ description: "Relation to User who owns this WebAuthn credential",
210
+ })
211
+ @ManyToOne(
212
+ () => {
213
+ return User;
214
+ },
215
+ {
216
+ cascade: false,
217
+ eager: false,
218
+ nullable: true,
219
+ onDelete: "CASCADE",
220
+ orphanedRowAction: "nullify",
221
+ },
222
+ )
223
+ @JoinColumn({ name: "userId" })
224
+ public user?: User = undefined;
225
+
226
+ @ColumnAccessControl({
227
+ create: [Permission.CurrentUser],
228
+ read: [Permission.CurrentUser],
229
+ update: [Permission.CurrentUser],
230
+ })
231
+ @TableColumn({
232
+ type: TableColumnType.ObjectID,
233
+ title: "User ID",
234
+ description: "User ID who owns this WebAuthn credential",
235
+ })
236
+ @Column({
237
+ type: ColumnType.ObjectID,
238
+ nullable: true,
239
+ transformer: ObjectID.getDatabaseTransformer(),
240
+ })
241
+ public userId?: ObjectID = undefined;
242
+ }
243
+
244
+ export default UserWebAuthn;
@@ -21,6 +21,11 @@ export interface MiscData {
21
21
  [key: string]: any;
22
22
  }
23
23
 
24
+ export interface MicrosoftTeamsTeam {
25
+ id: string;
26
+ name: string;
27
+ }
28
+
24
29
  export interface SlackMiscData extends MiscData {
25
30
  teamId: string;
26
31
  teamName: string;
@@ -34,6 +39,22 @@ export interface SlackMiscData extends MiscData {
34
39
  };
35
40
  }
36
41
 
42
+ export interface MicrosoftTeamsMiscData extends MiscData {
43
+ tenantId: string;
44
+ teamId: string;
45
+ teamName: string;
46
+ botId: string;
47
+ appAccessToken?: string;
48
+ adminConsentGranted?: boolean;
49
+ lastAppTokenIssuedAt?: string;
50
+ adminConsentGrantedAt?: string;
51
+ adminConsentGrantedBy?: string;
52
+ availableTeams?: Record<string, MicrosoftTeamsTeam>;
53
+ appAccessTokenExpiresAt?: string;
54
+ }
55
+
56
+ export type WorkspaceMiscData = SlackMiscData | MicrosoftTeamsMiscData;
57
+
37
58
  @TenantColumn("projectId")
38
59
  @TableAccessControl({
39
60
  create: [
@@ -235,8 +235,10 @@ export default class BaseAPI<
235
235
  ): Promise<void> {
236
236
  await this.onBeforeList(req, res);
237
237
 
238
- // Extract pagination parameters from query or body (for POST requests)
239
- // Support both 'skip' and 'offset' parameters (offset is alias for skip)
238
+ /*
239
+ * Extract pagination parameters from query or body (for POST requests)
240
+ * Support both 'skip' and 'offset' parameters (offset is alias for skip)
241
+ */
240
242
  let skipValue: number = 0;
241
243
  let limitValue: number = DEFAULT_LIMIT;
242
244
 
@@ -21,20 +21,24 @@ export default class GlobalConfigAPI extends BaseAPI<
21
21
  `${new this.entityType().getCrudApiPath()?.toString()}/vars`,
22
22
  async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
23
23
  try {
24
- // const globalConfig: GlobalConfig | null =
25
- // await GlobalConfigService.findOneById({
26
- // id: ObjectID.getZeroObjectID(),
27
- // select: {
28
- // useHttps: true,
29
- // },
30
- // props: {
31
- // isRoot: true,
32
- // },
33
- // });
24
+ /*
25
+ * const globalConfig: GlobalConfig | null =
26
+ * await GlobalConfigService.findOneById({
27
+ * id: ObjectID.getZeroObjectID(),
28
+ * select: {
29
+ * useHttps: true,
30
+ * },
31
+ * props: {
32
+ * isRoot: true,
33
+ * },
34
+ * });
35
+ */
34
36
 
35
37
  return Response.sendJsonObjectResponse(req, res, {
36
- // USE_HTTPS:
37
- // globalConfig?.useHttps?.toString() || 'false',
38
+ /*
39
+ * USE_HTTPS:
40
+ * globalConfig?.useHttps?.toString() || 'false',
41
+ */
38
42
  });
39
43
  } catch (err) {
40
44
  next(err);